@nurix/etna 0.19.65 → 0.19.67

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 (250) hide show
  1. package/bin/etna.js +10 -1
  2. package/data/harness-index.json +1 -5
  3. package/data/harnesses/code/CLAUDE.md +3 -1
  4. package/data/harnesses/code/agents/maintenance.md +4 -1
  5. package/data/harnesses/code/harness.json +7 -2
  6. package/data/harnesses/code/hooks/check-completion-integrity.mjs +8 -0
  7. package/data/harnesses/code/hooks/compliance.mjs +139 -27
  8. package/data/harnesses/code/hooks/lib/frozen.mjs +3 -0
  9. package/data/harnesses/code/hooks/lib/ledger.mjs +31 -0
  10. package/data/harnesses/code/hooks/lib/ownership.mjs +3 -1
  11. package/data/harnesses/code/hooks/lib/session-log.mjs +75 -0
  12. package/data/harnesses/code/rules/changelog.md +2 -0
  13. package/data/harnesses/code/skills/documentation/SKILL.md +1 -0
  14. package/data/harnesses/code/skills/documentation/references/frontmatter.md +1 -1
  15. package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +2 -2
  16. package/data/harnesses/code/skills/documentation/templates/Readme.md +1 -0
  17. package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +2 -0
  18. package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +2 -2
  19. package/data/harnesses/code/skills/documentation/templates/feature.md +1 -0
  20. package/data/harnesses/code/skills/documentation/templates/implementation-map.md +42 -0
  21. package/data/harnesses/code/skills/testing/SKILL.md +5 -5
  22. package/data/harnesses/delivery/agents/maintenance.md +4 -1
  23. package/data/harnesses/delivery/harness.json +2 -2
  24. package/data/harnesses/delivery/rules/changelog.md +2 -0
  25. package/data/harnesses/delivery/skills/documentation/SKILL.md +1 -0
  26. package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +1 -1
  27. package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +2 -2
  28. package/data/harnesses/delivery/skills/documentation/templates/Readme.md +1 -0
  29. package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +2 -0
  30. package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +2 -2
  31. package/data/harnesses/delivery/skills/documentation/templates/feature.md +1 -0
  32. package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +42 -0
  33. package/data/harnesses/etna/agents/maintenance.md +4 -1
  34. package/data/harnesses/etna/harness.json +2 -2
  35. package/data/harnesses/etna/rules/changelog.md +2 -0
  36. package/data/harnesses/etna/skills/documentation/SKILL.md +1 -0
  37. package/data/harnesses/etna/skills/documentation/references/frontmatter.md +1 -1
  38. package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +2 -2
  39. package/data/harnesses/etna/skills/documentation/templates/Readme.md +1 -0
  40. package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +2 -0
  41. package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +2 -2
  42. package/data/harnesses/etna/skills/documentation/templates/feature.md +1 -0
  43. package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +42 -0
  44. package/lib/install/materialize.mjs +51 -57
  45. package/package.json +2 -2
  46. package/data/harnesses/apollo/.mcp.json +0 -8
  47. package/data/harnesses/apollo/.prettierignore +0 -29
  48. package/data/harnesses/apollo/.prettierrc.json +0 -3
  49. package/data/harnesses/apollo/.vscode/settings.json +0 -19
  50. package/data/harnesses/apollo/CLAUDE.md +0 -162
  51. package/data/harnesses/apollo/agents/bookkeeper.md +0 -28
  52. package/data/harnesses/apollo/agents/brainstorm.md +0 -144
  53. package/data/harnesses/apollo/agents/change-review.md +0 -251
  54. package/data/harnesses/apollo/agents/lld-mode.md +0 -58
  55. package/data/harnesses/apollo/agents/maintenance.md +0 -233
  56. package/data/harnesses/apollo/agents/performance-review.md +0 -223
  57. package/data/harnesses/apollo/agents/retro.md +0 -46
  58. package/data/harnesses/apollo/codex/agents/bookkeeper.toml +0 -26
  59. package/data/harnesses/apollo/codex/agents/brainstorm.toml +0 -142
  60. package/data/harnesses/apollo/codex/agents/change-review.toml +0 -249
  61. package/data/harnesses/apollo/codex/agents/lld-mode.toml +0 -52
  62. package/data/harnesses/apollo/codex/agents/maintenance.toml +0 -228
  63. package/data/harnesses/apollo/codex/agents/performance-review.toml +0 -222
  64. package/data/harnesses/apollo/codex/agents/retro.toml +0 -45
  65. package/data/harnesses/apollo/harness.json +0 -19
  66. package/data/harnesses/apollo/hooks/approved-packages.md +0 -44
  67. package/data/harnesses/apollo/hooks/awareness.mjs +0 -405
  68. package/data/harnesses/apollo/hooks/check-bookkeeping-clean.mjs +0 -19
  69. package/data/harnesses/apollo/hooks/check-changelog-presence.mjs +0 -57
  70. package/data/harnesses/apollo/hooks/check-completion-integrity.mjs +0 -71
  71. package/data/harnesses/apollo/hooks/check-ownership.mjs +0 -22
  72. package/data/harnesses/apollo/hooks/compliance.mjs +0 -457
  73. package/data/harnesses/apollo/hooks/hooks.json +0 -23
  74. package/data/harnesses/apollo/hooks/lib/frozen.mjs +0 -58
  75. package/data/harnesses/apollo/hooks/lib/ownership.mjs +0 -242
  76. package/data/harnesses/apollo/hooks/lib/state.mjs +0 -170
  77. package/data/harnesses/apollo/rules/changelog.md +0 -25
  78. package/data/harnesses/apollo/rules/database.md +0 -34
  79. package/data/harnesses/apollo/rules/frontend.md +0 -30
  80. package/data/harnesses/apollo/rules/general.md +0 -40
  81. package/data/harnesses/apollo/rules/nomenclature.md +0 -30
  82. package/data/harnesses/apollo/rules/pnpm.md +0 -57
  83. package/data/harnesses/apollo/rules/testing.md +0 -64
  84. package/data/harnesses/apollo/skills/boundary/SKILL.md +0 -75
  85. package/data/harnesses/apollo/skills/boundary/references/index.md +0 -16
  86. package/data/harnesses/apollo/skills/boundary/references/mechanisms.md +0 -99
  87. package/data/harnesses/apollo/skills/boundary/references/packs/async-messaging.md +0 -81
  88. package/data/harnesses/apollo/skills/boundary/references/packs/auth.md +0 -93
  89. package/data/harnesses/apollo/skills/boundary/references/packs/build-config-runtime.md +0 -93
  90. package/data/harnesses/apollo/skills/boundary/references/packs/cloudflare.md +0 -93
  91. package/data/harnesses/apollo/skills/boundary/references/packs/frontend.md +0 -93
  92. package/data/harnesses/apollo/skills/boundary/references/packs/generic-tail.md +0 -55
  93. package/data/harnesses/apollo/skills/boundary/references/packs/persistence.md +0 -93
  94. package/data/harnesses/apollo/skills/boundary/references/packs/wire-api.md +0 -87
  95. package/data/harnesses/apollo/skills/brainstorm/README.md +0 -56
  96. package/data/harnesses/apollo/skills/brainstorm/SKILL.md +0 -173
  97. package/data/harnesses/apollo/skills/brainstorm/references/doctrine.md +0 -98
  98. package/data/harnesses/apollo/skills/brainstorm/references/harvest.md +0 -86
  99. package/data/harnesses/apollo/skills/brainstorm/references/session-schema.md +0 -186
  100. package/data/harnesses/apollo/skills/brainstorm/scripts/detector.mjs +0 -460
  101. package/data/harnesses/apollo/skills/design/SKILL.md +0 -121
  102. package/data/harnesses/apollo/skills/design/components/charts.md +0 -76
  103. package/data/harnesses/apollo/skills/design/components/collections.md +0 -132
  104. package/data/harnesses/apollo/skills/design/components/feedback.md +0 -47
  105. package/data/harnesses/apollo/skills/design/components/hooks.md +0 -35
  106. package/data/harnesses/apollo/skills/design/components/index.md +0 -143
  107. package/data/harnesses/apollo/skills/design/components/inputs.md +0 -327
  108. package/data/harnesses/apollo/skills/design/components/layout.md +0 -52
  109. package/data/harnesses/apollo/skills/design/components/media.md +0 -66
  110. package/data/harnesses/apollo/skills/design/components/motion.md +0 -82
  111. package/data/harnesses/apollo/skills/design/components/navigation.md +0 -29
  112. package/data/harnesses/apollo/skills/design/components/overlays.md +0 -72
  113. package/data/harnesses/apollo/skills/design/components/setup.md +0 -40
  114. package/data/harnesses/apollo/skills/design/components/typography.md +0 -46
  115. package/data/harnesses/apollo/skills/design/components/utils.md +0 -37
  116. package/data/harnesses/apollo/skills/design/data/blueprints/browse.md +0 -38
  117. package/data/harnesses/apollo/skills/design/data/blueprints/creation-flow.md +0 -38
  118. package/data/harnesses/apollo/skills/design/data/blueprints/dashboard.md +0 -38
  119. package/data/harnesses/apollo/skills/design/data/blueprints/grid.md +0 -38
  120. package/data/harnesses/apollo/skills/design/data/blueprints/queue.md +0 -38
  121. package/data/harnesses/apollo/skills/design/data/blueprints/record-detail.md +0 -38
  122. package/data/harnesses/apollo/skills/design/data/blueprints/settings.md +0 -38
  123. package/data/harnesses/apollo/skills/design/data/charts/census.csv +0 -58
  124. package/data/harnesses/apollo/skills/design/data/checklists/browse.md +0 -21
  125. package/data/harnesses/apollo/skills/design/data/checklists/creation-flow.md +0 -20
  126. package/data/harnesses/apollo/skills/design/data/checklists/dashboard.md +0 -21
  127. package/data/harnesses/apollo/skills/design/data/checklists/grid.md +0 -21
  128. package/data/harnesses/apollo/skills/design/data/checklists/queue.md +0 -21
  129. package/data/harnesses/apollo/skills/design/data/checklists/record-detail.md +0 -21
  130. package/data/harnesses/apollo/skills/design/data/checklists/settings.md +0 -21
  131. package/data/harnesses/apollo/skills/design/data/chrome/board-column.md +0 -68
  132. package/data/harnesses/apollo/skills/design/data/chrome/data-table.md +0 -63
  133. package/data/harnesses/apollo/skills/design/data/chrome/side-panel.md +0 -60
  134. package/data/harnesses/apollo/skills/design/data/chrome/sidebar.md +0 -78
  135. package/data/harnesses/apollo/skills/design/data/chrome/stat-cards.md +0 -62
  136. package/data/harnesses/apollo/skills/design/data/chrome/topbar.md +0 -65
  137. package/data/harnesses/apollo/skills/design/data/elevation/ant-design-directional-shadow.md +0 -19
  138. package/data/harnesses/apollo/skills/design/data/elevation/apple-liquid-glass-material.md +0 -18
  139. package/data/harnesses/apollo/skills/design/data/elevation/atlassian-surface-shadow-pairing.md +0 -20
  140. package/data/harnesses/apollo/skills/design/data/elevation/fluent-2-key-ambient-ramp.md +0 -20
  141. package/data/harnesses/apollo/skills/design/data/elevation/github-primer-sparing-shadow.md +0 -19
  142. package/data/harnesses/apollo/skills/design/data/elevation/ibm-carbon-layer-and-border.md +0 -19
  143. package/data/harnesses/apollo/skills/design/data/elevation/linear-dark-surface-ladder.md +0 -17
  144. package/data/harnesses/apollo/skills/design/data/elevation/material-2-key-ambient-dp-ramp.md +0 -19
  145. package/data/harnesses/apollo/skills/design/data/elevation/material-3-tonal-elevation.md +0 -21
  146. package/data/harnesses/apollo/skills/design/data/elevation/neobrutalist-hard-offset.md +0 -19
  147. package/data/harnesses/apollo/skills/design/data/elevation/neumorphic-soft-dual-shadow.md +0 -18
  148. package/data/harnesses/apollo/skills/design/data/elevation/notion-warm-minimal-hairline.md +0 -17
  149. package/data/harnesses/apollo/skills/design/data/elevation/polaris-elevation-inset-bevel.md +0 -21
  150. package/data/harnesses/apollo/skills/design/data/elevation/radix-themes-alpha-ring-scale.md +0 -19
  151. package/data/harnesses/apollo/skills/design/data/elevation/shadcn-neutral-derived-radius.md +0 -19
  152. package/data/harnesses/apollo/skills/design/data/elevation/stripe-brand-tinted-dual-shadow.md +0 -18
  153. package/data/harnesses/apollo/skills/design/data/elevation/tailwind-default-utility-scale.md +0 -19
  154. package/data/harnesses/apollo/skills/design/data/elevation/vercel-geist-shadow-as-border.md +0 -20
  155. package/data/harnesses/apollo/skills/design/data/iconography.md +0 -199
  156. package/data/harnesses/apollo/skills/design/data/motion/accordion-expand.md +0 -18
  157. package/data/harnesses/apollo/skills/design/data/motion/destructive-hold-confirm.md +0 -18
  158. package/data/harnesses/apollo/skills/design/data/motion/drag-dismiss-momentum.md +0 -18
  159. package/data/harnesses/apollo/skills/design/data/motion/empty-state-arrive.md +0 -18
  160. package/data/harnesses/apollo/skills/design/data/motion/hover-lift.md +0 -18
  161. package/data/harnesses/apollo/skills/design/data/motion/modal-center-arrive.md +0 -18
  162. package/data/harnesses/apollo/skills/design/data/motion/number-ticker-roll.md +0 -18
  163. package/data/harnesses/apollo/skills/design/data/motion/onboarding-bounce.md +0 -18
  164. package/data/harnesses/apollo/skills/design/data/motion/panel-slide.md +0 -18
  165. package/data/harnesses/apollo/skills/design/data/motion/press-feedback.md +0 -18
  166. package/data/harnesses/apollo/skills/design/data/motion/progress-linear-loop.md +0 -18
  167. package/data/harnesses/apollo/skills/design/data/motion/route-crossfade.md +0 -18
  168. package/data/harnesses/apollo/skills/design/data/motion/rubber-band-overscroll.md +0 -18
  169. package/data/harnesses/apollo/skills/design/data/motion/skeleton-shimmer.md +0 -18
  170. package/data/harnesses/apollo/skills/design/data/motion/stagger-arrive.md +0 -18
  171. package/data/harnesses/apollo/skills/design/data/motion/toast-enter-stack.md +0 -18
  172. package/data/harnesses/apollo/skills/design/data/motion/tooltip-chain-instant.md +0 -18
  173. package/data/harnesses/apollo/skills/design/data/motion/trigger-anchored-reveal.md +0 -18
  174. package/data/harnesses/apollo/skills/design/data/tells.csv +0 -34
  175. package/data/harnesses/apollo/skills/design/data/voices/bright-collaborator.md +0 -29
  176. package/data/harnesses/apollo/skills/design/data/voices/direct-operator.md +0 -29
  177. package/data/harnesses/apollo/skills/design/data/voices/earnest-helper.md +0 -29
  178. package/data/harnesses/apollo/skills/design/data/voices/editorial-composed.md +0 -29
  179. package/data/harnesses/apollo/skills/design/data/voices/quiet-concierge.md +0 -29
  180. package/data/harnesses/apollo/skills/design/data/voices/warm-guide.md +0 -29
  181. package/data/harnesses/apollo/skills/design/references/compose.md +0 -23
  182. package/data/harnesses/apollo/skills/design/references/content.md +0 -28
  183. package/data/harnesses/apollo/skills/design/references/emission.md +0 -21
  184. package/data/harnesses/apollo/skills/design/references/existing-apps.md +0 -27
  185. package/data/harnesses/apollo/skills/design/references/foundations.md +0 -57
  186. package/data/harnesses/apollo/skills/design/references/intake.md +0 -40
  187. package/data/harnesses/apollo/skills/design/references/object-pass.md +0 -24
  188. package/data/harnesses/apollo/skills/design/references/ship-gate.md +0 -29
  189. package/data/harnesses/apollo/skills/design/references/ux-patterns/Readme.md +0 -195
  190. package/data/harnesses/apollo/skills/design/references/ux-patterns/ai-layer.md +0 -49
  191. package/data/harnesses/apollo/skills/design/references/ux-patterns/attributes-lifecycle.md +0 -43
  192. package/data/harnesses/apollo/skills/design/references/ux-patterns/container-choice.md +0 -44
  193. package/data/harnesses/apollo/skills/design/references/ux-patterns/creation-paths.md +0 -46
  194. package/data/harnesses/apollo/skills/design/references/ux-patterns/dashboards.md +0 -42
  195. package/data/harnesses/apollo/skills/design/references/ux-patterns/modes.md +0 -42
  196. package/data/harnesses/apollo/skills/design/references/ux-patterns/object-model.md +0 -46
  197. package/data/harnesses/apollo/skills/design/references/ux-patterns/page-archetype.md +0 -48
  198. package/data/harnesses/apollo/skills/design/references/ux-patterns/promotion-demotion.md +0 -37
  199. package/data/harnesses/apollo/skills/design/references/ux-patterns/settings.md +0 -42
  200. package/data/harnesses/apollo/skills/design/references/ux-patterns/standard-pages.md +0 -46
  201. package/data/harnesses/apollo/skills/design/references/ux-patterns/state-matrix.md +0 -41
  202. package/data/harnesses/apollo/skills/design/references/ux-patterns/table-mechanics.md +0 -48
  203. package/data/harnesses/apollo/skills/design/references/ux-patterns/verbs.md +0 -45
  204. package/data/harnesses/apollo/skills/design/references/ux-patterns/viewer-context.md +0 -40
  205. package/data/harnesses/apollo/skills/design/scripts/README-validator.md +0 -27
  206. package/data/harnesses/apollo/skills/design/scripts/select-chart.mjs +0 -622
  207. package/data/harnesses/apollo/skills/design/scripts/validate-design-md.mjs +0 -1198
  208. package/data/harnesses/apollo/skills/documentation/SKILL.md +0 -134
  209. package/data/harnesses/apollo/skills/documentation/references/examples.md +0 -279
  210. package/data/harnesses/apollo/skills/documentation/references/frontmatter.md +0 -44
  211. package/data/harnesses/apollo/skills/documentation/references/instruction-style.md +0 -50
  212. package/data/harnesses/apollo/skills/documentation/references/style-guide.md +0 -384
  213. package/data/harnesses/apollo/skills/documentation/references/untemplated.md +0 -38
  214. package/data/harnesses/apollo/skills/documentation/scripts/doc-lint.mjs +0 -140
  215. package/data/harnesses/apollo/skills/documentation/templates/Readme.md +0 -34
  216. package/data/harnesses/apollo/skills/documentation/templates/api-reference.md +0 -20
  217. package/data/harnesses/apollo/skills/documentation/templates/architecture-decision.md +0 -121
  218. package/data/harnesses/apollo/skills/documentation/templates/backlog.md +0 -33
  219. package/data/harnesses/apollo/skills/documentation/templates/behavioral-checklist.md +0 -79
  220. package/data/harnesses/apollo/skills/documentation/templates/bookkeeping.md +0 -18
  221. package/data/harnesses/apollo/skills/documentation/templates/changelog-entry.md +0 -57
  222. package/data/harnesses/apollo/skills/documentation/templates/changelog-index.md +0 -41
  223. package/data/harnesses/apollo/skills/documentation/templates/docs-readme.md +0 -72
  224. package/data/harnesses/apollo/skills/documentation/templates/domain-model.md +0 -30
  225. package/data/harnesses/apollo/skills/documentation/templates/environment-registry.md +0 -15
  226. package/data/harnesses/apollo/skills/documentation/templates/feature.md +0 -149
  227. package/data/harnesses/apollo/skills/documentation/templates/glossary.md +0 -11
  228. package/data/harnesses/apollo/skills/documentation/templates/journal.md +0 -13
  229. package/data/harnesses/apollo/skills/documentation/templates/memory-main.md +0 -25
  230. package/data/harnesses/apollo/skills/documentation/templates/migration-runbook.md +0 -34
  231. package/data/harnesses/apollo/skills/documentation/templates/non-goals.md +0 -11
  232. package/data/harnesses/apollo/skills/documentation/templates/operations-procedure.md +0 -36
  233. package/data/harnesses/apollo/skills/documentation/templates/plan.md +0 -88
  234. package/data/harnesses/apollo/skills/documentation/templates/protected-files.md +0 -37
  235. package/data/harnesses/apollo/skills/documentation/templates/root-readme.md +0 -104
  236. package/data/harnesses/apollo/skills/documentation/templates/security-overview.md +0 -27
  237. package/data/harnesses/apollo/skills/documentation/templates/structure.md +0 -65
  238. package/data/harnesses/apollo/skills/documentation/templates/system-overview.md +0 -32
  239. package/data/harnesses/apollo/skills/documentation/templates/testing-strategy.md +0 -29
  240. package/data/harnesses/apollo/skills/schema-design/SKILL.md +0 -141
  241. package/data/harnesses/apollo/skills/test/SKILL.md +0 -104
  242. package/data/harnesses/apollo/skills/testing/SKILL.md +0 -166
  243. package/data/harnesses/apollo/skills/workflow-mapper/SKILL.md +0 -451
  244. package/data/harnesses/apollo/skills/workflow-mapper/references/patterns.md +0 -214
  245. /package/data/harnesses/{apollo → code}/docs/README.md +0 -0
  246. /package/data/harnesses/{apollo → code}/docs/history/CHANGELOG.md +0 -0
  247. /package/data/harnesses/{apollo → code}/docs/history/backlog.md +0 -0
  248. /package/data/harnesses/{apollo → code}/docs/memory/main.md +0 -0
  249. /package/data/harnesses/{apollo → code}/docs/structure.md +0 -0
  250. /package/data/harnesses/{apollo → code}/rules/cloudflare.md +0 -0
@@ -16,7 +16,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
16
16
  - **Iterations:** {N} · rejected: {what was rejected and why} | none
17
17
  - **Skills:** {skill}@{version} — survived | partially survived | overridden ({why, briefly}) | none used
18
18
  - **Change:** {added/changed X, which does Y, because Z — behavior first, mechanism second. Plan-linked entries also carry the verification gate's results here: rows discharged, suite outcome, anything blocked}
19
- - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} | none
19
+ - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} [source: {tag}] | none
20
20
  - **Class:** {one or more keywords — suggestive vocabulary, not a closed enum; see Field rules}
21
21
  - **Pin:** {enforced artifact written in this entry's commit: test / token / guardrail / schema} | none — candidate: {what should hold it}
22
22
  ```
@@ -39,7 +39,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
39
39
  - **`surface`** uses the repo's ownership vocabulary — the owning feature doc's topic or an `owns:` path stem — so entries are queryable per surface.
40
40
  - **`Ask` quotes taste verbatim.** The user's preference wording is the one thing no skill can infer and no rebuild recovers; the entry is its durable home.
41
41
  - **`Skills` records efficacy honestly** — survived / partially survived / overridden with a reason. These verdicts are the raw data the `retro` agent aggregates into skill-evolution findings; sanitizing them into success stories destroys the mechanism's value.
42
- - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates.
42
+ - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates. **Each finding carries a `source:` tag from a closed list** — `generator` (a generated doc was wrong) · `generator-conflict` (two generated docs disagreed) · `rules-conflict` (a generated doc contradicted standing rules) · `runtime-discovery` (only running revealed it) · `environment` (tooling or harness). Closed deliberately, unlike `Class:` — the consumer is the doc generator's readback grep, not a human. A finding in a repo with no generated docs is almost always `runtime-discovery` or `environment`.
43
43
  - **`Class` is a suggestive vocabulary, not a closed enum.** Tag with one or more keywords, preferring an existing term over a synonym so the `retro` agent can cluster; coin a new one when nothing fits — a recurring coinage is itself retro signal that the vocabulary (or the doc set) is missing a category. Suggested keywords: `ux` · `ui` · `visual` · `taste` · `layout` · `motion` · `interaction` · `copy` · `a11y` · `responsiveness` · `navigation` · `state` · `structure` · `architecture` · `seam` · `contract` · `schema` · `data` · `content` · `seed` · `performance` · `caching` · `resilience` · `error-handling` · `security` · `auth` · `observability` · `logging` · `testing` · `tooling` · `dependency` · `ops` · `deploy` · `env` · `ci` · `i18n` · `docs`.
44
44
  - **`Pin` closes the loop:** the enforced artifact written in this commit, or the named candidate for the `retro` agent to flag. A taste-verified behavior with `Pin: none` and no candidate is a template smell.
45
45
  - **Out-of-session entries** (the writing session did not do the work): fill what the diff and conversation evidence support; mark the rest `unknown — committed out-of-session`.
@@ -13,6 +13,7 @@ module: billing # optional — single bounded-c
13
13
  keywords: [invoice, pdf] # required — discovery terms
14
14
  status: active # required — active | draft | deprecated
15
15
  last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
16
+ type: feature # required tooling key — genre stamp (generator-written or authored; enum = the template names), read by tooling (UI grouping, protected-file mapping); preserve on edits, never narrate
16
17
  ---
17
18
  ```
18
19
 
@@ -0,0 +1,42 @@
1
+ # Implementation Map (docs/operations/implementation-map.md)
2
+
3
+ Truth document. Use for: **the cold-start execution contract of a project being built from its documented design** — one per repo, at `docs/operations/implementation-map.md`. It is authored by the **executing session at build start**, never generated at design time: build order is derived from the repo's actual feature docs and their stated dependencies, and a design-time prediction of it goes stale the day reality disagrees. It lives in operations because it says *how to proceed*, not *what is true of the design*.
4
+
5
+ ## Writing the map
6
+
7
+ - **Derive waves from the feature docs** — their stated dependencies plus shared foundations (schema before routes, auth before anything it guards). A wave groups features that can build together; the order reflects foundations, not product importance.
8
+ - **A wave's done criterion is observable** — its plans' verification gates passed, the suite green, a named surface driveable. Never "feels complete".
9
+ - **Authority order names this repo's own docs, most specific wins.** A contradiction between documents is repaired in the owning truth doc *before* code — never reinterpreted while planning.
10
+ - **Plans are records, not an execution queue.** The map points at the active wave's dated plan; historical plans are read only when a truth doc cites them as provenance.
11
+ - **Update in place as waves complete** — the map states the current build position in present tense; the journey lives in the plans and changelog entries.
12
+
13
+ ```
14
+ # {Project} implementation map
15
+
16
+ ## Cold-start contract
17
+
18
+ {One paragraph: what a fresh session asked to "build this" is expected to do with this
19
+ repository — plan, gate, implement, verify, in what granularity — and the statement that it
20
+ needs nothing outside the repo.}
21
+
22
+ ## Authority order
23
+
24
+ When documents disagree:
25
+
26
+ 1. {The constitutional docs — guardrails, non-goals, PRD-class documents}
27
+ 2. The most specific feature doc under `docs/features/`
28
+ 3. {The structural truth docs — domain model, storage schema, API contracts}
29
+ 4. The dated plan for the active wave
30
+ 5. Owned source files as implementation evidence
31
+
32
+ ## Waves
33
+
34
+ | Wave | Features | Depends on | Done when |
35
+ | - | - | - | - |
36
+ | 1 | {docs/features/x.md, docs/features/y.md} | — | {observable criterion} |
37
+ | 2 | {…} | 1 | {…} |
38
+
39
+ ## Current position
40
+
41
+ {One line per wave: complete · in progress ([plan](../history/plans/YYYY-MM-DD-slug.md)) · pending.}
42
+ ```
@@ -47,14 +47,14 @@ Assign each behavior the **cheapest layer that can prove it**, then name the ora
47
47
  ```
48
48
  ## Test Obligations
49
49
 
50
- | # | Behavior (LLD promise) | Layer | Target file | Oracle | Fixtures / faults |
51
- | - | ---------------------- | ----- | ----------- | ------ | ----------------- |
50
+ | # | Behavior (LLD promise) | Layer | Target file | Oracle | Fixtures / faults | Outcome |
51
+ | - | ---------------------- | ----- | ----------- | ------ | ----------------- | ------- |
52
52
 
53
53
  Coverage: {N} behaviors · {N} integration · {N} component · {N} unit · {N} e2e ({N} extend, {N} new)
54
54
  Completion checklist: docs/tests/{feature}.md (derived at the gate, not now)
55
55
  ```
56
56
 
57
- A behavior with no obligation is stated too, with the reason — "none — compiler-guarded" reads as *checked*; an empty cell reads as *not analyzed*. A short manifest is valid — do not pad.
57
+ A behavior with no obligation is stated too, with the reason — "none — compiler-guarded" reads as *checked*; an empty cell reads as *not analyzed*. A short manifest is valid — do not pad. **`Outcome` is written empty here — it is gate mode's cell**, and the completion walls read it: a plan cannot reach `Status: Complete` while any row's Outcome is empty.
58
58
  6. **Record the write in the plan's `Gates:` line**, rewriting only your segment to exactly `Test-plan: written YYYY-MM-DD (N rows)` — the compliance hook greps this exact form. Add the line if the plan predates the format.
59
59
 
60
60
  ---
@@ -162,5 +162,5 @@ Runs only when the user triggers the verification gate (constraints — precondi
162
162
 
163
163
  A driven check is evidence, not an artifact — it proves the change works today and leaves nothing behind; that is why this rung exists.
164
164
  4. **Run the affected suite**, plus the project's e2e smoke gate where one is wired.
165
- 5. **Discharge every ledger row into exactly one outcome**: **satisfied** (test green, or driven check passed), **owes nothing** (with the reason — compiler-guarded, covered elsewhere), or **blocked** (missing infrastructure named, row converted to a backlog item). A row left unexamined blocks the gate.
166
- 6. **Report results honestly, including failures**; record which test now guards each checklist section (`Pinned:` traces). Completion steps — freezing the plan, the changelog entry — are the root policy file's, not yours.
165
+ 5. **Discharge every ledger row into exactly one outcome**: **satisfied** (test green, or driven check passed), **owes nothing** (with the reason — compiler-guarded, covered elsewhere), or **blocked** (missing infrastructure named, row converted to a backlog item). **Open by re-reading the ledger from the plan file on disk, never from conversation memory** — a context-held copy is how rows get missed. **Write each row's outcome into its `Outcome` cell in the plan file** — exactly `satisfied`, `owes nothing — {reason}`, or `blocked → backlog` — because the Stop wall and CI read that cell, and a row left unexamined blocks completion.
166
+ 6. **Report results honestly, including failures**; record which test now guards each checklist section (`Pinned:` traces) and each section's `AC:` line where the repo carries a keyed acceptance-criteria source, closing with the coverage count — `AC coverage: {n}/{m}; uncovered: {keys} → backlog`. Completion steps — freezing the plan, the changelog entry — are the root policy file's, not yours.
@@ -51,7 +51,7 @@ The ownership source of truth is the **union of every feature doc's `owns:` fron
51
51
  ### Step 1: Build the ownership map
52
52
 
53
53
  1. Read `docs/structure.md` for the authority map.
54
- 2. Glob `docs/features/**/*.md`; for each, parse the frontmatter `owns:` globs and `module:` label.
54
+ 2. Glob `docs/features/**/*.md`, ignoring `*.bkp.*` files (installer backups awaiting the fold); for each, parse the frontmatter `owns:` globs and `module:` label.
55
55
  3. Build a map: glob → owning doc + module. Narrower glob wins on overlap. **This IS the source of truth.**
56
56
 
57
57
  **Architecture-first fallback.** If no feature doc carries `owns:` yet (a fresh-baseline repo can carry thousands of LOC and zero feature docs), drive this pass's ownership/drift surface off `docs/architecture/**` file-references instead — they become the **primary** ownership map for Steps 2–5. The `owns:` map becomes primary the moment any feature doc declares ownership — this is a fallback, not a replacement.
@@ -62,6 +62,7 @@ For each `owns:` glob across the feature docs:
62
62
 
63
63
  - Verify the glob matches existing files. Report globs matching nothing, deleted paths, and orphaned docs.
64
64
  - Flag **equal-specificity overlaps** — two feature docs whose `owns:` globs claim the same paths at the same specificity (an ambiguous owner). Surface as a question.
65
+ - **Stamp `type:` where missing.** Every doc carries a `type:` genre key (enum = the `documentation` skill's template names); docs predating the key are stamped mechanically — the genre is readable from placement and shape (a `docs/features/` doc is `type: feature`, an AD is `type: architecture-decision`, and so on). Stamping is remediation, not a question; an ambiguous genre is backlogged instead.
65
66
 
66
67
  For each code symbol or path a doc explicitly **names** (function/export/route/type):
67
68
 
@@ -185,6 +186,8 @@ This is what makes baseline more than a fresh scaffold. Detect old-shape artifac
185
186
  | `docs/architecture/overview.md` | split into `domain-model.md` / `glossary.md` / `non-goals.md` / `references.md` / `open-questions.md` |
186
187
  | `docs/architecture/adr/` (legacy folder name), or `ADR-NNN-*.md` records anywhere under `docs/architecture/` | **rename to the AD genre.** The folder becomes `docs/architecture/decisions/`; each record file `ADR-NNN-{slug}.md` becomes `AD-NNN-{slug}.md`, keeping its number and slug. Inside each record, update the retired vocabulary — "ADR", "Architecture Decision Record", and any supersession framing ("once accepted, an ADR is never edited; a later ADR supersedes it") — to the AD model: one AD per subject, **updated in place**, its journey confined to a `Decision Changelog` tail. A record's **reasoning is never rewritten** by a reconcile; only its genre vocabulary, its own title/id, and paths it cites. The folder's `Readme.md` is an **index, not a record** — reframe its genre description while preserving authored content such as a candidate-decision list verbatim. Repoint live references **inside `docs/`**, including one AD citing another; leave frozen records' links as point-in-time. A live reference **outside** your write scope — most often the root `README.md`, which you never overwrite — cannot be repointed: record it as a backlog item naming the file and line rather than leaving the residue silent |
187
188
  | a legacy `docs/brainstorm/{topic}/`, a singular `docs/history/brainstorm/`, or a root `brainstorm/`/`brainstorming/` folder | move each **active** record to `docs/research/{topic}-brainstorm/` and each **harvested** one to `docs/history/brainstorms/{topic}/` (dropping the suffix); create/refresh both `Readme.md` indexes; delete the emptied folder |
189
+ | `*.bkp.*` files under `docs/` (the installer's first-contact backups of the project's pre-existing files) | **fold the content, then delete the backup.** Classify each backup's content by nature and land it in the current shape — a backed-up changelog's rows into `docs/history/CHANGELOG.md` and per-entry files, a backed-up structure/readme's real claims into the scaffolded truth doc, a backed-up feature doc's content merged into its sibling (or adopted whole if the sibling is a pristine seed). Content is folded, never discarded silently; what cannot be classified goes to the backlog with the backup kept. When the fold lands, delete the `.bkp` file |
190
+ | `*.bkp.*` files at the repo root or in config (`CLAUDE.bkp.md`, `.prettierrc.bkp.json`, …) | **never merge these.** Top-level config is harness-owned by design; list each one to the user as their call, and leave the file in place |
188
191
  | no `harness-version` in `structure.md` | stamp it (Step B4) |
189
192
 
190
193
  ### Step B3 — Present the reconcile plan, then execute
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "harness": "delivery",
3
3
  "name": "delivery",
4
- "version": "0.2.1",
4
+ "version": "0.2.5",
5
5
  "files": [
6
6
  ".prettierignore",
7
7
  ".prettierrc.json",
8
8
  ".vscode/settings.json"
9
9
  ],
10
10
  "seeds": [],
11
- "digest": "83870917a79b"
11
+ "digest": "99afecb2c42f"
12
12
  }
@@ -12,6 +12,8 @@ Every unit of work leaves one record — `docs/history/changelog/YYYY-MM-DD-{thr
12
12
 
13
13
  An entry is owed only by work that changes promised behavior or takes a design decision; mechanical and cosmetic commits — a typo, a copy tweak, a config value, a log line — take only their `docs/history/CHANGELOG.md` row, no entry file. The failure fields (`Ask:`, `Skills:`, `Pin:`) are required only when non-none.
14
14
 
15
+ Route the lesson by who pays for losing it: product context — what changed and why — belongs in the entry; anything the **next session would re-pay** — a library's API drifted from what the model expects, a validator's quirk, a tooling workaround — goes to `docs/memory/main.md` as well, because a changelog is read by people tracing history and memory is read by every session before it repeats the mistake.
16
+
15
17
  ## Lifecycle
16
18
 
17
19
  Draft (created before its commit exists) → complete (missing fields filled from the diff and the session) → frozen the moment it rides in a commit. **Immutability begins at commit, not at creation** — a draft is meant to be edited, which is what lets a completed plan record its context before anything is committed; a committed entry is history, and a correction is a new entry linking back, **never** an edit.
@@ -73,6 +73,7 @@ The two guarantees are complementary and both break on mixing: a reader holding
73
73
  | Testing strategy | [`templates/testing-strategy.md`](templates/testing-strategy.md) |
74
74
  | Behavioral checklist for one feature (`docs/tests/{feature}.md`) | [`templates/behavioral-checklist.md`](templates/behavioral-checklist.md) — the verification gate's driving script, and the source its suite tests are drawn from |
75
75
  | Recurring procedure/setup | [`templates/operations-procedure.md`](templates/operations-procedure.md) |
76
+ | Cold-start build order (implementation map) | [`templates/implementation-map.md`](templates/implementation-map.md) — authored by the executing session at build start, updated in place as waves complete |
76
77
  | Capture mid-execution knowledge (`docs/history/journal.md`) | [`templates/journal.md`](templates/journal.md) (record — append-only; a row resolves by landing in its owning doc) |
77
78
  | Bookkeeping work queue (`docs/operations/bookkeeping.md`) | [`templates/bookkeeping.md`](templates/bookkeeping.md) — machine-read row grammar; appended by hooks and sessions, drained by the `bookkeeper` agent, walled at Stop and commit |
78
79
  | One-shot migration/upgrade | [`templates/migration-runbook.md`](templates/migration-runbook.md) (record) |
@@ -12,7 +12,7 @@ When creating or updating a feature doc, derive its **`owns:` frontmatter** —
12
12
 
13
13
  ## How to derive the frontmatter
14
14
 
15
- A feature doc's ownership frontmatter is `owns:` (required), `module:` (optional), `keywords:` (required), and `status:` (required). An optional `last-reviewed:` date (stamped whenever the doc is substantively reviewed or updated) gives the `maintenance` agent a staleness signal to rank its audits by — it is tooling metadata, never narrated in the body.
15
+ A feature doc's ownership frontmatter is `owns:` (required), `module:` (optional), `keywords:` (required), and `status:` (required). An optional `last-reviewed:` date (stamped whenever the doc is substantively reviewed or updated) gives the `maintenance` agent a staleness signal to rank its audits by — it is tooling metadata, never narrated in the body. `type:` (required — the genre, enum = the template names) and `rev:` (generator-written generation stamp) are the same class: external tooling reads them, sessions **preserve them on edits** and never narrate or inject them. The `maintenance` agent stamps `type:` on docs that predate the key.
16
16
 
17
17
  **1. `owns:`** (the path scope)
18
18
 
@@ -23,7 +23,7 @@ const RULES = [
23
23
  // Sections inside a truth doc where dated history is sanctioned (the two bridges).
24
24
  const BRIDGE_HEADINGS = /^#{1,4}\s+(decision changelog|health log)\b/i;
25
25
  // Instruction files and generated trees are a different genre — out of this linter's scope.
26
- const SKIP = /(^|\/)(\.claude|node_modules|skills|rules|agents|harness|packages\/[^/]+\/data)\/|(^|\/)(CLAUDE|AGENTS)\.md$/;
26
+ const SKIP = /(^|\/)(\.claude|node_modules|skills|rules|agents|harness|packages\/[^/]+\/data)\/|(^|\/)(CLAUDE|AGENTS)\.md$|\.bkp\./;
27
27
  const RECORD = /(^|\/)docs\/(history|research|memory)\//;
28
28
 
29
29
  // Classify a path: skipped genre, record, or truth.
@@ -89,7 +89,7 @@ function lintFile(path, findings) {
89
89
  const isFolderIndex = /(^|\/)(readme)\.md$/i.test(path);
90
90
  if (scope === 'truth' && !isFolderIndex && /(^|\/)docs\/features\/[^/]+\.md$/.test(path)) {
91
91
  const fm = text.startsWith('---') ? text.slice(0, text.indexOf('\n---', 3)) : '';
92
- for (const key of ['owns:', 'keywords:', 'status:'])
92
+ for (const key of ['owns:', 'keywords:', 'status:', 'type:'])
93
93
  if (!fm.includes(key)) findings.push({ path, n: 1, severity: 'block', id: 'feature-frontmatter', message: `feature doc missing \`${key}\` frontmatter` });
94
94
  }
95
95
  }
@@ -16,6 +16,7 @@ One file per template. Every template is either a **truth document** (states cur
16
16
  | Testing strategy | [testing-strategy.md](testing-strategy.md) | Truth |
17
17
  | Behavioral checklist | [behavioral-checklist.md](behavioral-checklist.md) | Truth |
18
18
  | Operations procedure | [operations-procedure.md](operations-procedure.md) | Truth |
19
+ | Implementation map | [implementation-map.md](implementation-map.md) | Truth |
19
20
  | Bookkeeping ledger | [bookkeeping.md](bookkeeping.md) | Truth (work queue) |
20
21
  | Protected files | [protected-files.md](protected-files.md) | Truth |
21
22
  | Project root README | [root-readme.md](root-readme.md) | Truth |
@@ -16,6 +16,7 @@ Required: **Conventions**, at least one numbered behavior section, **Failure Rep
16
16
  - **Prefer exact literals** — the real prompt text, the real button label, the real count. A vague assertion passes a broken product.
17
17
  - **Assert persistence separately from display.** "It appeared on screen" and "it was written" are two claims; a surface that streams unsaved content satisfies the first while failing the second.
18
18
  - **State each section's trace.** `Pinned:` names the suite test that now guards it, or says `driven only` **with the reason** — an unmarked section is indistinguishable from an unexamined one.
19
+ - **State each section's `AC:` keys.** Where the repo carries a keyed acceptance-criteria source, each section names the keys it proves, so the chain from criterion to checklist to suite test survives the last hop; the gate reports coverage and backlogs uncovered keys. `none — not AC-mapped` is the honest line where no keyed source exists.
19
20
  - **A known-failing assertion stays written as the contract.** A checklist states what the feature promises; the *run* records the failure and the backlog carries the defect. Never soften an assertion to make a run go green.
20
21
 
21
22
  ```
@@ -44,6 +45,7 @@ Each step is an action; each **Assert** is the observable it must produce.
44
45
  - [ ] **Assert**: {the persistence claim, where the behavior writes something}
45
46
 
46
47
  > Pinned: `{tests/path/to/file.test.ts}` — or `driven only — {why no durable test is bought}`
48
+ > AC: {the acceptance-criteria keys this section proves} — or `none — not AC-mapped`
47
49
 
48
50
  ### 2. {The next behavior}
49
51
 
@@ -16,7 +16,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
16
16
  - **Iterations:** {N} · rejected: {what was rejected and why} | none
17
17
  - **Skills:** {skill}@{version} — survived | partially survived | overridden ({why, briefly}) | none used
18
18
  - **Change:** {added/changed X, which does Y, because Z — behavior first, mechanism second. Plan-linked entries also carry the verification gate's results here: rows discharged, suite outcome, anything blocked}
19
- - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} | none
19
+ - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} [source: {tag}] | none
20
20
  - **Class:** {one or more keywords — suggestive vocabulary, not a closed enum; see Field rules}
21
21
  - **Pin:** {enforced artifact written in this entry's commit: test / token / guardrail / schema} | none — candidate: {what should hold it}
22
22
  ```
@@ -39,7 +39,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
39
39
  - **`surface`** uses the repo's ownership vocabulary — the owning feature doc's topic or an `owns:` path stem — so entries are queryable per surface.
40
40
  - **`Ask` quotes taste verbatim.** The user's preference wording is the one thing no skill can infer and no rebuild recovers; the entry is its durable home.
41
41
  - **`Skills` records efficacy honestly** — survived / partially survived / overridden with a reason. These verdicts are the raw data the `retro` agent aggregates into skill-evolution findings; sanitizing them into success stories destroys the mechanism's value.
42
- - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates.
42
+ - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates. **Each finding carries a `source:` tag from a closed list** — `generator` (a generated doc was wrong) · `generator-conflict` (two generated docs disagreed) · `rules-conflict` (a generated doc contradicted standing rules) · `runtime-discovery` (only running revealed it) · `environment` (tooling or harness). Closed deliberately, unlike `Class:` — the consumer is the doc generator's readback grep, not a human. A finding in a repo with no generated docs is almost always `runtime-discovery` or `environment`.
43
43
  - **`Class` is a suggestive vocabulary, not a closed enum.** Tag with one or more keywords, preferring an existing term over a synonym so the `retro` agent can cluster; coin a new one when nothing fits — a recurring coinage is itself retro signal that the vocabulary (or the doc set) is missing a category. Suggested keywords: `ux` · `ui` · `visual` · `taste` · `layout` · `motion` · `interaction` · `copy` · `a11y` · `responsiveness` · `navigation` · `state` · `structure` · `architecture` · `seam` · `contract` · `schema` · `data` · `content` · `seed` · `performance` · `caching` · `resilience` · `error-handling` · `security` · `auth` · `observability` · `logging` · `testing` · `tooling` · `dependency` · `ops` · `deploy` · `env` · `ci` · `i18n` · `docs`.
44
44
  - **`Pin` closes the loop:** the enforced artifact written in this commit, or the named candidate for the `retro` agent to flag. A taste-verified behavior with `Pin: none` and no candidate is a template smell.
45
45
  - **Out-of-session entries** (the writing session did not do the work): fill what the diff and conversation evidence support; mark the rest `unknown — committed out-of-session`.
@@ -13,6 +13,7 @@ module: billing # optional — single bounded-c
13
13
  keywords: [invoice, pdf] # required — discovery terms
14
14
  status: active # required — active | draft | deprecated
15
15
  last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
16
+ type: feature # required tooling key — genre stamp (generator-written or authored; enum = the template names), read by tooling (UI grouping, protected-file mapping); preserve on edits, never narrate
16
17
  ---
17
18
  ```
18
19
 
@@ -0,0 +1,42 @@
1
+ # Implementation Map (docs/operations/implementation-map.md)
2
+
3
+ Truth document. Use for: **the cold-start execution contract of a project being built from its documented design** — one per repo, at `docs/operations/implementation-map.md`. It is authored by the **executing session at build start**, never generated at design time: build order is derived from the repo's actual feature docs and their stated dependencies, and a design-time prediction of it goes stale the day reality disagrees. It lives in operations because it says *how to proceed*, not *what is true of the design*.
4
+
5
+ ## Writing the map
6
+
7
+ - **Derive waves from the feature docs** — their stated dependencies plus shared foundations (schema before routes, auth before anything it guards). A wave groups features that can build together; the order reflects foundations, not product importance.
8
+ - **A wave's done criterion is observable** — its plans' verification gates passed, the suite green, a named surface driveable. Never "feels complete".
9
+ - **Authority order names this repo's own docs, most specific wins.** A contradiction between documents is repaired in the owning truth doc *before* code — never reinterpreted while planning.
10
+ - **Plans are records, not an execution queue.** The map points at the active wave's dated plan; historical plans are read only when a truth doc cites them as provenance.
11
+ - **Update in place as waves complete** — the map states the current build position in present tense; the journey lives in the plans and changelog entries.
12
+
13
+ ```
14
+ # {Project} implementation map
15
+
16
+ ## Cold-start contract
17
+
18
+ {One paragraph: what a fresh session asked to "build this" is expected to do with this
19
+ repository — plan, gate, implement, verify, in what granularity — and the statement that it
20
+ needs nothing outside the repo.}
21
+
22
+ ## Authority order
23
+
24
+ When documents disagree:
25
+
26
+ 1. {The constitutional docs — guardrails, non-goals, PRD-class documents}
27
+ 2. The most specific feature doc under `docs/features/`
28
+ 3. {The structural truth docs — domain model, storage schema, API contracts}
29
+ 4. The dated plan for the active wave
30
+ 5. Owned source files as implementation evidence
31
+
32
+ ## Waves
33
+
34
+ | Wave | Features | Depends on | Done when |
35
+ | - | - | - | - |
36
+ | 1 | {docs/features/x.md, docs/features/y.md} | — | {observable criterion} |
37
+ | 2 | {…} | 1 | {…} |
38
+
39
+ ## Current position
40
+
41
+ {One line per wave: complete · in progress ([plan](../history/plans/YYYY-MM-DD-slug.md)) · pending.}
42
+ ```
@@ -51,7 +51,7 @@ The ownership source of truth is the **union of every feature doc's `owns:` fron
51
51
  ### Step 1: Build the ownership map
52
52
 
53
53
  1. Read `docs/structure.md` for the authority map.
54
- 2. Glob `docs/features/**/*.md`; for each, parse the frontmatter `owns:` globs and `module:` label.
54
+ 2. Glob `docs/features/**/*.md`, ignoring `*.bkp.*` files (installer backups awaiting the fold); for each, parse the frontmatter `owns:` globs and `module:` label.
55
55
  3. Build a map: glob → owning doc + module. Narrower glob wins on overlap. **This IS the source of truth.**
56
56
 
57
57
  **Architecture-first fallback.** If no feature doc carries `owns:` yet (a fresh-baseline repo can carry thousands of LOC and zero feature docs), drive this pass's ownership/drift surface off `docs/architecture/**` file-references instead — they become the **primary** ownership map for Steps 2–5. The `owns:` map becomes primary the moment any feature doc declares ownership — this is a fallback, not a replacement.
@@ -62,6 +62,7 @@ For each `owns:` glob across the feature docs:
62
62
 
63
63
  - Verify the glob matches existing files. Report globs matching nothing, deleted paths, and orphaned docs.
64
64
  - Flag **equal-specificity overlaps** — two feature docs whose `owns:` globs claim the same paths at the same specificity (an ambiguous owner). Surface as a question.
65
+ - **Stamp `type:` where missing.** Every doc carries a `type:` genre key (enum = the `documentation` skill's template names); docs predating the key are stamped mechanically — the genre is readable from placement and shape (a `docs/features/` doc is `type: feature`, an AD is `type: architecture-decision`, and so on). Stamping is remediation, not a question; an ambiguous genre is backlogged instead.
65
66
 
66
67
  For each code symbol or path a doc explicitly **names** (function/export/route/type):
67
68
 
@@ -185,6 +186,8 @@ This is what makes baseline more than a fresh scaffold. Detect old-shape artifac
185
186
  | `docs/architecture/overview.md` | split into `domain-model.md` / `glossary.md` / `non-goals.md` / `references.md` / `open-questions.md` |
186
187
  | `docs/architecture/adr/` (legacy folder name), or `ADR-NNN-*.md` records anywhere under `docs/architecture/` | **rename to the AD genre.** The folder becomes `docs/architecture/decisions/`; each record file `ADR-NNN-{slug}.md` becomes `AD-NNN-{slug}.md`, keeping its number and slug. Inside each record, update the retired vocabulary — "ADR", "Architecture Decision Record", and any supersession framing ("once accepted, an ADR is never edited; a later ADR supersedes it") — to the AD model: one AD per subject, **updated in place**, its journey confined to a `Decision Changelog` tail. A record's **reasoning is never rewritten** by a reconcile; only its genre vocabulary, its own title/id, and paths it cites. The folder's `Readme.md` is an **index, not a record** — reframe its genre description while preserving authored content such as a candidate-decision list verbatim. Repoint live references **inside `docs/`**, including one AD citing another; leave frozen records' links as point-in-time. A live reference **outside** your write scope — most often the root `README.md`, which you never overwrite — cannot be repointed: record it as a backlog item naming the file and line rather than leaving the residue silent |
187
188
  | a legacy `docs/brainstorm/{topic}/`, a singular `docs/history/brainstorm/`, or a root `brainstorm/`/`brainstorming/` folder | move each **active** record to `docs/research/{topic}-brainstorm/` and each **harvested** one to `docs/history/brainstorms/{topic}/` (dropping the suffix); create/refresh both `Readme.md` indexes; delete the emptied folder |
189
+ | `*.bkp.*` files under `docs/` (the installer's first-contact backups of the project's pre-existing files) | **fold the content, then delete the backup.** Classify each backup's content by nature and land it in the current shape — a backed-up changelog's rows into `docs/history/CHANGELOG.md` and per-entry files, a backed-up structure/readme's real claims into the scaffolded truth doc, a backed-up feature doc's content merged into its sibling (or adopted whole if the sibling is a pristine seed). Content is folded, never discarded silently; what cannot be classified goes to the backlog with the backup kept. When the fold lands, delete the `.bkp` file |
190
+ | `*.bkp.*` files at the repo root or in config (`CLAUDE.bkp.md`, `.prettierrc.bkp.json`, …) | **never merge these.** Top-level config is harness-owned by design; list each one to the user as their call, and leave the file in place |
188
191
  | no `harness-version` in `structure.md` | stamp it (Step B4) |
189
192
 
190
193
  ### Step B3 — Present the reconcile plan, then execute
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "harness": "etna",
3
3
  "name": "etna",
4
- "version": "1.4.1",
4
+ "version": "1.4.4",
5
5
  "files": [
6
6
  ".prettierignore",
7
7
  ".prettierrc.json",
8
8
  ".vscode/settings.json"
9
9
  ],
10
10
  "seeds": [],
11
- "digest": "4d6b33a51517"
11
+ "digest": "dca4815bd3d5"
12
12
  }
@@ -12,6 +12,8 @@ Every unit of work leaves one record — `docs/history/changelog/YYYY-MM-DD-{thr
12
12
 
13
13
  An entry is owed only by work that changes promised behavior or takes a design decision; mechanical and cosmetic commits — a typo, a copy tweak, a config value, a log line — take only their `docs/history/CHANGELOG.md` row, no entry file. The failure fields (`Ask:`, `Skills:`, `Pin:`) are required only when non-none.
14
14
 
15
+ Route the lesson by who pays for losing it: product context — what changed and why — belongs in the entry; anything the **next session would re-pay** — a library's API drifted from what the model expects, a validator's quirk, a tooling workaround — goes to `docs/memory/main.md` as well, because a changelog is read by people tracing history and memory is read by every session before it repeats the mistake.
16
+
15
17
  ## Lifecycle
16
18
 
17
19
  Draft (created before its commit exists) → complete (missing fields filled from the diff and the session) → frozen the moment it rides in a commit. **Immutability begins at commit, not at creation** — a draft is meant to be edited, which is what lets a completed plan record its context before anything is committed; a committed entry is history, and a correction is a new entry linking back, **never** an edit.
@@ -73,6 +73,7 @@ The two guarantees are complementary and both break on mixing: a reader holding
73
73
  | Testing strategy | [`templates/testing-strategy.md`](templates/testing-strategy.md) |
74
74
  | Behavioral checklist for one feature (`docs/tests/{feature}.md`) | [`templates/behavioral-checklist.md`](templates/behavioral-checklist.md) — the verification gate's driving script, and the source its suite tests are drawn from |
75
75
  | Recurring procedure/setup | [`templates/operations-procedure.md`](templates/operations-procedure.md) |
76
+ | Cold-start build order (implementation map) | [`templates/implementation-map.md`](templates/implementation-map.md) — authored by the executing session at build start, updated in place as waves complete |
76
77
  | Capture mid-execution knowledge (`docs/history/journal.md`) | [`templates/journal.md`](templates/journal.md) (record — append-only; a row resolves by landing in its owning doc) |
77
78
  | Bookkeeping work queue (`docs/operations/bookkeeping.md`) | [`templates/bookkeeping.md`](templates/bookkeeping.md) — machine-read row grammar; appended by hooks and sessions, drained by the `bookkeeper` agent, walled at Stop and commit |
78
79
  | One-shot migration/upgrade | [`templates/migration-runbook.md`](templates/migration-runbook.md) (record) |
@@ -12,7 +12,7 @@ When creating or updating a feature doc, derive its **`owns:` frontmatter** —
12
12
 
13
13
  ## How to derive the frontmatter
14
14
 
15
- A feature doc's ownership frontmatter is `owns:` (required), `module:` (optional), `keywords:` (required), and `status:` (required). An optional `last-reviewed:` date (stamped whenever the doc is substantively reviewed or updated) gives the `maintenance` agent a staleness signal to rank its audits by — it is tooling metadata, never narrated in the body.
15
+ A feature doc's ownership frontmatter is `owns:` (required), `module:` (optional), `keywords:` (required), and `status:` (required). An optional `last-reviewed:` date (stamped whenever the doc is substantively reviewed or updated) gives the `maintenance` agent a staleness signal to rank its audits by — it is tooling metadata, never narrated in the body. `type:` (required — the genre, enum = the template names) and `rev:` (generator-written generation stamp) are the same class: external tooling reads them, sessions **preserve them on edits** and never narrate or inject them. The `maintenance` agent stamps `type:` on docs that predate the key.
16
16
 
17
17
  **1. `owns:`** (the path scope)
18
18
 
@@ -23,7 +23,7 @@ const RULES = [
23
23
  // Sections inside a truth doc where dated history is sanctioned (the two bridges).
24
24
  const BRIDGE_HEADINGS = /^#{1,4}\s+(decision changelog|health log)\b/i;
25
25
  // Instruction files and generated trees are a different genre — out of this linter's scope.
26
- const SKIP = /(^|\/)(\.claude|node_modules|skills|rules|agents|harness|packages\/[^/]+\/data)\/|(^|\/)(CLAUDE|AGENTS)\.md$/;
26
+ const SKIP = /(^|\/)(\.claude|node_modules|skills|rules|agents|harness|packages\/[^/]+\/data)\/|(^|\/)(CLAUDE|AGENTS)\.md$|\.bkp\./;
27
27
  const RECORD = /(^|\/)docs\/(history|research|memory)\//;
28
28
 
29
29
  // Classify a path: skipped genre, record, or truth.
@@ -89,7 +89,7 @@ function lintFile(path, findings) {
89
89
  const isFolderIndex = /(^|\/)(readme)\.md$/i.test(path);
90
90
  if (scope === 'truth' && !isFolderIndex && /(^|\/)docs\/features\/[^/]+\.md$/.test(path)) {
91
91
  const fm = text.startsWith('---') ? text.slice(0, text.indexOf('\n---', 3)) : '';
92
- for (const key of ['owns:', 'keywords:', 'status:'])
92
+ for (const key of ['owns:', 'keywords:', 'status:', 'type:'])
93
93
  if (!fm.includes(key)) findings.push({ path, n: 1, severity: 'block', id: 'feature-frontmatter', message: `feature doc missing \`${key}\` frontmatter` });
94
94
  }
95
95
  }
@@ -16,6 +16,7 @@ One file per template. Every template is either a **truth document** (states cur
16
16
  | Testing strategy | [testing-strategy.md](testing-strategy.md) | Truth |
17
17
  | Behavioral checklist | [behavioral-checklist.md](behavioral-checklist.md) | Truth |
18
18
  | Operations procedure | [operations-procedure.md](operations-procedure.md) | Truth |
19
+ | Implementation map | [implementation-map.md](implementation-map.md) | Truth |
19
20
  | Bookkeeping ledger | [bookkeeping.md](bookkeeping.md) | Truth (work queue) |
20
21
  | Protected files | [protected-files.md](protected-files.md) | Truth |
21
22
  | Project root README | [root-readme.md](root-readme.md) | Truth |
@@ -16,6 +16,7 @@ Required: **Conventions**, at least one numbered behavior section, **Failure Rep
16
16
  - **Prefer exact literals** — the real prompt text, the real button label, the real count. A vague assertion passes a broken product.
17
17
  - **Assert persistence separately from display.** "It appeared on screen" and "it was written" are two claims; a surface that streams unsaved content satisfies the first while failing the second.
18
18
  - **State each section's trace.** `Pinned:` names the suite test that now guards it, or says `driven only` **with the reason** — an unmarked section is indistinguishable from an unexamined one.
19
+ - **State each section's `AC:` keys.** Where the repo carries a keyed acceptance-criteria source, each section names the keys it proves, so the chain from criterion to checklist to suite test survives the last hop; the gate reports coverage and backlogs uncovered keys. `none — not AC-mapped` is the honest line where no keyed source exists.
19
20
  - **A known-failing assertion stays written as the contract.** A checklist states what the feature promises; the *run* records the failure and the backlog carries the defect. Never soften an assertion to make a run go green.
20
21
 
21
22
  ```
@@ -44,6 +45,7 @@ Each step is an action; each **Assert** is the observable it must produce.
44
45
  - [ ] **Assert**: {the persistence claim, where the behavior writes something}
45
46
 
46
47
  > Pinned: `{tests/path/to/file.test.ts}` — or `driven only — {why no durable test is bought}`
48
+ > AC: {the acceptance-criteria keys this section proves} — or `none — not AC-mapped`
47
49
 
48
50
  ### 2. {The next behavior}
49
51
 
@@ -16,7 +16,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
16
16
  - **Iterations:** {N} · rejected: {what was rejected and why} | none
17
17
  - **Skills:** {skill}@{version} — survived | partially survived | overridden ({why, briefly}) | none used
18
18
  - **Change:** {added/changed X, which does Y, because Z — behavior first, mechanism second. Plan-linked entries also carry the verification gate's results here: rows discharged, suite outcome, anything blocked}
19
- - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} | none
19
+ - **Discovered:** {non-obvious fact learned by running the product — environment quirk, platform ceiling, seam behavior, dependency constraint} [source: {tag}] | none
20
20
  - **Class:** {one or more keywords — suggestive vocabulary, not a closed enum; see Field rules}
21
21
  - **Pin:** {enforced artifact written in this entry's commit: test / token / guardrail / schema} | none — candidate: {what should hold it}
22
22
  ```
@@ -39,7 +39,7 @@ An entry is not a summary line. Its value concentrates in the fields a diff cann
39
39
  - **`surface`** uses the repo's ownership vocabulary — the owning feature doc's topic or an `owns:` path stem — so entries are queryable per surface.
40
40
  - **`Ask` quotes taste verbatim.** The user's preference wording is the one thing no skill can infer and no rebuild recovers; the entry is its durable home.
41
41
  - **`Skills` records efficacy honestly** — survived / partially survived / overridden with a reason. These verdicts are the raw data the `retro` agent aggregates into skill-evolution findings; sanitizing them into success stories destroys the mechanism's value.
42
- - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates.
42
+ - **`Discovered` holds what only running the product teaches.** If it was learned in use, it is recorded the same day — this field feeds the pin candidates. **Each finding carries a `source:` tag from a closed list** — `generator` (a generated doc was wrong) · `generator-conflict` (two generated docs disagreed) · `rules-conflict` (a generated doc contradicted standing rules) · `runtime-discovery` (only running revealed it) · `environment` (tooling or harness). Closed deliberately, unlike `Class:` — the consumer is the doc generator's readback grep, not a human. A finding in a repo with no generated docs is almost always `runtime-discovery` or `environment`.
43
43
  - **`Class` is a suggestive vocabulary, not a closed enum.** Tag with one or more keywords, preferring an existing term over a synonym so the `retro` agent can cluster; coin a new one when nothing fits — a recurring coinage is itself retro signal that the vocabulary (or the doc set) is missing a category. Suggested keywords: `ux` · `ui` · `visual` · `taste` · `layout` · `motion` · `interaction` · `copy` · `a11y` · `responsiveness` · `navigation` · `state` · `structure` · `architecture` · `seam` · `contract` · `schema` · `data` · `content` · `seed` · `performance` · `caching` · `resilience` · `error-handling` · `security` · `auth` · `observability` · `logging` · `testing` · `tooling` · `dependency` · `ops` · `deploy` · `env` · `ci` · `i18n` · `docs`.
44
44
  - **`Pin` closes the loop:** the enforced artifact written in this commit, or the named candidate for the `retro` agent to flag. A taste-verified behavior with `Pin: none` and no candidate is a template smell.
45
45
  - **Out-of-session entries** (the writing session did not do the work): fill what the diff and conversation evidence support; mark the rest `unknown — committed out-of-session`.
@@ -13,6 +13,7 @@ module: billing # optional — single bounded-c
13
13
  keywords: [invoice, pdf] # required — discovery terms
14
14
  status: active # required — active | draft | deprecated
15
15
  last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
16
+ type: feature # required tooling key — genre stamp (generator-written or authored; enum = the template names), read by tooling (UI grouping, protected-file mapping); preserve on edits, never narrate
16
17
  ---
17
18
  ```
18
19
 
@@ -0,0 +1,42 @@
1
+ # Implementation Map (docs/operations/implementation-map.md)
2
+
3
+ Truth document. Use for: **the cold-start execution contract of a project being built from its documented design** — one per repo, at `docs/operations/implementation-map.md`. It is authored by the **executing session at build start**, never generated at design time: build order is derived from the repo's actual feature docs and their stated dependencies, and a design-time prediction of it goes stale the day reality disagrees. It lives in operations because it says *how to proceed*, not *what is true of the design*.
4
+
5
+ ## Writing the map
6
+
7
+ - **Derive waves from the feature docs** — their stated dependencies plus shared foundations (schema before routes, auth before anything it guards). A wave groups features that can build together; the order reflects foundations, not product importance.
8
+ - **A wave's done criterion is observable** — its plans' verification gates passed, the suite green, a named surface driveable. Never "feels complete".
9
+ - **Authority order names this repo's own docs, most specific wins.** A contradiction between documents is repaired in the owning truth doc *before* code — never reinterpreted while planning.
10
+ - **Plans are records, not an execution queue.** The map points at the active wave's dated plan; historical plans are read only when a truth doc cites them as provenance.
11
+ - **Update in place as waves complete** — the map states the current build position in present tense; the journey lives in the plans and changelog entries.
12
+
13
+ ```
14
+ # {Project} implementation map
15
+
16
+ ## Cold-start contract
17
+
18
+ {One paragraph: what a fresh session asked to "build this" is expected to do with this
19
+ repository — plan, gate, implement, verify, in what granularity — and the statement that it
20
+ needs nothing outside the repo.}
21
+
22
+ ## Authority order
23
+
24
+ When documents disagree:
25
+
26
+ 1. {The constitutional docs — guardrails, non-goals, PRD-class documents}
27
+ 2. The most specific feature doc under `docs/features/`
28
+ 3. {The structural truth docs — domain model, storage schema, API contracts}
29
+ 4. The dated plan for the active wave
30
+ 5. Owned source files as implementation evidence
31
+
32
+ ## Waves
33
+
34
+ | Wave | Features | Depends on | Done when |
35
+ | - | - | - | - |
36
+ | 1 | {docs/features/x.md, docs/features/y.md} | — | {observable criterion} |
37
+ | 2 | {…} | 1 | {…} |
38
+
39
+ ## Current position
40
+
41
+ {One line per wave: complete · in progress ([plan](../history/plans/YYYY-MM-DD-slug.md)) · pending.}
42
+ ```