@rashidee/co2 1.2.6 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/.co2-dat/app.db +0 -0
  2. package/dist/.co2-dat/app.db-shm +0 -0
  3. package/dist/.co2-dat/app.db-wal +0 -0
  4. package/dist/.co2-dat/config.json +4 -0
  5. package/dist/index.js +5303 -3139
  6. package/drizzle/0011_workflow_history_v152.sql +5 -0
  7. package/drizzle/0012_prd_sections_v160.sql +14 -0
  8. package/drizzle/0013_brainstorm_sessions_v170.sql +10 -0
  9. package/drizzle/0014_bug_module_v180.sql +4 -0
  10. package/drizzle/0015_project_config_v190.sql +23 -0
  11. package/drizzle/0016_cicd_v2100.sql +22 -0
  12. package/drizzle/meta/_journal.json +42 -0
  13. package/package.json +1 -1
  14. package/plugin/README.md +2 -0
  15. package/plugin/SKILLS.md +417 -350
  16. package/plugin/skills/conductor-feature-develop/SKILL.md +1 -1
  17. package/plugin/skills/conductor-feature-prepare/SKILL.md +23 -3
  18. package/plugin/skills/depgen-k8s/SKILL.md +1 -1
  19. package/plugin/skills/tracegen-matrix/SKILL.md +1 -1
  20. package/plugin/skills/util-gencicdscript/SKILL.md +91 -0
  21. package/plugin/skills/util-gencicdscript/references/cicd-app-template.md +414 -0
  22. package/plugin/skills/util-plancicd/SKILL.md +130 -0
  23. package/plugin/skills/util-projectinit/SKILL.md +1 -1
  24. package/plugin/skills/util-projectsync/SKILL.md +1 -1
  25. package/plugin/skills/util-updprd/SKILL.md +85 -15
  26. package/plugin/skills/util-usanalyzer/SKILL.md +1 -1
  27. package/plugin/skills/util-ustagger/SKILL.md +1 -1
  28. package/static/assets/{abnfDiagram-VRR7QNED-DvPuwyCV.js → abnfDiagram-VRR7QNED-CN4J6j_u.js} +1 -1
  29. package/static/assets/{arc-DRKw7sjs.js → arc-N4fM3ZWM.js} +1 -1
  30. package/static/assets/{architectureDiagram-ZJ3FMSHR-CaNcxUbC.js → architectureDiagram-ZJ3FMSHR-uch_sUft.js} +1 -1
  31. package/static/assets/{blockDiagram-677ZJIJ3-Demd4AOK.js → blockDiagram-677ZJIJ3-B8ciSHmI.js} +1 -1
  32. package/static/assets/{c4Diagram-LMCZKHZV-PVKUfc2x.js → c4Diagram-LMCZKHZV-CQcm-uRR.js} +1 -1
  33. package/static/assets/channel-D1lJ_RG1.js +1 -0
  34. package/static/assets/{chunk-2Q5K7J3B-CExf8ww_.js → chunk-2Q5K7J3B-CKyyGyMe.js} +1 -1
  35. package/static/assets/{chunk-32BRIVSS-CFPaoONF.js → chunk-32BRIVSS-BUvhUzbF.js} +1 -1
  36. package/static/assets/{chunk-5VM5RSS4-DE2esM67.js → chunk-5VM5RSS4-DeYPG9gz.js} +1 -1
  37. package/static/assets/{chunk-EX3LRPZG-SON_YdDG.js → chunk-EX3LRPZG-M5DW3NIE.js} +1 -1
  38. package/static/assets/{chunk-JWPE2WC7-Qxah8LNr.js → chunk-JWPE2WC7-DdUQGRCV.js} +1 -1
  39. package/static/assets/{chunk-MOJQB5TN-BcWGQV3j.js → chunk-MOJQB5TN-BjTWQfa-.js} +1 -1
  40. package/static/assets/{chunk-RYQCIY6F-DkDj-OR5.js → chunk-RYQCIY6F-B6eqE68w.js} +1 -1
  41. package/static/assets/{chunk-V7JOEXUC-BlI1Mrah.js → chunk-V7JOEXUC-31fpjmeh.js} +1 -1
  42. package/static/assets/{chunk-VR4S4FIN-Agf__duj.js → chunk-VR4S4FIN-DIdhgHxJ.js} +1 -1
  43. package/static/assets/{chunk-XXDRQBXY-B5CfAh85.js → chunk-XXDRQBXY-CwmvQsRd.js} +1 -1
  44. package/static/assets/classDiagram-OUVF2IWQ-B2LV6Dty.js +1 -0
  45. package/static/assets/classDiagram-v2-EOCWNBFH-B2LV6Dty.js +1 -0
  46. package/static/assets/{cose-bilkent-JH36ORCC-DO0cQkcy.js → cose-bilkent-JH36ORCC-0fxMNvxl.js} +1 -1
  47. package/static/assets/{cynefin-VYW2F7L2-CfOnsnXc.js → cynefin-VYW2F7L2-CykGMMcJ.js} +1 -1
  48. package/static/assets/{cynefinDiagram-TSTJHNR4-BJ8tULAv.js → cynefinDiagram-TSTJHNR4-CXA1U39p.js} +1 -1
  49. package/static/assets/{dagre-VKFMJZFB-DfjwzHqP.js → dagre-VKFMJZFB-Bw5XMtDI.js} +1 -1
  50. package/static/assets/{diagram-FQU43EPY-CndSOIIM.js → diagram-FQU43EPY-xte6N075.js} +1 -1
  51. package/static/assets/{diagram-G47NLZAW-Czf5hN0Z.js → diagram-G47NLZAW-CHoRtp3z.js} +1 -1
  52. package/static/assets/{diagram-NH7WQ7WH-COAyojGh.js → diagram-NH7WQ7WH-CEFlTlPg.js} +1 -1
  53. package/static/assets/{diagram-OA4YK3LP-H8PoiN2m.js → diagram-OA4YK3LP-DJ0JX9s2.js} +1 -1
  54. package/static/assets/{diagram-WEI45ONY-DzcaVzjp.js → diagram-WEI45ONY-BRfCVtnm.js} +1 -1
  55. package/static/assets/{ebnfDiagram-CCIWWBDH-DPazGYLJ.js → ebnfDiagram-CCIWWBDH-Cc-dcKTE.js} +1 -1
  56. package/static/assets/{erDiagram-Q63AITRT-Bo-fubgF.js → erDiagram-Q63AITRT-DLZsu__O.js} +1 -1
  57. package/static/assets/{flowDiagram-23GEKE2U-CSvxUDwh.js → flowDiagram-23GEKE2U-Cczq8RCz.js} +1 -1
  58. package/static/assets/{ganttDiagram-NO4QXBWP-DnBveWX6.js → ganttDiagram-NO4QXBWP-DOXGNB5h.js} +1 -1
  59. package/static/assets/{gitGraphDiagram-IHSO6WYX-B3rVL8c-.js → gitGraphDiagram-IHSO6WYX-BM-SCSXa.js} +1 -1
  60. package/static/assets/{index-y7XDSgMG.js → index-CBLEvyTD.js} +172 -171
  61. package/static/assets/{index-LZSQkLE2.css → index-Dn_JY-18.css} +1 -1
  62. package/static/assets/{infoDiagram-FWYZ7A6U-CvWV9yy2.js → infoDiagram-FWYZ7A6U-dJDRFcA8.js} +1 -1
  63. package/static/assets/{ishikawaDiagram-FXEZZL3T-DF28a1N6.js → ishikawaDiagram-FXEZZL3T-VxLIIU05.js} +1 -1
  64. package/static/assets/{journeyDiagram-5HDEW3XC-CB6CugYk.js → journeyDiagram-5HDEW3XC-EvtzKlzP.js} +1 -1
  65. package/static/assets/{kanban-definition-HUTT4EX6-ResSLF6d.js → kanban-definition-HUTT4EX6-yO62k9Tr.js} +1 -1
  66. package/static/assets/{linear-CLO--ryk.js → linear-DZzMubPw.js} +1 -1
  67. package/static/assets/{mindmap-definition-LN4V7U3C-BvW3EbxX.js → mindmap-definition-LN4V7U3C-BRO6imMR.js} +1 -1
  68. package/static/assets/{pegDiagram-2B236MQR-BHCgqrrM.js → pegDiagram-2B236MQR-DJR3fTw9.js} +1 -1
  69. package/static/assets/{pieDiagram-ENE6RG2P-DVmCQ5FA.js → pieDiagram-ENE6RG2P-9mFM-_RT.js} +1 -1
  70. package/static/assets/{quadrantDiagram-ABIIQ3AL-B3e5KR52.js → quadrantDiagram-ABIIQ3AL-BEsVn0Kx.js} +1 -1
  71. package/static/assets/{railroadDiagram-RFXS5EU6-Csv5ysLc.js → railroadDiagram-RFXS5EU6-D9Mp7Mil.js} +1 -1
  72. package/static/assets/{requirementDiagram-TGXJPOKE-DOMVzvnB.js → requirementDiagram-TGXJPOKE-CRYcxiHN.js} +1 -1
  73. package/static/assets/{sankeyDiagram-HTMAVEWB-B1dcTOvy.js → sankeyDiagram-HTMAVEWB-9MJPBNY-.js} +1 -1
  74. package/static/assets/{sequenceDiagram-DBY2YBRQ-BY414yeO.js → sequenceDiagram-DBY2YBRQ-CSAt7g1a.js} +1 -1
  75. package/static/assets/{sizeCapture-X5ZJPWSS-CuJfrfBN.js → sizeCapture-X5ZJPWSS-DQ7t3sAl.js} +1 -1
  76. package/static/assets/{stateDiagram-2N3HPSRC-FX4rJkzV.js → stateDiagram-2N3HPSRC-B314IVUq.js} +1 -1
  77. package/static/assets/stateDiagram-v2-6OUMAXLB-C5_r7hRR.js +1 -0
  78. package/static/assets/{swimlanes-5IMT3BWC-Sfy58mmv.js → swimlanes-5IMT3BWC-gCXbGpn-.js} +2 -2
  79. package/static/assets/swimlanesDiagram-G3AALYLV-BkEgKJGN.js +8 -0
  80. package/static/assets/{timeline-definition-FHXFAJF6-CmV7by8p.js → timeline-definition-FHXFAJF6-Ypa-zz8f.js} +1 -1
  81. package/static/assets/{vennDiagram-L72KCM5P-FqIyFZFt.js → vennDiagram-L72KCM5P-C07T1tIJ.js} +1 -1
  82. package/static/assets/{wardleyDiagram-EHGQE667-BZ06O45i.js → wardleyDiagram-EHGQE667-DwsMVlwx.js} +1 -1
  83. package/static/assets/{xychartDiagram-FW5EYKEG-BOkffR06.js → xychartDiagram-FW5EYKEG-BCtXbdXL.js} +1 -1
  84. package/static/index.html +2 -2
  85. package/plugin/skills/util-preparek8senv/SKILL.md +0 -422
  86. package/static/assets/channel-C2nVbuwv.js +0 -1
  87. package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +0 -1
  88. package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +0 -1
  89. package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +0 -1
  90. package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +0 -8
package/plugin/SKILLS.md CHANGED
@@ -1,350 +1,417 @@
1
- # CO2 Skills Catalog — Agent Reference
2
-
3
- > **Audience:** AI agents. This document tells you WHICH skill to invoke WHEN in the
4
- > Compound Context (CO2) workflow. Every skill reads its inputs from the project's context
5
- > files (`CLAUDE.md`, `<app_folder>/context/PRD.md`, etc.) — invoke with the application
6
- > name and version; do not ask the user for information the context files already contain.
7
-
8
- ## Workflow Order
9
-
10
- Skills belong to phases and generally must run in this order per application:
11
-
12
- ```
13
- 0. Bootstrap util-projectinit → (user fills session) → /brainstorm-loop → util-projectsync
14
- 1. PRD clean-up util-usanalyzer → util-ustagger (util-updprd for requirement changes)
15
- 2. Artifacts modelgen-* → mockgen-* → specgen-* → testgen-functional
16
- (or all four via conductor-feature-prepare)
17
- 3. Infrastructure util-preparek8senv (before development)
18
- 4. Development conductor-feature-develop → tracegen-matrix (auto) → depgen-k8s (auto)
19
- 5. Bug fixing conductor-defect → tracegen-matrix (auto)
20
- ```
21
-
22
- ## Artifact Map — who produces what
23
-
24
- ```
25
- <project_root>/
26
- ├── CLAUDE.md ← /brainstorm-loop (Phase A), annotated by util-projectsync
27
- ├── DEVTOOL.md ← per-developer (manual)
28
- ├── ENVIRONMENT.md ← util-preparek8senv
29
- ├── <topic>.brainstorm.md ← util-projectinit (session doc, iterated by /brainstorm-loop)
30
- ├── brainstorm-protocol.md ← util-projectinit (copied)
31
- ├── co2-context-generation-guide.md ← util-projectinit (copied)
32
- ├── environment/ ← util-preparek8senv (K8s manifests for 3rd party apps; gitignored)
33
- └── <app_folder>/
34
- ├── CHANGELOG.md ← appended by every skill (version gate)
35
- ├── Dockerfile depgen-k8s
36
- ├── k8s/ ← depgen-k8s (app manifests; gitignored)
37
- ├── (source code) ← conductor-feature-develop / conductor-defect
38
- └── context/
39
- ├── PRD.md/brainstorm-loop (Phase B), scaffolded by util-projectsync,
40
- │ tagged by util-ustagger, annotated by util-usanalyzer
41
- ├── BUG.md util-projectsync scaffold; user reports; tagged by conductor-defect
42
- ├── TRACEABILITY.md ← tracegen-matrix
43
- ├── model/modelgen-relational / modelgen-nosql
44
- ├── mockup/ ← mockgen-tailwind / mockgen-shadcn (assets + manifest;
45
- │ served by the shared Mockup Hub at <root>/mockup)
46
- ├── specification/ specgen-* (one variant)
47
- ├── test/ testgen-functional
48
- ├── prepare/ conductor-feature-prepare (PREPARE_MASTER.md tracking)
49
- ├── develop/ ← conductor-feature-develop (tracking files)
50
- └── bug/ conductor-defect (per-bug tracking files)
51
- ```
52
-
53
- **Universal conventions (apply to almost every skill):**
54
-
55
- - **Invocation shape:** `/skill-name <application> <version> [module:<name>]`. The application
56
- name resolves to a root-level app folder (leading `<number>_` prefix stripped,
57
- case-insensitive, snake/kebab/title case all match).
58
- - **Version gate:** skills refuse to run for a version lower than the highest version recorded
59
- in `<app_folder>/CHANGELOG.md`, and append a row there on success.
60
- - **Version filtering:** only PRD items tagged `[vX.Y.Z]` <= the requested version are included;
61
- strikethrough (`~~…~~`) items are deprecated and excluded.
62
- - **Traceability:** PRD item IDs (e.g., `[USHM00003]`, `[NFRHM0012]`) must be carried through
63
- into every generated artifact.
64
-
65
- ---
66
-
67
- ## Phase 0 — Project Bootstrap
68
-
69
- ### `util-projectinit`
70
- - **Invoke:** `/util-projectinit "<application idea or topic>"`
71
- - **What it does:** Sets up a file-based, turn-based **brainstorming session** in the project
72
- folder: generates `<topic>.brainstorm.md` from the appdev template (seeded with the idea),
73
- copies `brainstorm-protocol.md` and `co2-context-generation-guide.md` to the project root,
74
- and ensures the `/brainstorm-loop` command is installed. It does NOT generate project context
75
- directly and it NEVER starts the loop itself it instructs the user to fill in the session
76
- document and manually run `/brainstorm-loop`.
77
- - **Use when:** the user wants to start/init/bootstrap a NEW project, or brainstorm an
78
- application idea into CO2 context. First skill of the workflow.
79
- - **Do NOT use when:** the project already has a `CLAUDE.md` and the user wants to evolve it
80
- (use `util-projectsync` or `util-updprd`).
81
- - **Prerequisites:** an application idea (even one paragraph).
82
- - **Output:** `<topic>.brainstorm.md` (session document), `brainstorm-protocol.md`,
83
- `co2-context-generation-guide.md` at the project root, and
84
- `.claude/commands/brainstorm-loop.md` when the plugin command is not available — plus a
85
- hand-off instruction block. Non-destructive never overwrites existing files.
86
-
87
- ### `/brainstorm-loop` (plugin command, not a skill)
88
- - **Invoke:** `/brainstorm-loop [scan-root] [max-watch-rounds]` **run manually by the user**,
89
- never auto-started by a skill.
90
- - **What it does:** In-session watch loop over `*.brainstorm.md` session documents. Each round
91
- the agent drafts the CO2 context tree (Phase A: root `CLAUDE.md`; Phase B: one `PRD.md` per
92
- application) per `co2-context-generation-guide.md`, appends questions, and waits for the
93
- human to answer and flip a status row. Token-efficient: 60-second file polling, acts only on
94
- status flips.
95
- - **Output:** root `CLAUDE.md` + `<app_folder>/context/PRD.md` per application (at the session's
96
- destination), plus a `.brainstorm-loop-status.md` dashboard.
97
-
98
- ### `util-projectsync`
99
- - **Invoke:** `/util-projectsync` (no arguments reads everything from `CLAUDE.md`)
100
- - **What it does:** Synchronizes project folder structure with `CLAUDE.md`: validates
101
- dependencies (circular, missing, logical) and orphaned services, creates missing application
102
- folders, scaffolds `PRD.md`/`BUG.md` from templates, adds missing module sections, inserts
103
- `[TODO]` annotations into `CLAUDE.md` for validation failures.
104
- - **Use when:** after the brainstorm closes, or any time `CLAUDE.md` applications/modules
105
- changed and folders/PRDs must catch up ("sync project", "scaffold project folders",
106
- "validate dependencies").
107
- - **Prerequisites:** `CLAUDE.md`.
108
- - **Output:** missing `<app_folder>/` folders, scaffolded `<app_folder>/context/PRD.md` and
109
- `BUG.md`, missing module sections added to existing files, `[TODO]` annotations in
110
- `CLAUDE.md` for validation failures, and a sync/validation summary report.
111
-
112
- ---
113
-
114
- ## Phase 1 PRD Clean-Up
115
-
116
- ### `util-usanalyzer`
117
- - **Invoke:** `/util-usanalyzer <application>`
118
- - **What it does:** Analyzes `PRD.md` for quality issues — incomplete sentences, broken
119
- references, cross-module inconsistencies, contradictions, duplicate roles, process-flow
120
- coverage gaps — and adds inline `[TODO]` annotations for each issue.
121
- - **Use when:** the user asks to validate/review/audit user stories or requirements quality,
122
- or before tagging a freshly edited PRD.
123
- - **Prerequisites:** `PRD.md`.
124
- - **Output:** inline `[TODO]` annotations written into `PRD.md` at each issue, plus a summary
125
- report of all issues found with improvement suggestions.
126
-
127
- ### `util-ustagger`
128
- - **Invoke:** `/util-ustagger <application> <version>`
129
- - **What it does:** Tags every untagged top-level item in `PRD.md` (User Stories, NFRs,
130
- Constraints, References, Tests) with a unique 9-character ID code and validates that no
131
- duplicate tags exist.
132
- - **Use when:** new PRD items need IDs ("tag user stories", "add IDs to requirements",
133
- "validate tags"). Run after any manual PRD edit and before artifact generation.
134
- - **Prerequisites:** `PRD.md`.
135
- - **Output:** updated `PRD.md` with every item tagged (e.g., `[USHM00003]`, `[NFRHM0012]`,
136
- `[CONHM0009]`, `[REFHM0003]`), plus a duplicate-tag validation report.
137
-
138
- ### `util-updprd` ⚠️ *not yet implemented — folder is an empty stub; do not invoke*
139
- - **Documented intent:** apply a free-form requirement change across all applications' PRD.md
140
- files decide add/cancel/modify per item, auto-classify major/minor/patch, layer changes
141
- under a NEW version tag (prior versions immutable), tag via `util-ustagger`, append
142
- CHANGELOG entries.
143
-
144
- ---
145
-
146
- ## Phase 2 Context Artifact Generation
147
-
148
- > Run the four steps individually below, or all at once via `conductor-feature-prepare`.
149
-
150
- ### `conductor-feature-prepare` (orchestrator)
151
- - **Invoke:** `/conductor-feature-prepare <application> [version:<v>] [module:<m>]`
152
- - **What it does:** Runs `util-ustagger` `modelgen-*` `mockgen-*` `specgen-*` →
153
- `testgen-functional` in sequence, auto-selecting the right variant per the application's
154
- technology stack, tracking progress in `PREPARE_MASTER.md` (read first on resume to skip
155
- already-completed steps/versions). Multiple versions are processed sequentially in ascending
156
- semver order. Manages its own Ralph Loop internally for cross-session continuity.
157
- - **Use when:** "prepare artifacts", "generate context", "prepare for development",
158
- "resume preparation".
159
- - **Prerequisites:** `PRD.md`, `CLAUDE.md`.
160
- - **Output:** the complete `context/` artifact tree `model/`, `mockup/`, `specification/`
161
- and `test/` (each as described under its sub-skill below) plus `CHANGELOG.md` entries per
162
- step and the `context/prepare/PREPARE_MASTER.md` progress tracker (inferred config, per-version
163
- × per-artifact status) for cross-session resumption.
164
-
165
- ### `modelgen-relational`
166
- - **Invoke:** `/modelgen-relational <application> <version> [module:<m>]`
167
- - **What it does:** Extracts relational (SQL) entity models from user stories using DDD —
168
- ERD diagrams (Mermaid) + per-module model documentation. Also handles "update/upgrade the
169
- model" for incremental evolution.
170
- - **Use when:** the app's datastore is a relational DB (MySQL, PostgreSQL, SQLite …).
171
- - **Output:** `context/model/` `MODEL.md` index + per-module `model.md` / `erd.mermaid`.
172
-
173
- ### `modelgen-nosql`
174
- - **Invoke:** `/modelgen-nosql <application> <version> [module:<m>]`
175
- - **What it does:** Extracts NoSQL document models (embed-vs-reference analysis, Mermaid class
176
- diagrams, JSON schema examples per collection). Database-agnostic (MongoDB, Couchbase,
177
- DynamoDB, Firestore, CosmosDB).
178
- - **Use when:** the app's datastore is document-oriented. **Not** for relational schemas —
179
- use `modelgen-relational`.
180
- - **Output:** `context/model/` `MODEL.md` index + per-module `model.md` (embed/reference
181
- decisions), Mermaid class diagram, and `schemas.json` JSON schema examples per collection.
182
-
183
- ### `mockgen-tailwind`
184
- - **Invoke:** `/mockgen-tailwind <application> <version> [module:<m>]`
185
- - **What it does:** Generates HTML mockup screens (Alpine.js + HTMX assets, admin
186
- dashboard layout, organized by user role) for human designer review. All mockups are
187
- served by the single shared **Mockup Hub** at `<root>/mockup` — a zero-dependency Node
188
- server (created/upgraded automatically) with a landing page listing every application
189
- and role (unclickable until ready) and a configurable port (`PORT` env /
190
- `mockup.config.json`).
191
- - **Use when:** mockups are needed and the target stack is server-rendered or plain HTML;
192
- default mockup generator.
193
- - **Prerequisites:** `PRD.md`, `modelgen-*` output.
194
- - **Output:** `context/mockup/` — `MOCKUP.html` index, `mockup-manifest.json`, partials,
195
- role folders (assets only; no per-app server) + shared hub at `<root>/mockup/`.
196
-
197
- ### `mockgen-shadcn`
198
- - **Invoke:** `/mockgen-shadcn <application> <version> [module:<m>]`
199
- - **What it does:** Generates React + shadcn/ui mockup screens (Vite + React 19 + TypeScript +
200
- React Router v7, admin dashboard layout, organized by user role) with
201
- `base`/`basename` = `/{app_slug}/`, builds them (`npm run build`), and serves the `dist/`
202
- output through the same shared **Mockup Hub** at `<root>/mockup` (Vite dev server remains
203
- for design iteration only).
204
- - **Use when:** the target application is React/shadcn-based (pairs naturally with
205
- `specgen-nextjs-react-tailwind` / `specgen-node-cli-web`).
206
- - **Prerequisites:** `PRD.md`, `modelgen-*` output.
207
- - **Output:** `context/mockup/` `MOCKUP.html` index page, `mockup-manifest.json`, Vite +
208
- React project files, layout components, vendored shadcn/ui components, role-specific page
209
- components, and built `dist/` + shared hub at `<root>/mockup/`.
210
-
211
- ### `specgen-*` Technical Specification Generators
212
-
213
- All specgens share the same contract: **Invoke** `/specgen-<variant> <application> <version>
214
- [module:<m>]`; **Prerequisites** `PRD.md` + `modelgen-*` output (+ `mockgen-*` output for
215
- UI-bearing stacks); **Output** `context/specification/` — root `SPECIFICATION.md` + one
216
- self-contained `SPEC.md` per module (or per command for CLI stacks), with complete code
217
- samples and traceability tables. **Pick exactly ONE variant, matching the application's
218
- technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle):
219
-
220
- | Skill | Pick when the application is… |
221
- |-------|-------------------------------|
222
- | `specgen-spring-jpa-jtehtmx` | Spring Boot 3 server-rendered web app (JTE + Tailwind + Alpine.js + htmx, Spring Modulith; optional Keycloak, RabbitMQ, Quartz/Batch, i18n) |
223
- | `specgen-spring-jpa-restapi` | Spring Boot 3 REST API (Spring Modulith; optional Keycloak resource server / JWT, RabbitMQ, Quartz/Batch) |
224
- | `specgen-laravel-eloquent-bladehtmx` | Laravel 12 server-rendered web app (Blade + Tailwind + Alpine.js + htmx, nwidart modules; optional Keycloak/Breeze, RabbitMQ, scheduling, i18n) |
225
- | `specgen-react-mui` | React 19 SPA with Material UI v6 (TypeScript 5, Vite 6, React Router 7, TanStack Query 5, Zustand 5, RHF 7, Zod 3; optional Keycloak/OIDC, WebSocket, i18n, MUI X grids/charts) |
226
- | `specgen-react-tailwind` | React 19 SPA with Tailwind CSS v3 + Headless UI v2 + Heroicons (same data stack as react-mui, no component framework; optional TanStack Table, Recharts, react-day-picker, Tiptap, reporting) |
227
- | `specgen-flutter-riverpod` | Flutter 3 mobile app (Dart 3, Riverpod 2, Hive 2, Dio 5, go_router 14, Firebase Messaging, freezed/json_serializable; optional Keycloak PKCE, WebSocket, i18n) |
228
- | `specgen-ts-cli` | Distributable Node.js CLI **tool** (TypeScript 5, Commander 12, tsup, Zod, chalk/ora; optional prompts, conf/cosmiconfig, SQLite, execa, got, @yao-pkg/pkg binaries) — terminal-only, no web UI |
229
- | `specgen-node-cli-web` | Self-hosted **web application distributed as a global npm CLI** installed `npm i -g`, started `<app> start`, opened at `http://IP:PORT`. Single Node 22 process: Hono 4 API + embedded pre-built React 19/Vite 6 SPA (Tailwind v4, shadcn/ui), Drizzle + SQLite, hand-rolled scrypt sessions with first-run admin + forced password change, tsup, Biome, Vitest + Playwright with built-binary smoke test |
230
- | `specgen-sdk-java` | Java SDK **library** wrapping a remote REST API — Maven Multi-Release fat JAR, JDK 8 baseline + JDK 11+ overlay, OkHttp as sole runtime dependency |
231
-
232
- > **`specgen-ts-cli` vs `specgen-node-cli-web`:** if the deliverable is a terminal tool with
233
- > commands and flags → `specgen-ts-cli`. If the deliverable is a browser-accessed web app that
234
- > merely *installs and starts* via a CLI → `specgen-node-cli-web`.
235
-
236
- ⚠️ `specgen-nextjs-react-tailwind` (Next.js 15 App Router) is documented but **not yet
237
- implemented** (empty stub no SKILL.md). Do not invoke; fall back to `specgen-react-tailwind`
238
- + a REST API specgen, or ask the user.
239
-
240
- ### `testgen-functional`
241
- - **Invoke:** `/testgen-functional <application> <version> [module:<m>]`
242
- - **What it does:** Generates a Playwright E2E test plan and per-module test specifications as
243
- Markdown blueprints (scenarios, data seeding, cleanup) — NOT actual test code.
244
- - **Use when:** "generate test plan/spec", after specgen completes. Last artifact step.
245
- - **Prerequisites:** `PRD.md`, `modelgen-*`, `mockgen-*`, `specgen-*` outputs.
246
- - **Output:** `context/test/` `TEST_PLAN.md`/`TEST_PLAN.mmd` + per-module `TEST_SPEC.md`.
247
-
248
- ---
249
-
250
- ## Phase 3Infrastructure
251
-
252
- ### `util-preparek8senv`
253
- - **Invoke:** `/util-preparek8senv [environment]`
254
- - **What it does:** Generates StatefulSet-based K8s manifests for ALL 3rd party supporting
255
- applications (databases, queues, caches, SSO, gateways) for one target environment, and
256
- creates/updates `ENVIRONMENT.md` with per-environment configs and credentials. Output goes
257
- directly into the gitignored `environment/` folder.
258
- - **Use when:** "prepare k8s environment", "setup infrastructure" run BEFORE application
259
- development so backing services exist.
260
- - **Prerequisites:** `CLAUDE.md`, `DEVTOOL.md`.
261
- - **Output:** `ENVIRONMENT.md` (created/updated with per-environment configs and credentials)
262
- and `environment/` — `namespace.yaml` plus one StatefulSet-based manifest per 3rd party
263
- application (PVC, ConfigMap, Secret, headless Service, NodePort Service).
264
-
265
- ---
266
-
267
- ## Phase 4 Development
268
-
269
- ### `conductor-feature-develop` (orchestrator)
270
- - **Invoke:** `/conductor-feature-develop <application> [version:<v>] [module:<m>]`
271
- - **What it does:** Implements the full application module-by-module (code + Playwright E2E
272
- tests) using all generated artifacts, tracking progress in `IMPLEMENTATION_MASTER.md` and
273
- per-module `IMPLEMENTATION_MODULE.md`. Auto-starts a Ralph Loop for cross-session
274
- continuity; invokes `tracegen-matrix` and `depgen-k8s` at the end.
275
- - **Use when:** "implement the application", "start development", "develop from specs",
276
- "resume implementation".
277
- - **Prerequisites:** all `conductor-feature-prepare` outputs (model/, mockup/,
278
- specification/, test/).
279
- - **Output:** application source code organized by module; `context/develop/` tracking files
280
- (`IMPLEMENTATION_MASTER.md` with overall status/execution order/pre-implementation
281
- checklist, and per-module `IMPLEMENTATION_MODULE.md` with resource tables, implementation
282
- checklists, user-story/NFR completion checklists and timestamped logs); Playwright E2E test
283
- suite per module; then via auto-invoked sub-skills: `context/TRACEABILITY.md`, `Dockerfile`
284
- and `k8s/` manifests.
285
-
286
- ### `tracegen-matrix`
287
- - **Invoke:** `/tracegen-matrix <application> [version] [module]`
288
- - **What it does:** Links every PRD requirement ID and bug code to the implementing source
289
- code and writes `context/TRACEABILITY.md`. Resolves from in-source CO2 comments
290
- (`Implements:` / `NFR:` / `Constraints:` / `Bug fixes:`) with a name-based fallback;
291
- optional codebase-memory MCP enrichment (works fully without it).
292
- - **Use when:** "generate/update traceability", "link requirements to code" usually invoked
293
- automatically as the final step of `conductor-feature-develop` and `conductor-defect`.
294
- - **Prerequisites:** `PRD.md`, `specification/*/SPEC.md`, application source code.
295
- - **Output:** `context/TRACEABILITY.md` per-application matrix mapping every requirement ID
296
- and bug code to the implementing source files.
297
-
298
- ### `depgen-k8s`
299
- - **Invoke:** `/depgen-k8s <application> [environment]`
300
- - **What it does:** Generates a production-ready multi-stage Dockerfile (application root) and
301
- Kubernetes manifests in the gitignored `<app_folder>/k8s/` for one target environment.
302
- Auto-detects the stack (Spring Boot / Laravel / Node.js) from project files. Only CUSTOM
303
- applications never 3rd party services (those are `util-preparek8senv`'s job).
304
- - **Use when:** "containerize", "create a Dockerfile", "generate k8s manifests", "deploy this
305
- app" — auto-invoked by `conductor-feature-develop` after all modules complete.
306
- - **Prerequisites:** `SPECIFICATION.md`, `CLAUDE.md`, application source code.
307
- - **Output:** `<app_folder>/Dockerfile` (multi-stage, production-ready) and
308
- `<app_folder>/k8s/` namespace, ConfigMap, Secret, Deployment, Service and Ingress YAML
309
- files with env-var mapping and health/readiness probes (gitignored, per-machine).
310
-
311
- ---
312
-
313
- ## Phase 5 Bug Fixing
314
-
315
- ### `conductor-defect` (orchestrator)
316
- - **Invoke:** `/conductor-defect <application> [version:<v>] [module:<m>]`
317
- - **What it does:** Fixes bugs from `<app_folder>/context/BUG.md` one at a time: tags untagged
318
- bugs, creates `BUG_MASTER.md`, then per bug reproduce with Playwright, write
319
- `BUG_TEST_SPEC.md`, plan (`BUG_FIX_PLAN.md`), fix, verify, and sync affected artifacts
320
- (mockups, specs, models, PRD). Manages Ralph Loop internally; runs `tracegen-matrix` at the
321
- end.
322
- - **Use when:** "fix bugs", "bug fix session", "resolve bugs from BUG.md",
323
- "resume bug fixing".
324
- - **Prerequisites:** `BUG.md`, all `conductor-feature-prepare` outputs.
325
- - **Output:** fixed source code; tagged `BUG.md` (`[BUG-XXX]`); `context/bug/BUG_MASTER.md`
326
- tracking file (statuses: NEW, IN_PROGRESS, FIXED, CANNOT_REPRODUCE, HIGH_IMPACT); per-bug
327
- folder `context/bug/<module>/<BUG-XXX>/` with `reproduce.spec.ts`,
328
- `screenshot_reproduce.png`, `BUG_TEST_SPEC.md`, `BUG_FIX_PLAN.md`, `screenshot_fixed.png`;
329
- synced artifacts (mockups, specs, models, PRD) and an updated `context/TRACEABILITY.md`.
330
-
331
- ---
332
-
333
- ## Quick Decision Table
334
-
335
- | User intent sounds like… | Invoke |
336
- |---|---|
337
- | "start a new project / I have an app idea" | `util-projectinit` (then user runs `/brainstorm-loop`) |
338
- | "sync folders / CLAUDE.md changed / scaffold PRDs" | `util-projectsync` |
339
- | "check my requirements / review user stories" | `util-usanalyzer` |
340
- | "tag the new PRD items / add requirement IDs" | `util-ustagger` |
341
- | "prepare everything for development" | `conductor-feature-prepare` |
342
- | "design the data model / ERD" | `modelgen-relational` or `modelgen-nosql` (by datastore) |
343
- | "generate mockups / UI screens" | `mockgen-tailwind` or `mockgen-shadcn` (by stack) |
344
- | "write the technical spec" | the ONE `specgen-*` matching the stack (see table) |
345
- | "generate the test plan" | `testgen-functional` |
346
- | "set up databases/queues in k8s" | `util-preparek8senv` |
347
- | "build/implement the app" | `conductor-feature-develop` |
348
- | "link requirements to code" | `tracegen-matrix` |
349
- | "dockerize / deploy the app" | `depgen-k8s` |
350
- | "fix the reported bugs" | `conductor-defect` |
1
+ # CO2 Skills Catalog — Agent Reference
2
+
3
+ > **Audience:** AI agents. This document tells you WHICH skill to invoke WHEN in the
4
+ > Compound Context (CO2) workflow. Every skill reads its inputs from the project's context
5
+ > files (`CLAUDE.md`, `<app_folder>/context/PRD.md`, etc.) — invoke with the application
6
+ > name and version; do not ask the user for information the context files already contain.
7
+
8
+ ## Workflow Order
9
+
10
+ Skills belong to phases and generally must run in this order per application:
11
+
12
+ ```
13
+ 0. Bootstrap util-projectinit → (user fills session) → /brainstorm-loop → util-projectsync
14
+ 1. PRD clean-up util-usanalyzer → util-ustagger (util-updprd for requirement changes)
15
+ 2. Artifacts modelgen-* → mockgen-* → specgen-* → testgen-functional
16
+ (or all four via conductor-feature-prepare)
17
+ 3. Infrastructure util-preparek8senv → util-plancicd → util-gencicdscript (before development)
18
+ 4. Development conductor-feature-develop → tracegen-matrix (auto) → depgen-k8s (auto)
19
+ 5. Bug fixing conductor-defect → tracegen-matrix (auto)
20
+ ```
21
+
22
+ ## Artifact Map — who produces what
23
+
24
+ ```
25
+ <project_root>/
26
+ ├── CLAUDE.md ← /brainstorm-loop (Phase A), annotated by util-projectsync
27
+ ├── DEVTOOL.md ← per-developer (manual)
28
+ ├── ENVIRONMENT.md ← util-preparek8senv
29
+ ├── <topic>.brainstorm.md ← util-projectinit (session doc, iterated by /brainstorm-loop)
30
+ ├── brainstorm-protocol.md ← util-projectinit (copied)
31
+ ├── co2-context-generation-guide.md ← util-projectinit (copied)
32
+ ├── environment/ ← util-preparek8senv (K8s manifests for 3rd party apps; gitignored)
33
+ ├── cicd/ ← util-plancicd (CICD_PLAN.md), util-gencicdscript (app/; gitignored)
34
+ ├── CICD_PLAN.md ← util-plancicd
35
+ ├── CICD_GENERATION.md util-gencicdscript
36
+ │ └── app/ ← util-gencicdscript (server.js, cicd.config.json; gitignored)
37
+ └── <app_folder>/
38
+ ├── CHANGELOG.md ← appended by every skill (version gate)
39
+ ├── Dockerfiledepgen-k8s
40
+ ├── k8s/ ← depgen-k8s (app manifests; gitignored)
41
+ ├── (source code) conductor-feature-develop / conductor-defect
42
+ └── context/
43
+ ├── PRD.md/brainstorm-loop (Phase B), scaffolded by util-projectsync,
44
+ │ tagged by util-ustagger, annotated by util-usanalyzer
45
+ ├── BUG.md ← util-projectsync scaffold; user reports; tagged by conductor-defect
46
+ ├── TRACEABILITY.md tracegen-matrix
47
+ ├── model/ modelgen-relational / modelgen-nosql
48
+ ├── mockup/ mockgen-tailwind / mockgen-shadcn (assets + manifest;
49
+ │ served by the shared Mockup Hub at <root>/mockup)
50
+ ├── specification/ specgen-* (one variant)
51
+ ├── test/ ← testgen-functional
52
+ ├── prepare/ ← conductor-feature-prepare (PREPARE_MASTER.md tracking)
53
+ ├── develop/ ← conductor-feature-develop (tracking files)
54
+ └── bug/ ← conductor-defect (per-bug tracking files)
55
+ ```
56
+
57
+ **Universal conventions (apply to almost every skill):**
58
+
59
+ - **Invocation shape:** `/skill-name <application> <version> [module:<name>]`. The application
60
+ name resolves to a root-level app folder (leading `<number>_` prefix stripped,
61
+ case-insensitive, snake/kebab/title case all match).
62
+ - **Version gate:** skills refuse to run for a version lower than the highest version recorded
63
+ in `<app_folder>/CHANGELOG.md`, and append a row there on success.
64
+ - **Version filtering:** only PRD items tagged `[vX.Y.Z]` <= the requested version are included;
65
+ strikethrough (`~~…~~`) items are deprecated and excluded.
66
+ - **Traceability:** PRD item IDs (e.g., `[USHM00003]`, `[NFRHM0012]`) must be carried through
67
+ into every generated artifact.
68
+
69
+ ---
70
+
71
+ ## Phase 0 Project Bootstrap
72
+
73
+ ### `util-projectinit`
74
+ - **Invoke:** `/util-projectinit "<application idea or topic>"`
75
+ - **What it does:** Sets up a file-based, turn-based **brainstorming session** in the project
76
+ folder: generates `<topic>.brainstorm.md` from the appdev template (seeded with the idea),
77
+ copies `brainstorm-protocol.md` and `co2-context-generation-guide.md` to the project root,
78
+ and ensures the `/brainstorm-loop` command is installed. It does NOT generate project context
79
+ directly and it NEVER starts the loop itself it instructs the user to fill in the session
80
+ document and manually run `/brainstorm-loop`.
81
+ - **Use when:** the user wants to start/init/bootstrap a NEW project, or brainstorm an
82
+ application idea into CO2 context. First skill of the workflow.
83
+ - **Do NOT use when:** the project already has a `CLAUDE.md` and the user wants to evolve it
84
+ (use `util-projectsync` or `util-updprd`).
85
+ - **Prerequisites:** an application idea (even one paragraph).
86
+ - **Output:** `<topic>.brainstorm.md` (session document), `brainstorm-protocol.md`,
87
+ `co2-context-generation-guide.md` at the project root, and
88
+ `.claude/commands/brainstorm-loop.md` when the plugin command is not available — plus a
89
+ hand-off instruction block. Non-destructive never overwrites existing files.
90
+
91
+ ### `/brainstorm-loop` (plugin command, not a skill)
92
+ - **Invoke:** `/brainstorm-loop [scan-root] [max-watch-rounds]` **run manually by the user**,
93
+ never auto-started by a skill.
94
+ - **What it does:** In-session watch loop over `*.brainstorm.md` session documents. Each round
95
+ the agent drafts the CO2 context tree (Phase A: root `CLAUDE.md`; Phase B: one `PRD.md` per
96
+ application) per `co2-context-generation-guide.md`, appends questions, and waits for the
97
+ human to answer and flip a status row. Token-efficient: 60-second file polling, acts only on
98
+ status flips.
99
+ - **Output:** root `CLAUDE.md` + `<app_folder>/context/PRD.md` per application (at the session's
100
+ destination), plus a `.brainstorm-loop-status.md` dashboard.
101
+
102
+ ### `util-projectsync`
103
+ - **Invoke:** `/util-projectsync` (no arguments — reads everything from `CLAUDE.md`)
104
+ - **What it does:** Synchronizes project folder structure with `CLAUDE.md`: validates
105
+ dependencies (circular, missing, logical) and orphaned services, creates missing application
106
+ folders, scaffolds `PRD.md`/`BUG.md` from templates, adds missing module sections, inserts
107
+ `[TODO]` annotations into `CLAUDE.md` for validation failures.
108
+ - **Use when:** after the brainstorm closes, or any time `CLAUDE.md` applications/modules
109
+ changed and folders/PRDs must catch up ("sync project", "scaffold project folders",
110
+ "validate dependencies").
111
+ - **Prerequisites:** `CLAUDE.md`.
112
+ - **Output:** missing `<app_folder>/` folders, scaffolded `<app_folder>/context/PRD.md` and
113
+ `BUG.md`, missing module sections added to existing files, `[TODO]` annotations in
114
+ `CLAUDE.md` for validation failures, and a sync/validation summary report.
115
+
116
+ ---
117
+
118
+ ## Phase 1 PRD Clean-Up
119
+
120
+ ### `util-usanalyzer`
121
+ - **Invoke:** `/util-usanalyzer <application>`
122
+ - **What it does:** Analyzes `PRD.md` for quality issues — incomplete sentences, broken
123
+ references, cross-module inconsistencies, contradictions, duplicate roles, process-flow
124
+ coverage gaps — and adds inline `[TODO]` annotations for each issue.
125
+ - **Use when:** the user asks to validate/review/audit user stories or requirements quality,
126
+ or before tagging a freshly edited PRD.
127
+ - **Prerequisites:** `PRD.md`.
128
+ - **Output:** inline `[TODO]` annotations written into `PRD.md` at each issue, plus a summary
129
+ report of all issues found with improvement suggestions.
130
+
131
+ ### `util-ustagger`
132
+ - **Invoke:** `/util-ustagger <application> <version>`
133
+ - **What it does:** Tags every untagged top-level item in `PRD.md` (User Stories, NFRs,
134
+ Constraints, References, Tests) with a unique 9-character ID code and validates that no
135
+ duplicate tags exist.
136
+ - **Use when:** new PRD items need IDs ("tag user stories", "add IDs to requirements",
137
+ "validate tags"). Run after any manual PRD edit and before artifact generation.
138
+ - **Prerequisites:** `PRD.md`.
139
+ - **Output:** updated `PRD.md` with every item tagged (e.g., `[USHM00003]`, `[NFRHM0012]`,
140
+ `[CONHM0009]`, `[REFHM0003]`), plus a duplicate-tag validation report.
141
+
142
+ ### `util-updprd`
143
+ - **Invoke:** `/util-updprd "<free-form requirement change>" [application:<app>] [module:<module>] [version:<vX.Y.Z>] [--auto-approve]`
144
+ (or `/util-updprd <path/to/prd_updates.md>` for a PRD-Wizard hand-off).
145
+ - **What it does:** Applies a free-form requirement change across all applications' `PRD.md`
146
+ files decomposes the prompt into discrete changes, determines which applications, modules
147
+ and subsections (User Story, NFR, Constraint, Reference, Test) are impacted, and decides per
148
+ item whether to ADD, CANCEL or MODIFY it. Auto-classifies the change as major/minor/patch (or
149
+ accepts an explicit `version:` override, gated to be ≥ each impacted application's current
150
+ highest version) and layers the new/updated items under a NEW version tag on top of the
151
+ existing versions (prior versions immutable). Tags new items via `util-ustagger` and appends
152
+ a `CHANGELOG.md` entry per impacted application. Presents an impact plan for human
153
+ confirmation before writing (skippable with `--auto-approve`). Always stops after updating
154
+ the PRDs never chains into any conductor or generator skill.
155
+ - **Use when:** the user describes a new or changed requirement in plain language ("update
156
+ PRD", "add requirement", "add user story", "cancel user story", "the client wants…"), or the
157
+ PRD Wizard hands off a `prd_updates` markdown.
158
+ - **Prerequisites:** `PRD.md`, `CLAUDE.md`.
159
+ - **Output:** updated `PRD.md` per impacted application (new version tag, ADD/CANCEL/MODIFY
160
+ items), IDs assigned via `util-ustagger`, a `CHANGELOG.md` entry per impacted application,
161
+ plus an impact-analysis plan and completion summary.
162
+
163
+ ---
164
+
165
+ ## Phase 2 — Context Artifact Generation
166
+
167
+ > Run the four steps individually below, or all at once via `conductor-feature-prepare`.
168
+
169
+ ### `conductor-feature-prepare` (orchestrator)
170
+ - **Invoke:** `/conductor-feature-prepare <application> [version:<v>] [module:<m>]`
171
+ - **What it does:** Runs `util-ustagger` `modelgen-*` `mockgen-*` `specgen-*` →
172
+ `testgen-functional` in sequence, auto-selecting the right variant per the application's
173
+ technology stack, tracking progress in `PREPARE_MASTER.md` (read first on resume to skip
174
+ already-completed steps/versions). Multiple versions are processed sequentially in ascending
175
+ semver order. Manages its own Ralph Loop internally for cross-session continuity.
176
+ - **Use when:** "prepare artifacts", "generate context", "prepare for development",
177
+ "resume preparation".
178
+ - **Prerequisites:** `PRD.md`, `CLAUDE.md`.
179
+ - **Output:** the complete `context/` artifact tree — `model/`, `mockup/`, `specification/`
180
+ and `test/` (each as described under its sub-skill below) — plus `CHANGELOG.md` entries: each
181
+ sub-skill appends its own row, and on completion the orchestrator appends an umbrella
182
+ `conductor-feature-prepare` summary row per version (one on top of the sub-skill rows,
183
+ matching `conductor-feature-develop` / `conductor-defect`). Also writes the
184
+ `context/prepare/PREPARE_MASTER.md` progress tracker (inferred config, per-version ×
185
+ per-artifact status) for cross-session resumption.
186
+
187
+ ### `modelgen-relational`
188
+ - **Invoke:** `/modelgen-relational <application> <version> [module:<m>]`
189
+ - **What it does:** Extracts relational (SQL) entity models from user stories using DDD —
190
+ ERD diagrams (Mermaid) + per-module model documentation. Also handles "update/upgrade the
191
+ model" for incremental evolution.
192
+ - **Use when:** the app's datastore is a relational DB (MySQL, PostgreSQL, SQLite …).
193
+ - **Output:** `context/model/` — `MODEL.md` index + per-module `model.md` / `erd.mermaid`.
194
+
195
+ ### `modelgen-nosql`
196
+ - **Invoke:** `/modelgen-nosql <application> <version> [module:<m>]`
197
+ - **What it does:** Extracts NoSQL document models (embed-vs-reference analysis, Mermaid class
198
+ diagrams, JSON schema examples per collection). Database-agnostic (MongoDB, Couchbase,
199
+ DynamoDB, Firestore, CosmosDB).
200
+ - **Use when:** the app's datastore is document-oriented. **Not** for relational schemas —
201
+ use `modelgen-relational`.
202
+ - **Output:** `context/model/` `MODEL.md` index + per-module `model.md` (embed/reference
203
+ decisions), Mermaid class diagram, and `schemas.json` JSON schema examples per collection.
204
+
205
+ ### `mockgen-tailwind`
206
+ - **Invoke:** `/mockgen-tailwind <application> <version> [module:<m>]`
207
+ - **What it does:** Generates HTML mockup screens (Alpine.js + HTMX assets, admin
208
+ dashboard layout, organized by user role) for human designer review. All mockups are
209
+ served by the single shared **Mockup Hub** at `<root>/mockup` — a zero-dependency Node
210
+ server (created/upgraded automatically) with a landing page listing every application
211
+ and role (unclickable until ready) and a configurable port (`PORT` env /
212
+ `mockup.config.json`).
213
+ - **Use when:** mockups are needed and the target stack is server-rendered or plain HTML;
214
+ default mockup generator.
215
+ - **Prerequisites:** `PRD.md`, `modelgen-*` output.
216
+ - **Output:** `context/mockup/` — `MOCKUP.html` index, `mockup-manifest.json`, partials,
217
+ role folders (assets only; no per-app server) + shared hub at `<root>/mockup/`.
218
+
219
+ ### `mockgen-shadcn`
220
+ - **Invoke:** `/mockgen-shadcn <application> <version> [module:<m>]`
221
+ - **What it does:** Generates React + shadcn/ui mockup screens (Vite + React 19 + TypeScript +
222
+ React Router v7, admin dashboard layout, organized by user role) with
223
+ `base`/`basename` = `/{app_slug}/`, builds them (`npm run build`), and serves the `dist/`
224
+ output through the same shared **Mockup Hub** at `<root>/mockup` (Vite dev server remains
225
+ for design iteration only).
226
+ - **Use when:** the target application is React/shadcn-based (pairs naturally with
227
+ `specgen-nextjs-react-tailwind` / `specgen-node-cli-web`).
228
+ - **Prerequisites:** `PRD.md`, `modelgen-*` output.
229
+ - **Output:** `context/mockup/` — `MOCKUP.html` index page, `mockup-manifest.json`, Vite +
230
+ React project files, layout components, vendored shadcn/ui components, role-specific page
231
+ components, and built `dist/` + shared hub at `<root>/mockup/`.
232
+
233
+ ### `specgen-*` Technical Specification Generators
234
+
235
+ All specgens share the same contract: **Invoke** `/specgen-<variant> <application> <version>
236
+ [module:<m>]`; **Prerequisites** `PRD.md` + `modelgen-*` output (+ `mockgen-*` output for
237
+ UI-bearing stacks); **Output** `context/specification/`root `SPECIFICATION.md` + one
238
+ self-contained `SPEC.md` per module (or per command for CLI stacks), with complete code
239
+ samples and traceability tables. **Pick exactly ONE variant, matching the application's
240
+ technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle):
241
+
242
+ | Skill | Pick when the application is… |
243
+ |-------|-------------------------------|
244
+ | `specgen-spring-jpa-jtehtmx` | Spring Boot 3 server-rendered web app (JTE + Tailwind + Alpine.js + htmx, Spring Modulith; optional Keycloak, RabbitMQ, Quartz/Batch, i18n) |
245
+ | `specgen-spring-jpa-restapi` | Spring Boot 3 REST API (Spring Modulith; optional Keycloak resource server / JWT, RabbitMQ, Quartz/Batch) |
246
+ | `specgen-laravel-eloquent-bladehtmx` | Laravel 12 server-rendered web app (Blade + Tailwind + Alpine.js + htmx, nwidart modules; optional Keycloak/Breeze, RabbitMQ, scheduling, i18n) |
247
+ | `specgen-react-mui` | React 19 SPA with Material UI v6 (TypeScript 5, Vite 6, React Router 7, TanStack Query 5, Zustand 5, RHF 7, Zod 3; optional Keycloak/OIDC, WebSocket, i18n, MUI X grids/charts) |
248
+ | `specgen-react-tailwind` | React 19 SPA with Tailwind CSS v3 + Headless UI v2 + Heroicons (same data stack as react-mui, no component framework; optional TanStack Table, Recharts, react-day-picker, Tiptap, reporting) |
249
+ | `specgen-flutter-riverpod` | Flutter 3 mobile app (Dart 3, Riverpod 2, Hive 2, Dio 5, go_router 14, Firebase Messaging, freezed/json_serializable; optional Keycloak PKCE, WebSocket, i18n) |
250
+ | `specgen-ts-cli` | Distributable Node.js CLI **tool** (TypeScript 5, Commander 12, tsup, Zod, chalk/ora; optional prompts, conf/cosmiconfig, SQLite, execa, got, @yao-pkg/pkg binaries) terminal-only, no web UI |
251
+ | `specgen-node-cli-web` | Self-hosted **web application distributed as a global npm CLI** — installed `npm i -g`, started `<app> start`, opened at `http://IP:PORT`. Single Node 22 process: Hono 4 API + embedded pre-built React 19/Vite 6 SPA (Tailwind v4, shadcn/ui), Drizzle + SQLite, hand-rolled scrypt sessions with first-run admin + forced password change, tsup, Biome, Vitest + Playwright with built-binary smoke test |
252
+ | `specgen-sdk-java` | Java SDK **library** wrapping a remote REST API — Maven Multi-Release fat JAR, JDK 8 baseline + JDK 11+ overlay, OkHttp as sole runtime dependency |
253
+
254
+ > **`specgen-ts-cli` vs `specgen-node-cli-web`:** if the deliverable is a terminal tool with
255
+ > commands and flags `specgen-ts-cli`. If the deliverable is a browser-accessed web app that
256
+ > merely *installs and starts* via a CLI → `specgen-node-cli-web`.
257
+
258
+ ⚠️ `specgen-nextjs-react-tailwind` (Next.js 15 App Router) is documented but **not yet
259
+ implemented** (empty stub no SKILL.md). Do not invoke; fall back to `specgen-react-tailwind`
260
+ + a REST API specgen, or ask the user.
261
+
262
+ ### `testgen-functional`
263
+ - **Invoke:** `/testgen-functional <application> <version> [module:<m>]`
264
+ - **What it does:** Generates a Playwright E2E test plan and per-module test specifications as
265
+ Markdown blueprints (scenarios, data seeding, cleanup) — NOT actual test code.
266
+ - **Use when:** "generate test plan/spec", after specgen completes. Last artifact step.
267
+ - **Prerequisites:** `PRD.md`, `modelgen-*`, `mockgen-*`, `specgen-*` outputs.
268
+ - **Output:** `context/test/` — `TEST_PLAN.md`/`TEST_PLAN.mmd` + per-module `TEST_SPEC.md`.
269
+
270
+ ---
271
+
272
+ ## Phase 3 Infrastructure
273
+
274
+ ### `util-preparek8senv`
275
+ - **Invoke:** `/util-preparek8senv [environment]`
276
+ - **What it does:** Generates StatefulSet-based K8s manifests for ALL 3rd party supporting
277
+ applications (databases, queues, caches, SSO, gateways) for one target environment, and
278
+ creates/updates `ENVIRONMENT.md` with per-environment configs and credentials. Output goes
279
+ directly into the gitignored `environment/` folder.
280
+ - **Use when:** "prepare k8s environment", "setup infrastructure" — run BEFORE application
281
+ development so backing services exist.
282
+ - **Prerequisites:** `CLAUDE.md`, `DEVTOOL.md`.
283
+ - **Output:** `ENVIRONMENT.md` (created/updated with per-environment configs and credentials)
284
+ and `environment/` — `namespace.yaml` plus one StatefulSet-based manifest per 3rd party
285
+ application (PVC, ConfigMap, Secret, headless Service, NodePort Service).
286
+
287
+ ### `util-plancicd`
288
+ - **Invoke:** `/util-plancicd <path-to-plan-request-md>`
289
+ - **What it does:** Infers a local-deployment plan for every custom application by reading
290
+ `ENVIRONMENT.md`, `DEVTOOL.md`, `CLAUDE.md` (`# Custom Applications`, `# Port Allocation`)
291
+ and each application's `SPECIFICATION.md`, then decides per application the deployment
292
+ method (container vs. bare process), build/start/stop commands (e.g. Spring Boot jar vs
293
+ Docker image), a deploy method + command (`none` / `web-server` copy / `docker` run /
294
+ `kubernetes` apply only when the environment names a target), port and health-check URL,
295
+ plus a port for the generated CI/CD app itself. Writes `cicd/CICD_PLAN.md` with a top-level
296
+ `**Status**: IN PROGRESS` header flipped to `COMPLETED` when done, for Compound Context
297
+ Studio's watcher and human review. Never generates the CI/CD app itself — that is
298
+ `util-gencicdscript`, gated on the studio stamping an `**Approved**:` line onto the plan.
299
+ - **Use when:** the studio's "Plan deployment" action requests a CI/CD plan ("plan cicd",
300
+ "plan deployment", "cicd plan", "infer deployment").
301
+ - **Prerequisites:** `ENVIRONMENT.md`, `DEVTOOL.md`, `CLAUDE.md`, each application's
302
+ `SPECIFICATION.md`, and the studio-generated plan-request markdown.
303
+ - **Output:** `cicd/CICD_PLAN.md` per-application deployment decisions table plus rationale,
304
+ `**Status**: IN PROGRESS` `COMPLETED`. Hands back to the human for review/approval in the
305
+ studio.
306
+
307
+ ### `util-gencicdscript`
308
+ - **Invoke:** `/util-gencicdscript cicd/CICD_PLAN.md`
309
+ - **What it does:** Generates the self-contained, zero-npm-dependency CI/CD build/run/deploy
310
+ app (`cicd/app/` — `server.js` + `cicd.config.json`) from an APPROVED `cicd/CICD_PLAN.md`.
311
+ Refuses to run unless the plan has `**Status**: COMPLETED` AND an `**Approved**:` line
312
+ (stamped by the studio's Approve button). The generated app is a bare, iframe-embeddable,
313
+ light-themed page with one nav tab per application: a controls bar (status badge, clickable
314
+ app URL opening a new tab, Build / Start / Stop / Deploy buttons running the plan's
315
+ commands) above that application's log streamed live over a built-in zero-dependency
316
+ WebSocket (bounded tail, backpressure-dropped slow clients, trimmed client buffer). Controls
317
+ are disabled for an application that never completed a conductor-develop run (checked via
318
+ the studio's `/api/cicd-guard` endpoint); health/port probing marks already-running apps
319
+ even ones started elsewhere. No version selector: only the latest built applications are
320
+ operated. Writes `cicd/CICD_GENERATION.md` with `**Status**: IN PROGRESS` `COMPLETED` for
321
+ the studio watcher. Idempotent — re-running regenerates `cicd/app/` in place.
322
+ - **Use when:** the plan is approved and the studio requests the CI/CD app be generated
323
+ ("generate cicd", "gen cicd script", "generate ci/cd app", "cicd app").
324
+ - **Prerequisites:** an approved `cicd/CICD_PLAN.md` (`**Status**: COMPLETED` plus an
325
+ `**Approved**:` line).
326
+ - **Output:** `cicd/app/server.js`, `cicd/app/cicd.config.json`, and the
327
+ `cicd/CICD_GENERATION.md` tracking file; appends `cicd/logs/` and `cicd/state.json` to
328
+ `.gitignore`.
329
+
330
+ ---
331
+
332
+ ## Phase 4 — Development
333
+
334
+ ### `conductor-feature-develop` (orchestrator)
335
+ - **Invoke:** `/conductor-feature-develop <application> [version:<v>] [module:<m>]`
336
+ - **What it does:** Implements the full application module-by-module (code + Playwright E2E
337
+ tests) using all generated artifacts, tracking progress in `IMPLEMENTATION_MASTER.md` and
338
+ per-module `IMPLEMENTATION_MODULE.md`. Auto-starts a Ralph Loop for cross-session
339
+ continuity; invokes `tracegen-matrix` and `depgen-k8s` at the end.
340
+ - **Use when:** "implement the application", "start development", "develop from specs",
341
+ "resume implementation".
342
+ - **Prerequisites:** all `conductor-feature-prepare` outputs (model/, mockup/,
343
+ specification/, test/).
344
+ - **Output:** application source code organized by module; `context/develop/` tracking files
345
+ (`IMPLEMENTATION_MASTER.md` with overall status/execution order/pre-implementation
346
+ checklist, and per-module `IMPLEMENTATION_MODULE.md` with resource tables, implementation
347
+ checklists, user-story/NFR completion checklists and timestamped logs); Playwright E2E test
348
+ suite per module; then via auto-invoked sub-skills: `context/TRACEABILITY.md`, `Dockerfile`
349
+ and `k8s/` manifests.
350
+
351
+ ### `tracegen-matrix`
352
+ - **Invoke:** `/tracegen-matrix <application> [version] [module]`
353
+ - **What it does:** Links every PRD requirement ID and bug code to the implementing source
354
+ code and writes `context/TRACEABILITY.md`. Resolves from in-source CO2 comments
355
+ (`Implements:` / `NFR:` / `Constraints:` / `Bug fixes:`) with a name-based fallback;
356
+ optional codebase-memory MCP enrichment (works fully without it).
357
+ - **Use when:** "generate/update traceability", "link requirements to code" — usually invoked
358
+ automatically as the final step of `conductor-feature-develop` and `conductor-defect`.
359
+ - **Prerequisites:** `PRD.md`, `specification/*/SPEC.md`, application source code.
360
+ - **Output:** `context/TRACEABILITY.md` — per-application matrix mapping every requirement ID
361
+ and bug code to the implementing source files.
362
+
363
+ ### `depgen-k8s`
364
+ - **Invoke:** `/depgen-k8s <application> [environment]`
365
+ - **What it does:** Generates a production-ready multi-stage Dockerfile (application root) and
366
+ Kubernetes manifests in the gitignored `<app_folder>/k8s/` for one target environment.
367
+ Auto-detects the stack (Spring Boot / Laravel / Node.js) from project files. Only CUSTOM
368
+ applications — never 3rd party services (those are `util-preparek8senv`'s job).
369
+ - **Use when:** "containerize", "create a Dockerfile", "generate k8s manifests", "deploy this
370
+ app" — auto-invoked by `conductor-feature-develop` after all modules complete.
371
+ - **Prerequisites:** `SPECIFICATION.md`, `CLAUDE.md`, application source code.
372
+ - **Output:** `<app_folder>/Dockerfile` (multi-stage, production-ready) and
373
+ `<app_folder>/k8s/` — namespace, ConfigMap, Secret, Deployment, Service and Ingress YAML
374
+ files with env-var mapping and health/readiness probes (gitignored, per-machine).
375
+
376
+ ---
377
+
378
+ ## Phase 5 — Bug Fixing
379
+
380
+ ### `conductor-defect` (orchestrator)
381
+ - **Invoke:** `/conductor-defect <application> [version:<v>] [module:<m>]`
382
+ - **What it does:** Fixes bugs from `<app_folder>/context/BUG.md` one at a time: tags untagged
383
+ bugs, creates `BUG_MASTER.md`, then per bug — reproduce with Playwright, write
384
+ `BUG_TEST_SPEC.md`, plan (`BUG_FIX_PLAN.md`), fix, verify, and sync affected artifacts
385
+ (mockups, specs, models, PRD). Manages Ralph Loop internally; runs `tracegen-matrix` at the
386
+ end.
387
+ - **Use when:** "fix bugs", "bug fix session", "resolve bugs from BUG.md",
388
+ "resume bug fixing".
389
+ - **Prerequisites:** `BUG.md`, all `conductor-feature-prepare` outputs.
390
+ - **Output:** fixed source code; tagged `BUG.md` (`[BUG-XXX]`); `context/bug/BUG_MASTER.md`
391
+ tracking file (statuses: NEW, IN_PROGRESS, FIXED, CANNOT_REPRODUCE, HIGH_IMPACT); per-bug
392
+ folder `context/bug/<module>/<BUG-XXX>/` with `reproduce.spec.ts`,
393
+ `screenshot_reproduce.png`, `BUG_TEST_SPEC.md`, `BUG_FIX_PLAN.md`, `screenshot_fixed.png`;
394
+ synced artifacts (mockups, specs, models, PRD) and an updated `context/TRACEABILITY.md`.
395
+
396
+ ---
397
+
398
+ ## Quick Decision Table
399
+
400
+ | User intent sounds like… | Invoke |
401
+ |---|---|
402
+ | "start a new project / I have an app idea" | `util-projectinit` (then user runs `/brainstorm-loop`) |
403
+ | "sync folders / CLAUDE.md changed / scaffold PRDs" | `util-projectsync` |
404
+ | "check my requirements / review user stories" | `util-usanalyzer` |
405
+ | "tag the new PRD items / add requirement IDs" | `util-ustagger` |
406
+ | "prepare everything for development" | `conductor-feature-prepare` |
407
+ | "design the data model / ERD" | `modelgen-relational` or `modelgen-nosql` (by datastore) |
408
+ | "generate mockups / UI screens" | `mockgen-tailwind` or `mockgen-shadcn` (by stack) |
409
+ | "write the technical spec" | the ONE `specgen-*` matching the stack (see table) |
410
+ | "generate the test plan" | `testgen-functional` |
411
+ | "set up databases/queues in k8s" | `util-preparek8senv` |
412
+ | "plan deployment / plan cicd" | `util-plancicd` |
413
+ | "generate ci/cd app / generate ci/cd script" | `util-gencicdscript` |
414
+ | "build/implement the app" | `conductor-feature-develop` |
415
+ | "link requirements to code" | `tracegen-matrix` |
416
+ | "dockerize / deploy the app" | `depgen-k8s` |
417
+ | "fix the reported bugs" | `conductor-defect` |