@nurix/etna 0.13.0 → 0.15.1

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 (49) hide show
  1. package/README.md +31 -10
  2. package/bin/etna.js +58 -1
  3. package/data/harness-index.json +1 -1
  4. package/data/harnesses/code/CLAUDE.md +12 -18
  5. package/data/harnesses/code/agents/brainstorm.md +14 -21
  6. package/data/harnesses/code/agents/change-review.md +6 -6
  7. package/data/harnesses/code/agents/harness-manager.md +51 -11
  8. package/data/harnesses/code/agents/maintenance.md +43 -6
  9. package/data/harnesses/code/agents/performance-review.md +1 -1
  10. package/data/harnesses/code/agents/spec-mode.md +2 -2
  11. package/data/harnesses/code/harness.json +6 -0
  12. package/data/harnesses/code/hooks/hooks.json +41 -0
  13. package/data/harnesses/code/hooks/lib/redact.js +37 -0
  14. package/data/harnesses/code/hooks/post-commit.js +136 -0
  15. package/data/harnesses/code/hooks/post-tool-failure.js +136 -0
  16. package/data/harnesses/code/hooks/session-stop.js +207 -0
  17. package/data/harnesses/code/rules/general.md +1 -1
  18. package/data/harnesses/code/rules/nomenclature.md +1 -1
  19. package/data/harnesses/code/skills/boundary/SKILL.md +22 -4
  20. package/data/harnesses/code/skills/boundary/references/boundary-taxonomy.md +229 -161
  21. package/data/harnesses/code/skills/brainstorm/README.md +76 -227
  22. package/data/harnesses/code/skills/brainstorm/SKILL.md +79 -567
  23. package/data/harnesses/code/skills/brainstorm/harvest.md +26 -0
  24. package/data/harnesses/code/skills/brainstorm/templates/build.md +37 -0
  25. package/data/harnesses/code/skills/brainstorm/templates/decisions.md +12 -25
  26. package/data/harnesses/code/skills/brainstorm/templates/domain-model.md +25 -0
  27. package/data/harnesses/code/skills/brainstorm/templates/non-goals.md +2 -2
  28. package/data/harnesses/code/skills/brainstorm/templates/questions.md +18 -67
  29. package/data/harnesses/code/skills/brainstorm/templates/state.md +5 -5
  30. package/data/harnesses/code/skills/brainstorm/templates/tech.md +23 -0
  31. package/data/harnesses/code/skills/brainstorm/templates/thesis.md +21 -0
  32. package/data/harnesses/code/skills/distiller/SKILL.md +214 -0
  33. package/data/harnesses/code/skills/distiller/references/docs-mode.md +526 -0
  34. package/data/harnesses/code/skills/distiller/references/method.md +166 -0
  35. package/data/harnesses/code/skills/documentation/SKILL.md +1 -1
  36. package/data/harnesses/code/skills/documentation/references/templates.md +78 -5
  37. package/data/harnesses/code/skills/workflow-mapper/SKILL.md +1 -1
  38. package/data/harnesses/kb-agi/CLAUDE.md +1 -1
  39. package/data/harnesses/kb-agi/agents/kb-agi-init.md +2 -2
  40. package/data/harnesses/kb-agi/agents/kb-catch-stale.md +1 -1
  41. package/data/harnesses/kb-agi/agents/kb-find-gaps.md +2 -2
  42. package/data/harnesses/kb-agi/agents/kb-fix-links.md +1 -1
  43. package/data/harnesses/kb-agi/agents/kb-refresh-frontdoor.md +1 -1
  44. package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +1 -1
  45. package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +1 -1
  46. package/data/harnesses/kb-agi/harness.json +6 -0
  47. package/package.json +1 -1
  48. package/data/harnesses/code/skills/brainstorm/greenfield.md +0 -99
  49. package/data/harnesses/code/skills/brainstorm/templates/inventory.md +0 -44
@@ -1,287 +1,136 @@
1
1
  # brainstorm
2
2
 
3
- A Claude Code skill for **structured design of unbuilt software**. It enforces a deliberate plan-before-code phase, captures decisions and open questions in a persistent registry of pillar documents, and refuses to write production code while a session is open.
3
+ A Claude Code skill that is a **thinking partner for designing software** — not a form to fill in. It runs one constant loop (distill → abstract → sync → record) over a conversation, files the thinking into a small set of substance-first pillars, and treats *coherence* as a measurable target rather than a vibe.
4
4
 
5
- The user's job is to prevent eager coding. The skill's job is to make planning the path of least resistance.
5
+ The point of v2 is a single inversion over v1: **the conversation is the work; the artifacts serve it.** v1 had grown into elaborate bookkeeping (a tentative/committed decision state machine, background cascade locks and queues, a 10-pillar eager bootstrap, an unconditional greenfield doctrine) wrapped around thinking that never had to happen. v2 deletes that machinery and keeps the loop.
6
6
 
7
7
  ---
8
8
 
9
- ## Why this skill exists
9
+ ## The loop (the only constant)
10
10
 
11
- The default failure mode of an AI assistant on a fresh problem is to **start typing code immediately**. That produces:
11
+ Every turn, in every mode:
12
12
 
13
- - Decisions made implicitly inside `src/`, never written down.
14
- - Open questions silently resolved with the first plausible answer.
15
- - Architecture that drifts because no one tracked the "why".
16
- - Re-work when the next session forgets context the previous one had.
13
+ 1. **Distill** — fold what the user said into the pillars, in their framing, this turn.
14
+ 2. **Abstract** — name the latent structure they implied but didn't state (an entity relationship, an invariant, a principle). One offer per exchange.
15
+ 3. **Sync** — keep the pillars consistent with each other and with the basis (the sync agent, below).
16
+ 4. **Record** — writes happen in the turn that produced the information; nothing is hoarded for a session-end dump.
17
17
 
18
- `brainstorm` inverts this. While a session is open, the skill behaves as a **design facilitator** — not a coder. It asks structured questions, records answers into named files, and uses a state file (`state.md`) to remember across conversations whether a session is active. Code authoring is **blocked** outside the brainstorm folder; small load-bearing snippets are allowed only as illustration inside it.
19
-
20
- The output is not a single document. It is a **registry** — nine pillar files plus numbered plan docs — that survives across sessions and stays load-bearing because every entry has a *why*.
21
-
22
- ---
23
-
24
- ## When to use it
25
-
26
- Good fits:
27
-
28
- - New system being designed from scratch.
29
- - New feature on a system that hasn't shipped yet.
30
- - Migration or refactor with enough surface area that you want decisions captured before code.
31
- - Multi-service or cross-team design needing a shared registry of decisions.
32
-
33
- Bad fits — the skill will say so and offer to redirect:
34
-
35
- - Debugging a specific bug in an existing system.
36
- - One-day scripts, single-button additions, typo fixes.
37
- - Established codebases where you're following an existing pattern.
38
- - Anything where the right next step is to read or change code, not to decide.
39
-
40
- When the skill detects a bad fit during qualification, it asks the user before exiting — never bails unilaterally. The user can override and proceed anyway.
41
-
42
- ---
43
-
44
- ## Installation
45
-
46
- In this repo (`etna`), the skill lives at:
47
-
48
- ```
49
- store/skills/brainstorm/
50
- ├── SKILL.md # The skill definition Claude Code loads.
51
- ├── README.md # This file.
52
- ├── greenfield.md # Writing doctrine for greenfield architecture docs.
53
- └── templates/ # Pillar file templates copied into ./plan/ on first use.
54
- ├── state.md
55
- ├── questions.md
56
- ├── decisions.md
57
- ├── doctrine.md
58
- ├── glossary.md
59
- ├── inventory.md
60
- ├── non-goals.md
61
- ├── references.md
62
- ├── rejected.md
63
- ├── milestones.md
64
- └── plan-doc.md
65
- ```
66
-
67
- To use the skill in a project, place the folder at one of:
68
-
69
- - `~/.claude/skills/brainstorm/` (user-wide install)
70
- - `<project>/.claude/skills/brainstorm/` (project-scoped install)
71
- - A plugin under `<project>/plugins/<plugin>/skills/brainstorm/`
72
-
73
- Claude Code loads any skill whose `SKILL.md` it can discover via its standard skill resolution.
18
+ Everything else — pillar count, ceremony, harvest — scales with the idea. The loop does not.
74
19
 
75
20
  ---
76
21
 
77
22
  ## Lifecycle
78
23
 
79
- The skill exposes exactly two subcommands. Everything else happens **within** an active session as natural conversation.
24
+ Two subcommands, nothing else. The skill never auto-invokes on natural language.
80
25
 
81
26
  ```
82
- /brainstorm start # open a session
83
- /brainstorm close # close a session
27
+ /brainstorm start # open a session (requires a basis)
28
+ /brainstorm stop # close a session
84
29
  ```
85
30
 
86
- There is no `sweep`, `check`, `resolve`, `init`, or `reinforce` subcommand. The skill reads `state.md` at the start of every turn to decide whether a session is open, and adapts behavior accordingly.
87
-
88
- ### `start` — opening a session
89
-
90
- 1. **Qualification** — 2–4 questions via `AskUserQuestion`: what's being designed, what's built so far, rough scope, whether the goal is to lock decisions before code. If the answers suggest a poor fit, the skill says so and offers to redirect (dump conversation into a temp file and end before opening). The user always decides.
91
-
92
- 2. **Folder selection** — Decide where pillars and `state.md` live. The skill scans the working directory (one level deep) for candidate folders:
93
- - Conventional names: `./plan/`, `./brainstorm/`, `./design/`.
94
- - Any other folder containing `state.md` plus at least one pillar file.
95
-
96
- Resolution:
97
- - **One candidate** → confirm in a single line.
98
- - **Multiple candidates** → present via `AskUserQuestion`.
99
- - **None found** → ask the user; offer the conventional names plus "Other" for a custom path.
100
-
101
- The chosen folder anchors the entire session. Every later reference to `./plan/` resolves to it.
102
-
103
- 3. **Bootstrap** — Copy any missing pillar files from `templates/` into the chosen folder. Existing files are never overwritten. Write `state.md` with `STATE: open`, session start date, and the current topic.
104
-
105
- 4. **Source materials (optional)** — Before intake, the skill asks whether existing documents or projects should inform the design. If yes, it copies them into `./plan/sources/` and adds entries to `references.md` so the session works off local copies rather than thrashing across the filesystem.
106
-
107
- 5. **Intake interview** — `AskUserQuestion` in topical bundles (2–4 questions per batch) seeds the pillars: what the system is for, what's explicitly not being built, prior art, hard constraints, obvious open questions. Each answer is written directly to the relevant pillar as it comes in — no accumulating in conversation.
108
-
109
- 6. **First-pass review** — Show the user the pillar summaries, the open-questions dependency graph (computed from `Blocks.` fields, presented topologically), and the next milestone's blocking questions. Ask which question to tackle first.
110
-
111
- ### In-session behavior
112
-
113
- Once `state.md` is `STATE: open`, the skill is active across all subsequent turns until `close` runs.
114
-
115
- #### Voices
116
-
117
- The skill's tone shifts implicitly based on what's happening — no flags or overrides.
118
-
119
- | Phase | Voice | What this means |
120
- |---|---|---|
121
- | Intake | **Facilitator** | Neutral. Open questions. Draw out intent. Don't propose. |
122
- | Surfacing new topics | **Architect mentor** | Proactively raise things the user hasn't named. Cite prior art. |
123
- | Resolving a question | **Sparring partner** | Push back on weak rationale. Name the unstated tradeoff. |
124
- | Sweeps, status reads, capture | **Scribe** | Pure capture. Don't editorialize. |
125
- | `close` and gap detection | **Critic** | Look for inconsistencies, smell-words, underspecified pillars. |
31
+ ### The entry gate
126
32
 
127
- #### Writing recommendations on questions
33
+ A session needs substance before it opens. `start` asks for a **basis**: a reference document, or a one-shot brain dump of the whole idea. If the user drip-feeds small action items (a bug fix, a single button), the skill says it's the wrong tool and **does not open** unless overridden. The basis *is* the first dump — the skill distills it into the initial thesis and questions, so the first questions come from the user's own material, never from an empty template.
128
34
 
129
- When the skill surfaces a new question or sweeps the question ledger, it adds a one-line **Claude's take:** field to questions where it has a confident view. **Silent on uncertain questions** — a hedge is worse than nothing. When the take disagrees with an existing Lean, it says so explicitly.
35
+ ### Intake frame
130
36
 
131
- #### Resolving a question
37
+ After distilling the basis, one `AskUserQuestion` batch sets three dials:
132
38
 
133
- 1. Read the full question from `questions.md`.
134
- 2. Present options via `AskUserQuestion`. If the user has already named an answer in chat, pre-lean it with a confirm step.
135
- 3. **Sparring-partner pushback**: probe weak rationale once. If the user holds firm, accept.
136
- 4. Append to `decisions.md` with **Decision**, **Why**, **How to apply**, **Resolves Q-N**, optional **Alternatives considered** linking to `rejected.md`.
137
- 5. **Delete** Q-N from `questions.md`. No strikethrough. No "(resolved)" marker. The decision now lives in `decisions.md`, period.
39
+ - **Complexity** (low / medium / high) — sets the default pillar surface.
40
+ - **Build mode** (greenfield / brownfield / hybrid) — lands in `build.md`; opens or closes the execution sections and sets the writing posture.
41
+ - **Mode** — where the idea lives right now (see below).
138
42
 
139
- #### Topic shifts → pillar reinforcement
43
+ Then the skill proposes an **aspect map** — the thinking dimensions for *this* idea — which the user edits. The map drives the sync's coverage audit.
140
44
 
141
- When conversation moves from one design topic to another, the skill pauses **before** entering the new topic:
45
+ ### Modes (who drives)
142
46
 
143
- > "I see we're moving from [previous] to [next]. Before we shift — do any of these belong in the load-bearing pillars?
144
- > - [Candidate 1] → could go in `glossary.md` because [reason]
145
- > - [Candidate 2] → could go in `doctrine.md` because [reason]
146
- >
147
- > Promote any of them?"
47
+ | Mode | Driver | When | Behavior |
48
+ |---|---|---|---|
49
+ | **dump** | user | idea is in their head | No questions mid-stream. Distill live, reflect back shape + contradictions + implications. |
50
+ | **interview** | skill | idea is fuzzy | Question batches of 2–3, one aspect at a time, each answer distilled immediately. |
51
+ | **probe** | skill | idea is drafted | Adversarial pass — flaws, edge cases, conflicts. Each finding becomes a question. |
52
+ | **converge** | shared | closing | Burn down open questions into decisions or explicit parks; ends with a mandatory sync. |
148
53
 
149
- This is the **only** periodic prompt. There is no scheduled checkpoint or review — pillar reinforcement happens at natural topic boundaries because that's when the closing context is fresh.
150
-
151
- #### Semantic sweeps
152
-
153
- When the user asks to "update the docs" / "propagate this", the skill runs a semantic sweep — not a grep:
154
-
155
- 1. List all plan docs and pillar files that might be affected.
156
- 2. Read each end-to-end for sections referencing the changed concept.
157
- 3. Present a punch list grouped by file → section → proposed edit.
158
- 4. Wait for approval before editing.
159
-
160
- Sweeps are **never automatic**. They are user-requested or skill-recommended, but the user always pulls the trigger.
161
-
162
- #### Production code — blocked
163
-
164
- The skill refuses to write production code (in `src/`, `apps/`, `packages/`, etc.) while a session is open. Small load-bearing snippets — a config sketch, an API contract, a database row layout — are allowed **inside the brainstorm folder** in `./plan/samples/` or inline in plan docs as fenced code. They are documentation, not production.
165
-
166
- If the user asks for production code, the skill says:
167
-
168
- > "We're in an active brainstorm session. I can sketch this inside `./plan/` as illustration, or you can run `/brainstorm close` first if you want to start building. Which do you want?"
169
-
170
- ### `close` — closing a session
171
-
172
- 1. Read all pillars and plan docs.
173
- 2. Run gap detection:
174
- - Greenfield smell-words grep across plan docs (see `greenfield.md`).
175
- - Decisions missing **Why** or **How to apply**.
176
- - Questions with no `Blocks.` field.
177
- - Pillars untouched since `start` (suggests underspecified design).
178
- - Plan docs with their own "Open Questions" section instead of a pointer to `questions.md`.
179
- 3. Report gaps — do not auto-fix.
180
- 4. Ask whether to address them now or close anyway.
181
- 5. On confirmation, write `STATE: closed` to `state.md` with a one-line reason (milestone reached / paused / scope cut / handing off).
182
- 6. If `./plan/sources/` exists, offer to delete it. Default to keep if unclear — they were copies; originals are untouched.
183
- 7. Print: "Run `/brainstorm start` to resume."
184
-
185
- ---
186
-
187
- ## The 9 pillars (+ plan docs)
188
-
189
- | File | Role |
190
- |---|---|
191
- | `questions.md` | Live ledger of unresolved decisions. Self-contained text per question (no `08 §5` cross-refs). |
192
- | `decisions.md` | Resolved decisions, each with **Why** and **How to apply**. Append-only. |
193
- | `doctrine.md` | Stable principles that pre-answer future questions. |
194
- | `glossary.md` | Project-specific terms with definitions. |
195
- | `inventory.md` | What exists / is being built / is external / is reference-only. |
196
- | `non-goals.md` | Explicit "not building" list, each with a reason. |
197
- | `references.md` | External prior art, each with a one-line "what we use it for". |
198
- | `rejected.md` | Alternatives considered and rejected, with reasons + re-evaluate conditions. |
199
- | `milestones.md` | Sequencing only. Each milestone names its blocking questions and dependencies. |
200
-
201
- Plus **plan docs** — `01-foo.md`, `02-bar.md`, ... — domain-by-domain architecture, present-tense. Format described in `templates/plan-doc.md`.
202
-
203
- Each template at `templates/` carries a full prose introduction. Read the template, not summaries, when working with format details.
54
+ Mode switches on an explicit user word. On a strong signal the skill *offers* a switch in one line; it never seizes it.
204
55
 
205
56
  ---
206
57
 
207
- ## Hard rules
58
+ ## Coherence (the doneness function)
208
59
 
209
- These hold for the entire session.
60
+ ```
61
+ coherent ⇔ open_questions == 0 ∧ last sync ran after the last pillar write
62
+ ```
210
63
 
211
- 1. **No production code outside the brainstorm folder.** Small load-bearing snippets go in `./plan/samples/` or inline in plan docs. Never touch `src/`, `apps/`, `packages/`.
212
- 2. **Resolved questions get DELETED, not struck through.** No `~~`, no "(resolved)", no "previously planned".
213
- 3. **Self-contained registry.** Full text in `questions.md`. Never `08 §5` cross-references that force a second read.
214
- 4. **Every decision carries Why + How to apply.** Without the *why*, future-you can't judge edge cases.
215
- 5. **Reference implementations beat invented solutions.** If prior art exists, link in `references.md` and use it. Don't re-derive.
216
- 6. **Batch questions via `AskUserQuestion`**, 2–4 at a time. Never open-chat dump structured choices.
217
- 7. **Greenfield writing rules apply** to all docs in the brainstorm folder. See `greenfield.md`.
218
- 8. **No past tense for software that doesn't exist yet.** Architecture docs are present-tense. The past lives only in `decisions.md`, `rejected.md`, `references.md`, and git history.
64
+ `questions.md` is the **single convergence currency**: flaws, gaps, contradictions, and uncovered aspects all funnel into it, whoever raised them. Convergence is one number going to zero. Zero means *"audited against the four sources and clean,"* never *"nothing came to mind"* — which is why the sync agent's audit contract is mandatory.
219
65
 
220
66
  ---
221
67
 
222
- ## State management
223
-
224
- `state.md` is the source of truth for session lifecycle. Format:
68
+ ## The sync agent
225
69
 
226
- ```
227
- STATE: open | closed
228
- SESSION STARTED: <ISO date>
229
- SESSION CLOSED: <ISO date or absent>
230
- CURRENT TOPIC: <one-line>
231
- LAST UPDATED: <ISO date>
232
- ```
70
+ The background reconciler that replaces v1's cascade apparatus. One sync in flight at a time; at most one queued behind it. It runs after substantive writes, mandatorily on entering converge and at `stop`, and on demand. It audits exactly four sources:
233
71
 
234
- - `STATE: open` → in-session behavior applies (voices, refusal rules, topic-shift prompts).
235
- - `STATE: closed` → the skill does nothing on its own; only `/brainstorm start` re-opens it.
236
- - `CURRENT TOPIC` updates on every detected topic shift.
237
- - `LAST UPDATED` updates on every pillar write.
72
+ 1. **Cross-pillar contradiction** — thesis vs domain model vs decisions vs doctrine vs build.
73
+ 2. **Aspect coverage** — any mapped aspect with no content → a question.
74
+ 3. **Basis drift** — does the thesis still agree with the basis? Accidental divergence → a question.
75
+ 4. **Tech conflicts** — anything violating `tech.md` without a recorded deviation.
238
76
 
239
- To find `state.md` across turns, the skill checks the conventional folders (`./plan/`, `./brainstorm/`, `./design/`) and any other one-level-deep folder containing pillar files.
77
+ It applies **scribe-calls** (edits that don't change the design) directly and notes them; it files **design-calls** (edits that change the idea) as questions and moves on — never interrupting to ask "apply now or defer?" Its one-line report ("4 edits · 2 new questions · 6 open · untouched: risks") is the only ambient convergence pressure the skill applies.
240
78
 
241
79
  ---
242
80
 
243
- ## Greenfield doctrine
81
+ ## Pillars (substance first, lazy by default)
244
82
 
245
- `greenfield.md` is loaded for any sweep, gap detection, or `close`. It enforces a single rule for unbuilt-software docs:
83
+ Always present: `thesis.md`, `questions.md`, `decisions.md`, `build.md`. Materialized at medium+ complexity: `domain-model.md`, `tech.md`. Lazy (materialize on first real content at any complexity): `doctrine`, `glossary`, `non-goals`, `backlog`, `rejected`, `references`, `milestones`.
246
84
 
247
- > Describe what the system **is** (or will be — same thing in greenfield). Never describe what it isn't, used to be, replaces, supersedes, or is migrating from.
248
-
249
- The doctrine includes a banned-patterns table (no "X replaces Y", no `~~strike-through~~`, no "previously planned", no "(resolved)" markers) and a `grep` smell-words check that `close` runs automatically. Hits are acceptable only in `decisions.md`, `rejected.md`, `references.md`, commit messages, and `./plan/sources/`.
85
+ | File | Role |
86
+ |---|---|
87
+ | `thesis.md` | Running narrative of what we're designing + the aspect map. |
88
+ | `questions.md` | Single convergence currency — every unresolved design call. |
89
+ | `decisions.md` | Resolved calls with **Why** + **How to apply**. Append-only, no state machine. |
90
+ | `build.md` | How the work executes: build mode, migration strategy, gotchas, rollout. |
91
+ | `domain-model.md` | Information architecture — entities, relationships, cardinalities, state ownership. |
92
+ | `tech.md` | Stack choices, seeded from harness rules; deviations recorded with whys. |
93
+ | `doctrine` / `glossary` / `non-goals` / `backlog` / `rejected` / `references` / `milestones` | As their templates describe. |
250
94
 
251
- The full doctrine, including the four places where the past *does* belong, lives in `greenfield.md`.
95
+ The complexity dial sets *defaults*, not a cage — any lazy pillar materializes the moment the conversation produces content for it.
252
96
 
253
97
  ---
254
98
 
255
- ## Design philosophy
256
-
257
- A few choices in this skill are deliberate and worth naming:
99
+ ## Build modes (replacing the greenfield doctrine)
258
100
 
259
- **Skill behavior is determined by state, not by flags.** Voices, refusal rules, and topic-shift prompts all derive from `state.md` and the current phase. The user shouldn't have to specify "use facilitator voice" or "stop refusing code now" — the skill should read context and act.
101
+ v1 applied a present-tense "greenfield" writing doctrine unconditionally — which was a bug for brownfield work, where migration vocabulary is load-bearing. v2 folds this into `build.md` as a **mode** chosen at intake:
260
102
 
261
- **Capture is part of conversation, not a separate ceremony.** Pillar updates happen inline as topics come up, not at end-of-session. The skill writes to files during the same turn that elicits the information.
103
+ - **greenfield** (default) — present-tense everywhere, no phantom history. Execution sections closed.
104
+ - **brownfield** — migration vocabulary is legitimate in `build.md`; other pillars still describe the target.
105
+ - **hybrid** — new surface on a live system; execution sections apply to the seams only.
262
106
 
263
- **Resolved questions disappear from the ledger.** Striking-through or marking "(resolved)" creates noise that future readers — including future Claude — have to filter. The decision lives in `decisions.md`; the question is gone.
107
+ `build.md` also captures **gotchas** — execution hazards known now, before plan mode, because surfacing them in plan mode is too late.
264
108
 
265
- **Why** is load-bearing. Every decision and every piece of feedback-style guidance carries a *why*. Without it, future-you can't judge edge cases — only blindly follow or blindly violate the rule.
109
+ ---
266
110
 
267
- **The user prevents eager coding.** The skill is the assistant. The user controls when a session opens and closes. There is no "auto-open on natural language phrases like let's design" — that pattern has caused too many surprise refusals when the user just wanted to chat. The skill opens only on explicit `/brainstorm start`.
111
+ ## Harvest (optional)
268
112
 
269
- **Reference implementations beat invented solutions.** If prior art exists for the problem, the skill prefers a one-line link in `references.md` over a re-derivation. Originality is not a virtue when shipping is the goal.
113
+ By default the session folder *is* the product — self-contained, resumed by the next `/brainstorm start`. When the repo is v9-harnessed (`docs/architecture/` + `docs/modules/` exist) the skill *offers* the harvest adapter at `stop`, which routes pillars into the doc tree (ADRs, module pillars, plans, the `boundary` skill). See `harvest.md`. The adapter is never assumed.
270
114
 
271
115
  ---
272
116
 
273
- ## Anti-features (what this skill deliberately doesn't do)
117
+ ## Hard rules
274
118
 
275
- - **No auto-invocation on natural language.** Phrases like "let's plan", "let's design", "let's think through X" do **not** trigger the skill. Only explicit `/brainstorm start` and `/brainstorm close` do.
276
- - **No automatic semantic sweeps.** Sweeps run only when the user asks or when the skill recommends one after a major decision and the user agrees.
277
- - **No scheduled checkpoints.** Pillar reinforcement happens at natural topic boundaries — the only periodic prompt.
278
- - **No subcommand sprawl.** No `sweep`, `resolve`, `init`, `reinforce`, `check`. Two verbs total: `start` and `close`.
279
- - **No code in `src/`.** The skill will refuse and offer a sketch inside the brainstorm folder or a close-then-build path.
119
+ 1. **No production code outside the session folder.** Illustrative snippets are fine inside it.
120
+ 2. **Speak English to the user; codes (`Q3`, `D7`) live in the files.**
121
+ 3. **`AskUserQuestion` appears in exactly three places:** the intake frame, interview mode, converge picks.
122
+ 4. **Suggested, never seized** — mode shifts, abstractions, probes are offered once.
123
+ 5. **Questions are the only convergence currency** — nothing pending may live only in the transcript.
124
+ 6. **No auto-invocation** — only `/brainstorm start` and `/brainstorm stop`.
280
125
 
281
126
  ---
282
127
 
283
- ## Related
128
+ ## Files
284
129
 
285
- - `greenfield.md` — writing doctrine for unbuilt-software docs.
286
- - `templates/` — pillar file templates, each with a prose introduction describing its format.
287
- - The `documentation` skill in this repo handles documentation of *built* systems (changelogs, ADRs, root READMEs). `brainstorm` is its before-the-fact counterpart.
130
+ ```
131
+ brainstorm/
132
+ ├── SKILL.md # the skill definition Claude Code loads (~1.8k words)
133
+ ├── README.md # this file
134
+ ├── harvest.md # optional v9 doc-tree adapter
135
+ └── templates/ # pillar templates copied into the session folder on first use
136
+ ```