@rashidee/co2 1.2.5
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/dist/index.js +25449 -0
- package/drizzle/0000_remarkable_charles_xavier.sql +210 -0
- package/drizzle/0001_wise_wolf_cub.sql +13 -0
- package/drizzle/0002_secret_spyke.sql +16 -0
- package/drizzle/0003_workspace_config_singleton.sql +16 -0
- package/drizzle/0004_terminal_claim_v120.sql +11 -0
- package/drizzle/0005_brainstorm_v124.sql +10 -0
- package/drizzle/0006_project_v140.sql +6 -0
- package/drizzle/0007_prd_wizard_v124.sql +14 -0
- package/drizzle/0008_workflow_artifact_v126.sql +24 -0
- package/drizzle/0009_project_import_v150.sql +7 -0
- package/drizzle/0010_quality_v151.sql +3 -0
- package/drizzle/meta/0000_snapshot.json +1335 -0
- package/drizzle/meta/0001_snapshot.json +1416 -0
- package/drizzle/meta/0002_snapshot.json +1510 -0
- package/drizzle/meta/_journal.json +83 -0
- package/package.json +41 -0
- package/plugin/.claude-plugin/marketplace.json +36 -0
- package/plugin/.claude-plugin/plugin.json +22 -0
- package/plugin/README.md +625 -0
- package/plugin/SKILLS.md +350 -0
- package/plugin/co2.svg +5 -0
- package/plugin/commands/brainstorm-loop.md +129 -0
- package/plugin/skills/conductor-defect/SKILL.md +898 -0
- package/plugin/skills/conductor-feature-develop/SKILL.md +1383 -0
- package/plugin/skills/conductor-feature-develop/references/implementation-domain-template.md +131 -0
- package/plugin/skills/conductor-feature-develop/references/implementation-master-template.md +89 -0
- package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +224 -0
- package/plugin/skills/conductor-feature-prepare/SKILL.md +604 -0
- package/plugin/skills/depgen-k8s/SKILL.md +468 -0
- package/plugin/skills/depgen-k8s/references/dockerfile-laravel.md +197 -0
- package/plugin/skills/depgen-k8s/references/dockerfile-nodejs.md +163 -0
- package/plugin/skills/depgen-k8s/references/dockerfile-spring-boot.md +174 -0
- package/plugin/skills/depgen-k8s/references/k8s-patterns.md +869 -0
- package/plugin/skills/mockgen-shadcn/SKILL.md +1067 -0
- package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +1467 -0
- package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +498 -0
- package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +216 -0
- package/plugin/skills/mockgen-tailwind/SKILL.md +904 -0
- package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +720 -0
- package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +498 -0
- package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -0
- package/plugin/skills/modelgen-nosql/SKILL.md +617 -0
- package/plugin/skills/modelgen-nosql/references/model-extraction-methodology.md +497 -0
- package/plugin/skills/modelgen-nosql/references/nosql-design-guide.md +258 -0
- package/plugin/skills/modelgen-relational/SKILL.md +707 -0
- package/plugin/skills/modelgen-relational/references/model-extraction-methodology.md +499 -0
- package/plugin/skills/specgen-flutter-riverpod/SKILL.md +898 -0
- package/plugin/skills/specgen-flutter-riverpod/references/component-patterns.md +971 -0
- package/plugin/skills/specgen-flutter-riverpod/references/notification-patterns.md +457 -0
- package/plugin/skills/specgen-flutter-riverpod/references/routing-patterns.md +362 -0
- package/plugin/skills/specgen-flutter-riverpod/references/security-patterns.md +709 -0
- package/plugin/skills/specgen-flutter-riverpod/references/spec-template.md +1566 -0
- package/plugin/skills/specgen-flutter-riverpod/references/state-patterns.md +518 -0
- package/plugin/skills/specgen-flutter-riverpod/references/storage-patterns.md +370 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/SKILL.md +984 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/batch-patterns.md +359 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/messaging-patterns.md +468 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/modulith-patterns.md +461 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/reporting-patterns.md +803 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/security-patterns.md +501 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/spec-template.md +1268 -0
- package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/web-patterns.md +301 -0
- package/plugin/skills/specgen-node-cli-web/SKILL.md +561 -0
- package/plugin/skills/specgen-node-cli-web/references/auth-patterns.md +293 -0
- package/plugin/skills/specgen-node-cli-web/references/cli-packaging-patterns.md +250 -0
- package/plugin/skills/specgen-node-cli-web/references/server-patterns.md +247 -0
- package/plugin/skills/specgen-node-cli-web/references/spec-template.md +401 -0
- package/plugin/skills/specgen-node-cli-web/references/testing-patterns.md +174 -0
- package/plugin/skills/specgen-react-mui/SKILL.md +789 -0
- package/plugin/skills/specgen-react-mui/references/component-patterns.md +1077 -0
- package/plugin/skills/specgen-react-mui/references/reporting-patterns.md +1998 -0
- package/plugin/skills/specgen-react-mui/references/routing-patterns.md +461 -0
- package/plugin/skills/specgen-react-mui/references/security-patterns.md +599 -0
- package/plugin/skills/specgen-react-mui/references/spec-template.md +1030 -0
- package/plugin/skills/specgen-react-mui/references/state-patterns.md +327 -0
- package/plugin/skills/specgen-react-tailwind/SKILL.md +859 -0
- package/plugin/skills/specgen-react-tailwind/references/component-patterns.md +1212 -0
- package/plugin/skills/specgen-react-tailwind/references/reporting-patterns.md +1529 -0
- package/plugin/skills/specgen-react-tailwind/references/routing-patterns.md +669 -0
- package/plugin/skills/specgen-react-tailwind/references/security-patterns.md +656 -0
- package/plugin/skills/specgen-react-tailwind/references/spec-template.md +1237 -0
- package/plugin/skills/specgen-react-tailwind/references/state-patterns.md +327 -0
- package/plugin/skills/specgen-sdk-java/SKILL.md +933 -0
- package/plugin/skills/specgen-sdk-java/references/api-extraction-patterns.md +247 -0
- package/plugin/skills/specgen-sdk-java/references/http-client-patterns.md +495 -0
- package/plugin/skills/specgen-sdk-java/references/packaging-patterns.md +366 -0
- package/plugin/skills/specgen-sdk-java/references/spec-template.md +956 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/SKILL.md +1284 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/batch-patterns.md +1224 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/jasper-patterns.md +1638 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/messaging-patterns.md +512 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/modulith-patterns.md +354 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/security-patterns.md +551 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/spec-template.md +2502 -0
- package/plugin/skills/specgen-spring-jpa-jtehtmx/references/web-patterns.md +503 -0
- package/plugin/skills/specgen-spring-jpa-restapi/SKILL.md +990 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/batch-patterns.md +1224 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/messaging-patterns.md +512 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/modulith-patterns.md +279 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/reporting-patterns.md +1536 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/restapi-patterns.md +722 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/security-patterns.md +351 -0
- package/plugin/skills/specgen-spring-jpa-restapi/references/spec-template.md +553 -0
- package/plugin/skills/specgen-ts-cli/SKILL.md +861 -0
- package/plugin/skills/specgen-ts-cli/references/async-patterns.md +1101 -0
- package/plugin/skills/specgen-ts-cli/references/command-patterns.md +383 -0
- package/plugin/skills/specgen-ts-cli/references/config-patterns.md +430 -0
- package/plugin/skills/specgen-ts-cli/references/database-patterns.md +750 -0
- package/plugin/skills/specgen-ts-cli/references/packaging-patterns.md +426 -0
- package/plugin/skills/specgen-ts-cli/references/spec-template.md +1391 -0
- package/plugin/skills/specgen-ts-cli/references/testing-patterns.md +909 -0
- package/plugin/skills/testgen-functional/SKILL.md +1381 -0
- package/plugin/skills/tracegen-matrix/SKILL.md +243 -0
- package/plugin/skills/util-preparek8senv/SKILL.md +422 -0
- package/plugin/skills/util-projectinit/SKILL.md +307 -0
- package/plugin/skills/util-projectinit/reference/brainstorm-loop.md +129 -0
- package/plugin/skills/util-projectinit/reference/brainstorm-protocol.md +144 -0
- package/plugin/skills/util-projectinit/reference/brainstorm-setup-guide.md +153 -0
- package/plugin/skills/util-projectinit/reference/brainstorm-template-appdev.md +87 -0
- package/plugin/skills/util-projectinit/reference/co2-context-generation-guide.md +761 -0
- package/plugin/skills/util-projectsync/SKILL.md +501 -0
- package/plugin/skills/util-updprd/SKILL.md +324 -0
- package/plugin/skills/util-usanalyzer/SKILL.md +307 -0
- package/plugin/skills/util-ustagger/SKILL.md +154 -0
- package/static/assets/abnfDiagram-VRR7QNED-DvPuwyCV.js +1 -0
- package/static/assets/arc-DRKw7sjs.js +1 -0
- package/static/assets/architectureDiagram-ZJ3FMSHR-CaNcxUbC.js +36 -0
- package/static/assets/blockDiagram-677ZJIJ3-Demd4AOK.js +132 -0
- package/static/assets/c4Diagram-LMCZKHZV-PVKUfc2x.js +10 -0
- package/static/assets/channel-C2nVbuwv.js +1 -0
- package/static/assets/chunk-2Q5K7J3B-CExf8ww_.js +1 -0
- package/static/assets/chunk-32BRIVSS-CFPaoONF.js +1 -0
- package/static/assets/chunk-5VM5RSS4-DE2esM67.js +15 -0
- package/static/assets/chunk-EX3LRPZG-SON_YdDG.js +231 -0
- package/static/assets/chunk-JWPE2WC7-Qxah8LNr.js +1 -0
- package/static/assets/chunk-MOJQB5TN-BcWGQV3j.js +88 -0
- package/static/assets/chunk-RYQCIY6F-DkDj-OR5.js +1 -0
- package/static/assets/chunk-V7JOEXUC-BlI1Mrah.js +206 -0
- package/static/assets/chunk-VR4S4FIN-Agf__duj.js +1 -0
- package/static/assets/chunk-XXDRQBXY-B5CfAh85.js +1 -0
- package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +1 -0
- package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +1 -0
- package/static/assets/cose-bilkent-JH36ORCC-DO0cQkcy.js +1 -0
- package/static/assets/cynefin-VYW2F7L2-CfOnsnXc.js +178 -0
- package/static/assets/cynefinDiagram-TSTJHNR4-BJ8tULAv.js +62 -0
- package/static/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
- package/static/assets/dagre-VKFMJZFB-DfjwzHqP.js +4 -0
- package/static/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/static/assets/diagram-FQU43EPY-CndSOIIM.js +3 -0
- package/static/assets/diagram-G47NLZAW-Czf5hN0Z.js +24 -0
- package/static/assets/diagram-NH7WQ7WH-COAyojGh.js +24 -0
- package/static/assets/diagram-OA4YK3LP-H8PoiN2m.js +30 -0
- package/static/assets/diagram-WEI45ONY-DzcaVzjp.js +41 -0
- package/static/assets/ebnfDiagram-CCIWWBDH-DPazGYLJ.js +1 -0
- package/static/assets/erDiagram-Q63AITRT-Bo-fubgF.js +85 -0
- package/static/assets/flowDiagram-23GEKE2U-CSvxUDwh.js +156 -0
- package/static/assets/ganttDiagram-NO4QXBWP-DnBveWX6.js +292 -0
- package/static/assets/gitGraphDiagram-IHSO6WYX-B3rVL8c-.js +106 -0
- package/static/assets/graph-C9eacEi8.js +1 -0
- package/static/assets/index-LZSQkLE2.css +41 -0
- package/static/assets/index-y7XDSgMG.js +495 -0
- package/static/assets/infoDiagram-FWYZ7A6U-CvWV9yy2.js +2 -0
- package/static/assets/init-Gi6I4Gst.js +1 -0
- package/static/assets/ishikawaDiagram-FXEZZL3T-DF28a1N6.js +70 -0
- package/static/assets/journeyDiagram-5HDEW3XC-CB6CugYk.js +139 -0
- package/static/assets/kanban-definition-HUTT4EX6-ResSLF6d.js +89 -0
- package/static/assets/katex-C5jXJg4s.js +257 -0
- package/static/assets/layout-DEXfKzaS.js +1 -0
- package/static/assets/linear-CLO--ryk.js +1 -0
- package/static/assets/map-Czzmt4hB.js +1 -0
- package/static/assets/mindmap-definition-LN4V7U3C-BvW3EbxX.js +96 -0
- package/static/assets/ordinal-Cboi1Yqb.js +1 -0
- package/static/assets/pegDiagram-2B236MQR-BHCgqrrM.js +1 -0
- package/static/assets/pieDiagram-ENE6RG2P-DVmCQ5FA.js +39 -0
- package/static/assets/quadrantDiagram-ABIIQ3AL-B3e5KR52.js +7 -0
- package/static/assets/railroadDiagram-RFXS5EU6-Csv5ysLc.js +1 -0
- package/static/assets/requirementDiagram-TGXJPOKE-DOMVzvnB.js +84 -0
- package/static/assets/sankeyDiagram-HTMAVEWB-B1dcTOvy.js +40 -0
- package/static/assets/sequenceDiagram-DBY2YBRQ-BY414yeO.js +162 -0
- package/static/assets/sizeCapture-X5ZJPWSS-CuJfrfBN.js +1 -0
- package/static/assets/stateDiagram-2N3HPSRC-FX4rJkzV.js +1 -0
- package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +1 -0
- package/static/assets/swimlanes-5IMT3BWC-Sfy58mmv.js +2 -0
- package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +8 -0
- package/static/assets/timeline-definition-FHXFAJF6-CmV7by8p.js +120 -0
- package/static/assets/vennDiagram-L72KCM5P-FqIyFZFt.js +34 -0
- package/static/assets/wardleyDiagram-EHGQE667-BZ06O45i.js +78 -0
- package/static/assets/xychartDiagram-FW5EYKEG-BOkffR06.js +7 -0
- package/static/index.html +24 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Brainstorm Session Loop — Complete Setup Guide
|
|
2
|
+
|
|
3
|
+
A file-based, turn-based brainstorming protocol between you (Human) and Claude Code
|
|
4
|
+
(AI Agent), running entirely inside your live Claude Code session — no headless
|
|
5
|
+
`claude -p` calls, no extra API token cost for idle waiting.
|
|
6
|
+
|
|
7
|
+
**The kit (3 files):**
|
|
8
|
+
|
|
9
|
+
| File | Role | Where it lives |
|
|
10
|
+
| ------------------------- | ----------------------------------------------- | ------------------------------------------- |
|
|
11
|
+
| `brainstorm-protocol.md` | Shared static protocol (rules, state machine) | Root of your scan folder |
|
|
12
|
+
| `TEMPLATE.brainstorm.md` | Scaffold copied for every new session | Anywhere handy |
|
|
13
|
+
| `brainstorm-loop.md` | The `/brainstorm-loop` slash command | `.claude/commands/` (project or `~/.claude/commands/` global) |
|
|
14
|
+
|
|
15
|
+
Generated at runtime by the agent (do not create manually):
|
|
16
|
+
`<scan-root>/.brainstorm-loop-status.md` — live dashboard + compaction advisory.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Part 1 — One-time setup
|
|
21
|
+
|
|
22
|
+
1. **Choose a scan root** — the folder the agent will scan recursively,
|
|
23
|
+
e.g. `~/projects/brainstorms/`. Subfolders are fine; each can hold different
|
|
24
|
+
topics/projects.
|
|
25
|
+
|
|
26
|
+
2. **Place `brainstorm-protocol.md` at the scan root.** It is never edited during
|
|
27
|
+
sessions.
|
|
28
|
+
|
|
29
|
+
3. **Install the slash command** — copy `brainstorm-loop.md` to:
|
|
30
|
+
- `<project>/.claude/commands/` → available in that project, or
|
|
31
|
+
- `~/.claude/commands/` → available in every Claude Code session.
|
|
32
|
+
|
|
33
|
+
4. **Pre-approve the bash patterns** the watcher needs (`find`, `sleep`, `md5sum`,
|
|
34
|
+
`sort`), either via "always allow" on first prompt or in
|
|
35
|
+
`.claude/settings.json` permissions. This matters: an unanswered permission
|
|
36
|
+
prompt silently pauses the loop while you think it's watching.
|
|
37
|
+
|
|
38
|
+
5. Keep `TEMPLATE.brainstorm.md` somewhere convenient for copying.
|
|
39
|
+
|
|
40
|
+
## Part 2 — Creating a session
|
|
41
|
+
|
|
42
|
+
6. Copy the template into the scan root (or any subfolder) and name it
|
|
43
|
+
`<topic>.brainstorm.md` — the `.brainstorm.md` suffix is the discovery
|
|
44
|
+
pre-filter.
|
|
45
|
+
|
|
46
|
+
7. Fill in the four human-owned parts:
|
|
47
|
+
- **Frontmatter**: `session_id` (unique slug) and `title`. Leave
|
|
48
|
+
`state: NEW` and `current_round: 0` untouched — the agent owns those.
|
|
49
|
+
- **# Objective**: what the session must produce.
|
|
50
|
+
- **# Context**: background and constraints; list any external input files
|
|
51
|
+
under `## References` (relative paths) — the agent reads them before Round 1.
|
|
52
|
+
- **# Output Specification**: `format` (`md-inline` / `md-file` / `xlsx` /
|
|
53
|
+
`docx` / `pptx`), `destination` path (unless md-inline), `versioning`
|
|
54
|
+
(`overwrite` / `timestamped`), and optional `structure` hints.
|
|
55
|
+
|
|
56
|
+
8. Save. Create as many session files as you want — each is fully independent;
|
|
57
|
+
the agent never lets one session's content influence another.
|
|
58
|
+
|
|
59
|
+
## Part 3 — Running the loop
|
|
60
|
+
|
|
61
|
+
9. In your Claude Code session, run:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/brainstorm-loop <scan-root>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
(or just `/brainstorm-loop` if Claude Code was launched from the scan root).
|
|
68
|
+
|
|
69
|
+
10. **Phase 1 (immediate)**: full scan. Every `state: NEW` session gets an initial
|
|
70
|
+
draft in `# Output` plus `## Round 1` questions. Sessions move to
|
|
71
|
+
`AWAITING_HUMAN`.
|
|
72
|
+
|
|
73
|
+
11. **Phase 2 (ongoing)**: the agent enters a token-efficient watch loop — a
|
|
74
|
+
blocking bash call polls file mtimes every 60 s and returns only on change
|
|
75
|
+
(or after ~9 min). Idle waiting costs essentially zero tokens. Default bound:
|
|
76
|
+
20 watch rounds ≈ 3 hours.
|
|
77
|
+
|
|
78
|
+
12. Keep two editor tabs open: your session file(s) and
|
|
79
|
+
`.brainstorm-loop-status.md` (the live dashboard).
|
|
80
|
+
|
|
81
|
+
## Part 4 — The iteration cycle (repeat per round)
|
|
82
|
+
|
|
83
|
+
13. Read the draft in `# Output` and the questions in the current `## Round N`.
|
|
84
|
+
|
|
85
|
+
14. Write answers under each `### Answer X`; optional notes under
|
|
86
|
+
`Feedback > Round N`. **Save as often as you like** — saves alone never
|
|
87
|
+
trigger the agent. Unanswered questions mean "agent's judgment".
|
|
88
|
+
|
|
89
|
+
15. **Commit your turn** by flipping exactly ONE status in the Status table:
|
|
90
|
+
- Continue iterating → `Round N answers and feedback` → `COMPLETED`
|
|
91
|
+
- Satisfied with output → `Session completion` (row 0) → `COMPLETED`
|
|
92
|
+
|
|
93
|
+
16. Within ~60 s the agent wakes, re-reads only changed files, and:
|
|
94
|
+
- **Continue**: overrides the `# Output` draft, appends `## Round N+1`
|
|
95
|
+
questions → back to step 13.
|
|
96
|
+
- **Complete**: renders the final artifact exactly per your Output
|
|
97
|
+
Specification, records its path under `Output > ## Final Artifact`, sets
|
|
98
|
+
`state: CLOSED`. Closed sessions cost zero tokens from then on.
|
|
99
|
+
|
|
100
|
+
How it decides: the Status table is the single source of truth. Row 0
|
|
101
|
+
(`Session completion = COMPLETED`) is checked FIRST — so final-round answers
|
|
102
|
+
written before/with the flip are incorporated into the final artifact rather
|
|
103
|
+
than triggering another round. Frontmatter `state` is only a scan cache /
|
|
104
|
+
processed-acknowledgment (`CLOSED` is the idempotency guard against
|
|
105
|
+
double-finalization).
|
|
106
|
+
|
|
107
|
+
## Part 5 — Context management (compaction)
|
|
108
|
+
|
|
109
|
+
17. Watch `compact_advice` in `.brainstorm-loop-status.md`:
|
|
110
|
+
- `OK` — keep working.
|
|
111
|
+
- `RECOMMENDED` — at your next natural pause: finish the current answer, flip
|
|
112
|
+
your status, let the agent's turn land, then run `/compact` followed by
|
|
113
|
+
`/brainstorm-loop` to resume.
|
|
114
|
+
- `REQUIRED` — the loop hit its watch-round bound and has stopped; run
|
|
115
|
+
`/compact` then `/brainstorm-loop`.
|
|
116
|
+
|
|
117
|
+
18. Why the manual pair beats relying on auto-compact: auto-compact fires exactly
|
|
118
|
+
when context grows — i.e., mid-action — and leaves the agent running on a
|
|
119
|
+
*summary* of its instructions. `/compact` + re-invoking `/brainstorm-loop`
|
|
120
|
+
compacts at a known-idle boundary AND reloads the verbatim command text.
|
|
121
|
+
Auto-compact is still SAFE (all state lives in the files; the command's
|
|
122
|
+
post-compaction rule forces a full rescan before any action) — just less
|
|
123
|
+
deterministic.
|
|
124
|
+
|
|
125
|
+
19. Nothing is ever lost across compaction, restarts, or closed terminals: the
|
|
126
|
+
documents are the database. Re-invoking `/brainstorm-loop` rebuilds everything
|
|
127
|
+
from Phase 1.
|
|
128
|
+
|
|
129
|
+
## Part 6 — Troubleshooting
|
|
130
|
+
|
|
131
|
+
- **Session stuck in `state: ERROR`** → open it, read the appended
|
|
132
|
+
`# Agent Notice`, fix the described issue, save. The agent re-checks it on the
|
|
133
|
+
next change detection and resumes if fixed.
|
|
134
|
+
- **Agent didn't react to your edit** → confirm you flipped a status in the table
|
|
135
|
+
(a content save alone is deliberately ignored), and that the file matches
|
|
136
|
+
`*.brainstorm.md` under the scan root.
|
|
137
|
+
- **Loop seems frozen** → check the terminal for a pending permission prompt
|
|
138
|
+
(see step 4), and check `watch_round` in the status file — the loop may simply
|
|
139
|
+
be mid-watch (up to 9 min between heartbeats is normal).
|
|
140
|
+
- **macOS/BSD** → the watcher snippet uses GNU `find -printf`; the command file
|
|
141
|
+
includes the `stat -f` substitution in its Portability note.
|
|
142
|
+
|
|
143
|
+
## Quick reference — who writes what
|
|
144
|
+
|
|
145
|
+
| Surface | Human | AI Agent |
|
|
146
|
+
| -------------------------------- | :---: | :------: |
|
|
147
|
+
| Objective / Context / Output Spec | ✔️ | — |
|
|
148
|
+
| Answers, Feedback | ✔️ | — |
|
|
149
|
+
| Status table flips | ✔️ | ✔️ (its own rows) |
|
|
150
|
+
| Question rounds, Output draft | — | ✔️ |
|
|
151
|
+
| Frontmatter `state` / `current_round` | — | ✔️ |
|
|
152
|
+
| `.brainstorm-loop-status.md` | — | ✔️ |
|
|
153
|
+
| Final artifact file | — | ✔️ |
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
doc_type: ai-brainstorm-session
|
|
3
|
+
session_id: CHANGE-ME-<project-code-lower>-co2-context
|
|
4
|
+
title: CHANGE ME — <Project Name> CO2 context generation
|
|
5
|
+
created: <YYYY-MM-DD>
|
|
6
|
+
state: NEW
|
|
7
|
+
current_round: 0
|
|
8
|
+
protocol_version: "2.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!-- CO2 application-idea session. Protocol: brainstorm-protocol.md at the scan
|
|
12
|
+
root. Artifact rules: co2-context-generation-guide.md (listed in References —
|
|
13
|
+
the agent MUST read it in full before Round 1). -->
|
|
14
|
+
|
|
15
|
+
# Objective
|
|
16
|
+
|
|
17
|
+
Brainstorm the application idea described in `# Context` and generate the complete
|
|
18
|
+
CO2 project context tree — a root `CLAUDE.md` plus one `PRD.md` per custom
|
|
19
|
+
application (`<app_folder>/context/PRD.md`) — following
|
|
20
|
+
`co2-context-generation-guide.md` exactly:
|
|
21
|
+
|
|
22
|
+
- **Phase A**: converge CLAUDE.md (apps, modules, bounded contexts, App Codes,
|
|
23
|
+
App × Module matrix) until I lock the inventory.
|
|
24
|
+
- **Phase B**: generate and refine every application's PRD.md
|
|
25
|
+
(modules → versioned User Stories / NFRs / Constraints / References / Tests),
|
|
26
|
+
where User Stories drive UI/UX, NFRs drive validation and business logic,
|
|
27
|
+
Constraints define scope, References support, and Tests define the test specs.
|
|
28
|
+
|
|
29
|
+
Drafts are written directly to the destination tree every round; the `Output`
|
|
30
|
+
section below holds only the dashboard (phase, inventory, matrix, TODO ledger,
|
|
31
|
+
round diff).
|
|
32
|
+
|
|
33
|
+
# Context
|
|
34
|
+
|
|
35
|
+
<!-- Human: describe the application idea — even one paragraph is enough for
|
|
36
|
+
Round 0. Include, if known: the problem and who feels it, the actors,
|
|
37
|
+
desired outcomes, channels (web/mobile/API), known integrations,
|
|
38
|
+
compliance/regional constraints, expected scale, what is explicitly
|
|
39
|
+
out of scope. Leave the rest to the agent's probing. -->
|
|
40
|
+
|
|
41
|
+
[DESCRIBE YOUR APPLICATION IDEA HERE]
|
|
42
|
+
|
|
43
|
+
## References
|
|
44
|
+
|
|
45
|
+
- ./co2-context-generation-guide.md
|
|
46
|
+
<!-- Optional additional inputs, e.g. an existing CLAUDE.md or PRD.md to use as a
|
|
47
|
+
style reference:
|
|
48
|
+
- ./reference/skolafund/CLAUDE.md
|
|
49
|
+
- ./reference/skolafund/skolafund_web/context/PRD.md
|
|
50
|
+
-->
|
|
51
|
+
|
|
52
|
+
# Output Specification
|
|
53
|
+
|
|
54
|
+
| Field | Value |
|
|
55
|
+
| ----------- | -------------------------------------------------------------- |
|
|
56
|
+
| format | co2-tree |
|
|
57
|
+
| destination | ./ <!-- project root to scaffold; use ./output/<project-code-lower>/ to draft into a subfolder instead --> |
|
|
58
|
+
| versioning | overwrite |
|
|
59
|
+
| structure | CLAUDE.md + <app_folder>/context/PRD.md per custom application, per co2-context-generation-guide.md §2 |
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Status
|
|
63
|
+
|
|
64
|
+
| No | Status of | Action By | Status |
|
|
65
|
+
| :-: | ------------------ | --------- | ------- |
|
|
66
|
+
| 0 | Session completion | Human | PENDING |
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# Question
|
|
70
|
+
|
|
71
|
+
<!-- AI Agent appends "## Round N" sections here. Expect Phase A rounds to probe
|
|
72
|
+
framing/actors/data/workflows/integrations (co2-context-generation-guide.md §5),
|
|
73
|
+
then the inventory-lock question, then Phase B rounds probing per-module
|
|
74
|
+
stories, rules, scope and tests (§10). -->
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# Output
|
|
78
|
+
|
|
79
|
+
<!-- AI Agent dashboard — overridden every round:
|
|
80
|
+
phase & round, inventory summary (project code, apps + App Codes + ports,
|
|
81
|
+
module counts), App × Module matrix, [TODO] ledger, diff since last round.
|
|
82
|
+
On completion: ## Final Artifact with destination path + hand-off summary. -->
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# Feedback
|
|
86
|
+
|
|
87
|
+
<!-- AI Agent appends "## Round N" here in lockstep with Question. -->
|