This file defines Markdown tiers, writing rules, and verify-doc-budgets ceilings. Use dsh-doc-standards for placement and validation, and dsh-prose-standard for required coverage and editorial judgment; the doc-tiers Agent Note owns rationale.
Each fact has one home: the tier whose job it is. Elsewhere, link to that home; verify-md-links keeps links resolving while duplicated prose drifts.
| Tier | Job | Does NOT belong there |
|---|---|---|
Root AGENTS.md |
Standing orders: rules an agent needs in context in every session, one to three lines each, linking its home | Stories, worked examples, situational procedures, anything restated from a linked home |
Subtree AGENTS.md (packages/, examples/, docs/, .agents/notes/) |
Orders specific to that subtree | Repo-wide rules the root file already carries |
| architecture.md | The system map: services, the loop, extension seams — read before changing packages/ |
Type shapes (→ core-data-structures), per-package detail (→ package READMEs), decision rationale (→ Agent Notes), implementation-status annotations |
| core-data-structures/ | The type catalog: literal shapes and semantics of the spine and seam vocabulary | Behavior narration (→ architecture.md) |
| Agent Notes | Decision records: the why, what-was-given-up, and concise verification contract; implemented/ notes describe shipped reality in present tense |
Migration plans, acceptance-task checklists, fixture walkthroughs, and spec-speak ("should…") once the decision has shipped |
| postmortem/ | Incident stories — the only tier where war-story narrative belongs | — |
| cookbook/ | Step-by-step how-tos with numbered verify steps | Design rationale (→ the Agent Note each guide links) |
| user/ | Product-facing guides published by the documentation website | Generated reference tables, contributor procedures, decision history |
| Package README | The per-package contract: config, semantics, limitations, extension points, and Model Experience | JSDoc restatement, generated-catalog restatement (event/tool tables), other packages' concerns |
| development.md | First-stop contributor onboarding: local setup, daily workflow, and CI shape at summary level; a bilingual pair under the i18n contract | Runtime/version rationale (→ Agent Notes), gate-by-gate enumerations that drift from package.json scripts |
| Generated catalogs: cordis events, cordis services, Cordis core API, tool-catalog, config-catalog, persistence-catalog, module-graph.md | Exhaustive enumerations regenerated from source, freshness-gated | Hand edits of any kind |
Skills (.agents/skills/) |
Reusable workflows and specialized decision standards | Product and runtime contracts (→ docs or source) |
Placement: bugs → postmortems; rationale → Agent Notes; procedures → cookbooks; type shapes → core data; package contracts → READMEs; standing orders → root AGENTS.md with a rationale link.
verify-md-wrap): use editor soft-wrap. Code blocks, tables, and list structure keep their formatting; code comments stay under the linter's column limit.ts blocks must compile (doc-typecheck); a pasted type declaration and its original JSDoc use ts type-equiv `, while a body-stripped public class declaration uses `ts public-api; register either in the manifest so neither can drift (mechanics).verify-type-equiv catches drifted pastes, not never-documented new types (what counts as core).scripts/doc-budgets.manifest.json sets standing-doc ceilings; pnpm run verify-doc-budgets rejects excess or missing files.
When the gate goes red:
Ceilings are guardrails, not reduction targets. Retain at least 5% headroom; lower a ceiling only when the document's durable contract still has room, and raise it when necessary content would otherwise be deleted. Targets: root AGENTS.md ≤ 1,600 words; architecture.md ≤ 1,800; each subtree AGENTS.md ≤ 600, except packages/AGENTS.md ≤ 650 and this file ≤ 1,250; packages/README.md ≤ 600. Review and the slop checklist govern unbudgeted tiers.
Hunt these in any doc; the dsh-doc-standards skill runs this list as an audit:
implemented/ Agent Notes: "should", migration plans, acceptance checklists. An implemented Agent Note describes what is, per the implemented-note instructions.Link repository references with relative Markdown paths, never bare filenames or Agent Note numbers. verify-md-links catches missing targets; the cross-link Agent Note owns the rationale.
The gate checks file existence, not #anchor validity — verify anchors yourself when linking to one.