Rules overview
Every rule exists because the bug shipped. Each is pinned against the markup of the failure it claims to catch — a rule that cannot fail its own fixture is decoration.
The rules htmx-contract enforces. Each has a narrative page under Rules.
| Rule | Summary |
|---|---|
empty-after-oob |
A response empty after out-of-band extraction, without HX-Reswap: none — outerHTML deletes the target. |
duplicate-id |
The same id twice in one document; htmx swaps the first match. |
duplicate-field-in-form |
Two controls sharing a name inside one form; htmx lets the form override the element. |
target-identity-lost |
An outerHTML swap whose replacement does not keep the target id. |
unbounded-poll |
hx-trigger=“every …” with no declared bound. |
dead-target |
hx-target points at an id that is not in the document. |
dead-oob |
An out-of-band node whose target is missing, or which names no target. |
Expanded pages (stubs until filled) live under each rule name in the sidebar.
When you add a rule: implement it, add it to RULES, pin a fixture, expand its
page, run bun run docs:sync.