Docs Lint
Goal
Keep the AKSK/OpenWiki knowledge wiring coherent: routing blocks intact, archived changes covered, curated pages truthful.
Machine-oriented scope: CONTRACT.md.
Inputs
- Root instruction files (
AGENTS.md,CLAUDE.md,GEMINI.mdwhen present) - marker blocks .agents/AGENTS.md,.agents/playbooks/openwiki/INSTRUCTIONS.md, curated trees underopenwiki/openspec/changes/archive/(for coverage pairing)
Skill initialization
Ensure the shared scaffold via learning-distill initialization when that skill is present; this skill owns no bootstrap templates. No .agents/docs/ scaffold exists anymore - durable knowledge lives in the wiki.
Checks
Wiring checks (fail the pass)
- Routing-block integrity — In every root instruction file present, verify each managed block is intact and its targets exist:
AKSK:AGENTS-BASELINE(FerroxLabs baseline): exactly one block whenAGENTS.mdwas seeded; contains provenance header (source URL, capture date, MIT notice, refresh pointer). Flag missing or damaged block; refresh vianode .agents/skills/aksk-bootstrap/scripts/init_agents_md.mjs --replaceorrefresh_agents_baseline.mjsfor staleness (agent comparesCaptured: YYYY-MM-DD>6 months old; no dedicated lint script — userefresh_agents_baseline.mjs --checkto validate).- each
AKSK:*block (ROUTING,LIFECYCLE): exactly one of each; targets named inside must exist. Refresh stale blocks withnode aksk-bootstrap/scripts/attach_section.mjs <root> <target> <template>. <!-- OPENWIKI:START/END -->: never hand-edit; verify presence only; zoned order must be baseline → OpenWiki → AKSK.
- Wiki contract present —
openwiki/INSTRUCTIONS.mdcarries theAKSK:WIKI-CONTRACTmarkers; refresh withattach_wiki_contract.mjsif its template changed. - Archived-change/wiki coverage pairing — For each change under
openspec/changes/archive/, descriptive outcomes must appear inopenwiki/or be covered by a recorded deferral. Report uncovered archived changes. A deferral recorded on the change's summary page exempts it. - Stale curated knowledge — Pages under
openwiki/{decisions,troubleshooting}/whose claims conflict with repository reality: references to retired skills,aksk_status: acceptedon pages whose successor exists (aksk_superseded_byset), or deadaksk_depends_ontargets. Flag with the superseding source.
Content checks (report, suggest)
- duplication and contradictions between
.agents/AGENTS.md, playbooks, and knowledge pages - inlined adopt-the-kit prose in
docs/integrations/: flag any product page whose Setup step 1 inlines the canonical sentence instead of linking[Adopting the kit](./patterns.md#adopting-the-kit)— grepInstall starter skills in the target repo withmust return hits only indocs/integrations/patterns.md, never in a product page - oversized AGENTS sections
- broken relative links within
.agents/andopenwiki/ - frontmatter contract of knowledge pages: filename stem unique per tree; decision pages carry
aksk_status; validate againstlearning-distill/references/*.schema.json - troubleshooting entries that should be playbooks; decision pages that should compress into AGENTS guidance
- Path hygiene: search for doubled
.agents/.agentssegments under.agents/,README.md,INSTALL.md,docs/
Output
A lint report plus optional minimal edits. Do not modify OpenWiki-owned files; propose rerunning sync_wiki_indexes.mjs for index drift instead of failing.
Constraints
- Prefer reclassification and compression over adding text.
- Do not modify source code; do not delete knowledge without explicit justification.