@nurix/etna 0.2.1 → 0.3.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.
- package/bin/etna.js +17 -3
- package/data/harnesses/code/CLAUDE.md +77 -114
- package/data/harnesses/code/agents/boundary-mapper.md +91 -0
- package/data/harnesses/code/agents/brainstorm.md +110 -0
- package/data/harnesses/code/agents/change-review.md +13 -12
- package/data/harnesses/code/agents/contract-monitor.md +15 -14
- package/data/harnesses/code/agents/dep-health.md +1 -0
- package/data/harnesses/code/agents/git-history.md +1 -0
- package/data/harnesses/code/agents/maintenance.md +4 -3
- package/data/harnesses/code/agents/review.md +1 -0
- package/data/harnesses/code/agents/spec-mode.md +1 -0
- package/data/harnesses/code/rules/general.md +1 -0
- package/data/harnesses/code/rules/nomenclature.md +1 -0
- package/data/harnesses/code/scripts/build-ownership-index.sh +1 -0
- package/data/harnesses/code/scripts/check-doc-drift.sh +1 -0
- package/data/harnesses/code/skills/boundaries/SKILL.md +86 -0
- package/data/harnesses/code/skills/documentation/SKILL.md +21 -17
- package/data/harnesses/code/skills/documentation/references/templates.md +36 -48
- package/data/harnesses/code/skills/introspect/SKILL.md +24 -23
- package/data/harnesses/code/skills/technical-brainstorm/README.md +287 -0
- package/data/harnesses/code/skills/technical-brainstorm/SKILL.md +601 -0
- package/data/harnesses/code/skills/technical-brainstorm/greenfield.md +99 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/backlog.md +39 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/decisions.md +42 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/doctrine.md +31 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/glossary.md +19 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/inventory.md +44 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/milestones.md +43 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/non-goals.md +21 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/plan-doc.md +61 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/questions.md +84 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/references.md +28 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/rejected.md +29 -0
- package/data/harnesses/code/skills/technical-brainstorm/templates/state.md +8 -0
- package/data/harnesses/code/skills/workflow-mapper/SKILL.md +1 -0
- package/data/harnesses/kb-agi/CLAUDE.md +16 -1
- package/data/harnesses/kb-agi/agents/kb-agi-init.md +3 -2
- package/data/harnesses/kb-agi/agents/kb-catch-stale.md +2 -1
- package/data/harnesses/kb-agi/agents/kb-find-gaps.md +3 -2
- package/data/harnesses/kb-agi/agents/kb-fix-links.md +2 -1
- package/data/harnesses/kb-agi/agents/kb-refresh-frontdoor.md +2 -1
- package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +2 -1
- package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +2 -1
- package/data/harnesses/kb-agi/rules/kb.md +4 -0
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: introspect
|
|
3
|
-
description: Pre-implementation impact analyzer. Reads a plan in docs/history/plans/ and checks every Proposed Change against docs/
|
|
3
|
+
description: Pre-implementation impact analyzer. Reads a plan in docs/history/plans/ and checks every Proposed Change against the typed boundaries in docs/boundaries/ to surface cascading risks before coding starts. Produces a severity-ranked violation report with suggested plan additions. Read-only. Triggers on "introspect", "check this plan", "impact analysis", "/introspect", "what could break", "boundary check before I start".
|
|
4
|
+
plugins: [nurix-harness]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Introspect Skill
|
|
7
8
|
|
|
8
|
-
Pre-implementation impact analysis. Reads a plan, intersects every proposed change with documented
|
|
9
|
+
Pre-implementation impact analysis. Reads a plan, intersects every proposed change with the documented boundaries in `docs/boundaries/`, and surfaces cascading risk _before_ implementation. The complement to `contract-monitor`, which scans the live codebase _after_ changes land.
|
|
9
10
|
|
|
10
11
|
The skill is read-only. It does not edit the plan, modify code, or write to memory. Output is a report the user reviews and acts on.
|
|
11
12
|
|
|
@@ -17,11 +18,11 @@ Trigger this skill when:
|
|
|
17
18
|
|
|
18
19
|
- The user types `/introspect`, "introspect", "check this plan", "impact analysis", "what could break"
|
|
19
20
|
- A plan exists in `docs/history/plans/` and the user is about to start implementation
|
|
20
|
-
- A plan was recently revised and the user wants to re-check
|
|
21
|
+
- A plan was recently revised and the user wants to re-check boundary impact
|
|
21
22
|
|
|
22
23
|
Do not run it when:
|
|
23
24
|
|
|
24
|
-
- No `docs/
|
|
25
|
+
- No `docs/boundaries/` exists, or it's empty — tell the user to baseline the typed boundaries first via the `boundary-mapper` agent (`baseline boundaries`)
|
|
25
26
|
- No plan exists — tell the user to write a plan first (documentation skill, `create plan`)
|
|
26
27
|
- The user wants post-implementation auditing — that's the `contract-monitor` agent
|
|
27
28
|
|
|
@@ -30,7 +31,7 @@ Do not run it when:
|
|
|
30
31
|
## Inputs
|
|
31
32
|
|
|
32
33
|
- **Plan path**: user-provided. If unspecified, use the most recent file in `docs/history/plans/` (sorted by filename date).
|
|
33
|
-
- **
|
|
34
|
+
- **Boundaries**: every file in `docs/boundaries/` is mandatory input. Stop if the folder is missing or empty (suggest `boundary-mapper`).
|
|
34
35
|
- **Source files**: read on demand to verify intersections — never guess from plan text alone.
|
|
35
36
|
|
|
36
37
|
---
|
|
@@ -42,7 +43,7 @@ Do not run it when:
|
|
|
42
43
|
1. Resolve the plan path. If the user named a feature, glob `docs/history/plans/*{feature}*.md` and pick the newest.
|
|
43
44
|
2. Read the plan in full.
|
|
44
45
|
3. Confirm it has a `Status:` field. If `Complete` or `Abandoned`, ask the user whether they want to introspect a frozen plan anyway — it's usually a mistake.
|
|
45
|
-
4. Read `docs/
|
|
46
|
+
4. Read every file in `docs/boundaries/`. For each boundary, parse the `[BOUNDARY: type · severity]` header plus: **Bounds** (the modules on each side of the contract), **Shape** (the transcribed contract, or a `file:line` pointer to self-locating code), **Invariants** (what must hold), **Blast radius** (what breaks if violated), and the **Safe-change checklist**. The severity (CRITICAL / HIGH / MED / LOW) sets the review depth for any change that touches that boundary.
|
|
46
47
|
|
|
47
48
|
### Phase 2: Parse Proposed Changes
|
|
48
49
|
|
|
@@ -50,25 +51,25 @@ The plan template's **Proposed Changes** subsections are load-bearing — intros
|
|
|
50
51
|
|
|
51
52
|
| Subsection | What introspect uses it for |
|
|
52
53
|
|------------|------------------------------|
|
|
53
|
-
| **New Files** | New paths to check against ownership and
|
|
54
|
-
| **Modified Files** | Existing paths to check against
|
|
55
|
-
| **New Entities / State** | Entity strings, state slices, schema additions — checked against
|
|
56
|
-
| **API Changes** | New or modified routes, contracts, request/response shapes — checked against
|
|
57
|
-
| **Cross-Module Contracts Affected** | The plan author's own admission of
|
|
54
|
+
| **New Files** | New paths to check against ownership and the modules each boundary **Bounds** |
|
|
55
|
+
| **Modified Files** | Existing paths to check against boundaries that **Bound** them |
|
|
56
|
+
| **New Entities / State** | Entity strings, state slices, schema additions — checked against the `domain` and `db-schema` boundaries |
|
|
57
|
+
| **API Changes** | New or modified routes, contracts, request/response shapes — checked against the `api` / `wire-contracts` boundaries |
|
|
58
|
+
| **Cross-Module Contracts Affected** | The plan author's own admission of boundaries touched — start here, then verify |
|
|
58
59
|
|
|
59
60
|
If a subsection is missing or empty, note it in the report (the plan may be incomplete) but continue with what's there.
|
|
60
61
|
|
|
61
62
|
### Phase 3: Analyze
|
|
62
63
|
|
|
63
|
-
For each
|
|
64
|
+
For each boundary × proposed change pair, check intersection:
|
|
64
65
|
|
|
65
|
-
1. **
|
|
66
|
-
2. **
|
|
67
|
-
3. **
|
|
66
|
+
1. **Bounds overlap** — does the change touch any module the boundary **Bounds**, or any file its **Shape** pointer (`file:line`) locates?
|
|
67
|
+
2. **Invariant overlap** — does the change introduce code shapes the boundary's **Invariants** prohibit (raw string literal where a shared constant is required, new entity type not in the canonical array, persisted field without selector fallback)?
|
|
68
|
+
3. **Shape overlap** — does the change modify the canonical **Shape** of a boundary (the `ENTITY_TYPES` array, the shared constants file, the persistence schema, the API envelope)?
|
|
68
69
|
|
|
69
70
|
Whenever an intersection is plausible from plan text, **read the actual source files** to verify. Never guess from plan text alone.
|
|
70
71
|
|
|
71
|
-
Assign severity:
|
|
72
|
+
Assign severity. Anchor it to the **boundary's own severity** (it sets the floor), then adjust by the concrete risk this change carries — a change against a CRITICAL/HIGH boundary starts at that floor; downgrade only with a stated reason. The boundary's **Blast radius** is the evidence for the rating:
|
|
72
73
|
|
|
73
74
|
- **Critical** — silent data loss, corrupted persistence, broken cross-entity references
|
|
74
75
|
- **High** — stale state, broken lookups, schema selectors without fallbacks
|
|
@@ -83,13 +84,13 @@ Produce a markdown report:
|
|
|
83
84
|
# Introspect — {plan filename}
|
|
84
85
|
|
|
85
86
|
Plan: {path}
|
|
86
|
-
|
|
87
|
+
Boundaries: {N} files evaluated
|
|
87
88
|
Intersections found: {N} ({critical}/{high}/{medium}/{low})
|
|
88
89
|
|
|
89
90
|
## Violations
|
|
90
91
|
|
|
91
|
-
| # |
|
|
92
|
-
|
|
92
|
+
| # | Boundary | Risk | Severity | Plan step |
|
|
93
|
+
|---|----------|------|----------|-----------|
|
|
93
94
|
|
|
94
95
|
## Suggested Plan Additions
|
|
95
96
|
|
|
@@ -105,7 +106,7 @@ For each violation, a specific recommendation:
|
|
|
105
106
|
|
|
106
107
|
## New Cross-Module Contracts Detected
|
|
107
108
|
|
|
108
|
-
{If the plan introduces a contract not yet in
|
|
109
|
+
{If the plan introduces a cross-cutting contract not yet in `docs/boundaries/`, describe the proposed boundary (type, Bounds, Shape, suggested severity) and recommend running the `boundary-mapper` agent to formalize it — never write a boundary file directly.}
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
The severity-ranked table is the load-bearing output. Suggestions are advisory — the user decides which to fold back into the plan.
|
|
@@ -115,17 +116,17 @@ The severity-ranked table is the load-bearing output. Suggestions are advisory
|
|
|
115
116
|
After producing the report:
|
|
116
117
|
|
|
117
118
|
- If the user accepts a suggested plan addition, they edit the plan themselves (or invoke the documentation skill to do it). Introspect never edits plans.
|
|
118
|
-
- If new contracts are detected, suggest
|
|
119
|
+
- If new contracts are detected, suggest running the `boundary-mapper` agent to formalize them as a typed boundary — do not write to `docs/boundaries/` from this skill.
|
|
119
120
|
|
|
120
121
|
---
|
|
121
122
|
|
|
122
123
|
## Rules
|
|
123
124
|
|
|
124
|
-
- **Read-only**. Never edit the plan, source code,
|
|
125
|
+
- **Read-only**. Never edit the plan, source code, boundaries, or memory.
|
|
125
126
|
- **Verify against source**. Never report a violation purely from plan text — read the files the plan claims it will touch.
|
|
126
127
|
- **Plan structure is load-bearing**. If a plan was not written using the documentation skill's plan template, the Proposed Changes subsections may be missing. Note this clearly rather than fabricating intersections.
|
|
127
128
|
- **A clean report is valid**. Plans with no intersections produce an empty violations table — say so, don't pad.
|
|
128
|
-
- **Be specific**. Cite file paths, plan-step numbers,
|
|
129
|
+
- **Be specific**. Cite file paths, plan-step numbers, boundary names, and the exact code shape that breaks the contract.
|
|
129
130
|
- **Don't replicate contract-monitor**. Introspect checks intent (plan text). Contract-monitor checks reality (code). If the user wants to scan live code, route them to contract-monitor.
|
|
130
131
|
|
|
131
132
|
---
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# technical-brainstorm
|
|
2
|
+
|
|
3
|
+
A Claude Code skill for **structured design of unbuilt software**. It enforces a deliberate plan-before-code phase, captures decisions and open questions in a persistent registry of pillar documents, and refuses to write production code while a session is open.
|
|
4
|
+
|
|
5
|
+
The user's job is to prevent eager coding. The skill's job is to make planning the path of least resistance.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Why this skill exists
|
|
10
|
+
|
|
11
|
+
The default failure mode of an AI assistant on a fresh problem is to **start typing code immediately**. That produces:
|
|
12
|
+
|
|
13
|
+
- Decisions made implicitly inside `src/`, never written down.
|
|
14
|
+
- Open questions silently resolved with the first plausible answer.
|
|
15
|
+
- Architecture that drifts because no one tracked the "why".
|
|
16
|
+
- Re-work when the next session forgets context the previous one had.
|
|
17
|
+
|
|
18
|
+
`technical-brainstorm` inverts this. While a session is open, the skill behaves as a **design facilitator** — not a coder. It asks structured questions, records answers into named files, and uses a state file (`state.md`) to remember across conversations whether a session is active. Code authoring is **blocked** outside the brainstorm folder; small load-bearing snippets are allowed only as illustration inside it.
|
|
19
|
+
|
|
20
|
+
The output is not a single document. It is a **registry** — nine pillar files plus numbered plan docs — that survives across sessions and stays load-bearing because every entry has a *why*.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## When to use it
|
|
25
|
+
|
|
26
|
+
Good fits:
|
|
27
|
+
|
|
28
|
+
- New system being designed from scratch.
|
|
29
|
+
- New feature on a system that hasn't shipped yet.
|
|
30
|
+
- Migration or refactor with enough surface area that you want decisions captured before code.
|
|
31
|
+
- Multi-service or cross-team design needing a shared registry of decisions.
|
|
32
|
+
|
|
33
|
+
Bad fits — the skill will say so and offer to redirect:
|
|
34
|
+
|
|
35
|
+
- Debugging a specific bug in an existing system.
|
|
36
|
+
- One-day scripts, single-button additions, typo fixes.
|
|
37
|
+
- Established codebases where you're following an existing pattern.
|
|
38
|
+
- Anything where the right next step is to read or change code, not to decide.
|
|
39
|
+
|
|
40
|
+
When the skill detects a bad fit during qualification, it asks the user before exiting — never bails unilaterally. The user can override and proceed anyway.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
In this repo (`etna`), the skill lives at:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
store/skills/technical-brainstorm/
|
|
50
|
+
├── SKILL.md # The skill definition Claude Code loads.
|
|
51
|
+
├── README.md # This file.
|
|
52
|
+
├── greenfield.md # Writing doctrine for greenfield architecture docs.
|
|
53
|
+
└── templates/ # Pillar file templates copied into ./plan/ on first use.
|
|
54
|
+
├── state.md
|
|
55
|
+
├── questions.md
|
|
56
|
+
├── decisions.md
|
|
57
|
+
├── doctrine.md
|
|
58
|
+
├── glossary.md
|
|
59
|
+
├── inventory.md
|
|
60
|
+
├── non-goals.md
|
|
61
|
+
├── references.md
|
|
62
|
+
├── rejected.md
|
|
63
|
+
├── milestones.md
|
|
64
|
+
└── plan-doc.md
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
To use the skill in a project, place the folder at one of:
|
|
68
|
+
|
|
69
|
+
- `~/.claude/skills/technical-brainstorm/` (user-wide install)
|
|
70
|
+
- `<project>/.claude/skills/technical-brainstorm/` (project-scoped install)
|
|
71
|
+
- A plugin under `<project>/plugins/<plugin>/skills/technical-brainstorm/`
|
|
72
|
+
|
|
73
|
+
Claude Code loads any skill whose `SKILL.md` it can discover via its standard skill resolution.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Lifecycle
|
|
78
|
+
|
|
79
|
+
The skill exposes exactly two subcommands. Everything else happens **within** an active session as natural conversation.
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
/technical-brainstorm start # open a session
|
|
83
|
+
/technical-brainstorm close # close a session
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
There is no `sweep`, `check`, `resolve`, `init`, or `reinforce` subcommand. The skill reads `state.md` at the start of every turn to decide whether a session is open, and adapts behavior accordingly.
|
|
87
|
+
|
|
88
|
+
### `start` — opening a session
|
|
89
|
+
|
|
90
|
+
1. **Qualification** — 2–4 questions via `AskUserQuestion`: what's being designed, what's built so far, rough scope, whether the goal is to lock decisions before code. If the answers suggest a poor fit, the skill says so and offers to redirect (dump conversation into a temp file and end before opening). The user always decides.
|
|
91
|
+
|
|
92
|
+
2. **Folder selection** — Decide where pillars and `state.md` live. The skill scans the working directory (one level deep) for candidate folders:
|
|
93
|
+
- Conventional names: `./plan/`, `./brainstorm/`, `./design/`.
|
|
94
|
+
- Any other folder containing `state.md` plus at least one pillar file.
|
|
95
|
+
|
|
96
|
+
Resolution:
|
|
97
|
+
- **One candidate** → confirm in a single line.
|
|
98
|
+
- **Multiple candidates** → present via `AskUserQuestion`.
|
|
99
|
+
- **None found** → ask the user; offer the conventional names plus "Other" for a custom path.
|
|
100
|
+
|
|
101
|
+
The chosen folder anchors the entire session. Every later reference to `./plan/` resolves to it.
|
|
102
|
+
|
|
103
|
+
3. **Bootstrap** — Copy any missing pillar files from `templates/` into the chosen folder. Existing files are never overwritten. Write `state.md` with `STATE: open`, session start date, and the current topic.
|
|
104
|
+
|
|
105
|
+
4. **Source materials (optional)** — Before intake, the skill asks whether existing documents or projects should inform the design. If yes, it copies them into `./plan/sources/` and adds entries to `references.md` so the session works off local copies rather than thrashing across the filesystem.
|
|
106
|
+
|
|
107
|
+
5. **Intake interview** — `AskUserQuestion` in topical bundles (2–4 questions per batch) seeds the pillars: what the system is for, what's explicitly not being built, prior art, hard constraints, obvious open questions. Each answer is written directly to the relevant pillar as it comes in — no accumulating in conversation.
|
|
108
|
+
|
|
109
|
+
6. **First-pass review** — Show the user the pillar summaries, the open-questions dependency graph (computed from `Blocks.` fields, presented topologically), and the next milestone's blocking questions. Ask which question to tackle first.
|
|
110
|
+
|
|
111
|
+
### In-session behavior
|
|
112
|
+
|
|
113
|
+
Once `state.md` is `STATE: open`, the skill is active across all subsequent turns until `close` runs.
|
|
114
|
+
|
|
115
|
+
#### Voices
|
|
116
|
+
|
|
117
|
+
The skill's tone shifts implicitly based on what's happening — no flags or overrides.
|
|
118
|
+
|
|
119
|
+
| Phase | Voice | What this means |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| Intake | **Facilitator** | Neutral. Open questions. Draw out intent. Don't propose. |
|
|
122
|
+
| Surfacing new topics | **Architect mentor** | Proactively raise things the user hasn't named. Cite prior art. |
|
|
123
|
+
| Resolving a question | **Sparring partner** | Push back on weak rationale. Name the unstated tradeoff. |
|
|
124
|
+
| Sweeps, status reads, capture | **Scribe** | Pure capture. Don't editorialize. |
|
|
125
|
+
| `close` and gap detection | **Critic** | Look for inconsistencies, smell-words, underspecified pillars. |
|
|
126
|
+
|
|
127
|
+
#### Writing recommendations on questions
|
|
128
|
+
|
|
129
|
+
When the skill surfaces a new question or sweeps the question ledger, it adds a one-line **Claude's take:** field to questions where it has a confident view. **Silent on uncertain questions** — a hedge is worse than nothing. When the take disagrees with an existing Lean, it says so explicitly.
|
|
130
|
+
|
|
131
|
+
#### Resolving a question
|
|
132
|
+
|
|
133
|
+
1. Read the full question from `questions.md`.
|
|
134
|
+
2. Present options via `AskUserQuestion`. If the user has already named an answer in chat, pre-lean it with a confirm step.
|
|
135
|
+
3. **Sparring-partner pushback**: probe weak rationale once. If the user holds firm, accept.
|
|
136
|
+
4. Append to `decisions.md` with **Decision**, **Why**, **How to apply**, **Resolves Q-N**, optional **Alternatives considered** linking to `rejected.md`.
|
|
137
|
+
5. **Delete** Q-N from `questions.md`. No strikethrough. No "(resolved)" marker. The decision now lives in `decisions.md`, period.
|
|
138
|
+
|
|
139
|
+
#### Topic shifts → pillar reinforcement
|
|
140
|
+
|
|
141
|
+
When conversation moves from one design topic to another, the skill pauses **before** entering the new topic:
|
|
142
|
+
|
|
143
|
+
> "I see we're moving from [previous] to [next]. Before we shift — do any of these belong in the load-bearing pillars?
|
|
144
|
+
> - [Candidate 1] → could go in `glossary.md` because [reason]
|
|
145
|
+
> - [Candidate 2] → could go in `doctrine.md` because [reason]
|
|
146
|
+
>
|
|
147
|
+
> Promote any of them?"
|
|
148
|
+
|
|
149
|
+
This is the **only** periodic prompt. There is no scheduled checkpoint or review — pillar reinforcement happens at natural topic boundaries because that's when the closing context is fresh.
|
|
150
|
+
|
|
151
|
+
#### Semantic sweeps
|
|
152
|
+
|
|
153
|
+
When the user asks to "update the docs" / "propagate this", the skill runs a semantic sweep — not a grep:
|
|
154
|
+
|
|
155
|
+
1. List all plan docs and pillar files that might be affected.
|
|
156
|
+
2. Read each end-to-end for sections referencing the changed concept.
|
|
157
|
+
3. Present a punch list grouped by file → section → proposed edit.
|
|
158
|
+
4. Wait for approval before editing.
|
|
159
|
+
|
|
160
|
+
Sweeps are **never automatic**. They are user-requested or skill-recommended, but the user always pulls the trigger.
|
|
161
|
+
|
|
162
|
+
#### Production code — blocked
|
|
163
|
+
|
|
164
|
+
The skill refuses to write production code (in `src/`, `apps/`, `packages/`, etc.) while a session is open. Small load-bearing snippets — a config sketch, an API contract, a database row layout — are allowed **inside the brainstorm folder** in `./plan/samples/` or inline in plan docs as fenced code. They are documentation, not production.
|
|
165
|
+
|
|
166
|
+
If the user asks for production code, the skill says:
|
|
167
|
+
|
|
168
|
+
> "We're in an active brainstorm session. I can sketch this inside `./plan/` as illustration, or you can run `/technical-brainstorm close` first if you want to start building. Which do you want?"
|
|
169
|
+
|
|
170
|
+
### `close` — closing a session
|
|
171
|
+
|
|
172
|
+
1. Read all pillars and plan docs.
|
|
173
|
+
2. Run gap detection:
|
|
174
|
+
- Greenfield smell-words grep across plan docs (see `greenfield.md`).
|
|
175
|
+
- Decisions missing **Why** or **How to apply**.
|
|
176
|
+
- Questions with no `Blocks.` field.
|
|
177
|
+
- Pillars untouched since `start` (suggests underspecified design).
|
|
178
|
+
- Plan docs with their own "Open Questions" section instead of a pointer to `questions.md`.
|
|
179
|
+
3. Report gaps — do not auto-fix.
|
|
180
|
+
4. Ask whether to address them now or close anyway.
|
|
181
|
+
5. On confirmation, write `STATE: closed` to `state.md` with a one-line reason (milestone reached / paused / scope cut / handing off).
|
|
182
|
+
6. If `./plan/sources/` exists, offer to delete it. Default to keep if unclear — they were copies; originals are untouched.
|
|
183
|
+
7. Print: "Run `/technical-brainstorm start` to resume."
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## The 9 pillars (+ plan docs)
|
|
188
|
+
|
|
189
|
+
| File | Role |
|
|
190
|
+
|---|---|
|
|
191
|
+
| `questions.md` | Live ledger of unresolved decisions. Self-contained text per question (no `08 §5` cross-refs). |
|
|
192
|
+
| `decisions.md` | Resolved decisions, each with **Why** and **How to apply**. Append-only. |
|
|
193
|
+
| `doctrine.md` | Stable principles that pre-answer future questions. |
|
|
194
|
+
| `glossary.md` | Project-specific terms with definitions. |
|
|
195
|
+
| `inventory.md` | What exists / is being built / is external / is reference-only. |
|
|
196
|
+
| `non-goals.md` | Explicit "not building" list, each with a reason. |
|
|
197
|
+
| `references.md` | External prior art, each with a one-line "what we use it for". |
|
|
198
|
+
| `rejected.md` | Alternatives considered and rejected, with reasons + re-evaluate conditions. |
|
|
199
|
+
| `milestones.md` | Sequencing only. Each milestone names its blocking questions and dependencies. |
|
|
200
|
+
|
|
201
|
+
Plus **plan docs** — `01-foo.md`, `02-bar.md`, ... — domain-by-domain architecture, present-tense. Format described in `templates/plan-doc.md`.
|
|
202
|
+
|
|
203
|
+
Each template at `templates/` carries a full prose introduction. Read the template, not summaries, when working with format details.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Hard rules
|
|
208
|
+
|
|
209
|
+
These hold for the entire session.
|
|
210
|
+
|
|
211
|
+
1. **No production code outside the brainstorm folder.** Small load-bearing snippets go in `./plan/samples/` or inline in plan docs. Never touch `src/`, `apps/`, `packages/`.
|
|
212
|
+
2. **Resolved questions get DELETED, not struck through.** No `~~`, no "(resolved)", no "previously planned".
|
|
213
|
+
3. **Self-contained registry.** Full text in `questions.md`. Never `08 §5` cross-references that force a second read.
|
|
214
|
+
4. **Every decision carries Why + How to apply.** Without the *why*, future-you can't judge edge cases.
|
|
215
|
+
5. **Reference implementations beat invented solutions.** If prior art exists, link in `references.md` and use it. Don't re-derive.
|
|
216
|
+
6. **Batch questions via `AskUserQuestion`**, 2–4 at a time. Never open-chat dump structured choices.
|
|
217
|
+
7. **Greenfield writing rules apply** to all docs in the brainstorm folder. See `greenfield.md`.
|
|
218
|
+
8. **No past tense for software that doesn't exist yet.** Architecture docs are present-tense. The past lives only in `decisions.md`, `rejected.md`, `references.md`, and git history.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## State management
|
|
223
|
+
|
|
224
|
+
`state.md` is the source of truth for session lifecycle. Format:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
STATE: open | closed
|
|
228
|
+
SESSION STARTED: <ISO date>
|
|
229
|
+
SESSION CLOSED: <ISO date or absent>
|
|
230
|
+
CURRENT TOPIC: <one-line>
|
|
231
|
+
LAST UPDATED: <ISO date>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
- `STATE: open` → in-session behavior applies (voices, refusal rules, topic-shift prompts).
|
|
235
|
+
- `STATE: closed` → the skill does nothing on its own; only `/technical-brainstorm start` re-opens it.
|
|
236
|
+
- `CURRENT TOPIC` updates on every detected topic shift.
|
|
237
|
+
- `LAST UPDATED` updates on every pillar write.
|
|
238
|
+
|
|
239
|
+
To find `state.md` across turns, the skill checks the conventional folders (`./plan/`, `./brainstorm/`, `./design/`) and any other one-level-deep folder containing pillar files.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Greenfield doctrine
|
|
244
|
+
|
|
245
|
+
`greenfield.md` is loaded for any sweep, gap detection, or `close`. It enforces a single rule for unbuilt-software docs:
|
|
246
|
+
|
|
247
|
+
> Describe what the system **is** (or will be — same thing in greenfield). Never describe what it isn't, used to be, replaces, supersedes, or is migrating from.
|
|
248
|
+
|
|
249
|
+
The doctrine includes a banned-patterns table (no "X replaces Y", no `~~strike-through~~`, no "previously planned", no "(resolved)" markers) and a `grep` smell-words check that `close` runs automatically. Hits are acceptable only in `decisions.md`, `rejected.md`, `references.md`, commit messages, and `./plan/sources/`.
|
|
250
|
+
|
|
251
|
+
The full doctrine, including the four places where the past *does* belong, lives in `greenfield.md`.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Design philosophy
|
|
256
|
+
|
|
257
|
+
A few choices in this skill are deliberate and worth naming:
|
|
258
|
+
|
|
259
|
+
**Skill behavior is determined by state, not by flags.** Voices, refusal rules, and topic-shift prompts all derive from `state.md` and the current phase. The user shouldn't have to specify "use facilitator voice" or "stop refusing code now" — the skill should read context and act.
|
|
260
|
+
|
|
261
|
+
**Capture is part of conversation, not a separate ceremony.** Pillar updates happen inline as topics come up, not at end-of-session. The skill writes to files during the same turn that elicits the information.
|
|
262
|
+
|
|
263
|
+
**Resolved questions disappear from the ledger.** Striking-through or marking "(resolved)" creates noise that future readers — including future Claude — have to filter. The decision lives in `decisions.md`; the question is gone.
|
|
264
|
+
|
|
265
|
+
**Why** is load-bearing. Every decision and every piece of feedback-style guidance carries a *why*. Without it, future-you can't judge edge cases — only blindly follow or blindly violate the rule.
|
|
266
|
+
|
|
267
|
+
**The user prevents eager coding.** The skill is the assistant. The user controls when a session opens and closes. There is no "auto-open on natural language phrases like let's design" — that pattern has caused too many surprise refusals when the user just wanted to chat. The skill opens only on explicit `/technical-brainstorm start`.
|
|
268
|
+
|
|
269
|
+
**Reference implementations beat invented solutions.** If prior art exists for the problem, the skill prefers a one-line link in `references.md` over a re-derivation. Originality is not a virtue when shipping is the goal.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Anti-features (what this skill deliberately doesn't do)
|
|
274
|
+
|
|
275
|
+
- **No auto-invocation on natural language.** Phrases like "let's plan", "let's design", "let's think through X" do **not** trigger the skill. Only explicit `/technical-brainstorm start` and `/technical-brainstorm close` do.
|
|
276
|
+
- **No automatic semantic sweeps.** Sweeps run only when the user asks or when the skill recommends one after a major decision and the user agrees.
|
|
277
|
+
- **No scheduled checkpoints.** Pillar reinforcement happens at natural topic boundaries — the only periodic prompt.
|
|
278
|
+
- **No subcommand sprawl.** No `sweep`, `resolve`, `init`, `reinforce`, `check`. Two verbs total: `start` and `close`.
|
|
279
|
+
- **No code in `src/`.** The skill will refuse and offer a sketch inside the brainstorm folder or a close-then-build path.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Related
|
|
284
|
+
|
|
285
|
+
- `greenfield.md` — writing doctrine for unbuilt-software docs.
|
|
286
|
+
- `templates/` — pillar file templates, each with a prose introduction describing its format.
|
|
287
|
+
- The `documentation` skill in this repo handles documentation of *built* systems (changelogs, ADRs, root READMEs). `technical-brainstorm` is its before-the-fact counterpart.
|