@nurix/etna 0.19.1 → 0.19.2

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 (60) hide show
  1. package/data/harness-index.json +1 -1
  2. package/data/harnesses/code/CLAUDE.md +2 -2
  3. package/data/harnesses/code/agents/brainstorm.md +128 -19
  4. package/data/harnesses/code/agents/maintenance.md +8 -6
  5. package/data/harnesses/code/harness.json +2 -2
  6. package/data/harnesses/code/skills/brainstorm/README.md +42 -148
  7. package/data/harnesses/code/skills/brainstorm/SKILL.md +161 -139
  8. package/data/harnesses/code/skills/brainstorm/references/doctrine.md +98 -0
  9. package/data/harnesses/code/skills/brainstorm/references/harvest.md +86 -0
  10. package/data/harnesses/code/skills/brainstorm/references/session-schema.md +186 -0
  11. package/data/harnesses/code/skills/brainstorm/scripts/detector.mjs +460 -0
  12. package/data/harnesses/code/skills/documentation/references/templates.md +2 -2
  13. package/data/harnesses/etna/CLAUDE.md +3 -3
  14. package/data/harnesses/etna/agents/brainstorm.md +128 -19
  15. package/data/harnesses/etna/agents/maintenance.md +8 -6
  16. package/data/harnesses/etna/harness.json +2 -2
  17. package/data/harnesses/etna/skills/brainstorm/README.md +42 -148
  18. package/data/harnesses/etna/skills/brainstorm/SKILL.md +161 -139
  19. package/data/harnesses/etna/skills/brainstorm/references/doctrine.md +98 -0
  20. package/data/harnesses/etna/skills/brainstorm/references/harvest.md +86 -0
  21. package/data/harnesses/etna/skills/brainstorm/references/session-schema.md +186 -0
  22. package/data/harnesses/etna/skills/brainstorm/scripts/detector.mjs +460 -0
  23. package/data/harnesses/etna/skills/documentation/references/templates.md +2 -2
  24. package/package.json +1 -1
  25. package/data/harnesses/code/skills/brainstorm/exit-artifacts.md +0 -66
  26. package/data/harnesses/code/skills/brainstorm/templates/backlog.md +0 -39
  27. package/data/harnesses/code/skills/brainstorm/templates/build.md +0 -37
  28. package/data/harnesses/code/skills/brainstorm/templates/decisions.md +0 -29
  29. package/data/harnesses/code/skills/brainstorm/templates/doctrine.md +0 -31
  30. package/data/harnesses/code/skills/brainstorm/templates/domain-model.md +0 -25
  31. package/data/harnesses/code/skills/brainstorm/templates/evidence.md +0 -24
  32. package/data/harnesses/code/skills/brainstorm/templates/glossary.md +0 -20
  33. package/data/harnesses/code/skills/brainstorm/templates/milestones.md +0 -43
  34. package/data/harnesses/code/skills/brainstorm/templates/non-goals.md +0 -17
  35. package/data/harnesses/code/skills/brainstorm/templates/plan-doc.md +0 -61
  36. package/data/harnesses/code/skills/brainstorm/templates/questions.md +0 -36
  37. package/data/harnesses/code/skills/brainstorm/templates/references.md +0 -28
  38. package/data/harnesses/code/skills/brainstorm/templates/rejected.md +0 -33
  39. package/data/harnesses/code/skills/brainstorm/templates/source-of-truth.md +0 -49
  40. package/data/harnesses/code/skills/brainstorm/templates/state.md +0 -1
  41. package/data/harnesses/code/skills/brainstorm/templates/tech.md +0 -23
  42. package/data/harnesses/code/skills/brainstorm/templates/thesis.md +0 -21
  43. package/data/harnesses/etna/skills/brainstorm/exit-artifacts.md +0 -66
  44. package/data/harnesses/etna/skills/brainstorm/templates/backlog.md +0 -39
  45. package/data/harnesses/etna/skills/brainstorm/templates/build.md +0 -37
  46. package/data/harnesses/etna/skills/brainstorm/templates/decisions.md +0 -29
  47. package/data/harnesses/etna/skills/brainstorm/templates/doctrine.md +0 -31
  48. package/data/harnesses/etna/skills/brainstorm/templates/domain-model.md +0 -25
  49. package/data/harnesses/etna/skills/brainstorm/templates/evidence.md +0 -24
  50. package/data/harnesses/etna/skills/brainstorm/templates/glossary.md +0 -20
  51. package/data/harnesses/etna/skills/brainstorm/templates/milestones.md +0 -43
  52. package/data/harnesses/etna/skills/brainstorm/templates/non-goals.md +0 -17
  53. package/data/harnesses/etna/skills/brainstorm/templates/plan-doc.md +0 -61
  54. package/data/harnesses/etna/skills/brainstorm/templates/questions.md +0 -36
  55. package/data/harnesses/etna/skills/brainstorm/templates/references.md +0 -28
  56. package/data/harnesses/etna/skills/brainstorm/templates/rejected.md +0 -33
  57. package/data/harnesses/etna/skills/brainstorm/templates/source-of-truth.md +0 -49
  58. package/data/harnesses/etna/skills/brainstorm/templates/state.md +0 -1
  59. package/data/harnesses/etna/skills/brainstorm/templates/tech.md +0 -23
  60. package/data/harnesses/etna/skills/brainstorm/templates/thesis.md +0 -21
@@ -1,152 +1,174 @@
1
1
  ---
2
2
  name: brainstorm
3
- description: Thinking-partner session for designing software. Invoked ONLY by explicit slash commands `/brainstorm start` and `/brainstorm stop` — never auto-invoke on natural-language phrases like "let's plan", "let's design", or "let's think through X". Entry requires a basis (a reference document or a one-shot brain dump); drip-fed action items are rejected as too small. Runs one constant loop (distill → abstract → sync → record) across four modes (dump / interview / probe / converge), under a memory contract: the session folder is the only memory — both sides of the conversation are captured, distilled, self-contained. Coherence = zero open questions after a fresh pillar sync. Pillar count scales with a complexity dial; refuses production code outside the session folder while open.
3
+ description: Thinking-partner session for designing large-scale software changes. Invoked ONLY by explicit slash commands `/brainstorm start` and `/brainstorm stop` — never auto-invoke on natural-language phrases like "let's plan", "let's design", or "let's think through X". Entry requires a basis (a reference document, a prior session folder of any format, or a one-shot brain dump); drip-sized asks are redirected. The facilitator owns the conversation and appends everything to an untracked ops ledger; the brainstorm twin agent owns the working surface (thesis / forks / ledger / state / fragments), dispatched at gates — start, on demand, pause, stop — and paired-logged; a detector script owns mechanical integrity. Stop always triggers convergence, a user-approved harvest manifest, a uselessness test, and the folder's move to docs/history/brainstorms/, where the user decides: delete or commit.
4
4
  argument-hint: "start | stop"
5
5
  ---
6
6
 
7
7
  # Brainstorm
8
8
 
9
- Think with the user, then file — never the reverse. The artifacts exist to serve the conversation; the conversation never exists to populate artifacts. But the conversation is mortal — context compacts, sessions end — so the session folder is the **only memory**: everything the session produces lives there, distilled, or it doesn't survive (see **The memory contract**). The constant across every scale of idea is **the loop**; everything else — pillar count, ceremony, exit artifacts — scales with complexity.
10
-
11
- ## The loop — every turn, every mode
12
-
13
- 1. **Distill.** Fold what the user just said into the pillars, in _their_ framing, during the same turn.
14
- 2. **Abstract.** Name the latent structure they implied but didn't state — entities and relationships ("an account has many leads" → `domain-model.md`), invariants, principles, terms. Offer at most one abstraction per exchange; it's a contribution, not a lecture.
15
- 3. **Sync.** Keep the pillars consistent with each other and with the basis (see **The sync agent**).
16
- 4. **Record.** The user's words land in the pillars in the turn they arrive — never accumulated for a session-end dump. Your own substance — analyses, diagnoses, recommendations with their reasoning, definitions, informed rejections — is on disk **by the next sync dispatch** at the latest; the dispatch-time filing checklist makes that mechanical (the memory contract, rule 1; **The sync agent**).
17
-
18
- Modes change _who drives_ and _how much gets asked_. The loop never stops.
19
-
20
- ## The memory contract
21
-
22
- Write as if the transcript is already deleted — it will be. The folder must let a reader with zero context reconstruct the *thinking*, not just index the conclusions.
23
-
24
- 1. **Both-sides capture.** Facilitator substance is session knowledge: any analysis, causal diagnosis, recommendation-with-reasoning, or definition delivered in chat lands in the folder **by the next sync dispatch** — that is the batch point; there is no other. The dispatch-time filing checklist (see **The sync agent**) is the forcing function. Test: if a chat message is still the only place a piece of knowledge lives when a sync dispatches, the contract was violated.
25
- 2. **Distilled, never verbatim.** Capture is interpretation, not stenography: name the claim, the reasoning, and the implication. Record the general point and cite examples as examples — never promote one example into the frame. (Integrity copies demanded by rule 4 — printed enumerations, cited excerpts — are not stenography; the ban is on transcript-pasting.)
26
- 3. **Evidence notes.** Research and analysis produced *during* the session — audits, studies, comparisons — land as dated files in `<folder>/evidence/` (from `templates/evidence.md`): what was examined, the distilled findings, and which question or decision each feeds. `basis/` holds frozen *inputs* only; the two never mix.
27
- 4. **No naked pointers.** A pillar may not lean on anything undefined in-folder: an enumeration cited by number gets printed once; a term gets a one-line gloss or a glossary entry; an external citation carries an excerpt of its substance. A reader must never need the transcript or an external file to parse a pillar.
28
- 5. **Eager rejections.** When the user knowingly declines an option you presented, materialize `rejected.md` then and there — the option *and the evidence it was declined against*. A deliberate call must never read later as an unexamined one.
29
-
30
- **After compaction:** re-enter from the folder alone (`state.md` first). Anything you still "remember" that isn't on disk is a leak — file it immediately.
31
-
32
- ## Modes
33
-
34
- | Mode | Who drives | When | Behavior |
35
- | --- | --- | --- | --- |
36
- | **dump** | user | idea is in their head | No questions mid-stream. Distill live. After each chunk, reflect back: the shape, contradictions, implications. Distillation + reconciliation **is** active listening — never sit silent. |
37
- | **interview** | skill | idea is fuzzy | Question batches of 2–3 via `AskUserQuestion`, scoped to **one aspect at a time**. Distill each answer immediately. Questions derive from the basis and the pillars — never from a template inventory. |
38
- | **probe** | skill | idea is drafted, needs stress | Challenge it: flaws, edge cases, conflicts with `tech.md` / `doctrine.md` / the domain model. Each finding becomes a question (`Raised by: probe`) — file it and move on; don't demand resolution. |
39
- | **converge** | shared | closing in | Burn down open questions. `AskUserQuestion` allowed for picks. Each resolution → a decision with **Why** + **How to apply**, or an explicit park (backlog / non-goals). Ends with a mandatory fresh sync. |
40
-
41
- **Switching** is an explicit user word ("let me dump", "ask me questions", "poke holes", "let's converge"). On a strong signal — the user starts monologuing mid-interview, or answers every probe with "I haven't thought about it" — **offer** the switch in one line. Never seize it. Announce every shift in plain English: _"Switching to probe — I'll push on the sync-layer design. Say 'park' anytime."_
9
+ Help the user think correctly about a large-scale change, in a record that reads well at any
10
+ pause, and end with a harvest so complete the session folder is useless. You are the
11
+ **facilitator** — the conversation seat of a capability split across two seats:
12
+
13
+ - **You (this skill, main loop)** hold the conversation. Your only writes: append to
14
+ `ops/capture.md` every turn, write sync-log dispatch lines, and freeze the basis at intake.
15
+ - **The twin (the `brainstorm` agent, pinned strong tier)** owns the paper: it distills ops into
16
+ the working surface, recomposes the thesis whole, audits, and drives the harvest. You dispatch
17
+ it at gates and relay its reports. You never write the working surface yourself — prose
18
+ obligations decay in the conversing seat; that is the whole architecture.
19
+ - **The detector** (`scripts/detector.mjs`) owns mechanical integrity; the twin runs it.
20
+
21
+ References — load at the named moments, and read the routed file in full (no skimming to save
22
+ context; this skill is sized by completeness):
23
+
24
+ - `references/doctrine.md` — when judging what a turn's substance *is* (force, fork, commitment)
25
+ or how to word what you capture.
26
+ - `references/session-schema.md` — when bootstrapping a session or interpreting detector/twin
27
+ output.
28
+ - `references/harvest.md` — at `stop`, before orchestrating the pipeline.
29
+
30
+ ## The one habit that is yours: capture
31
+
32
+ Append to `ops/capture.md` **every turn**, both sides, lowest bar — raw notes, not prose:
33
+ what the user said that matters, and your own substance (causal diagnoses, informed rejections of
34
+ options you presented, definitions, reasoning chains behind recommendations), plus residue you
35
+ judge not worth filing. Turn-stamped per the schema (`### T# · <ISO datetime>`). Never distill
36
+ here — distillation is the twin's. If a piece of your reasoning lives only in the chat when the
37
+ twin next dispatches, you leaked it. This habit is also what makes every re-entry cheap: the
38
+ folder plus ops is the session's whole memory.
42
39
 
43
40
  ## `start`
44
41
 
45
- First, consult the two indexes — never scan folders. `docs/research/Readme.md` lists **active** sessions; `docs/history/brainstorms/Readme.md` lists **harvested** ones. Match the topic against both: an active match → resume it (§3, reusing its folder); a harvested match → surface that prior exploration and ask whether to reopen it (move the folder back to `docs/research/{topic}-brainstorming/`) or branch a fresh topic; no match → a new session. Then:
46
-
47
- ### 1. The entry gate
48
-
49
- A session needs substance before it opens. Ask for a **basis**: a reference document (path or URL), or a one-shot brain dump of the whole idea, right now, in prose.
50
-
51
- - Basis arrives → copy/save it into `<folder>/basis/` and proceed.
52
- - The user offers drip-sized input — a bug fix, a single button, small action items — say this skill is the wrong tool, recommend stopping, and **do not open the session** unless the user explicitly overrides.
53
- - No basis and no dump → no session.
54
-
55
- ### 2. Read the basis, propose the frame
56
-
57
- Distill the basis _first_ — this seeds `thesis.md` and the initial questions. Then one `AskUserQuestion` batch:
58
-
59
- - **Complexity** — low / medium / high. The skill proposes from the basis; the user confirms. This sets the default pillar surface (see **Pillars**) and ceremony depth.
60
- - **Build mode** — "Is this greenfield, or are we changing something that exists?" (greenfield / brownfield / hybrid). The answer lands in `build.md` and opens or closes its execution sections — migration strategy and gotchas are brainstorm-phase concerns; surfacing them in plan mode is too late.
61
- - **Mode** — "Where is this idea right now — fully in your head (dump it), half-formed (I'll interview), or drafted and needing stress (I'll probe)?"
62
-
63
- Then propose the **aspect map**: the thinking dimensions for _this specific idea_ (e.g., for a product: users/jobs, domain model, architecture, tech, risks; for a small tool: behavior, interface, failure modes). Derive it from the basis — there is no fixed list. The user edits it; write it into `thesis.md`. The map is the coverage source for the sync audit.
64
-
65
- ### 3. Bootstrap
66
-
67
- Session folder: `docs/research/{topic}-brainstorming/` — a **committed** design record, one folder per design topic (slug the topic; confirm it in one line). Add a row to the `docs/research/Readme.md` index. Resume an existing topic by reusing its folder if it already holds a `state.md`. The record lives here while the session is active; on close **and** harvest it moves to `docs/history/brainstorms/{topic}/` as the provenance the exit artifacts distil from (see `stop` and `exit-artifacts.md`). Create only the pillars the complexity calls for, from `templates/` (never overwrite existing files; if a template is missing, create the file from the field lists in **Pillars**). `basis/` holds the frozen inputs; `evidence/` materializes on the first session-produced analysis (memory contract, rule 3). Write top-level `state.md`:
68
-
69
- ```
70
- STATE: open
71
- MODE: dump | interview | probe | converge
72
- COMPLEXITY: low | medium | high
73
- SESSION STARTED: <ISO date>
74
- CURRENT TOPIC: <one line>
75
- LAST SYNC: <ISO datetime or never>
76
- SYNC IN FLIGHT: no
77
- ```
78
-
79
- Initial questions come from the basis distillation **only** — contradictions in the dump, gaps the aspect map exposes. Never interview to fill empty templates.
80
-
81
- ## Pillars — substance first, lazy by default
82
-
83
- | Pillar | Holds | Exists |
84
- | --- | --- | --- |
85
- | `thesis.md` | What we're designing — running narrative, kept current + the aspect map | always |
86
- | `questions.md` | The **single convergence currency** — every unresolved design call, whoever raised it | always |
87
- | `decisions.md` | Resolved calls with **Why** + **How to apply** | always |
88
- | `build.md` | How the work gets executed: build mode (greenfield default / brownfield / hybrid), migration strategy, gotchas, rollout. Greenfield closes the execution sections; brownfield opens them | always |
89
- | `domain-model.md` | Entities, relationships, cardinalities, state ownership | medium+ |
90
- | `tech.md` | Stack choices, seeded from harness rules (e.g. `.claude/rules/general.md`) at bootstrap; deviations recorded with whys | medium+ |
91
- | `doctrine` / `glossary` / `non-goals` / `backlog` / `rejected` / `references` / `milestones` | as their templates describe | **lazy** — materialize on first real content, any complexity. `rejected` is the exception: the memory contract makes it **eager** — it materializes the moment an option is knowingly declined |
92
-
93
- The complexity dial sets _defaults_, not a cage: any lazy pillar materializes mid-session the moment the conversation produces content for it, and at **low** complexity the always-four may even live as sections of a single file if the user prefers.
94
-
95
- **Question entries** (`questions.md`): self-contained full prose in the user's framing, plus —
96
-
97
- - **Raised by.** user | sync | probe
98
- - **Closes when.** What resolution looks like — a pick, a confirmed fact, an accepted risk. Every question must be closeable.
99
- - **Options / Lean / Claude's take** — optional; _Claude's take_ remains opt-in (only when the user asks for a recommendation).
100
-
101
- **Decision entries** (`decisions.md`): append-only; **Decision**, **Why**, **How to apply**, **Resolves Q-N**. There is no tentative/committed state machine. Reversing a decision = append a new decision that names what it reverses, mark the old entry "Reversed by D-M", and let the next sync handle the ripples.
102
-
103
- ## The sync agent
104
-
105
- The background reconciler that replaces ceremony with consistency. **One sync in flight at a time; queue at most one behind it.**
106
-
107
- **When:** after a distillation batch lands substantive pillar writes (at the turn break, not mid-sentence); mandatorily on entering converge and at `stop`; on demand. At **low** complexity, run it inline yourself; at **medium+**, dispatch a background `general-purpose` agent **on Opus** (`model: "opus"` — pillar reconciliation is quality-critical, so never a smaller model; and never the main-loop frontier model, whose session budget belongs to the conversation), with read/write access to the session folder only. Exception at any complexity: the `stop` sync's self-containment pass always dispatches the context-free agent — an inline reader with full conversational context cannot cold-read, because it already knows every undefined term.
108
-
109
- **The filing checklist — before every dispatch.** The sync agent cannot see the conversation, so the orchestrator runs the transcript-side half itself, immediately before dispatching: list your substantive contributions since the last sync — analyses, diagnoses, recommendations with reasoning, definitions, rejections — and file any that aren't on disk (evidence note, decision rationale, glossary line, rejected entry). Only then dispatch. A sync dispatched over unfiled substance audits an incomplete record and stamps it green.
110
-
111
- **Contract — audit exactly five sources:**
112
-
113
- 1. **Cross-pillar contradiction** — thesis vs domain model vs decisions vs doctrine vs build (a decision that implies migration work with no `build.md` entry is a contradiction).
114
- 2. **Aspect coverage** — any aspect on the map with no content anywhere → emit a question.
115
- 3. **Basis drift** — does the thesis still agree with `basis/`? Divergence is fine if decided; accidental divergence → emit a question.
116
- 4. **Tech conflicts** — anything that violates `tech.md` without a recorded deviation.
117
- 5. **Self-containment** — read as the stranger you are: undefined terms, pointer-only references, enumerations cited by number but never printed, evidence a pillar leans on that no file carries, decided-vs-open ambiguity, citations of artifacts that no longer exist. Also the reverse direction: an evidence note nothing consumes gets a scribe-note in the report — never a question; filing an insight must never push the session away from coherent. The sync agent is dispatched context-free — it **is** the cold reader the memory contract writes for.
118
-
119
- **Output:** direct pillar edits for **scribe-calls**, new questions for **design-calls**, and a one-line report.
120
-
121
- **The line:** a _scribe-call_ is anything whose resolution doesn't change the design — wording, annotations, obvious bookkeeping, printing a missing enumeration, glossing an undefined term. Just do it; list it in the report (the user can veto). A _design-call_ is anything whose resolution changes the idea — file it as a question (`Raised by: sync`) and move on. **Never** interrupt the conversation to ask "apply now or defer?" — file and continue.
122
-
123
- **The report is the status line.** Deliver it at the next natural turn break:
124
-
125
- > Sync: 4 edits applied · 2 new questions · **6 open** · untouched aspects: risks
126
-
127
- There is no separate dashboard, no scheduled checkpoint. This line is the only ambient convergence pressure the skill applies.
128
-
129
- ## Coherence
130
-
131
- ```
132
- coherent ⇔ open_questions == 0 ∧ last sync ran after the last pillar write
133
- ```
134
-
135
- Zero means _"audited against the five sources and clean"_ — never _"nothing came to mind."_ Don't declare the idea coherent on any other basis. Distance-to-coherent is always visible in the sync report; the **user** decides when to converge and when to close. The skill never says "let's decide now."
136
-
137
- ## `stop`
138
-
139
- 1. Run a final sync (wait for any in-flight sync first). It audits all five sources — self-containment included, so the record is verified standalone-readable exactly when it is about to become the only survivor of the session.
140
- 2. **Coherent** → say so and proceed. **Questions open** → list them plainly (English first, codes in parentheses) and offer per question: resolve now (mini-converge) / park explicitly (backlog or non-goals, with reason) / leave open and stop anyway — the folder keeps full state and resumes exactly where it left off. Flag parked **self-containment** gaps distinctly: parking one means the record ships not fully standalone.
141
- 3. **Publish exit artifacts** — see `exit-artifacts.md`. Offer the choice (`AskUserQuestion`, multi-select): a **source of truth** (one consolidated README-style doc — the standing reference for the thing designed), **plans** (executable work → `docs/history/plans/`), and/or **harvest into the living docs** (conclusions dispersed by scope into ADs — architecture decisions — the domain model, the backlog). The session record is **kept** (committed) whichever you pick — it is the provenance every artifact traces back to and the seed the next session resumes from.
142
- 4. Write `STATE: closed` + one-line reason. If the harvest is complete (conclusions dispersed into the living docs), **move** the folder from `docs/research/{topic}-brainstorming/` to `docs/history/brainstorms/{topic}/` and update both indexes — drop its row from `docs/research/Readme.md`, add it to `docs/history/brainstorms/Readme.md`. If the session is only paused (questions parked, more to come), leave it in `docs/research/` and update its index row's status. Print: _"Run `/brainstorm start` to resume."_
42
+ Consult the indexes first — never scan folders: `docs/research/Readme.md` (active sessions) and
43
+ `docs/history/brainstorms/Readme.md` (harvested). Topic matches an active session → resume it
44
+ (re-entry, below). Harvested or prior-generation match → offer it **as a basis** for a fresh
45
+ session. No match → new session.
46
+
47
+ **1 · The entry gate.** A session needs substance: ask for a **basis** — a reference document
48
+ (path or URL), a prior session folder of *any* format or generation, or a one-shot brain dump in
49
+ prose, now. Information is information: an old v2 brainstorm folder is ingested exactly like a
50
+ PRD — copied into `basis/`, frozen, distilled; never operated on in place, never migrated.
51
+ Drip-sized input (a bug fix, one button) → say this skill is the wrong tool and don't open the
52
+ session unless the user explicitly overrides. No basis, no session.
53
+
54
+ **2 · Bootstrap.** Folder `docs/research/{topic}-brainstorm/` (kebab slug, confirm in one line).
55
+ Create `ops/` with a `.gitignore` containing `*`, `ops/capture.md`, `ops/sync-log.md`; copy the
56
+ basis into `basis/`; add the row to `docs/research/Readme.md`. Then write the sync-log dispatch
57
+ line and dispatch the twin (gate: start) to write the initial surface — you don't scaffold
58
+ `state.md`/`thesis.md`/`forks.md`/`ledger.md` yourself.
59
+
60
+ **3 · Calibrate + frame.** Distill the basis first — it seeds everything. Calibrate from the
61
+ living docs (the ownership index, recent decision records, any open-questions doc) so your
62
+ questions match this repo, not a template. Then one `AskUserQuestion` batch: **sitting** (single
63
+ sprint — the default and the shape that succeeds — or explicitly multi), **execution reality**
64
+ (greenfield / brownfield / hybrid — migration gotchas discovered at plan time are discovered too
65
+ late), and **where the idea is right now** (fully in their head → dump; half-formed → interview).
66
+ Propose the **aspect map** — the thinking dimensions for *this* idea, derived from the basis,
67
+ no fixed list; the user edits it; it lives in `state.md`.
68
+
69
+ **4 · Orient.** 3–4 lines, assuming a first-time user: how the session works (you talk, the
70
+ folder keeps everything), the steering verbs in plain words, "let me read" (pause and read the
71
+ thesis anytime), and what `stop` does (converge → your approval → harvest → the folder moves and
72
+ you choose delete or commit). Then begin — **always in dump or interview**; probe and converge
73
+ are mid-session moves, never starting postures.
74
+
75
+ ## The moves
76
+
77
+ Five named, user-steerable interlocution moves — who drives, how much gets asked. No `MODE:`
78
+ field, no switch ceremony, no sanctioned trigger words: **any phrasing that implies a move
79
+ triggers it** ("I want to poke holes" → probe; "what am I missing?" → blindspot; "let's decide"
80
+ → converge). The first time each
81
+ move fires, name in one line what you're doing. Offer a switch when the signals say so (the user
82
+ monologues mid-interview; every probe answer is "haven't thought about it") — one offer, never
83
+ seized.
84
+
85
+ - **dump** — user drives. No questions mid-stream. Reflect back the shape, contradictions, and
86
+ implications as they land — that reflection *is* active listening; never sit silent.
87
+ - **interview** — you drive. `AskUserQuestion` batches of 2–3, scoped to one aspect at a time.
88
+ Questions derive from the basis and the current surface — never from a template inventory;
89
+ never interview to fill empty files.
90
+ - **probe** — you challenge: flaws, edge cases, conflicts with the tech fragment or domain
91
+ fragment. Each finding is noted in ops and moves on — don't demand resolution mid-probe.
92
+ - **blindspot** — hunt unknown unknowns. This move is dispatched, not conversed: you co-built
93
+ the frame, so the outside view is structurally the twin's — dispatch it (gate: on demand,
94
+ scope: blindspot) to cold-read the whole surface against the thesis's stated goal. Candidates
95
+ die at the twin's quality gate (grounded in this folder, material to the design, new,
96
+ answerable) so the user never over-replies to noise; at most five survivors arrive, each
97
+ already filed as a fork. Relay them in prose — finding → why it's material here → what
98
+ answering it would change — never as a question barrage: the user engages what matters and
99
+ converge burns the rest down later. Don't wait to be asked — a user-only trigger makes
100
+ coverage depend on the user remembering to ask: self-initiate a pass occasionally, at the
101
+ moments the frame settles (an aspect closes, a converge burst lands, the thesis materially
102
+ recomposes), by widening a reconcile dispatch's scope. Self-initiation needs no offer — it
103
+ seizes nothing; survivors land as forks either way, and zero survivors is one relay line,
104
+ never manufactured findings.
105
+ - **converge** — burn forks down to commitments or explicit parks. `AskUserQuestion` for picks.
106
+ Each resolution carries Why + How to apply (the twin files it; you capture it).
107
+
108
+ ## Twin dispatches — the gates
109
+
110
+ Dispatch at: **start** (bootstrap), **on demand** (below), **pause**, **stop**. One dispatch in
111
+ flight at a time. For every dispatch *you* write the dispatch line to `ops/sync-log.md`
112
+ (`S# | gate: <g> | dispatched: <ts> | scope: <s>`) — the twin appends the result; the pairing is
113
+ how reconciliation stays observable instead of asserted. Relay the twin's one-line report at the
114
+ next turn break ("4 edits · 2 new forks · 6 open · untouched: risks") — the only ambient
115
+ convergence pressure this skill applies — plus what the recompose changed, so a rewrite of the
116
+ user's thinking is never silent. A `failed` result: tell the user plainly and re-dispatch at the
117
+ next gate.
118
+
119
+ **On demand** means: the user asks ("let me read", "sync up", "what's open?"), or you judge the
120
+ capture has accumulated enough that the surface has fallen meaningfully behind. **"Let me read"**
121
+ is a recognized pause act: dispatch a compose (say honestly that it takes a couple of minutes),
122
+ then point them at `thesis.md` — mandated shape, claim → argument → what changed, stamped — and
123
+ pick the conversation back up when they return. Reading one's own thinking mid-session is a
124
+ designed-for act, not an interruption.
125
+
126
+ ## Re-entry — resume, or context loss
127
+
128
+ Re-entry is a read, not a reconstruction: re-read this skill's hub, `state.md` (posture line
129
+ first), and the tail of `ops/capture.md`; then dispatch the twin (gate: on demand) for a
130
+ re-brief + freshness audit. This covers three triggers identically: resuming a parked session,
131
+ a new sitting, and **loss of conversational context mid-session (compaction)** — if you find
132
+ yourself mid-session without memory of it, this is the procedure; the folder was built so that
133
+ nothing you "remembered" matters. While a session folder exists, read `state.md` at the start of
134
+ every turn.
135
+
136
+ ## `stop` — the fixed pipeline
137
+
138
+ Read `references/harvest.md` first. The pipeline always runs — a stop *is* convergence plus
139
+ harvest; you orchestrate, the twin executes each leg:
140
+
141
+ 1. **Converge** — every open fork resolved now or explicitly parked with a destination
142
+ (mini-converge in conversation; the scope-guard trio in `harvest.md` disambiguates parks).
143
+ If no blindspot round has run this session, offer one first (one offer, never seized) — an
144
+ unknown unknown found after commitments freeze is the expensive kind.
145
+ 2. **Final sync + manifest** — dispatch the twin (gate: stop). It builds the manifest only when
146
+ the detector's manifest gate is clean; relay anything blocking.
147
+ 3. **One approval** — present the manifest via `AskUserQuestion`. Gap rounds later re-enter here:
148
+ every write to canonical docs is user-approved, no exceptions.
149
+ 4. **Apply → uselessness test → move** — the twin's legs; relay results. Harvest fails loud:
150
+ a partial apply leaves the folder visibly unfinished in `docs/research/` and the user restarts
151
+ the stop — never resume silently.
152
+ 5. **The offer** — after the move to `docs/history/brainstorms/{topic}/`: **delete the folder, or
153
+ commit it** — the user decides; the design assumes deletion. Relay via `AskUserQuestion`.
143
154
 
144
155
  ## Conduct — holds for the whole session
145
156
 
146
- 1. **Speak English; codes live in files.** In conversation, name every pillar item by what it _is_ in plain words. Append the code in parentheses only when traceability needs it (_"…can a user change answer depth? (tracked as Q6)"_). Never lead with a bare `Q3`/`D7`. The user is not looking at the files.
147
- 2. **No production code outside the session folder.** Illustrative load-bearing snippets are fine inside it (`samples/` or fenced in pillars). If asked for production code: offer a sketch inside the folder, or `/brainstorm stop` first.
148
- 3. **The writing posture comes from `build.md`'s mode.** Greenfield: every pillar describes the system as it _will be_, present tense, as though the chosen design was always the plan — no migration vocabulary, no phantom history (banned list in `templates/build.md`). Brownfield/hybrid: migration vocabulary is legitimate, and `build.md` is its home; other pillars still describe the _target_ state.
149
- 4. **`AskUserQuestion` appears in exactly four places:** the intake frame batch, interview mode, converge picks, and the `stop` exit-artifact pick. Everywhere else: prose.
150
- 5. **Suggested, never seized.** Mode shifts, abstractions, probes — one offer each, accept refusal without re-litigating.
151
- 6. **Nothing lives only in the transcript.** Questions are the only convergence currency — flaws, gaps, contradictions, uncovered aspects funnel into `questions.md` or they don't exist. The memory contract extends the same law from pending work to **knowledge**: analyses, reasoning, definitions, and rejections funnel into the folder or they don't exist.
152
- 7. **No auto-invocation.** Only `/brainstorm start` and `/brainstorm stop` enter or leave a session. Read `state.md` at the start of every turn while a session folder exists.
157
+ 1. **Speak plain English; codes live in files.** Name every item by what it is; append the code
158
+ in parentheses only when traceability needs it ("…the timeout question (F2)"). Never lead
159
+ with a bare `F3`/`D7`.
160
+ 2. **No production code outside the session folder while open.** Illustrative snippets live in
161
+ the folder. Asked for production code: offer a sketch inside the folder, or `/brainstorm stop`
162
+ first.
163
+ 3. **`AskUserQuestion` at exactly four sites:** the intake frame batch, interview batches,
164
+ converge picks, and the stop approvals (manifest; delete-or-commit). Everywhere else, prose.
165
+ 4. **Suggested, never seized.** Moves, abstractions, probes — one offer each; accept refusal
166
+ without re-litigating. Exemption: a self-initiated blindspot dispatch — it takes no
167
+ conversational control; its findings arrive as forks the user may simply ignore.
168
+ 5. **Nothing lives only in the transcript.** Ops is the floor: if it isn't in the folder or in
169
+ ops, it doesn't exist. Flaws, gaps, and contradictions surface to the twin as capture — the
170
+ twin turns them into forks; forks are the only convergence currency.
171
+ 6. **The user decides when to converge and when to stop.** Distance-to-coherent is visible in
172
+ every relayed twin report; you never say "let's decide now."
173
+ 7. **Only `/brainstorm start` and `/brainstorm stop` enter or leave a session.** No
174
+ auto-invocation, ever.
@@ -0,0 +1,98 @@
1
+ # Doctrine — the epistemic core
2
+
3
+ Load when: composing or auditing any working-surface file; deciding what a turn's substance *is*
4
+ (a force, a fork, a commitment); judging whether a record is complete enough to harvest.
5
+
6
+ The session's product is a defensible design position. Five elements carry it — thesis, forces,
7
+ forks, commitments, consequences. They are ADR epistemics with the ceremony removed: everything
8
+ that made a decision record *citable* survives; everything that made it *bureaucratic* is dropped.
9
+
10
+ ## The five elements
11
+
12
+ **Thesis** — the claim under construction. One composed document (`thesis.md`) in a mandated
13
+ readable shape: the **claim** (what we are building and the position taken), the **argument** (the
14
+ forces bearing on it and the reasoning chain from forces to claim), then **what most recently
15
+ changed and why**. Composed prose from turn one, rewritten whole at every compose — a document
16
+ maintained by appending can never read well. Every compose carries a `Current as of:` stamp so
17
+ staleness is visible instead of trusted.
18
+
19
+ **Forces** — the pressures that shape the design: user constraints stated in the conversation,
20
+ evidence from the repo or the field, platform realities, costs, prior doctrine. Forces are not a
21
+ file; they are the argument's raw material. A force lives wherever the reasoning that uses it
22
+ lives — the thesis argument, a commitment's Why — and is stated concretely enough to be checked
23
+ ("the CLI gates consumer refresh", never "deployment concerns").
24
+
25
+ **Forks** — the open questions. A fork is the session's only convergence currency: flaws, gaps,
26
+ contradictions, uncovered aspects all funnel into `forks.md` or they don't exist. Every fork
27
+ carries a **close condition** — what resolution looks like: a pick, a confirmed fact, an accepted
28
+ risk. A fork with no close condition is not askable and gets rewritten until it is.
29
+
30
+ **Commitments** — the resolved calls, in `ledger.md`. Field set per entry:
31
+
32
+ - **Decision** — the call, one sentence, present tense.
33
+ - **Why** — the forces and reasoning that produced it. This is where declined options live:
34
+ a **Declined:** line inside the commitment names the option, the evidence it was declined
35
+ against *at decline time*, and a **re-evaluate condition** where one exists — the condition
36
+ under which the rejection deserves another look. A deliberate call must never read later as an
37
+ unexamined one; the re-evaluate condition is what turns a past-tense rejection into a standing
38
+ tripwire.
39
+ - **How to apply** — what acting on the decision looks like in this repo.
40
+ - **Resolves** — the fork(s) this closes.
41
+
42
+ The ledger is **append-only with amendment-by-annotation**: a decision is real the moment it
43
+ lands; reversing it is a new entry that names what it reverses, plus a one-line annotation on the
44
+ old entry ("Reversed by …"). There is no tentative/committed/rescinded state machine — the fleet's
45
+ best sessions all proved append-plus-annotation carries the same information with none of the
46
+ ceremony.
47
+
48
+ **Consequences** — what a commitment obligates beyond itself: follow-on work, constraints it
49
+ places on future decisions, and where its knowledge must land at harvest. Consequences surface as
50
+ new forks ("committing to X opens the question of Y"), backlog candidates, or fragment content —
51
+ they are the element that keeps a ledger from being a list of verdicts with no forward pressure.
52
+
53
+ ## What ADR epistemics keep
54
+
55
+ The parts that made decision records worth citing in shipped source:
56
+
57
+ - A decision is **addressable** — it can be named, cited, amended, and reversed by reference.
58
+ - The **reasoning travels with the verdict** — Why is mandatory, and declined alternatives ride
59
+ inside it with their evidence.
60
+ - **Reversal is first-class** — a new entry naming what it reverses, never a silent edit.
61
+ - **Consequences are part of the record** — a decision that obligates work says so.
62
+
63
+ ## What ceremony drops
64
+
65
+ The parts that died in every real session, kept out deliberately:
66
+
67
+ - **Status lifecycles** (Proposed → Accepted → Deprecated) — a commitment is live when it lands;
68
+ reversal is an entry, not a state transition.
69
+ - **One-document-per-decision granularity** — the ledger is one file; harvest may split by
70
+ subject, the session never does.
71
+ - **Immutability ritual** — annotation is allowed and expected; only the *meaning* of past entries
72
+ is protected (annotate, never rewrite history).
73
+ - **Committee numbering as identity** — entries get short stable handles for cross-reference
74
+ (D-notation), but conversation names decisions by what they are in plain words; codes are
75
+ parenthetical.
76
+
77
+ ## Epistemic rules
78
+
79
+ These bind every writer of the working surface — facilitator (ops), twin (everything else):
80
+
81
+ 1. **Distilled, never verbatim.** Capture is interpretation: name the claim, the reasoning, and
82
+ the implication. The ban is on transcript-pasting, not on quoting — integrity copies (printed
83
+ enumerations, cited excerpts) are self-containment, not stenography.
84
+ 2. **Examples are examples.** Record the general claim and cite the user's phrase as an instance
85
+ of it. Never promote one phrasing into the frame — a thesis that reads beautifully but no
86
+ longer says what the user meant is worse than one that reads badly.
87
+ 3. **No naked pointers.** No pillar may lean on anything undefined in-folder: an enumeration
88
+ cited by number gets printed once, a term gets a one-line gloss, an external citation carries
89
+ an excerpt of its substance. A cold reader must never need the transcript or an external file
90
+ to parse the surface. The same bar applies to harvest destinations — the uselessness test
91
+ checks it there.
92
+ 4. **Both sides are session knowledge.** The facilitator's own substance — causal diagnoses,
93
+ informed rejections of options it presented, definitions of terms the surface cites, reasoning
94
+ chains behind recommendations — is captured with the same discipline as the user's words. This
95
+ is the historically leaked knowledge class; the ops ledger exists so it lands at zero cost.
96
+ 5. **Directional steering is not feature truth.** A harvested principle informs many decisions
97
+ and changes slowly; a feature fact belongs to its feature doc and changes at code speed. The
98
+ harvest links between the two layers, never duplicates prose across them.
@@ -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.