@nurix/etna 0.20.34 → 0.20.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/catalog/rules/changelog.md +1 -1
- package/data/harness-index.json +1 -1
- package/data/harnesses/code/CLAUDE.md +4 -4
- package/data/harnesses/code/agents/brainstorm.md +2 -2
- package/data/harnesses/code/agents/lld-mode.md +2 -2
- package/data/harnesses/code/agents/maintenance.md +17 -17
- package/data/harnesses/code/codex/agents/brainstorm.toml +6 -2
- package/data/harnesses/code/codex/agents/lld-mode.toml +2 -2
- package/data/harnesses/code/codex/agents/maintenance.toml +18 -17
- package/data/harnesses/code/docs/README.md +9 -17
- package/data/harnesses/code/docs/history/CHANGELOG.md +19 -18
- package/data/harnesses/code/docs/structure.md +60 -45
- package/data/harnesses/code/harness.json +2 -2
- package/data/harnesses/code/hooks/compliance.mjs +8 -2
- package/data/harnesses/code/hooks/lib/sweep.mjs +3 -2
- package/data/harnesses/code/rules/changelog.md +1 -1
- package/data/harnesses/code/skills/brainstorm/SKILL.md +4 -3
- package/data/harnesses/code/skills/brainstorm/references/harvest.md +1 -2
- package/data/harnesses/code/skills/design/SKILL.md +3 -2
- package/data/harnesses/code/skills/design/references/content.md +1 -1
- package/data/harnesses/code/skills/design/references/existing-apps.md +1 -1
- package/data/harnesses/code/skills/design/references/microcopy.md +126 -0
- package/data/harnesses/code/skills/documentation/SKILL.md +91 -142
- package/data/harnesses/code/skills/documentation/references/examples.md +35 -62
- package/data/harnesses/code/skills/documentation/references/frontmatter.md +7 -7
- package/data/harnesses/code/skills/documentation/references/source-comments.md +19 -0
- package/data/harnesses/code/skills/documentation/references/style-guide.md +21 -7
- package/data/harnesses/code/skills/documentation/references/untemplated.md +7 -6
- package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +178 -38
- package/data/harnesses/code/skills/documentation/templates/Readme.md +68 -41
- package/data/harnesses/code/skills/documentation/templates/acceptance-criteria.md +10 -18
- package/data/harnesses/code/skills/documentation/templates/api-reference.md +7 -2
- package/data/harnesses/code/skills/documentation/templates/architecture-decision.md +5 -5
- package/data/harnesses/code/skills/documentation/templates/backlog.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +9 -16
- package/data/harnesses/code/skills/documentation/templates/bookkeeping.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/changelog-index.md +21 -29
- package/data/harnesses/code/skills/documentation/templates/docs-readme.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/doctrine.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/domain-model.md +9 -4
- package/data/harnesses/code/skills/documentation/templates/environment-registry.md +6 -1
- package/data/harnesses/code/skills/documentation/templates/feature.md +4 -4
- package/data/harnesses/code/skills/documentation/templates/glossary.md +6 -1
- package/data/harnesses/code/skills/documentation/templates/handover.md +16 -16
- package/data/harnesses/code/skills/documentation/templates/implementation-map.md +9 -4
- package/data/harnesses/code/skills/documentation/templates/journal.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/memory-main.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/non-goals.md +7 -2
- package/data/harnesses/code/skills/documentation/templates/operations-procedure.md +6 -1
- package/data/harnesses/code/skills/documentation/templates/package.md +4 -8
- package/data/harnesses/code/skills/documentation/templates/plan.md +5 -11
- package/data/harnesses/code/skills/documentation/templates/protected-files.md +6 -1
- package/data/harnesses/code/skills/documentation/templates/root-readme.md +4 -4
- package/data/harnesses/code/skills/documentation/templates/security-overview.md +8 -3
- package/data/harnesses/code/skills/documentation/templates/setup.md +6 -6
- package/data/harnesses/code/skills/documentation/templates/system-overview.md +11 -6
- package/data/harnesses/code/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/testing-strategy.md +10 -5
- package/data/harnesses/code/skills/documentation/templates/ux-behavior.md +13 -2
- package/data/harnesses/code/skills/testing/SKILL.md +1 -1
- package/data/harnesses/delivery/CLAUDE.md +1 -1
- package/data/harnesses/delivery/agents/brainstorm.md +2 -2
- package/data/harnesses/delivery/agents/lld-mode.md +2 -2
- package/data/harnesses/delivery/agents/maintenance.md +17 -17
- package/data/harnesses/delivery/codex/agents/brainstorm.toml +6 -2
- package/data/harnesses/delivery/codex/agents/lld-mode.toml +2 -2
- package/data/harnesses/delivery/codex/agents/maintenance.toml +18 -17
- package/data/harnesses/delivery/harness.json +2 -2
- package/data/harnesses/delivery/rules/changelog.md +1 -1
- package/data/harnesses/delivery/skills/brainstorm/SKILL.md +4 -3
- package/data/harnesses/delivery/skills/brainstorm/references/harvest.md +1 -2
- package/data/harnesses/delivery/skills/documentation/SKILL.md +91 -142
- package/data/harnesses/delivery/skills/documentation/references/examples.md +35 -62
- package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +7 -7
- package/data/harnesses/delivery/skills/documentation/references/source-comments.md +19 -0
- package/data/harnesses/delivery/skills/documentation/references/style-guide.md +21 -7
- package/data/harnesses/delivery/skills/documentation/references/untemplated.md +7 -6
- package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +178 -38
- package/data/harnesses/delivery/skills/documentation/templates/Readme.md +68 -41
- package/data/harnesses/delivery/skills/documentation/templates/acceptance-criteria.md +10 -18
- package/data/harnesses/delivery/skills/documentation/templates/api-reference.md +7 -2
- package/data/harnesses/delivery/skills/documentation/templates/architecture-decision.md +5 -5
- package/data/harnesses/delivery/skills/documentation/templates/backlog.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +9 -16
- package/data/harnesses/delivery/skills/documentation/templates/bookkeeping.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/changelog-index.md +21 -29
- package/data/harnesses/delivery/skills/documentation/templates/docs-readme.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/doctrine.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/domain-model.md +9 -4
- package/data/harnesses/delivery/skills/documentation/templates/environment-registry.md +6 -1
- package/data/harnesses/delivery/skills/documentation/templates/feature.md +4 -4
- package/data/harnesses/delivery/skills/documentation/templates/glossary.md +6 -1
- package/data/harnesses/delivery/skills/documentation/templates/handover.md +16 -16
- package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +9 -4
- package/data/harnesses/delivery/skills/documentation/templates/journal.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/memory-main.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/non-goals.md +7 -2
- package/data/harnesses/delivery/skills/documentation/templates/operations-procedure.md +6 -1
- package/data/harnesses/delivery/skills/documentation/templates/package.md +4 -8
- package/data/harnesses/delivery/skills/documentation/templates/plan.md +5 -11
- package/data/harnesses/delivery/skills/documentation/templates/protected-files.md +6 -1
- package/data/harnesses/delivery/skills/documentation/templates/root-readme.md +4 -4
- package/data/harnesses/delivery/skills/documentation/templates/security-overview.md +8 -3
- package/data/harnesses/delivery/skills/documentation/templates/setup.md +6 -6
- package/data/harnesses/delivery/skills/documentation/templates/system-overview.md +11 -6
- package/data/harnesses/delivery/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/testing-strategy.md +10 -5
- package/data/harnesses/delivery/skills/documentation/templates/ux-behavior.md +13 -2
- package/data/harnesses/etna/CLAUDE.md +2 -2
- package/data/harnesses/etna/agents/brainstorm.md +2 -2
- package/data/harnesses/etna/agents/lld-mode.md +2 -2
- package/data/harnesses/etna/agents/maintenance.md +17 -17
- package/data/harnesses/etna/codex/agents/brainstorm.toml +6 -2
- package/data/harnesses/etna/codex/agents/lld-mode.toml +2 -2
- package/data/harnesses/etna/codex/agents/maintenance.toml +18 -17
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/rules/changelog.md +1 -1
- package/data/harnesses/etna/skills/brainstorm/SKILL.md +4 -3
- package/data/harnesses/etna/skills/brainstorm/references/harvest.md +1 -2
- package/data/harnesses/etna/skills/documentation/SKILL.md +91 -142
- package/data/harnesses/etna/skills/documentation/references/examples.md +35 -62
- package/data/harnesses/etna/skills/documentation/references/frontmatter.md +7 -7
- package/data/harnesses/etna/skills/documentation/references/source-comments.md +19 -0
- package/data/harnesses/etna/skills/documentation/references/style-guide.md +21 -7
- package/data/harnesses/etna/skills/documentation/references/untemplated.md +7 -6
- package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +178 -38
- package/data/harnesses/etna/skills/documentation/templates/Readme.md +68 -41
- package/data/harnesses/etna/skills/documentation/templates/acceptance-criteria.md +10 -18
- package/data/harnesses/etna/skills/documentation/templates/api-reference.md +7 -2
- package/data/harnesses/etna/skills/documentation/templates/architecture-decision.md +5 -5
- package/data/harnesses/etna/skills/documentation/templates/backlog.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +9 -16
- package/data/harnesses/etna/skills/documentation/templates/bookkeeping.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/changelog-index.md +21 -29
- package/data/harnesses/etna/skills/documentation/templates/docs-readme.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/doctrine.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/domain-model.md +9 -4
- package/data/harnesses/etna/skills/documentation/templates/environment-registry.md +6 -1
- package/data/harnesses/etna/skills/documentation/templates/feature.md +4 -4
- package/data/harnesses/etna/skills/documentation/templates/glossary.md +6 -1
- package/data/harnesses/etna/skills/documentation/templates/handover.md +16 -16
- package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +9 -4
- package/data/harnesses/etna/skills/documentation/templates/journal.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/memory-main.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/non-goals.md +7 -2
- package/data/harnesses/etna/skills/documentation/templates/operations-procedure.md +6 -1
- package/data/harnesses/etna/skills/documentation/templates/package.md +4 -8
- package/data/harnesses/etna/skills/documentation/templates/plan.md +5 -11
- package/data/harnesses/etna/skills/documentation/templates/protected-files.md +6 -1
- package/data/harnesses/etna/skills/documentation/templates/root-readme.md +4 -4
- package/data/harnesses/etna/skills/documentation/templates/security-overview.md +8 -3
- package/data/harnesses/etna/skills/documentation/templates/setup.md +6 -6
- package/data/harnesses/etna/skills/documentation/templates/system-overview.md +11 -6
- package/data/harnesses/etna/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/testing-strategy.md +10 -5
- package/data/harnesses/etna/skills/documentation/templates/ux-behavior.md +13 -2
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
Every unit of work leaves one record — `docs/history/changelog/YYYY-MM-DD-{three-words}.md` (the three words name the work, not the commit)
|
|
3
|
+
Every unit of work leaves one record — `docs/history/changelog/YYYY-MM-DD-{three-words}.md` (the three words name the work, not the commit). `docs/history/CHANGELOG.md` is the folder's guide, never appended to: the entry's own first line is its summary, and listing the folder is the index. Entry format, field rules, and the closed exemption list are the `documentation` skill's `templates/changelog-entry.md`; this rule owns when an entry is owed and how it lives. An entry is never a commit summary — it carries the refinement context only the working session holds, which no diff reconstructs.
|
|
4
4
|
|
|
5
5
|
## When an entry is owed
|
|
6
6
|
|
package/data/harness-index.json
CHANGED
|
@@ -37,7 +37,7 @@ Three peer modes, then a verification gate and a Completion step — enter where
|
|
|
37
37
|
|
|
38
38
|
> **A build graph overrides all of this, and most sessions never see one.** When `.claude/state/graph.json` exists, a walker decides which document is produced next and when the run is finished: a write reconciles it, an injected line names the next node, and the turn cannot end while the graph can still advance. Produce the file the line names. Never edit the graph or its state — both are refused — and never rewrite a node that has already landed. No such file ⇒ nothing in this paragraph is running.
|
|
39
39
|
|
|
40
|
-
> **The lightweight lane:** a change touching one module, **at most ~10 files, none on a contract-heavy surface** (db schema, wire envelopes, auth, events, env/config — the `boundary` skill's list), and under about **three days'** work skips the modes above entirely — the ad-hoc regime of `.claude/rules/testing.md` applies: make the change, drive it, then pin it in the same unit of work if it alters promised behavior, cover it with a changelog
|
|
40
|
+
> **The lightweight lane:** a change touching one module, **at most ~10 files, none on a contract-heavy surface** (db schema, wire envelopes, auth, events, env/config — the `boundary` skill's list), and under about **three days'** work skips the modes above entirely — the ad-hoc regime of `.claude/rules/testing.md` applies: make the change, drive it, then pin it in the same unit of work if it alters promised behavior, cover it with a changelog entry. The predicate is mechanical; when in doubt, the `boundary` diff scan is the tiebreak, not self-assessment.
|
|
41
41
|
|
|
42
42
|
**On Plan Completion:**
|
|
43
43
|
|
|
@@ -80,7 +80,7 @@ The `lld-mode` agent checks for ownership conflicts during LLD research — two
|
|
|
80
80
|
|
|
81
81
|
Boundaries are **diagnosed, not documented** — the `boundary` skill derives them fresh from source on every run (the definition and mechanism catalog live in the skill), so nothing is persisted that could go stale.
|
|
82
82
|
|
|
83
|
-
**Invoke the `boundary` skill while the plan is being written — a plan is not finished until it carries the verdict.** It parses the plan's Proposed Changes, reads the touched source, traces the consumers on the other side, and reports severity-ranked violations with suggested amendments and a pass/block verdict — in chat, read-only except its one write: its own segment of the plan's **`Gates:`** line. That line is machine-read — the compliance hook blocks implementation edits inside the plan's scope
|
|
83
|
+
**Invoke the `boundary` skill while the plan is being written — a plan is not finished until it carries the verdict.** It parses the plan's Proposed Changes, reads the touched source, traces the consumers on the other side, and reports severity-ranked violations with suggested amendments and a pass/block verdict — in chat, read-only except its one write: its own segment of the plan's **`Gates:`** line. That line is machine-read — the compliance hook blocks implementation edits inside the plan's scope until it reads `Boundary: passed`, so a `pending` or `blocked` verdict walls them alike — and this gate is enforced, not ceremony. The session folds the amendments into the plan in the same pass, then writes the segment to `passed`; the plan the user reads already carries it. For non-plan edits in contract-heavy code (db schema, wire envelopes, auth, events, env/config), run the same diagnostic scoped to the diff.
|
|
84
84
|
|
|
85
85
|
### Test obligations — specify before implementing
|
|
86
86
|
|
|
@@ -95,7 +95,7 @@ Boundaries are **diagnosed, not documented** — the `boundary` skill derives th
|
|
|
95
95
|
- **When a document's truth is in question — "is this doc still right?", a feature that drifted from its doc, a folder nobody has audited — the `polygraph` agent is the instrument, and only the user starts it.** It costs one finder per document, so it is never dispatched unasked: name the target, state the price (documents × the pinned tier), and dispatch on the user's yes or on `/polygraph <target>` — one doc, feature, folder, code path, or plan, never the whole tree by reflex. Relay its report and put its open questions to the user; an answer goes back as a further dispatch. Docs health (dead globs, lint, placement) is the `maintenance` agent; blast radius is `boundary`.
|
|
96
96
|
- **Invoke the `documentation` skill when creating a doc, or when an edit changes a doc's structure or claims** — apply its templates and `references/style-guide.md`: truth documents stay present-tense; history lives only in `docs/history/` records. Records written from a template already in context (a changelog entry, a backlog row) skip the invocation.
|
|
97
97
|
- **[override]** Keep `docs/` updated when code changes affect documented behavior. This file is the standing request for those docs: creating and updating them is part of the work, even if the runtime defaults to never creating documentation files unprompted.
|
|
98
|
-
- After plan completion **[override]**: write the `docs/history/changelog/` entry as a **draft** immediately, while the context is fresh — no confirmation needed
|
|
98
|
+
- After plan completion **[override]**: write the `docs/history/changelog/` entry as a **draft** immediately, while the context is fresh — no confirmation needed; the commit fills what the draft left open and freezes it. Non-plan work needs no separate prompt: every non-exempt commit carries its own entry (the `changelog` rule).
|
|
99
99
|
- When moving or renaming source files: the file's path header moves with it and is corrected to its new path; a region glob in a transitional `owns:` follows the region if the region itself moved. A new source file's header names the document that speaks for it — there is no separate map to update.
|
|
100
100
|
- `docs/structure.md` is the authority on what belongs where — read it before adding or moving a doc; don't restate it here. One canonical source per topic — link, don't copy. Only `CLAUDE.md`, `AGENTS.md`, and `README.md` live at the repo root — and the root `README.md` orients and routes (identity, how it works, a Map of units, rules that bite, where to go); install, stack and first run are `docs/operations/setup.md`, the tree is `docs/structure.md`'s.
|
|
101
101
|
|
|
@@ -176,7 +176,7 @@ A file's documentation lives in `docs/`. Its comments carry only what a reader n
|
|
|
176
176
|
- Add a file-path header comment at the top of each source file, in the file's native comment syntax — `// src/modules/example.js - Module for handling user authentication`. Place it below any shebang line; skip formats with no comment syntax (JSON, lockfiles) and generated files. **The path is repo-relative and names the file's own path**: a header a move left behind is worse than no header, because it reads as current.
|
|
177
177
|
- **Two or three present-tense sentences, six lines at the ceiling** — what the file is, the invariant a reader must not break, and where the fuller account lives, as a `docs/…` path.
|
|
178
178
|
- Add a 1-line description above each function whose purpose isn't fully evident from its name and signature: `// Extract JWT token from request based on endpoint type`. **One sentence, third-person indicative** — `Installs the package`, never `Install the package` — and a second sentence only to carry a named invariant. A field, type member, or constant earns a sentence only where its name and type do not already say it; a member of an enum or a constant map earns none. No commented-out code — refactor for clarity instead.
|
|
179
|
-
- **Design rationale, alternatives weighed, history, ticket and decision-record references, and dated notes are not comments.** They belong to the owning feature doc, and moving the claim there is part of the same change — cutting one out of a comment without landing it is a deletion, not a cleanup (the `documentation` skill
|
|
179
|
+
- **Design rationale, alternatives weighed, history, ticket and decision-record references, and dated notes are not comments.** They belong to the owning feature doc, and moving the claim there is part of the same change — cutting one out of a comment without landing it is a deletion, not a cleanup (the `documentation` skill's `references/source-comments.md`).
|
|
180
180
|
- **The ceiling is on what a change adds, not on what it inherits: under a quarter of the lines a change adds are comments.** The measured regression that set this number ran at 28% on new files while the tree it joined sat at 14%, so a whole-file average is the wrong instrument — it grades the density somebody else wrote and passes the prose being added right now. `.claude/skills/documentation/scripts/source-lint.mjs --changed` reports it and the detector raises one row per offending file; a comments-only sweep proves itself with `comment-strip.mjs`, which strips both revisions and diffs what is left, so a code change hiding inside a cleanup cannot pass as one.
|
|
181
181
|
- **The one comment that earns a paragraph is a booby trap** — an edit that looks obviously safe and is not. It names the version or the measurement that makes it true and the condition under which it stops being true, so the next reader can retire it instead of trusting it. Everything else that wants a paragraph wants a doc.
|
|
182
182
|
|
|
@@ -122,8 +122,8 @@ Stop is facilitator-orchestrated because approval belongs to the user; you execu
|
|
|
122
122
|
ledger and thesis. Gaps → record them in the manifest (`Result: fail`, named gaps), and the fixes
|
|
123
123
|
re-enter as a new manifest `Round` requiring fresh approval. Pass → record it.
|
|
124
124
|
4. **Move.** Run `--gate=move`. When clean: delete `ops/` entirely, `git mv` the folder to
|
|
125
|
-
`docs/history/brainstorms/{topic}/`, set state `Status: harvested
|
|
126
|
-
|
|
125
|
+
`docs/history/brainstorms/{topic}/`, set state `Status: harvested` (no index row to move: the folder is
|
|
126
|
+
the record). End your
|
|
127
127
|
report with the offer the facilitator relays: **delete the moved folder, or commit it** — the
|
|
128
128
|
user decides; the design assumes deletion.
|
|
129
129
|
|
|
@@ -21,7 +21,7 @@ Map the documentation landscape — what exists, what is adjacent, how detailed
|
|
|
21
21
|
2. Locate the repo's feature-doc layer from `structure.md` — the standard shape is `./docs/features/`, but a repo may document components under their own subject folders. Read that layer's index if it has one; otherwise glob for docs carrying `owns:` frontmatter
|
|
22
22
|
3. If `./docs/memory/lld-mode.md` exists (or the legacy `./docs/memory/spec-mode.md`), read it for feature doc inventory, ownership conflict zones, and lessons from previous research
|
|
23
23
|
4. Read 1-2 existing feature LLDs from that layer to calibrate format and depth
|
|
24
|
-
5. Consult the **injected ownership index** (the generated `glob → doc · module · objects · status` map
|
|
24
|
+
5. Consult the **injected ownership index** (the generated `glob → doc · module · objects · status` map, built from the transitional `owns:` region globs; a source file's path header names its document directly) to build the ownership map. It is the source of truth for what code paths are already spoken for; a source file's path header names its document directly. If the index isn't present in context, glob the docs tree (excluding `docs/history/`) and read the `owns:` frontmatter of every doc that declares it.
|
|
25
25
|
|
|
26
26
|
## What You Research
|
|
27
27
|
|
|
@@ -46,7 +46,7 @@ Structure your findings as:
|
|
|
46
46
|
- **Invalidated claims**: One row per existing doc this feature makes wrong — doc path, the claim, why it stops being true. This list seeds the plan's **Doc Obligations** ledger, so it is the research finding most likely to survive into an artifact; "none" is a real answer and says the feature is genuinely additive.
|
|
47
47
|
- **Risks or concerns**: Anything the LLD should address or call out
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Write each finding as a bold noun-phrase label and one or two third-person sentences (the `documentation` skill's `references/style-guide.md` § Labels, § Voice); mermaid for a flow worth drawing. Paths, symbols and routes belong in these findings because the author needs them, but these fields are research, not the LLD's sections: the feature doc takes its template's sections and names objects and promises, never the functions listed here.
|
|
50
50
|
|
|
51
51
|
## Rules
|
|
52
52
|
|
|
@@ -63,7 +63,7 @@ Across the header pointers and the transitional globs:
|
|
|
63
63
|
- **Transitional globs:** verify each matches existing files; report globs matching nothing, deleted paths, and orphaned docs. A file-level `owns:` list is reduced to its region globs (remediation, not a question); the files it dropped are reported where their headers name no document.
|
|
64
64
|
- **Retired keys:** `applies:` and `keywords:` are removed wherever found (remediation); a doctrine the removed `applies:` named stays named in the document's Scope section.
|
|
65
65
|
- Flag **equal-specificity overlaps** — two feature docs whose transitional `owns:` globs claim the same paths at the same specificity (an ambiguous owner). `node .claude/hooks/check-ownership.mjs` reports these mechanically alongside dead globs (`overlaps()` in `lib/ownership.mjs`); a glob at strictly higher specificity carving out of a broader `**` is the designed layering and is never flagged. Surface a real overlap as a question — narrowing someone's glob is an author's call, not remediation.
|
|
66
|
-
- **Stamp `type:` where missing.** Every doc carries a `type:` genre key (
|
|
66
|
+
- **Stamp `type:` where missing.** Every doc carries a `type:` genre key (values = the `type:` column of the `documentation` skill's genre registry, `templates/Readme.md`); 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`). Stamping is remediation, not a question; an ambiguous genre is backlogged instead.
|
|
67
67
|
- **Write `description:` where missing.** Every truth document and folder index carries a `description:` of at most 300 characters saying what it settles and where its boundary sits (`documentation` skill, `references/frontmatter.md` § `description:`). Each one is written from a read of the document, never from its filename — many documents ⇒ parallel sub-agents on the cheapest capable tier, one batch each. A folder index that names its files or records is rewritten to describe the folder, after confirming every per-file fact it carried lives in that file.
|
|
68
68
|
|
|
69
69
|
**Then validate the doc→doc edge.** `node .claude/hooks/check-ownership.mjs` and the session-injected **doc edge index** carry `verifies:` and its generated inverse; read the edge index and check two things:
|
|
@@ -101,7 +101,7 @@ Run `git log --since="2 weeks ago" --name-only --pretty=format:"%h %s"` to find
|
|
|
101
101
|
|
|
102
102
|
**Architecture drift.** Grep `docs/architecture/` for file-path references. Verify referenced paths still exist. Remove or update stale references.
|
|
103
103
|
|
|
104
|
-
**Backlog health.** Read `docs/history/backlog.md
|
|
104
|
+
**Backlog health.** Read `docs/history/backlog.md`, a queue whose rows carry no dates. Count pending by priority, and report items that name a path, plan or document that no longer exists — their work landed or their subject left, and the row is the user's to delete.
|
|
105
105
|
|
|
106
106
|
**Brainstorm session census.** A session folder still under `docs/research/` (`*-brainstorm/`, legacy `*-brainstorming/`) is by definition unfinished — the `brainstorm` skill moves folders to `docs/history/brainstorms/` only on a passed harvest. Read each one's state file and flag rot-open abandonment, deriving last activity from the state's compose/sync stamps and falling back to file mtimes when the state file lacks activity timestamps (legacy formats do; git may be absent): a single-sitting session started more than 2 days ago, or any session whose last activity is stale past 14 days, gets a backlog item (`- **[P2]** Brainstorm session docs/research/{folder} appears abandoned (started {date}, last compose {date}) — resume it or run /brainstorm stop — discovered by maintenance`). Where the installed skill ships its detector (v3+), run `node .claude/skills/brainstorm/scripts/detector.mjs <folder>` and include failing rule IDs in the finding. **Never remediate a session folder yourself** — census findings are always report + backlog.
|
|
107
107
|
|
|
@@ -138,31 +138,30 @@ docs/
|
|
|
138
138
|
├── architecture/ # Cross-module design + steering layer
|
|
139
139
|
│ │ # domain-model, glossary, non-goals, references, open-questions
|
|
140
140
|
│ └── decisions/ # Architecture Decisions (ADs — one per subject, updated in place; journey in each AD's Decision Changelog)
|
|
141
|
-
├── features/ # Feature specs —
|
|
142
|
-
│ └── {group}/ # browse-only subfolder for grouping; NEVER a module; may carry a Readme.md
|
|
141
|
+
├── features/ # Feature specs — flat, no subfolders; ownership computed from each doc's `objects:` and the source headers
|
|
143
142
|
├── operations/ # Setup, development, deployment, CI/CD
|
|
144
143
|
│ └── bookkeeping.md # the shared doc-sync work queue (hook-appended, bookkeeper-drained, walled at commit) — author-created, never scaffolded; treat rows as live work, never as drift
|
|
145
|
-
├── research/ # In-progress brainstorm sessions ({topic}-brainstorm/; legacy -brainstorming/) + standing research;
|
|
144
|
+
├── research/ # In-progress brainstorm sessions ({topic}-brainstorm/; legacy -brainstorming/) + standing research; the folder name is the topic
|
|
146
145
|
│ └── {topic}-brainstorm/ # created by the `brainstorm` skill; moves to history/brainstorms/ on a passed harvest
|
|
147
146
|
├── history/
|
|
148
|
-
│ ├── CHANGELOG.md ✱ #
|
|
147
|
+
│ ├── CHANGELOG.md ✱ # The changelog guide — never appended to; listing changelog/ is the index
|
|
149
148
|
│ ├── changelog/ # Individual entries (YYYY-MM-DD-{three-words}.md; written at commit time)
|
|
150
149
|
│ ├── plans/ # Implementation plans (Status field required)
|
|
151
150
|
│ ├── migrations/ # One-shot migration/upgrade runbooks (YYYY-MM-DD-{slug}.md; outcome-stamped then frozen)
|
|
152
|
-
│ ├── journal.md #
|
|
153
|
-
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/) — user decides kept (committed) or deleted;
|
|
151
|
+
│ ├── journal.md # Queue — mid-execution facts, one line each; a row resolves by landing in its owning doc — author-created, never scaffolded
|
|
152
|
+
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/) — user decides kept (committed) or deleted; the folder name is the topic
|
|
154
153
|
│ ├── research/ # Deep-research records ({topic}/ — README.md synthesis + findings.md + sources.md); frozen, cited, owns no code
|
|
155
|
-
│ └── backlog.md ✱ #
|
|
154
|
+
│ └── backlog.md ✱ # Queue — open work by priority (P0-P3); a finished item is deleted
|
|
156
155
|
├── memory/
|
|
157
156
|
│ └── main.md ✱ # plus {agent}.md — project knowledge + per-agent strategy memory
|
|
158
|
-
└── tests/ # Behavioral test checklists ({feature}.md, step → **Assert**),
|
|
157
|
+
└── tests/ # Behavioral test checklists ({feature}.md, step → **Assert**), written at the verification gate before the driving; the gate that drives one maintains it
|
|
159
158
|
```
|
|
160
159
|
|
|
161
160
|
**✱ marks the scaffolded files — the only paths a baseline creates, and the only shape signals.** `docs/structure.md` is not one of them: the installer owns it and rewrites it on every install or refresh, so a missing or hand-edited `structure.md` means the harness needs refreshing (`npx @nurix/etna`), never a scaffold from a template — and its body is never converged, only its `harness-version` field stamped. Every **folder** in this tree is created on first use and is simply absent until it holds a file; git cannot track an empty directory, so a missing folder is never evidence of drift and is never scaffolded to satisfy the shape. Its role is already in `docs/structure.md`; a repo's own notes about legacy folders go in `docs/README.md` § Notes for this repository.
|
|
162
161
|
|
|
163
162
|
There is **no `docs/routing.md`**, **no `docs/modules/{m}/`**, **no `docs/pillars/`**, **no `docs/boundaries/`**. Code ownership is computed from `objects:` and source headers, with a transitional `owns:` region glob; a module is a `module:` label, not a folder; boundaries are diagnosed from source; brainstorm records live in `docs/research/` (active) and `docs/history/brainstorms/` (harvested).
|
|
164
163
|
|
|
165
|
-
> Brainstorm records are **author-created, never scaffolded**; legacy active folders carry the older `-brainstorming/` suffix — treat both spellings as canonical. **Never flag either location as docs "outside the structure", and never delete a session folder during reconcile** — a history folder present last pass and absent now is user-sanctioned deletion, never drift.
|
|
164
|
+
> Brainstorm records are **author-created, never scaffolded**; legacy active folders carry the older `-brainstorming/` suffix — treat both spellings as canonical. **Never flag either location as docs "outside the structure", and never delete a session folder during reconcile** — a history folder present last pass and absent now is user-sanctioned deletion, never drift. No index keeps a row per session: the `brainstorm` skill finds sessions by their folders, so a folder `Readme.md` describes the folder and never needs syncing.
|
|
166
165
|
|
|
167
166
|
### Step B1 — Inventory and classify
|
|
168
167
|
|
|
@@ -176,7 +175,7 @@ Detecting and folding old-shape artifacts is what makes a baseline more than a f
|
|
|
176
175
|
|
|
177
176
|
| If you find (old shape) | Fold to (current shape) |
|
|
178
177
|
| --- | --- |
|
|
179
|
-
| `*.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
|
|
178
|
+
| `*.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 per-entry files (the changelog guide takes no rows), 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 |
|
|
180
179
|
| `*.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 |
|
|
181
180
|
| no `harness-version` in `structure.md` | stamp it (Step B4) |
|
|
182
181
|
| `docs/tests/` checklists carrying **no frontmatter** (the shape before the graph — the genre was exempt) | **backfill `type: checklist` + `verifies:`.** Mechanical where a same-named feature or UX doc exists; where the name does not match, list the checklist to the user with your best candidate and let them confirm. This is the row that upgrades a repo from a tree of files to a graph — without it every checklist in an older repo stays unreachable, and nothing detects that |
|
|
@@ -188,14 +187,15 @@ Detecting and folding old-shape artifacts is what makes a baseline more than a f
|
|
|
188
187
|
|
|
189
188
|
B2 folds artifacts whose **shape dissolved** — a file in the wrong place or the wrong genre. This step handles the other axis, and it is the one that silently rots a repo that otherwise looks current: a document in the **right folder with the right name** whose *internal* schema is behind. A changelog entry missing three of its seven required fields, a checklist with no `verifies:` edge, a feature doc predating `applies:`, an AD on the old key vocabulary — none of these move a folder, so nothing structural detects them, and a repo can pass every scaffold check while no document in it matches the installed harness.
|
|
190
189
|
|
|
191
|
-
**Read the schema from the `documentation` skill's templates, never from memory.** The
|
|
190
|
+
**Read the schema from the `documentation` skill's genre registry and templates, never from memory.** The registry (`templates/Readme.md`) is the contract for each genre's nature, `type:`, location, required keys and required sections, and the template for everything else; your recollection of either is a version of unknown age. Run `doc-lint` over the tree for the mechanical half — its `required-key`, `section-missing` and `type-unknown` findings are this step's worklist.
|
|
192
191
|
|
|
193
|
-
**The
|
|
192
|
+
**The three natures split the treatment, and the split is absolute.**
|
|
194
193
|
|
|
195
194
|
| Nature | Genres | Treatment |
|
|
196
195
|
| --- | --- | --- |
|
|
197
196
|
| **Truth document** | features, ux, architecture, operations, `docs/tests/` checklists, READMEs (never `structure.md`, which the installer owns) | **Converge in place.** These state what is true now, so rewriting them to the current schema is not revision, it is the genre working as designed. Add missing frontmatter keys, add missing required sections, rename keys the template renamed |
|
|
198
|
-
| **Record** | plans, changelog entries, migration runbooks, brainstorm records | **Never rewritten.** A completed plan and a committed entry are frozen — immutability begins at commit, and a record edited to match a newer schema stops being evidence of what happened. Report non-conformance
|
|
197
|
+
| **Record** | plans, changelog entries, migration runbooks, brainstorm records | **Never rewritten.** A completed plan and a committed entry are frozen — immutability begins at commit, and a record edited to match a newer schema stops being evidence of what happened. Report non-conformance and leave the record alone |
|
|
198
|
+
| **Queue** | backlog, journal, bookkeeping, memory | **Rows are never rewritten to a schema.** A queue changes only by appending a row and deleting a resolved one; converge its header and frontmatter, and leave each row as its writer wrote it |
|
|
199
199
|
|
|
200
200
|
**Never invent content to satisfy a field.** A frozen changelog entry missing `Skills:` is missing the *judgement* that field carries, and no later session holds it — writing one is fabrication wearing a schema's clothes. Report it, backlog the pattern if it recurs, and leave the entry alone. The same restraint applies to a truth document: a genre's new section that needs knowledge the repo does not contain is raised as a question, not filled with plausible prose.
|
|
201
201
|
|
|
@@ -205,7 +205,7 @@ B2 folds artifacts whose **shape dissolved** — a file in the wrong place or th
|
|
|
205
205
|
|
|
206
206
|
Table: `| File | Action | From | To | Reason |` (actions: `Move`, `Merge into {target}`, `Delete`, `Keep`, `Create`, `Fold`). For a fresh baseline this is mostly `Create`; for an upgrade it is mostly `Fold`/`Move`. Ask once: **"Approve this reconcile?"** — you own this interaction (the `documentation` skill is a library and has none).
|
|
207
207
|
|
|
208
|
-
On approval, execute: create the folder structure; move/fold/merge/delete per the plan; apply B2b's schema convergences to the truth documents (records are reported, never rewritten); add `Status:` to plan files; for each feature doc, derive and write its `owns:`
|
|
208
|
+
On approval, execute: create the folder structure; move/fold/merge/delete per the plan; apply B2b's schema convergences to the truth documents (records are reported, never rewritten); add `Status:` to plan files; for each feature doc, derive and write its transitional `owns:` region glob (+ `module:` label + `objects:`) from the source it describes, and each checklist's `verifies:` edge, following the `documentation` skill's `references/frontmatter.md`; merge scattered backlogs into `docs/history/backlog.md`; fix links broken by moves.
|
|
209
209
|
|
|
210
210
|
Scaffold missing mandated files **by calling the `documentation` skill for each template** — you orchestrate, the skill supplies templates: `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/main.md`, `docs/operations/setup.md` (when the repo has a lockfile and a runnable root script; **never a second first-run doc** — propose a rename with a `note:` row if one exists under another name), and the repo-root `README.md` (an outward opening in a user's terms from the charter and vision documents, then orientation and routing filled from the manifests, the ownership index and the root scripts — **never overwrite an existing root README**).
|
|
211
211
|
|
|
@@ -239,7 +239,7 @@ Apply the **§ Strategy memory** retirement procedure to `docs/memory/maintenanc
|
|
|
239
239
|
- **Enforce the memory cap on every run** (§ Strategy memory) — you are its only writer, so no one else can do it.
|
|
240
240
|
- **A clean report is valid** — do not invent issues.
|
|
241
241
|
- **Declarative, idempotent.** Re-running baseline mode on a current repo reshapes nothing — a second pass is just the audit plus the module proposal. Converge to the current shape; never replay a version ladder; never reconstruct a past shape.
|
|
242
|
-
- **Brownfield extraction
|
|
242
|
+
- **Brownfield extraction.** When baseline mode meets a repo with a real source tree and few or no feature docs, the module *proposal* is not enough — run the extraction pass: produce feature docs for the recognized modules (`docs/features/`, the feature row of the genre registry: `type: feature` · `description:` · `status:` · `objects:` · `module:` · a transitional `owns:` region glob), plus the architecture, tests, and operations layers. Use the `nustack-graph` skill where installed — localize through the index before reading; the docs record intent, the index answers facts. **Contributors, churn and bus-factor are run-report findings, never document sections**: a dated "as of" section is history in a truth document, and `doc-lint` blocks it. Put them in the run report and, where one needs action, a backlog row. `status:` is evidence-graded: `deprecated` only when history shows the area dead, never by guess. Scale by fan-out (one extraction lane per module, a completeness critic over the result) rather than one long cold read.
|
|
243
243
|
- **Diagrams ride the baseline (operator-ruled 2026-08-24).** Whenever baseline mode produces or converges the architecture layer, draw two ASCII diagrams from the real source, each in its own fenced code block: (1) an **architecture diagram** in the system-design/architecture doc — the actual processes, entry points, and wire surfaces as boxes, the calls/queues/files between them as labelled arrows; (2) a **DB ER diagram** wherever the repo declares a relational schema (DDL, migrations, an ORM schema) — one box per table listing its key columns, FK edges drawn to the table they reference, cardinality on the edge; it lands in the domain-model doc, or `docs/architecture/data-model.md` when none exists. Box-drawing characters (`┌─┐│└┘├┤`), width ≤ 100 columns. Derived only from what the code declares — a diagram never invents a component the source does not show, and a repo with no relational schema gets **no** ER diagram rather than an imagined one. Diagrams are truth-document sections: later baselines and audits converge them in place like any other section.
|
|
244
244
|
- **Tool tiers.** The SessionStart context names each manifest-declared tool with its tier; calibrate the run to it, never stall on it. **Present-fresh** (`Tool: nustack 0.9.0`): use it — localize every question through `nustack graph` before reading source, and never run an index step first: the family re-indexes a stale store before it answers, so the only freshness decision left is the deliberate `--no-refresh`. **Present-stale** (below the catalog minimum): still use it, but note the version gap and the upgrade command in the run report — a stale contract may lack answer shapes the skill assumes. **Absent** (`Tool: nustack MISSING`): fall back to the cold method (Glob/Grep/read), state in the run report that the tool was absent and give the install command — degraded output is acceptable, silent degradation is not.
|
|
245
245
|
- **One sentinel.** `docs/structure.md` `harness-version` is the only baseline/version marker.
|
|
@@ -19,6 +19,10 @@ run at the start of every dispatch and again before you return:
|
|
|
19
19
|
node <skill>/scripts/detector.mjs <session-folder> [--gate=manifest|move] [--json]
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
A real run always prints per-rule lines and a `clean`/`failing` summary (or a usage/error
|
|
23
|
+
message). **Empty output is not a clean run — it means the detector never executed**; treat it
|
|
24
|
+
as a failed gate and report it, never as a pass.
|
|
25
|
+
|
|
22
26
|
## The write protocol you enforce
|
|
23
27
|
|
|
24
28
|
One writer per file. You write `state.md`, `thesis.md`, `forks.md`, `ledger.md`, `fragments/`,
|
|
@@ -116,8 +120,8 @@ Stop is facilitator-orchestrated because approval belongs to the user; you execu
|
|
|
116
120
|
ledger and thesis. Gaps → record them in the manifest (`Result: fail`, named gaps), and the fixes
|
|
117
121
|
re-enter as a new manifest `Round` requiring fresh approval. Pass → record it.
|
|
118
122
|
4. **Move.** Run `--gate=move`. When clean: delete `ops/` entirely, `git mv` the folder to
|
|
119
|
-
`docs/history/brainstorms/{topic}/`, set state `Status: harvested
|
|
120
|
-
|
|
123
|
+
`docs/history/brainstorms/{topic}/`, set state `Status: harvested` (no index row to move: the folder is
|
|
124
|
+
the record). End your
|
|
121
125
|
report with the offer the facilitator relays: **delete the moved folder, or commit it** — the
|
|
122
126
|
user decides; the design assumes deletion.
|
|
123
127
|
|
|
@@ -17,7 +17,7 @@ Map the documentation landscape — what exists, what is adjacent, how detailed
|
|
|
17
17
|
2. Locate the repo's feature-doc layer from `structure.md` — the standard shape is `./docs/features/`, but a repo may document components under their own subject folders. Read that layer's index if it has one; otherwise glob for docs carrying `owns:` frontmatter
|
|
18
18
|
3. If `./docs/memory/lld-mode.md` exists (or the legacy `./docs/memory/spec-mode.md`), read it for feature doc inventory, ownership conflict zones, and lessons from previous research
|
|
19
19
|
4. Read 1-2 existing feature LLDs from that layer to calibrate format and depth
|
|
20
|
-
5. Consult the **injected ownership index** (the generated `glob → doc · module · objects · status` map
|
|
20
|
+
5. Consult the **injected ownership index** (the generated `glob → doc · module · objects · status` map, built from the transitional `owns:` region globs; a source file's path header names its document directly) to build the ownership map. It is the source of truth for what code paths are already spoken for; a source file's path header names its document directly. If the index isn't present in context, glob the docs tree (excluding `docs/history/`) and read the `owns:` frontmatter of every doc that declares it.
|
|
21
21
|
|
|
22
22
|
## What You Research
|
|
23
23
|
|
|
@@ -42,7 +42,7 @@ Structure your findings as:
|
|
|
42
42
|
- **Invalidated claims**: One row per existing doc this feature makes wrong — doc path, the claim, why it stops being true. This list seeds the plan's **Doc Obligations** ledger, so it is the research finding most likely to survive into an artifact; "none" is a real answer and says the feature is genuinely additive.
|
|
43
43
|
- **Risks or concerns**: Anything the LLD should address or call out
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Write each finding as a bold noun-phrase label and one or two third-person sentences (the `documentation` skill's `references/style-guide.md` § Labels, § Voice); mermaid for a flow worth drawing. Paths, symbols and routes belong in these findings because the author needs them, but these fields are research, not the LLD's sections: the feature doc takes its template's sections and names objects and promises, never the functions listed here.
|
|
46
46
|
|
|
47
47
|
## Rules
|
|
48
48
|
|
|
@@ -61,7 +61,8 @@ Across the header pointers and the transitional globs:
|
|
|
61
61
|
- **Transitional globs:** verify each matches existing files; report globs matching nothing, deleted paths, and orphaned docs. A file-level `owns:` list is reduced to its region globs (remediation, not a question); the files it dropped are reported where their headers name no document.
|
|
62
62
|
- **Retired keys:** `applies:` and `keywords:` are removed wherever found (remediation); a doctrine the removed `applies:` named stays named in the document's Scope section.
|
|
63
63
|
- Flag **equal-specificity overlaps** — two feature docs whose transitional `owns:` globs claim the same paths at the same specificity (an ambiguous owner). `node .claude/hooks/check-ownership.mjs` reports these mechanically alongside dead globs (`overlaps()` in `lib/ownership.mjs`); a glob at strictly higher specificity carving out of a broader `**` is the designed layering and is never flagged. Surface a real overlap as a question — narrowing someone's glob is an author's call, not remediation.
|
|
64
|
-
- **Stamp `type:` where missing.** Every doc carries a `type:` genre key (
|
|
64
|
+
- **Stamp `type:` where missing.** Every doc carries a `type:` genre key (values = the `type:` column of the `documentation` skill's genre registry, `templates/Readme.md`); 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`). Stamping is remediation, not a question; an ambiguous genre is backlogged instead.
|
|
65
|
+
- **Write `description:` where missing.** Every truth document and folder index carries a `description:` of at most 300 characters saying what it settles and where its boundary sits (`documentation` skill, `references/frontmatter.md` § `description:`). Each one is written from a read of the document, never from its filename — many documents ⇒ parallel sub-agents on the cheapest capable tier, one batch each. A folder index that names its files or records is rewritten to describe the folder, after confirming every per-file fact it carried lives in that file.
|
|
65
66
|
|
|
66
67
|
**Then validate the doc→doc edge.** `node .claude/hooks/check-ownership.mjs` and the session-injected **doc edge index** carry `verifies:` and its generated inverse; read the edge index and check two things:
|
|
67
68
|
|
|
@@ -98,7 +99,7 @@ Run `git log --since="2 weeks ago" --name-only --pretty=format:"%h %s"` to find
|
|
|
98
99
|
|
|
99
100
|
**Architecture drift.** Grep `docs/architecture/` for file-path references. Verify referenced paths still exist. Remove or update stale references.
|
|
100
101
|
|
|
101
|
-
**Backlog health.** Read `docs/history/backlog.md
|
|
102
|
+
**Backlog health.** Read `docs/history/backlog.md`, a queue whose rows carry no dates. Count pending by priority, and report items that name a path, plan or document that no longer exists — their work landed or their subject left, and the row is the user's to delete.
|
|
102
103
|
|
|
103
104
|
**Brainstorm session census.** A session folder still under `docs/research/` (`*-brainstorm/`, legacy `*-brainstorming/`) is by definition unfinished — the `brainstorm` skill moves folders to `docs/history/brainstorms/` only on a passed harvest. Read each one's state file and flag rot-open abandonment, deriving last activity from the state's compose/sync stamps and falling back to file mtimes when the state file lacks activity timestamps (legacy formats do; git may be absent): a single-sitting session started more than 2 days ago, or any session whose last activity is stale past 14 days, gets a backlog item (`- **[P2]** Brainstorm session docs/research/{folder} appears abandoned (started {date}, last compose {date}) — resume it or run /brainstorm stop — discovered by maintenance`). Where the installed skill ships its detector (v3+), run `node .claude/skills/brainstorm/scripts/detector.mjs <folder>` and include failing rule IDs in the finding. **Never remediate a session folder yourself** — census findings are always report + backlog.
|
|
104
105
|
|
|
@@ -135,31 +136,30 @@ docs/
|
|
|
135
136
|
├── architecture/ # Cross-module design + steering layer
|
|
136
137
|
│ │ # domain-model, glossary, non-goals, references, open-questions
|
|
137
138
|
│ └── decisions/ # Architecture Decisions (ADs — one per subject, updated in place; journey in each AD's Decision Changelog)
|
|
138
|
-
├── features/ # Feature specs —
|
|
139
|
-
│ └── {group}/ # browse-only subfolder for grouping; NEVER a module; may carry a Readme.md
|
|
139
|
+
├── features/ # Feature specs — flat, no subfolders; ownership computed from each doc's `objects:` and the source headers
|
|
140
140
|
├── operations/ # Setup, development, deployment, CI/CD
|
|
141
141
|
│ └── bookkeeping.md # the shared doc-sync work queue (hook-appended, bookkeeper-drained, walled at commit) — author-created, never scaffolded; treat rows as live work, never as drift
|
|
142
|
-
├── research/ # In-progress brainstorm sessions ({topic}-brainstorm/; legacy -brainstorming/) + standing research;
|
|
142
|
+
├── research/ # In-progress brainstorm sessions ({topic}-brainstorm/; legacy -brainstorming/) + standing research; the folder name is the topic
|
|
143
143
|
│ └── {topic}-brainstorm/ # created by the `brainstorm` skill; moves to history/brainstorms/ on a passed harvest
|
|
144
144
|
├── history/
|
|
145
|
-
│ ├── CHANGELOG.md ✱ #
|
|
145
|
+
│ ├── CHANGELOG.md ✱ # The changelog guide — never appended to; listing changelog/ is the index
|
|
146
146
|
│ ├── changelog/ # Individual entries (YYYY-MM-DD-{three-words}.md; written at commit time)
|
|
147
147
|
│ ├── plans/ # Implementation plans (Status field required)
|
|
148
148
|
│ ├── migrations/ # One-shot migration/upgrade runbooks (YYYY-MM-DD-{slug}.md; outcome-stamped then frozen)
|
|
149
|
-
│ ├── journal.md #
|
|
150
|
-
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/) — user decides kept (committed) or deleted;
|
|
149
|
+
│ ├── journal.md # Queue — mid-execution facts, one line each; a row resolves by landing in its owning doc — author-created, never scaffolded
|
|
150
|
+
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/) — user decides kept (committed) or deleted; the folder name is the topic
|
|
151
151
|
│ ├── research/ # Deep-research records ({topic}/ — README.md synthesis + findings.md + sources.md); frozen, cited, owns no code
|
|
152
|
-
│ └── backlog.md ✱ #
|
|
152
|
+
│ └── backlog.md ✱ # Queue — open work by priority (P0-P3); a finished item is deleted
|
|
153
153
|
├── memory/
|
|
154
154
|
│ └── main.md ✱ # plus {agent}.md — project knowledge + per-agent strategy memory
|
|
155
|
-
└── tests/ # Behavioral test checklists ({feature}.md, step → **Assert**),
|
|
155
|
+
└── tests/ # Behavioral test checklists ({feature}.md, step → **Assert**), written at the verification gate before the driving; the gate that drives one maintains it
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
**✱ marks the scaffolded files — the only paths a baseline creates, and the only shape signals.** `docs/structure.md` is not one of them: the installer owns it and rewrites it on every install or refresh, so a missing or hand-edited `structure.md` means the harness needs refreshing (`npx @nurix/etna`), never a scaffold from a template — and its body is never converged, only its `harness-version` field stamped. Every **folder** in this tree is created on first use and is simply absent until it holds a file; git cannot track an empty directory, so a missing folder is never evidence of drift and is never scaffolded to satisfy the shape. Its role is already in `docs/structure.md`; a repo's own notes about legacy folders go in `docs/README.md` § Notes for this repository.
|
|
159
159
|
|
|
160
160
|
There is **no `docs/routing.md`**, **no `docs/modules/{m}/`**, **no `docs/pillars/`**, **no `docs/boundaries/`**. Code ownership is computed from `objects:` and source headers, with a transitional `owns:` region glob; a module is a `module:` label, not a folder; boundaries are diagnosed from source; brainstorm records live in `docs/research/` (active) and `docs/history/brainstorms/` (harvested).
|
|
161
161
|
|
|
162
|
-
> Brainstorm records are **author-created, never scaffolded**; legacy active folders carry the older `-brainstorming/` suffix — treat both spellings as canonical. **Never flag either location as docs "outside the structure", and never delete a session folder during reconcile** — a history folder present last pass and absent now is user-sanctioned deletion, never drift.
|
|
162
|
+
> Brainstorm records are **author-created, never scaffolded**; legacy active folders carry the older `-brainstorming/` suffix — treat both spellings as canonical. **Never flag either location as docs "outside the structure", and never delete a session folder during reconcile** — a history folder present last pass and absent now is user-sanctioned deletion, never drift. No index keeps a row per session: the `brainstorm` skill finds sessions by their folders, so a folder `Readme.md` describes the folder and never needs syncing.
|
|
163
163
|
|
|
164
164
|
### Step B1 — Inventory and classify
|
|
165
165
|
|
|
@@ -173,7 +173,7 @@ Detecting and folding old-shape artifacts is what makes a baseline more than a f
|
|
|
173
173
|
|
|
174
174
|
| If you find (old shape) | Fold to (current shape) |
|
|
175
175
|
| --- | --- |
|
|
176
|
-
| `*.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
|
|
176
|
+
| `*.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 per-entry files (the changelog guide takes no rows), 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 |
|
|
177
177
|
| `*.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 |
|
|
178
178
|
| no `harness-version` in `structure.md` | stamp it (Step B4) |
|
|
179
179
|
| `docs/tests/` checklists carrying **no frontmatter** (the shape before the graph — the genre was exempt) | **backfill `type: checklist` + `verifies:`.** Mechanical where a same-named feature or UX doc exists; where the name does not match, list the checklist to the user with your best candidate and let them confirm. This is the row that upgrades a repo from a tree of files to a graph — without it every checklist in an older repo stays unreachable, and nothing detects that |
|
|
@@ -185,14 +185,15 @@ Detecting and folding old-shape artifacts is what makes a baseline more than a f
|
|
|
185
185
|
|
|
186
186
|
B2 folds artifacts whose **shape dissolved** — a file in the wrong place or the wrong genre. This step handles the other axis, and it is the one that silently rots a repo that otherwise looks current: a document in the **right folder with the right name** whose *internal* schema is behind. A changelog entry missing three of its seven required fields, a checklist with no `verifies:` edge, a feature doc predating `applies:`, an AD on the old key vocabulary — none of these move a folder, so nothing structural detects them, and a repo can pass every scaffold check while no document in it matches the installed harness.
|
|
187
187
|
|
|
188
|
-
**Read the schema from the `documentation` skill's templates, never from memory.** The
|
|
188
|
+
**Read the schema from the `documentation` skill's genre registry and templates, never from memory.** The registry (`templates/Readme.md`) is the contract for each genre's nature, `type:`, location, required keys and required sections, and the template for everything else; your recollection of either is a version of unknown age. Run `doc-lint` over the tree for the mechanical half — its `required-key`, `section-missing` and `type-unknown` findings are this step's worklist.
|
|
189
189
|
|
|
190
|
-
**The
|
|
190
|
+
**The three natures split the treatment, and the split is absolute.**
|
|
191
191
|
|
|
192
192
|
| Nature | Genres | Treatment |
|
|
193
193
|
| --- | --- | --- |
|
|
194
194
|
| **Truth document** | features, ux, architecture, operations, `docs/tests/` checklists, READMEs (never `structure.md`, which the installer owns) | **Converge in place.** These state what is true now, so rewriting them to the current schema is not revision, it is the genre working as designed. Add missing frontmatter keys, add missing required sections, rename keys the template renamed |
|
|
195
|
-
| **Record** | plans, changelog entries, migration runbooks, brainstorm records | **Never rewritten.** A completed plan and a committed entry are frozen — immutability begins at commit, and a record edited to match a newer schema stops being evidence of what happened. Report non-conformance
|
|
195
|
+
| **Record** | plans, changelog entries, migration runbooks, brainstorm records | **Never rewritten.** A completed plan and a committed entry are frozen — immutability begins at commit, and a record edited to match a newer schema stops being evidence of what happened. Report non-conformance and leave the record alone |
|
|
196
|
+
| **Queue** | backlog, journal, bookkeeping, memory | **Rows are never rewritten to a schema.** A queue changes only by appending a row and deleting a resolved one; converge its header and frontmatter, and leave each row as its writer wrote it |
|
|
196
197
|
|
|
197
198
|
**Never invent content to satisfy a field.** A frozen changelog entry missing `Skills:` is missing the *judgement* that field carries, and no later session holds it — writing one is fabrication wearing a schema's clothes. Report it, backlog the pattern if it recurs, and leave the entry alone. The same restraint applies to a truth document: a genre's new section that needs knowledge the repo does not contain is raised as a question, not filled with plausible prose.
|
|
198
199
|
|
|
@@ -202,7 +203,7 @@ B2 folds artifacts whose **shape dissolved** — a file in the wrong place or th
|
|
|
202
203
|
|
|
203
204
|
Table: `| File | Action | From | To | Reason |` (actions: `Move`, `Merge into {target}`, `Delete`, `Keep`, `Create`, `Fold`). For a fresh baseline this is mostly `Create`; for an upgrade it is mostly `Fold`/`Move`. Ask once: **"Approve this reconcile?"** — you own this interaction (the `documentation` skill is a library and has none).
|
|
204
205
|
|
|
205
|
-
On approval, execute: create the folder structure; move/fold/merge/delete per the plan; apply B2b's schema convergences to the truth documents (records are reported, never rewritten); add `Status:` to plan files; for each feature doc, derive and write its `owns:`
|
|
206
|
+
On approval, execute: create the folder structure; move/fold/merge/delete per the plan; apply B2b's schema convergences to the truth documents (records are reported, never rewritten); add `Status:` to plan files; for each feature doc, derive and write its transitional `owns:` region glob (+ `module:` label + `objects:`) from the source it describes, and each checklist's `verifies:` edge, following the `documentation` skill's `references/frontmatter.md`; merge scattered backlogs into `docs/history/backlog.md`; fix links broken by moves.
|
|
206
207
|
|
|
207
208
|
Scaffold missing mandated files **by calling the `documentation` skill for each template** — you orchestrate, the skill supplies templates: `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/main.md`, `docs/operations/setup.md` (when the repo has a lockfile and a runnable root script; **never a second first-run doc** — propose a rename with a `note:` row if one exists under another name), and the repo-root `README.md` (an outward opening in a user's terms from the charter and vision documents, then orientation and routing filled from the manifests, the ownership index and the root scripts — **never overwrite an existing root README**).
|
|
208
209
|
|
|
@@ -236,7 +237,7 @@ Apply the **§ Strategy memory** retirement procedure to `docs/memory/maintenanc
|
|
|
236
237
|
- **Enforce the memory cap on every run** (§ Strategy memory) — you are its only writer, so no one else can do it.
|
|
237
238
|
- **A clean report is valid** — do not invent issues.
|
|
238
239
|
- **Declarative, idempotent.** Re-running baseline mode on a current repo reshapes nothing — a second pass is just the audit plus the module proposal. Converge to the current shape; never replay a version ladder; never reconstruct a past shape.
|
|
239
|
-
- **Brownfield extraction
|
|
240
|
+
- **Brownfield extraction.** When baseline mode meets a repo with a real source tree and few or no feature docs, the module *proposal* is not enough — run the extraction pass: produce feature docs for the recognized modules (`docs/features/`, the feature row of the genre registry: `type: feature` · `description:` · `status:` · `objects:` · `module:` · a transitional `owns:` region glob), plus the architecture, tests, and operations layers. Use the `nustack-graph` skill where installed — localize through the index before reading; the docs record intent, the index answers facts. **Contributors, churn and bus-factor are run-report findings, never document sections**: a dated "as of" section is history in a truth document, and `doc-lint` blocks it. Put them in the run report and, where one needs action, a backlog row. `status:` is evidence-graded: `deprecated` only when history shows the area dead, never by guess. Scale by fan-out (one extraction lane per module, a completeness critic over the result) rather than one long cold read.
|
|
240
241
|
- **Diagrams ride the baseline (operator-ruled 2026-08-24).** Whenever baseline mode produces or converges the architecture layer, draw two ASCII diagrams from the real source, each in its own fenced code block: (1) an **architecture diagram** in the system-design/architecture doc — the actual processes, entry points, and wire surfaces as boxes, the calls/queues/files between them as labelled arrows; (2) a **DB ER diagram** wherever the repo declares a relational schema (DDL, migrations, an ORM schema) — one box per table listing its key columns, FK edges drawn to the table they reference, cardinality on the edge; it lands in the domain-model doc, or `docs/architecture/data-model.md` when none exists. Box-drawing characters (`┌─┐│└┘├┤`), width ≤ 100 columns. Derived only from what the code declares — a diagram never invents a component the source does not show, and a repo with no relational schema gets **no** ER diagram rather than an imagined one. Diagrams are truth-document sections: later baselines and audits converge them in place like any other section.
|
|
241
242
|
- **Tool tiers.** The SessionStart context names each manifest-declared tool with its tier; calibrate the run to it, never stall on it. **Present-fresh** (`Tool: nustack 0.9.0`): use it — localize every question through `nustack graph` before reading source, and never run an index step first: the family re-indexes a stale store before it answers, so the only freshness decision left is the deliberate `--no-refresh`. **Present-stale** (below the catalog minimum): still use it, but note the version gap and the upgrade command in the run report — a stale contract may lack answer shapes the skill assumes. **Absent** (`Tool: nustack MISSING`): fall back to the cold method (Glob/Grep/read), state in the run report that the tool was absent and give the install command — degraded output is acceptable, silent degradation is not.
|
|
242
243
|
- **One sentinel.** `docs/structure.md` `harness-version` is the only baseline/version marker.
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
> For documentation organization, authority map, and folder rules, see **[structure.md](structure.md)**.
|
|
6
|
-
|
|
1
|
+
---
|
|
2
|
+
type: docs-readme
|
|
3
|
+
description: "The documentation tree: what each folder under docs/ holds, who reads it and how its files are named. structure.md is the placement authority."
|
|
7
4
|
---
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
| Document | Description |
|
|
12
|
-
| ------------------------- | ----------------------------------- |
|
|
13
|
-
| [Structure](structure.md) | Documentation entry point and rules |
|
|
6
|
+
# Project Documentation
|
|
14
7
|
|
|
15
|
-
|
|
8
|
+
**Goal:** where to look in `docs/`, folder by folder. Placement rules and the full folder map are [structure.md](structure.md).
|
|
16
9
|
|
|
17
10
|
## History
|
|
18
11
|
|
|
19
|
-
|
|
12
|
+
[history/](history/) holds the records and queues: `plans/` (one dated plan per unit of work, frozen at completion), `changelog/` (one entry per unit of work; [CHANGELOG.md](history/CHANGELOG.md) explains how to read it), and [backlog.md](history/backlog.md), the queue of open work, where a finished item is deleted.
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
- [backlog.md](history/backlog.md) - Open work items and technical debt — a drain queue; done items are deleted
|
|
14
|
+
## Memory
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
[memory/](memory/) holds project memory in `main.md` and one strategy file per agent that keeps one.
|
|
25
17
|
|
|
26
18
|
## Contributing
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
[CLAUDE.md](../CLAUDE.md) carries the documentation workflow.
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
---
|
|
2
|
+
type: changelog-guide
|
|
3
|
+
description: "How this project's changelog works: one entry per unit of work under changelog/, what each entry records, when one is owed, and how to read the folder."
|
|
4
|
+
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
# Changelog
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
**Goal:** what changed in this project, and how it was refined, one entry per unit of work.
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## Entries
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
- **Location:** `changelog/YYYY-MM-DD-{three-words}.md`, one file per unit of work; the three words name the work, not the commit.
|
|
13
|
+
- **Summary line:** each entry opens `# {date} · {surface} — {one-line outcome}`, the line a reader scans.
|
|
14
|
+
- **Content:** the ask in the user's words, what was rejected, which skills held, what changed and what running it taught (the `documentation` skill's `templates/changelog-entry.md`).
|
|
15
|
+
- **Lifecycle:** a draft until its commit; frozen from then on. A correction is a new entry that links back.
|
|
12
16
|
|
|
13
|
-
##
|
|
17
|
+
## Owed entries
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
- **Plan completion:** a draft entry, written when the plan reaches `Status: Complete`.
|
|
20
|
+
- **Commit:** every non-exempt commit carries its entry inside it (the `changelog` rule lists the exemptions).
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
## Reading the changelog
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **Removed** for now removed features
|
|
25
|
-
- **Fixed** for bug fixes
|
|
26
|
-
- **Security** for security improvements
|
|
24
|
+
- **Newest first:** `ls -r changelog/`
|
|
25
|
+
- **One line per entry:** `grep -m1 -H '^# ' changelog/*.md`
|
|
26
|
+
- **One surface:** `grep -l '· {surface} —' changelog/*.md`
|
|
27
|
+
- **Distilled lessons:** the `retro` agent turns accumulated entries into a punch list on demand.
|