@rashidee/co2 1.2.5 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/index.js +17149 -14962
  2. package/drizzle/0011_workflow_history_v152.sql +5 -0
  3. package/drizzle/0012_prd_sections_v160.sql +14 -0
  4. package/drizzle/0013_brainstorm_sessions_v170.sql +10 -0
  5. package/drizzle/0014_bug_module_v180.sql +4 -0
  6. package/drizzle/0015_project_config_v190.sql +23 -0
  7. package/drizzle/0016_cicd_v2100.sql +22 -0
  8. package/drizzle/meta/_journal.json +42 -0
  9. package/package.json +1 -1
  10. package/plugin/README.md +2 -0
  11. package/plugin/SKILLS.md +414 -350
  12. package/plugin/skills/conductor-feature-develop/SKILL.md +1 -1
  13. package/plugin/skills/conductor-feature-prepare/SKILL.md +1 -1
  14. package/plugin/skills/depgen-k8s/SKILL.md +1 -1
  15. package/plugin/skills/tracegen-matrix/SKILL.md +1 -1
  16. package/plugin/skills/util-gencicdscript/SKILL.md +91 -0
  17. package/plugin/skills/util-gencicdscript/references/cicd-app-template.md +414 -0
  18. package/plugin/skills/util-plancicd/SKILL.md +130 -0
  19. package/plugin/skills/util-projectinit/SKILL.md +1 -1
  20. package/plugin/skills/util-projectsync/SKILL.md +1 -1
  21. package/plugin/skills/util-updprd/SKILL.md +85 -15
  22. package/plugin/skills/util-usanalyzer/SKILL.md +1 -1
  23. package/plugin/skills/util-ustagger/SKILL.md +1 -1
  24. package/static/assets/{abnfDiagram-VRR7QNED-DvPuwyCV.js → abnfDiagram-VRR7QNED-pIypz8mS.js} +1 -1
  25. package/static/assets/{arc-DRKw7sjs.js → arc-DzTLPg59.js} +1 -1
  26. package/static/assets/{architectureDiagram-ZJ3FMSHR-CaNcxUbC.js → architectureDiagram-ZJ3FMSHR-CuC9-Bft.js} +1 -1
  27. package/static/assets/{blockDiagram-677ZJIJ3-Demd4AOK.js → blockDiagram-677ZJIJ3-DcerPwn1.js} +1 -1
  28. package/static/assets/{c4Diagram-LMCZKHZV-PVKUfc2x.js → c4Diagram-LMCZKHZV-aH--jsPu.js} +1 -1
  29. package/static/assets/channel-2AGSySJb.js +1 -0
  30. package/static/assets/{chunk-2Q5K7J3B-CExf8ww_.js → chunk-2Q5K7J3B-6kmvWwD5.js} +1 -1
  31. package/static/assets/{chunk-32BRIVSS-CFPaoONF.js → chunk-32BRIVSS-Dgk5Y2Hd.js} +1 -1
  32. package/static/assets/{chunk-5VM5RSS4-DE2esM67.js → chunk-5VM5RSS4-DISUWWIg.js} +1 -1
  33. package/static/assets/{chunk-EX3LRPZG-SON_YdDG.js → chunk-EX3LRPZG-CptcVUzS.js} +1 -1
  34. package/static/assets/{chunk-JWPE2WC7-Qxah8LNr.js → chunk-JWPE2WC7-DpOM2Td1.js} +1 -1
  35. package/static/assets/{chunk-MOJQB5TN-BcWGQV3j.js → chunk-MOJQB5TN-D0mE8XQJ.js} +1 -1
  36. package/static/assets/{chunk-RYQCIY6F-DkDj-OR5.js → chunk-RYQCIY6F-6tMpp_wE.js} +1 -1
  37. package/static/assets/{chunk-V7JOEXUC-BlI1Mrah.js → chunk-V7JOEXUC-DlhAClLX.js} +1 -1
  38. package/static/assets/{chunk-VR4S4FIN-Agf__duj.js → chunk-VR4S4FIN-CnRRTJhL.js} +1 -1
  39. package/static/assets/{chunk-XXDRQBXY-B5CfAh85.js → chunk-XXDRQBXY-BjHtDhhp.js} +1 -1
  40. package/static/assets/classDiagram-OUVF2IWQ-DfuKvXel.js +1 -0
  41. package/static/assets/classDiagram-v2-EOCWNBFH-DfuKvXel.js +1 -0
  42. package/static/assets/{cose-bilkent-JH36ORCC-DO0cQkcy.js → cose-bilkent-JH36ORCC-ywkSH5WV.js} +1 -1
  43. package/static/assets/{cynefin-VYW2F7L2-CfOnsnXc.js → cynefin-VYW2F7L2-rNCSrA_M.js} +1 -1
  44. package/static/assets/{cynefinDiagram-TSTJHNR4-BJ8tULAv.js → cynefinDiagram-TSTJHNR4-CTO-xyj0.js} +1 -1
  45. package/static/assets/{dagre-VKFMJZFB-DfjwzHqP.js → dagre-VKFMJZFB-DXWjc-x2.js} +1 -1
  46. package/static/assets/{diagram-FQU43EPY-CndSOIIM.js → diagram-FQU43EPY-B6Yg08kE.js} +1 -1
  47. package/static/assets/{diagram-G47NLZAW-Czf5hN0Z.js → diagram-G47NLZAW-FdzgI0QA.js} +1 -1
  48. package/static/assets/{diagram-NH7WQ7WH-COAyojGh.js → diagram-NH7WQ7WH-C7MRGBLI.js} +1 -1
  49. package/static/assets/{diagram-OA4YK3LP-H8PoiN2m.js → diagram-OA4YK3LP-xpJMJx9r.js} +1 -1
  50. package/static/assets/{diagram-WEI45ONY-DzcaVzjp.js → diagram-WEI45ONY-D5PmiZy-.js} +1 -1
  51. package/static/assets/{ebnfDiagram-CCIWWBDH-DPazGYLJ.js → ebnfDiagram-CCIWWBDH-DJzkD6Lj.js} +1 -1
  52. package/static/assets/{erDiagram-Q63AITRT-Bo-fubgF.js → erDiagram-Q63AITRT-D24quzu9.js} +1 -1
  53. package/static/assets/{flowDiagram-23GEKE2U-CSvxUDwh.js → flowDiagram-23GEKE2U-2wLf_cAi.js} +1 -1
  54. package/static/assets/{ganttDiagram-NO4QXBWP-DnBveWX6.js → ganttDiagram-NO4QXBWP-hjpg1Ww8.js} +1 -1
  55. package/static/assets/{gitGraphDiagram-IHSO6WYX-B3rVL8c-.js → gitGraphDiagram-IHSO6WYX-Zm2bxgq8.js} +1 -1
  56. package/static/assets/{index-y7XDSgMG.js → index-CMSll7Xn.js} +173 -172
  57. package/static/assets/{index-LZSQkLE2.css → index-Dn_JY-18.css} +1 -1
  58. package/static/assets/{infoDiagram-FWYZ7A6U-CvWV9yy2.js → infoDiagram-FWYZ7A6U-5eq5DfJX.js} +1 -1
  59. package/static/assets/{ishikawaDiagram-FXEZZL3T-DF28a1N6.js → ishikawaDiagram-FXEZZL3T-BqBn7GDQ.js} +1 -1
  60. package/static/assets/{journeyDiagram-5HDEW3XC-CB6CugYk.js → journeyDiagram-5HDEW3XC-C6AceyMG.js} +1 -1
  61. package/static/assets/{kanban-definition-HUTT4EX6-ResSLF6d.js → kanban-definition-HUTT4EX6-BeQ_o04F.js} +1 -1
  62. package/static/assets/{linear-CLO--ryk.js → linear-CX49V_yy.js} +1 -1
  63. package/static/assets/{mindmap-definition-LN4V7U3C-BvW3EbxX.js → mindmap-definition-LN4V7U3C-CVzByupH.js} +1 -1
  64. package/static/assets/{pegDiagram-2B236MQR-BHCgqrrM.js → pegDiagram-2B236MQR-GuHmU0j3.js} +1 -1
  65. package/static/assets/{pieDiagram-ENE6RG2P-DVmCQ5FA.js → pieDiagram-ENE6RG2P-BKOiteQS.js} +1 -1
  66. package/static/assets/{quadrantDiagram-ABIIQ3AL-B3e5KR52.js → quadrantDiagram-ABIIQ3AL-CNtd5BPA.js} +1 -1
  67. package/static/assets/{railroadDiagram-RFXS5EU6-Csv5ysLc.js → railroadDiagram-RFXS5EU6-D4gIQQiY.js} +1 -1
  68. package/static/assets/{requirementDiagram-TGXJPOKE-DOMVzvnB.js → requirementDiagram-TGXJPOKE-BYokGs63.js} +1 -1
  69. package/static/assets/{sankeyDiagram-HTMAVEWB-B1dcTOvy.js → sankeyDiagram-HTMAVEWB-5RLXfMzy.js} +1 -1
  70. package/static/assets/{sequenceDiagram-DBY2YBRQ-BY414yeO.js → sequenceDiagram-DBY2YBRQ-DugFTncH.js} +1 -1
  71. package/static/assets/{sizeCapture-X5ZJPWSS-CuJfrfBN.js → sizeCapture-X5ZJPWSS-cCLHi08w.js} +1 -1
  72. package/static/assets/{stateDiagram-2N3HPSRC-FX4rJkzV.js → stateDiagram-2N3HPSRC-DQnxouNu.js} +1 -1
  73. package/static/assets/stateDiagram-v2-6OUMAXLB-BsTf558I.js +1 -0
  74. package/static/assets/{swimlanes-5IMT3BWC-Sfy58mmv.js → swimlanes-5IMT3BWC-CET7P2RH.js} +2 -2
  75. package/static/assets/swimlanesDiagram-G3AALYLV-Crsci1-o.js +8 -0
  76. package/static/assets/{timeline-definition-FHXFAJF6-CmV7by8p.js → timeline-definition-FHXFAJF6-49T4daxW.js} +1 -1
  77. package/static/assets/{vennDiagram-L72KCM5P-FqIyFZFt.js → vennDiagram-L72KCM5P-FqAF-S_r.js} +1 -1
  78. package/static/assets/{wardleyDiagram-EHGQE667-BZ06O45i.js → wardleyDiagram-EHGQE667-C9Du1lj9.js} +1 -1
  79. package/static/assets/{xychartDiagram-FW5EYKEG-BOkffR06.js → xychartDiagram-FW5EYKEG-CY-hJxel.js} +1 -1
  80. package/static/index.html +2 -2
  81. package/plugin/skills/util-preparek8senv/SKILL.md +0 -422
  82. package/static/assets/channel-C2nVbuwv.js +0 -1
  83. package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +0 -1
  84. package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +0 -1
  85. package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +0 -1
  86. package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +0 -8
package/plugin/SKILLS.md CHANGED
@@ -1,350 +1,414 @@
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 3 — Infrastructure
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 per
181
+ step and the `context/prepare/PREPARE_MASTER.md` progress tracker (inferred config, per-version
182
+ × per-artifact status) for cross-session resumption.
183
+
184
+ ### `modelgen-relational`
185
+ - **Invoke:** `/modelgen-relational <application> <version> [module:<m>]`
186
+ - **What it does:** Extracts relational (SQL) entity models from user stories using DDD —
187
+ ERD diagrams (Mermaid) + per-module model documentation. Also handles "update/upgrade the
188
+ model" for incremental evolution.
189
+ - **Use when:** the app's datastore is a relational DB (MySQL, PostgreSQL, SQLite …).
190
+ - **Output:** `context/model/` — `MODEL.md` index + per-module `model.md` / `erd.mermaid`.
191
+
192
+ ### `modelgen-nosql`
193
+ - **Invoke:** `/modelgen-nosql <application> <version> [module:<m>]`
194
+ - **What it does:** Extracts NoSQL document models (embed-vs-reference analysis, Mermaid class
195
+ diagrams, JSON schema examples per collection). Database-agnostic (MongoDB, Couchbase,
196
+ DynamoDB, Firestore, CosmosDB).
197
+ - **Use when:** the app's datastore is document-oriented. **Not** for relational schemas —
198
+ use `modelgen-relational`.
199
+ - **Output:** `context/model/` `MODEL.md` index + per-module `model.md` (embed/reference
200
+ decisions), Mermaid class diagram, and `schemas.json` JSON schema examples per collection.
201
+
202
+ ### `mockgen-tailwind`
203
+ - **Invoke:** `/mockgen-tailwind <application> <version> [module:<m>]`
204
+ - **What it does:** Generates HTML mockup screens (Alpine.js + HTMX assets, admin
205
+ dashboard layout, organized by user role) for human designer review. All mockups are
206
+ served by the single shared **Mockup Hub** at `<root>/mockup` — a zero-dependency Node
207
+ server (created/upgraded automatically) with a landing page listing every application
208
+ and role (unclickable until ready) and a configurable port (`PORT` env /
209
+ `mockup.config.json`).
210
+ - **Use when:** mockups are needed and the target stack is server-rendered or plain HTML;
211
+ default mockup generator.
212
+ - **Prerequisites:** `PRD.md`, `modelgen-*` output.
213
+ - **Output:** `context/mockup/` `MOCKUP.html` index, `mockup-manifest.json`, partials,
214
+ role folders (assets only; no per-app server) + shared hub at `<root>/mockup/`.
215
+
216
+ ### `mockgen-shadcn`
217
+ - **Invoke:** `/mockgen-shadcn <application> <version> [module:<m>]`
218
+ - **What it does:** Generates React + shadcn/ui mockup screens (Vite + React 19 + TypeScript +
219
+ React Router v7, admin dashboard layout, organized by user role) with
220
+ `base`/`basename` = `/{app_slug}/`, builds them (`npm run build`), and serves the `dist/`
221
+ output through the same shared **Mockup Hub** at `<root>/mockup` (Vite dev server remains
222
+ for design iteration only).
223
+ - **Use when:** the target application is React/shadcn-based (pairs naturally with
224
+ `specgen-nextjs-react-tailwind` / `specgen-node-cli-web`).
225
+ - **Prerequisites:** `PRD.md`, `modelgen-*` output.
226
+ - **Output:** `context/mockup/` `MOCKUP.html` index page, `mockup-manifest.json`, Vite +
227
+ React project files, layout components, vendored shadcn/ui components, role-specific page
228
+ components, and built `dist/` + shared hub at `<root>/mockup/`.
229
+
230
+ ### `specgen-*`Technical Specification Generators
231
+
232
+ All specgens share the same contract: **Invoke** `/specgen-<variant> <application> <version>
233
+ [module:<m>]`; **Prerequisites** `PRD.md` + `modelgen-*` output (+ `mockgen-*` output for
234
+ UI-bearing stacks); **Output** `context/specification/` root `SPECIFICATION.md` + one
235
+ self-contained `SPEC.md` per module (or per command for CLI stacks), with complete code
236
+ samples and traceability tables. **Pick exactly ONE variant, matching the application's
237
+ technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle):
238
+
239
+ | Skill | Pick when the application is… |
240
+ |-------|-------------------------------|
241
+ | `specgen-spring-jpa-jtehtmx` | Spring Boot 3 server-rendered web app (JTE + Tailwind + Alpine.js + htmx, Spring Modulith; optional Keycloak, RabbitMQ, Quartz/Batch, i18n) |
242
+ | `specgen-spring-jpa-restapi` | Spring Boot 3 REST API (Spring Modulith; optional Keycloak resource server / JWT, RabbitMQ, Quartz/Batch) |
243
+ | `specgen-laravel-eloquent-bladehtmx` | Laravel 12 server-rendered web app (Blade + Tailwind + Alpine.js + htmx, nwidart modules; optional Keycloak/Breeze, RabbitMQ, scheduling, i18n) |
244
+ | `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) |
245
+ | `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) |
246
+ | `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) |
247
+ | `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 |
248
+ | `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 |
249
+ | `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 |
250
+
251
+ > **`specgen-ts-cli` vs `specgen-node-cli-web`:** if the deliverable is a terminal tool with
252
+ > commands and flags → `specgen-ts-cli`. If the deliverable is a browser-accessed web app that
253
+ > merely *installs and starts* via a CLI → `specgen-node-cli-web`.
254
+
255
+ ⚠️ `specgen-nextjs-react-tailwind` (Next.js 15 App Router) is documented but **not yet
256
+ implemented** (empty stub — no SKILL.md). Do not invoke; fall back to `specgen-react-tailwind`
257
+ + a REST API specgen, or ask the user.
258
+
259
+ ### `testgen-functional`
260
+ - **Invoke:** `/testgen-functional <application> <version> [module:<m>]`
261
+ - **What it does:** Generates a Playwright E2E test plan and per-module test specifications as
262
+ Markdown blueprints (scenarios, data seeding, cleanup) NOT actual test code.
263
+ - **Use when:** "generate test plan/spec", after specgen completes. Last artifact step.
264
+ - **Prerequisites:** `PRD.md`, `modelgen-*`, `mockgen-*`, `specgen-*` outputs.
265
+ - **Output:** `context/test/` — `TEST_PLAN.md`/`TEST_PLAN.mmd` + per-module `TEST_SPEC.md`.
266
+
267
+ ---
268
+
269
+ ## Phase 3 — Infrastructure
270
+
271
+ ### `util-preparek8senv`
272
+ - **Invoke:** `/util-preparek8senv [environment]`
273
+ - **What it does:** Generates StatefulSet-based K8s manifests for ALL 3rd party supporting
274
+ applications (databases, queues, caches, SSO, gateways) for one target environment, and
275
+ creates/updates `ENVIRONMENT.md` with per-environment configs and credentials. Output goes
276
+ directly into the gitignored `environment/` folder.
277
+ - **Use when:** "prepare k8s environment", "setup infrastructure" — run BEFORE application
278
+ development so backing services exist.
279
+ - **Prerequisites:** `CLAUDE.md`, `DEVTOOL.md`.
280
+ - **Output:** `ENVIRONMENT.md` (created/updated with per-environment configs and credentials)
281
+ and `environment/` `namespace.yaml` plus one StatefulSet-based manifest per 3rd party
282
+ application (PVC, ConfigMap, Secret, headless Service, NodePort Service).
283
+
284
+ ### `util-plancicd`
285
+ - **Invoke:** `/util-plancicd <path-to-plan-request-md>`
286
+ - **What it does:** Infers a local-deployment plan for every custom application by reading
287
+ `ENVIRONMENT.md`, `DEVTOOL.md`, `CLAUDE.md` (`# Custom Applications`, `# Port Allocation`)
288
+ and each application's `SPECIFICATION.md`, then decides per application the deployment
289
+ method (container vs. bare process), build/start/stop commands (e.g. Spring Boot jar vs
290
+ Docker image), a deploy method + command (`none` / `web-server` copy / `docker` run /
291
+ `kubernetes` apply only when the environment names a target), port and health-check URL,
292
+ plus a port for the generated CI/CD app itself. Writes `cicd/CICD_PLAN.md` with a top-level
293
+ `**Status**: IN PROGRESS` header flipped to `COMPLETED` when done, for Compound Context
294
+ Studio's watcher and human review. Never generates the CI/CD app itself — that is
295
+ `util-gencicdscript`, gated on the studio stamping an `**Approved**:` line onto the plan.
296
+ - **Use when:** the studio's "Plan deployment" action requests a CI/CD plan ("plan cicd",
297
+ "plan deployment", "cicd plan", "infer deployment").
298
+ - **Prerequisites:** `ENVIRONMENT.md`, `DEVTOOL.md`, `CLAUDE.md`, each application's
299
+ `SPECIFICATION.md`, and the studio-generated plan-request markdown.
300
+ - **Output:** `cicd/CICD_PLAN.md` per-application deployment decisions table plus rationale,
301
+ `**Status**: IN PROGRESS` → `COMPLETED`. Hands back to the human for review/approval in the
302
+ studio.
303
+
304
+ ### `util-gencicdscript`
305
+ - **Invoke:** `/util-gencicdscript cicd/CICD_PLAN.md`
306
+ - **What it does:** Generates the self-contained, zero-npm-dependency CI/CD build/run/deploy
307
+ app (`cicd/app/` `server.js` + `cicd.config.json`) from an APPROVED `cicd/CICD_PLAN.md`.
308
+ Refuses to run unless the plan has `**Status**: COMPLETED` AND an `**Approved**:` line
309
+ (stamped by the studio's Approve button). The generated app is a bare, iframe-embeddable,
310
+ light-themed page with one nav tab per application: a controls bar (status badge, clickable
311
+ app URL opening a new tab, Build / Start / Stop / Deploy buttons running the plan's
312
+ commands) above that application's log streamed live over a built-in zero-dependency
313
+ WebSocket (bounded tail, backpressure-dropped slow clients, trimmed client buffer). Controls
314
+ are disabled for an application that never completed a conductor-develop run (checked via
315
+ the studio's `/api/cicd-guard` endpoint); health/port probing marks already-running apps —
316
+ even ones started elsewhere. No version selector: only the latest built applications are
317
+ operated. Writes `cicd/CICD_GENERATION.md` with `**Status**: IN PROGRESS` `COMPLETED` for
318
+ the studio watcher. Idempotent re-running regenerates `cicd/app/` in place.
319
+ - **Use when:** the plan is approved and the studio requests the CI/CD app be generated
320
+ ("generate cicd", "gen cicd script", "generate ci/cd app", "cicd app").
321
+ - **Prerequisites:** an approved `cicd/CICD_PLAN.md` (`**Status**: COMPLETED` plus an
322
+ `**Approved**:` line).
323
+ - **Output:** `cicd/app/server.js`, `cicd/app/cicd.config.json`, and the
324
+ `cicd/CICD_GENERATION.md` tracking file; appends `cicd/logs/` and `cicd/state.json` to
325
+ `.gitignore`.
326
+
327
+ ---
328
+
329
+ ## Phase 4 Development
330
+
331
+ ### `conductor-feature-develop` (orchestrator)
332
+ - **Invoke:** `/conductor-feature-develop <application> [version:<v>] [module:<m>]`
333
+ - **What it does:** Implements the full application module-by-module (code + Playwright E2E
334
+ tests) using all generated artifacts, tracking progress in `IMPLEMENTATION_MASTER.md` and
335
+ per-module `IMPLEMENTATION_MODULE.md`. Auto-starts a Ralph Loop for cross-session
336
+ continuity; invokes `tracegen-matrix` and `depgen-k8s` at the end.
337
+ - **Use when:** "implement the application", "start development", "develop from specs",
338
+ "resume implementation".
339
+ - **Prerequisites:** all `conductor-feature-prepare` outputs (model/, mockup/,
340
+ specification/, test/).
341
+ - **Output:** application source code organized by module; `context/develop/` tracking files
342
+ (`IMPLEMENTATION_MASTER.md` with overall status/execution order/pre-implementation
343
+ checklist, and per-module `IMPLEMENTATION_MODULE.md` with resource tables, implementation
344
+ checklists, user-story/NFR completion checklists and timestamped logs); Playwright E2E test
345
+ suite per module; then via auto-invoked sub-skills: `context/TRACEABILITY.md`, `Dockerfile`
346
+ and `k8s/` manifests.
347
+
348
+ ### `tracegen-matrix`
349
+ - **Invoke:** `/tracegen-matrix <application> [version] [module]`
350
+ - **What it does:** Links every PRD requirement ID and bug code to the implementing source
351
+ code and writes `context/TRACEABILITY.md`. Resolves from in-source CO2 comments
352
+ (`Implements:` / `NFR:` / `Constraints:` / `Bug fixes:`) with a name-based fallback;
353
+ optional codebase-memory MCP enrichment (works fully without it).
354
+ - **Use when:** "generate/update traceability", "link requirements to code" — usually invoked
355
+ automatically as the final step of `conductor-feature-develop` and `conductor-defect`.
356
+ - **Prerequisites:** `PRD.md`, `specification/*/SPEC.md`, application source code.
357
+ - **Output:** `context/TRACEABILITY.md` — per-application matrix mapping every requirement ID
358
+ and bug code to the implementing source files.
359
+
360
+ ### `depgen-k8s`
361
+ - **Invoke:** `/depgen-k8s <application> [environment]`
362
+ - **What it does:** Generates a production-ready multi-stage Dockerfile (application root) and
363
+ Kubernetes manifests in the gitignored `<app_folder>/k8s/` for one target environment.
364
+ Auto-detects the stack (Spring Boot / Laravel / Node.js) from project files. Only CUSTOM
365
+ applications — never 3rd party services (those are `util-preparek8senv`'s job).
366
+ - **Use when:** "containerize", "create a Dockerfile", "generate k8s manifests", "deploy this
367
+ app" — auto-invoked by `conductor-feature-develop` after all modules complete.
368
+ - **Prerequisites:** `SPECIFICATION.md`, `CLAUDE.md`, application source code.
369
+ - **Output:** `<app_folder>/Dockerfile` (multi-stage, production-ready) and
370
+ `<app_folder>/k8s/` — namespace, ConfigMap, Secret, Deployment, Service and Ingress YAML
371
+ files with env-var mapping and health/readiness probes (gitignored, per-machine).
372
+
373
+ ---
374
+
375
+ ## Phase 5 — Bug Fixing
376
+
377
+ ### `conductor-defect` (orchestrator)
378
+ - **Invoke:** `/conductor-defect <application> [version:<v>] [module:<m>]`
379
+ - **What it does:** Fixes bugs from `<app_folder>/context/BUG.md` one at a time: tags untagged
380
+ bugs, creates `BUG_MASTER.md`, then per bug — reproduce with Playwright, write
381
+ `BUG_TEST_SPEC.md`, plan (`BUG_FIX_PLAN.md`), fix, verify, and sync affected artifacts
382
+ (mockups, specs, models, PRD). Manages Ralph Loop internally; runs `tracegen-matrix` at the
383
+ end.
384
+ - **Use when:** "fix bugs", "bug fix session", "resolve bugs from BUG.md",
385
+ "resume bug fixing".
386
+ - **Prerequisites:** `BUG.md`, all `conductor-feature-prepare` outputs.
387
+ - **Output:** fixed source code; tagged `BUG.md` (`[BUG-XXX]`); `context/bug/BUG_MASTER.md`
388
+ tracking file (statuses: NEW, IN_PROGRESS, FIXED, CANNOT_REPRODUCE, HIGH_IMPACT); per-bug
389
+ folder `context/bug/<module>/<BUG-XXX>/` with `reproduce.spec.ts`,
390
+ `screenshot_reproduce.png`, `BUG_TEST_SPEC.md`, `BUG_FIX_PLAN.md`, `screenshot_fixed.png`;
391
+ synced artifacts (mockups, specs, models, PRD) and an updated `context/TRACEABILITY.md`.
392
+
393
+ ---
394
+
395
+ ## Quick Decision Table
396
+
397
+ | User intent sounds like… | Invoke |
398
+ |---|---|
399
+ | "start a new project / I have an app idea" | `util-projectinit` (then user runs `/brainstorm-loop`) |
400
+ | "sync folders / CLAUDE.md changed / scaffold PRDs" | `util-projectsync` |
401
+ | "check my requirements / review user stories" | `util-usanalyzer` |
402
+ | "tag the new PRD items / add requirement IDs" | `util-ustagger` |
403
+ | "prepare everything for development" | `conductor-feature-prepare` |
404
+ | "design the data model / ERD" | `modelgen-relational` or `modelgen-nosql` (by datastore) |
405
+ | "generate mockups / UI screens" | `mockgen-tailwind` or `mockgen-shadcn` (by stack) |
406
+ | "write the technical spec" | the ONE `specgen-*` matching the stack (see table) |
407
+ | "generate the test plan" | `testgen-functional` |
408
+ | "set up databases/queues in k8s" | `util-preparek8senv` |
409
+ | "plan deployment / plan cicd" | `util-plancicd` |
410
+ | "generate ci/cd app / generate ci/cd script" | `util-gencicdscript` |
411
+ | "build/implement the app" | `conductor-feature-develop` |
412
+ | "link requirements to code" | `tracegen-matrix` |
413
+ | "dockerize / deploy the app" | `depgen-k8s` |
414
+ | "fix the reported bugs" | `conductor-defect` |