Util Project Init — CO2 Brainstorm Session Setup
Bootstrap a new CO2 project by validating a user-authored brainstorming session document
and setting up the brainstorm kit around it. A one-shot generation from a one-paragraph brief
produces shallow, guessed context; the brainstorm loop instead converges the context round by
round — the agent drafts, asks focused questions, the user answers in the document, and the
drafts improve until the user locks them.
The brainstorm produces the complete CO2 project context tree:
- Phase A — root
CLAUDE.md (apps, modules, bounded contexts, App Codes, App × Module matrix)
- Phase B — one
PRD.md per custom application (versioned User Stories / NFRs / Constraints /
References / Tests)
DEVTOOL.md and ENVIRONMENT.md are NOT produced by the brainstorm — they come later
(util-preparek8senv and per-developer setup). Once the brainstorm session is CLOSED, downstream
skills (util-projectsync, modelgen-*, mockgen-*, specgen-*, testgen-*, conductor-*)
take over.
This skill validates and sets up the kit only. It never creates or edits the session
document, and it never runs the brainstorm loop itself — the user authors the session
document from the template beforehand and manually runs /brainstorm-loop when ready.
The Kit
The session document is the input — hand-authored by the user from
reference/brainstorm-template-appdev.md. Three supporting files are copied from this skill's
reference/ folder:
| File |
Copied to |
Role |
<topic>.brainstorm.md |
— (input — hand-authored by the user from brainstorm-template-appdev.md) |
The session document the user fills in and the loop iterates on — validated by this skill, never created or edited by it |
brainstorm-protocol.md |
<project-root>/brainstorm-protocol.md |
Shared static protocol (state machine, turn rules) — never edited during sessions |
co2-context-generation-guide.md |
<project-root>/co2-context-generation-guide.md |
Artifact rules the agent follows when drafting CLAUDE.md and PRD.md — referenced from the session document |
brainstorm-loop.md |
<project-root>/.claude/commands/brainstorm-loop.md (only if the command is not already available) |
The /brainstorm-loop slash command — the polling watch loop |
Plugin note: when this skill is installed as part of the co2-skills plugin, the
/brainstorm-loop command ships with the plugin (commands/brainstorm-loop.md) and is already
available — the project-local copy is a fallback for setups where the skill files were copied
manually into .claude/skills/.
Generated at runtime by the loop (never created by this skill):
<project-root>/.brainstorm-loop-status.md — the live dashboard + compaction advisory.
Input Resolution
/util-projectinit <path-to-topic.brainstorm.md>
| Argument |
Required |
Example |
Description |
<session-file> |
Yes |
recruitment-hub.brainstorm.md |
Path to an EXISTING session document authored by the user from brainstorm-template-appdev.md. Free-form idea text or topic slugs are NOT accepted. |
Argument Rules
The argument is mandatory, must be a path whose filename ends in .brainstorm.md, and
must point to an existing file.
If the argument is omitted, is not a .brainstorm.md path, or the file does not exist →
stop and print the block below, substituting <template-path> with the resolved
absolute path of reference/brainstorm-template-appdev.md inside this skill's folder:
## util-projectinit — session document required
This skill takes exactly one argument: the path to an existing
<topic>.brainstorm.md authored from the CO2 template. Free-form prompts
or idea text are not accepted.
To create one:
1. Copy the template
<template-path>
to your project root as <topic>.brainstorm.md
(topic = short kebab-case slug, e.g. recruitment-hub.brainstorm.md)
2. Fill in the human-owned parts:
- frontmatter: session_id (<topic>-co2-context), title, created (today, YYYY-MM-DD)
- # Context: describe your application idea
- ## References: optional style-reference files (relative paths; keep the `./co2-context-generation-guide.md` line)
- # Output Specification: confirm destination (default ./)
Leave untouched: state, current_round, protocol_version, # Objective,
# Status, # Question, # Output, # Feedback.
3. Re-run: /util-projectinit <topic>.brainstorm.md
Never create the session document on the user's behalf — not even a template copy.
Validation
Read the session document and check it against reference/brainstorm-template-appdev.md.
Validation is read-only and strict: if ANY check fails, print the validation report
(format below) listing EVERY failed check with expected vs. found, and stop — do not set
up the kit. Never edit the session document; the user fixes it and re-runs.
| # |
Check |
Rule |
| V1 |
Frontmatter |
YAML frontmatter present with doc_type: ai-brainstorm-session |
| V2 |
session_id |
Set, contains no CHANGE-ME, is kebab-case, ends with -co2-context, and its <topic> part matches the filename (<topic>.brainstorm.md) |
| V3 |
title |
Set, contains no CHANGE ME and no <Project Name> placeholder |
| V4 |
created |
A real YYYY-MM-DD date (not the <YYYY-MM-DD> placeholder) |
| V5 |
state / current_round |
Requires state: NEW and current_round: 0; if state instead holds a recognized in-progress/finished value (AWAITING_HUMAN, AWAITING_AGENT, ERROR, CLOSED), reject with "this session is already in progress — resume it with /brainstorm-loop instead"; if the fields are missing or hold an unrecognized value, report a plain expected-vs-found row instead |
| V6 |
protocol_version |
Exactly "2.0" |
| V7 |
Sections |
All template sections present: # Objective, # Context (with ## References), # Output Specification, # Status, # Question, # Output, # Feedback |
| V8 |
# Context filled |
The [DESCRIBE YOUR APPLICATION IDEA HERE] placeholder is gone and the section contains non-empty prose |
| V9 |
Guide reference |
## References still lists ./co2-context-generation-guide.md |
| V10 |
Output Specification |
format is co2-tree and destination is set |
| V11 |
# Status table |
Exactly the template's single row 0: `Session completion |
| V12 |
Agent-owned sections |
# Question, # Output and # Feedback bodies are empty (HTML comments allowed) |
Validation report format
## Session Document Validation FAILED — <file>
| # | Check | Expected | Found |
|---|-------|----------|-------|
| V4 | created date | real YYYY-MM-DD | <YYYY-MM-DD> (placeholder) |
| V8 | # Context filled | idea prose | [DESCRIBE YOUR APPLICATION IDEA HERE] |
Fix the items above in <file> and re-run:
/util-projectinit <file>
(This skill never edits your session document.)
Pre-Flight Checks
Inspect the project root (the folder where Claude Code was launched) before writing anything.
The skill is non-destructive — it never overwrites any existing file:
| Condition |
Action |
Another *.brainstorm.md with session_id: *-co2-context exists (besides the input file) and is not state: CLOSED |
Warn: a CO2 context session is already in progress; ask whether to set up this second session anyway or resume the existing one with /brainstorm-loop. |
CLAUDE.md exists at the project root |
Warn: the project looks already initialized. The brainstorm's destination will overwrite CLAUDE.md draft-by-draft once the loop runs. Since this skill never edits the session document, advise the user to change the session's destination to ./output/<project-code-lower>/ themselves and re-run if they want to keep the current CLAUDE.md untouched. Confirm before proceeding with destination: ./. |
brainstorm-protocol.md / co2-context-generation-guide.md exist |
Skip copying that file (log "already present"). |
.claude/commands/brainstorm-loop.md exists |
Skip the command copy. |
Workflow
1. Validate the session document
Run the full V1–V12 validation above. On any failure: print the validation report and stop.
Only continue to the setup steps below on a clean pass.
2. Ensure the /brainstorm-loop command is available
- If running as the
co2-skills plugin, the command is already installed with the plugin —
nothing to do.
- Otherwise (or when unsure), copy
reference/brainstorm-loop.md from this skill's folder to
<project-root>/.claude/commands/brainstorm-loop.md (create the .claude/commands/ folder if
needed). Do not modify the file content.
- Remind the user in the final instructions: if
/brainstorm-loop is not recognized, restart the
Claude Code session so newly added commands are picked up.
3. Copy the protocol and the generation guide to the project root
Copy verbatim from this skill's reference/ folder:
brainstorm-protocol.md → <project-root>/brainstorm-protocol.md
co2-context-generation-guide.md → <project-root>/co2-context-generation-guide.md
Both must sit at the scan root (the project root): the loop reads the protocol from there,
and the session document references the guide as ./co2-context-generation-guide.md.
4. Recommend permission pre-approval (Claude Code CLI)
The watch loop's blocking poll uses find, sleep, md5sum and sort via Bash. An unanswered
permission prompt silently pauses the loop while the user thinks it is watching. Tell the
user to either:
- choose "Yes, and don't ask again" on the first permission prompt after starting the loop, or
- pre-approve in
<project-root>/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(find:*)",
"Bash(sleep:*)",
"Bash(md5sum:*)",
"Bash(sort:*)"
]
}
}
If the user asks the skill to do it, merge these entries into the existing
.claude/settings.json (or .claude/settings.local.json if the user prefers not to commit
them) without removing anything already there.
5. Print the instruction block
End with a single instruction block. This is the hand-off — the skill stops here and the user
drives the rest from the Claude Code CLI:
## Brainstorm Session Ready
### Files set up
| File | Status |
|------|--------|
| <topic>.brainstorm.md | Validated — YOUR session document (V1–V12 passed) |
| brainstorm-protocol.md | Copied |
| co2-context-generation-guide.md | Copied |
| .claude/commands/brainstorm-loop.md | Copied | (or "Provided by co2-skills plugin")
### Next steps (manual)
1. VERIFY the session document <topic>.brainstorm.md one last time in your editor:
- `# Context` — your application idea is stated the way you want it; the
agent probes for the rest round by round.
- `## References` — style-reference files (an existing CLAUDE.md or PRD.md)
are listed as relative paths, if you want them used.
- `# Output Specification` — `destination` is where you want the context
tree drafted (default `./` = this project root).
- Do NOT touch `state`, `current_round`, `# Status`, `# Question`, `# Output`.
2. START the loop in this Claude Code session:
/brainstorm-loop
(add the folder as an argument if your session file lives elsewhere:
`/brainstorm-loop <scan-root>`). If the command is not recognized, restart
Claude Code and run it again.
3. ITERATE — each round:
- The agent drafts CLAUDE.md/PRD.md to the destination and appends numbered
questions under `# Question > ## Round N`.
- Answer under each `### Answer X` (unanswered = "agent's judgment"), save as
often as you like — saves alone never trigger the agent.
- COMMIT your turn by flipping exactly ONE row in the `# Status` table:
keep iterating → set `Round N answers and feedback` to COMPLETED
finish → set `Session completion` (row 0) to COMPLETED
- The agent wakes within ~60 s of the flip.
4. WATCH `.brainstorm-loop-status.md` (the live dashboard):
- `compact_advice: RECOMMENDED/REQUIRED` → at your next pause run /compact,
then /brainstorm-loop again. Nothing is lost — the documents are the database.
5. WHEN CLOSED — the CO2 context tree (CLAUDE.md + per-app PRD.md) is at the
destination. Continue the CO2 workflow:
- /util-projectsync → scaffold app folders, PRD.md/BUG.md reconciliation
- /conductor-feature-prepare → models, mockups, specifications, test specs
Adapt the block to what actually happened (files skipped because they existed, plugin-provided
command).
Important Rules
- Validate-only for the session document. Never create, copy, template-fill, or edit
<topic>.brainstorm.md — not to fix a placeholder, not to correct a date, not even when the
user asks during setup. On any validation failure, report and stop; the user edits the file.
- Setup only — never run the loop. Always end by instructing the user to run
/brainstorm-loop manually.
- Non-destructive. Never overwrite an existing
brainstorm-protocol.md,
co2-context-generation-guide.md, or .claude/commands/brainstorm-loop.md. Skip and report.
- Copy verbatim. The protocol, guide, and command files are copied byte-for-byte from
reference/ — never edited, summarized, or "improved" during setup.
- One session document per topic. Multiple independent sessions are allowed (the protocol
isolates them), but warn before setting up a second
*-co2-context session for the same
project.
- The session document is fully human-owned. This skill reads it for validation and
nothing more. It never pre-answers questions, never adds rounds, never touches the Status
table.
- Claude Code CLI is the interaction surface. Instructions must be terminal-friendly: the
loop runs inside the live session (no headless
claude -p), the user edits the session file in
a separate editor while the loop watches, and permission prompts appear in the terminal — an
unanswered one silently pauses the loop (hence the pre-approval step).
- Do not create per-application folders, DEVTOOL.md, ENVIRONMENT.md, or K8s manifests. The
brainstorm produces CLAUDE.md + PRD.md; folder scaffolding is
util-projectsync's job and
environment expansion is util-preparek8senv's job.
Reference Files
| File |
Read when |
reference/brainstorm-setup-guide.md |
For the full end-to-end walkthrough (setup, iteration cycle, compaction, troubleshooting) — use it to answer any user question about how the loop works |
reference/brainstorm-protocol.md |
To answer questions about the state machine, turn rules, or error handling |
reference/brainstorm-template-appdev.md |
The template users copy manually to author their session document — also the validation baseline for V1–V12 |
reference/co2-context-generation-guide.md |
The artifact rules the loop's agent follows (Phase A/B, probing checklists, CLAUDE.md/PRD.md content rules) |
reference/brainstorm-loop.md |
The /brainstorm-loop command source |
1---2name: util-projectinit3description: Initialize a new CO2 project by validating a hand-authored brainstorm session document and setting up the file-based, turn-based BRAINSTORMING session kit around it. The ONLY valid input is the path to an EXISTING `<topic>.brainstorm.md` file the user authored from the CO2 application-development template (`brainstorm-template-appdev.md`) — free-form prompts, idea text or topic slugs are NOT accepted. The skill strictly validates the session document against the template, rejecting with a report on any deviation — it never creates or edits the session document. On a clean pass it scaffolds the rest of the brainstorm kit in the project folder: the shared `brainstorm-protocol.md`, the `co2-context-generation-guide.md` artifact rules, and the `/brainstorm-loop` slash command. The user then manually runs `/brainstorm-loop` — an iterative, token-efficient loop that converges the root `CLAUDE.md` (Phase A) and every application's `PRD.md` (Phase B) round by round. This skill seeds the project — it is the first skil4---56# Util Project Init — CO2 Brainstorm Session Setup78Bootstrap a new CO2 project by validating a **user-authored brainstorming session document**9and setting up the brainstorm kit around it. A one-shot generation from a one-paragraph brief10produces shallow, guessed context; the brainstorm loop instead converges the context **round by11round** — the agent drafts, asks focused questions, the user answers in the document, and the12drafts improve until the user locks them.1314The brainstorm produces the complete CO2 project context tree:1516- **Phase A** — root `CLAUDE.md` (apps, modules, bounded contexts, App Codes, App × Module matrix)17- **Phase B** — one `PRD.md` per custom application (versioned User Stories / NFRs / Constraints /18 References / Tests)1920`DEVTOOL.md` and `ENVIRONMENT.md` are NOT produced by the brainstorm — they come later21(`util-preparek8senv` and per-developer setup). Once the brainstorm session is CLOSED, downstream22skills (`util-projectsync`, `modelgen-*`, `mockgen-*`, `specgen-*`, `testgen-*`, `conductor-*`)23take over.2425**This skill validates and sets up the kit only. It never creates or edits the session26document, and it never runs the brainstorm loop itself** — the user authors the session27document from the template beforehand and manually runs `/brainstorm-loop` when ready.2829## The Kit3031The session document is the **input** — hand-authored by the user from32`reference/brainstorm-template-appdev.md`. Three supporting files are copied from this skill's33`reference/` folder:3435| File | Copied to | Role |36|------|-----------|------|37| `<topic>.brainstorm.md` | — (input — hand-authored by the user from `brainstorm-template-appdev.md`) | The session document the user fills in and the loop iterates on — validated by this skill, never created or edited by it |38| `brainstorm-protocol.md` | `<project-root>/brainstorm-protocol.md` | Shared static protocol (state machine, turn rules) — never edited during sessions |39| `co2-context-generation-guide.md` | `<project-root>/co2-context-generation-guide.md` | Artifact rules the agent follows when drafting CLAUDE.md and PRD.md — referenced from the session document |40| `brainstorm-loop.md` | `<project-root>/.claude/commands/brainstorm-loop.md` (only if the command is not already available) | The `/brainstorm-loop` slash command — the polling watch loop |4142> **Plugin note:** when this skill is installed as part of the `co2-skills` plugin, the43> `/brainstorm-loop` command ships with the plugin (`commands/brainstorm-loop.md`) and is already44> available — the project-local copy is a fallback for setups where the skill files were copied45> manually into `.claude/skills/`.4647Generated at runtime by the loop (never created by this skill):48`<project-root>/.brainstorm-loop-status.md` — the live dashboard + compaction advisory.4950## Input Resolution5152```53/util-projectinit <path-to-topic.brainstorm.md>54```5556| Argument | Required | Example | Description |57|----------|----------|---------|-------------|58| `<session-file>` | **Yes** | `recruitment-hub.brainstorm.md` | Path to an EXISTING session document authored by the user from `brainstorm-template-appdev.md`. Free-form idea text or topic slugs are NOT accepted. |5960### Argument Rules61621. The argument is **mandatory**, must be a path whose filename ends in `.brainstorm.md`, and63 must point to an existing file.642. If the argument is omitted, is not a `.brainstorm.md` path, or the file does not exist →65 **stop** and print the block below, substituting `<template-path>` with the resolved66 absolute path of `reference/brainstorm-template-appdev.md` inside this skill's folder:6768 ```69 ## util-projectinit — session document required7071 This skill takes exactly one argument: the path to an existing72 <topic>.brainstorm.md authored from the CO2 template. Free-form prompts73 or idea text are not accepted.7475 To create one:76 1. Copy the template77 <template-path>78 to your project root as <topic>.brainstorm.md79 (topic = short kebab-case slug, e.g. recruitment-hub.brainstorm.md)80 2. Fill in the human-owned parts:81 - frontmatter: session_id (<topic>-co2-context), title, created (today, YYYY-MM-DD)82 - # Context: describe your application idea83 - ## References: optional style-reference files (relative paths; keep the `./co2-context-generation-guide.md` line)84 - # Output Specification: confirm destination (default ./)85 Leave untouched: state, current_round, protocol_version, # Objective,86 # Status, # Question, # Output, # Feedback.87 3. Re-run: /util-projectinit <topic>.brainstorm.md88 ```89903. **Never create the session document on the user's behalf** — not even a template copy.9192## Validation9394Read the session document and check it against `reference/brainstorm-template-appdev.md`.95Validation is **read-only and strict**: if ANY check fails, print the validation report96(format below) listing EVERY failed check with expected vs. found, and **stop** — do not set97up the kit. Never edit the session document; the user fixes it and re-runs.9899| # | Check | Rule |100|---|-------|------|101| V1 | Frontmatter | YAML frontmatter present with `doc_type: ai-brainstorm-session` |102| V2 | `session_id` | Set, contains no `CHANGE-ME`, is kebab-case, ends with `-co2-context`, and its `<topic>` part matches the filename (`<topic>.brainstorm.md`) |103| V3 | `title` | Set, contains no `CHANGE ME` and no `<Project Name>` placeholder |104| V4 | `created` | A real `YYYY-MM-DD` date (not the `<YYYY-MM-DD>` placeholder) |105| V5 | `state` / `current_round` | Requires `state: NEW` and `current_round: 0`; if `state` instead holds a recognized in-progress/finished value (`AWAITING_HUMAN`, `AWAITING_AGENT`, `ERROR`, `CLOSED`), reject with *"this session is already in progress — resume it with `/brainstorm-loop` instead"*; if the fields are missing or hold an unrecognized value, report a plain expected-vs-found row instead |106| V6 | `protocol_version` | Exactly `"2.0"` |107| V7 | Sections | All template sections present: `# Objective`, `# Context` (with `## References`), `# Output Specification`, `# Status`, `# Question`, `# Output`, `# Feedback` |108| V8 | `# Context` filled | The `[DESCRIBE YOUR APPLICATION IDEA HERE]` placeholder is gone and the section contains non-empty prose |109| V9 | Guide reference | `## References` still lists `./co2-context-generation-guide.md` |110| V10 | Output Specification | `format` is `co2-tree` and `destination` is set |111| V11 | `# Status` table | Exactly the template's single row 0: `Session completion | Human | PENDING` |112| V12 | Agent-owned sections | `# Question`, `# Output` and `# Feedback` bodies are empty (HTML comments allowed) |113114### Validation report format115116```117## Session Document Validation FAILED — <file>118119| # | Check | Expected | Found |120|---|-------|----------|-------|121| V4 | created date | real YYYY-MM-DD | <YYYY-MM-DD> (placeholder) |122| V8 | # Context filled | idea prose | [DESCRIBE YOUR APPLICATION IDEA HERE] |123124Fix the items above in <file> and re-run:125 /util-projectinit <file>126(This skill never edits your session document.)127```128129## Pre-Flight Checks130131Inspect the project root (the folder where Claude Code was launched) before writing anything.132The skill is **non-destructive** — it never overwrites any existing file:133134| Condition | Action |135|-----------|--------|136| Another `*.brainstorm.md` with `session_id: *-co2-context` exists (besides the input file) and is not `state: CLOSED` | Warn: a CO2 context session is already in progress; ask whether to set up this second session anyway or resume the existing one with `/brainstorm-loop`. |137| `CLAUDE.md` exists at the project root | Warn: the project looks already initialized. The brainstorm's destination will **overwrite CLAUDE.md draft-by-draft** once the loop runs. Since this skill never edits the session document, advise the user to change the session's `destination` to `./output/<project-code-lower>/` themselves and re-run if they want to keep the current CLAUDE.md untouched. Confirm before proceeding with `destination: ./`. |138| `brainstorm-protocol.md` / `co2-context-generation-guide.md` exist | Skip copying that file (log "already present"). |139| `.claude/commands/brainstorm-loop.md` exists | Skip the command copy. |140141## Workflow142143### 1. Validate the session document144145Run the full V1–V12 validation above. On any failure: print the validation report and stop.146Only continue to the setup steps below on a clean pass.147148### 2. Ensure the `/brainstorm-loop` command is available1491501. If running as the `co2-skills` plugin, the command is already installed with the plugin —151 nothing to do.1522. Otherwise (or when unsure), copy `reference/brainstorm-loop.md` from this skill's folder to153 `<project-root>/.claude/commands/brainstorm-loop.md` (create the `.claude/commands/` folder if154 needed). Do not modify the file content.1553. Remind the user in the final instructions: if `/brainstorm-loop` is not recognized, restart the156 Claude Code session so newly added commands are picked up.157158### 3. Copy the protocol and the generation guide to the project root159160Copy verbatim from this skill's `reference/` folder:161162- `brainstorm-protocol.md` → `<project-root>/brainstorm-protocol.md`163- `co2-context-generation-guide.md` → `<project-root>/co2-context-generation-guide.md`164165Both must sit at the **scan root** (the project root): the loop reads the protocol from there,166and the session document references the guide as `./co2-context-generation-guide.md`.167168### 4. Recommend permission pre-approval (Claude Code CLI)169170The watch loop's blocking poll uses `find`, `sleep`, `md5sum` and `sort` via Bash. An unanswered171permission prompt **silently pauses the loop** while the user thinks it is watching. Tell the172user to either:173174- choose **"Yes, and don't ask again"** on the first permission prompt after starting the loop, or175- pre-approve in `<project-root>/.claude/settings.json`:176177```json178{179 "permissions": {180 "allow": [181 "Bash(find:*)",182 "Bash(sleep:*)",183 "Bash(md5sum:*)",184 "Bash(sort:*)"185 ]186 }187}188```189190If the user asks the skill to do it, merge these entries into the existing191`.claude/settings.json` (or `.claude/settings.local.json` if the user prefers not to commit192them) without removing anything already there.193194### 5. Print the instruction block195196End with a single instruction block. This is the hand-off — the skill stops here and the user197drives the rest from the Claude Code CLI:198199```200## Brainstorm Session Ready201202### Files set up203| File | Status |204|------|--------|205| <topic>.brainstorm.md | Validated — YOUR session document (V1–V12 passed) |206| brainstorm-protocol.md | Copied |207| co2-context-generation-guide.md | Copied |208| .claude/commands/brainstorm-loop.md | Copied | (or "Provided by co2-skills plugin")209210### Next steps (manual)2112121. VERIFY the session document <topic>.brainstorm.md one last time in your editor:213 - `# Context` — your application idea is stated the way you want it; the214 agent probes for the rest round by round.215 - `## References` — style-reference files (an existing CLAUDE.md or PRD.md)216 are listed as relative paths, if you want them used.217 - `# Output Specification` — `destination` is where you want the context218 tree drafted (default `./` = this project root).219 - Do NOT touch `state`, `current_round`, `# Status`, `# Question`, `# Output`.2202212. START the loop in this Claude Code session:222223 /brainstorm-loop224225 (add the folder as an argument if your session file lives elsewhere:226 `/brainstorm-loop <scan-root>`). If the command is not recognized, restart227 Claude Code and run it again.2282293. ITERATE — each round:230 - The agent drafts CLAUDE.md/PRD.md to the destination and appends numbered231 questions under `# Question > ## Round N`.232 - Answer under each `### Answer X` (unanswered = "agent's judgment"), save as233 often as you like — saves alone never trigger the agent.234 - COMMIT your turn by flipping exactly ONE row in the `# Status` table:235 keep iterating → set `Round N answers and feedback` to COMPLETED236 finish → set `Session completion` (row 0) to COMPLETED237 - The agent wakes within ~60 s of the flip.2382394. WATCH `.brainstorm-loop-status.md` (the live dashboard):240 - `compact_advice: RECOMMENDED/REQUIRED` → at your next pause run /compact,241 then /brainstorm-loop again. Nothing is lost — the documents are the database.2422435. WHEN CLOSED — the CO2 context tree (CLAUDE.md + per-app PRD.md) is at the244 destination. Continue the CO2 workflow:245 - /util-projectsync → scaffold app folders, PRD.md/BUG.md reconciliation246 - /conductor-feature-prepare → models, mockups, specifications, test specs247```248249Adapt the block to what actually happened (files skipped because they existed, plugin-provided250command).251252## Important Rules253254- **Validate-only for the session document.** Never create, copy, template-fill, or edit255 `<topic>.brainstorm.md` — not to fix a placeholder, not to correct a date, not even when the256 user asks during setup. On any validation failure, report and stop; the user edits the file.257- **Setup only — never run the loop.** Always end by instructing the user to run258 `/brainstorm-loop` manually.259- **Non-destructive.** Never overwrite an existing `brainstorm-protocol.md`,260 `co2-context-generation-guide.md`, or `.claude/commands/brainstorm-loop.md`. Skip and report.261- **Copy verbatim.** The protocol, guide, and command files are copied byte-for-byte from262 `reference/` — never edited, summarized, or "improved" during setup.263- **One session document per topic.** Multiple independent sessions are allowed (the protocol264 isolates them), but warn before setting up a second `*-co2-context` session for the same265 project.266- **The session document is fully human-owned.** This skill reads it for validation and267 nothing more. It never pre-answers questions, never adds rounds, never touches the Status268 table.269- **Claude Code CLI is the interaction surface.** Instructions must be terminal-friendly: the270 loop runs inside the live session (no headless `claude -p`), the user edits the session file in271 a separate editor while the loop watches, and permission prompts appear in the terminal — an272 unanswered one silently pauses the loop (hence the pre-approval step).273- **Do not create per-application folders, DEVTOOL.md, ENVIRONMENT.md, or K8s manifests.** The274 brainstorm produces CLAUDE.md + PRD.md; folder scaffolding is `util-projectsync`'s job and275 environment expansion is `util-preparek8senv`'s job.276277## Reference Files278279| File | Read when |280|------|-----------|281| `reference/brainstorm-setup-guide.md` | For the full end-to-end walkthrough (setup, iteration cycle, compaction, troubleshooting) — use it to answer any user question about how the loop works |282| `reference/brainstorm-protocol.md` | To answer questions about the state machine, turn rules, or error handling |283| `reference/brainstorm-template-appdev.md` | The template users copy manually to author their session document — also the validation baseline for V1–V12 |284| `reference/co2-context-generation-guide.md` | The artifact rules the loop's agent follows (Phase A/B, probing checklists, CLAUDE.md/PRD.md content rules) |285| `reference/brainstorm-loop.md` | The `/brainstorm-loop` command source |