@nurix/etna 0.18.16 → 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/data/harness-index.json +1 -1
- package/data/harnesses/code/agents/maintenance.md +4 -0
- package/data/harnesses/code/harness.json +2 -2
- package/data/harnesses/code/skills/documentation/SKILL.md +8 -4
- 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 +91 -40
- package/data/harnesses/etna/CLAUDE.md +2 -2
- package/data/harnesses/etna/agents/maintenance.md +4 -0
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/skills/documentation/SKILL.md +8 -4
- 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 +91 -40
- package/data/harnesses/mobile/agents/maintenance.md +4 -0
- package/data/harnesses/mobile/harness.json +2 -2
- package/data/harnesses/mobile/skills/documentation/SKILL.md +8 -4
- 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 +91 -40
- package/package.json +1 -1
package/data/harness-index.json
CHANGED
|
@@ -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).
|
|
@@ -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 (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, 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
|
|
|
@@ -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
|
|
@@ -4,7 +4,7 @@ Templates for all documentation needs.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## docs/README.md (Documentation Root)
|
|
8
8
|
|
|
9
9
|
Use for: the entry point for all documentation in a repo. Created during baseline audit.
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ See [CLAUDE.md](../CLAUDE.md) for documentation guidelines.
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
##
|
|
75
|
+
## docs/structure.md (Authority Map)
|
|
76
76
|
|
|
77
77
|
Use for: defining which folder owns which topic and how docs are maintained.
|
|
78
78
|
|
|
@@ -131,13 +131,13 @@ Plan (Status: Draft) → Implementation → Feature Doc or Architecture Update
|
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
134
|
-
##
|
|
134
|
+
## Code-Path Ownership
|
|
135
135
|
|
|
136
136
|
**Ownership.** A feature doc is the canonical reference for the code paths in its **`owns:` frontmatter** — the only ownership key. To find what a doc owns, read its `owns:` globs; to find the doc for a path, match the path against the injected ownership index (the union of every feature's `owns:` globs), narrower glob wins. See **Frontmatter Derivation** in `SKILL.md` for turning code into `owns:` globs.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
|
-
##
|
|
140
|
+
## Scaffold Files (create if missing)
|
|
141
141
|
|
|
142
142
|
These standard files must exist after every baseline. Create them with these scaffolds if the repo doesn't already have them.
|
|
143
143
|
|
|
@@ -261,10 +261,12 @@ Memory file initialized during documentation baseline.
|
|
|
261
261
|
|
|
262
262
|
---
|
|
263
263
|
|
|
264
|
-
##
|
|
264
|
+
## Feature Documentation — the LLD (docs/features/{feature}.md)
|
|
265
265
|
|
|
266
266
|
Use for: every feature in `docs/features/`. The feature doc is the feature's **LLD (low-level design)**: the same file persists from design (Status: Draft, written in LLD Mode) through implementation to live reference (Status: Active). Sections fill in as the feature matures — no template swap.
|
|
267
267
|
|
|
268
|
+
**Required vs optional.** Four things are required in every feature doc: the frontmatter, **Goal**, **Background**, and **Files** — plus **Current Behavior** once research or implementation exists (at Draft it's the pre-feature baseline; at Active it's how the feature works today). Every other section is optional: include it only when the feature has something real to put in it (no Redux → no Redux section; no risks worth naming → no Risks section). A **minimal form** is sanctioned for small features: frontmatter + Goal + a short how-it-works section + Files. A two-screen doc that is accurate beats a full-template doc with empty sections.
|
|
269
|
+
|
|
268
270
|
The four research-derived sections (**Affected Modules**, **Conventions to Follow**, **Current Behavior**, **Ownership Conflicts**) map 1:1 to the `lld-mode` agent's return shape. The orchestrator drops its findings into those slots without restructuring.
|
|
269
271
|
|
|
270
272
|
```yaml
|
|
@@ -273,6 +275,7 @@ owns: ["src/feature/**", "src/other/file.ts"] # required — code-path globs t
|
|
|
273
275
|
module: billing # optional — single bounded-context label; omit if cross-cutting
|
|
274
276
|
keywords: [invoice, pdf] # required — discovery terms
|
|
275
277
|
status: active # required — active | draft | deprecated
|
|
278
|
+
last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
|
|
276
279
|
---
|
|
277
280
|
```
|
|
278
281
|
|
|
@@ -410,10 +413,12 @@ Resolved Open Questions can be summarized into Background; unresolved ones stay
|
|
|
410
413
|
|
|
411
414
|
---
|
|
412
415
|
|
|
413
|
-
##
|
|
416
|
+
## Changelog
|
|
414
417
|
|
|
415
418
|
Use for: recording code changes with function-level detail.
|
|
416
419
|
|
|
420
|
+
Change categories follow the Keep a Changelog vocabulary — **Added / Changed / Deprecated / Removed / Fixed / Security** — the same six the master `CHANGELOG.md` scaffold instructs. Include only the categories that apply; all six share the same bullet shape (function/file, then detail lines).
|
|
421
|
+
|
|
417
422
|
```
|
|
418
423
|
# YYYY-MM-DD - [Title]
|
|
419
424
|
|
|
@@ -428,7 +433,7 @@ Brief description of what changed and why.
|
|
|
428
433
|
- Purpose: What it does
|
|
429
434
|
- Used by: Where it's called
|
|
430
435
|
|
|
431
|
-
###
|
|
436
|
+
### Changed
|
|
432
437
|
- `existingFunction()` in `path/to/file.js`
|
|
433
438
|
- Changed: What's different
|
|
434
439
|
- Reason: Why it changed
|
|
@@ -438,6 +443,13 @@ Brief description of what changed and why.
|
|
|
438
443
|
- `oldFunction()` from `path/to/file.js`
|
|
439
444
|
- Replaced by: `newFunction()`
|
|
440
445
|
|
|
446
|
+
### Fixed
|
|
447
|
+
- `buggyFunction()` in `path/to/file.js`
|
|
448
|
+
- Bug: What was wrong, when it manifested
|
|
449
|
+
- Fix: What changed
|
|
450
|
+
|
|
451
|
+
(Deprecated / Security follow the same shape.)
|
|
452
|
+
|
|
441
453
|
## Breaking Changes
|
|
442
454
|
|
|
443
455
|
⚠️ **[Change description]**
|
|
@@ -451,6 +463,11 @@ Brief description of what changed and why.
|
|
|
451
463
|
- [ ] Step 1
|
|
452
464
|
- [ ] Step 2
|
|
453
465
|
|
|
466
|
+
## Verified
|
|
467
|
+
|
|
468
|
+
- What was exercised end-to-end and the observed result — real runs, real fixtures, measured timings
|
|
469
|
+
- A future agent diagnosing a regression starts from this evidence
|
|
470
|
+
|
|
454
471
|
## Files Changed
|
|
455
472
|
|
|
456
473
|
- `src/path/file1.js` - Core changes
|
|
@@ -459,7 +476,7 @@ Brief description of what changed and why.
|
|
|
459
476
|
|
|
460
477
|
---
|
|
461
478
|
|
|
462
|
-
##
|
|
479
|
+
## Plan (docs/history/plans/YYYY-MM-DD-feature-name.md)
|
|
463
480
|
|
|
464
481
|
Use for: every implementation plan. Plans are created here directly with `Status: Draft`, flip to `Status: In Progress` when work starts, and freeze at `Status: Complete` or `Status: Abandoned`. Once frozen, never edit — write a new dated plan if scope changes.
|
|
465
482
|
|
|
@@ -526,10 +543,49 @@ Why this work is happening *now*. Link to the spec for *what* we're building; th
|
|
|
526
543
|
|
|
527
544
|
---
|
|
528
545
|
|
|
529
|
-
##
|
|
546
|
+
## Operations Procedure (docs/operations/{procedure}.md)
|
|
547
|
+
|
|
548
|
+
Use for: any doc in `docs/operations/` — setup, development, deployment, maintenance procedures. A procedure is consulted mid-task, not read: exact commands, copy-paste runnable, no narrative.
|
|
549
|
+
|
|
550
|
+
Required: **Goal**, **Steps**, **Verification**. Optional: Preconditions, Troubleshooting, Rollback — include only when they carry real content.
|
|
551
|
+
|
|
552
|
+
If a procedure is a deterministic command list run frequently, script it and have the doc point at the script — a doc should carry judgment (when, why, what to check), not replace automation.
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
# {Procedure Name}
|
|
556
|
+
|
|
557
|
+
**Goal:** What this procedure accomplishes, one line.
|
|
558
|
+
|
|
559
|
+
## Preconditions
|
|
560
|
+
|
|
561
|
+
- Access, tools, or state required before starting — exact versions, env vars, credentials location
|
|
562
|
+
|
|
563
|
+
## Steps
|
|
564
|
+
|
|
565
|
+
1. One action per step, exact command in a code block
|
|
566
|
+
2. Note expected output where it disambiguates success from failure
|
|
567
|
+
|
|
568
|
+
## Verification
|
|
569
|
+
|
|
570
|
+
- The observable end state that confirms it worked — exact check commands, not "it should work now"
|
|
571
|
+
|
|
572
|
+
## Troubleshooting
|
|
573
|
+
|
|
574
|
+
- Symptom → cause → fix (append entries as failures are root-caused)
|
|
575
|
+
|
|
576
|
+
## Rollback
|
|
577
|
+
|
|
578
|
+
- How to undo, and when undo stops being possible
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
583
|
+
## Protected Files
|
|
530
584
|
|
|
531
585
|
Use for: documenting critical files that need approval before modification.
|
|
532
586
|
|
|
587
|
+
This doc answers *what is protected and why breaking it hurts* — nothing more. Don't duplicate function-level detail here (signatures, inputs/outputs): it drifts from both the code and the owning feature doc. The owning feature doc is the canonical reference for how the code works; link to it.
|
|
588
|
+
|
|
533
589
|
```
|
|
534
590
|
# Protected Files
|
|
535
591
|
|
|
@@ -551,29 +607,22 @@ path/to/another/file.js
|
|
|
551
607
|
| Category 1 | Specific impact |
|
|
552
608
|
| Category 2 | Specific impact |
|
|
553
609
|
|
|
554
|
-
##
|
|
610
|
+
## Why Protected
|
|
555
611
|
|
|
556
612
|
### Category 1: [Name]
|
|
557
613
|
|
|
558
|
-
**Purpose:** What these files do
|
|
559
|
-
|
|
560
|
-
**
|
|
561
|
-
|
|
562
|
-
| Function | Input | Output | Purpose |
|
|
563
|
-
|------------|-------|--------|----------------|
|
|
564
|
-
| `func1()` | Type | Type | What it does |
|
|
565
|
-
| `func2()` | Type | Type | What it does |
|
|
566
|
-
|
|
567
|
-
**Critical Behavior:**
|
|
568
|
-
- Important point 1
|
|
614
|
+
**Purpose:** What these files do, one or two lines
|
|
615
|
+
**Owning doc:** [docs/features/{feature}.md] — canonical reference for how this code works
|
|
616
|
+
**Invariants:**
|
|
617
|
+
- The behavior that must not break, stated as a constraint (not a function tour)
|
|
569
618
|
- Important point 2
|
|
570
619
|
```
|
|
571
620
|
|
|
572
621
|
---
|
|
573
622
|
|
|
574
|
-
##
|
|
623
|
+
## Architecture Decision Record (ADR)
|
|
575
624
|
|
|
576
|
-
Use for: capturing a single
|
|
625
|
+
Use for: capturing a single architectural decision with its context, alternatives considered, and consequences. Lives in `docs/architecture/adr/` — co-located with the architecture it decides. An ADR is the **source of truth for its decision**: the body always states the current truth. When the decision is revisited, update the ADR in place — rewrite the affected sections to what is now true, bump `last-updated`, and record the revision in the **Decision Changelog**. Readers get the current decision from the body; the journey lives only in the changelog section.
|
|
577
626
|
|
|
578
627
|
### When to write an ADR
|
|
579
628
|
|
|
@@ -591,9 +640,9 @@ Don't write an ADR for:
|
|
|
591
640
|
|
|
592
641
|
### Lifecycle
|
|
593
642
|
|
|
594
|
-
`Proposed` → `Accepted` → `Deprecated`
|
|
643
|
+
`Proposed` → `Accepted` → `Deprecated`
|
|
595
644
|
|
|
596
|
-
|
|
645
|
+
An ADR stays `Accepted` for as long as its question is live — revisions update it in place. Set `Deprecated` only when the decision's question itself is retired (the component is gone, the contract no longer exists); state where the replacement lives, if any.
|
|
597
646
|
|
|
598
647
|
### Naming
|
|
599
648
|
|
|
@@ -601,18 +650,18 @@ ADRs are **immutable after acceptance**. If the decision changes, write a new AD
|
|
|
601
650
|
|
|
602
651
|
### Structure
|
|
603
652
|
|
|
604
|
-
Three sections are required: **Decision**, **Context**, **Consequences
|
|
653
|
+
Three sections are required: **Decision**, **Context**, **Consequences** — plus the **Decision Changelog** once the ADR has been revised at least once. Everything else is optional — include only when warranted. Decision-first: readers should see the answer in the first paragraph.
|
|
605
654
|
|
|
606
655
|
### Template
|
|
607
656
|
|
|
608
657
|
```markdown
|
|
609
658
|
---
|
|
610
659
|
title: "ADR-NNN: Short title in sentence case"
|
|
611
|
-
status: Accepted # Proposed | Accepted | Deprecated
|
|
612
|
-
|
|
660
|
+
status: Accepted # Proposed | Accepted | Deprecated
|
|
661
|
+
created: YYYY-MM-DD
|
|
662
|
+
last-updated: YYYY-MM-DD # bump on every revision
|
|
613
663
|
decision-owner: Name
|
|
614
664
|
reviewers: [] # optional
|
|
615
|
-
supersedes: # optional, e.g., ADR-005
|
|
616
665
|
tags: [adr]
|
|
617
666
|
---
|
|
618
667
|
|
|
@@ -659,13 +708,7 @@ tags: [adr]
|
|
|
659
708
|
|
|
660
709
|
## Architecture in Detail
|
|
661
710
|
|
|
662
|
-
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*.]
|
|
663
|
-
|
|
664
|
-
## Implementation Plan
|
|
665
|
-
|
|
666
|
-
| Phase | Scope | Duration |
|
|
667
|
-
| ----- | ----- | -------- |
|
|
668
|
-
| 1 | … | … |
|
|
711
|
+
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*. Execution belongs in a plan doc (`docs/history/plans/`) — link to it, don't embed an implementation plan here.]
|
|
669
712
|
|
|
670
713
|
## Open Questions
|
|
671
714
|
|
|
@@ -678,6 +721,13 @@ tags: [adr]
|
|
|
678
721
|
## References
|
|
679
722
|
|
|
680
723
|
- [External link or cross-reference]
|
|
724
|
+
|
|
725
|
+
## Decision Changelog
|
|
726
|
+
|
|
727
|
+
<!-- Append-only, newest first. One entry per revision: what changed in the decision, the trigger, and the previous choice. Added on the first revision; the initial acceptance is the first entry. -->
|
|
728
|
+
|
|
729
|
+
- YYYY-MM-DD — [What changed] because [trigger]. (Previously: [old choice].)
|
|
730
|
+
- YYYY-MM-DD — Initial decision accepted.
|
|
681
731
|
```
|
|
682
732
|
|
|
683
733
|
### Rules
|
|
@@ -686,14 +736,15 @@ tags: [adr]
|
|
|
686
736
|
- Decision-first. The first paragraph after the heading is the answer; readers should not need to scroll.
|
|
687
737
|
- No section numbering (`§5.1.1`). Use markdown headings only — inserting a section shouldn't renumber everything.
|
|
688
738
|
- Frontmatter `status` is the single source of truth for lifecycle. Don't also write "Status: Accepted" in the body.
|
|
689
|
-
-
|
|
690
|
-
- The
|
|
739
|
+
- **Revisions update the body in place.** Rewrite the affected sections to the current truth, bump `last-updated`, and append a Decision Changelog entry naming the old choice and the trigger. Never leave the superseded decision narrated in the body — the changelog carries the journey.
|
|
740
|
+
- The **Decision Changelog** is the one sanctioned dated-history section in an active doc: append-only, newest first. Typo and formatting fixes don't get entries.
|
|
741
|
+
- Execution detail lives in a plan doc, not the ADR — link, don't embed.
|
|
691
742
|
|
|
692
743
|
---
|
|
693
744
|
|
|
694
|
-
##
|
|
745
|
+
## Project Root README
|
|
695
746
|
|
|
696
|
-
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see
|
|
747
|
+
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see **docs/README.md (Documentation Root)** above). The two coexist; don't merge them.
|
|
697
748
|
|
|
698
749
|
### Strategy
|
|
699
750
|
|
|
@@ -24,9 +24,9 @@ For new features or new systems, enter **LLD Mode** (low-level design) before Pl
|
|
|
24
24
|
|
|
25
25
|
### LLD Mode → Plan Mode → Completion
|
|
26
26
|
|
|
27
|
-
1. **LLD Mode**: Create or update the feature LLD in `docs/features/{feature}.md` using the **Feature Documentation template** (Status: Draft)
|
|
27
|
+
1. **LLD Mode**: Create or update the feature LLD in `docs/features/{feature}.md` using the **Feature Documentation template** (Status: Draft) in `.claude/skills/documentation/references/templates.md`. Use the **`lld-mode`** agent (`.claude/agents/lld-mode.md`) for codebase research; its findings drop directly into the template's research-derived sections (Affected Modules, Conventions to Follow, Current Behavior, Ownership Conflicts). Interview the user for the design-intent sections (Goal, Goals & Non-Goals, Background, Approach). Present the LLD for approval before proceeding.
|
|
28
28
|
|
|
29
|
-
2. **Plan Mode**: Once the LLD is approved, create a plan in `docs/history/plans/YYYY-MM-DD-feature-name.md` using the **Plan template** (
|
|
29
|
+
2. **Plan Mode**: Once the LLD is approved, create a plan in `docs/history/plans/YYYY-MM-DD-feature-name.md` using the **Plan template** (same file). Link back to the feature LLD in the **Spec** field. The template's **Proposed Changes** sections are load-bearing — the `boundary` skill parses them to check boundary impact.
|
|
30
30
|
|
|
31
31
|
3. **Completion**: When a plan is fully implemented:
|
|
32
32
|
- Mark the plan `Status: Complete` in `docs/history/plans/` and fill the **Completed:** date. The plan is now frozen.
|
|
@@ -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).
|
|
@@ -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 (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, 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
|
|
|
@@ -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
|
|
@@ -4,7 +4,7 @@ Templates for all documentation needs.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## docs/README.md (Documentation Root)
|
|
8
8
|
|
|
9
9
|
Use for: the entry point for all documentation in a repo. Created during baseline audit.
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ See [CLAUDE.md](../CLAUDE.md) for documentation guidelines.
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
##
|
|
75
|
+
## docs/structure.md (Authority Map)
|
|
76
76
|
|
|
77
77
|
Use for: defining which folder owns which topic and how docs are maintained.
|
|
78
78
|
|
|
@@ -131,13 +131,13 @@ Plan (Status: Draft) → Implementation → Feature Doc or Architecture Update
|
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
134
|
-
##
|
|
134
|
+
## Code-Path Ownership
|
|
135
135
|
|
|
136
136
|
**Ownership.** A feature doc is the canonical reference for the code paths in its **`owns:` frontmatter** — the only ownership key. To find what a doc owns, read its `owns:` globs; to find the doc for a path, match the path against the injected ownership index (the union of every feature's `owns:` globs), narrower glob wins. See **Frontmatter Derivation** in `SKILL.md` for turning code into `owns:` globs.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
|
-
##
|
|
140
|
+
## Scaffold Files (create if missing)
|
|
141
141
|
|
|
142
142
|
These standard files must exist after every baseline. Create them with these scaffolds if the repo doesn't already have them.
|
|
143
143
|
|
|
@@ -261,10 +261,12 @@ Memory file initialized during documentation baseline.
|
|
|
261
261
|
|
|
262
262
|
---
|
|
263
263
|
|
|
264
|
-
##
|
|
264
|
+
## Feature Documentation — the LLD (docs/features/{feature}.md)
|
|
265
265
|
|
|
266
266
|
Use for: every feature in `docs/features/`. The feature doc is the feature's **LLD (low-level design)**: the same file persists from design (Status: Draft, written in LLD Mode) through implementation to live reference (Status: Active). Sections fill in as the feature matures — no template swap.
|
|
267
267
|
|
|
268
|
+
**Required vs optional.** Four things are required in every feature doc: the frontmatter, **Goal**, **Background**, and **Files** — plus **Current Behavior** once research or implementation exists (at Draft it's the pre-feature baseline; at Active it's how the feature works today). Every other section is optional: include it only when the feature has something real to put in it (no Redux → no Redux section; no risks worth naming → no Risks section). A **minimal form** is sanctioned for small features: frontmatter + Goal + a short how-it-works section + Files. A two-screen doc that is accurate beats a full-template doc with empty sections.
|
|
269
|
+
|
|
268
270
|
The four research-derived sections (**Affected Modules**, **Conventions to Follow**, **Current Behavior**, **Ownership Conflicts**) map 1:1 to the `lld-mode` agent's return shape. The orchestrator drops its findings into those slots without restructuring.
|
|
269
271
|
|
|
270
272
|
```yaml
|
|
@@ -273,6 +275,7 @@ owns: ["src/feature/**", "src/other/file.ts"] # required — code-path globs t
|
|
|
273
275
|
module: billing # optional — single bounded-context label; omit if cross-cutting
|
|
274
276
|
keywords: [invoice, pdf] # required — discovery terms
|
|
275
277
|
status: active # required — active | draft | deprecated
|
|
278
|
+
last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
|
|
276
279
|
---
|
|
277
280
|
```
|
|
278
281
|
|
|
@@ -410,10 +413,12 @@ Resolved Open Questions can be summarized into Background; unresolved ones stay
|
|
|
410
413
|
|
|
411
414
|
---
|
|
412
415
|
|
|
413
|
-
##
|
|
416
|
+
## Changelog
|
|
414
417
|
|
|
415
418
|
Use for: recording code changes with function-level detail.
|
|
416
419
|
|
|
420
|
+
Change categories follow the Keep a Changelog vocabulary — **Added / Changed / Deprecated / Removed / Fixed / Security** — the same six the master `CHANGELOG.md` scaffold instructs. Include only the categories that apply; all six share the same bullet shape (function/file, then detail lines).
|
|
421
|
+
|
|
417
422
|
```
|
|
418
423
|
# YYYY-MM-DD - [Title]
|
|
419
424
|
|
|
@@ -428,7 +433,7 @@ Brief description of what changed and why.
|
|
|
428
433
|
- Purpose: What it does
|
|
429
434
|
- Used by: Where it's called
|
|
430
435
|
|
|
431
|
-
###
|
|
436
|
+
### Changed
|
|
432
437
|
- `existingFunction()` in `path/to/file.js`
|
|
433
438
|
- Changed: What's different
|
|
434
439
|
- Reason: Why it changed
|
|
@@ -438,6 +443,13 @@ Brief description of what changed and why.
|
|
|
438
443
|
- `oldFunction()` from `path/to/file.js`
|
|
439
444
|
- Replaced by: `newFunction()`
|
|
440
445
|
|
|
446
|
+
### Fixed
|
|
447
|
+
- `buggyFunction()` in `path/to/file.js`
|
|
448
|
+
- Bug: What was wrong, when it manifested
|
|
449
|
+
- Fix: What changed
|
|
450
|
+
|
|
451
|
+
(Deprecated / Security follow the same shape.)
|
|
452
|
+
|
|
441
453
|
## Breaking Changes
|
|
442
454
|
|
|
443
455
|
⚠️ **[Change description]**
|
|
@@ -451,6 +463,11 @@ Brief description of what changed and why.
|
|
|
451
463
|
- [ ] Step 1
|
|
452
464
|
- [ ] Step 2
|
|
453
465
|
|
|
466
|
+
## Verified
|
|
467
|
+
|
|
468
|
+
- What was exercised end-to-end and the observed result — real runs, real fixtures, measured timings
|
|
469
|
+
- A future agent diagnosing a regression starts from this evidence
|
|
470
|
+
|
|
454
471
|
## Files Changed
|
|
455
472
|
|
|
456
473
|
- `src/path/file1.js` - Core changes
|
|
@@ -459,7 +476,7 @@ Brief description of what changed and why.
|
|
|
459
476
|
|
|
460
477
|
---
|
|
461
478
|
|
|
462
|
-
##
|
|
479
|
+
## Plan (docs/history/plans/YYYY-MM-DD-feature-name.md)
|
|
463
480
|
|
|
464
481
|
Use for: every implementation plan. Plans are created here directly with `Status: Draft`, flip to `Status: In Progress` when work starts, and freeze at `Status: Complete` or `Status: Abandoned`. Once frozen, never edit — write a new dated plan if scope changes.
|
|
465
482
|
|
|
@@ -526,10 +543,49 @@ Why this work is happening *now*. Link to the spec for *what* we're building; th
|
|
|
526
543
|
|
|
527
544
|
---
|
|
528
545
|
|
|
529
|
-
##
|
|
546
|
+
## Operations Procedure (docs/operations/{procedure}.md)
|
|
547
|
+
|
|
548
|
+
Use for: any doc in `docs/operations/` — setup, development, deployment, maintenance procedures. A procedure is consulted mid-task, not read: exact commands, copy-paste runnable, no narrative.
|
|
549
|
+
|
|
550
|
+
Required: **Goal**, **Steps**, **Verification**. Optional: Preconditions, Troubleshooting, Rollback — include only when they carry real content.
|
|
551
|
+
|
|
552
|
+
If a procedure is a deterministic command list run frequently, script it and have the doc point at the script — a doc should carry judgment (when, why, what to check), not replace automation.
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
# {Procedure Name}
|
|
556
|
+
|
|
557
|
+
**Goal:** What this procedure accomplishes, one line.
|
|
558
|
+
|
|
559
|
+
## Preconditions
|
|
560
|
+
|
|
561
|
+
- Access, tools, or state required before starting — exact versions, env vars, credentials location
|
|
562
|
+
|
|
563
|
+
## Steps
|
|
564
|
+
|
|
565
|
+
1. One action per step, exact command in a code block
|
|
566
|
+
2. Note expected output where it disambiguates success from failure
|
|
567
|
+
|
|
568
|
+
## Verification
|
|
569
|
+
|
|
570
|
+
- The observable end state that confirms it worked — exact check commands, not "it should work now"
|
|
571
|
+
|
|
572
|
+
## Troubleshooting
|
|
573
|
+
|
|
574
|
+
- Symptom → cause → fix (append entries as failures are root-caused)
|
|
575
|
+
|
|
576
|
+
## Rollback
|
|
577
|
+
|
|
578
|
+
- How to undo, and when undo stops being possible
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
583
|
+
## Protected Files
|
|
530
584
|
|
|
531
585
|
Use for: documenting critical files that need approval before modification.
|
|
532
586
|
|
|
587
|
+
This doc answers *what is protected and why breaking it hurts* — nothing more. Don't duplicate function-level detail here (signatures, inputs/outputs): it drifts from both the code and the owning feature doc. The owning feature doc is the canonical reference for how the code works; link to it.
|
|
588
|
+
|
|
533
589
|
```
|
|
534
590
|
# Protected Files
|
|
535
591
|
|
|
@@ -551,29 +607,22 @@ path/to/another/file.js
|
|
|
551
607
|
| Category 1 | Specific impact |
|
|
552
608
|
| Category 2 | Specific impact |
|
|
553
609
|
|
|
554
|
-
##
|
|
610
|
+
## Why Protected
|
|
555
611
|
|
|
556
612
|
### Category 1: [Name]
|
|
557
613
|
|
|
558
|
-
**Purpose:** What these files do
|
|
559
|
-
|
|
560
|
-
**
|
|
561
|
-
|
|
562
|
-
| Function | Input | Output | Purpose |
|
|
563
|
-
|------------|-------|--------|----------------|
|
|
564
|
-
| `func1()` | Type | Type | What it does |
|
|
565
|
-
| `func2()` | Type | Type | What it does |
|
|
566
|
-
|
|
567
|
-
**Critical Behavior:**
|
|
568
|
-
- Important point 1
|
|
614
|
+
**Purpose:** What these files do, one or two lines
|
|
615
|
+
**Owning doc:** [docs/features/{feature}.md] — canonical reference for how this code works
|
|
616
|
+
**Invariants:**
|
|
617
|
+
- The behavior that must not break, stated as a constraint (not a function tour)
|
|
569
618
|
- Important point 2
|
|
570
619
|
```
|
|
571
620
|
|
|
572
621
|
---
|
|
573
622
|
|
|
574
|
-
##
|
|
623
|
+
## Architecture Decision Record (ADR)
|
|
575
624
|
|
|
576
|
-
Use for: capturing a single
|
|
625
|
+
Use for: capturing a single architectural decision with its context, alternatives considered, and consequences. Lives in `docs/architecture/adr/` — co-located with the architecture it decides. An ADR is the **source of truth for its decision**: the body always states the current truth. When the decision is revisited, update the ADR in place — rewrite the affected sections to what is now true, bump `last-updated`, and record the revision in the **Decision Changelog**. Readers get the current decision from the body; the journey lives only in the changelog section.
|
|
577
626
|
|
|
578
627
|
### When to write an ADR
|
|
579
628
|
|
|
@@ -591,9 +640,9 @@ Don't write an ADR for:
|
|
|
591
640
|
|
|
592
641
|
### Lifecycle
|
|
593
642
|
|
|
594
|
-
`Proposed` → `Accepted` → `Deprecated`
|
|
643
|
+
`Proposed` → `Accepted` → `Deprecated`
|
|
595
644
|
|
|
596
|
-
|
|
645
|
+
An ADR stays `Accepted` for as long as its question is live — revisions update it in place. Set `Deprecated` only when the decision's question itself is retired (the component is gone, the contract no longer exists); state where the replacement lives, if any.
|
|
597
646
|
|
|
598
647
|
### Naming
|
|
599
648
|
|
|
@@ -601,18 +650,18 @@ ADRs are **immutable after acceptance**. If the decision changes, write a new AD
|
|
|
601
650
|
|
|
602
651
|
### Structure
|
|
603
652
|
|
|
604
|
-
Three sections are required: **Decision**, **Context**, **Consequences
|
|
653
|
+
Three sections are required: **Decision**, **Context**, **Consequences** — plus the **Decision Changelog** once the ADR has been revised at least once. Everything else is optional — include only when warranted. Decision-first: readers should see the answer in the first paragraph.
|
|
605
654
|
|
|
606
655
|
### Template
|
|
607
656
|
|
|
608
657
|
```markdown
|
|
609
658
|
---
|
|
610
659
|
title: "ADR-NNN: Short title in sentence case"
|
|
611
|
-
status: Accepted # Proposed | Accepted | Deprecated
|
|
612
|
-
|
|
660
|
+
status: Accepted # Proposed | Accepted | Deprecated
|
|
661
|
+
created: YYYY-MM-DD
|
|
662
|
+
last-updated: YYYY-MM-DD # bump on every revision
|
|
613
663
|
decision-owner: Name
|
|
614
664
|
reviewers: [] # optional
|
|
615
|
-
supersedes: # optional, e.g., ADR-005
|
|
616
665
|
tags: [adr]
|
|
617
666
|
---
|
|
618
667
|
|
|
@@ -659,13 +708,7 @@ tags: [adr]
|
|
|
659
708
|
|
|
660
709
|
## Architecture in Detail
|
|
661
710
|
|
|
662
|
-
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*.]
|
|
663
|
-
|
|
664
|
-
## Implementation Plan
|
|
665
|
-
|
|
666
|
-
| Phase | Scope | Duration |
|
|
667
|
-
| ----- | ----- | -------- |
|
|
668
|
-
| 1 | … | … |
|
|
711
|
+
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*. Execution belongs in a plan doc (`docs/history/plans/`) — link to it, don't embed an implementation plan here.]
|
|
669
712
|
|
|
670
713
|
## Open Questions
|
|
671
714
|
|
|
@@ -678,6 +721,13 @@ tags: [adr]
|
|
|
678
721
|
## References
|
|
679
722
|
|
|
680
723
|
- [External link or cross-reference]
|
|
724
|
+
|
|
725
|
+
## Decision Changelog
|
|
726
|
+
|
|
727
|
+
<!-- Append-only, newest first. One entry per revision: what changed in the decision, the trigger, and the previous choice. Added on the first revision; the initial acceptance is the first entry. -->
|
|
728
|
+
|
|
729
|
+
- YYYY-MM-DD — [What changed] because [trigger]. (Previously: [old choice].)
|
|
730
|
+
- YYYY-MM-DD — Initial decision accepted.
|
|
681
731
|
```
|
|
682
732
|
|
|
683
733
|
### Rules
|
|
@@ -686,14 +736,15 @@ tags: [adr]
|
|
|
686
736
|
- Decision-first. The first paragraph after the heading is the answer; readers should not need to scroll.
|
|
687
737
|
- No section numbering (`§5.1.1`). Use markdown headings only — inserting a section shouldn't renumber everything.
|
|
688
738
|
- Frontmatter `status` is the single source of truth for lifecycle. Don't also write "Status: Accepted" in the body.
|
|
689
|
-
-
|
|
690
|
-
- The
|
|
739
|
+
- **Revisions update the body in place.** Rewrite the affected sections to the current truth, bump `last-updated`, and append a Decision Changelog entry naming the old choice and the trigger. Never leave the superseded decision narrated in the body — the changelog carries the journey.
|
|
740
|
+
- The **Decision Changelog** is the one sanctioned dated-history section in an active doc: append-only, newest first. Typo and formatting fixes don't get entries.
|
|
741
|
+
- Execution detail lives in a plan doc, not the ADR — link, don't embed.
|
|
691
742
|
|
|
692
743
|
---
|
|
693
744
|
|
|
694
|
-
##
|
|
745
|
+
## Project Root README
|
|
695
746
|
|
|
696
|
-
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see
|
|
747
|
+
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see **docs/README.md (Documentation Root)** above). The two coexist; don't merge them.
|
|
697
748
|
|
|
698
749
|
### Strategy
|
|
699
750
|
|
|
@@ -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).
|
|
@@ -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 (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, 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
|
|
|
@@ -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
|
|
@@ -4,7 +4,7 @@ Templates for all documentation needs.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## docs/README.md (Documentation Root)
|
|
8
8
|
|
|
9
9
|
Use for: the entry point for all documentation in a repo. Created during baseline audit.
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ See [CLAUDE.md](../CLAUDE.md) for documentation guidelines.
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
##
|
|
75
|
+
## docs/structure.md (Authority Map)
|
|
76
76
|
|
|
77
77
|
Use for: defining which folder owns which topic and how docs are maintained.
|
|
78
78
|
|
|
@@ -131,13 +131,13 @@ Plan (Status: Draft) → Implementation → Feature Doc or Architecture Update
|
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
134
|
-
##
|
|
134
|
+
## Code-Path Ownership
|
|
135
135
|
|
|
136
136
|
**Ownership.** A feature doc is the canonical reference for the code paths in its **`owns:` frontmatter** — the only ownership key. To find what a doc owns, read its `owns:` globs; to find the doc for a path, match the path against the injected ownership index (the union of every feature's `owns:` globs), narrower glob wins. See **Frontmatter Derivation** in `SKILL.md` for turning code into `owns:` globs.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
|
-
##
|
|
140
|
+
## Scaffold Files (create if missing)
|
|
141
141
|
|
|
142
142
|
These standard files must exist after every baseline. Create them with these scaffolds if the repo doesn't already have them.
|
|
143
143
|
|
|
@@ -261,10 +261,12 @@ Memory file initialized during documentation baseline.
|
|
|
261
261
|
|
|
262
262
|
---
|
|
263
263
|
|
|
264
|
-
##
|
|
264
|
+
## Feature Documentation — the LLD (docs/features/{feature}.md)
|
|
265
265
|
|
|
266
266
|
Use for: every feature in `docs/features/`. The feature doc is the feature's **LLD (low-level design)**: the same file persists from design (Status: Draft, written in LLD Mode) through implementation to live reference (Status: Active). Sections fill in as the feature matures — no template swap.
|
|
267
267
|
|
|
268
|
+
**Required vs optional.** Four things are required in every feature doc: the frontmatter, **Goal**, **Background**, and **Files** — plus **Current Behavior** once research or implementation exists (at Draft it's the pre-feature baseline; at Active it's how the feature works today). Every other section is optional: include it only when the feature has something real to put in it (no Redux → no Redux section; no risks worth naming → no Risks section). A **minimal form** is sanctioned for small features: frontmatter + Goal + a short how-it-works section + Files. A two-screen doc that is accurate beats a full-template doc with empty sections.
|
|
269
|
+
|
|
268
270
|
The four research-derived sections (**Affected Modules**, **Conventions to Follow**, **Current Behavior**, **Ownership Conflicts**) map 1:1 to the `lld-mode` agent's return shape. The orchestrator drops its findings into those slots without restructuring.
|
|
269
271
|
|
|
270
272
|
```yaml
|
|
@@ -273,6 +275,7 @@ owns: ["src/feature/**", "src/other/file.ts"] # required — code-path globs t
|
|
|
273
275
|
module: billing # optional — single bounded-context label; omit if cross-cutting
|
|
274
276
|
keywords: [invoice, pdf] # required — discovery terms
|
|
275
277
|
status: active # required — active | draft | deprecated
|
|
278
|
+
last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
|
|
276
279
|
---
|
|
277
280
|
```
|
|
278
281
|
|
|
@@ -410,10 +413,12 @@ Resolved Open Questions can be summarized into Background; unresolved ones stay
|
|
|
410
413
|
|
|
411
414
|
---
|
|
412
415
|
|
|
413
|
-
##
|
|
416
|
+
## Changelog
|
|
414
417
|
|
|
415
418
|
Use for: recording code changes with function-level detail.
|
|
416
419
|
|
|
420
|
+
Change categories follow the Keep a Changelog vocabulary — **Added / Changed / Deprecated / Removed / Fixed / Security** — the same six the master `CHANGELOG.md` scaffold instructs. Include only the categories that apply; all six share the same bullet shape (function/file, then detail lines).
|
|
421
|
+
|
|
417
422
|
```
|
|
418
423
|
# YYYY-MM-DD - [Title]
|
|
419
424
|
|
|
@@ -428,7 +433,7 @@ Brief description of what changed and why.
|
|
|
428
433
|
- Purpose: What it does
|
|
429
434
|
- Used by: Where it's called
|
|
430
435
|
|
|
431
|
-
###
|
|
436
|
+
### Changed
|
|
432
437
|
- `existingFunction()` in `path/to/file.js`
|
|
433
438
|
- Changed: What's different
|
|
434
439
|
- Reason: Why it changed
|
|
@@ -438,6 +443,13 @@ Brief description of what changed and why.
|
|
|
438
443
|
- `oldFunction()` from `path/to/file.js`
|
|
439
444
|
- Replaced by: `newFunction()`
|
|
440
445
|
|
|
446
|
+
### Fixed
|
|
447
|
+
- `buggyFunction()` in `path/to/file.js`
|
|
448
|
+
- Bug: What was wrong, when it manifested
|
|
449
|
+
- Fix: What changed
|
|
450
|
+
|
|
451
|
+
(Deprecated / Security follow the same shape.)
|
|
452
|
+
|
|
441
453
|
## Breaking Changes
|
|
442
454
|
|
|
443
455
|
⚠️ **[Change description]**
|
|
@@ -451,6 +463,11 @@ Brief description of what changed and why.
|
|
|
451
463
|
- [ ] Step 1
|
|
452
464
|
- [ ] Step 2
|
|
453
465
|
|
|
466
|
+
## Verified
|
|
467
|
+
|
|
468
|
+
- What was exercised end-to-end and the observed result — real runs, real fixtures, measured timings
|
|
469
|
+
- A future agent diagnosing a regression starts from this evidence
|
|
470
|
+
|
|
454
471
|
## Files Changed
|
|
455
472
|
|
|
456
473
|
- `src/path/file1.js` - Core changes
|
|
@@ -459,7 +476,7 @@ Brief description of what changed and why.
|
|
|
459
476
|
|
|
460
477
|
---
|
|
461
478
|
|
|
462
|
-
##
|
|
479
|
+
## Plan (docs/history/plans/YYYY-MM-DD-feature-name.md)
|
|
463
480
|
|
|
464
481
|
Use for: every implementation plan. Plans are created here directly with `Status: Draft`, flip to `Status: In Progress` when work starts, and freeze at `Status: Complete` or `Status: Abandoned`. Once frozen, never edit — write a new dated plan if scope changes.
|
|
465
482
|
|
|
@@ -526,10 +543,49 @@ Why this work is happening *now*. Link to the spec for *what* we're building; th
|
|
|
526
543
|
|
|
527
544
|
---
|
|
528
545
|
|
|
529
|
-
##
|
|
546
|
+
## Operations Procedure (docs/operations/{procedure}.md)
|
|
547
|
+
|
|
548
|
+
Use for: any doc in `docs/operations/` — setup, development, deployment, maintenance procedures. A procedure is consulted mid-task, not read: exact commands, copy-paste runnable, no narrative.
|
|
549
|
+
|
|
550
|
+
Required: **Goal**, **Steps**, **Verification**. Optional: Preconditions, Troubleshooting, Rollback — include only when they carry real content.
|
|
551
|
+
|
|
552
|
+
If a procedure is a deterministic command list run frequently, script it and have the doc point at the script — a doc should carry judgment (when, why, what to check), not replace automation.
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
# {Procedure Name}
|
|
556
|
+
|
|
557
|
+
**Goal:** What this procedure accomplishes, one line.
|
|
558
|
+
|
|
559
|
+
## Preconditions
|
|
560
|
+
|
|
561
|
+
- Access, tools, or state required before starting — exact versions, env vars, credentials location
|
|
562
|
+
|
|
563
|
+
## Steps
|
|
564
|
+
|
|
565
|
+
1. One action per step, exact command in a code block
|
|
566
|
+
2. Note expected output where it disambiguates success from failure
|
|
567
|
+
|
|
568
|
+
## Verification
|
|
569
|
+
|
|
570
|
+
- The observable end state that confirms it worked — exact check commands, not "it should work now"
|
|
571
|
+
|
|
572
|
+
## Troubleshooting
|
|
573
|
+
|
|
574
|
+
- Symptom → cause → fix (append entries as failures are root-caused)
|
|
575
|
+
|
|
576
|
+
## Rollback
|
|
577
|
+
|
|
578
|
+
- How to undo, and when undo stops being possible
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
583
|
+
## Protected Files
|
|
530
584
|
|
|
531
585
|
Use for: documenting critical files that need approval before modification.
|
|
532
586
|
|
|
587
|
+
This doc answers *what is protected and why breaking it hurts* — nothing more. Don't duplicate function-level detail here (signatures, inputs/outputs): it drifts from both the code and the owning feature doc. The owning feature doc is the canonical reference for how the code works; link to it.
|
|
588
|
+
|
|
533
589
|
```
|
|
534
590
|
# Protected Files
|
|
535
591
|
|
|
@@ -551,29 +607,22 @@ path/to/another/file.js
|
|
|
551
607
|
| Category 1 | Specific impact |
|
|
552
608
|
| Category 2 | Specific impact |
|
|
553
609
|
|
|
554
|
-
##
|
|
610
|
+
## Why Protected
|
|
555
611
|
|
|
556
612
|
### Category 1: [Name]
|
|
557
613
|
|
|
558
|
-
**Purpose:** What these files do
|
|
559
|
-
|
|
560
|
-
**
|
|
561
|
-
|
|
562
|
-
| Function | Input | Output | Purpose |
|
|
563
|
-
|------------|-------|--------|----------------|
|
|
564
|
-
| `func1()` | Type | Type | What it does |
|
|
565
|
-
| `func2()` | Type | Type | What it does |
|
|
566
|
-
|
|
567
|
-
**Critical Behavior:**
|
|
568
|
-
- Important point 1
|
|
614
|
+
**Purpose:** What these files do, one or two lines
|
|
615
|
+
**Owning doc:** [docs/features/{feature}.md] — canonical reference for how this code works
|
|
616
|
+
**Invariants:**
|
|
617
|
+
- The behavior that must not break, stated as a constraint (not a function tour)
|
|
569
618
|
- Important point 2
|
|
570
619
|
```
|
|
571
620
|
|
|
572
621
|
---
|
|
573
622
|
|
|
574
|
-
##
|
|
623
|
+
## Architecture Decision Record (ADR)
|
|
575
624
|
|
|
576
|
-
Use for: capturing a single
|
|
625
|
+
Use for: capturing a single architectural decision with its context, alternatives considered, and consequences. Lives in `docs/architecture/adr/` — co-located with the architecture it decides. An ADR is the **source of truth for its decision**: the body always states the current truth. When the decision is revisited, update the ADR in place — rewrite the affected sections to what is now true, bump `last-updated`, and record the revision in the **Decision Changelog**. Readers get the current decision from the body; the journey lives only in the changelog section.
|
|
577
626
|
|
|
578
627
|
### When to write an ADR
|
|
579
628
|
|
|
@@ -591,9 +640,9 @@ Don't write an ADR for:
|
|
|
591
640
|
|
|
592
641
|
### Lifecycle
|
|
593
642
|
|
|
594
|
-
`Proposed` → `Accepted` → `Deprecated`
|
|
643
|
+
`Proposed` → `Accepted` → `Deprecated`
|
|
595
644
|
|
|
596
|
-
|
|
645
|
+
An ADR stays `Accepted` for as long as its question is live — revisions update it in place. Set `Deprecated` only when the decision's question itself is retired (the component is gone, the contract no longer exists); state where the replacement lives, if any.
|
|
597
646
|
|
|
598
647
|
### Naming
|
|
599
648
|
|
|
@@ -601,18 +650,18 @@ ADRs are **immutable after acceptance**. If the decision changes, write a new AD
|
|
|
601
650
|
|
|
602
651
|
### Structure
|
|
603
652
|
|
|
604
|
-
Three sections are required: **Decision**, **Context**, **Consequences
|
|
653
|
+
Three sections are required: **Decision**, **Context**, **Consequences** — plus the **Decision Changelog** once the ADR has been revised at least once. Everything else is optional — include only when warranted. Decision-first: readers should see the answer in the first paragraph.
|
|
605
654
|
|
|
606
655
|
### Template
|
|
607
656
|
|
|
608
657
|
```markdown
|
|
609
658
|
---
|
|
610
659
|
title: "ADR-NNN: Short title in sentence case"
|
|
611
|
-
status: Accepted # Proposed | Accepted | Deprecated
|
|
612
|
-
|
|
660
|
+
status: Accepted # Proposed | Accepted | Deprecated
|
|
661
|
+
created: YYYY-MM-DD
|
|
662
|
+
last-updated: YYYY-MM-DD # bump on every revision
|
|
613
663
|
decision-owner: Name
|
|
614
664
|
reviewers: [] # optional
|
|
615
|
-
supersedes: # optional, e.g., ADR-005
|
|
616
665
|
tags: [adr]
|
|
617
666
|
---
|
|
618
667
|
|
|
@@ -659,13 +708,7 @@ tags: [adr]
|
|
|
659
708
|
|
|
660
709
|
## Architecture in Detail
|
|
661
710
|
|
|
662
|
-
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*.]
|
|
663
|
-
|
|
664
|
-
## Implementation Plan
|
|
665
|
-
|
|
666
|
-
| Phase | Scope | Duration |
|
|
667
|
-
| ----- | ----- | -------- |
|
|
668
|
-
| 1 | … | … |
|
|
711
|
+
[Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*. Execution belongs in a plan doc (`docs/history/plans/`) — link to it, don't embed an implementation plan here.]
|
|
669
712
|
|
|
670
713
|
## Open Questions
|
|
671
714
|
|
|
@@ -678,6 +721,13 @@ tags: [adr]
|
|
|
678
721
|
## References
|
|
679
722
|
|
|
680
723
|
- [External link or cross-reference]
|
|
724
|
+
|
|
725
|
+
## Decision Changelog
|
|
726
|
+
|
|
727
|
+
<!-- Append-only, newest first. One entry per revision: what changed in the decision, the trigger, and the previous choice. Added on the first revision; the initial acceptance is the first entry. -->
|
|
728
|
+
|
|
729
|
+
- YYYY-MM-DD — [What changed] because [trigger]. (Previously: [old choice].)
|
|
730
|
+
- YYYY-MM-DD — Initial decision accepted.
|
|
681
731
|
```
|
|
682
732
|
|
|
683
733
|
### Rules
|
|
@@ -686,14 +736,15 @@ tags: [adr]
|
|
|
686
736
|
- Decision-first. The first paragraph after the heading is the answer; readers should not need to scroll.
|
|
687
737
|
- No section numbering (`§5.1.1`). Use markdown headings only — inserting a section shouldn't renumber everything.
|
|
688
738
|
- Frontmatter `status` is the single source of truth for lifecycle. Don't also write "Status: Accepted" in the body.
|
|
689
|
-
-
|
|
690
|
-
- The
|
|
739
|
+
- **Revisions update the body in place.** Rewrite the affected sections to the current truth, bump `last-updated`, and append a Decision Changelog entry naming the old choice and the trigger. Never leave the superseded decision narrated in the body — the changelog carries the journey.
|
|
740
|
+
- The **Decision Changelog** is the one sanctioned dated-history section in an active doc: append-only, newest first. Typo and formatting fixes don't get entries.
|
|
741
|
+
- Execution detail lives in a plan doc, not the ADR — link, don't embed.
|
|
691
742
|
|
|
692
743
|
---
|
|
693
744
|
|
|
694
|
-
##
|
|
745
|
+
## Project Root README
|
|
695
746
|
|
|
696
|
-
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see
|
|
747
|
+
Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see **docs/README.md (Documentation Root)** above). The two coexist; don't merge them.
|
|
697
748
|
|
|
698
749
|
### Strategy
|
|
699
750
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nurix/etna",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.17",
|
|
4
4
|
"description": "Bootstrap a project with a Nurix harness — copies the harness's CLAUDE.md, skills, agents, rules, and hooks directly into the project from a bundled payload (no marketplace fetch, no network).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|