Rule Structure Guide
May 30, 2026 ยท View on GitHub
Front-End Checklist rules now use one machine-detectable core body contract:
- Intro paragraph before any H2
## Code Exampleor## Code Examples## Why It Matters- Optional implementation or guidance sections
## Verification
Rule Contract V2 adds lightweight, conditional guidance:
## Exceptionsfor nuanced or false-positive-prone rules### Automated Checksand### Manual Checksinside## Verificationwhen both apply## Browser Support,## Support Notes, or## Standardswhen compatibility or compliance materially affects implementation
Browser support notes should come from the repo browser policy in .browserslistrc plus package-backed compatibility data.
Inline link contract
Body prose may include natural inline links when they directly support a sentence-level claim, comparison, or implementation recommendation.
- Keep
sourcesas the authoritative evidence registry. - Keep
resourcesfor further reading, tools, and optional secondary references. - Keep
relatedRulesas the discovery graph for dedicated related-rule UI. - Do not add standalone metadata paragraphs such as
See also ...orReference: .... - Aim for light-touch density: usually
2-5inline links per rule, with0-1in the intro,1-3across the main guidance sections, and0-1internal rule link unless the rule is unusually interconnected. - Prefer newer inline secondary articles only when they add practical or current context that the evergreen primary sources do not already cover well.
- When you mention a specific tool for the first meaningful time in the prose, link that first mention if the tool is genuinely useful to the reader and already appears in
resourcesortools. - Keep secondary article links curated. Good defaults are well-established practitioner sources such as CSS-Tricks, Smashing Magazine, NN/g, WebAIM, Screaming Frog, Sitebulb, Moz, or Yoast.
- Use descriptive anchor text that names the concept or claim being supported.
Required rules
## Code Example(s)must appear before## Why It Matters## Why It Mattersmust appear before## Verification## Verificationmust be the final H2- Optional H2 sections belong between
## Why It Mattersand## Verification
Preferred optional headings
## Best Practices## Common Mistakes## Framework Examples## Tools & Validation## Thresholds## Exceptions## Browser Support## Support Notes## Standards## Implementation Notes
The validator reports headings outside this taxonomy so new one-off section names do not spread silently.
Conditional V2 sections
Use ## Exceptions when the rule needs caveats, false-positive guidance, or valid exceptions.
Use ## Browser Support or ## Support Notes when a rule depends on feature support, environment differences, or fallback strategy.
Use ## Standards when a visible WCAG, spec, Google, or policy mapping changes implementation decisions.
Inside ## Verification, prefer:
## Verification
### Automated Checks
- CI, lint, crawler, Lighthouse, axe, or script-based validation
### Manual Checks
- Browser, assistive tech, visual, or judgment-based validation
Keep a compact flat verification list only when the rule is too simple to justify the split.
Before
Short intro paragraph.
## Basic Implementation
...
## Testing
...
## Accessibility Considerations
...
After
Short intro paragraph.
## Code Example
...
## Why It Matters
...
## Accessibility Considerations
...
## Verification
...
Commands
pnpm validate:rule-structure
pnpm validate:rule-structure --report
pnpm report:v2-gaps
pnpm report:rule-links
pnpm generate:exceptions-hints
pnpm generate:support-notes
pnpm generate:verification-split
pnpm normalize:rule-structure --report
pnpm normalize:rule-structure --write