@nurix/etna 0.19.65 → 0.19.66

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 (54) hide show
  1. package/data/harness-index.json +1 -1
  2. package/data/harnesses/apollo/CLAUDE.md +1 -1
  3. package/data/harnesses/apollo/agents/maintenance.md +1 -0
  4. package/data/harnesses/apollo/harness.json +2 -2
  5. package/data/harnesses/apollo/rules/changelog.md +2 -0
  6. package/data/harnesses/apollo/skills/documentation/SKILL.md +1 -0
  7. package/data/harnesses/apollo/skills/documentation/references/frontmatter.md +1 -1
  8. package/data/harnesses/apollo/skills/documentation/scripts/doc-lint.mjs +1 -1
  9. package/data/harnesses/apollo/skills/documentation/templates/Readme.md +1 -0
  10. package/data/harnesses/apollo/skills/documentation/templates/behavioral-checklist.md +2 -0
  11. package/data/harnesses/apollo/skills/documentation/templates/changelog-entry.md +2 -2
  12. package/data/harnesses/apollo/skills/documentation/templates/feature.md +1 -0
  13. package/data/harnesses/apollo/skills/documentation/templates/implementation-map.md +42 -0
  14. package/data/harnesses/apollo/skills/testing/SKILL.md +5 -5
  15. package/data/harnesses/code/CLAUDE.md +1 -1
  16. package/data/harnesses/code/agents/maintenance.md +1 -0
  17. package/data/harnesses/code/harness.json +2 -2
  18. package/data/harnesses/code/hooks/check-completion-integrity.mjs +8 -0
  19. package/data/harnesses/code/hooks/compliance.mjs +138 -27
  20. package/data/harnesses/code/hooks/lib/ledger.mjs +31 -0
  21. package/data/harnesses/code/hooks/lib/session-log.mjs +75 -0
  22. package/data/harnesses/code/rules/changelog.md +2 -0
  23. package/data/harnesses/code/skills/documentation/SKILL.md +1 -0
  24. package/data/harnesses/code/skills/documentation/references/frontmatter.md +1 -1
  25. package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +1 -1
  26. package/data/harnesses/code/skills/documentation/templates/Readme.md +1 -0
  27. package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +2 -0
  28. package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +2 -2
  29. package/data/harnesses/code/skills/documentation/templates/feature.md +1 -0
  30. package/data/harnesses/code/skills/documentation/templates/implementation-map.md +42 -0
  31. package/data/harnesses/code/skills/testing/SKILL.md +5 -5
  32. package/data/harnesses/delivery/agents/maintenance.md +1 -0
  33. package/data/harnesses/delivery/harness.json +2 -2
  34. package/data/harnesses/delivery/rules/changelog.md +2 -0
  35. package/data/harnesses/delivery/skills/documentation/SKILL.md +1 -0
  36. package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +1 -1
  37. package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +1 -1
  38. package/data/harnesses/delivery/skills/documentation/templates/Readme.md +1 -0
  39. package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +2 -0
  40. package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +2 -2
  41. package/data/harnesses/delivery/skills/documentation/templates/feature.md +1 -0
  42. package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +42 -0
  43. package/data/harnesses/etna/agents/maintenance.md +1 -0
  44. package/data/harnesses/etna/harness.json +2 -2
  45. package/data/harnesses/etna/rules/changelog.md +2 -0
  46. package/data/harnesses/etna/skills/documentation/SKILL.md +1 -0
  47. package/data/harnesses/etna/skills/documentation/references/frontmatter.md +1 -1
  48. package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +1 -1
  49. package/data/harnesses/etna/skills/documentation/templates/Readme.md +1 -0
  50. package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +2 -0
  51. package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +2 -2
  52. package/data/harnesses/etna/skills/documentation/templates/feature.md +1 -0
  53. package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +42 -0
  54. package/package.json +2 -2
@@ -0,0 +1,75 @@
1
+ // harness/code/hooks/lib/session-log.mjs — the per-session gate log: a dated record, never drained.
2
+ // Bookkeeping is a queue whose success state is empty; this file is the opposite genre — the
3
+ // session's operational story, kept like memory. Machinery appends `denied` and `hook-crash`
4
+ // events; the session appends `resolved` lines. The walls read PAIRS: a `denied` with no later
5
+ // `resolved` for the same gate·target is an open failure, and silence about it is what the Stop
6
+ // and commit walls refuse. Every line survives forever — the row's afterlife is the failure
7
+ // stream later intelligence reads, so resolution appends rather than deletes.
8
+
9
+ import fs from "node:fs";
10
+ import path from "node:path";
11
+
12
+ const DIR = ["docs", "history", "sessions"];
13
+
14
+ function sid8(sessionId) {
15
+ return String(sessionId || "unknown").replace(/[^a-zA-Z0-9-]/g, "").slice(0, 8) || "unknown";
16
+ }
17
+
18
+ export function sessionLogPath(projectDir, sessionId) {
19
+ const dir = path.join(projectDir, ...DIR);
20
+ const suffix = `-${sid8(sessionId)}.md`;
21
+ try {
22
+ const existing = fs.readdirSync(dir).find((f) => f.endsWith(suffix));
23
+ if (existing) return path.join(dir, existing);
24
+ } catch (e) {
25
+ /* dir absent — first event creates it */
26
+ }
27
+ const date = new Date().toISOString().slice(0, 10);
28
+ return path.join(dir, `${date}${suffix}`);
29
+ }
30
+
31
+ // Append one event line, creating the file (with its header) on first write. Best-effort by
32
+ // design: a log append must never become an outage, so failures return false and are the
33
+ // caller's cue to fall back to .claude/state/hook-failures.log.
34
+ export function appendEvent(projectDir, sessionId, kind, gate, target, detail = "") {
35
+ try {
36
+ const file = sessionLogPath(projectDir, sessionId);
37
+ fs.mkdirSync(path.dirname(file), { recursive: true });
38
+ if (!fs.existsSync(file)) {
39
+ fs.writeFileSync(
40
+ file,
41
+ `# Session gate log · sid=${sessionId || "unknown"}\n\n` +
42
+ "Machinery-written record (a dated record, never edited down — resolutions append). " +
43
+ "Every `denied` line needs a later `resolved` line for the same gate · target — " +
44
+ "`retried-ok`, `waived → {ref}`, or `disclosed → {changelog entry}` — before the " +
45
+ "session ends or commits.\n\n"
46
+ );
47
+ }
48
+ const ts = new Date().toISOString().slice(11, 19);
49
+ const tail = detail ? ` · ${detail}` : "";
50
+ fs.appendFileSync(file, `- ${ts} ${kind} · ${gate} · ${target}${tail}\n`);
51
+ return true;
52
+ } catch (e) {
53
+ return false;
54
+ }
55
+ }
56
+
57
+ // Open failures: gate·target pairs denied with no later `resolved` line. Multiple denials of one
58
+ // pair are one open failure (the retry count stays in the story; the wall asks one question).
59
+ export function unresolvedDenials(projectDir, sessionId) {
60
+ let text = "";
61
+ try {
62
+ text = fs.readFileSync(sessionLogPath(projectDir, sessionId), "utf8");
63
+ } catch (e) {
64
+ return [];
65
+ }
66
+ const open = new Map();
67
+ for (const line of text.split("\n")) {
68
+ const m = /^- \S+ (denied|resolved) · ([^·]+) · ([^·\n]+?)(?: · |$)/.exec(line);
69
+ if (!m) continue;
70
+ const key = `${m[2].trim()} · ${m[3].trim()}`;
71
+ if (m[1] === "denied") open.set(key, true);
72
+ else open.delete(key);
73
+ }
74
+ return [...open.keys()];
75
+ }
@@ -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
 
@@ -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
+ ```
@@ -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.
@@ -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
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "harness": "delivery",
3
3
  "name": "delivery",
4
- "version": "0.2.1",
4
+ "version": "0.2.4",
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": "5384fce602a8"
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
 
@@ -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
+ ```
@@ -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
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "harness": "etna",
3
3
  "name": "etna",
4
- "version": "1.4.1",
4
+ "version": "1.4.3",
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": "1c440d72ea9f"
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
 
@@ -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
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurix/etna",
3
- "version": "0.19.65",
3
+ "version": "0.19.66",
4
4
  "description": "Bootstrap a project with a Nurix harness — copies the harness's CLAUDE.md, skills, agents, rules, and hooks directly into the project from a bundled payload (no marketplace fetch, no network).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,5 +42,5 @@
42
42
  "agent",
43
43
  "plugin"
44
44
  ],
45
- "etnaFingerprint": "b0d947332bf0"
45
+ "etnaFingerprint": "774efa3ae2da"
46
46
  }