@nurix/etna 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/data/harnesses/code/CLAUDE.md +115 -97
- package/data/harnesses/code/agents/boundary-mapper.md +91 -0
- package/data/harnesses/code/agents/brainstorm.md +107 -0
- package/data/harnesses/code/agents/change-review.md +1 -0
- package/data/harnesses/code/agents/contract-monitor.md +1 -0
- 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 +1 -0
- 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 +1 -0
- package/data/harnesses/code/skills/introspect/SKILL.md +1 -0
- package/data/harnesses/code/skills/technical-brainstorm/README.md +287 -0
- package/data/harnesses/code/skills/technical-brainstorm/SKILL.md +598 -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 +15 -0
- package/data/harnesses/kb-agi/agents/kb-agi-init.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-catch-stale.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-find-gaps.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-fix-links.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-refresh-frontdoor.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +1 -0
- package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +1 -0
- package/data/harnesses/kb-agi/rules/kb.md +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: boundaries
|
|
3
|
+
description: The technology-aware Application Boundary Scale — the knowledge the boundary-mapper agent applies when generating docs/boundaries/. Maps each technology to its application boundaries (what ripples when touched), a doc-mode (point vs transcribe), and a default severity that drives introspect's review depth. Seeded for react-router, redux-toolkit, vite, shadcn/ui, express, django, fastapi, plus the stack-independent `domain` category (the information-architecture entity model). Use when baselining or extending a repo's boundary set, or when deciding whether a change touches a protected boundary.
|
|
4
|
+
plugins: [nurix-harness]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Boundaries — the Application Boundary Scale
|
|
8
|
+
|
|
9
|
+
A **boundary** is a horizontal cross-cutting contract that multiple modules touch. Touching it ripples outward, so it must be documented and protected. This skill is the *knowledge*; the `boundary-mapper` agent is the *process* that applies it to a repo, writing one file per boundary into `docs/boundaries/`.
|
|
10
|
+
|
|
11
|
+
This skill exists because the dangerous boundaries are the invisible ones. A team writes a guardrail for "auth" but never for "the Redux store shape" or "the entity model" — because those read as *just how the app is built*. The scale names them so they can't hide.
|
|
12
|
+
|
|
13
|
+
## Two categories
|
|
14
|
+
|
|
15
|
+
| Category | Determined by | How `boundary-mapper` finds it |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| **technology** | the stack | detect from `package.json` + source tree |
|
|
18
|
+
| **domain** | the product's information architecture, independent of stack | read ADRs, doctrine, the entity/contracts definitions — **not** stack detection |
|
|
19
|
+
|
|
20
|
+
The **domain** boundary (the IA entity model) is usually the *highest-severity boundary in the whole repo* and is the cleanest bridge from Brainstorming Mode (which shapes the IA) to the boundary set (which `introspect`/`contract-monitor` enforce).
|
|
21
|
+
|
|
22
|
+
## doc-mode: `point` vs `transcribe`
|
|
23
|
+
|
|
24
|
+
- **`point`** — *self-locating* shapes a reader finds unaided (DB schema → `schema.ts`/`models.py`; routes → the router file). The boundary file is **pointer (`file:line`) + invariants + checklist**. Never transcribe — the code is source-of-truth and a copy rots on the next push/codegen.
|
|
25
|
+
- **`transcribe`** — *synthesized* contracts with no single code home (the composed Redux store tree, the API response envelope, the IA relationship/topology, tenancy). Transcribe canonically; the boundary file then owns the shape and feature docs link up.
|
|
26
|
+
|
|
27
|
+
## The scale
|
|
28
|
+
|
|
29
|
+
Each entry: boundary type(s) · where it lives · doc-mode · default severity · what a change triggers.
|
|
30
|
+
|
|
31
|
+
### domain (stack-independent)
|
|
32
|
+
|
|
33
|
+
| Boundary | Lives in | doc-mode | Severity | A change triggers |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| **information architecture** — entity model + topology (e.g. Brief→Plan→Persona→Audience→Match→Campaign→Run; service planes) | synthesized — ADRs / doctrine / contracts pkg | `transcribe` | **CRITICAL** | re-relating or renaming an entity ripples across *every* module; check all consumers, migrations, wire types |
|
|
36
|
+
| **tenancy** — the workspace/tenant scoping invariant | query layer (a rule, not a file) | `transcribe` | **CRITICAL** | a missing scope = cross-tenant leak; audit every read/write path |
|
|
37
|
+
|
|
38
|
+
### technology
|
|
39
|
+
|
|
40
|
+
| Tech | Boundary | Lives in | doc-mode | Severity | A change triggers |
|
|
41
|
+
|---|---|---|---|---|---|
|
|
42
|
+
| `react-router` | route tree | router config (self-locating) | `point` | MED | deep-linking, auth guards, redirects, lazy boundaries |
|
|
43
|
+
| `redux-toolkit` | composed store shape + **persisted keys** + selectors | spread across `store/` slices (no single file) | `transcribe` | HIGH | renamed/removed key breaks selectors + rehydration; persisted keys = CRITICAL |
|
|
44
|
+
| `vite` | dev proxy list, `VITE_` env prefix, path aliases | `vite.config` (self-locating) | HIGH | `point` | a new backend mount must be added to the proxy list; env prefix governs what reaches the client |
|
|
45
|
+
| `shadcn/ui` | `components.json`, generated `ui/` primitives, theme tokens | self-locating | LOW | `point` | `ui/` is generated — don't hand-edit, re-run the CLI; tokens in `:root`/`.dark` are the contract |
|
|
46
|
+
| `express` | middleware order, error-handler position, response envelope, route surface | order/envelope = convention; routes self-locating | `transcribe` (order+envelope) / `point` (routes) | HIGH | order is parsers→custom→routes→error-handler-**last**; envelope `{status,message,data}` is the contract |
|
|
47
|
+
| `django` | `settings.py` MIDDLEWARE order + INSTALLED_APPS, models, URLconf, DRF serializers | models/urls self-locating; middleware = convention | `point` + `transcribe` | HIGH (serializers/models CRITICAL) | serializer = wire contract; migration forward-only; middleware order changes request handling globally |
|
|
48
|
+
| `fastapi` | Pydantic request/response models, APIRouter surface, `Depends` graph | schemas/routers self-locating | `point` | HIGH | a response-model change = wire-contract change; the dependency-injection graph shifts auth/session resolution |
|
|
49
|
+
| `temporal` | workflow/activity signatures, signal/query names, task queues | workflow defs (self-locating) | `point` | HIGH | the starter references by name; a signature mismatch = stuck runs |
|
|
50
|
+
| `@org/contracts` (shared wire types) | persisted shapes + envelopes shared across SPA/BFF/worker | the contracts package (self-locating) | `point` | CRITICAL | 3-way drift; update the package first, then consumers |
|
|
51
|
+
|
|
52
|
+
Extend the scale by adding a row (and, for a new technology, a short pack describing where its boundaries live and the safe-change checklist). The instructions must be **technology-specific, never vague** — "middleware order is parsers→custom→routes→error-handler-last" beats "be careful with middleware."
|
|
53
|
+
|
|
54
|
+
## Boundary file template
|
|
55
|
+
|
|
56
|
+
`boundary-mapper` writes one file per boundary using this shape:
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
# <Boundary name>
|
|
60
|
+
|
|
61
|
+
[BOUNDARY: <type> · <CRITICAL|HIGH|MED|LOW>]
|
|
62
|
+
|
|
63
|
+
**Bounds.** <which modules / planes sit on each side>
|
|
64
|
+
|
|
65
|
+
## Shape
|
|
66
|
+
<transcribed contract, OR a `file:line` pointer with one-line orientation>
|
|
67
|
+
|
|
68
|
+
## Invariants
|
|
69
|
+
<what must hold>
|
|
70
|
+
|
|
71
|
+
## Blast radius
|
|
72
|
+
<what breaks, and where, if violated>
|
|
73
|
+
|
|
74
|
+
## Safe-change checklist
|
|
75
|
+
- [ ] <step>
|
|
76
|
+
- [ ] <step>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`docs/boundaries/README.md` indexes every boundary (name · type · severity) and records which technology packs are active.
|
|
80
|
+
|
|
81
|
+
## How the pieces connect
|
|
82
|
+
|
|
83
|
+
- `boundary-mapper` (agent) detects the stack + IA and applies this scale to write `docs/boundaries/`.
|
|
84
|
+
- `introspect` (skill) reads `docs/boundaries/` before implementation; the boundary **severity** sets its review depth.
|
|
85
|
+
- `contract-monitor` (agent) scans the live codebase against `docs/boundaries/` after changes land, per boundary type.
|
|
86
|
+
- The **maintenance** agent flags when a boundary file drifts from code; `boundary-mapper` update-mode fixes it.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation
|
|
3
3
|
description: Create and maintain technical documentation. Use when the user asks to (1) baseline, audit, or reorganize docs — enforces an opinionated 6-folder structure (architecture, features, operations, history, memory, tests) with ownership frontmatter and scaffold files, (2) document a feature or module, (3) create or update a changelog entry, (4) document data flows or Redux state, (5) add to protected files, (6) create or update guardrails (cascading failure boundaries), (7) record an architecture decision (ADR), (8) create or update the project root README, (9) create or update a plan, or (10) co-author any technical doc. Triggers on "document this", "create docs", "update changelog", "baseline docs", "audit docs", "add to protected files", "guardrails", "ADR", "architecture decision", "root README", "plan".
|
|
4
|
+
plugins: [nurix-harness]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Technical Documentation Skill
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: introspect
|
|
3
3
|
description: Pre-implementation impact analyzer. Reads a plan in docs/history/plans/ and checks every Proposed Change against docs/operations/guardrails.md 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", "guardrail check before I start".
|
|
4
|
+
plugins: [nurix-harness]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Introspect Skill
|
|
@@ -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.
|