@nurix/etna 0.20.34 → 0.20.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/data/catalog/rules/changelog.md +1 -1
  2. package/data/harness-index.json +1 -1
  3. package/data/harnesses/code/CLAUDE.md +4 -4
  4. package/data/harnesses/code/agents/brainstorm.md +2 -2
  5. package/data/harnesses/code/agents/lld-mode.md +2 -2
  6. package/data/harnesses/code/agents/maintenance.md +17 -17
  7. package/data/harnesses/code/codex/agents/brainstorm.toml +6 -2
  8. package/data/harnesses/code/codex/agents/lld-mode.toml +2 -2
  9. package/data/harnesses/code/codex/agents/maintenance.toml +18 -17
  10. package/data/harnesses/code/docs/README.md +9 -17
  11. package/data/harnesses/code/docs/history/CHANGELOG.md +19 -18
  12. package/data/harnesses/code/docs/structure.md +60 -45
  13. package/data/harnesses/code/harness.json +2 -2
  14. package/data/harnesses/code/hooks/compliance.mjs +8 -2
  15. package/data/harnesses/code/hooks/lib/sweep.mjs +3 -2
  16. package/data/harnesses/code/rules/changelog.md +1 -1
  17. package/data/harnesses/code/skills/brainstorm/SKILL.md +4 -3
  18. package/data/harnesses/code/skills/brainstorm/references/harvest.md +1 -2
  19. package/data/harnesses/code/skills/design/SKILL.md +3 -2
  20. package/data/harnesses/code/skills/design/references/content.md +1 -1
  21. package/data/harnesses/code/skills/design/references/existing-apps.md +1 -1
  22. package/data/harnesses/code/skills/design/references/microcopy.md +126 -0
  23. package/data/harnesses/code/skills/documentation/SKILL.md +91 -142
  24. package/data/harnesses/code/skills/documentation/references/examples.md +35 -62
  25. package/data/harnesses/code/skills/documentation/references/frontmatter.md +7 -7
  26. package/data/harnesses/code/skills/documentation/references/source-comments.md +19 -0
  27. package/data/harnesses/code/skills/documentation/references/style-guide.md +21 -7
  28. package/data/harnesses/code/skills/documentation/references/untemplated.md +7 -6
  29. package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +178 -38
  30. package/data/harnesses/code/skills/documentation/templates/Readme.md +68 -41
  31. package/data/harnesses/code/skills/documentation/templates/acceptance-criteria.md +10 -18
  32. package/data/harnesses/code/skills/documentation/templates/api-reference.md +7 -2
  33. package/data/harnesses/code/skills/documentation/templates/architecture-decision.md +5 -5
  34. package/data/harnesses/code/skills/documentation/templates/backlog.md +2 -2
  35. package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +9 -16
  36. package/data/harnesses/code/skills/documentation/templates/bookkeeping.md +2 -2
  37. package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +1 -1
  38. package/data/harnesses/code/skills/documentation/templates/changelog-index.md +21 -29
  39. package/data/harnesses/code/skills/documentation/templates/docs-readme.md +2 -2
  40. package/data/harnesses/code/skills/documentation/templates/doctrine.md +2 -2
  41. package/data/harnesses/code/skills/documentation/templates/domain-model.md +9 -4
  42. package/data/harnesses/code/skills/documentation/templates/environment-registry.md +6 -1
  43. package/data/harnesses/code/skills/documentation/templates/feature.md +4 -4
  44. package/data/harnesses/code/skills/documentation/templates/glossary.md +6 -1
  45. package/data/harnesses/code/skills/documentation/templates/handover.md +16 -16
  46. package/data/harnesses/code/skills/documentation/templates/implementation-map.md +9 -4
  47. package/data/harnesses/code/skills/documentation/templates/journal.md +2 -2
  48. package/data/harnesses/code/skills/documentation/templates/memory-main.md +2 -2
  49. package/data/harnesses/code/skills/documentation/templates/non-goals.md +7 -2
  50. package/data/harnesses/code/skills/documentation/templates/operations-procedure.md +6 -1
  51. package/data/harnesses/code/skills/documentation/templates/package.md +4 -8
  52. package/data/harnesses/code/skills/documentation/templates/plan.md +5 -11
  53. package/data/harnesses/code/skills/documentation/templates/protected-files.md +6 -1
  54. package/data/harnesses/code/skills/documentation/templates/root-readme.md +4 -4
  55. package/data/harnesses/code/skills/documentation/templates/security-overview.md +8 -3
  56. package/data/harnesses/code/skills/documentation/templates/setup.md +6 -6
  57. package/data/harnesses/code/skills/documentation/templates/system-overview.md +11 -6
  58. package/data/harnesses/code/skills/documentation/templates/system.md +1 -1
  59. package/data/harnesses/code/skills/documentation/templates/testing-strategy.md +10 -5
  60. package/data/harnesses/code/skills/documentation/templates/ux-behavior.md +13 -2
  61. package/data/harnesses/code/skills/testing/SKILL.md +1 -1
  62. package/data/harnesses/delivery/CLAUDE.md +1 -1
  63. package/data/harnesses/delivery/agents/brainstorm.md +2 -2
  64. package/data/harnesses/delivery/agents/lld-mode.md +2 -2
  65. package/data/harnesses/delivery/agents/maintenance.md +17 -17
  66. package/data/harnesses/delivery/codex/agents/brainstorm.toml +6 -2
  67. package/data/harnesses/delivery/codex/agents/lld-mode.toml +2 -2
  68. package/data/harnesses/delivery/codex/agents/maintenance.toml +18 -17
  69. package/data/harnesses/delivery/harness.json +2 -2
  70. package/data/harnesses/delivery/rules/changelog.md +1 -1
  71. package/data/harnesses/delivery/skills/brainstorm/SKILL.md +4 -3
  72. package/data/harnesses/delivery/skills/brainstorm/references/harvest.md +1 -2
  73. package/data/harnesses/delivery/skills/documentation/SKILL.md +91 -142
  74. package/data/harnesses/delivery/skills/documentation/references/examples.md +35 -62
  75. package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +7 -7
  76. package/data/harnesses/delivery/skills/documentation/references/source-comments.md +19 -0
  77. package/data/harnesses/delivery/skills/documentation/references/style-guide.md +21 -7
  78. package/data/harnesses/delivery/skills/documentation/references/untemplated.md +7 -6
  79. package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +178 -38
  80. package/data/harnesses/delivery/skills/documentation/templates/Readme.md +68 -41
  81. package/data/harnesses/delivery/skills/documentation/templates/acceptance-criteria.md +10 -18
  82. package/data/harnesses/delivery/skills/documentation/templates/api-reference.md +7 -2
  83. package/data/harnesses/delivery/skills/documentation/templates/architecture-decision.md +5 -5
  84. package/data/harnesses/delivery/skills/documentation/templates/backlog.md +2 -2
  85. package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +9 -16
  86. package/data/harnesses/delivery/skills/documentation/templates/bookkeeping.md +2 -2
  87. package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +1 -1
  88. package/data/harnesses/delivery/skills/documentation/templates/changelog-index.md +21 -29
  89. package/data/harnesses/delivery/skills/documentation/templates/docs-readme.md +2 -2
  90. package/data/harnesses/delivery/skills/documentation/templates/doctrine.md +2 -2
  91. package/data/harnesses/delivery/skills/documentation/templates/domain-model.md +9 -4
  92. package/data/harnesses/delivery/skills/documentation/templates/environment-registry.md +6 -1
  93. package/data/harnesses/delivery/skills/documentation/templates/feature.md +4 -4
  94. package/data/harnesses/delivery/skills/documentation/templates/glossary.md +6 -1
  95. package/data/harnesses/delivery/skills/documentation/templates/handover.md +16 -16
  96. package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +9 -4
  97. package/data/harnesses/delivery/skills/documentation/templates/journal.md +2 -2
  98. package/data/harnesses/delivery/skills/documentation/templates/memory-main.md +2 -2
  99. package/data/harnesses/delivery/skills/documentation/templates/non-goals.md +7 -2
  100. package/data/harnesses/delivery/skills/documentation/templates/operations-procedure.md +6 -1
  101. package/data/harnesses/delivery/skills/documentation/templates/package.md +4 -8
  102. package/data/harnesses/delivery/skills/documentation/templates/plan.md +5 -11
  103. package/data/harnesses/delivery/skills/documentation/templates/protected-files.md +6 -1
  104. package/data/harnesses/delivery/skills/documentation/templates/root-readme.md +4 -4
  105. package/data/harnesses/delivery/skills/documentation/templates/security-overview.md +8 -3
  106. package/data/harnesses/delivery/skills/documentation/templates/setup.md +6 -6
  107. package/data/harnesses/delivery/skills/documentation/templates/system-overview.md +11 -6
  108. package/data/harnesses/delivery/skills/documentation/templates/system.md +1 -1
  109. package/data/harnesses/delivery/skills/documentation/templates/testing-strategy.md +10 -5
  110. package/data/harnesses/delivery/skills/documentation/templates/ux-behavior.md +13 -2
  111. package/data/harnesses/etna/CLAUDE.md +2 -2
  112. package/data/harnesses/etna/agents/brainstorm.md +2 -2
  113. package/data/harnesses/etna/agents/lld-mode.md +2 -2
  114. package/data/harnesses/etna/agents/maintenance.md +17 -17
  115. package/data/harnesses/etna/codex/agents/brainstorm.toml +6 -2
  116. package/data/harnesses/etna/codex/agents/lld-mode.toml +2 -2
  117. package/data/harnesses/etna/codex/agents/maintenance.toml +18 -17
  118. package/data/harnesses/etna/harness.json +2 -2
  119. package/data/harnesses/etna/rules/changelog.md +1 -1
  120. package/data/harnesses/etna/skills/brainstorm/SKILL.md +4 -3
  121. package/data/harnesses/etna/skills/brainstorm/references/harvest.md +1 -2
  122. package/data/harnesses/etna/skills/documentation/SKILL.md +91 -142
  123. package/data/harnesses/etna/skills/documentation/references/examples.md +35 -62
  124. package/data/harnesses/etna/skills/documentation/references/frontmatter.md +7 -7
  125. package/data/harnesses/etna/skills/documentation/references/source-comments.md +19 -0
  126. package/data/harnesses/etna/skills/documentation/references/style-guide.md +21 -7
  127. package/data/harnesses/etna/skills/documentation/references/untemplated.md +7 -6
  128. package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +178 -38
  129. package/data/harnesses/etna/skills/documentation/templates/Readme.md +68 -41
  130. package/data/harnesses/etna/skills/documentation/templates/acceptance-criteria.md +10 -18
  131. package/data/harnesses/etna/skills/documentation/templates/api-reference.md +7 -2
  132. package/data/harnesses/etna/skills/documentation/templates/architecture-decision.md +5 -5
  133. package/data/harnesses/etna/skills/documentation/templates/backlog.md +2 -2
  134. package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +9 -16
  135. package/data/harnesses/etna/skills/documentation/templates/bookkeeping.md +2 -2
  136. package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +1 -1
  137. package/data/harnesses/etna/skills/documentation/templates/changelog-index.md +21 -29
  138. package/data/harnesses/etna/skills/documentation/templates/docs-readme.md +2 -2
  139. package/data/harnesses/etna/skills/documentation/templates/doctrine.md +2 -2
  140. package/data/harnesses/etna/skills/documentation/templates/domain-model.md +9 -4
  141. package/data/harnesses/etna/skills/documentation/templates/environment-registry.md +6 -1
  142. package/data/harnesses/etna/skills/documentation/templates/feature.md +4 -4
  143. package/data/harnesses/etna/skills/documentation/templates/glossary.md +6 -1
  144. package/data/harnesses/etna/skills/documentation/templates/handover.md +16 -16
  145. package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +9 -4
  146. package/data/harnesses/etna/skills/documentation/templates/journal.md +2 -2
  147. package/data/harnesses/etna/skills/documentation/templates/memory-main.md +2 -2
  148. package/data/harnesses/etna/skills/documentation/templates/non-goals.md +7 -2
  149. package/data/harnesses/etna/skills/documentation/templates/operations-procedure.md +6 -1
  150. package/data/harnesses/etna/skills/documentation/templates/package.md +4 -8
  151. package/data/harnesses/etna/skills/documentation/templates/plan.md +5 -11
  152. package/data/harnesses/etna/skills/documentation/templates/protected-files.md +6 -1
  153. package/data/harnesses/etna/skills/documentation/templates/root-readme.md +4 -4
  154. package/data/harnesses/etna/skills/documentation/templates/security-overview.md +8 -3
  155. package/data/harnesses/etna/skills/documentation/templates/setup.md +6 -6
  156. package/data/harnesses/etna/skills/documentation/templates/system-overview.md +11 -6
  157. package/data/harnesses/etna/skills/documentation/templates/system.md +1 -1
  158. package/data/harnesses/etna/skills/documentation/templates/testing-strategy.md +10 -5
  159. package/data/harnesses/etna/skills/documentation/templates/ux-behavior.md +13 -2
  160. package/package.json +2 -2
@@ -1,41 +1,68 @@
1
- # Documentation Templates
2
-
3
- One file per template. Every template is either a **truth document** (states current absolutes, updated in place) or a **record** (dated account of activity, frozen or append-only) — the split is defined in `SKILL.md` § The Two Natures, and each template names its nature in its opening line.
4
-
5
- | Template | File | Nature |
6
- | --- | --- | --- |
7
- | Feature (LLD) | [feature.md](feature.md) | Truth |
8
- | Package (one workspace package) | [package.md](package.md) | Truth |
9
- | Doctrine (one concern the platform handles everywhere) | [doctrine.md](doctrine.md) | Truth |
10
- | System (one machine spanning packages) | [system.md](system.md) | Truth |
11
- | Architecture Decision (AD) | [architecture-decision.md](architecture-decision.md) | Truth (Decision Changelog tail sanctioned) |
12
- | System overview | [system-overview.md](system-overview.md) | Truth |
13
- | Domain model | [domain-model.md](domain-model.md) | Truth |
14
- | Glossary | [glossary.md](glossary.md) | Truth |
15
- | Non-goals | [non-goals.md](non-goals.md) | Truth |
16
- | API reference | [api-reference.md](api-reference.md) | Truth |
17
- | Environment registry | [environment-registry.md](environment-registry.md) | Truth |
18
- | Security overview | [security-overview.md](security-overview.md) | Truth |
19
- | Testing strategy | [testing-strategy.md](testing-strategy.md) | Truth |
20
- | Behavioral checklist | [behavioral-checklist.md](behavioral-checklist.md) | Truth |
21
- | UX behavior | [ux-behavior.md](ux-behavior.md) | Truth |
22
- | Setup (first run, one per repo) | [setup.md](setup.md) | Truth |
23
- | Operations procedure | [operations-procedure.md](operations-procedure.md) | Truth |
24
- | Implementation map | [implementation-map.md](implementation-map.md) | Truth |
25
- | Bookkeeping ledger | [bookkeeping.md](bookkeeping.md) | Truth (work queue) |
26
- | Protected files | [protected-files.md](protected-files.md) | Truth |
27
- | Project root README (outward opening, then orientation and routing) | [root-readme.md](root-readme.md) | Truth |
28
- | docs/README.md (doc index) | [docs-readme.md](docs-readme.md) | Truth |
29
- | Plan | [plan.md](plan.md) | Record |
30
- | Changelog entry | [changelog-entry.md](changelog-entry.md) | Record |
31
- | Migration runbook | [migration-runbook.md](migration-runbook.md) | Record |
32
- | Journal | [journal.md](journal.md) | Record (append-only) |
33
- | CHANGELOG master index | [changelog-index.md](changelog-index.md) | Record index (append-only) |
34
- | Backlog | [backlog.md](backlog.md) | Record (append-only) |
35
- | Memory (main agent) | [memory-main.md](memory-main.md) | Record (append-only ledger) |
36
-
37
- **The `type:` enum lives here.** A doc's `type:` frontmatter takes its value from this table — one genre per template (`feature`, `architecture-decision`, `non-goals`, …). External generators consume this list rather than defining their own; a type this table does not name defaults to `docs/architecture/` placement and is never added to the protected-files list.
38
-
39
- **Baseline scaffolds** — files that must exist after every baseline (`docs/structure.md` is not among them: it is harness-owned, shipped whole by the installer and overwritten on every refresh, and has no template); the `maintenance` agent (baseline mode) creates any that are missing: [docs-readme.md](docs-readme.md), [changelog-index.md](changelog-index.md), [backlog.md](backlog.md), [memory-main.md](memory-main.md), [setup.md](setup.md) (when the repo has a lockfile and a runnable root script; never overwriting an existing first-run procedure), and [root-readme.md](root-readme.md) (never overwriting an existing root README).
40
-
41
- **Ownership.** Three genres speak for code — **feature**, **package**, **system**. A document names the objects it designs in `objects:`; a source file names the document that speaks for it in its path header; which document speaks for a path is computed from those headers and the object closure, and answered per path by the ownership index (`references/frontmatter.md`). Until the harness's ownership scan switches to that computation, it reads a transitional `owns:` region glob on each of the three genres: `packages/{name}/**` on a package document (the residual owner), a machine's subtrees on a system document, a feature's own directory on a feature document; the narrower glob wins.
1
+ # Genre registry
2
+
3
+ Every fact about a genre lives in one row of the table below: its template, its nature, its `type:` value, where it lives, the frontmatter keys it must carry and the sections it must have. `SKILL.md`, the `maintenance` agent and the shipped `docs/structure.md` name genres and defer here for these facts, and `scripts/doc-lint.mjs` reads this table to check them. The column order is a contract: the lint parses the table, and `packages/cli/tests/scripts/genreRegistry.test.mjs` in the forge fails when a row stops parsing or a template stops agreeing with it.
4
+
5
+ ## The three natures
6
+
7
+ | Nature | Holds | Changes by | Dates | Ends |
8
+ | --- | --- | --- | --- | --- |
9
+ | `truth` | What is true now | Rewritten in place, present tense; no history in the body (an AD's Decision Changelog tail is the one bridge) | Frontmatter tooling keys only | Deleted, or `status: deprecated`, when its subject is gone |
10
+ | `record` | What happened | Written while live, then frozen at its terminal status; never edited after | In the filename or header | Never; it is the archive |
11
+ | `queue` | Work not done yet | Rows appended at the end and deleted when resolved, drained or promoted; nothing else is edited | Per row, as row metadata | Never; an empty queue is the healthy state |
12
+
13
+ ## Registry
14
+
15
+ | Genre | Template | Nature | `type:` | Location | Required keys | Required sections |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | Feature | [feature.md](feature.md) | truth | `feature` | `docs/features/{feature}.md` | `type` `description` `status` `objects` | Scope · Promises · For the agent |
18
+ | Package | [package.md](package.md) | truth | `package` | `docs/architecture/packages/{package}.md` | `type` `description` `status` `objects` | Scope · Ownership · Usage · Promises · For the agent |
19
+ | System | [system.md](system.md) | truth | `system` | `docs/architecture/systems/{system}.md` | `type` `description` `status` `objects` | Scope · Flow · Promises · For the agent |
20
+ | Doctrine | [doctrine.md](doctrine.md) | truth | `doctrine` | `docs/architecture/common/{concern}.md` | `type` `description` `status` `objects` | The model · For the agent |
21
+ | Architecture decision | [architecture-decision.md](architecture-decision.md) | truth | `architecture-decision` | `docs/architecture/decisions/AD-NNN-{subject}.md` | `type` `title` `description` `status` `last-updated` | Decision · Context · Consequences |
22
+ | UX behavior | [ux-behavior.md](ux-behavior.md) | truth | `ux` | `docs/features/{surface}-ux.md` | `type` `description` `status` `objects` | Purpose · Anatomy · States · Affordances · Promises · Transitions |
23
+ | System overview | [system-overview.md](system-overview.md) | truth | `system-overview` | `docs/architecture/system-design.md` | `type` `description` | — |
24
+ | Domain model | [domain-model.md](domain-model.md) | truth | `domain-model` | `docs/architecture/domain-model.md` | `type` `description` | — |
25
+ | Glossary | [glossary.md](glossary.md) | truth | `glossary` | `docs/architecture/glossary.md` | `type` `description` | — |
26
+ | Non-goals | [non-goals.md](non-goals.md) | truth | `non-goals` | `docs/architecture/non-goals.md` | `type` `description` | — |
27
+ | Security overview | [security-overview.md](security-overview.md) | truth | `security-overview` | `docs/architecture/security.md` | `type` `description` | — |
28
+ | Testing strategy | [testing-strategy.md](testing-strategy.md) | truth | `testing-strategy` | `docs/architecture/common/testing.md` | `type` `description` | — |
29
+ | API reference | [api-reference.md](api-reference.md) | truth | `api-reference` | `docs/architecture/api.md` | `type` `description` | — |
30
+ | Environment registry | [environment-registry.md](environment-registry.md) | truth | `environment-registry` | `docs/operations/environment.md` | `type` `description` | — |
31
+ | Behavioral checklist | [behavioral-checklist.md](behavioral-checklist.md) | truth | `checklist` | `docs/tests/{feature}.md` | `type` `description` `verifies` | — |
32
+ | Acceptance criteria | [acceptance-criteria.md](acceptance-criteria.md) | truth | `acceptance-criteria` | `docs/acceptance/{capability}.md` | `type` `description` `status` | — |
33
+ | Setup | [setup.md](setup.md) | truth | `operations` | `docs/operations/setup.md` | `type` `description` | Installation · First run · Verification |
34
+ | Operations procedure | [operations-procedure.md](operations-procedure.md) | truth | `operations` | `docs/operations/{procedure}.md` | `type` `description` | Steps · Verification |
35
+ | Implementation map | [implementation-map.md](implementation-map.md) | truth | `implementation-map` | `docs/operations/implementation-map.md` | `type` `description` | Waves · Active wave |
36
+ | Protected files | [protected-files.md](protected-files.md) | truth | `protected-files` | `docs/operations/protected-files.md` | `type` `description` | — |
37
+ | Docs index | [docs-readme.md](docs-readme.md) | truth | `docs-readme` | `docs/README.md` | `type` `description` | — |
38
+ | Folder index | — | truth | `folder-index` | `docs/{folder}/Readme.md` | `type` `description` | — |
39
+ | Changelog guide | [changelog-index.md](changelog-index.md) | truth | `changelog-guide` | `docs/history/CHANGELOG.md` | `type` `description` | — |
40
+ | Root README | [root-readme.md](root-readme.md) | truth | — | `README.md` | — | — |
41
+ | Plan | [plan.md](plan.md) | record | — | `docs/history/plans/YYYY-MM-DD-{slug}.md` | — | Background · Proposed Changes · Doc Obligations · Implementation Steps · Test Obligations |
42
+ | Changelog entry | [changelog-entry.md](changelog-entry.md) | record | — | `docs/history/changelog/YYYY-MM-DD-{three-words}.md` | — | — |
43
+ | Migration runbook | [migration-runbook.md](migration-runbook.md) | record | — | `docs/history/migrations/YYYY-MM-DD-{slug}.md` | — | — |
44
+ | Hand-over | [handover.md](handover.md) | record | `handover` | `docs/history/handovers/YYYY-MM-DD-{slug}.md` | `type` `description` `status` | — |
45
+ | Health log | — | record | — | `docs/history/health-log.md` | — | — |
46
+ | Deep research | — | record | `research` | `docs/history/research/{topic}/` | — | — |
47
+ | Brainstorm session | — | record | `brainstorm` | `docs/research/{topic}-brainstorm/` | — | — |
48
+ | Issue | — | record | `issue` | `docs/operations/issues/YYYY-MM-DD-{slug}.md` | — | — |
49
+ | Triage dossier | — | record | `triage` | `docs/operations/triage/YYYY-MM-DD-{slug}.md` | — | — |
50
+ | Release note | — | record | — | `docs/operations/release-notes/YYYY-MM-DD-vX.Y.Z.md` | — | — |
51
+ | Backlog | [backlog.md](backlog.md) | queue | — | `docs/history/backlog.md` | — | — |
52
+ | Journal | [journal.md](journal.md) | queue | — | `docs/history/journal.md` | — | — |
53
+ | Bookkeeping | [bookkeeping.md](bookkeeping.md) | queue | — | `docs/operations/bookkeeping.md` | — | — |
54
+ | Project memory | [memory-main.md](memory-main.md) | queue | `project-memory` | `docs/memory/main.md` | `type` `description` | — |
55
+ | Agent memory | — | queue | `agent-memory` | `docs/memory/{agent}.md` | — | — |
56
+
57
+ - **`type:` values:** a genre's `type:` value is the one its template's skeleton carries, and two genres may share one (setup and operations procedure are both `operations`). A dash means the genre carries no frontmatter, or carries none it must have. A value this table does not name is reported by the lint as `type-unknown`.
58
+ - **Locations:** `{name}` is one kebab-case path segment, `YYYY-MM-DD` a date, `AD-NNN` a zero-padded number. A location is where the genre lives in a repository that uses it; a folder nothing uses is absent.
59
+ - **Required sections:** the `##` headings every document of the genre carries, by name; the template states the optional ones and when each is written. A dash means the template's sections are guidance, not a fixed set. The lint checks them on truth documents; a plan's are checked by the hooks that read it.
60
+ - **Rows without a template:** each is written by its own tool (the `maintenance` agent's Health Log, the `brainstorm` skill, the deep-research and `issue-bridge` packs, a release pipeline) and is listed so its nature and place are settled here too.
61
+
62
+ ## Ownership
63
+
64
+ Three genres speak for code — **feature**, **package**, **system** — and a **UX** document speaks for a surface's components where none of them does (`ux-behavior.md`). A document names the objects it designs in `objects:`; a source file names the document that speaks for it in its path header. The harness's ownership scan reads one edge today, the transitional `owns:` region glob on each owning document (`packages/{name}/**` on a package, a machine's subtrees on a system, a feature's own directory on a feature), and the narrower glob wins. The header pointer is written now so the scan can switch to it and the object closure without a second pass over the code (`references/frontmatter.md`).
65
+
66
+ ## Baseline scaffolds
67
+
68
+ The `maintenance` agent's baseline creates these when missing, from their templates: the docs index, the changelog guide, the backlog, project memory, setup (when the repo has a lockfile and a runnable root script; never a second first-run document) and the root README (never overwriting one). `docs/structure.md` is not among them: the installer ships it whole and overwrites it on every refresh.
@@ -1,23 +1,13 @@
1
1
  # Acceptance Criteria
2
2
 
3
- Truth document. Use for: the promises one capability must keep, stated as machine-parseable
4
- claims. Lives in `docs/acceptance/`, one `kebab-case.md` per capability. Written at specification
5
- time — before implementation — and read by verification surfaces, which parse each `AC-n` line as
6
- a claim to grade the built product against.
3
+ Truth document. Use for: the promises one capability must keep, stated as machine-parseable claims. Lives in `docs/acceptance/`, one `kebab-case.md` per capability. Written at specification time — before implementation — and read by verification surfaces, which parse each `AC-n` line as a claim to grade the built product against.
7
4
 
8
5
  ### Rules
9
6
 
10
- - **Frontmatter is required**: `type: acceptance-criteria`, `status:` (`draft` → `active` →
11
- `deprecated`). No `owns:` — acceptance criteria own no code.
12
- - **One `AC-n` key per criterion, stable forever.** Keys are never renumbered and never reused: a
13
- criterion that no longer applies is marked retired in place, so every claim a past verification
14
- graded still resolves.
15
- - **Each criterion is one observable assert**, phrased as a checkable statement about the running
16
- product — never about the code's internals. If it cannot be observed from outside, it is a
17
- design note, not a criterion.
18
- - **The `AC-n:` line grammar is load-bearing** — verification parses these lines. Keep the key at
19
- line start, exactly `AC-<number>:`, followed by the assert sentence. Formatting that buries the
20
- key (tables, emphasis-wrapped keys, nested bullets) breaks the parse.
7
+ - **Frontmatter is required**: `type: acceptance-criteria`, `status:` (`draft` → `active` → `deprecated`). No `owns:` — acceptance criteria own no code.
8
+ - **One `AC-n` key per criterion, stable forever.** Keys are never renumbered and never reused: a criterion that no longer applies is marked retired in place, so every claim a past verification graded still resolves.
9
+ - **Each criterion is one observable assert**, phrased as a checkable statement about the running product — never about the code's internals. If it cannot be observed from outside, it is a design note, not a criterion.
10
+ - **The `AC-n:` line grammar is load-bearing** — verification parses these lines. Keep the key at line start, exactly `AC-<number>:`, followed by the assert sentence. Formatting that buries the key (tables, emphasis-wrapped keys, nested bullets) breaks the parse.
21
11
 
22
12
  ### Template
23
13
 
@@ -32,7 +22,9 @@ status: draft
32
22
 
33
23
  Scope: {one line — what part of the product these criteria bind}.
34
24
 
35
- - AC-1: {observable assert about the running product}.
36
- - AC-2: {observable assert}.
37
- - AC-3 (retired): {kept verbatim, marked retired — never renumbered}.
25
+ AC-1: {observable assert about the running product}.
26
+
27
+ AC-2: {observable assert}.
28
+
29
+ AC-3: (retired) {kept verbatim, marked retired — never renumbered}.
38
30
  ```
@@ -1,10 +1,15 @@
1
1
  # API Reference (docs/architecture/api.md)
2
2
 
3
- Truth document. Use for: the consolidated catalog of the system's HTTP surface — every live route in one place. This is the **index**: request/response shapes stay in the owning feature docs; this doc answers "what exists and where is it documented." If the repo generates an OpenAPI spec, this doc points at it and carries only what the spec can't (auth model, conventions, ownership links).
3
+ Truth document. Use for: the consolidated catalog of the system's HTTP surface — every live route in one place. This is the **reference document** for the API surface: a route's shape lives here or in the generated spec, never in a feature doc, which states what the route promises and leaves its shape to this catalog. If the repo generates an OpenAPI spec, this doc points at it and carries only what the spec can't (auth model, conventions, ownership links).
4
4
 
5
5
  Required: **Conventions**, the **route tables**. One row per live route; a route that isn't here doesn't exist.
6
6
 
7
- ```
7
+ ```markdown
8
+ ---
9
+ type: api-reference
10
+ description: "{at most 300 characters: what this document settles and where its boundary sits}"
11
+ ---
12
+
8
13
  # API Reference
9
14
 
10
15
  ## Conventions
@@ -38,20 +38,20 @@ Three sections are required: **Decision**, **Context**, **Consequences** — plu
38
38
 
39
39
  ```markdown
40
40
  ---
41
+ type: architecture-decision
41
42
  title: "AD-NNN: Short title in sentence case"
43
+ description: "{at most 300 characters: what this decision settles and where its boundary sits}"
42
44
  status: Accepted # Proposed | Accepted | Deprecated
43
- created: YYYY-MM-DD
44
45
  last-updated: YYYY-MM-DD # bump on every revision
45
46
  decision-owner: Name
46
47
  reviewers: [] # optional
47
- tags: [ad]
48
48
  ---
49
49
 
50
50
  # AD-NNN: Short Title
51
51
 
52
52
  ## Decision
53
53
 
54
- [One paragraph, active voice. "We will…" Lead with the answer — the current answer, whatever the journey was.]
54
+ [One paragraph, third person, active voice: "The platform stores…". Lead with the answer — the current answer, whatever the journey was.]
55
55
 
56
56
  ## Context
57
57
 
@@ -65,11 +65,11 @@ tags: [ad]
65
65
 
66
66
  **Negative:**
67
67
 
68
- - [What becomes harder, what we accept reluctantly]
68
+ - [What becomes harder, what is accepted reluctantly]
69
69
 
70
70
  **Risks:**
71
71
 
72
- - [Second-order effects you can already see, with mitigations if known]
72
+ - [Second-order effects already visible, with mitigations if known]
73
73
 
74
74
  <!-- Optional sections below. Include only when warranted by the decision's weight. -->
75
75
 
@@ -1,11 +1,11 @@
1
1
  # Scaffold: docs/history/backlog.md
2
2
 
3
- Baseline scaffold — created if missing (the `maintenance` agent's baseline calls this). Target file: `docs/history/backlog.md`.
3
+ Queue. Baseline scaffold, created if missing by the `maintenance` agent's baseline. Target file: `docs/history/backlog.md`. A row is appended when work is discovered and deleted when the work lands; it is never marked done in place, because the plan or changelog entry that did the work is the record.
4
4
 
5
5
  ```
6
6
  # Backlog
7
7
 
8
- Tracked work items, technical debt, and planned improvements. Append new items under the appropriate priority.
8
+ Open work items, technical debt, and planned improvements — a queue. Append new items under the appropriate priority; delete an item's row when its work lands.
9
9
 
10
10
  ---
11
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Truth document. Use for: **how to verify one feature's promised behavior by driving the real product** — the browser, the CLI binary, HTTP against the running service. One file per feature, named for the feature doc that owns the code (`docs/features/auth.md` → `docs/tests/auth.md`).
4
4
 
5
- **Frontmatter is two keys, and `verifies:` is the load-bearing one:**
5
+ **Frontmatter is three keys, and `verifies:` is the load-bearing one:**
6
6
 
7
7
  ```yaml
8
8
  ---
@@ -12,13 +12,7 @@ verifies: [docs/features/auth.md] # required — the doc(s) whose promi
12
12
  ---
13
13
  ```
14
14
 
15
- A checklist owns no code, so it carries no `owns:`. What it carries instead is the edge back to
16
- its subject. **The filename convention is not the edge** — a same-named file is a coincidence a
17
- resolver cannot trust, it breaks the moment a checklist spans two docs or a feature is renamed, and
18
- it leaves nothing to implicate this file when its subject changes. Without `verifies:` a checklist
19
- is unreachable: no change reaches it, so it goes stale and the staleness is undetectable. Several
20
- values are correct where one checklist proves promises two docs decide; the inverse — which
21
- checklists cover a feature — is generated, never listed in the feature doc.
15
+ A checklist owns no code, so it carries no `owns:`. What it carries instead is the edge back to its subject. **The filename convention is not the edge** — a same-named file is a coincidence a resolver cannot trust, it breaks the moment a checklist spans two docs or a feature is renamed, and it leaves nothing to implicate this file when its subject changes. Without `verifies:` a checklist is unreachable: no change reaches it, so it goes stale and the staleness is undetectable. Several values are correct where one checklist proves promises two docs decide; the inverse — which checklists cover a feature — is generated, never listed in the feature doc.
22
16
 
23
17
  **This is the driving script, and it is the source the suite is drawn from.** At the verification gate it does double duty: rung 1 drives the real surface *against these steps*, and rung 2 pins the durable subset *of these assertions* as suite tests. Writing it is therefore not a report written afterwards — it is authored or updated **before** the driving, so the gate has something to execute and the tests have something to be derived from. Which assertions earn a permanent test is decided by the `testing` skill (gate mode) § What earns a suite test, and each section records the answer on its `Pinned:` line.
24
18
 
@@ -43,18 +37,18 @@ Required: **Conventions**, at least one numbered behavior section, **Failure Rep
43
37
  # {Feature} Test Plan
44
38
 
45
39
  {What this covers, and what neighbouring checklists cover instead, with links. Close with:}
40
+
46
41
  Each step is an action; each **Assert** is the observable it must produce.
47
42
 
48
43
  ## Test Inputs
49
44
 
50
- - **URL / entry point** — where the run starts
51
- - **Identity** — the account or role required, and how it is obtained
52
- - **State** — the fixture or seeded state the run assumes, stated as counts a reader can check
45
+ - **URL / entry point:** where the run starts
46
+ - **Identity:** the account or role required, and how it is obtained
47
+ - **State:** the fixture or seeded state the run assumes, stated as counts a reader can check
53
48
 
54
49
  ## Conventions
55
50
 
56
- - {The invariants a reader needs to interpret the assertions — the vocabulary, the scoping rule,
57
- the guarantee that makes a surprising assertion correct. Not a restatement of the LLD.}
51
+ - {The invariants a reader needs to interpret the assertions — the vocabulary, the scoping rule, the guarantee that makes a surprising assertion correct. Not a restatement of the LLD.}
58
52
 
59
53
  ---
60
54
 
@@ -80,14 +74,13 @@ Each step is an action; each **Assert** is the observable it must produce.
80
74
 
81
75
  State-based signals, never fixed sleeps:
82
76
 
83
- - **{Milestone}** — {the signal that proves it, as a selector or an observable}
77
+ - **{Milestone}:** {the signal that proves it, as a selector or an observable}
84
78
 
85
79
  Timeouts: {operation} **{n}s**.
86
80
 
87
81
  ## Driving notes
88
82
 
89
- - {Hard-won facts about driving this surface that cost someone an hour — an environment trap, a
90
- harness quirk, a signal that lies. Not general advice.}
83
+ - {Hard-won facts about driving this surface that cost someone an hour — an environment trap, a harness quirk, a signal that lies. Not general advice.}
91
84
 
92
85
  ## Failure Report
93
86
 
@@ -1,6 +1,6 @@
1
1
  # Bookkeeping ledger (docs/operations/bookkeeping.md)
2
2
 
3
- Truth document with an unusual lifecycle: a **work queue**, not an archive. Rows are appended mechanically by the awareness hook (`auto:`) and deliberately by working sessions (`note:`), drained by the `bookkeeper` agent, and walled at Stop, at commit, and in CI. What survives in git — `waived:` and `needs-session:` rows — is exactly what a PR reviewer should see.
3
+ Queue (`templates/Readme.md` § The three natures): a **work queue**, not an archive. Rows are appended mechanically by the awareness hook (`auto:`) and deliberately by working sessions (`note:`), drained by the `bookkeeper` agent, and walled at Stop, at commit, and in CI. What survives in git — `waived:` and `needs-session:` rows — is exactly what a PR reviewer should see.
4
4
 
5
5
  **Each wall reads the queue at its own width, and re-verifies conditions at gate time.** Stop takes the ending session's own rows, because accountability for an arc is per session. The commit gate takes only the rows **implicating that commit's staged files** — a row names the file its finding is about, and holding a commit behind rows raised by somebody else's edits is a wait nothing the committer may do can clear. CI takes every row on the branch, where there is no staged set to scope by. All three re-test each row against the repo before blocking, so a row whose condition has died walls nothing. Fail-closed cases stay repo-wide at the commit gate: a row whose grammar names no path, a `needs-session:` row, an expired waiver, and a commit staging nothing at all.
6
6
 
@@ -21,4 +21,4 @@ The shared work queue keeping documentation and code in sync — a queue, never
21
21
 
22
22
  **A waiver covers a finding only when it names the finding's kind and its subject in backticks** — the matcher (`waiverCovers`) tests the backticked subject exactly, so a waiver written without them silences nothing and the wall stands. A `waived:` row's `expires=` date is enforced: CI honors the waiver until the date, then fails. `dead-glob` waivers double as the dead-glob allowlist; `ownership-overlap` waivers cover the CI ownership check the same way.
23
23
 
24
- Finding kinds for `auto:`: `dead-glob` · `doc-implicated` · `doc-lint` · `header-missing` · `package-rejected` · `frozen-record-edited` · `source-lint`. The CI ownership check additionally accepts `waived:` rows of kind `ownership-overlap`.
24
+ Finding kinds for `auto:`: `dead-glob` · `doc-implicated` · `doc-lint` · `header-missing` · `package-rejected` · `frozen-record-edited` · `source-lint`. The CI ownership check additionally accepts `waived:` rows of kind `ownership-overlap` and `dangling-edge` (a `verifies:` target that does not exist, the subject being that target's path).
@@ -50,7 +50,7 @@ A commit is the smallest unit an entry may describe. Above that the mapping is j
50
50
 
51
51
  ## The index
52
52
 
53
- Every entry appends one row to `docs/history/CHANGELOG.md` — date, link, one-line summary — in the same pass that writes the entry.
53
+ The heading line is the entry's one-line summary, and the only one: `docs/history/CHANGELOG.md` is the folder's guide and takes no row per entry, so `grep -m1 -H '^# ' docs/history/changelog/*.md` is the index.
54
54
 
55
55
  ## Exemptions (closed list)
56
56
 
@@ -1,41 +1,33 @@
1
- # Scaffold: docs/history/CHANGELOG.md
1
+ # Changelog guide (docs/history/CHANGELOG.md)
2
2
 
3
- Baseline scaffold — created if missing (the `maintenance` agent's baseline calls this). Target file: `docs/history/CHANGELOG.md`.
4
-
5
- ```
6
- # Changelog
7
-
8
- All notable changes to {Project Name} will be documented in this file.
9
-
10
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3
+ Truth document. Baseline scaffold, created if missing by the `maintenance` agent's baseline. It explains the changelog folder beside it and is never appended to: an entry is found by listing `docs/history/changelog/`, and each entry's first line is its one-line summary, so a row per entry here would be a second copy of that line that someone has to keep in step. The guide is rewritten only when the changelog's rules change.
11
4
 
5
+ ```markdown
12
6
  ---
13
-
14
- ## [Unreleased]
15
-
16
- {entries added here as work proceeds; promoting them under a release heading is the one sanctioned edit to this index — the dated entry files themselves stay frozen}
17
-
7
+ type: changelog-guide
8
+ description: "How {Project Name}'s changelog works: one entry per unit of work under changelog/, what each entry records, when one is owed, and how to read the folder."
18
9
  ---
19
10
 
20
- ## Links
11
+ # Changelog
21
12
 
22
- - [Setup Guide](../operations/setup.md)
23
- - [Architecture](../architecture/)
13
+ **Goal:** what changed in {Project Name}, and how it was refined, one entry per unit of work.
24
14
 
25
- ---
15
+ ## Entries
16
+
17
+ - **Location:** `changelog/YYYY-MM-DD-{three-words}.md`, one file per unit of work; the three words name the work, not the commit.
18
+ - **Summary line:** each entry opens `# {date} · {surface} — {one-line outcome}`, the line a reader scans.
19
+ - **Content:** the ask in the user's words, what was rejected, which skills held, what changed and what running it taught (the `documentation` skill's `templates/changelog-entry.md`).
20
+ - **Lifecycle:** a draft until its commit; frozen from then on. A correction is a new entry that links back.
26
21
 
27
- ## How to Update This Changelog
22
+ ## Owed entries
28
23
 
29
- 1. Create a dated change file in `docs/history/changelog/`:
30
- `docs/history/changelog/YYYY-MM-DD-feature-name.md`
24
+ - **Plan completion:** a draft entry, written when the plan reaches `Status: Complete`.
25
+ - **Commit:** every non-exempt commit carries its entry inside it (the `changelog` rule lists the exemptions).
31
26
 
32
- 2. Update this CHANGELOG.md with a high-level summary linking to the detail file
27
+ ## Reading the changelog
33
28
 
34
- 3. Follow Keep a Changelog categories:
35
- - **Added** for new features
36
- - **Changed** for changes in existing functionality
37
- - **Deprecated** for soon-to-be removed features
38
- - **Removed** for now removed features
39
- - **Fixed** for bug fixes
40
- - **Security** for security improvements
29
+ - **Newest first:** `ls -r changelog/`
30
+ - **One line per entry:** `grep -m1 -H '^# ' changelog/*.md`
31
+ - **One surface:** `grep -l '· {surface} —' changelog/*.md`
32
+ - **Distilled lessons:** the `retro` agent turns accumulated entries into a punch list on demand.
41
33
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  Truth document. Use for: the entry point for all documentation in a repo. Created during baseline audit.
4
4
 
5
- **This file describes directories, never files.** Each section names one folder under `docs/` and says what the folder holds, who reads it and how its files are named — a description of the directory, not of its contents. No per-file rows, no file tree, no `├──` block: the tree is `structure.md`'s, as the authority on placement, and `ls` is the roster. A row per file forces an index edit on every file added, renamed or retired, and the index's own history then records roster churn instead of what the index said — a repo carried 103 commits on `docs/README.md` before this rule, most of them row edits. Each section below names a folder and says what the folder holds and how its files are named; the only files an index may name are the mandated scaffolds (`structure.md`, `operations/setup.md`, `history/CHANGELOG.md`, `history/backlog.md`) and the root `CLAUDE.md`. The repo-root `README.md` routes the team and agents in by intent; this file describes the folders of the docs tree — each links the other once and neither restates the other. Naming a file without a link is the same row: no filename, no record ID (`AD-010`), no per-record table. Each file's own `description:` frontmatter is its account, read with `grep -m1 '^description:' <folder>/*.md`. `doc-lint` blocks a folder index that links an individual document (`index-lists-files`), names one (`index-names-records`) or draws a tree (`index-file-tree`).
5
+ **This file describes directories, never files.** Each section names one folder under `docs/` and says what the folder holds, who reads it and how its files are named — a description of the directory, not of its contents. No per-file rows, no file tree, no `├──` block: the tree is `structure.md`'s, as the authority on placement, and `ls` is the roster. A row per file forces an index edit on every file added, renamed or retired, and the index's own history then records roster churn instead of what the index said. Each section below names a folder and says what the folder holds and how its files are named; the only files an index may name are the mandated scaffolds and the root instruction files, listed in `SKILL.md` § The three natures. The repo-root `README.md` routes the team and agents in by intent; this file describes the folders of the docs tree — each links the other once and neither restates the other. Naming a file without a link is the same row: no filename, no record ID (`AD-010`), no per-record table. Each file's own `description:` frontmatter is its account, read with `grep -m1 '^description:' <folder>/*.md`. `doc-lint` blocks a folder index that links an individual document (`index-lists-files`), names one (`index-names-records`) or draws a tree (`index-file-tree`).
6
6
 
7
7
  **Link only what exists.** Every row below is a placeholder — drop any whose target the repo does not have. Most `history/` and `architecture/` folders are created on first use, so linking them unconditionally ships a docs index with dead links on day one. An index is a browse page: a link that resolves to nothing is worse than an absent row.
8
8
 
@@ -38,7 +38,7 @@ The design layer — [architecture/](architecture/): {what the folder holds —
38
38
 
39
39
  ## History
40
40
 
41
- [history/](history/) — the records: `plans/` (one dated plan per unit of work, frozen at completion), `changelog/` (one entry per unit of work, indexed by [CHANGELOG.md](history/CHANGELOG.md)), `migrations/` (one-shot runbooks), `brainstorms/`, `research/`, and [backlog.md](history/backlog.md).
41
+ [history/](history/) — the records, and two queues: `plans/` (one dated plan per unit of work, frozen at completion), `changelog/` (one entry per unit of work; [CHANGELOG.md](history/CHANGELOG.md) explains how to read it), `migrations/` (one-shot runbooks), `brainstorms/`, `research/`, [backlog.md](history/backlog.md) (open work; a finished item is deleted) and `journal.md` (mid-execution facts awaiting their owning doc).
42
42
 
43
43
  ## Research and memory
44
44
 
@@ -24,7 +24,7 @@ Nothing else: the neighbouring documents live in **For the agent**, the one clos
24
24
  type: doctrine # required tooling key
25
25
  description: "{at most 300 characters: what this document settles and where its boundary sits}" # required — the per-file account a folder is browsed by (references/frontmatter.md)
26
26
  status: active # required — active | draft
27
- objects: [principal, credential, device grant] # recommended — the concepts this doctrine governs, by their graph names
27
+ objects: [principal, credential, device grant] # required — the concepts this doctrine governs, by their graph names
28
28
  ---
29
29
  ```
30
30
 
@@ -79,4 +79,4 @@ Code cannot reveal what it does not yet do, so decided-but-unbuilt intent is one
79
79
  | A tour of the code that implements the concern | The code graph |
80
80
  | The catalog of routes, error codes or variables | An API reference or environment registry |
81
81
  | The one feature that happens to use the concern most | That feature's own document, which names this doctrine in its Scope |
82
- | The story of how the concern got this way | A decision record (`decisions/`) for the why, and the changelog for the when |
82
+ | The story of how the concern got this way | The subject's architecture decision (`decisions/`), whose Decision Changelog tail carries how it moved, and the changelog for the when |
@@ -4,7 +4,12 @@ Truth document. Use for: the entities the system is about — what they are, how
4
4
 
5
5
  Required: **Entities**, **Relationships**. Optional: Lifecycle states, Invariants.
6
6
 
7
- ```
7
+ ```markdown
8
+ ---
9
+ type: domain-model
10
+ description: "{at most 300 characters: what this document settles and where its boundary sits}"
11
+ ---
12
+
8
13
  # Domain Model
9
14
 
10
15
  ## Entities
@@ -15,14 +20,14 @@ Required: **Entities**, **Relationships**. Optional: Lifecycle states, Invariant
15
20
 
16
21
  ## Relationships
17
22
 
18
- - {EntityA} 1—N {EntityB} — {the meaning of the link}
19
- - {EntityB} N—N {EntityC} via {join} — {meaning}
23
+ - **{EntityA} 1—N {EntityB}:** {the meaning of the link}
24
+ - **{EntityB} N—N {EntityC} via {join}:** {meaning}
20
25
 
21
26
  ## Lifecycle states
22
27
 
23
28
  {Only for entities with real state machines.}
24
29
 
25
- - **{Entity}**: draft → active → archived — {what moves it between states}
30
+ - **{Entity}:** draft → active → archived, moved by {what moves it between states}
26
31
 
27
32
  ## Invariants
28
33
 
@@ -4,7 +4,12 @@ Truth document. Use for: the config surface — every variable the code reads, i
4
4
 
5
5
  **Placeholders only, never real values.** A real-looking password, account ID, or personal profile name in a doc is a leak, and one developer's local setup written as the canonical value is a trap for everyone else. Values in this doc are `{placeholder}` descriptions.
6
6
 
7
- ```
7
+ ```markdown
8
+ ---
9
+ type: environment-registry
10
+ description: "{at most 300 characters: what this document settles and where its boundary sits}"
11
+ ---
12
+
8
13
  # Environment Registry
9
14
 
10
15
  Every variable the code reads. `.env.example` mirrors this list.
@@ -8,7 +8,7 @@ Truth document. Use for every feature in `docs/features/`: something a person po
8
8
  - **Each bullet is a bold label, then one or two third-person sentences** saying what happens: "**Organization user:** user lands in their existing organization", never "you land…".
9
9
  - **Flows carry the journey; Decisions carry the reasons; Promises run deepest.**
10
10
 
11
- The frontmatter names the objects the feature designs; which files it speaks for is computed from the source headers and the object closure, never listed (`references/frontmatter.md`). Every computable fact (columns, vocabularies, foreign keys, writers, routes, guards, files) is the code graph's (`docs/architecture/systems/knowledge-layer.md`), and a hand-typed copy is the defect this genre removes. Code is named only where a person types or sees it (a page, a command, a flag, an environment variable) or at a cross-cutting seam the graph would not lead a reader to.
11
+ The frontmatter names the objects the feature designs; which files it speaks for is never listed in the body. The ownership scan reads its transitional `owns:` region glob today, and each owned source file's header names this document for when the scan switches (`references/frontmatter.md`). Every computable fact (columns, vocabularies, foreign keys, writers, routes, guards, files) is the code graph's (`docs/architecture/systems/knowledge-layer.md`), and a hand-typed copy is the defect this genre removes. Code is named only where a person types or sees it (a page, a command, a flag, an environment variable) or at a cross-cutting seam the graph would not lead a reader to.
12
12
 
13
13
  **A feature document runs deepest toward its end.** Scope and Flows are the model and the journey. **Promises** goes as deep as the behaviour does: every state the surface can be in, every edge case, what a refusal tells the person, and the exact wording wherever the wording itself is promised. That depth is earned because a person or a test checks it and the code cannot state it as intent. It still stops before mechanism. A promise reads "a removed membership shows a panel, not a redirect", never which route answers it.
14
14
 
@@ -19,7 +19,7 @@ The frontmatter names the objects the feature designs; which files it speaks for
19
19
  | Frontmatter | required |
20
20
  | Goal line | required |
21
21
  | `Scope` | required |
22
- | `Flows` | required |
22
+ | `Flows` | required once `status: active`; omitted at `draft`, before there is a shipped surface to describe |
23
23
  | `Decisions` | once any choice was made that the code cannot explain |
24
24
  | `Promises` | required |
25
25
  | `Gaps` | only when there is one |
@@ -64,7 +64,7 @@ owns: ["packages/studio/src/server/devices/**"] # transitional — one region
64
64
 
65
65
  ### {Theme as a noun phrase — e.g. "Sign-in failures", "Gate outcomes", "Terminal grant states"}
66
66
 
67
- {A table where the cases are parallel states — | Situation | What the person sees | — carrying the exact wording where the wording is promised. Bullets otherwise:}
67
+ {A table where the cases are parallel states — | Situation | Outcome | — carrying the exact wording where the wording is promised. Bullets otherwise:}
68
68
 
69
69
  - **{Noun-phrase label}:** {the guarantee or refusal, checkable by a person or a test.}
70
70
 
@@ -79,7 +79,7 @@ owns: ["packages/studio/src/server/devices/**"] # transitional — one region
79
79
  - **Commands:** {`nustack …`}
80
80
  - **Code roots:** {`packages/…/src/…/`}, directories where the graph should start
81
81
  - **Seams:** {`name`}, only where the roots would not lead to them
82
- - **Checklist:** `tests/{feature}.md`
82
+ - **Checklist:** `docs/tests/{feature}.md`, once the verification gate has written it
83
83
  - **See also:** {neighbour}: {why}
84
84
 
85
85
  No tables, routes or symbol rosters — those are the graph's.
@@ -2,7 +2,12 @@
2
2
 
3
3
  Truth document. Use for: the project's vocabulary — one name per concept, one line per name. Alphabetical. When the code uses a different name than the docs, record it in **In code** so readers can bridge; one concept never gets two doc names.
4
4
 
5
- ```
5
+ ```markdown
6
+ ---
7
+ type: glossary
8
+ description: "{at most 300 characters: what this document settles and where its boundary sits}"
9
+ ---
10
+
6
11
  # Glossary
7
12
 
8
13
  | Term | Meaning | In code |