@nurix/etna 0.19.33 → 0.19.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/data/harness-index.json +5 -1
  2. package/data/harnesses/code/CLAUDE.md +21 -11
  3. package/data/harnesses/code/harness.json +2 -2
  4. package/data/harnesses/code/rules/general.md +1 -0
  5. package/data/harnesses/code/rules/testing.md +1 -1
  6. package/data/harnesses/code/rules/verification.md +51 -0
  7. package/data/harnesses/code/skills/test-plan/SKILL.md +3 -3
  8. package/data/harnesses/delivery/.prettierignore +29 -0
  9. package/data/harnesses/delivery/.prettierrc.json +3 -0
  10. package/data/harnesses/delivery/.vscode/settings.json +19 -0
  11. package/data/harnesses/delivery/CLAUDE.md +123 -0
  12. package/data/harnesses/delivery/agents/brainstorm.md +144 -0
  13. package/data/harnesses/delivery/agents/data-generator.md +23 -0
  14. package/data/harnesses/delivery/agents/eval-runner.md +23 -0
  15. package/data/harnesses/delivery/agents/judge.md +23 -0
  16. package/data/harnesses/delivery/agents/lld-mode.md +56 -0
  17. package/data/harnesses/delivery/agents/maintenance.md +229 -0
  18. package/data/harnesses/delivery/agents/prompt-iterator.md +23 -0
  19. package/data/harnesses/delivery/agents/red-team.md +23 -0
  20. package/data/harnesses/delivery/agents/regression-runner.md +28 -0
  21. package/data/harnesses/delivery/agents/retro.md +46 -0
  22. package/data/harnesses/delivery/codex/agents/brainstorm.toml +142 -0
  23. package/data/harnesses/delivery/codex/agents/data-generator.toml +22 -0
  24. package/data/harnesses/delivery/codex/agents/eval-runner.toml +22 -0
  25. package/data/harnesses/delivery/codex/agents/judge.toml +22 -0
  26. package/data/harnesses/delivery/codex/agents/lld-mode.toml +52 -0
  27. package/data/harnesses/delivery/codex/agents/maintenance.toml +228 -0
  28. package/data/harnesses/delivery/codex/agents/prompt-iterator.toml +22 -0
  29. package/data/harnesses/delivery/codex/agents/red-team.toml +22 -0
  30. package/data/harnesses/delivery/codex/agents/regression-runner.toml +27 -0
  31. package/data/harnesses/delivery/codex/agents/retro.toml +45 -0
  32. package/data/harnesses/delivery/harness.json +11 -0
  33. package/data/harnesses/delivery/hooks/generate-ownership-index.mjs +148 -0
  34. package/data/harnesses/delivery/hooks/hooks.json +16 -0
  35. package/data/harnesses/delivery/rules/changelog.md +19 -0
  36. package/data/harnesses/delivery/rules/evals.md +23 -0
  37. package/data/harnesses/delivery/rules/model-tiers.md +18 -0
  38. package/data/harnesses/delivery/rules/nomenclature.md +34 -0
  39. package/data/harnesses/delivery/rules/prompting.md +23 -0
  40. package/data/harnesses/delivery/skills/brainstorm/README.md +56 -0
  41. package/data/harnesses/delivery/skills/brainstorm/SKILL.md +173 -0
  42. package/data/harnesses/delivery/skills/brainstorm/references/doctrine.md +98 -0
  43. package/data/harnesses/delivery/skills/brainstorm/references/harvest.md +86 -0
  44. package/data/harnesses/delivery/skills/brainstorm/references/session-schema.md +186 -0
  45. package/data/harnesses/delivery/skills/brainstorm/scripts/detector.mjs +460 -0
  46. package/data/harnesses/delivery/skills/cost-report/SKILL.md +24 -0
  47. package/data/harnesses/delivery/skills/documentation/SKILL.md +129 -0
  48. package/data/harnesses/delivery/skills/documentation/references/examples.md +279 -0
  49. package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +44 -0
  50. package/data/harnesses/delivery/skills/documentation/references/style-guide.md +340 -0
  51. package/data/harnesses/delivery/skills/documentation/references/untemplated.md +38 -0
  52. package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +140 -0
  53. package/data/harnesses/delivery/skills/documentation/templates/Readme.md +31 -0
  54. package/data/harnesses/delivery/skills/documentation/templates/api-reference.md +20 -0
  55. package/data/harnesses/delivery/skills/documentation/templates/architecture-decision.md +121 -0
  56. package/data/harnesses/delivery/skills/documentation/templates/backlog.md +33 -0
  57. package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +57 -0
  58. package/data/harnesses/delivery/skills/documentation/templates/changelog-index.md +41 -0
  59. package/data/harnesses/delivery/skills/documentation/templates/docs-readme.md +72 -0
  60. package/data/harnesses/delivery/skills/documentation/templates/domain-model.md +30 -0
  61. package/data/harnesses/delivery/skills/documentation/templates/environment-registry.md +15 -0
  62. package/data/harnesses/delivery/skills/documentation/templates/feature.md +149 -0
  63. package/data/harnesses/delivery/skills/documentation/templates/glossary.md +11 -0
  64. package/data/harnesses/delivery/skills/documentation/templates/memory-main.md +25 -0
  65. package/data/harnesses/delivery/skills/documentation/templates/migration-runbook.md +34 -0
  66. package/data/harnesses/delivery/skills/documentation/templates/non-goals.md +11 -0
  67. package/data/harnesses/delivery/skills/documentation/templates/operations-procedure.md +36 -0
  68. package/data/harnesses/delivery/skills/documentation/templates/plan.md +64 -0
  69. package/data/harnesses/delivery/skills/documentation/templates/protected-files.md +37 -0
  70. package/data/harnesses/delivery/skills/documentation/templates/root-readme.md +104 -0
  71. package/data/harnesses/delivery/skills/documentation/templates/security-overview.md +27 -0
  72. package/data/harnesses/delivery/skills/documentation/templates/structure.md +65 -0
  73. package/data/harnesses/delivery/skills/documentation/templates/system-overview.md +32 -0
  74. package/data/harnesses/delivery/skills/documentation/templates/testing-strategy.md +29 -0
  75. package/data/harnesses/delivery/skills/escalate/SKILL.md +25 -0
  76. package/data/harnesses/delivery/skills/prompt-eval/SKILL.md +22 -0
  77. package/data/harnesses/delivery/skills/prompt-library/SKILL.md +36 -0
  78. package/data/harnesses/delivery/skills/route/SKILL.md +21 -0
  79. package/data/harnesses/etna/CLAUDE.md +1 -1
  80. package/data/harnesses/etna/harness.json +2 -2
  81. package/data/harnesses/etna/rules/general.md +1 -0
  82. package/data/harnesses/etna/rules/testing.md +1 -1
  83. package/data/harnesses/hr/harness.json +1 -1
  84. package/package.json +1 -1
@@ -0,0 +1,86 @@
1
+ # Harvest — the stop pipeline
2
+
3
+ Load when: `/brainstorm stop` is invoked (facilitator), or executing any stop-gate dispatch
4
+ (twin). The pipeline's mechanical gates live in the detector (`--gate=manifest`, `--gate=move`);
5
+ this reference carries the routing judgment.
6
+
7
+ The pipeline, end to end:
8
+
9
+ ```
10
+ converge → final sync/compose → manifest (Status: proposed)
11
+ → ONE user approval (Status: approved)
12
+ → apply, reading both sides of every destination (Status: applied)
13
+ → uselessness test → gaps? new Round, back to approval
14
+ → move to docs/history/brainstorms/{topic}/ ← the completion marker
15
+ → offer: delete or commit — the user decides
16
+ ```
17
+
18
+ **Harvest fails loud, never silent.** The move happens only after the full apply passes the
19
+ uselessness test. A partial apply — twin death, session kill, anything — leaves the folder
20
+ visibly unfinished in `docs/research/` and the user restarts the stop. The pipeline never resumes
21
+ silently from a half-applied state, and canonical docs are never written without an approved
22
+ manifest (gap-round fixes included).
23
+
24
+ ## The routing map
25
+
26
+ Route each piece of the surface by scope. Format every artifact via the `documentation` skill;
27
+ where it is unavailable, fall back to own formatting and record which path ran in the manifest.
28
+ Read **both sides** of every destination before writing — the destination's current content is a
29
+ contract, not a blank page.
30
+
31
+ | What | Goes to | Shape |
32
+ | --- | --- | --- |
33
+ | **Source of truth** | The repo's canonical home for that knowledge: `docs/features/` for a feature, `docs/architecture/` for cross-cutting doctrine, else a topic `Readme.md` | One consolidated reader-first doc distilled from the whole surface: thesis → what it is; domain fragment → how it works; ledger → present-tense rationale **without entry codes** |
34
+ | **Executable work** | `docs/history/plans/` | Split by deliverable, never by pillar |
35
+ | **Decision records** | One record per decision *subject* | A decision revising an already-recorded subject updates that record in place (its changelog carries the journey) rather than minting a new one; declined alternatives ride along with their re-evaluate conditions |
36
+ | **Domain-model changes** | The living domain-model doc | The information-architecture contract the `boundary` skill reads at the next plan check |
37
+ | **Still-open (parked) forks** | The repo's open-questions home | Each with a *resolution-lands-in* pointer |
38
+ | **Backlog items** | The repo backlog | See the scope-guard trio below |
39
+ | **Fragments** | Their destinations — they were drafted in destination format precisely so this is a move, not a translation | Merge per the destination's existing structure |
40
+
41
+ **The scope-guard trio** disambiguates everything that isn't a commitment:
42
+
43
+ - *Will build later* → **backlog**.
44
+ - *Deliberately not building* → **non-goals**.
45
+ - *Weighed and chose another option* → a **Declined:** line inside the deciding ledger entry,
46
+ with its evidence and re-evaluate condition — carried into the harvested decision record.
47
+
48
+ **Directional steering is not feature truth.** A harvested principle informs many decisions and
49
+ 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 — it never duplicates prose across them,
51
+ and it never invents a new top-level home for principles (they land in the *existing* living
52
+ docs).
53
+
54
+ Rejection rationale and reasoning chains must have explicit destinations — options-considered
55
+ sections, decision changelogs — or the uselessness test fails: the folder may never be deleted
56
+ into a knowledge loss.
57
+
58
+ ## The uselessness test
59
+
60
+ The deletion-safety gate: after the apply, the post-harvest living docs alone must be enough.
61
+
62
+ - **The reader is always a freshly spawned, context-free agent** — a full-context reader cannot
63
+ cold-read; it already knows every undefined term.
64
+ - **Isolation is enforced, not instructed:** the cold reader's prompt contains an explicit
65
+ allowed-path list (the manifest's destinations — never the session folder), and the detector
66
+ independently verifies no harvested doc links back into the session folder (BS-HARVEST-01) — a
67
+ link into scaffolding is itself a harvest defect.
68
+ - **The task:** reconstruct the design — thesis, commitments, reasoning, declined branches — from
69
+ the allowed paths only.
70
+ - **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
+ harvest gap → recorded in the manifest (`Result: fail`), fixes enter a new manifest `Round`,
73
+ approved like the first. Iterate until the folder is redundant.
74
+
75
+ ## The move, and the offer
76
+
77
+ When the detector's move gate is clean: delete `ops/` entirely (transcript-grade residue never
78
+ enters git), `git mv` the folder to `docs/history/brainstorms/{topic}/`, set
79
+ `Status: harvested`, and update both indexes (row out of `docs/research/Readme.md`, row into
80
+ `docs/history/brainstorms/Readme.md`). The move is the completion marker — a folder still under
81
+ `docs/research/` is by definition unfinished, which is exactly what the maintenance census reads.
82
+
83
+ Then the offer, relayed by the facilitator: **delete the moved folder, or commit it.** The user
84
+ decides; the design assumes deletion — nothing anywhere may depend on the folder surviving.
85
+ Committing is the explicit way to keep git-history forensics; an uncommitted folder deleted here
86
+ is gone, and that residual is accepted by design.
@@ -0,0 +1,186 @@
1
+ # Session schema — the single format authority
2
+
3
+ Load when: bootstrapping a session, writing any working-surface file, dispatching the twin, or
4
+ interpreting detector output. The detector (`scripts/detector.mjs`) is the mechanical half of this
5
+ contract — every rule below that carries a rule ID is machine-checked; everything else is the
6
+ twin's semantic judgment.
7
+
8
+ ## Folder layout
9
+
10
+ ```
11
+ docs/research/{topic}-brainstorm/ ← open session (kebab-case topic slug)
12
+ ├── state.md ← anchor + aspect map (twin-written)
13
+ ├── thesis.md ← composed claim → argument → what changed (twin-written)
14
+ ├── forks.md ← open questions with close conditions (twin-written)
15
+ ├── ledger.md ← commitments (twin-written)
16
+ ├── basis/ ← frozen entry material (facilitator-written once, at intake)
17
+ ├── fragments/ ← harvest-native fragments (twin-written; materialize on
18
+ │ first real content, drafted in destination format)
19
+ └── ops/ ← untracked capture layer (deleted at stop)
20
+ ├── .gitignore ← contains `*` — ops/ never enters git [BS-OPS-01/02]
21
+ ├── capture.md ← facilitator's raw append ledger (its ONLY write)
22
+ ├── sync-log.md ← paired twin-dispatch log
23
+ └── manifest.md ← harvest manifest (created by the stop pipeline)
24
+ ```
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 it. A folder still
28
+ under `docs/research/` is by definition unfinished.
29
+
30
+ **Write protocol (one writer per file):** the facilitator appends to `ops/capture.md` and writes
31
+ the initial `basis/` copy plus the sync-log *dispatch* lines — nothing else, ever. The twin writes
32
+ every other file, at gates. The user may hand-edit anything; the twin diffs each file against its
33
+ own last compose before rewriting and folds foreign edits as first-class user signal.
34
+
35
+ ## state.md
36
+
37
+ ```markdown
38
+ # State
39
+
40
+ - Status: open | stopping | harvested
41
+ - Posture: mid-probe on the sync-layer aspect, three forks open
42
+ - Started: 2026-07-08
43
+ - Sitting: single | multi
44
+ - Last compose: 2026-07-08T14:30Z | never
45
+
46
+ ## Aspect map
47
+
48
+ - persistence — how session state survives restarts → F1, D3
49
+ - onboarding — the first-run experience → thesis
50
+ - risks — failure modes and mitigations → none yet
51
+ ```
52
+
53
+ - `Status` transitions only forward: `open → stopping → harvested` (the twin flips `stopping` when
54
+ the stop pipeline begins, `harvested` at the move). [BS-STATE-01]
55
+ - The aspect map is derived per idea from the basis and edited by the user. Each aspect carries
56
+ `→` refs to the content covering it: fork IDs (`F#`), ledger IDs (`D#`), `thesis`,
57
+ `fragment:{name}`, or `none yet` (an open coverage gap — informational mid-session
58
+ [BS-ASPECT-01], blocking at the manifest gate [BS-ASPECT-02]). Ref *presence* is the detector's
59
+ half; whether the content actually covers the aspect is the twin's.
60
+
61
+ ## thesis.md
62
+
63
+ ```markdown
64
+ # {Topic} — thesis
65
+
66
+ Current as of: 2026-07-08T14:30Z
67
+
68
+ ## Claim
69
+ ## Argument
70
+ ## What changed
71
+ ```
72
+
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`
75
+ [BS-COMPOSE-01]. At the manifest gate, `Last compose` must be later than the newest
76
+ `ops/capture.md` entry — a compose over unsynced capture is stale [BS-COMPOSE-02].
77
+
78
+ ## forks.md
79
+
80
+ ```markdown
81
+ ## F3 — Should reads wait for a compose? [open]
82
+
83
+ Full self-contained prose in the user's framing.
84
+
85
+ - Raised by: user | twin (S4) | probe | harvest
86
+ - Closes when: a pick between wait-for-fresh and read-stale-with-warning
87
+ ```
88
+
89
+ - IDs `F1, F2, …` unique, never reused [BS-FORK-01]. Status marker: `[open]` or
90
+ `[parked → {destination}]`. Every fork carries `Closes when:` [BS-FORK-01].
91
+ - `Raised by: twin (S#)` must cite a reconciled sync-log entry [BS-SYNC-02].
92
+ - **A resolved fork's entry is deleted** by the twin — the resolving ledger entry's `Resolves:`
93
+ field is the record. forks.md holds only open and parked forks; a ledger `Resolves: F3`
94
+ coexisting with an open F3 is an inconsistency [BS-FORK-02]. Parked forks survive to the
95
+ manifest, which must route each one [BS-MANIFEST-01].
96
+ - The manifest gate requires zero `[open]` forks [BS-FORK-03].
97
+
98
+ ## ledger.md
99
+
100
+ ```markdown
101
+ ## D4 — Sessions initialize in dump or interview
102
+
103
+ - Decision: every session opens in dump or interview; probe and converge are mid-session moves.
104
+ - Why: a first-time user cannot be asked to pick a posture they have no vocabulary for.
105
+ Declined: free initial posture — observed cold-starts stall in probe; re-evaluate if
106
+ session-replay evals show experienced users fighting the default.
107
+ - How to apply: the facilitator's start calibration offers only the two entry moves.
108
+ - Resolves: F2
109
+ ```
110
+
111
+ - IDs `D1, D2, …` unique, append-only [BS-LEDGER-01]. `Decision`, `Why`, `How to apply` are
112
+ mandatory; `Resolves:` when the commitment closes forks. Amendments and reversals are
113
+ annotations plus a new entry ("Reversed by D9" on the old; D9 names what it reverses) — never a
114
+ rewrite. Declined options live inside `Why` per [doctrine.md](doctrine.md).
115
+
116
+ ## ops/capture.md
117
+
118
+ The facilitator's per-turn append — its one write duty. Lowest possible bar: raw, unpolished,
119
+ everything session-relevant from *both* sides (user substance and facilitator substance —
120
+ diagnoses, informed rejections, definitions, reasoning chains), including residue judged not
121
+ worth pillar filing. Format:
122
+
123
+ ```markdown
124
+ ---
125
+ ### T14 · 2026-07-08T14:22Z
126
+
127
+ <raw notes for this turn>
128
+ ```
129
+
130
+ Turn IDs `T#` ascending with an ISO timestamp — the timestamp is what compose-freshness checks
131
+ against [BS-COMPOSE-02]. Never distill here; distillation is the twin's job.
132
+
133
+ ## ops/sync-log.md
134
+
135
+ Paired-written, one pair per twin dispatch:
136
+
137
+ ```
138
+ S4 | gate: on-demand | dispatched: 2026-07-08T14:25Z | scope: full reconcile + compose
139
+ S4 → reconciled | 2026-07-08T14:29Z | 4 edits · 2 new forks · 6 open · untouched: risks
140
+ ```
141
+
142
+ The **facilitator** writes the dispatch line as it dispatches; the **twin** appends the result
143
+ line (`reconciled` or `failed`) on return — no single author holds both sides. Every dispatch
144
+ line must acquire a result line; only the newest entry may be unpaired (in flight) [BS-SYNC-01].
145
+ A `failed` result is surfaced to the user at the next turn break and re-run at the next gate.
146
+
147
+ ## ops/manifest.md
148
+
149
+ Created by the stop pipeline; gates the harvest apply:
150
+
151
+ ```markdown
152
+ # Harvest manifest — {topic}
153
+
154
+ Round: 1
155
+ Status: proposed | approved | applied
156
+
157
+ | # | What | Source | Destination | Action |
158
+ |---|------|--------|-------------|--------|
159
+ | 1 | consolidated source of truth | thesis + fragments + ledger | docs/features/{x}.md | create |
160
+ | 2 | parked fork F7 | forks.md | docs/architecture/open-questions.md | append |
161
+
162
+ ## Uselessness test
163
+
164
+ - Result: pass | fail
165
+ - Cold-reader allowed paths: <the destination docs above>
166
+ - Gaps: none | <named gaps → next Round>
167
+ ```
168
+
169
+ Every parked fork and every fragment must have a row [BS-MANIFEST-01]. `Status: approved` is set
170
+ only after the user approves; gap fixes re-enter as a new `Round` with the same approval
171
+ requirement. After apply, no destination doc may link into the session folder [BS-HARVEST-01];
172
+ the move to history requires a recorded passing uselessness test [BS-USELESS-01].
173
+
174
+ ## Detector
175
+
176
+ `node scripts/detector.mjs <session-folder> [--gate=session|manifest|move] [--json]`
177
+
178
+ - `session` (default) — the always-on integrity rules; run at any gate.
179
+ - `manifest` — adds the convergence gates (zero open forks, full aspect coverage, fresh compose);
180
+ the twin may not construct a manifest while any of these fail.
181
+ - `move` — adds the post-apply gates (manifest applied, uselessness pass recorded, no links into
182
+ scaffolding); the folder may not move while any fail.
183
+
184
+ Exit code 0 = clean, 1 = violations (listed with rule IDs), 2 = unusable input. Rules degrade
185
+ gracefully: no git context ⇒ BS-OPS-02 reports `skipped`, never blocks. Rule IDs are stable —
186
+ consumers (the twin, the evals, the maintenance census) key on them.