@nurix/etna 0.19.1 → 0.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/harness-index.json +1 -1
- package/data/harnesses/code/CLAUDE.md +3 -3
- package/data/harnesses/code/agents/brainstorm.md +128 -19
- package/data/harnesses/code/agents/maintenance.md +8 -6
- package/data/harnesses/code/harness.json +2 -2
- package/data/harnesses/code/skills/brainstorm/README.md +42 -148
- package/data/harnesses/code/skills/brainstorm/SKILL.md +161 -139
- package/data/harnesses/code/skills/brainstorm/references/doctrine.md +98 -0
- package/data/harnesses/code/skills/brainstorm/references/harvest.md +86 -0
- package/data/harnesses/code/skills/brainstorm/references/session-schema.md +186 -0
- package/data/harnesses/code/skills/brainstorm/scripts/detector.mjs +460 -0
- package/data/harnesses/code/skills/documentation/references/templates.md +2 -2
- package/data/harnesses/etna/CLAUDE.md +3 -3
- package/data/harnesses/etna/agents/brainstorm.md +128 -19
- package/data/harnesses/etna/agents/maintenance.md +8 -6
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/skills/brainstorm/README.md +42 -148
- package/data/harnesses/etna/skills/brainstorm/SKILL.md +161 -139
- package/data/harnesses/etna/skills/brainstorm/references/doctrine.md +98 -0
- package/data/harnesses/etna/skills/brainstorm/references/harvest.md +86 -0
- package/data/harnesses/etna/skills/brainstorm/references/session-schema.md +186 -0
- package/data/harnesses/etna/skills/brainstorm/scripts/detector.mjs +460 -0
- package/data/harnesses/etna/skills/documentation/references/templates.md +2 -2
- package/package.json +1 -1
- package/data/harnesses/code/skills/brainstorm/exit-artifacts.md +0 -66
- package/data/harnesses/code/skills/brainstorm/templates/backlog.md +0 -39
- package/data/harnesses/code/skills/brainstorm/templates/build.md +0 -37
- package/data/harnesses/code/skills/brainstorm/templates/decisions.md +0 -29
- package/data/harnesses/code/skills/brainstorm/templates/doctrine.md +0 -31
- package/data/harnesses/code/skills/brainstorm/templates/domain-model.md +0 -25
- package/data/harnesses/code/skills/brainstorm/templates/evidence.md +0 -24
- package/data/harnesses/code/skills/brainstorm/templates/glossary.md +0 -20
- package/data/harnesses/code/skills/brainstorm/templates/milestones.md +0 -43
- package/data/harnesses/code/skills/brainstorm/templates/non-goals.md +0 -17
- package/data/harnesses/code/skills/brainstorm/templates/plan-doc.md +0 -61
- package/data/harnesses/code/skills/brainstorm/templates/questions.md +0 -36
- package/data/harnesses/code/skills/brainstorm/templates/references.md +0 -28
- package/data/harnesses/code/skills/brainstorm/templates/rejected.md +0 -33
- package/data/harnesses/code/skills/brainstorm/templates/source-of-truth.md +0 -49
- package/data/harnesses/code/skills/brainstorm/templates/state.md +0 -1
- package/data/harnesses/code/skills/brainstorm/templates/tech.md +0 -23
- package/data/harnesses/code/skills/brainstorm/templates/thesis.md +0 -21
- package/data/harnesses/etna/skills/brainstorm/exit-artifacts.md +0 -66
- package/data/harnesses/etna/skills/brainstorm/templates/backlog.md +0 -39
- package/data/harnesses/etna/skills/brainstorm/templates/build.md +0 -37
- package/data/harnesses/etna/skills/brainstorm/templates/decisions.md +0 -29
- package/data/harnesses/etna/skills/brainstorm/templates/doctrine.md +0 -31
- package/data/harnesses/etna/skills/brainstorm/templates/domain-model.md +0 -25
- package/data/harnesses/etna/skills/brainstorm/templates/evidence.md +0 -24
- package/data/harnesses/etna/skills/brainstorm/templates/glossary.md +0 -20
- package/data/harnesses/etna/skills/brainstorm/templates/milestones.md +0 -43
- package/data/harnesses/etna/skills/brainstorm/templates/non-goals.md +0 -17
- package/data/harnesses/etna/skills/brainstorm/templates/plan-doc.md +0 -61
- package/data/harnesses/etna/skills/brainstorm/templates/questions.md +0 -36
- package/data/harnesses/etna/skills/brainstorm/templates/references.md +0 -28
- package/data/harnesses/etna/skills/brainstorm/templates/rejected.md +0 -33
- package/data/harnesses/etna/skills/brainstorm/templates/source-of-truth.md +0 -49
- package/data/harnesses/etna/skills/brainstorm/templates/state.md +0 -1
- package/data/harnesses/etna/skills/brainstorm/templates/tech.md +0 -23
- package/data/harnesses/etna/skills/brainstorm/templates/thesis.md +0 -21
package/data/harness-index.json
CHANGED
|
@@ -37,7 +37,7 @@ Three peer modes plus a Completion step — enter wherever the user's thinking a
|
|
|
37
37
|
2. Flip the feature LLD to `status: active`; extend it in place with the how-it-works sections; confirm its `owns:` globs against the actual code.
|
|
38
38
|
3. The `boundary` skill must already have gated this plan before its first implementation step — see Ownership, Boundaries & Documentation.
|
|
39
39
|
|
|
40
|
-
**On Brainstorm Close** (when a session ends, not when a plan completes): close + harvest is the skill's `stop` procedure — the record moves from `docs/research/{topic}-
|
|
40
|
+
**On Brainstorm Close** (when a session ends, not when a plan completes): close + harvest is the skill's `stop` procedure — converge, a user-approved harvest manifest, apply, then a uselessness test; conclusions disperse by scope (architecture docs, decision records, backlog), the record moves from `docs/research/{topic}-brainstorm/` to `docs/history/brainstorms/{topic}/`, and the user decides whether the moved folder is deleted or committed.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -110,7 +110,7 @@ Defaults — ❌ prohibitions hold unless the user explicitly asks otherwise;
|
|
|
110
110
|
- ❌ **Branches & Worktrees [override]** – Never self-create git branches or worktrees; commit straight to the checked-out branch. This replaces any built-in "branch first on the default branch" default. Exception: when the user asks for a pull request, create the branch the PR requires before committing its changes.
|
|
111
111
|
- ❌ **Protected Files** – Before editing, if `docs/operations/protected-files.md` exists, read it and never modify any path it lists; also never modify `AGENTS.md` or the `protected-files.md` file itself.
|
|
112
112
|
- ✅ **Browser Automation** – If your runtime provides browser automation, use it freely; no need to ask first. If it doesn't — or you are an agent that can't hold the browser connection (see Runtime Notes) — return a browser-verification checklist (URLs, actions, expected outcomes) for the orchestrating session or the user to run.
|
|
113
|
-
- ✅ **Delegate at scale** – If your runtime supports sub-agent dispatch: offload large, independent, or parallelizable work (broad research, audits, multi-file sweeps) to sub-agents with self-contained prompts (the sub-agent sees none of your conversation); parallelize independent dispatches; keep small, well-understood edits in the main session — a dispatch whose hand-off costs more than the work is waste.
|
|
113
|
+
- ✅ **Delegate at scale** – If your runtime supports sub-agent dispatch: offload large, independent, or parallelizable work (broad research, audits, multi-file sweeps) to sub-agents with self-contained prompts (the sub-agent sees none of your conversation); parallelize independent dispatches; keep small, well-understood edits in the main session — a dispatch whose hand-off costs more than the work is waste. Mechanical fan-out **always** runs on the cheap tier. Judgment-heavy work stays in the main session — offload it **only when the user explicitly asks** (concrete tier names live only in Runtime Notes). No dispatch mechanism ⇒ do the work inline.
|
|
114
114
|
- ⚠️ **Plans** – Plans are created directly in `docs/history/plans/` (see Workflows). Once `Status: Complete` or `Status: Abandoned`, the file is frozen — never edited. If scope changes after completion, write a new dated plan that links back to the old one.
|
|
115
115
|
- ⚠️ **Tool Issues** – If any CLI tool, shell alias, or MCP tool behaves unexpectedly (syntax errors, silent failures, wrong defaults), report the exact tool name, command, and error to the user so they can fix or remove the underlying library.
|
|
116
116
|
|
|
@@ -127,5 +127,5 @@ Defaults — ❌ prohibitions hold unless the user explicitly asks otherwise;
|
|
|
127
127
|
|
|
128
128
|
Everything above is runtime-neutral. This section is the only place runtime- or vendor-specific facts may live; re-audit it whenever a runtime ships new models or tools. Lint: nothing outside this section may name a model, a vendor product, or a runtime-built-in tool — exempt are repo-relative `.claude/**` component paths (shipped in this repo, readable by any runtime) and protocol names (e.g. MCP).
|
|
129
129
|
|
|
130
|
-
- **Claude Code**: sub-agent dispatch is the Agent tool; sub-agents
|
|
130
|
+
- **Claude Code**: sub-agent dispatch is the Agent tool; sub-agents can run skills and spawn their own sub-agents (probe-verified; re-verify on runtime updates), but cannot reliably hold the browser connection (the "can't hold the browser connection" condition the Browser Automation guardrail refers to) — browser work is Chrome CDP ("Claude in Chrome"), main session only. The user-level memory store is `~/.claude/` (auto-memory under `~/.claude/projects/...`). The ownership index and skill/agent descriptions are injected at session start; skills are invoked as slash commands (e.g. `/brainstorm start`). Dispatch tiers: mechanical fan-out pins the fast tier (sonnet-class); a user-requested judgment-heavy dispatch takes the strong tier (opus-class) — tier names go stale, re-check on model releases.
|
|
131
131
|
- **Runtimes without native component support** (AGENTS.md readers, etc.): read `.claude/agents/<name>.md` and each skill's `.claude/skills/<name>/SKILL.md` (plus its `references/`) and follow them inline; derive the ownership index by scanning `docs/features/` frontmatter.
|
|
@@ -1,35 +1,144 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorm
|
|
3
|
-
description:
|
|
4
|
-
tools: Read, Glob, Grep,
|
|
5
|
-
model:
|
|
3
|
+
description: The brainstorm twin — the paper-owning half of the brainstorm capability. Dispatched at session gates (start, on demand, pause, stop) by the `brainstorm` skill, never self-triggered and never conversing with the user. Scribe (distills the ops capture ledger into the working surface), editor (recomposes the thesis whole, diffs surfaced), harvester (drives the stop pipeline — manifest, apply, uselessness test, move), blindspot analyst (cold-reads the surface for unknown unknowns behind a four-test quality gate — grounded, material, new, answerable). Consumes the detector script for mechanical integrity and audits the five semantic sources the detector cannot judge. Writes every working-surface file; the facilitator writes only ops/capture.md and sync-log dispatch lines.
|
|
4
|
+
tools: Read, Glob, Grep, Write, Edit, Bash, Task, Skill
|
|
5
|
+
model: opus
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Brainstorm
|
|
8
|
+
# Brainstorm Twin
|
|
9
9
|
|
|
10
|
-
You
|
|
10
|
+
You own the **paper** of a brainstorm session; the facilitator (the main loop running the
|
|
11
|
+
`brainstorm` skill) owns the conversation. You are dispatched at gates with a session-folder path,
|
|
12
|
+
a gate name, and a scope. You never talk to the user — anything needing their judgment goes back
|
|
13
|
+
in your final report for the facilitator to relay.
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
The format contract is the skill's `references/session-schema.md` (resolve it beside this harness:
|
|
16
|
+
`.claude/skills/brainstorm/references/` in a consumer repo, `skills/brainstorm/references/` in
|
|
17
|
+
etna; also read `references/doctrine.md` for the epistemics). The mechanical half is the detector:
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
```
|
|
20
|
+
node <skill>/scripts/detector.mjs <session-folder> [--gate=manifest|move] [--json]
|
|
21
|
+
```
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
Run it at the start of every dispatch and again before you return. If node or the script is
|
|
24
|
+
unavailable, say so loudly in your report and run the checks by hand from the schema — a missing
|
|
25
|
+
detector is a flagged fact, never a silent skip.
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
## The write protocol you enforce
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
One writer per file. You write `state.md`, `thesis.md`, `forks.md`, `ledger.md`, `fragments/`,
|
|
30
|
+
manifest, and your own sync-log **result** lines. You never write `ops/capture.md` (the
|
|
31
|
+
facilitator's) or sync-log dispatch lines. The user may hand-edit anything: before rewriting any
|
|
32
|
+
file, read its current state in full and treat content you did not write as **first-class user
|
|
33
|
+
signal — fold it forward, never clobber it**. A hand-edit that contradicts the ledger is a design
|
|
34
|
+
question: file a fork, don't "fix" the file.
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
## Every dispatch, in order
|
|
24
37
|
|
|
25
|
-
|
|
38
|
+
1. **Detector first** — `--gate=session`. Fix what is yours to fix (scribe-calls, below); report
|
|
39
|
+
what isn't.
|
|
40
|
+
2. **Read the whole surface** plus every `ops/capture.md` entry since the last reconciled sync.
|
|
41
|
+
3. **Scribe pass** — distill new capture into the surface, per the doctrine's epistemic rules
|
|
42
|
+
(distilled never verbatim; examples as examples; no naked pointers; both sides captured).
|
|
43
|
+
Residue that doesn't warrant filing stays in ops — that is what ops is for.
|
|
44
|
+
4. **Semantic audit** — the five sources the detector cannot judge:
|
|
45
|
+
- **Cross-pillar contradiction** — across any two session files, `state.md` included (a state
|
|
46
|
+
file describing a session the pillars contradict is the historically strongest signal).
|
|
47
|
+
- **Aspect adequacy** — the detector checks that every mapped aspect *links* to content; you judge
|
|
48
|
+
whether the content actually covers it. Covered-in-name-only → a fork.
|
|
49
|
+
- **Basis drift** — decided divergence from `basis/` is fine; accidental divergence → a fork.
|
|
50
|
+
- **Tech conflicts** — anything violating the tech fragment (or the repo's `.claude/rules/`)
|
|
51
|
+
without a recorded deviation → a fork.
|
|
52
|
+
- **Self-containment** — read as the stranger you are (you were dispatched context-free; use
|
|
53
|
+
that): undefined terms, naked pointers, enumerations cited but never printed.
|
|
54
|
+
5. **The scribe-call / design-call line** — an edit whose resolution doesn't change the design
|
|
55
|
+
(wording, bookkeeping, printing an enumeration, glossing a term) you apply directly and list.
|
|
56
|
+
An edit whose resolution changes the idea becomes a fork (`Raised by: twin (S#)` — cite your
|
|
57
|
+
own sync id). Never route a design question through a direct edit.
|
|
58
|
+
6. **Editor pass** — recompose `thesis.md` whole (claim → argument → what changed), stamp
|
|
59
|
+
`Current as of:`, mirror the stamp into state.md `Last compose`, update the posture line.
|
|
60
|
+
Filing an insight must never push the session away from coherent: orphan evidence is a
|
|
61
|
+
scribe-note in your report, never a fork; free-floating insight may feed a thesis aspect.
|
|
62
|
+
7. **Close the log** — append your result line to `ops/sync-log.md`:
|
|
63
|
+
`S# → reconciled | <ISO datetime> | N edits · M new forks · K open · untouched: <aspects>`
|
|
64
|
+
(or `S# → failed | <ts> | <reason>` — never omit the line; an unlogged dispatch reads as a
|
|
65
|
+
fabricated one). The one-line report is also the last line of your reply, plus anything the
|
|
66
|
+
facilitator must relay (design questions raised, what the recompose changed). When several
|
|
67
|
+
audit sources fire at once, rank integrity findings (attribution without evidence, files
|
|
68
|
+
contradicting the state) above coverage and staleness — a record that lies about its own
|
|
69
|
+
process is worse than one that merely stalled.
|
|
26
70
|
|
|
27
|
-
|
|
28
|
-
- **Suggest, never seize.** Mode shifts, abstractions, and probes are one offer each; accept refusal without re-litigating.
|
|
29
|
-
- **Never write production code** while a session is open — load-bearing snippets are illustration only, inside the session folder.
|
|
71
|
+
## The blindspot pass (gate: on demand, scope: blindspot)
|
|
30
72
|
|
|
31
|
-
|
|
73
|
+
Dispatched when the user asks what they're missing, when the facilitator self-initiates at a
|
|
74
|
+
frame-settling moment (usually widening a reconcile dispatch's scope), or on the accepted
|
|
75
|
+
pre-converge offer. Run the standard dispatch order first so the surface is current, then
|
|
76
|
+
re-read the whole surface plus `basis/` cold, measured against the thesis's claim — the stated goal — never against
|
|
77
|
+
a generic checklist. The species that pay: an assumption the design rests on but never states; a
|
|
78
|
+
concern no aspect owns; two required properties that pull against each other with nothing
|
|
79
|
+
designing for either; a rule or path that can never fire; an ambiguity two files resolve
|
|
80
|
+
differently; a shape matching a failure already recorded in the basis or ledger.
|
|
32
81
|
|
|
33
|
-
|
|
82
|
+
**The quality gate — a candidate passes all four tests or dies unsurfaced.** The gate exists so
|
|
83
|
+
the user never over-replies to noise:
|
|
34
84
|
|
|
35
|
-
|
|
85
|
+
1. **Grounded** — it cites the specific surface or basis content that creates it. Raisable
|
|
86
|
+
against any project of this type without reading this folder → generic → dead.
|
|
87
|
+
2. **Material** — some plausible answer changes the thesis, a commitment, or the aspect map.
|
|
88
|
+
Every answer leaves the design unchanged → dead.
|
|
89
|
+
3. **New** — not a restatement of an open fork, a ledger decision or Declined line, or an
|
|
90
|
+
explicit park.
|
|
91
|
+
4. **Answerable** — resolvable by a decision or a named investigation, not "think harder
|
|
92
|
+
about X".
|
|
93
|
+
|
|
94
|
+
File each survivor as a fork (`Raised by: twin (S#)`, body opening `Blindspot:`) with a close
|
|
95
|
+
condition — at most five per pass, ranked by materiality; fewer survivors means surface fewer,
|
|
96
|
+
never pad. End your report with the survivors in relay shape (finding → why it's material here,
|
|
97
|
+
citing the creating content → what answering it would change) plus the kill line — e.g.
|
|
98
|
+
"killed 6: 4 generic, 1 restates F3, 1 immaterial" — so gate discipline stays auditable; the
|
|
99
|
+
facilitator's capture persists it. A killed candidate re-raised unchanged in a later pass stays
|
|
100
|
+
dead; new surface content that changes its gate verdict reopens it.
|
|
101
|
+
|
|
102
|
+
## The stop pipeline (gate: stop — multiple dispatches)
|
|
103
|
+
|
|
104
|
+
Stop is facilitator-orchestrated because approval belongs to the user; you execute each leg:
|
|
105
|
+
|
|
106
|
+
1. **Converge support + manifest build.** Final scribe/audit/compose as above, then run
|
|
107
|
+
`--gate=manifest`. While it fails (open forks, uncovered aspects, stale compose), report what
|
|
108
|
+
blocks — you do not build a manifest over a failing gate. When clean, write `ops/manifest.md`
|
|
109
|
+
(`Status: proposed`): route by scope per the skill's `references/harvest.md` — every parked
|
|
110
|
+
fork, every fragment, the consolidated source of truth. Return the manifest body for approval.
|
|
111
|
+
2. **Apply** (only after the facilitator reports approval; set `Status: approved` then work).
|
|
112
|
+
Read **both sides** of every destination before writing — the destination's current content is
|
|
113
|
+
a contract, not a blank page. Format each artifact via the `documentation` skill (Skill tool);
|
|
114
|
+
where unavailable, fall back to your own formatting **and record which path ran in the
|
|
115
|
+
manifest**. Set `Status: applied`. The apply is all-or-nothing and loud: if you cannot finish,
|
|
116
|
+
report exactly what applied and stop — the folder stays visibly unfinished and the user
|
|
117
|
+
restarts; never resume silently from a half-applied state.
|
|
118
|
+
3. **Uselessness test.** Spawn a **fresh, context-free cold reader** (Task tool) whose prompt
|
|
119
|
+
contains only the allowed-path list (the manifest's destinations — never the session folder)
|
|
120
|
+
and the instruction to reconstruct the design: thesis, commitments, reasoning, declined
|
|
121
|
+
branches. Grade its reconstruction against the ledger and thesis. Gaps → record them in the
|
|
122
|
+
manifest (`Result: fail`, named gaps), and the fixes re-enter as a new manifest `Round`
|
|
123
|
+
requiring fresh approval. Pass → record it. If the Task tool is unavailable, report that the
|
|
124
|
+
facilitator must dispatch the cold reader — you, having read the folder, can no longer
|
|
125
|
+
cold-read.
|
|
126
|
+
4. **Move.** Run `--gate=move`. When clean: delete `ops/` entirely, `git mv` the folder to
|
|
127
|
+
`docs/history/brainstorms/{topic}/`, set state `Status: harvested`, update both indexes
|
|
128
|
+
(`docs/research/Readme.md` row out, `docs/history/brainstorms/Readme.md` row in). End your
|
|
129
|
+
report with the offer the facilitator relays: **delete the moved folder, or commit it** — the
|
|
130
|
+
user decides; the design assumes deletion.
|
|
131
|
+
|
|
132
|
+
## Strategy memory
|
|
133
|
+
|
|
134
|
+
`docs/memory/brainstorm.md` (create on first write, entries dated `## YYYY-MM-DD — {topic}`):
|
|
135
|
+
how to facilitate *this repo* better — recurring audit findings, harvest destinations that keep
|
|
136
|
+
appearing, aspect-map patterns. Never session content, never user preferences.
|
|
137
|
+
|
|
138
|
+
## Degradations — flagged, never silent
|
|
139
|
+
|
|
140
|
+
- Detector unavailable → manual checks from the schema, loudly noted.
|
|
141
|
+
- `documentation` skill unavailable → own-format harvest, recorded in the manifest.
|
|
142
|
+
- Cold-reader spawn unavailable → hand the uselessness test back to the facilitator.
|
|
143
|
+
- Anything else broken → `S# → failed` in the log with the reason, and say so in your report.
|
|
144
|
+
A loud early failure the user fixes beats silent damage discovered after the folder is gone.
|
|
@@ -92,6 +92,8 @@ For each changed file:
|
|
|
92
92
|
|
|
93
93
|
**Backlog health.** Read `docs/history/backlog.md`. Report items older than 30 days. Count pending by priority.
|
|
94
94
|
|
|
95
|
+
**Brainstorm session census.** A session folder still under `docs/research/` (`*-brainstorm/`, legacy `*-brainstorming/`) is by definition unfinished — the `brainstorm` skill moves folders to `docs/history/brainstorms/` only on a passed harvest. Read each one's state file and flag rot-open abandonment — derive last activity from the state's compose/sync stamps, falling back to file mtimes when the state file lacks activity timestamps (legacy formats do; git may be absent): a single-sitting session started more than 2 days ago, or any session whose last activity is stale past 14 days, gets a backlog item (`- **[P2]** Brainstorm session docs/research/{folder} appears abandoned (started {date}, last compose {date}) — resume it or run /brainstorm stop — discovered by maintenance`). Where the installed skill ships its detector (v3+), run `node .claude/skills/brainstorm/scripts/detector.mjs <folder>` and include failing rule IDs in the finding. Never remediate a session folder yourself — census findings are always report + backlog.
|
|
96
|
+
|
|
95
97
|
### Step 5: Remediate
|
|
96
98
|
|
|
97
99
|
For each stale doc:
|
|
@@ -131,13 +133,13 @@ docs/
|
|
|
131
133
|
├── features/ # Feature specs — the only first-class doc unit (flat; ownership in each doc's `owns:` frontmatter)
|
|
132
134
|
│ └── {group}/ # browse-only subfolder for grouping; NEVER a module; may carry a Readme.md
|
|
133
135
|
├── operations/ # Setup, development, deployment, CI/CD
|
|
134
|
-
├── research/ # Optional — in-progress brainstorm sessions ({topic}-brainstorming/) + standing research; Readme.md is the index
|
|
135
|
-
│ └── {topic}-
|
|
136
|
+
├── research/ # Optional — in-progress brainstorm sessions ({topic}-brainstorm/; legacy -brainstorming/) + standing research; Readme.md is the index
|
|
137
|
+
│ └── {topic}-brainstorm/ # created by the `brainstorm` skill; NOT scaffolded empty; moves to history/brainstorms/ on a passed harvest
|
|
136
138
|
├── history/
|
|
137
139
|
│ ├── CHANGELOG.md # Master changelog index
|
|
138
140
|
│ ├── changelog/ # Individual entries
|
|
139
141
|
│ ├── plans/ # Implementation plans (Status field required)
|
|
140
|
-
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/)
|
|
142
|
+
│ ├── brainstorms/ # Harvested brainstorm sessions ({topic}/) — user decides kept (committed) or deleted; Readme.md is the index
|
|
141
143
|
│ └── backlog.md # Tracked work items by priority (P0-P3)
|
|
142
144
|
├── memory/ # index.md, main.md, {agent}.md — project knowledge + per-agent strategy memory
|
|
143
145
|
└── tests/ # Optional, author-maintained — create only if test docs exist
|
|
@@ -145,11 +147,11 @@ docs/
|
|
|
145
147
|
|
|
146
148
|
There is **no `docs/routing.md`**, **no `docs/modules/{m}/`**, **no `docs/pillars/`**, **no `docs/boundaries/`**. Code ownership lives in feature `owns:` frontmatter; a module is a `module:` label, not a folder; boundaries are diagnosed from source; brainstorm records live in `docs/research/` (active) and `docs/history/brainstorms/` (harvested).
|
|
147
149
|
|
|
148
|
-
> Brainstorm records are **author-created, never scaffolded** — the `brainstorm` skill writes an active session at `docs/research/{topic}-brainstorming/` and moves it to `docs/history/brainstorms/{topic}/` on harvest
|
|
150
|
+
> Brainstorm records are **author-created, never scaffolded** — the `brainstorm` skill writes an active session at `docs/research/{topic}-brainstorm/` (legacy folders carry the older `-brainstorming/` suffix; treat both as canonical) and moves it to `docs/history/brainstorms/{topic}/` on a **passed harvest** — the move is the completion marker, and the moved folder's fate is the **user's decision: delete or commit**. Never flag either location as docs "outside the structure" and never delete a session folder during reconcile; a history folder present last pass and absent now is user-sanctioned deletion, never drift. Each folder carries a `Readme.md` index — keep it in sync with the folders it lists (every session has a row; a deleted folder's row is removed or annotated), since the `brainstorm` skill reads the indexes instead of scanning.
|
|
149
151
|
|
|
150
152
|
### Step B1 — Inventory and classify
|
|
151
153
|
|
|
152
|
-
Glob every markdown file. Classify each: Architecture, Features, Operations, Plans, Changelogs, Backlog, Brainstorm records (stay), Stale/Deprecated (delete), Root docs (stay). For each topic keep the most complete version as canonical; extract unique content from the rest before deleting. **No redirect stubs** — when you move a file, delete the original and fix every reference (cross-doc links, memory files). Anything already under `docs/research/{topic}-brainstorming/` or `docs/history/brainstorms/{topic}/` is a **
|
|
154
|
+
Glob every markdown file. Classify each: Architecture, Features, Operations, Plans, Changelogs, Backlog, Brainstorm records (stay), Stale/Deprecated (delete), Root docs (stay). For each topic keep the most complete version as canonical; extract unique content from the rest before deleting. **No redirect stubs** — when you move a file, delete the original and fix every reference (cross-doc links, memory files). Anything already under `docs/research/{topic}-brainstorm/` (or legacy `-brainstorming/`) or `docs/history/brainstorms/{topic}/` is a **design record** — leave it in place untouched; never reclassify its contents as Architecture/Stale or relocate them.
|
|
153
155
|
|
|
154
156
|
While reading each markdown doc to classify it, if the doc names a code symbol it asserts exists that **statically resolves to nothing**, note it as an observation for the Part A audit — **only** on stacks where static resolution is reliable (stay silent on codegen/reflection/DI/barrel stacks); scoped to docs already being read here, never a whole-repo prose sweep; **docs only**, never code-file comments.
|
|
155
157
|
|
|
@@ -167,7 +169,7 @@ This is what makes baseline more than a fresh scaffold. Detect old-shape artifac
|
|
|
167
169
|
| `docs/OWNERSHIP_INDEX.md` (legacy derived ownership index) | delete — ownership is the union of feature `owns:` frontmatter, surfaced by the generated index |
|
|
168
170
|
| `docs/operations/guardrails.md` | fold durable contract notes into `docs/architecture/` |
|
|
169
171
|
| `docs/architecture/overview.md` | split into `domain-model.md` / `glossary.md` / `non-goals.md` / `references.md` / `open-questions.md` |
|
|
170
|
-
| a legacy `docs/brainstorm/{topic}/`, or a root `brainstorm/`/`brainstorming/` folder | move each **active** record to `docs/research/{topic}-
|
|
172
|
+
| a legacy `docs/brainstorm/{topic}/`, or a root `brainstorm/`/`brainstorming/` folder | move each **active** record to `docs/research/{topic}-brainstorm/` and each **harvested** one to `docs/history/brainstorms/{topic}/` (dropping the suffix); create/refresh both `Readme.md` indexes; delete the emptied folder |
|
|
171
173
|
| no `harness-version` in `structure.md` | stamp it (Step B4) |
|
|
172
174
|
|
|
173
175
|
### Step B3 — Present the reconcile plan, then execute
|
|
@@ -1,162 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Brainstorm — process, not archive
|
|
2
2
|
|
|
3
|
-
A Claude Code skill that is a **thinking partner for designing
|
|
3
|
+
A Claude Code skill that is a **thinking partner for designing large-scale software changes**.
|
|
4
|
+
The session's product is the repo's living documentation: the conversation helps the user think
|
|
5
|
+
correctly, the record stays readable at any pause, and the session ends with a harvest so
|
|
6
|
+
complete that the session folder is useless — it moves to history and the user deletes or
|
|
7
|
+
commits it.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
> Spec (single source of truth): `docs/features/brainstorm-skill/` in the etna repo. The etna
|
|
10
|
+
> copy of this skill (`skills/brainstorm/`) is canonical; the user-level path
|
|
11
|
+
> `~/.claude/skills/brainstorm/` is a symlink to it.
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
## The architecture — one capability, two seats
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
Prose obligations decay in the conversing seat: the fleet audit behind v3 found the same rules
|
|
16
|
+
dying in every real session, even the successful ones. So the capability is split:
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
| Seat | Component | Owns |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Conversation (main loop) | `SKILL.md` — the facilitator | The dialogue, the basis gate, the moves, one write: appending everything to `ops/capture.md` |
|
|
21
|
+
| Paper (dispatched agent) | `agents/brainstorm.md` — the twin, pinned strong tier | Every working-surface file: distilling ops into pillars, recomposing the thesis whole, the semantic audits, the harvest |
|
|
22
|
+
| Integrity (script) | `scripts/detector.mjs` | Mechanical checks with stable rule IDs; blocks the manifest and the move while gates fail |
|
|
23
|
+
| Quality (authoring-time) | `evals/` (never ships) | Session-replay scenarios, the two-agent audit, contrastive facilitation |
|
|
12
24
|
|
|
13
|
-
Every
|
|
25
|
+
Every twin dispatch is paired-logged in `ops/sync-log.md` — the facilitator writes the dispatch
|
|
26
|
+
line, the twin writes the result — so reconciliation is observable, never asserted.
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
2. **Abstract** — name the latent structure they implied but didn't state (an entity relationship, an invariant, a principle). One offer per exchange.
|
|
17
|
-
3. **Sync** — keep the pillars consistent with each other and with the basis (the sync agent, below).
|
|
18
|
-
4. **Record** — the user's words land the turn they arrive; the facilitator's substance (analyses, diagnoses, reasoning, definitions, rejections) is on disk by the next sync dispatch at the latest. Nothing is hoarded for a session-end dump.
|
|
19
|
-
|
|
20
|
-
Everything else — pillar count, ceremony, harvest — scales with the idea. The loop does not.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## The memory contract
|
|
25
|
-
|
|
26
|
-
v1's leak, measured in a full-session audit (2026-07-03): conclusions survived in the folder, but the facilitator's reasoning — causal diagnoses, informed rejections, definitions of cited terms — lived only in the transcript, and transcripts die at compaction. v2 plugs it with five rules and a recovery rule:
|
|
27
|
-
|
|
28
|
-
1. **Both-sides capture** — facilitator substance is on disk by the next sync dispatch at the latest (that is the batch point; there is no other). Every dispatch begins with a filing checklist: list substantive contributions since the last sync, file anything unfiled. Knowledge still living only in chat when a sync dispatches is a violation.
|
|
29
|
-
2. **Distilled, never verbatim** — capture is interpretation: the claim, the reasoning, the implication. General point recorded; examples cited as examples. (Integrity copies — printed enumerations, cited excerpts — are fine; the ban is transcript-pasting.)
|
|
30
|
-
3. **Evidence notes** — session-produced research lands as dated files in `<session>/evidence/`, each stating what it examined, what it found, and which question or decision it feeds. `basis/` holds frozen inputs only.
|
|
31
|
-
4. **No naked pointers** — enumerations printed once, terms glossed, external citations excerpted. A reader never needs the transcript or an external file to parse a pillar.
|
|
32
|
-
5. **Eager rejections** — a knowingly-declined option materializes `rejected.md` immediately, with the evidence it was declined against.
|
|
33
|
-
|
|
34
|
-
**Recovery:** after any compaction, re-enter from the folder alone; anything still "remembered" but not on disk is a leak — file it immediately.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Lifecycle
|
|
39
|
-
|
|
40
|
-
Two subcommands, nothing else. The skill never auto-invokes on natural language.
|
|
28
|
+
## The session lifecycle
|
|
41
29
|
|
|
42
30
|
```
|
|
43
|
-
/brainstorm start
|
|
44
|
-
|
|
31
|
+
/brainstorm start
|
|
32
|
+
→ basis gate (a document, an old session folder of any format, or a brain dump)
|
|
33
|
+
→ bootstrap docs/research/{topic}-brainstorm/ (ops/ untracked; twin writes the surface)
|
|
34
|
+
→ converse: dump / interview / probe / blindspot / converge — steerable in plain language
|
|
35
|
+
→ "let me read" anytime: compose on demand, read the thesis, come back
|
|
36
|
+
/brainstorm stop
|
|
37
|
+
→ converge → manifest → ONE user approval → apply → uselessness test
|
|
38
|
+
→ folder moves to docs/history/brainstorms/{topic}/ (the completion marker)
|
|
39
|
+
→ the user decides: delete or commit
|
|
45
40
|
```
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
After distilling the basis, one `AskUserQuestion` batch sets three dials:
|
|
54
|
-
|
|
55
|
-
- **Complexity** (low / medium / high) — sets the default pillar surface.
|
|
56
|
-
- **Build mode** (greenfield / brownfield / hybrid) — lands in `build.md`; opens or closes the execution sections and sets the writing posture.
|
|
57
|
-
- **Mode** — where the idea lives right now (see below).
|
|
58
|
-
|
|
59
|
-
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.
|
|
60
|
-
|
|
61
|
-
### Modes (who drives)
|
|
62
|
-
|
|
63
|
-
| Mode | Driver | When | Behavior |
|
|
64
|
-
| --- | --- | --- | --- |
|
|
65
|
-
| **dump** | user | idea is in their head | No questions mid-stream. Distill live, reflect back shape + contradictions + implications. |
|
|
66
|
-
| **interview** | skill | idea is fuzzy | Question batches of 2–3, one aspect at a time, each answer distilled immediately. |
|
|
67
|
-
| **probe** | skill | idea is drafted | Adversarial pass — flaws, edge cases, conflicts. Each finding becomes a question. |
|
|
68
|
-
| **converge** | shared | closing | Burn down open questions into decisions or explicit parks; ends with a mandatory sync. |
|
|
69
|
-
|
|
70
|
-
Mode switches on an explicit user word. On a strong signal the skill _offers_ a switch in one line; it never seizes it.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Coherence (the doneness function)
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
coherent ⇔ open_questions == 0 ∧ last sync ran after the last pillar write
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
`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 five sources and clean,"_ never _"nothing came to mind"_ — which is why the sync agent's audit contract is mandatory.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## The sync agent
|
|
85
|
-
|
|
86
|
-
The background reconciler. 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. Every dispatch begins transcript-side: the orchestrator lists its substantive contributions since the last sync and files anything unfiled — the sync agent can't see the conversation, so this checklist is the only bridge. Then it audits exactly five sources:
|
|
87
|
-
|
|
88
|
-
1. **Cross-pillar contradiction** — thesis vs domain model vs decisions vs doctrine vs build.
|
|
89
|
-
2. **Aspect coverage** — any mapped aspect with no content → a question.
|
|
90
|
-
3. **Basis drift** — does the thesis still agree with the basis? Accidental divergence → a question.
|
|
91
|
-
4. **Tech conflicts** — anything violating `tech.md` without a recorded deviation.
|
|
92
|
-
5. **Self-containment** — the cold-reader pass: undefined terms, pointer-only references, unprinted enumerations, decided-vs-open ambiguity, stale citations. The sync agent runs context-free, so it *is* the zero-context reader the memory contract writes for.
|
|
93
|
-
|
|
94
|
-
It applies **scribe-calls** (edits that don't change the design — including printing a missing enumeration or glossing a term) 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.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Pillars (substance first, lazy by default)
|
|
99
|
-
|
|
100
|
-
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`, `references`, `milestones` — and `rejected`, which is **eager**: it materializes the moment an option is knowingly declined.
|
|
101
|
-
|
|
102
|
-
| File | Role |
|
|
103
|
-
| --- | --- |
|
|
104
|
-
| `thesis.md` | Running narrative of what we're designing + the aspect map. |
|
|
105
|
-
| `questions.md` | Single convergence currency — every unresolved design call. |
|
|
106
|
-
| `decisions.md` | Resolved calls with **Why** + **How to apply**. Append-only, no state machine. |
|
|
107
|
-
| `build.md` | How the work executes: build mode, migration strategy, gotchas, rollout. |
|
|
108
|
-
| `domain-model.md` | Information architecture — entities, relationships, cardinalities, state ownership. |
|
|
109
|
-
| `tech.md` | Stack choices, seeded from harness rules; deviations recorded with whys. |
|
|
110
|
-
| `evidence/` | Session-produced analyses as dated notes (`templates/evidence.md`) — each states what it examined and which question/decision it feeds. |
|
|
111
|
-
| `doctrine` / `glossary` / `non-goals` / `backlog` / `rejected` / `references` / `milestones` | As their templates describe. |
|
|
112
|
-
|
|
113
|
-
The complexity dial sets _defaults_, not a cage — any lazy pillar materializes the moment the conversation produces content for it.
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Build modes
|
|
118
|
-
|
|
119
|
-
The writing posture is a **mode** chosen at intake, folded into `build.md`:
|
|
120
|
-
|
|
121
|
-
- **greenfield** (default) — present-tense everywhere, no phantom history. Execution sections closed.
|
|
122
|
-
- **brownfield** — migration vocabulary is legitimate in `build.md`; other pillars still describe the target.
|
|
123
|
-
- **hybrid** — new surface on a live system; execution sections apply to the seams only.
|
|
124
|
-
|
|
125
|
-
`build.md` also captures **gotchas** — execution hazards known now, before plan mode, because surfacing them in plan mode is too late.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Exit artifacts
|
|
130
|
-
|
|
131
|
-
The session writes a design record at `docs/research/{topic}-brainstorming/` (one folder per topic), moved to `docs/history/brainstorms/{topic}/` on harvest. At `stop`, after the final five-source sync (self-containment included — the record is verified standalone-readable exactly when it's about to become the only survivor of the session), the skill _offers_ what to **publish** from it (`AskUserQuestion`, multi-select — a session can emit more than one):
|
|
132
|
-
|
|
133
|
-
- **Source of truth** — one consolidated, README-style canonical doc for the thing designed (`templates/source-of-truth.md`); lands in the repo's feature/architecture doc home, else a topic `Readme.md`.
|
|
134
|
-
- **Plans** — one or more executable plan docs → `docs/history/plans/` (Status: Draft).
|
|
135
|
-
- **Harvest into the living docs** — conclusions dispersed by scope into ADs (architecture decisions), the domain model, and the backlog.
|
|
136
|
-
|
|
137
|
-
The session record is **kept** whichever you pick — never deleted; on harvest it moves to `docs/history/brainstorms/{topic}/` as the provenance every artifact traces back to. See `exit-artifacts.md`.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Hard rules
|
|
142
|
-
|
|
143
|
-
1. **No production code outside the session folder.** Illustrative snippets are fine inside it.
|
|
144
|
-
2. **Speak English to the user; codes (`Q3`, `D7`) live in the files.**
|
|
145
|
-
3. **`AskUserQuestion` appears in exactly four places:** the intake frame, interview mode, converge picks, the `stop` exit-artifact pick.
|
|
146
|
-
4. **Suggested, never seized** — mode shifts, abstractions, probes are offered once.
|
|
147
|
-
5. **Nothing lives only in the transcript** — questions carry everything pending; the memory contract carries everything known.
|
|
148
|
-
6. **No auto-invocation** — only `/brainstorm start` and `/brainstorm stop`.
|
|
149
|
-
|
|
150
|
-
---
|
|
42
|
+
The working surface: `thesis.md` (claim → argument → what changed, recomposed whole, stamped),
|
|
43
|
+
`forks.md` (open questions with close conditions — the only convergence currency), `ledger.md`
|
|
44
|
+
(commitments: Decision / Why / How to apply / Resolves, declined options inline with re-evaluate
|
|
45
|
+
conditions), `state.md` (anchor + the aspect map), `basis/`, `fragments/` (harvest-native,
|
|
46
|
+
drafted in destination format), and untracked `ops/` (raw capture + sync log; deleted at stop).
|
|
151
47
|
|
|
152
48
|
## Files
|
|
153
49
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
The session itself is written to `docs/research/{topic}-brainstorming/` (committed; moved to `docs/history/brainstorms/{topic}/` on harvest) — not here.
|
|
50
|
+
- `SKILL.md` — the facilitator hub
|
|
51
|
+
- `references/doctrine.md` — thesis / forces / forks / commitments / consequences epistemics
|
|
52
|
+
- `references/session-schema.md` — the single format authority (what the detector enforces)
|
|
53
|
+
- `references/harvest.md` — the stop pipeline and routing map
|
|
54
|
+
- `scripts/detector.mjs` — the rule registry (`node detector.mjs <folder> [--gate=…] [--json]`)
|
|
55
|
+
- `scripts/fixtures/` — contrastive fixtures + runner (authoring-time; never ships)
|
|
56
|
+
- `evals/` — session-replay + audit harness (authoring-time; never ships)
|