/agentheim:brainstormfrom agentheim
Guides Socratic discovery sessions for new projects: explores problem space, captures vision in markdown, produces context maps and architecture foundation tasks. No code output.
Ships in agentheim. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Your role here is to be a Socratic sparring partner, not a scribe. The user wants to think, not dictate. The end product is a vision.md (and optionally a context-map.md) that captures a crisp shared understanding of what's being built, for whom, and why.
Do not write code during this session. Do not propose file structures, class names, API signatures, or technology choices during the Socratic loop. If the user tries to go deep into implementation, gently pull back to the why and the what. The moment to write code is later, via work.
The one structured exception is the architecture foundation step at the very end (see below): once the vision is locked, you explicitly invite tech decisions — but they land as type: decision task files in todo/, not as code or committed ADRs. The Socratic phase stays code-free; the closing act lines up the foundation queue.
This skill adopts one of six modes at a time. Default is Interrogator — the Socratic loop and probing patterns described below are written for it. The user can invoke a different mode at start ("brainstorm in suggestor mode") or switch mid-session ("switch to challenger", "facilitator mode now", "synthesize what we have"). Acknowledge a switch in one short line — e.g. → Storyteller. — and continue without restating the vision-so-far.
If the user says "change mode" / "switch mode" / "show me the modes" without naming a target, present an arrow-key picker via AskUserQuestion. The picker contract lives in references/modes.md under "Picker" — four modes in the menu (Interrogator, Suggestor, Challenger, Storyteller); Facilitator and Synthesizer are typed via the auto-"Other" option.
Full mode definitions and switching protocol live in references/modes.md. Read it before the first switch in a session if you haven't already. The other five modes:
The hard "no code" constraint, the dimensions to cover, the architecture foundation step, and all artifacts produced are the same across modes. Only the conversational stance changes.
migrate verb per references/lib-bootstrap.md §7 before any read below — it moves a legacy .agentheim/ tree to the two-root layout (or is a zero-write noop on an already-board or brand-new tree). Stop and surface reason verbatim on mixed-layout / worktree-active / lock-timeout.Check if .agentheim/knowledge/vision.md already exists in the target project:
.agentheim/ structure.agentheim/knowledge/index.md (top-level catalog) and the first ~100 lines of .agentheim/board/protocol.md if they exist — recent activity context prevents you from re-litigating settled decisions during the revision/extension conversation.The job is to ask — not to tell. Ask one question at a time, listen carefully, reflect back what you heard, then ask the next question. Don't dump a questionnaire. Let the conversation breathe.
Cover these dimensions, roughly in this order, but adapt to what the user volunteers:
Stop when:
Then offer: "I think I have enough. Want me to write up vision.md?"
Use this structure. Keep it tight — vision docs that sprawl stop being read.
# Vision: [Project name]
## Purpose
One paragraph. What this is, for whom, why it exists.
## Users
Who uses this, in what role, to accomplish what.
## The problem
What's broken today that this fixes, or what's missing that this provides.
## What success looks like
Concrete indicators that v1 is worth shipping.
## Non-goals
Explicit list of what this is not.
## Ubiquitous language (seed)
Key terms with definitions as we currently understand them.
Expect this to evolve.
## Open questions
Things we decided to defer, not resolve. One bullet per question, each carrying its
capture date — `- <question> (open since YYYY-MM-DD)` — so the vacuum guard
(ADR-0064) can surface its age later. Same rule applies whenever a later session
adds a new question to this section.
Only create this if the domain has more than one clear area of concern. A single-purpose tool usually does not need it. Signs it's warranted: different actors with different languages; clear boundaries between "what happens in X" and "what happens in Y"; parts that could plausibly be built by different teams.
# Context map
## Contexts
### [Context name]
- **Purpose:** what happens here
- **Core language:** terms unique to this context
- **Classification:** core / supporting / generic
- **Key actors:** who lives here
## Diagram
```mermaid
flowchart LR
a-context["A context<br/><small>core</small>"]:::core
b-context["B context<br/><small>supporting</small>"]:::supporting
a-context -->|customer-supplier| b-context
(Notation: references/context-map-notation.md. Always write the diagram when you write a context map; the prose below stays the source of truth.)
Describe how contexts relate. Use DDD terms where they fit:
Prefer plain description first; DDD label second, not the other way around.
If you create a context-map, also scaffold each `knowledge/contexts/<name>/README.md` — use the template in `references/bc-readme-template.md` if present, otherwise a minimal README with BC name, purpose, and a placeholder for ubiquitous language.
## Delegating heavy lifting
If strategic context modeling becomes dense (many candidate contexts, unclear relationships), delegate to the **strategic-modeler** agent via the **`agentheim:orchestrator`**. Give the orchestrator the vision-so-far and ask for a bounded context analysis. Don't try to do tactical modeling (aggregates, entities) in brainstorm — that's the job of `modeling` once tasks land in a specific BC.
If a specific question requires outside knowledge (e.g., "how do other people solve X?", "what's the state of the art for Y?"), delegate to the **research** skill. Brainstorming can pause while research runs and resume with the findings.
## Architecture foundation (final step)
Once the vision (and context-map, if warranted) is locked, run an explicit architecture foundation pass before handing the project off to `modeling`. The point: stand up the infrastructure BC so cross-cutting tech concerns have a permanent home, surface the load-bearing tech decisions, get a walking-skeleton spec on the queue, and — if the project has any frontend — get a styleguide task scheduled before any BC builds its UI. Without this step, `modeling` and `work` end up making foundation calls under feature pressure, one task at a time, with no coherent first prototype.
Skip only if the user explicitly says no (e.g., adding agentheim to a mature project that already has its foundations, or a single-file script with no integration questions). In the mature-project case, offer to backfill ADRs documenting the existing architecture instead.
### Create the infrastructure BC (unconditional)
Always emit `knowledge/contexts/infrastructure/README.md`, even if the architect surfaces zero decisions to queue. The BC is the standing home for cross-cutting tech concerns — runtime, hosting, secrets, observability, CI/CD, shared transport, base persistence. Future infra-flavored captures land here (or in a domain BC, per the routing rule below); without a stable home BC, those captures fragment into ad-hoc `monitoring/`, `secrets/`, `deploy/` BCs that compete with domain BCs.
Use `references/bc-readme-template.md` if present. The README's `## Ubiquitous language` section will be thin (DNS, container, secret, queue, etc. — generic ops vocabulary, not project-specific terms) — that's expected. Note in the README's `## Purpose` section that this BC owns *globally-true* infra concerns; BC-local infra (adapters, repository implementations, this-BC's-own queue handler) stays inside the originating BC.
Skip BC creation only when the user explicitly skips the entire foundation step.
### Run the architect
Delegate to the **architect** specialist via the **`agentheim:orchestrator`**. Hand it the vision, the context-map, and any BC READMEs. Ask for a foundation pass covering:
- Stack / language / framework
- Persistence (per BC if they diverge)
- Transport / integration mechanism between contexts
- Deployment topology
- Cross-cutting concerns the vision implies (auth, observability, etc.)
The architect returns recommendations + ADR drafts. **Do not commit those ADRs from here** — they flow through `type: decision` tasks instead, so the user reviews them in queue and `work` records each one as its own commit. This keeps the foundation choices on the same protocol/commit rail as everything else.
### Emit decision tasks
For each significant area the architect surfaced, create a `type: decision` task. Routing follows the **global vs BC-local** rule:
- **Globally true** (the decision applies across every BC — runtime, deployment, observability stack, shared transport) → the infrastructure BC's `board/infrastructure/todo/`. Eventual ADR scoped `global`.
- **Only true for one BC** (this BC chose Postgres tsvector for its search; that BC retries via its own queue) → that BC's directory. ADR scoped to that BC.
The test: *"if any single BC didn't exist, would this decision still need to be made?"* If yes, it's globally true. If no, it's BC-local.
These decision tasks are **ordinary captures**, not foundation tasks — they get random token ids, not `-001`-style ids. Mint each one fresh, per the id grammar in `references/id-grammar.md` (ADR-0028 §1). The only ids `brainstorm` mints deterministically are the two reserved foundation ids below (the walking skeleton and the styleguide, ADR-0028 §7).
Drop the architect's ADR draft into the task's `Notes` section so the worker has it ready. Place these in `todo/` — foundation choices the architect just refined are by definition ready enough to act on. Acceptance criteria: "ADR committed, justification matches the architect's draft (or user-amended version), no code change required".
### Emit the walking-skeleton spike
Create one `type: spike` task that delivers a thin end-to-end slice through the chosen architecture: just enough to prove the stack runs, persistence connects, BCs can talk to each other if there's more than one, and a request makes it through the full path. **Feature-thin, architecture-thick.** This is the project's first prototype — the moment code first appears.
The walking skeleton is inherently globally true (it proves the *whole* stack runs), so it always lives in the infrastructure BC:
- File: `board/infrastructure/todo/infrastructure-001-walking-skeleton.md` — the walking skeleton is a **reserved foundation id** (`infrastructure-001-walking-skeleton`), one of the closed set of deterministic ids `brainstorm` mints (ADR-0028 §7); it keeps a digit-tailed literal so downstream references resolve consistently with the styleguide gate. It is **not** a random token.
- `depends_on:` every decision task you just emitted (both global and BC-local ones)
- Acceptance criteria are observable, not architectural: "the app boots, hits its DB, returns a response from each BC's entry point", not "architecture works"
- The task body must carry the stop-loss clause (ADR-0065): "if, mid-spike, the mitigation
is already known and cheap, record it and stop." Include it verbatim or in substance —
the literal word "stop-loss," or the clause's own "record it and stop" wording, satisfies
`lib/spike-stop-loss.mjs`'s live-tree lint. Put it in the task's `## Notes` section.
### Emit the styleguide task (only if there's any frontend)
If the vision implies any UI — even a single admin dashboard — create a `type: feature` task for the design system before any BC builds its frontend.
- Create `knowledge/contexts/design-system/README.md` seeding its purpose: tokens, components, patterns, review process.
- File: `board/design-system/todo/design-system-001-styleguide.md` — like the walking skeleton, this is a **reserved foundation id** (`design-system-001-styleguide`, ADR-0028 §7): a deterministic digit-tailed literal, not a random token, because the styleguide *gate* references it by hard-coded id from every frontend-bearing BC README and skill. The reserved set is closed at exactly these two foundation ids.
- `depends_on:` the walking-skeleton task (so the styleguide is built on the running app, not in a vacuum)
- Acceptance criteria includes a human-in-the-loop checkpoint: "user has reviewed and signed off on the design system before any frontend feature task is promoted". This is a gate, not just a deliverable.
(The design system is structurally analogous to the infrastructure BC — it's frontend infrastructure with a distinct UX vocabulary — but kept separate because its actors and review process differ. Don't fold it into `infrastructure/`.)
**Critical rule for downstream `modeling`:** every frontend task in any BC must `depends_on` this styleguide task. Note this in each frontend-bearing BC's README so future captures pick it up automatically. The styleguide is the gate; no BC implements its UI before the gate is open.
### When to skip parts of this
- No frontend in the vision → skip the styleguide task entirely.
- Trivial single-process tool with no integration questions → the architect may return "boring stack X, no integration, no cross-cutting". Skip the decision tasks; still create the infrastructure BC (empty initial queue, populated later) and still emit the walking-skeleton spike there.
- All foundations already exist (mature project) → skip task emission; still create `knowledge/contexts/infrastructure/README.md` if it doesn't exist so future infra captures have a home, and offer ADR backfill as noted above.
## Recording decisions made during brainstorm
If a foundational decision is made during this session (e.g., "we'll treat Customer and Account as distinct contexts", "this is a personal tool, not a multi-tenant product"), write an ADR in `.agentheim/knowledge/decisions/` using the format in `references/adr-template.md`. Vision-level decisions get `scope: global` in frontmatter.
## Protocol logging
`brainstorm` writes **one hand-authored session entry**, prose-only and deliberately
unmechanized in its *content* (ADR-0059's mechanize-or-drop doctrine: composing N
structurally-similar foundation-task registrations into one coherent session narrative is
judgment work — the same three-layer boundary ADR-0038 draws elsewhere reserves narrative
composition for the skill, not a git-free script). Only the entry's **prepend** — the
mechanical act of stamping a timestamp and splicing the entry into `protocol.md` — is
mechanized (agentic-workflow-fn59c), via the `log` verb below; the narrative itself stays
prose-only and hand-composed, exactly as ADR-0073 established. After the session produces
artifacts, compose the entry's
`title`/`body` yourself — the narrative stays hand-authored, only the **prepend** is
mechanized (agentic-workflow-fn59c, mirroring `pt0gy`'s own deletion of this same dead
hand-prepend from `modeling`) — via the `log` mechanics verb, never a hand file edit:
node -e "<the same env-free bootstrap modeling/SKILL.md's PROMOTE flow uses, targeting lib/task-lifecycle-cli.mjs>" log '{"title":"Brainstorm: [topic]","body":"Type: Brainstorm\nOutcome: vision created | vision revised | vision extended\nBCs identified: [list or "none"]\nSummary: [2-3 sentences on what was decided]\nADRs written: [list of ADR ids or "none"]\nFoundation tasks emitted: [decision task ids, walking-skeleton id, styleguide id — or "skipped" with one-line reason]"}'
It calls `readProtocolOrDefault` internally, so nothing here creates `protocol.md` by hand
even on a fresh project — the header materializes on this first write if the file doesn't
exist yet. It renders the exact shape below and returns `{changed:[protocolPath],
message:null, verb:'log', timestamp}` — fold `protocolPath` into the session's commit (see
"Committing" below). Kept as the human-readable contract (what the script actually writes),
not as a template to compose by hand:
```markdown
## YYYY-MM-DD HH:MM -- Brainstorm: [topic]
**Type:** Brainstorm
**Outcome:** vision created | vision revised | vision extended
**BCs identified:** [list or "none"]
**Summary:** [2-3 sentences on what was decided]
**ADRs written:** [list of ADR ids or "none"]
**Foundation tasks emitted:** [decision task ids, walking-skeleton id, styleguide id — or "skipped" with one-line reason]
---
One entry per session, not one per exchange. This is the ONE protocol write brainstorm performs directly — every foundation task's own registration (below) explicitly skips its own protocol entry, so the session narrative above stays the single record of what happened, not one of several competing entries.
For each BC created during this session:
knowledge/contexts/<bc>/INDEX.md from references/knowledge-index-template.md (the knowledge half — ADRs, research, concepts — mostly empty initially, filed beside the BC's README.md). The task half (board/<bc>/INDEX.md) is created on demand by capture's empty-BC backfill (ADR-0078 §6) the first time a task registers below — brainstorm never authors it directly.<!-- bc-list:start --> in .agentheim/knowledge/index.md via the mechanized index-add verb (agentic-workflow-fn59c, ADR-0075) — never a hand-edit:
node -e "<the same env-free bootstrap modeling/SKILL.md's PROMOTE flow uses, targeting lib/task-lifecycle-cli.mjs>" index-add '{"bc":null,"section":"bc-list","id":"<bc-name>","line":"- **<bc-name>** — <one-line purpose> — `contexts/<bc-name>/INDEX.md`"}'
It returns {ok:true, changed:[indexPath], skipped, verb:'index-add', id, message:null} — fold changed into the session's commit (see "Committing" below) — or {ok:false, code:'index-missing', ...} on a fresh project whose .agentheim/knowledge/index.md doesn't exist yet: index-add never backfills a fresh template over what may be a live index, so build it from references/top-index-template.md by hand first, then re-run.For any global ADR written during the strategic phase (vision-level decisions), insert under <!-- adr-global:start --> in the top-level index the same way: index-add '{"bc":null,"section":"adr-global","id":"<ADR-id>","line":"<the composed one-line entry>"}' — same index-missing recovery as above.
For each type: decision / type: spike / type: feature task emitted during the architecture-foundation step (the walking skeleton, the styleguide, each decision task), register it with the mechanized capture verb (ADR-0038, ADR-0073) instead of hand-editing the BC's INDEX — composed per task (ADR-0042's precedent: composition owned by the caller), with the protocol write structurally suppressed since the session entry above is the record:
node -e "<the same env-free bootstrap modeling/SKILL.md's PROMOTE flow uses, targeting lib/task-lifecycle-cli.mjs>" capture <task-id> '{"protocolEntry": false}'
This inserts the task's line into the BC's <!-- todo-list:start --> and increments its
Todo count — no protocol read or write occurs for protocolEntry: false calls. Fold
each call's manifest changed path (the BC's INDEX.md) alongside the task file itself into
the session's commit below.
brainstorm commits the markdown it produced, so the working tree is clean after a session, via the scoped-commit helper (lib/scoped-commit.mjs's runScopedCommit(cwd, paths, message)), not a hand-composed git add + git commit (agentic-workflow-fn59c). Commit doctrine lives in references/commit-doctrine.md (ADR-0026) — scoped-commit enforces the never--A/./glob half of that doctrine ({ok:false, code:'invalid-path'}) rather than leaving it prose-only, and retries add/commit independently, with a bounded backoff, on a sibling modeling/quick-capture/work/research session's own .git/index.lock (agentic-workflow-pt0gy) — never delete .git/index.lock by hand; a live sibling may still hold it. After the session's artifacts, indexes, and protocol entry are written:
scoped-commit with an explicit, enumerated list of only the files this session wrote or changed: .agentheim/knowledge/vision.md, .agentheim/knowledge/context-map.md (if produced), each new knowledge/contexts/<bc>/README.md + knowledge/contexts/<bc>/INDEX.md, every foundation task file (decision / walking-skeleton spike / styleguide) plus every BC's INDEX.md any capture/index-add call named in changed (including a BC's INDEX that already existed before this session), .agentheim/knowledge/index.md, any strategic ADR written this session, and .agentheim/board/protocol.md (from the "Protocol logging" log call's changed). Never -A / ., per references/commit-doctrine.md — scoped-commit refuses either outright.chore(<bc-or-global>): brainstorm <topic> — vision created | vision revised | vision extended
One commit for the session is fine — brainstorm produces one coherent foundation drop, not a stream of independent tasks. Runnable through the same env-free homedir→cache→semver-max bootstrap used above, targeting lib/scoped-commit.mjs's runScopedCommit instead of the task-lifecycle CLI's main — see modeling/SKILL.md's "Committing" section for the full one-liner.Do not commit the architect's foundation ADRs. As the architecture-foundation step already states, those ADR drafts ride in the Notes of their type: decision tasks and are committed later by work when each decision task is executed — never from brainstorm. Only the strategic ADRs (vision-level decisions made in the Socratic phase) are committed here.
If the project isn't a git repo, skip the commit silently — the working-tree-clean guarantee only applies under git.
At the end of a successful brainstorm:
.agentheim/knowledge/vision.md exists and is readable in under two minutes.agentheim/knowledge/context-map.md exists if warranted.agentheim/knowledge/contexts/<name>/README.md exists for each identified BC (frontend-bearing BCs note the styleguide-gate rule).agentheim/knowledge/contexts/<name>/INDEX.md (the knowledge half) exists for each identified BC (per-BC catalog, mostly empty at this point); its board/<name>/ sibling (the task half) is created by capture's empty-BC backfill the first time a task registers there.agentheim/knowledge/contexts/infrastructure/README.md exists unconditionally (unless the user explicitly skipped the foundation step), with the note that it owns globally-true infra concerns and BC-local infra stays in the originating BC.agentheim/knowledge/index.md exists with the BC list populated and global ADRs listed.agentheim/knowledge/decisions/ contains ADRs for any foundational strategic decisions made during the conversation (tech-foundation ADRs come later, via the decision tasks)type: decision task per area the architect surfaced — globally-true ones in board/infrastructure/todo/, BC-local ones in the originating BC's board/<bc>/todo/, each with the ADR draft in Notes (or "foundation skipped" noted in the protocol entry)type: spike walking-skeleton task in board/infrastructure/todo/, depending on every decision task — the project's first prototype lives heretype: feature styleguide task in board/design-system/todo/ (only if the vision implies any frontend), depending on the walking-skeleton.agentheim/board/protocol.md has a new entry at the top, including the foundation tasks emittedWhat SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/inquireAnswer a question about the codebase of an Agentheim-managed project — how a feature works, where something lives, what was decided and why, or whether something is built yet — by reading the project's own structure (the index, the bounded-context READMEs, the ADRs, the task boards) and verifying against the actual source. Read-only. Invoke it directly when you want a thorough, code-grounded answer that separates what's decided from what's actually implemented./modelingUse whenever the user wants to capture an idea, bug, feature request, refinement, or change to an existing bounded context — anything from "the button should be green" to "we need a whole new subscription subsystem". Also use when the user wants to refine existing backlog items or promote refined items to ready-to-work. Triggers on phrases like "I have an idea", "let's model this", "let's do some modeling", "capture this", "add this to the backlog", "refine the auth backlog", "promote X to todo", "we should also", "what if we added", "there's a bug", "change the color of", "the domain needs to handle". Creates task markdown files in the appropriate bounded context with the right status, and can spawn deeper modeling sessions via the orchestrator. Supports six switchable conversational modes (Interrogator [default], Suggestor, Challenger, Storyteller, Facilitator, Synthesizer) during CAPTURE and REFINE — see references/modes.md./quick-captureUse whenever the user wants to dump an idea, bug, or feature into the backlog FAST — no conversation, no questions, no refinement. This is the quick-jot entry point: the user is offloading a thought and wants to keep moving, not think it through. Triggers on phrases like "capture this", "jot this down", "quick capture", "note for later", "dump this in the backlog", "just file it", "add this without discussing", "brain-dump", "stick this in <bc>", "log this idea", "don't ask, just record it", and on rapid-fire multi-idea lists ("three things: A, B, C"). Routes each idea to the best-fit bounded context, writes one backlog task per idea, and reports where each landed in a single line — then gets out of the way. If the user instead wants to think an idea through, refine it, or talk it over, that's `modeling`, not this. Quick-capture never asks clarifying questions and never writes to todo — captured tasks are deliberately raw and always need a later refinement pass./researchUse whenever the user or another skill needs external information gathered from the web — state of the art on a topic, comparison of approaches, documentation for a library, domain knowledge from outside the codebase. Triggers on phrases like "research X", "find out about", "what's the state of the art for", "look up how others do", "compare options for", "gather info on", and also triggers internally when brainstorm or model hits an "I don't know enough" wall. Produces a research report in .agentheim/knowledge/research/ that can be referenced from tasks, ADRs, and modeling sessions. Every report passes through a fresh-context `research-reviewer` agent (see `skills/research-review/SKILL.md`) that re-verifies its checkable claims against primary sources before the report is citable./research-reviewUse whenever the `research` skill is about to ship a researcher's report — between the researcher's return and the report being treated as citable knowledge. Triggers internally from `research`'s post-write gate. Spawns the `research-reviewer` agent with fresh context (no exposure to the researcher's reasoning) to re-verify the report's decision-critical checkable claims against primary sources and either PASS, FAIL with re-dispatch, or label the survivors unverified. Doctrine document; the operational steps live in `research`'s flow./test-driven-developmentUse whenever a worker is about to implement a task with observable behavior — features, bug fixes, refactors that should preserve behavior, any change with acceptance criteria you could turn into an assertion. Triggers internally from the `worker` agent at the start of its third action ("do the work"), and externally when the user invokes it explicitly ("do this TDD-style", "red-green-refactor this task"). Doctrine document; readable by humans and consumed by the worker as its execution discipline.npx claudepluginhub heimeshoff/agentheim --plugin agentheimOther plugins' skills for the same job