Skip to main content

Docs and Release Workflow

Docs authoring workflowโ€‹

  1. Update source docs under docs/rules/** or docs/docusaurus/site-docs/**
  2. Run relevant sync scripts for generated markdown tables
  3. Build docs (npm run docs:build)
  4. Verify no broken links and correct sidebar behavior

Generated documentation surfacesโ€‹

The project intentionally keeps rule and preset docs authored, but selected tables are generated from runtime plugin metadata so published docs cannot drift from actual preset wiring.

SurfaceSource of truthValidation command
README rule tablebuilt plugin rule metadatanpm run sync:readme-rules-table
Preset index rule matrixbuilt plugin configs/rulesnpm run sync:presets-rules-matrix
Per-preset rule matricesbuilt plugin configs/rulesnpm run sync:presets-rules-matrix
API docsTypeDoc over src/plugin.ts and src/_internalnpm run docs:build

When a rule is added, removed, renamed, or moved between presets, run:

npm run build
node scripts/sync-presets-rules-matrix.mjs --write
node scripts/sync-readme-rules-table.mjs --write

Then review the generated markdown diff. Do not manually edit inside generated marker blocks.

Preset docs contractโ€‹

Every public preset page under docs/rules/presets/ should explain:

  • what the preset enables
  • who should use it
  • rollout considerations
  • the generated rule matrix for that preset

The generated matrix is deliberately repeated on each preset detail page so readers do not need to jump back to the aggregate preset page to understand coverage.

Release safety checklistโ€‹

Before tagging/releasing:

  • lint/typecheck/tests pass
  • production build passes
  • docs build passes
  • generated docs and sidebar updates are committed
  • npm run release:verify passes from a clean working tree or a reviewed release branch

Common pitfallsโ€‹

  • Editing generated output instead of source
  • Leaving stale links after route/sidebar changes
  • Updating presets docs without re-running matrix/table sync
  • Updating rule metadata without checking preset docs and README generated sections