@nurix/etna 0.18.15 → 0.18.17
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/README.md +11 -16
- package/data/harness-index.json +1 -1
- package/data/harnesses/code/CLAUDE.md +71 -57
- package/data/harnesses/code/agents/{spec-mode.md → lld-mode.md} +12 -12
- package/data/harnesses/code/agents/maintenance.md +6 -31
- package/data/harnesses/code/harness.json +2 -2
- package/data/harnesses/code/hooks/hooks.json +0 -23
- package/data/harnesses/code/rules/testing.md +25 -0
- package/data/harnesses/code/skills/brainstorm/SKILL.md +1 -1
- package/data/harnesses/code/skills/brainstorm/exit-artifacts.md +2 -2
- package/data/harnesses/code/skills/documentation/SKILL.md +9 -5
- package/data/harnesses/code/skills/documentation/references/examples.md +1 -1
- package/data/harnesses/code/skills/documentation/references/style-guide.md +3 -1
- package/data/harnesses/code/skills/documentation/references/templates.md +99 -115
- package/data/harnesses/etna/CLAUDE.md +11 -12
- package/data/harnesses/etna/agents/{spec-mode.md → lld-mode.md} +12 -12
- package/data/harnesses/etna/agents/maintenance.md +6 -31
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/hooks/hooks.json +0 -23
- package/data/harnesses/etna/rules/testing.md +25 -0
- package/data/harnesses/etna/skills/brainstorm/SKILL.md +1 -1
- package/data/harnesses/etna/skills/brainstorm/exit-artifacts.md +2 -2
- package/data/harnesses/etna/skills/documentation/SKILL.md +9 -5
- package/data/harnesses/etna/skills/documentation/references/examples.md +1 -1
- package/data/harnesses/etna/skills/documentation/references/style-guide.md +3 -1
- package/data/harnesses/etna/skills/documentation/references/templates.md +99 -115
- package/data/harnesses/mobile/CLAUDE.md +78 -55
- package/data/harnesses/mobile/agents/{spec-mode.md → lld-mode.md} +12 -12
- package/data/harnesses/mobile/agents/maintenance.md +6 -31
- package/data/harnesses/mobile/harness.json +2 -2
- package/data/harnesses/mobile/hooks/hooks.json +0 -23
- package/data/harnesses/mobile/rules/testing.md +25 -0
- package/data/harnesses/mobile/skills/brainstorm/SKILL.md +1 -1
- package/data/harnesses/mobile/skills/brainstorm/exit-artifacts.md +2 -2
- package/data/harnesses/mobile/skills/documentation/SKILL.md +9 -5
- package/data/harnesses/mobile/skills/documentation/references/examples.md +1 -1
- package/data/harnesses/mobile/skills/documentation/references/style-guide.md +3 -1
- package/data/harnesses/mobile/skills/documentation/references/templates.md +99 -115
- package/package.json +1 -1
- package/data/harnesses/code/hooks/lib/redact.mjs +0 -35
- package/data/harnesses/code/hooks/prompt-recall.mjs +0 -155
- package/data/harnesses/code/hooks/session-reflect.mjs +0 -285
- package/data/harnesses/code/skills/distiller/SKILL.md +0 -90
- package/data/harnesses/code/skills/distiller/references/docs-mode.md +0 -299
- package/data/harnesses/code/skills/distiller/references/method.md +0 -94
- package/data/harnesses/etna/hooks/lib/redact.mjs +0 -35
- package/data/harnesses/etna/hooks/prompt-recall.mjs +0 -155
- package/data/harnesses/etna/hooks/session-reflect.mjs +0 -285
- package/data/harnesses/etna/skills/distiller/SKILL.md +0 -90
- package/data/harnesses/etna/skills/distiller/references/docs-mode.md +0 -299
- package/data/harnesses/etna/skills/distiller/references/method.md +0 -94
- package/data/harnesses/mobile/hooks/lib/redact.mjs +0 -35
- package/data/harnesses/mobile/hooks/prompt-recall.mjs +0 -155
- package/data/harnesses/mobile/hooks/session-reflect.mjs +0 -285
- package/data/harnesses/mobile/skills/distiller/SKILL.md +0 -90
- package/data/harnesses/mobile/skills/distiller/references/docs-mode.md +0 -299
- package/data/harnesses/mobile/skills/distiller/references/method.md +0 -94
|
@@ -80,6 +80,8 @@ For each changed file:
|
|
|
80
80
|
- If no glob matches → flag as **unowned**.
|
|
81
81
|
- If an owner exists → compare last-modified dates (`git log -1 --format="%ci" -- <path>`), flag docs where code changed more recently (14-day threshold).
|
|
82
82
|
|
|
83
|
+
**Audit priority.** Rank the docs to inspect by their `last-reviewed:` frontmatter (optional key): never-stamped first, then oldest-first. A doc reviewed last week rarely needs a re-read; one never stamped is the likeliest to have drifted.
|
|
84
|
+
|
|
83
85
|
### Step 4: Check architecture & backlog
|
|
84
86
|
|
|
85
87
|
**Unowned paths.** Compare the repo's actual top-level source directories (derive them — the top-level dirs that contain code, or the roots named across the `owns:` globs; do not assume `src/`) against the `owns:` map. Report directories no `owns:` glob covers.
|
|
@@ -97,6 +99,8 @@ For each stale doc:
|
|
|
97
99
|
- If drift is clear (renamed function, new export, changed props) → update the doc directly.
|
|
98
100
|
- If drift is ambiguous (major refactor, unclear intent) → backlog it.
|
|
99
101
|
|
|
102
|
+
For each feature doc you verified accurate or updated this pass, stamp `last-reviewed:` in its frontmatter with today's date (add the key if absent). Never write review dates into the body — it's frontmatter metadata only.
|
|
103
|
+
|
|
100
104
|
For unowned code paths:
|
|
101
105
|
|
|
102
106
|
- Append: `- **[P2]** No feature doc owns \`{dir}/\` — discovered by maintenance` (`{dir}` = the actual unowned source directory).
|
|
@@ -108,20 +112,6 @@ For unowned code paths:
|
|
|
108
112
|
1. Update `docs/structure.md` Health Log with today's date and summary.
|
|
109
113
|
2. Update `docs/memory/maintenance.md` with last review date, stale docs fixed, unowned paths, backlog items created.
|
|
110
114
|
3. Report findings: stale docs, broken ownership, unowned code, architecture drift, backlog health.
|
|
111
|
-
4. **Inbox-distillation threshold.** Count undigested inbox entries — `## ` entry blocks across `docs/memory/inbox/*.md` (the inbox is consume-on-digest, so every block present is undigested). If the count is **≥5**, add one line to the report **proposing** a `distiller facts` run — propose only, never auto-run, no cron. If the user declines or ignores it, do nothing: the count keeps growing and the proposal reappears next pass — that recurrence _is_ the dedupe, so never backlog it.
|
|
112
|
-
5. **Docs-distillation threshold.** Per target doc, count undigested fact-cards (`invalid_from: null`, the doc's path not in their `digested_into:`) that **touch** it by the structural intersection in `skills/distiller/references/docs-mode.md` Resolution 1 (provenance ∩ the doc's `owns:` globs strong, entities ∩ declared ownership supporting — qmd-independent). If **≥10** map to **one** doc, add one line to the report **proposing** a `distiller docs --doc <path>` run on that doc — propose only, never auto-run, no cron. Declined or ignored ⇒ the count keeps growing and the proposal reappears next pass; that recurrence _is_ the dedupe, so never backlog the proposal.
|
|
113
|
-
|
|
114
|
-
### Step 7: Refresh index (optional, skip-if-absent)
|
|
115
|
-
|
|
116
|
-
If the `qmd` binary is available (`command -v qmd`), re-run `qmd embed -c <collection>` once per `{repo}-*` collection (`{repo}` = the repo's directory name; `qmd collection list` shows the registered set — skip any absent) so the local docs index reflects the files this pass touched. Scope every run with `-c` — the qmd index is global (`~/.cache/qmd/` holds every repo's collections), so a bare `qmd embed` would re-embed unrelated repos' collections. If `qmd` is absent, skip silently — it's never required.
|
|
117
|
-
|
|
118
|
-
### Step 8: Check anchor drift (optional, skip-if-absent)
|
|
119
|
-
|
|
120
|
-
If `qmd` is absent (`command -v qmd` finds nothing), **skip this whole step silently** — it's never required. `anchors:` is a qmd-only tooling key; with no qmd it is inert.
|
|
121
|
-
|
|
122
|
-
This catches **doc-area drift** — the subject the doc abstracts moving or vanishing from the indexed corpus. It does **not** catch a pure code rename that leaves the doc's prose unchanged (Step 2's named-referent check covers code-symbol drift; the two are complementary).
|
|
123
|
-
|
|
124
|
-
Glob `docs/features/**/*.md`, `docs/architecture/**/*.md`, and `docs/operations/**/*.md` for docs carrying `anchors:` frontmatter. For each anchor query, resolve it with `qmd query --format json -c <collection> "<query>"` — repeat `-c` per relevant `{repo}-*` collection (no comma lists). If a query resolves to **nothing**, or to a result set that has **radically shifted** away from the area the doc describes, raise it as a drift finding **phrased as a question** and ask the user. On **yes**, dispatch the remediation sub-agent (the same yes-branch as Step 5). On **decline or no action**, append it to `docs/history/backlog.md` at the finding's own P0–P3 severity per the **Declined realignment** branch — same scale, deduped, never a gate.
|
|
125
115
|
|
|
126
116
|
---
|
|
127
117
|
|
|
@@ -148,7 +138,7 @@ docs/
|
|
|
148
138
|
│ ├── changelog/ # Individual entries
|
|
149
139
|
│ ├── plans/ # Implementation plans (Status field required)
|
|
150
140
|
│ └── backlog.md # Tracked work items by priority (P0-P3)
|
|
151
|
-
├── memory/ #
|
|
141
|
+
├── memory/ # index.md, main.md, {agent}.md — project knowledge + per-agent strategy memory
|
|
152
142
|
└── tests/ # Optional, author-maintained — create only if test docs exist
|
|
153
143
|
```
|
|
154
144
|
|
|
@@ -189,26 +179,11 @@ Scaffold missing mandated files **by calling the `documentation` skill for each
|
|
|
189
179
|
|
|
190
180
|
- `docs/structure.md` (with `harness-version`), `docs/history/CHANGELOG.md`, `docs/history/backlog.md`, `docs/memory/index.md`, `docs/memory/main.md`, and the repo-root `README.md` (filled from the real lockfile/scripts/layout — **never overwrite an existing root README**).
|
|
191
181
|
|
|
192
|
-
Scaffold `docs/memory/facts/` so the distilled tier has a home from day one: the `session-reflect` hook appends session lessons to the per-actor inbox at `docs/memory/inbox/{actor}.md` (not a scaffold — created mechanically on first reflection), and the `distiller` digests that queue down into fact-cards under `docs/memory/facts/`, consuming the entries it digests.
|
|
193
|
-
|
|
194
182
|
### Step B4 — Stamp the version
|
|
195
183
|
|
|
196
184
|
Write `harness-version: <installed version>` (the semver from `.claude/harness.json`) into `docs/structure.md` frontmatter. This single field is the repo's baseline-and-version sentinel — there is no second marker (no `epoch`, no `docs/memory/index.md` "is-baselined" check).
|
|
197
185
|
|
|
198
|
-
### Step B5 —
|
|
199
|
-
|
|
200
|
-
Strictly optional and guarded on the binary — if `command -v qmd` finds nothing, **skip this entire step silently** (no error, no behavior change) and carry one advisory line into the hand-back: _"qmd not installed — semantic retrieval unavailable; the generated ownership index + `keywords:` discovery are active."_ The index is a **local rebuildable lens** — data stays in git; never commit index artifacts, and never use `qmd init` (the default global index keeps the repo clean).
|
|
201
|
-
|
|
202
|
-
If the binary exists, register the docs subtrees once the tree is scaffolded. **Do not register one collection rooted at `docs/`** — qmd hard-codes the `**/*.md` pattern and has no exclude flag, so a `docs/`-root collection would sweep the consumable inbox queue at `docs/memory/inbox/` into the index (the inbox's entries are deleted on digestion, leaving dangling index entries). Register **per indexable subtree** (skip absent ones; `{repo}` = the repo's directory name; an existing name/path no-ops — treat as success):
|
|
203
|
-
|
|
204
|
-
- `qmd collection add docs/features --name {repo}-features`
|
|
205
|
-
- `qmd collection add docs/architecture --name {repo}-architecture`
|
|
206
|
-
- `qmd collection add docs/operations --name {repo}-operations`
|
|
207
|
-
- `qmd collection add docs/memory/facts --name {repo}-facts` (never `docs/memory` as a whole)
|
|
208
|
-
|
|
209
|
-
Then `qmd context add` per registered collection and `qmd embed -c <name>` per collection (always scope with `-c`; a bare `qmd embed` re-embeds every repo's collections). This augments discovery; it never supersedes the `owns:`-glob ownership resolution.
|
|
210
|
-
|
|
211
|
-
### Step B6 — Module proposal
|
|
186
|
+
### Step B5 — Module proposal
|
|
212
187
|
|
|
213
188
|
Modules are **labels, declared, never inferred from physical layout**. Derive the repo's candidate bounded contexts directly from the code and docs: distinct wire surfaces (who owns routes/handlers), schema/data-access ownership, entry points and process units, plus any contexts `docs/architecture/` already names.
|
|
214
189
|
|
|
@@ -11,29 +11,6 @@
|
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
|
-
],
|
|
15
|
-
"SessionEnd": [
|
|
16
|
-
{
|
|
17
|
-
"matcher": "",
|
|
18
|
-
"hooks": [
|
|
19
|
-
{
|
|
20
|
-
"type": "command",
|
|
21
|
-
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/session-reflect.mjs\"",
|
|
22
|
-
"async": true
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"UserPromptSubmit": [
|
|
28
|
-
{
|
|
29
|
-
"matcher": "",
|
|
30
|
-
"hooks": [
|
|
31
|
-
{
|
|
32
|
-
"type": "command",
|
|
33
|
-
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/prompt-recall.mjs\""
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
14
|
]
|
|
38
15
|
}
|
|
39
16
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
Framework choice is never ad hoc and never the user's problem mid-task: detect the stack, use its row. If the repo already has a runner, that runner wins — never introduce a second framework beside it.
|
|
4
|
+
|
|
5
|
+
## Frameworks by stack
|
|
6
|
+
|
|
7
|
+
No alternatives. Just use these.
|
|
8
|
+
|
|
9
|
+
| Stack | Unit / integration | Component | E2E | HTTP mocking | Don't use |
|
|
10
|
+
| --- | --- | --- | --- | --- | --- |
|
|
11
|
+
| Node + Vite / React (web) | vitest | @testing-library/react (+ @testing-library/user-event, happy-dom) | @playwright/test | msw | jest, mocha, jasmine, cypress, enzyme |
|
|
12
|
+
| Express APIs | vitest | — | supertest against the app instance | msw (outbound calls) | jest, chai-http |
|
|
13
|
+
| React Native / Expo | jest via the jest-expo preset | @testing-library/react-native | maestro | msw | detox, enzyme |
|
|
14
|
+
| Cloudflare Workers | vitest + @cloudflare/vitest-pool-workers | — | @playwright/test against `wrangler dev` | msw | jest |
|
|
15
|
+
| Rust | `cargo test` (built-in) | — | — | — | — |
|
|
16
|
+
|
|
17
|
+
All npm packages at `latest`. Fake data comes from `@ngneat/falso` (the repo standard — never faker/chance).
|
|
18
|
+
|
|
19
|
+
## Conventions
|
|
20
|
+
|
|
21
|
+
- **Suite, not scripts.** Tests live in the canonical test tree (`tests/`, mirroring `src/`), named `<subject>.test.ts`. Shared fixtures, factories, and helpers live in `tests/helpers/`. The harness `CLAUDE.md` Tests guardrail carries the full suite-first policy; this rule owns only the technology choices.
|
|
22
|
+
- **Wire the canonical command.** `"test"` in package.json runs the whole unit suite (`vitest run`); e2e runs under `"test:e2e"`. A repo where `pnpm test`/`npm test` doesn't run the suite is misconfigured.
|
|
23
|
+
- **Unit and E2E trees stay separate.** Vitest/Jest suites in `tests/`; Playwright/Maestro suites in `e2e/` with their own config — never mixed into the unit runner's glob.
|
|
24
|
+
- **No test doubles for what you own.** Prefer real instances — in-memory SQLite for drizzle, the actual Express app via supertest — over mocks; mock only true externals (network via msw, time via the runner's fake timers).
|
|
25
|
+
- **Determinism.** No real network, no real time, no shared mutable state between tests; every test must pass alone and in any order.
|
|
@@ -102,7 +102,7 @@ The complexity dial sets _defaults_, not a cage: any lazy pillar materializes mi
|
|
|
102
102
|
|
|
103
103
|
The background reconciler that replaces ceremony with consistency. **One sync in flight at a time; queue at most one behind it.**
|
|
104
104
|
|
|
105
|
-
**When:** after a distillation batch lands substantive pillar writes (at the turn break, not mid-sentence); mandatorily on entering converge and at `stop`; on demand. At **low** complexity, run it inline yourself; at **medium+**, dispatch a background `general-purpose` agent (read/write access to the session folder only
|
|
105
|
+
**When:** after a distillation batch lands substantive pillar writes (at the turn break, not mid-sentence); mandatorily on entering converge and at `stop`; on demand. At **low** complexity, run it inline yourself; at **medium+**, dispatch a background `general-purpose` agent **on Opus** (`model: "opus"` — pillar reconciliation is quality-critical, so never a smaller model; and never the main-loop frontier model, whose session budget belongs to the conversation), with read/write access to the session folder only. Exception at any complexity: the `stop` sync's self-containment pass always dispatches the context-free agent — an inline reader with full conversational context cannot cold-read, because it already knows every undefined term.
|
|
106
106
|
|
|
107
107
|
**The filing checklist — before every dispatch.** The sync agent cannot see the conversation, so the orchestrator runs the transcript-side half itself, immediately before dispatching: list your substantive contributions since the last sync — analyses, diagnoses, recommendations with reasoning, definitions, rejections — and file any that aren't on disk (evidence note, decision rationale, glossary line, rejected entry). Only then dispatch. A sync dispatched over unfiled substance audits an incomplete record and stamps it green.
|
|
108
108
|
|
|
@@ -58,5 +58,5 @@ Append a changelog entry at `docs/history/changelog/YYYY-MM-DD-brainstorm-{slug}
|
|
|
58
58
|
|
|
59
59
|
**Keep `docs/brainstorm/{topic}/` — never delete it.** The exit artifacts now carry the distilled
|
|
60
60
|
conclusions, but the record stays committed as their provenance: a traceable source for every published
|
|
61
|
-
headline, the seed the next `/brainstorm start` on this topic resumes from
|
|
62
|
-
|
|
61
|
+
headline, and the seed the next `/brainstorm start` on this topic resumes from. Retire a topic's folder
|
|
62
|
+
by hand only when the design line is truly dead.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation
|
|
3
|
-
description: Template & generator library for technical docs — the skill agents call to produce a doc from a template. Use to (1) document a feature or module, (2) create or update a changelog entry, (3) document data flows or Redux state, (4) add to protected files, (5) record an architecture decision (ADR), (6) create or update the project root README, (7) create or update a plan, (8) derive a feature doc's `owns:` frontmatter (the code-path globs it owns) from code, (9) scaffold a standard doc (README, structure.md, CHANGELOG, backlog, memory) from its template, or (
|
|
3
|
+
description: Template & generator library for technical docs — the skill agents call to produce a doc from a template. Use to (1) document a feature or module (the feature doc is the feature's LLD — low-level design — written in LLD Mode), (2) create or update a changelog entry, (3) document data flows or Redux state, (4) add to protected files, (5) record an architecture decision (ADR), (6) create or update the project root README, (7) create or update a plan, (8) derive a feature doc's `owns:` frontmatter (the code-path globs it owns) from code, (9) scaffold a standard doc (README, structure.md, CHANGELOG, backlog, memory) from its template, (10) document an operations procedure (setup, deployment, maintenance), or (11) co-author any technical doc. Baselining / reconciling a repo's docs to the installed harness version is the **`maintenance` agent (baseline mode)** (which calls this skill for each template) — this skill does not orchestrate baseline. Triggers on "document this", "create docs", "update changelog", "add to protected files", "ADR", "architecture decision", "root README", "plan", "feature doc", "LLD".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Technical Documentation Skill
|
|
@@ -9,9 +9,11 @@ description: Template & generator library for technical docs — the skill agent
|
|
|
9
9
|
|
|
10
10
|
Document contracts and architecture, not implementation details. Show function signatures and API shapes — never paste full implementations (they rot fast). Use ASCII diagrams over prose for flows. Only document state at persistence boundaries (Redux persistence, DB schemas, API shapes), not component-level or transient state. Mark deprecated fields with `// UNUSED:` comments. Breaking changes belong in changelogs only, not module docs.
|
|
11
11
|
|
|
12
|
+
**No empty stubs.** Never leave a template section as an empty placeholder — omit any section with nothing real to say (each template declares its required core; everything else is optional). Write an explicit "None" only where the absence itself is information (e.g., a plan's Cross-Module Contracts Affected, an LLD's Ownership Conflicts). An empty table stub reads as "not yet researched"; an omitted section reads as "doesn't apply" — keep those meanings distinct.
|
|
13
|
+
|
|
12
14
|
**No redirect docs.** When moving a doc to a new location, delete the old file entirely. Update all references (cross-doc links, memory files) to point to the new path. Never leave a stub file that says "Moved to X" — redirect docs rot, clutter the repo, and create false search hits.
|
|
13
15
|
|
|
14
|
-
**Present tense, current state only.** Active docs (everything outside `docs/history/`) describe the system _as it is now_ — what exists and how it works today. They never narrate how it got there: no migration/fold history, no dated "shipped/verified/built on YYYY-MM-DD" markers, no "ex-`@nurix/X`, folded 2026-06-12" provenance, no "was X → now Y" change journeys, no "removed/deleted in the <date> fold". The historical record — when and how things changed — lives **only** in `docs/history/` (changelog, plans
|
|
16
|
+
**Present tense, current state only.** Active docs (everything outside `docs/history/`) describe the system _as it is now_ — what exists and how it works today. They never narrate how it got there: no migration/fold history, no dated "shipped/verified/built on YYYY-MM-DD" markers, no "ex-`@nurix/X`, folded 2026-06-12" provenance, no "was X → now Y" change journeys, no "removed/deleted in the <date> fold". The historical record — when and how things changed — lives **only** in `docs/history/` (changelog, plans); `docs/memory/` is the agent's dated log and is likewise exempt, and an ADR's **Decision Changelog** section is the one sanctioned dated-history section inside an active doc (the ADR body itself stays current-truth-only). A doc may cite an ADR for the _why_ (the decision rationale), but must not narrate the _when/how it changed_. Routing/index docs point only to current authority docs — never to a historical plan or changelog as the "read first" source. When you find historical narration in an active doc, rewrite it to the present-tense fact and let `docs/history/` carry the story.
|
|
15
17
|
|
|
16
18
|
---
|
|
17
19
|
|
|
@@ -22,7 +24,7 @@ User request
|
|
|
22
24
|
│
|
|
23
25
|
├─ "Baseline/reconcile docs" ──────▶ maintenance agent (baseline mode) (it calls this skill per template)
|
|
24
26
|
│
|
|
25
|
-
├─ "Document feature/module"
|
|
27
|
+
├─ "Document feature/module (LLD)" ▶ Module Template
|
|
26
28
|
│
|
|
27
29
|
├─ "Create/update changelog" ──────▶ Changelog Template
|
|
28
30
|
│
|
|
@@ -34,6 +36,8 @@ User request
|
|
|
34
36
|
│
|
|
35
37
|
├─ "Record architecture decision" ─▶ ADR Template
|
|
36
38
|
│
|
|
39
|
+
├─ "Document a procedure/setup" ───▶ Operations Procedure Template
|
|
40
|
+
│
|
|
37
41
|
├─ "Create/update root README" ────▶ Project Root README Template
|
|
38
42
|
│
|
|
39
43
|
├─ "Create/update plan" ───────────▶ Plan Template
|
|
@@ -66,7 +70,7 @@ When creating or updating a feature doc, derive its **`owns:` frontmatter** —
|
|
|
66
70
|
|
|
67
71
|
### How to derive the frontmatter
|
|
68
72
|
|
|
69
|
-
A feature doc's launch-map frontmatter is `owns:` (required), `module:` (optional), `keywords:` (required), and `status:` (required).
|
|
73
|
+
A feature doc's launch-map 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.
|
|
70
74
|
|
|
71
75
|
**1. `owns:`** (the path scope)
|
|
72
76
|
|
|
@@ -119,6 +123,6 @@ For docs that don't match templates:
|
|
|
119
123
|
|
|
120
124
|
| File | Use For |
|
|
121
125
|
| --- | --- |
|
|
122
|
-
| `references/templates.md` | docs/README.md, structure.md, the feature-frontmatter contract, scaffolds (CHANGELOG, backlog, memory), feature, changelog, plan, protected files, ADR, project root README templates |
|
|
126
|
+
| `references/templates.md` | docs/README.md, structure.md, the feature-frontmatter contract, scaffolds (CHANGELOG, backlog, memory), feature, changelog, plan, operations procedure, protected files, ADR, project root README templates |
|
|
123
127
|
| `references/style-guide.md` | Writing rules, formatting conventions |
|
|
124
128
|
| `references/examples.md` | Good vs bad documentation examples |
|
|
@@ -105,7 +105,7 @@ Replaced change-tracking merge with version-based conflict resolution.
|
|
|
105
105
|
- Purpose: Single-pass merge with change detection
|
|
106
106
|
- Returns: `{ merged, changes }`
|
|
107
107
|
|
|
108
|
-
###
|
|
108
|
+
### Changed
|
|
109
109
|
|
|
110
110
|
- `useDataSync()` in `src/hooks/useDataSync.js`
|
|
111
111
|
- Changed: Now compares versions before merge
|
|
@@ -222,7 +222,7 @@ Use for structured info:
|
|
|
222
222
|
|
|
223
223
|
## Tense & History
|
|
224
224
|
|
|
225
|
-
**Active docs describe the present, not the past.** Everything outside `docs/history/` states what the system _is_ and how it works _today_. It must not narrate how it got there. The historical record — the journey, the dates, the migrations — lives **only** in `docs/history/` (changelog, plans
|
|
225
|
+
**Active docs describe the present, not the past.** Everything outside `docs/history/` states what the system _is_ and how it works _today_. It must not narrate how it got there. The historical record — the journey, the dates, the migrations — lives **only** in `docs/history/` (changelog, plans). Two sanctioned exceptions: `docs/memory/` is the agent's own dated log, and an ADR's **Decision Changelog** section carries that decision's dated revision history (the rest of the ADR body stays current-truth-only).
|
|
226
226
|
|
|
227
227
|
Strip this language from active docs:
|
|
228
228
|
|
|
@@ -257,6 +257,8 @@ Rules:
|
|
|
257
257
|
#### Detail (H4 - sparingly)
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
+
**Headings are retrieval keys.** Search and agents retrieve sections out of context, and a bare `## State` reads identically across every feature doc. In long docs, qualify generic headings with the feature name — `## State — invoice-pdf`, `### Merge rules — data sync` — so a section stands alone when retrieved. Short docs whose H1 disambiguates can keep bare headings.
|
|
261
|
+
|
|
260
262
|
### Standard Layout
|
|
261
263
|
|
|
262
264
|
```markdown
|