Keeping Rule Docs and Presets in Sync
ยท 2 min read
Documentation drift is one of the easiest ways to lose trust in a lint plugin.
This repository treats metadata-to-doc synchronization as a first-class quality gate, not a best-effort cleanup task.
The core principleโ
Human-written explanation should stay human.
Mechanically derivable data should be generated and tested.
For us, that includes:
- README rules matrix
- presets rules matrix
- rule metadata snapshots and integrity contracts
What this preventsโ
Without canonical generation, drift appears quickly:
- rule added to a preset but matrix unchanged
- fix/suggestion capability changes but docs lag
- links and IDs diverge between source and docs
That leads to wrong migration guidance and unnecessary issue churn.
How we enforce itโ
- sync scripts produce canonical matrix sections
- CI checks fail when docs and generated sections diverge
- docs integrity tests enforce stable heading/catalog conventions
The result is less manual bookkeeping and fewer review-time surprises.
Practical maintenance adviceโ
When changing rules or preset composition:
- update rule source and metadata
- run matrix sync scripts
- run docs integrity and snapshot suites
- only then review prose-level docs edits
This ordering keeps intent and generated truth aligned.
