Docs Taxonomy
Documentation Taxonomy Linter (DOCS_TAXONOMY.md)
1. Objective & Architectural Intent
Implemented in packages/governance/src/cli/linters/docs-taxonomy.ts, this linter enforces structural taxonomy, relative link validity, and one-way citation boundaries across SiteSwarm’s knowledge tree.
It mechanically prevents documentation sprawl, broken links, and premature bleeding of point-in-time research into living canonical specifications.
2. Invariants Enforced
| Rule ID | Severity | Invariant Enforced | Remediation |
|---|---|---|---|
docs/whitelist |
Error | Strict 4-pillar folder taxonomy. All documentation under docs/ must reside exclusively inside architecture/, runbooks/, business/, or write-ups/. No loose files in docs/ root. |
Move files into their appropriate canonical directory. |
docs/relative-links |
Error | Relative Markdown links ([text] pointing to ./path) must resolve to valid, existing files on disk. |
Correct file path or remove dangling link. |
docs/one-way-citation |
Error | One-Way Citation Guard: Canonical documents (AGENTS.md, HIGH_LEVEL_DESIGN.md, docs/{architecture,runbooks,business}/*, .agents/skills/*) must never link down into docs/write-ups/*. |
Distill the write-up into canonical documentation or cite the canonical target instead. |
docs/writeup-frontmatter |
Error | Write-Up Frontmatter Contract: Every file in docs/write-ups/*.md must declare valid YAML frontmatter with status: "uningested" | "distilled" | "reference", source_issue, and valid candidate/distillation targets. |
Update frontmatter schema via docs.ts CLI helpers. |
docs/workspace-readme |
Warn | Monorepo navigation: Every workspace in apps/*, packages/*, and services/* must include a descriptive README.md. |
Author a standard workspace README. |
Decisions Intentionally Deferred
- Automated spellchecking and prose grammar linting are deferred to preserve fast local commit cycles.