@nurix/etna 0.20.36 → 0.20.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/catalog/rules/frontend.md +5 -5
- package/data/catalog/rules/pnpm.md +2 -2
- package/data/catalog/skills/nustack/SKILL.md +2 -2
- package/data/catalog/skills/nustack/references/cli-design.md +35 -35
- package/data/catalog/skills/nustack/references/monorepo-master-list.md +6 -6
- package/data/catalog/skills/nustack/references/monorepo-setup.md +13 -13
- package/data/catalog/skills/nustack/references/publishing.md +40 -39
- package/data/harness-index.json +1 -1
- package/data/harnesses/code/harness.json +2 -2
- package/data/harnesses/code/hooks/approved-packages.md +1 -2
- package/data/harnesses/code/rules/frontend.md +5 -5
- package/data/harnesses/code/rules/pnpm.md +2 -2
- package/data/harnesses/code/skills/boundary/SKILL.md +33 -22
- package/data/harnesses/code/skills/boundary/references/index.md +2 -4
- package/data/harnesses/code/skills/boundary/references/mechanisms.md +3 -10
- package/data/harnesses/code/skills/boundary/references/packs/build-config-runtime.md +1 -1
- package/data/harnesses/code/skills/boundary/references/packs/frontend.md +17 -17
- package/data/harnesses/code/skills/boundary/references/packs/generic-tail.md +1 -1
- package/data/harnesses/code/skills/brainstorm/README.md +11 -13
- package/data/harnesses/code/skills/brainstorm/SKILL.md +150 -132
- package/data/harnesses/code/skills/brainstorm/references/doctrine.md +48 -51
- package/data/harnesses/code/skills/brainstorm/references/harvest.md +51 -56
- package/data/harnesses/code/skills/brainstorm/references/session-schema.md +48 -42
- package/data/harnesses/code/skills/design/SKILL.md +31 -35
- package/data/harnesses/code/skills/design/components/charts.md +121 -43
- package/data/harnesses/code/skills/design/components/collections.md +209 -41
- package/data/harnesses/code/skills/design/components/feedback.md +86 -25
- package/data/harnesses/code/skills/design/components/hooks.md +198 -12
- package/data/harnesses/code/skills/design/components/index.md +93 -71
- package/data/harnesses/code/skills/design/components/inputs.md +249 -157
- package/data/harnesses/code/skills/design/components/layout.md +98 -38
- package/data/harnesses/code/skills/design/components/media.md +46 -25
- package/data/harnesses/code/skills/design/components/motion.md +56 -46
- package/data/harnesses/code/skills/design/components/navigation.md +54 -15
- package/data/harnesses/code/skills/design/components/overlays.md +51 -41
- package/data/harnesses/code/skills/design/components/setup.md +84 -5
- package/data/harnesses/code/skills/design/components/typography.md +72 -22
- package/data/harnesses/code/skills/design/components/utils.md +47 -13
- package/data/harnesses/code/skills/design/data/chrome/board-column.md +12 -12
- package/data/harnesses/code/skills/design/data/chrome/data-table.md +6 -6
- package/data/harnesses/code/skills/design/data/chrome/side-panel.md +15 -15
- package/data/harnesses/code/skills/design/data/chrome/sidebar.md +25 -25
- package/data/harnesses/code/skills/design/data/chrome/stat-cards.md +22 -22
- package/data/harnesses/code/skills/design/data/chrome/topbar.md +12 -12
- package/data/harnesses/code/skills/design/data/iconography.md +2 -2
- package/data/harnesses/code/skills/design/references/compose.md +14 -16
- package/data/harnesses/code/skills/design/references/emission.md +6 -6
- package/data/harnesses/code/skills/design/references/foundations.md +5 -5
- package/data/harnesses/code/skills/design/references/intake.md +6 -6
- package/data/harnesses/code/skills/design/references/object-pass.md +1 -1
- package/data/harnesses/code/skills/design/references/ship-gate.md +5 -5
- package/data/harnesses/code/skills/design/references/ux-patterns/Readme.md +4 -4
- package/data/harnesses/code/skills/design/references/ux-patterns/ai-layer.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/container-choice.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/dashboards.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/modes.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/object-model.md +2 -2
- package/data/harnesses/code/skills/design/references/ux-patterns/promotion-demotion.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/settings.md +1 -1
- package/data/harnesses/code/skills/design/references/ux-patterns/standard-pages.md +1 -1
- package/data/harnesses/code/skills/design/scripts/README-validator.md +20 -8
- package/data/harnesses/code/skills/design/scripts/validate-design-md.mjs +15 -10
- package/data/harnesses/code/skills/documentation/SKILL.md +5 -5
- package/data/harnesses/code/skills/documentation/references/examples.md +22 -22
- package/data/harnesses/code/skills/documentation/references/frontmatter.md +3 -3
- package/data/harnesses/code/skills/documentation/references/instruction-style.md +3 -3
- package/data/harnesses/code/skills/documentation/references/source-comments.md +3 -3
- package/data/harnesses/code/skills/documentation/references/style-guide.md +5 -5
- package/data/harnesses/code/skills/documentation/references/untemplated.md +8 -8
- package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +3 -2
- package/data/harnesses/code/skills/documentation/templates/Readme.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/acceptance-criteria.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/api-reference.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/architecture-decision.md +3 -7
- package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/changelog-index.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/docs-readme.md +3 -3
- package/data/harnesses/code/skills/documentation/templates/doctrine.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/domain-model.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/environment-registry.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/feature.md +3 -3
- package/data/harnesses/code/skills/documentation/templates/handover.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/implementation-map.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/migration-runbook.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/non-goals.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/operations-procedure.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/package.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/protected-files.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/root-readme.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/security-overview.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/system-overview.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/testing-strategy.md +1 -1
- package/data/harnesses/code/skills/documentation/templates/ux-behavior.md +3 -5
- package/data/harnesses/code/skills/issue-bridge/SKILL.md +51 -16
- package/data/harnesses/code/skills/issue-bridge/references/trackers/github.md +5 -5
- package/data/harnesses/code/skills/issue-bridge/references/trackers/jira.md +11 -8
- package/data/harnesses/code/skills/issue-bridge/references/trackers/linear.md +16 -11
- package/data/harnesses/code/skills/nustack-graph/SKILL.md +38 -29
- package/data/harnesses/code/skills/polygraph/references/dispatch.md +31 -18
- package/data/harnesses/code/skills/polygraph/references/rows.md +11 -6
- package/data/harnesses/code/skills/schema-design/SKILL.md +39 -41
- package/data/harnesses/code/skills/test/SKILL.md +38 -42
- package/data/harnesses/code/skills/testing/SKILL.md +83 -73
- package/data/harnesses/code/skills/workflow-mapper/SKILL.md +156 -193
- package/data/harnesses/code/skills/workflow-mapper/references/patterns.md +15 -15
- package/data/harnesses/delivery/harness.json +2 -2
- package/data/harnesses/delivery/skills/brainstorm/README.md +11 -13
- package/data/harnesses/delivery/skills/brainstorm/SKILL.md +150 -132
- package/data/harnesses/delivery/skills/brainstorm/references/doctrine.md +48 -51
- package/data/harnesses/delivery/skills/brainstorm/references/harvest.md +51 -56
- package/data/harnesses/delivery/skills/brainstorm/references/session-schema.md +48 -42
- package/data/harnesses/delivery/skills/cost-report/SKILL.md +10 -10
- package/data/harnesses/delivery/skills/documentation/SKILL.md +5 -5
- package/data/harnesses/delivery/skills/documentation/references/examples.md +22 -22
- package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +3 -3
- package/data/harnesses/delivery/skills/documentation/references/instruction-style.md +3 -3
- package/data/harnesses/delivery/skills/documentation/references/source-comments.md +3 -3
- package/data/harnesses/delivery/skills/documentation/references/style-guide.md +5 -5
- package/data/harnesses/delivery/skills/documentation/references/untemplated.md +8 -8
- package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +3 -2
- package/data/harnesses/delivery/skills/documentation/templates/Readme.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/acceptance-criteria.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/api-reference.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/architecture-decision.md +3 -7
- package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/changelog-index.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/docs-readme.md +3 -3
- package/data/harnesses/delivery/skills/documentation/templates/doctrine.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/domain-model.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/environment-registry.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/feature.md +3 -3
- package/data/harnesses/delivery/skills/documentation/templates/handover.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/migration-runbook.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/non-goals.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/operations-procedure.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/package.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/protected-files.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/root-readme.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/security-overview.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/system-overview.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/testing-strategy.md +1 -1
- package/data/harnesses/delivery/skills/documentation/templates/ux-behavior.md +3 -5
- package/data/harnesses/delivery/skills/escalate/SKILL.md +11 -11
- package/data/harnesses/delivery/skills/prompt-eval/SKILL.md +8 -8
- package/data/harnesses/delivery/skills/prompt-library/SKILL.md +30 -9
- package/data/harnesses/delivery/skills/route/SKILL.md +8 -8
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/skills/boundary/SKILL.md +33 -22
- package/data/harnesses/etna/skills/boundary/references/index.md +2 -4
- package/data/harnesses/etna/skills/boundary/references/mechanisms.md +3 -10
- package/data/harnesses/etna/skills/boundary/references/packs/build-config-runtime.md +1 -1
- package/data/harnesses/etna/skills/boundary/references/packs/frontend.md +17 -17
- package/data/harnesses/etna/skills/boundary/references/packs/generic-tail.md +1 -1
- package/data/harnesses/etna/skills/brainstorm/README.md +11 -13
- package/data/harnesses/etna/skills/brainstorm/SKILL.md +150 -132
- package/data/harnesses/etna/skills/brainstorm/references/doctrine.md +48 -51
- package/data/harnesses/etna/skills/brainstorm/references/harvest.md +51 -56
- package/data/harnesses/etna/skills/brainstorm/references/session-schema.md +48 -42
- package/data/harnesses/etna/skills/documentation/SKILL.md +5 -5
- package/data/harnesses/etna/skills/documentation/references/examples.md +22 -22
- package/data/harnesses/etna/skills/documentation/references/frontmatter.md +3 -3
- package/data/harnesses/etna/skills/documentation/references/instruction-style.md +3 -3
- package/data/harnesses/etna/skills/documentation/references/source-comments.md +3 -3
- package/data/harnesses/etna/skills/documentation/references/style-guide.md +5 -5
- package/data/harnesses/etna/skills/documentation/references/untemplated.md +8 -8
- package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +3 -2
- package/data/harnesses/etna/skills/documentation/templates/Readme.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/acceptance-criteria.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/api-reference.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/architecture-decision.md +3 -7
- package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/changelog-index.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/docs-readme.md +3 -3
- package/data/harnesses/etna/skills/documentation/templates/doctrine.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/domain-model.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/environment-registry.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/feature.md +3 -3
- package/data/harnesses/etna/skills/documentation/templates/handover.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/migration-runbook.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/non-goals.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/operations-procedure.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/package.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/protected-files.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/root-readme.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/security-overview.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/system-overview.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/system.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/testing-strategy.md +1 -1
- package/data/harnesses/etna/skills/documentation/templates/ux-behavior.md +3 -5
- package/data/harnesses/etna/skills/workflow-mapper/SKILL.md +156 -193
- package/data/harnesses/etna/skills/workflow-mapper/references/patterns.md +15 -15
- package/data/harnesses/hr/harness.json +2 -2
- package/data/harnesses/hr/skills/evaluator/SKILL.md +71 -73
- package/data/harnesses/hr/skills/evaluator/criteria/code-quality.md +28 -47
- package/data/harnesses/hr/skills/evaluator/criteria/deployment-readiness.md +33 -43
- package/data/harnesses/hr/skills/evaluator/criteria/maintainability.md +34 -46
- package/data/harnesses/hr/skills/evaluator/criteria/mechanical-ambition.md +13 -13
- package/data/harnesses/hr/skills/evaluator/criteria/problem-substantiveness.md +7 -7
- package/data/harnesses/hr/skills/evaluator/criteria/testing.md +36 -41
- package/data/harnesses/hr/skills/evaluator/criteria/ux-mechanics.md +25 -11
- package/data/harnesses/hr/skills/evaluator/criteria/value-articulation.md +7 -7
- package/data/harnesses/hr/skills/evaluator/preflight.md +27 -46
- package/data/harnesses/hr/skills/interview-eval/SKILL.md +37 -42
- package/data/harnesses/hr/skills/interview-eval/rubric.md +21 -23
- package/package.json +2 -2
|
@@ -6,27 +6,26 @@ this reference carries the routing judgment.
|
|
|
6
6
|
|
|
7
7
|
The pipeline, end to end:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
manifest (gap-round fixes included).
|
|
9
|
+
1. Converge.
|
|
10
|
+
2. Final sync and compose → manifest (`Status: proposed`).
|
|
11
|
+
3. **One** user approval (`Status: approved`).
|
|
12
|
+
4. Apply, reading both sides of every destination (`Status: applied`).
|
|
13
|
+
5. Uselessness test — gaps open a new `Round` and return to step 3.
|
|
14
|
+
6. Move to `docs/history/brainstorms/{topic}/` — the completion marker.
|
|
15
|
+
7. Offer: delete or commit — the user decides.
|
|
16
|
+
|
|
17
|
+
**Harvest fails loud, never silent.** The move happens **only** after the full apply passes the
|
|
18
|
+
uselessness test. A partial apply — twin death, session kill, anything — leaves the folder visibly
|
|
19
|
+
unfinished in `docs/research/`, and the user restarts the stop. The pipeline **never** resumes
|
|
20
|
+
silently from a half-applied state, and **never** writes a canonical doc without an approved
|
|
21
|
+
manifest, gap-round fixes included.
|
|
23
22
|
|
|
24
23
|
## The routing map
|
|
25
24
|
|
|
26
|
-
Route each piece of the surface by scope. Format every artifact
|
|
27
|
-
where it is unavailable,
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
Route each piece of the surface by scope. Format every artifact through the `documentation` skill;
|
|
26
|
+
where it is unavailable, format it yourself and record in the manifest which path ran. Read **both
|
|
27
|
+
sides** of every destination before writing — the destination's current content is a contract, not
|
|
28
|
+
a blank page.
|
|
30
29
|
|
|
31
30
|
| What | Goes to | Shape |
|
|
32
31
|
| --- | --- | --- |
|
|
@@ -36,7 +35,7 @@ contract, not a blank page.
|
|
|
36
35
|
| **Domain-model changes** | The living domain-model doc | The information-architecture contract the `boundary` skill reads at the next plan check |
|
|
37
36
|
| **Still-open (parked) forks** | The repo's open-questions home | Each with a *resolution-lands-in* pointer |
|
|
38
37
|
| **Backlog items** | The repo backlog | See the scope-guard trio below |
|
|
39
|
-
| **Fragments** | Their destinations —
|
|
38
|
+
| **Fragments** | Their destinations — drafted in destination format, so this is a move, not a translation | Merge per the destination's existing structure |
|
|
40
39
|
|
|
41
40
|
**The scope-guard trio** disambiguates everything that isn't a commitment:
|
|
42
41
|
|
|
@@ -47,13 +46,12 @@ contract, not a blank page.
|
|
|
47
46
|
|
|
48
47
|
**Directional steering is not feature truth.** A harvested principle informs many decisions and
|
|
49
48
|
changes slowly; a feature fact belongs to its feature doc and changes at code speed. The harvest
|
|
50
|
-
**links** between the steering layer and feature docs —
|
|
51
|
-
|
|
52
|
-
docs).
|
|
49
|
+
**links** between the steering layer and feature docs — **never** duplicates prose across them, and
|
|
50
|
+
**never** invents a new top-level home for principles; they land in the *existing* living docs.
|
|
53
51
|
|
|
54
|
-
Rejection rationale and reasoning chains must have explicit destinations — options-considered
|
|
55
|
-
sections, decision changelogs — or the uselessness test fails: the folder
|
|
56
|
-
|
|
52
|
+
Rejection rationale and reasoning chains **must** have explicit destinations — options-considered
|
|
53
|
+
sections, decision changelogs — or the uselessness test fails: the folder is **never** deleted into
|
|
54
|
+
a knowledge loss.
|
|
57
55
|
|
|
58
56
|
## The uselessness test
|
|
59
57
|
|
|
@@ -68,48 +66,53 @@ The deletion-safety gate: after the apply, the post-harvest living docs alone mu
|
|
|
68
66
|
- **The task:** reconstruct the design — thesis, commitments, reasoning, declined branches — from
|
|
69
67
|
the allowed paths only.
|
|
70
68
|
- **Grading:** the twin diffs the reconstruction against the ledger and thesis and names every
|
|
71
|
-
gap; the session-replay evals audit the grading itself. Anything unrecoverable is a named
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
gap; the session-replay evals audit the grading itself. Anything unrecoverable is a named harvest
|
|
70
|
+
gap, recorded in the manifest (`Result: fail`); its fixes enter a new manifest `Round`, approved
|
|
71
|
+
like the first. Iterate until the folder is redundant.
|
|
74
72
|
|
|
75
73
|
## The move, and the offer
|
|
76
74
|
|
|
77
|
-
When the detector's move gate is clean:
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
When the detector's move gate is clean:
|
|
76
|
+
|
|
77
|
+
1. Delete `ops/` entirely — transcript-grade residue **never** enters git.
|
|
78
|
+
2. `git mv` the folder to `docs/history/brainstorms/{topic}/`.
|
|
79
|
+
3. Set `Status: harvested` in `state.md`.
|
|
80
|
+
|
|
81
|
+
Update no index — none keeps a row per session. The move is the completion marker: a folder under
|
|
80
82
|
`docs/research/` is by definition unfinished, which is exactly what the maintenance census reads.
|
|
81
83
|
|
|
82
84
|
Then the offer, relayed by the facilitator: **delete the moved folder, or commit it.** The user
|
|
83
|
-
decides; the design assumes deletion — nothing anywhere may depend on the folder surviving.
|
|
84
|
-
Committing is the explicit way to keep git-history forensics; an uncommitted folder deleted here
|
|
85
|
-
|
|
85
|
+
decides; the design assumes deletion — **nothing** anywhere may depend on the folder surviving.
|
|
86
|
+
Committing is the explicit way to keep git-history forensics; an uncommitted folder deleted here is
|
|
87
|
+
gone, and that loss is accepted by design.
|
|
86
88
|
|
|
87
89
|
## Field lessons — apply
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
Each is a rule measured on live harvests.
|
|
90
92
|
|
|
91
93
|
- **Run the move gate clean immediately before the move and treat that as the verdict** — the
|
|
92
94
|
gate's checks read `ops/`, which the move deletes, so a post-move re-run fails by construction.
|
|
93
|
-
Verify the post-move state by hand: `Status: harvested`, no `ops/`,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
its
|
|
95
|
+
Verify the post-move state by hand: `Status: harvested`, no `ops/`, `check-links` clean.
|
|
96
|
+
- **Distil the process record into `state.md` before the move** — the sync log dies with `ops/`,
|
|
97
|
+
and a ten-line dispatch summary separates a record that shows its workings from one that asserts
|
|
98
|
+
its commitments from nowhere.
|
|
97
99
|
- **Uncommitted harvest artifacts are deleted, not deprecated** — deprecate-in-place protects
|
|
98
100
|
readers holding a pointer, and a never-committed file has none; a tombstone for a
|
|
99
101
|
twenty-minute-old file is ceremony.
|
|
100
|
-
- **
|
|
101
|
-
through the docs
|
|
102
|
-
commitment-level, not textual
|
|
103
|
-
|
|
104
|
-
- **A manifest
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Say which you did, per row, in the application
|
|
102
|
+
- **At manifest time, read every existing AD's Decision and Open Questions against the new
|
|
103
|
+
commitments.** A harvest routes only through the docs its commitments name, and the test is
|
|
104
|
+
commitment-level, not textual — grep finds nothing, because the ledger never names the
|
|
105
|
+
neighbours. Report the unimpacted verdicts with their evidence too.
|
|
106
|
+
- **A manifest row names one site; the file you open holds more.** Fix every same-doctrine site
|
|
107
|
+
inside a file the manifest already opens — a self-contradicting document is worse than a wider
|
|
108
|
+
diff — but **never** wander into an unnamed file: that becomes a backlog row, because a canonical
|
|
109
|
+
doc is not rewritten outside an approved scope. Say which you did, per row, in the application
|
|
110
|
+
record.
|
|
108
111
|
- **Re-run the uselessness test when the destination *set* changes**, not only when content does —
|
|
109
112
|
a consolidation that moves referrers produces a document set no cold reader has graded. The
|
|
110
113
|
recurring find: a truth doc stating a decided-but-unbuilt mechanism in the present tense; the
|
|
111
114
|
fix is one clause naming the unbuilt prerequisite.
|
|
112
|
-
- **Retirement wording beats suppression.** doc-lint's heuristics block the honest retirement
|
|
115
|
+
- **Retirement wording beats suppression.** `doc-lint`'s heuristics block the honest retirement
|
|
113
116
|
sentence (`superseded by`, `no longer`); rephrase with no loss of meaning — "retired by
|
|
114
117
|
AD-00N", "is not the product's position", "lives in a package that is gone" — and reach for
|
|
115
118
|
`doc-lint-disable` only when the banned phrase is itself the claim.
|
|
@@ -134,14 +137,6 @@ Measured on live harvests; each is the rule, distilled.
|
|
|
134
137
|
keeping its Decision, Why and Declined table — and a separate AD only for a genuinely different
|
|
135
138
|
subject. Link with section anchors where a bare pointer loses precision, and verify anchors by
|
|
136
139
|
hand: the link checker strips them before resolving.
|
|
137
|
-
- **At manifest time, read every existing AD's Decision and Open Questions against the new
|
|
138
|
-
commitments.** A harvest routes only through the docs its commitments name, and grep finds
|
|
139
|
-
nothing because the ledger never names the others; report the unimpacted verdicts with their
|
|
140
|
-
evidence too.
|
|
141
|
-
- **A manifest row names one site; the file you open holds more.** Fix the same-doctrine sites
|
|
142
|
-
inside a file the manifest already opens, but never wander into an unnamed file — that becomes a
|
|
143
|
-
backlog row, because a canonical doc is not rewritten outside an approved scope. Say which you did,
|
|
144
|
-
per row, in the application record.
|
|
145
140
|
- **The per-file lint hook reads intermediate states.** It appends queue rows from mid-edit files;
|
|
146
141
|
run the linter over the whole edited set before declaring the apply done, and leave the stale
|
|
147
142
|
rows for the facilitator rather than draining them.
|
|
@@ -2,35 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Load when: bootstrapping a session, writing any working-surface file, dispatching the twin, or
|
|
4
4
|
interpreting detector output. The detector (`scripts/detector.mjs`) is the mechanical half of this
|
|
5
|
-
contract
|
|
6
|
-
|
|
5
|
+
contract: every rule below carrying a rule ID is machine-checked; everything else is the twin's
|
|
6
|
+
semantic judgment.
|
|
7
7
|
|
|
8
8
|
## Folder layout
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
On a passed harvest the folder **moves** to `docs/history/brainstorms/{topic}
|
|
27
|
-
first
|
|
10
|
+
An open session is `docs/research/{topic}-brainstorm/` (kebab-case topic slug):
|
|
11
|
+
|
|
12
|
+
| Path | Holds | Writer |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `state.md` | anchor + aspect map | twin |
|
|
15
|
+
| `thesis.md` | composed claim → argument → what changed | twin |
|
|
16
|
+
| `forks.md` | open questions with close conditions | twin |
|
|
17
|
+
| `ledger.md` | commitments | twin |
|
|
18
|
+
| `basis/` | frozen entry material | facilitator, once, at intake |
|
|
19
|
+
| `fragments/` | harvest-native fragments, drafted in destination format; created on first real content | twin |
|
|
20
|
+
| `ops/` | the untracked capture layer, deleted at stop | — |
|
|
21
|
+
| `ops/.gitignore` | `*` — `ops/` **never** enters git [BS-OPS-01/02] | facilitator |
|
|
22
|
+
| `ops/capture.md` | the facilitator's raw append ledger | facilitator |
|
|
23
|
+
| `ops/sync-log.md` | the paired twin-dispatch log | both (see below) |
|
|
24
|
+
| `ops/manifest.md` | the harvest manifest | twin, in the stop pipeline |
|
|
25
|
+
|
|
26
|
+
On a passed harvest the folder **moves** to `docs/history/brainstorms/{topic}/`, `ops/` deleted
|
|
27
|
+
first. The move is the completion marker; the user then deletes or commits the folder. A folder
|
|
28
28
|
under `docs/research/` is by definition unfinished.
|
|
29
29
|
|
|
30
|
-
**Write protocol (one writer per file):** the facilitator
|
|
31
|
-
the initial `basis/` copy plus the sync-log *dispatch* lines —
|
|
32
|
-
every other file, at gates. The user may hand-edit anything;
|
|
33
|
-
own last compose before rewriting and folds foreign edits
|
|
30
|
+
**Write protocol (one writer per file; the sync log is paired):** the facilitator bootstraps `ops/` at intake, appends to
|
|
31
|
+
`ops/capture.md`, and writes the initial `basis/` copy plus the sync-log *dispatch* lines —
|
|
32
|
+
**nothing else, ever**. The twin writes every other file, at gates. The user may hand-edit anything;
|
|
33
|
+
the twin diffs each file against its own last compose before rewriting and folds foreign edits in
|
|
34
|
+
as first-class user signal.
|
|
34
35
|
|
|
35
36
|
## state.md
|
|
36
37
|
|
|
@@ -50,8 +51,8 @@ own last compose before rewriting and folds foreign edits as first-class user si
|
|
|
50
51
|
- risks — failure modes and mitigations → none yet
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
- `Status`
|
|
54
|
-
|
|
54
|
+
- `Status` moves **only** forward: `open → stopping → harvested` — the twin sets `stopping` when the
|
|
55
|
+
stop pipeline begins and `harvested` at the move [BS-STATE-01].
|
|
55
56
|
- The aspect map is derived per idea from the basis and edited by the user. Each aspect carries
|
|
56
57
|
`→` refs to the content covering it: fork IDs (`F#`), ledger IDs (`D#`), `thesis`,
|
|
57
58
|
`fragment:{name}`, or `none yet` (an open coverage gap — informational mid-session
|
|
@@ -70,8 +71,8 @@ Current as of: 2026-07-08T14:30Z
|
|
|
70
71
|
## What changed
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
Composed prose, rewritten whole at every compose, never appended. The three sections and the
|
|
74
|
-
stamp are mandatory [BS-THESIS-01]; the stamp must equal state.md's `Last compose`
|
|
74
|
+
Composed prose, rewritten whole at every compose, **never** appended. The three sections and the
|
|
75
|
+
stamp are mandatory [BS-THESIS-01]; the stamp must equal `state.md`'s `Last compose`
|
|
75
76
|
[BS-COMPOSE-01]. At the manifest gate, `Last compose` must be later than the newest
|
|
76
77
|
`ops/capture.md` entry — a compose over unsynced capture is stale [BS-COMPOSE-02].
|
|
77
78
|
|
|
@@ -89,8 +90,8 @@ Full self-contained prose in the user's framing.
|
|
|
89
90
|
- IDs `F1, F2, …` unique, never reused [BS-FORK-01]. Status marker: `[open]` or
|
|
90
91
|
`[parked → {destination}]`. Every fork carries `Closes when:` [BS-FORK-01].
|
|
91
92
|
- `Raised by: twin (S#)` must cite a reconciled sync-log entry [BS-SYNC-02].
|
|
92
|
-
- **
|
|
93
|
-
|
|
93
|
+
- **The twin deletes a resolved fork's entry** — the resolving ledger entry's `Resolves:` field is
|
|
94
|
+
the record. `forks.md` holds only open and parked forks; a ledger `Resolves: F3`
|
|
94
95
|
coexisting with an open F3 is an inconsistency [BS-FORK-02]. Parked forks survive to the
|
|
95
96
|
manifest, which must route each one [BS-MANIFEST-01].
|
|
96
97
|
- The manifest gate requires zero `[open]` forks [BS-FORK-03].
|
|
@@ -115,10 +116,10 @@ Full self-contained prose in the user's framing.
|
|
|
115
116
|
|
|
116
117
|
## ops/capture.md
|
|
117
118
|
|
|
118
|
-
The facilitator's per-turn append
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
The facilitator's per-turn append. Lowest possible bar: raw, unpolished, everything
|
|
120
|
+
session-relevant from *both* sides (user substance and facilitator substance — diagnoses, informed
|
|
121
|
+
rejections, definitions, reasoning chains), including residue judged not worth pillar filing.
|
|
122
|
+
Format:
|
|
122
123
|
|
|
123
124
|
```markdown
|
|
124
125
|
---
|
|
@@ -127,8 +128,8 @@ worth pillar filing. Format:
|
|
|
127
128
|
<raw notes for this turn>
|
|
128
129
|
```
|
|
129
130
|
|
|
130
|
-
Turn IDs `T#`
|
|
131
|
-
|
|
131
|
+
Turn IDs `T#` ascend, each with an ISO timestamp — the timestamp compose-freshness checks against
|
|
132
|
+
[BS-COMPOSE-02]. **Never** distill here; distillation is the twin's.
|
|
132
133
|
|
|
133
134
|
## ops/sync-log.md
|
|
134
135
|
|
|
@@ -140,7 +141,7 @@ S4 → reconciled | 2026-07-08T14:29Z | 4 edits · 2 new forks · 6 open · unto
|
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
The **facilitator** writes the dispatch line as it dispatches; the **twin** appends the result
|
|
143
|
-
line (`reconciled` or `failed`) on return —
|
|
144
|
+
line (`reconciled` or `failed`) on return — **never** one author for both sides. Every dispatch
|
|
144
145
|
line must acquire a result line; only the newest entry may be unpaired (in flight) [BS-SYNC-01].
|
|
145
146
|
A `failed` result is surfaced to the user at the next turn break and re-run at the next gate.
|
|
146
147
|
|
|
@@ -181,8 +182,13 @@ the move to history requires a recorded passing uselessness test [BS-USELESS-01]
|
|
|
181
182
|
- `move` — adds the post-apply gates (manifest applied, uselessness pass recorded, no links into
|
|
182
183
|
scaffolding); the folder may not move while any fail.
|
|
183
184
|
|
|
184
|
-
Exit
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
| Exit | Meaning |
|
|
186
|
+
| --- | --- |
|
|
187
|
+
| `0` | clean |
|
|
188
|
+
| `1` | violations, listed with rule IDs |
|
|
189
|
+
| `2` | unusable input |
|
|
190
|
+
|
|
191
|
+
A run always prints output — per-rule lines plus a `clean`/`failing` summary, or a usage/error
|
|
192
|
+
message. **Exit 0 with empty output means the detector never executed** — a failure, **never** a
|
|
193
|
+
pass. Rules degrade gracefully: with no git context, `BS-OPS-02` reports `skipped` and never blocks.
|
|
194
|
+
Rule IDs are stable — the twin, the evals, and the maintenance census key on them.
|
|
@@ -5,20 +5,20 @@ description: Use when the organization wants to see or tune spend - "what are we
|
|
|
5
5
|
|
|
6
6
|
# Cost Report — aggregate, flag, propose
|
|
7
7
|
|
|
8
|
-
The spend policy's audit surface.
|
|
8
|
+
The spend policy's audit surface. It reads only in-repo records — the changelog and the escalation entries in it. **Never** query a billing API or parse session logs; a question only those could answer (raw token counts, per-session spend) is out of scope — say so rather than estimate.
|
|
9
9
|
|
|
10
10
|
## Procedure
|
|
11
11
|
|
|
12
|
-
1. **Collect** every entry in `docs/history/changelog/` carrying `Class: escalation` since the last report
|
|
13
|
-
2. **Aggregate by routing row**: per task type
|
|
12
|
+
1. **Collect** every entry in `docs/history/changelog/` carrying `Class: escalation` since the last report, plus the tier usage the other entries record. Match on the keyword only — the `escalate` skill owns the entry's shape.
|
|
13
|
+
2. **Aggregate by routing row**: per task type, count escalations up, demotions passed, and one-off vs. standing promotions.
|
|
14
14
|
3. **Flag drift**:
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
4. **Report in chat**: a
|
|
15
|
+
- Repeated upward escalations on a row ⇒ the tier is under-provisioned; propose moving the row up.
|
|
16
|
+
- Demotion experiments that keep passing on a row ⇒ over-provisioned; propose moving it down.
|
|
17
|
+
- A frontier dispatch with no matching row or escalation entry ⇒ a routing-guardrail violation. Surface it; never fold it into the row's normal usage.
|
|
18
|
+
4. **Report in chat**: a table — row · tier · escalations · demotions · proposal — then the proposed routing-table edits. Append each standing proposal to `docs/history/backlog.md`.
|
|
19
19
|
|
|
20
20
|
## Rules
|
|
21
21
|
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
-
|
|
22
|
+
- **Propose, never apply.** The routing table is `CLAUDE.md` policy and moves only by its own reviewed edit.
|
|
23
|
+
- **Evidence or silence** — every proposal cites its entries by filename.
|
|
24
|
+
- **Measure the policy, never the people.** Escalation counts tune the table; never frame them as individual performance data.
|
|
@@ -3,7 +3,7 @@ name: documentation
|
|
|
3
3
|
description: "Use when creating or substantively editing ANY markdown doc — invoke BEFORE writing. Genre registry, templates and style authority for technical docs: LLDs, ADs, plans, changelogs, READMEs, runbooks. Owns the tense rule: truth docs state the present; history only in dated records. Baselining is the maintenance agent."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Technical
|
|
6
|
+
# Technical documentation skill
|
|
7
7
|
|
|
8
8
|
This skill writes one document at a time: the genre registry says what kind of document it is, a template gives its shape, the style guide its prose, and `doc-lint` checks the mechanical half. It does not baseline, audit or reconcile a repo's doc tree; that is the `maintenance` agent, which calls this skill once per document it scaffolds.
|
|
9
9
|
|
|
@@ -67,7 +67,7 @@ The full strip-list and the record-side rules: `references/style-guide.md` § Th
|
|
|
67
67
|
- **Intent and promises; facts are the graph's.** An owning document (feature, package, system) says why the product is shaped this way and what it promises, and names the objects it designs in `objects:`. Every computable fact (a table's columns, which function writes which column, which route sits behind which guard, which file holds what) is the code's, and a hand-typed copy is wrong the day the code moves. `doc-lint` blocks the retired mechanism sections (`mechanism-section`) and an owning document with no `objects:`.
|
|
68
68
|
- **Read by people, pointed at by the footer.** Sharp bullets under noun-phrase headings, each a bold label, a colon, one or two plain sentences; code named only where a person types or sees it, or at a cross-cutting seam; every other pointer in the closing **For the agent** footer (style guide § Owning documents — the body and the footer).
|
|
69
69
|
- **The stability test.** A sentence that would change when a function is renamed, a file moves, or a route, column or error code changes is the code's, not the document's. The code is the authority on *what*; the document on *why* (style guide § Shape).
|
|
70
|
-
- **Unbuilt work has one home per kind.** Decided design
|
|
70
|
+
- **Unbuilt work has one home per kind.** Decided, unbuilt design sits in the body, wrapped in an `UNBUILT` marker; a shortfall in what is built is one bullet under Gaps; the work that would close either is a backlog row, which the document never tracks (style guide § The stability test).
|
|
71
71
|
- **No empty stubs.** Omit a section with nothing real to say. Write "None" only where the absence is itself information, such as a plan's Cross-Module Contracts Affected.
|
|
72
72
|
- **No redirect documents.** Moving a document deletes the old file and repoints every inbound link; a "Moved to X" stub rots and creates false search hits.
|
|
73
73
|
|
|
@@ -78,9 +78,9 @@ The full strip-list and the record-side rules: `references/style-guide.md` § Th
|
|
|
78
78
|
- **The links an index may carry:** a sibling folder's `Readme.md`, the mandated scaffolds (`structure.md`, `operations/setup.md`, `history/CHANGELOG.md`, `history/backlog.md`, `history/journal.md`, `history/health-log.md`, `memory/main.md`), and the root `CLAUDE.md` and `AGENTS.md`. `doc-lint` blocks the rest under `docs/` as `index-lists-files`, a drawn tree as `index-file-tree`, a named file or record as `index-names-records`.
|
|
79
79
|
- **Routing documents point at truth.** A "read first" row names the topic's truth document, never a plan or changelog entry. An index of the records themselves (a History section naming `plans/` and `changelog/`) is sanctioned.
|
|
80
80
|
|
|
81
|
-
### Ownership
|
|
81
|
+
### Ownership edges
|
|
82
82
|
|
|
83
|
-
A document names the objects it designs in `objects:`, and a source file names the document that speaks for it in its path header. The harness's ownership scan reads one edge
|
|
83
|
+
A document names the objects it designs in `objects:`, and a source file names the document that speaks for it in its path header. The harness's ownership scan reads one edge: the transitional `owns:` region glob on each feature, package, system and surface-owning UX document, the narrower glob winning. **Always write the header pointer as well** — the scan switches to it and to the object closure, and pointers already in place spare that switch a second pass over the code. Where a repository has no `docs/architecture/systems/knowledge-layer.md`, this skill and `references/frontmatter.md` are the whole authority on document–code edges. `docs/structure.md` is harness-owned: the installer writes it, and the `maintenance` agent stamps only its `harness-version`.
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
@@ -113,7 +113,7 @@ A document names the objects it designs in `objects:`, and a source file names t
|
|
|
113
113
|
| Scaffold a standard doc (docs index, changelog guide, backlog, memory) | The registry's § Baseline scaffolds |
|
|
114
114
|
| Frontmatter keys (`objects:`, `verifies:`, the transitional `owns:`) | [`references/frontmatter.md`](references/frontmatter.md) |
|
|
115
115
|
| Source-file comments: what stays, what moves to a doc, proving a sweep | [`references/source-comments.md`](references/source-comments.md) |
|
|
116
|
-
| Instruction file (`CLAUDE.md`, a rule, an agent, skill prose) | [`references/instruction-style.md`](references/instruction-style.md): every-load prose stays lean; the present-tense rule
|
|
116
|
+
| Instruction file (`CLAUDE.md`, a rule, an agent, skill prose) | [`references/instruction-style.md`](references/instruction-style.md): every-load prose stays lean; the present-tense rule applies too |
|
|
117
117
|
| Author or restructure a skill | The skill-authoring field guide in the etna repo (`nurixlabs/etna`), `docs/playbooks/skills/`. No etna checkout ⇒ ask the user for access, or proceed from first principles with `references/instruction-style.md` governing the prose |
|
|
118
118
|
| No template matches | [`references/untemplated.md`](references/untemplated.md) |
|
|
119
119
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# Documentation
|
|
1
|
+
# Documentation examples
|
|
2
2
|
|
|
3
|
-
Good
|
|
3
|
+
Good and bad documentation side by side; `style-guide.md` cites each example by number.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Example 1: Function
|
|
7
|
+
## Example 1: Function documentation
|
|
8
8
|
|
|
9
|
-
### Bad:
|
|
9
|
+
### Bad: full implementation
|
|
10
10
|
|
|
11
11
|
```markdown
|
|
12
12
|
### mergeData
|
|
@@ -14,9 +14,9 @@ Good vs bad examples showing the key differences.
|
|
|
14
14
|
function mergeData(server, local, changes) { const result = {}; const serverMap = new Map(server.map((i) => [i.id, i])); // ... 30 more lines return result; }
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
**Problems:**
|
|
17
|
+
**Problems:** goes stale with the first refactor; shows *how* instead of *what*.
|
|
18
18
|
|
|
19
|
-
### Good:
|
|
19
|
+
### Good: contract only
|
|
20
20
|
|
|
21
21
|
```markdown
|
|
22
22
|
### `mergeData(serverData, localData, changes)`
|
|
@@ -40,9 +40,9 @@ function mergeData(server, local, changes) { const result = {}; const serverMap
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
## Example 2: State
|
|
43
|
+
## Example 2: State documentation
|
|
44
44
|
|
|
45
|
-
### Bad:
|
|
45
|
+
### Bad: state everywhere
|
|
46
46
|
|
|
47
47
|
```markdown
|
|
48
48
|
## Component State
|
|
@@ -58,9 +58,9 @@ const [items, setItems] = useState([]);
|
|
|
58
58
|
{ items: [], loading: false, error: null }
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
**Problems:**
|
|
61
|
+
**Problems:** documents transient state and repeats shapes.
|
|
62
62
|
|
|
63
|
-
### Good:
|
|
63
|
+
### Good: persistence points only, in the API reference
|
|
64
64
|
|
|
65
65
|
Persisted shapes live in the API reference (`docs/architecture/api.md`), never in a feature document, where `## State` is a retired mechanism section.
|
|
66
66
|
|
|
@@ -89,7 +89,7 @@ export const items = pgTable('items', {
|
|
|
89
89
|
|
|
90
90
|
## Example 3: Changelog
|
|
91
91
|
|
|
92
|
-
### Bad:
|
|
92
|
+
### Bad: vague
|
|
93
93
|
|
|
94
94
|
```markdown
|
|
95
95
|
# 2025-01-05 - Updates
|
|
@@ -105,7 +105,7 @@ export const items = pgTable('items', {
|
|
|
105
105
|
- Various files in src/
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
### Good:
|
|
108
|
+
### Good: behavior first, refinement context kept
|
|
109
109
|
|
|
110
110
|
```markdown
|
|
111
111
|
# 2025-01-05 · data-sync — Local edits survive a sync only when versions match
|
|
@@ -123,7 +123,7 @@ export const items = pgTable('items', {
|
|
|
123
123
|
|
|
124
124
|
## Example 4: Flow
|
|
125
125
|
|
|
126
|
-
### Bad:
|
|
126
|
+
### Bad: mechanism narrated in a paragraph
|
|
127
127
|
|
|
128
128
|
```markdown
|
|
129
129
|
## Data Flow
|
|
@@ -133,7 +133,7 @@ When the page loads, the useAppInit hook calls the syncData function. This funct
|
|
|
133
133
|
|
|
134
134
|
**Problems:** names a hook, a function and a store that a rename would invalidate (the stability test); runs parallel cases together in one paragraph; gives a scanning reader no label to land on; "Data Flow" is a retired mechanism section.
|
|
135
135
|
|
|
136
|
-
### Good:
|
|
136
|
+
### Good: labelled bullets, a role-level diagram beside them
|
|
137
137
|
|
|
138
138
|
````markdown
|
|
139
139
|
## Flows
|
|
@@ -161,7 +161,7 @@ sequenceDiagram
|
|
|
161
161
|
|
|
162
162
|
## Example 5: Architecture Decision revision
|
|
163
163
|
|
|
164
|
-
### Bad:
|
|
164
|
+
### Bad: supersession chain
|
|
165
165
|
|
|
166
166
|
```
|
|
167
167
|
docs/architecture/decisions/
|
|
@@ -170,9 +170,9 @@ docs/architecture/decisions/
|
|
|
170
170
|
└── AD-011-auth-better-auth-v2.md (status: Accepted, "supersedes AD-006")
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
**Problems:**
|
|
173
|
+
**Problems:** three files hold one subject; the reader must diff a chain to learn the current truth; two of the three are wrong-but-present (the same pathology as keeping `report_v1.sql` beside the live `report_v2.sql`); the reasoning that killed Keycloak is stranded in a dead file nobody opens.
|
|
174
174
|
|
|
175
|
-
### Good:
|
|
175
|
+
### Good: one subject, updated in place
|
|
176
176
|
|
|
177
177
|
```
|
|
178
178
|
docs/architecture/decisions/
|
|
@@ -195,15 +195,15 @@ We use Better Auth with one-shot credential issuance… ← current truth, no
|
|
|
195
195
|
- 2026-01-10 — Initial decision accepted. Implemented by [plan](…).
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
**Why it works:**
|
|
198
|
+
**Why it works:** the body answers "how does auth work and why" without archaeology; the tail preserves every reversal with its trigger; the rejected alternatives stay findable in the one file a reader actually opens.
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
202
202
|
## Example 6: Stripping history from a truth doc
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
Deleting narration is only half the move; the story **must** land in a record.
|
|
205
205
|
|
|
206
|
-
### Bad:
|
|
206
|
+
### Bad: the journey narrated in place
|
|
207
207
|
|
|
208
208
|
```markdown
|
|
209
209
|
## Export Pipeline
|
|
@@ -214,7 +214,7 @@ output is not yet implemented. Treat any reference to `reports/export.js` as
|
|
|
214
214
|
stale — it was superseded by `src/export/run.js`.
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
### Good:
|
|
217
|
+
### Good: present-tense truth doc + a dated record carrying the story
|
|
218
218
|
|
|
219
219
|
The feature doc states only what is:
|
|
220
220
|
|
|
@@ -243,7 +243,7 @@ And the change-story goes to `docs/history/changelog/2026-06-02-export-extractio
|
|
|
243
243
|
|
|
244
244
|
---
|
|
245
245
|
|
|
246
|
-
## Quick
|
|
246
|
+
## Quick comparison
|
|
247
247
|
|
|
248
248
|
| Aspect | Bad | Good |
|
|
249
249
|
| ---------- | -------------------- | --------------------------- |
|
|
@@ -6,7 +6,7 @@ This reference states how a document joins the knowledge graph, and it is kept i
|
|
|
6
6
|
|
|
7
7
|
## The model
|
|
8
8
|
|
|
9
|
-
A document names the product objects it designs. Every other edge between a document and the code is either authored on the code's side or computed, never typed into the document. The harness's ownership scan reads one edge
|
|
9
|
+
A document names the product objects it designs. Every other edge between a document and the code is either authored on the code's side or computed, never typed into the document. The harness's ownership scan reads one edge, the transitional `owns:` region glob (§ `owns:` — transitional); principles 2 and 3 are the edges it switches to, and the header pointer is written alongside it so the switch needs no second pass over the code.
|
|
10
10
|
|
|
11
11
|
### Principles
|
|
12
12
|
|
|
@@ -63,7 +63,7 @@ Tooling keys sit beside these on any genre: `rev:` (a generator's generation sta
|
|
|
63
63
|
|
|
64
64
|
### `owns:` — transitional
|
|
65
65
|
|
|
66
|
-
- **Reason for the key:** the harness's ownership scan (`.claude/hooks/lib/ownership.mjs`) keys on `owns:` until it switches to the header pointers and the object closure, which is the knowledge layer's recorded gap.
|
|
66
|
+
- **Reason for the key:** the harness's ownership scan (`.claude/hooks/lib/ownership.mjs`) keys on `owns:` until it switches to the header pointers and the object closure, which is the knowledge layer's recorded gap. The key is what keeps the session's ownership index and the doc-debt detectors working.
|
|
67
67
|
- **Form:** region globs only, one per region the document speaks for: `packages/{name}/**` on a package document, the machine's subtrees on a system document, a feature's own directory on a feature document. Never a list of individual files, and never a shared file several features import.
|
|
68
68
|
- **Growth:** none. A new document carries the region glob its genre needs and nothing more; an edit never adds file-level entries.
|
|
69
69
|
- **Retirement:** removed from every document in the same change that switches the scan, and this section with it.
|
|
@@ -73,7 +73,7 @@ Tooling keys sit beside these on any genre: `rev:` (a generator's generation sta
|
|
|
73
73
|
| Key | Retired because | What replaces it |
|
|
74
74
|
| --- | --- | --- |
|
|
75
75
|
| `applies:` | A list of governing documents is a hand-kept copy of a relationship the graph computes through the objects both documents name, and it drifts the way any copy does | The objects the doctrine and the surface share, computed; for people, the document's Scope section (a UX document's Purpose) names its governing doctrine and what each settles |
|
|
76
|
-
| `keywords:` | An object's name and aliases are its discovery terms | `objects:`. The ownership scan
|
|
76
|
+
| `keywords:` | An object's name and aliases are its discovery terms | `objects:`. The ownership scan shows a document's `keywords:` in the index when it names no `objects:`, so removing the key without adding `objects:` empties that entry |
|
|
77
77
|
| A file-level `owns:` list | The header pointers and the object closure compute it | Region globs only, until the scan switches (above) |
|
|
78
78
|
|
|
79
79
|
An edit to a document that carries a retired key removes the key in the same edit.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Instruction-
|
|
1
|
+
# Instruction-file style
|
|
2
2
|
|
|
3
3
|
The shared style for every file an agent obeys — a `CLAUDE.md`, a rule, an agent definition, skill prose. Prose style only: frontmatter is metadata, not style. Docs-tree documents follow the skill's templates and [`style-guide.md`](style-guide.md) instead.
|
|
4
4
|
|
|
@@ -6,11 +6,11 @@ The shared style for every file an agent obeys — a `CLAUDE.md`, a rule, an age
|
|
|
6
6
|
|
|
7
7
|
An instruction file is paid for whenever it loads, scaled by its load class: `CLAUDE.md` and unscoped rules load on **every turn of every session** — the most expensive prose in a repo per word; a `paths:`-scoped rule loads on those same terms from its first matching file read on; an agent definition loads per dispatch, a skill per invocation. The bar is not "is this true?" but **"must this be in front of the agent whenever this file loads?"** Measure weight in tokens, not lines; trim biggest-first on every edit.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**On a rewrite, the test is armor vs. narration.** A reason clause either blocks a move an agent would otherwise make — the failure is counter-intuitive, the wrong fix looks correct, or the rule reads as arbitrary tidiness and gets "improved away" — or it explains the self-evident. Ask of each: *does the forbidden move look correct to an agent mid-task?* Keep the first kind, cut the second. **A constraint may lose its explanation; it may never lose its existence** — compression is fewer words for the same constraints, so a passage that cannot shrink without dropping one stays long.
|
|
10
10
|
|
|
11
11
|
## Coherence
|
|
12
12
|
|
|
13
|
-
A rewrite is not only a trim
|
|
13
|
+
A rewrite is not only a trim. Read the file as one artifact and fix what disagrees or is missing:
|
|
14
14
|
|
|
15
15
|
- **Two statements of one fact agree, or become one.** A defaults block vs. the worked example beside it, a table row vs. a bullet — reconcile against the code the rule governs and keep one canonical statement; a silent disagreement is worse than either version alone, because each reader picks a different one.
|
|
16
16
|
- **Every cross-reference resolves** — the cited `§`, sibling file, or command exists and still says what the citation claims. Section numbers are a public surface other files cite: append, never reshuffle.
|