@rashidee/co2 1.3.11 → 1.3.13

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 (77) 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/index.js +254 -73
  5. package/package.json +41 -41
  6. package/plugin/.claude-plugin/marketplace.json +1 -1
  7. package/plugin/.claude-plugin/plugin.json +1 -1
  8. package/plugin/README.md +3 -1
  9. package/plugin/SKILLS.md +5 -2
  10. package/plugin/skills/conductor-feature-develop/SKILL.md +13 -0
  11. package/plugin/skills/conductor-feature-prepare/SKILL.md +39 -11
  12. package/plugin/skills/specgen-custom/SKILL.md +442 -0
  13. package/plugin/skills/specgen-custom/references/spec-template.md +271 -0
  14. package/plugin/skills/specgen-custom/references/stack-doc-template.md +154 -0
  15. package/plugin/skills/util-gencicdscript/references/cicd-app-template.md +798 -796
  16. package/plugin/skills/util-plancicd/SKILL.md +1 -1
  17. package/static/assets/{abnfDiagram-VRR7QNED-DBzgA_2G.js → abnfDiagram-VRR7QNED-Qm0Wk_H_.js} +1 -1
  18. package/static/assets/{arc-Bc02_4l6.js → arc-Cfk6Kt0D.js} +1 -1
  19. package/static/assets/{architectureDiagram-ZJ3FMSHR-ixN9wSDW.js → architectureDiagram-ZJ3FMSHR-DQTlZaUK.js} +1 -1
  20. package/static/assets/{blockDiagram-677ZJIJ3-Ob4lZkCY.js → blockDiagram-677ZJIJ3-D-4ibdoX.js} +1 -1
  21. package/static/assets/{c4Diagram-LMCZKHZV-BeJY3Zks.js → c4Diagram-LMCZKHZV-CHuqcdJm.js} +1 -1
  22. package/static/assets/channel-H9DRrduO.js +1 -0
  23. package/static/assets/{chunk-2Q5K7J3B-DTFIWNGb.js → chunk-2Q5K7J3B-MB9pWQe1.js} +1 -1
  24. package/static/assets/{chunk-32BRIVSS-DLTvoPpT.js → chunk-32BRIVSS-BttYlwU1.js} +1 -1
  25. package/static/assets/{chunk-5VM5RSS4-BKlvf6hI.js → chunk-5VM5RSS4-oyt0Tagd.js} +1 -1
  26. package/static/assets/{chunk-EX3LRPZG-B9ej8_ma.js → chunk-EX3LRPZG-DaTxdTWl.js} +1 -1
  27. package/static/assets/{chunk-JWPE2WC7-DAYaiy17.js → chunk-JWPE2WC7-CNgDxPAD.js} +1 -1
  28. package/static/assets/{chunk-MOJQB5TN-D6rRKzWc.js → chunk-MOJQB5TN-CoAudO3B.js} +1 -1
  29. package/static/assets/{chunk-RYQCIY6F-CE4CHN6p.js → chunk-RYQCIY6F-BrkDEEha.js} +1 -1
  30. package/static/assets/{chunk-V7JOEXUC-BR-Kl6S2.js → chunk-V7JOEXUC-D14rGvBO.js} +1 -1
  31. package/static/assets/{chunk-VR4S4FIN-Bo9J3WGe.js → chunk-VR4S4FIN-CAtas2vF.js} +1 -1
  32. package/static/assets/{chunk-XXDRQBXY-DjI5dJHR.js → chunk-XXDRQBXY-DcVAnNUQ.js} +1 -1
  33. package/static/assets/classDiagram-OUVF2IWQ-DRNPM383.js +1 -0
  34. package/static/assets/classDiagram-v2-EOCWNBFH-DRNPM383.js +1 -0
  35. package/static/assets/{cose-bilkent-JH36ORCC-DLciz-3w.js → cose-bilkent-JH36ORCC-B7y4MI6Z.js} +1 -1
  36. package/static/assets/{cynefin-VYW2F7L2-DqfVJKpm.js → cynefin-VYW2F7L2-D2mnk-iJ.js} +1 -1
  37. package/static/assets/{cynefinDiagram-TSTJHNR4-D14oLdNM.js → cynefinDiagram-TSTJHNR4-DNzQJhG7.js} +1 -1
  38. package/static/assets/{dagre-VKFMJZFB-BduMbW80.js → dagre-VKFMJZFB-NMSyTo8N.js} +1 -1
  39. package/static/assets/{diagram-FQU43EPY-CLQg7RWT.js → diagram-FQU43EPY-CdqS5Ike.js} +1 -1
  40. package/static/assets/{diagram-G47NLZAW-Dq3Ymr1b.js → diagram-G47NLZAW-Bsb4T5JI.js} +1 -1
  41. package/static/assets/{diagram-NH7WQ7WH-BPjov8S5.js → diagram-NH7WQ7WH-Z-PyzBSC.js} +1 -1
  42. package/static/assets/{diagram-OA4YK3LP-BgQgpiJD.js → diagram-OA4YK3LP-BZBTYbxg.js} +1 -1
  43. package/static/assets/{diagram-WEI45ONY-BeOPSl27.js → diagram-WEI45ONY-BL2LA5H_.js} +1 -1
  44. package/static/assets/{ebnfDiagram-CCIWWBDH-DFsTw8OM.js → ebnfDiagram-CCIWWBDH-BGtukMeo.js} +1 -1
  45. package/static/assets/{erDiagram-Q63AITRT-scBEBawL.js → erDiagram-Q63AITRT-B6OJ4YCl.js} +1 -1
  46. package/static/assets/{flowDiagram-23GEKE2U-BfX-2ZO-.js → flowDiagram-23GEKE2U-BBkMgJ1i.js} +1 -1
  47. package/static/assets/{ganttDiagram-NO4QXBWP-BR5IJ1mv.js → ganttDiagram-NO4QXBWP-Cv8KHFBD.js} +1 -1
  48. package/static/assets/{gitGraphDiagram-IHSO6WYX-zPu_QDUM.js → gitGraphDiagram-IHSO6WYX-hYxDNjWx.js} +1 -1
  49. package/static/assets/{index-Dnp-sAA_.js → index-DnYGyYET.js} +81 -79
  50. package/static/assets/{infoDiagram-FWYZ7A6U-CpyKTQb9.js → infoDiagram-FWYZ7A6U-WuQIiedv.js} +1 -1
  51. package/static/assets/{ishikawaDiagram-FXEZZL3T-C2SXt-2Y.js → ishikawaDiagram-FXEZZL3T-BJGOD-IY.js} +1 -1
  52. package/static/assets/{journeyDiagram-5HDEW3XC-DJavk0C4.js → journeyDiagram-5HDEW3XC-Ba_NXseS.js} +1 -1
  53. package/static/assets/{kanban-definition-HUTT4EX6-xN4pVGL7.js → kanban-definition-HUTT4EX6-C5RMm9uF.js} +1 -1
  54. package/static/assets/{linear-BMWKojRX.js → linear-CLKppNoj.js} +1 -1
  55. package/static/assets/{mindmap-definition-LN4V7U3C-DOaDf7u0.js → mindmap-definition-LN4V7U3C-ClSG_qmQ.js} +1 -1
  56. package/static/assets/{pegDiagram-2B236MQR-B1px906A.js → pegDiagram-2B236MQR-C_JEZqk3.js} +1 -1
  57. package/static/assets/{pieDiagram-ENE6RG2P-s0vEagFS.js → pieDiagram-ENE6RG2P-D0lx7wDi.js} +1 -1
  58. package/static/assets/{quadrantDiagram-ABIIQ3AL-BEhIl8IZ.js → quadrantDiagram-ABIIQ3AL-BBKy0PVs.js} +1 -1
  59. package/static/assets/{railroadDiagram-RFXS5EU6-fFsin92S.js → railroadDiagram-RFXS5EU6-C1Badu5q.js} +1 -1
  60. package/static/assets/{requirementDiagram-TGXJPOKE-Cf9J7tii.js → requirementDiagram-TGXJPOKE-1j59jBQH.js} +1 -1
  61. package/static/assets/{sankeyDiagram-HTMAVEWB-Cy5gaZqM.js → sankeyDiagram-HTMAVEWB-BLR5S8aZ.js} +1 -1
  62. package/static/assets/{sequenceDiagram-DBY2YBRQ-DI61Vnk1.js → sequenceDiagram-DBY2YBRQ-BlqdK4qm.js} +1 -1
  63. package/static/assets/{sizeCapture-X5ZJPWSS-CmUBUW3B.js → sizeCapture-X5ZJPWSS-C27ndGIT.js} +1 -1
  64. package/static/assets/{stateDiagram-2N3HPSRC-CBMhhwuE.js → stateDiagram-2N3HPSRC-DOu4536_.js} +1 -1
  65. package/static/assets/stateDiagram-v2-6OUMAXLB-DvP1ZCp8.js +1 -0
  66. package/static/assets/{swimlanes-5IMT3BWC-CtZlr9wD.js → swimlanes-5IMT3BWC-BpGitR9A.js} +2 -2
  67. package/static/assets/swimlanesDiagram-G3AALYLV-B5cf18Ey.js +8 -0
  68. package/static/assets/{timeline-definition-FHXFAJF6-BC69PWR-.js → timeline-definition-FHXFAJF6-JIvdjH7z.js} +1 -1
  69. package/static/assets/{vennDiagram-L72KCM5P-jEaqKPSP.js → vennDiagram-L72KCM5P-DulnqLWm.js} +1 -1
  70. package/static/assets/{wardleyDiagram-EHGQE667-CKFWi3EK.js → wardleyDiagram-EHGQE667--MhZNL8M.js} +1 -1
  71. package/static/assets/{xychartDiagram-FW5EYKEG-CjyCKfOu.js → xychartDiagram-FW5EYKEG-CjnNgnMQ.js} +1 -1
  72. package/static/index.html +1 -1
  73. package/static/assets/channel-CJFxgMC1.js +0 -1
  74. package/static/assets/classDiagram-OUVF2IWQ-B5OYUyBf.js +0 -1
  75. package/static/assets/classDiagram-v2-EOCWNBFH-B5OYUyBf.js +0 -1
  76. package/static/assets/stateDiagram-v2-6OUMAXLB-BD1I889C.js +0 -1
  77. package/static/assets/swimlanesDiagram-G3AALYLV-BfEZlw_9.js +0 -8
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@rashidee/co2",
3
- "version": "1.3.11",
4
- "description": "Compound Context Studio — self-hosted team context authoring for CO2 projects",
5
- "type": "module",
6
- "license": "MIT",
7
- "publishConfig": {
8
- "access": "public"
9
- },
10
- "engines": {
11
- "node": ">=22"
12
- },
13
- "bin": {
14
- "co2": "dist/index.js"
15
- },
16
- "files": [
17
- "dist",
18
- "static",
19
- "drizzle",
20
- "plugin"
21
- ],
22
- "scripts": {
23
- "build": "tsup && node ../../scripts/copy-migrations.mjs && node ../../scripts/copy-web.mjs && node ../../scripts/copy-plugin.mjs"
24
- },
25
- "dependencies": {
26
- "better-sqlite3": "^12.2.0",
27
- "node-pty": "^1.0.0"
28
- },
29
- "devDependencies": {
30
- "@co2-cli/core": "workspace:*",
31
- "@co2-cli/server": "workspace:*",
32
- "@hono/node-server": "^1.13.0",
33
- "@hono/zod-validator": "^0.4.1",
34
- "commander": "^12.1.0",
35
- "drizzle-orm": "^0.36.0",
36
- "hono": "^4.6.0",
37
- "picocolors": "^1.1.0",
38
- "tsup": "^8.3.0",
39
- "zod": "^3.23.8"
40
- }
41
- }
1
+ {
2
+ "name": "@rashidee/co2",
3
+ "version": "1.3.13",
4
+ "description": "Compound Context Studio — self-hosted team context authoring for CO2 projects",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "engines": {
11
+ "node": ">=22"
12
+ },
13
+ "bin": {
14
+ "co2": "dist/index.js"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "static",
19
+ "drizzle",
20
+ "plugin"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsup && node ../../scripts/copy-migrations.mjs && node ../../scripts/copy-web.mjs && node ../../scripts/copy-plugin.mjs"
24
+ },
25
+ "dependencies": {
26
+ "better-sqlite3": "^12.2.0",
27
+ "node-pty": "^1.0.0"
28
+ },
29
+ "devDependencies": {
30
+ "@co2-cli/core": "workspace:*",
31
+ "@co2-cli/server": "workspace:*",
32
+ "@hono/node-server": "^1.13.0",
33
+ "@hono/zod-validator": "^0.4.1",
34
+ "commander": "^12.1.0",
35
+ "drizzle-orm": "^0.36.0",
36
+ "hono": "^4.6.0",
37
+ "picocolors": "^1.1.0",
38
+ "tsup": "^8.3.0",
39
+ "zod": "^3.23.8"
40
+ }
41
+ }
@@ -12,7 +12,7 @@
12
12
  "name": "co2-skills",
13
13
  "source": "./",
14
14
  "description": "Compound Context Skills — generates data models, HTML mockups, technical specifications, test specifications, and orchestrates full-stack development from Agile user stories.",
15
- "version": "1.6.0",
15
+ "version": "1.7.0",
16
16
  "author": {
17
17
  "name": "Rashidee M.Rashid"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "co2-skills",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Compound Context Skills — an opinionated context engineering methodology for AI-driven software development. Generates data models, HTML mockups, technical specifications, test specifications, and orchestrates full-stack development from Agile user stories.",
5
5
  "author": {
6
6
  "name": "Rashidee M.Rashid"
package/plugin/README.md CHANGED
@@ -229,6 +229,7 @@ Example skill invocation for technical specification generation:
229
229
  /specgen-flutter-riverpod <app_name> ## For generating Flutter 3 mobile application technical specification with Riverpod, Hive, Dio, go_router and Firebase Messaging.
230
230
  /specgen-ts-cli <app_name> ## For generating Node.js CLI application technical specification with TypeScript, Commander.js and tsup.
231
231
  /specgen-node-cli-web <app_name> ## For generating self-hosted Node.js web application technical specification distributed as a global npm CLI — Hono, embedded React SPA, Drizzle + SQLite, hand-rolled sessions and tsup.
232
+ /specgen-custom <app_name> ## For generating a technical specification for an arbitrary user-defined stack from a custom stack spec markdown (also the automatic fallback when no specgen matches).
232
233
  ~~~
233
234
 
234
235
  - Input:
@@ -556,7 +557,7 @@ We welcome contributions from the community! Here are some ways you can contribu
556
557
 
557
558
  ## Specification Generator Skills (`specgen-*`)
558
559
 
559
- This is the **highest impact area** for contribution. The CO2 workflow is designed to be technology-agnostic, but each `specgen-*` skill targets a specific technology stack. We currently support:
560
+ This is the **highest impact area** for contribution. The CO2 workflow is designed to be technology-agnostic, but each `specgen-*` skill targets a specific technology stack. Stacks not covered by a dedicated variant are served by `specgen-custom` (driven by a user-authored stack spec markdown), but a contributed stack-specific specgen always produces a deeper specification and remains preferred. We currently support:
560
561
 
561
562
  | Skill | Technology Stack |
562
563
  |-------|-----------------|
@@ -570,6 +571,7 @@ This is the **highest impact area** for contribution. The CO2 workflow is design
570
571
  | `specgen-ts-cli` | Node.js CLI + TypeScript + Commander.js + tsup + pkg |
571
572
  | `specgen-node-cli-web` | Self-hosted Node.js web app as a global npm CLI — Node 22 + commander 12 + Hono 4 + embedded React 19/Vite 6 SPA + Tailwind CSS v4 + shadcn/ui + Drizzle ORM + SQLite + hand-rolled scrypt sessions + tsup + Biome + Vitest + Playwright |
572
573
  | `specgen-sdk-java` | Java SDK library — Maven Multi-Release fat JAR (JDK 8 baseline + JDK 11+ overlay) + OkHttp |
574
+ | `specgen-custom` | Any stack described by a user-authored custom stack spec markdown (authoring template: `skills/specgen-custom/references/stack-doc-template.md`) — an explicit declaration overrides the built-in variants; also the automatic fallback when no variant matches |
573
575
 
574
576
  We are looking for contributors to create new `specgen-*` skills for other technology stacks, such as:
575
577
 
package/plugin/SKILLS.md CHANGED
@@ -237,7 +237,9 @@ All specgens share the same contract: **Invoke** `/specgen-<variant> <applicatio
237
237
  UI-bearing stacks); **Output** `context/specification/` — root `SPECIFICATION.md` + one
238
238
  self-contained `SPEC.md` per module (or per command for CLI stacks), with complete code
239
239
  samples and traceability tables. **Pick exactly ONE variant, matching the application's
240
- technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle):
240
+ technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle). A custom stack
241
+ spec declared as ``Stack per custom stack spec at `<path>` `` always wins over the built-in
242
+ variants, and `specgen-custom` is the fallback when nothing matches:
241
243
 
242
244
  | Skill | Pick when the application is… |
243
245
  |-------|-------------------------------|
@@ -250,6 +252,7 @@ technology stack** (declared in `CLAUDE.md` / PRD Architecture Principle):
250
252
  | `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
253
  | `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
254
  | `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 |
255
+ | `specgen-custom` | ANY other stack — driven by a user-authored custom stack spec markdown (declared in PRD.md/CLAUDE.md as ``Stack per custom stack spec at `<path>` ``, authoring template in `references/stack-doc-template.md`). An explicit declaration OVERRIDES the built-in variants; also the automatic fallback (with `[TODO]`-annotated defaults) when no variant matches |
253
256
 
254
257
  > **`specgen-ts-cli` vs `specgen-node-cli-web`:** if the deliverable is a terminal tool with
255
258
  > commands and flags → `specgen-ts-cli`. If the deliverable is a browser-accessed web app that
@@ -406,7 +409,7 @@ implemented** (empty stub — no SKILL.md). Do not invoke; fall back to `specgen
406
409
  | "prepare everything for development" | `conductor-feature-prepare` |
407
410
  | "design the data model / ERD" | `modelgen-relational` or `modelgen-nosql` (by datastore) |
408
411
  | "generate mockups / UI screens" | `mockgen-tailwind` or `mockgen-shadcn` (by stack) |
409
- | "write the technical spec" | the ONE `specgen-*` matching the stack (see table) |
412
+ | "write the technical spec" | the ONE `specgen-*` matching the stack (see table); a declared custom stack spec → `specgen-custom`, which is also the fallback when nothing matches |
410
413
  | "generate the test plan" | `testgen-functional` |
411
414
  | "set up databases/queues in k8s" | `util-preparek8senv` |
412
415
  | "plan deployment / plan cicd" | `util-plancicd` |
@@ -389,6 +389,11 @@ files to understand what has already been completed.
389
389
  version (e.g., `${APP_VERSION:1.0.4}`)
390
390
  - **config/app.php** (Laravel): Update the default in `env('APP_VERSION', '1.0.0')`
391
391
  to the new version
392
+ - **Custom / other stacks** (SPECIFICATION.md generated by `specgen-custom`): Update
393
+ the manifest file/field and environment variable named in SPECIFICATION.md's
394
+ **Application Version Configuration** subsection. If the spec names none, update
395
+ the project's primary manifest and add a `[TODO]` in IMPLEMENTATION_MASTER.md
396
+ noting the gap.
392
397
  The version displayed in the application footer (or API info endpoint) MUST reflect
393
398
  the new version after this update.
394
399
  3. Proceed to Phase 3 (Implementation) for the affected modules.
@@ -496,6 +501,8 @@ subdirectory. Instead:
496
501
  then move ALL files (including dotfiles) from that temp directory up to `<source-code-path>/`,
497
502
  then remove the empty temp directory. This avoids overwriting the existing `context/` folder.
498
503
  - For Spring Boot: Same approach — scaffold into a temp dir, then move files up.
504
+ - For any other stack whose scaffolding tool creates a nested project directory: same
505
+ temp-dir-then-move approach.
499
506
  - NEVER use the project slug/name as the target directory if it would create a nested folder.
500
507
 
501
508
  **Scaffolding Checklist** (adapt to the technology stack from SPECIFICATION.md):
@@ -511,6 +518,9 @@ subdirectory. Instead:
511
518
  - **Laravel**: Set `version` in `composer.json` and `APP_VERSION` in `.env`
512
519
  - **React / Node.js**: Set `version` in `package.json` and `VITE_APP_VERSION` in
513
520
  `.env.development` (or `APP_VERSION` in `.env` for Node.js backends)
521
+ - **Custom / other stacks**: Use the manifest file/field and environment variable named in
522
+ SPECIFICATION.md's **Application Version Configuration** subsection (a spec generated by
523
+ `specgen-custom` always names them)
514
524
  - The version in the manifest MUST match the version in the environment variable
515
525
  - For multi-version processing, this version will be updated during each version increment
516
526
  in the Phase 0 resume check
@@ -1057,6 +1067,9 @@ Extracted from IMPLEMENTATION_MASTER.md execution order and module details.>
1057
1067
  - For **Spring Boot** apps: use Maven/Gradle commands, `src/main/java` paths, `application.yml` config
1058
1068
  - For **Laravel** apps: use Composer/Artisan commands, `app/` paths, `.env` config
1059
1069
  - For **REST API** apps: omit view/template sections, focus on API endpoints and Swagger/OpenAPI docs
1070
+ - For **custom stacks** (SPECIFICATION.md generated by `specgen-custom`): every command, path
1071
+ and config reference comes from SPECIFICATION.md's Build, Run & Packaging and Project
1072
+ Structure sections — never from stack assumptions
1060
1073
  - Include only sections that are relevant to the actual specification — do NOT add sections for
1061
1074
  features that are not part of the spec (e.g., skip messaging section if no messaging is configured)
1062
1075
 
@@ -319,8 +319,10 @@ record the result for use throughout the version loop:
319
319
  decisions and resolved-file-path propagation to mockgen-* and specgen-*. No additional action
320
320
  needed; Step 1.5 is the canonical handler.
321
321
  - **`# Architecture Principle`** — Already consumed by Step 1.3 (Infer Database Type) and
322
- Step 1.7 (Infer Technology Stack) as the **primary signal** for routing decisions. Sub-skills
323
- (modelgen-*, specgen-*) read it directly from PRD.md.
322
+ Step 1.7 (Infer Technology Stack) as the **primary signal** for routing decisions. It may
323
+ also declare a custom stack spec file (``Stack per custom stack spec at `<path>` `` or a
324
+ markdown link to the stack file), which Step 1.7 treats as the **overriding** signal and
325
+ routes to `specgen-custom`. Sub-skills (modelgen-*, specgen-*) read it directly from PRD.md.
324
326
  - **`# High Level Process Flow`** — **Detect presence here** so all downstream skills are aware:
325
327
  1. Check PRD.md for a `# High Level Process Flow` section. If present, record:
326
328
  - The list of named flows (e.g., "Country submission flow", "Worker registration flow")
@@ -384,6 +386,10 @@ tracker that this skill — and any resumed Ralph Loop iteration — reads to kn
384
386
  | Spec Generator | TBD | - |
385
387
 
386
388
  > Filled in by the inference steps (1.3, 1.5, 1.7) as the pipeline runs.
389
+ > When a custom stack spec is used, record Technology Stack = "Custom (per `<path>`)" and
390
+ > Spec Generator = "specgen-custom (explicit)" or "specgen-custom (fallback)"; the Source
391
+ > column names the declaration (`PRD.md # Architecture Principle (custom stack spec)`,
392
+ > `CLAUDE.md entry (custom stack spec)`) or `fallback (no specgen matched)`.
387
393
 
388
394
  ---
389
395
 
@@ -514,31 +520,53 @@ applies to all items regardless of version.
514
520
 
515
521
  #### Step 1.7: Infer Technology Stack
516
522
 
517
- 1. **Check PRD.md `# Architecture Principle` section first** (primary signal):
523
+ 1. **Check for an explicit custom stack spec declaration first** (overrides all other signals):
524
+ - In PRD.md `# Architecture Principle`: a statement matching ``Stack per custom stack spec at `<path>` ``
525
+ or a markdown link to a custom stack spec markdown file (e.g., `[STACK.md](reference/STACK.md)`)
526
+ - Else in the application's CLAUDE.md entry (under `# Custom Applications`): the same
527
+ ``Stack per custom stack spec at `<path>` `` convention
528
+ - If found: resolve the path (relative to PRD.md first, then to the project root) and verify
529
+ the file exists — if it does NOT exist, **STOP** and report the dangling declaration to the
530
+ user. If it exists, record **Technology Stack = Custom (per `<path>`)** with the resolved
531
+ path and **skip items 2–3** — the stack doc is authoritative.
532
+ 2. **Check PRD.md `# Architecture Principle` section** (primary signal):
518
533
  - If Architecture Principle explicitly mentions a framework (e.g., "Spring Boot", "Laravel"), use it
519
534
  - If it mentions a view engine (e.g., "JTE", "Blade"), use it
520
535
  - If it mentions frontend tooling (e.g., "HTMX", "Alpine.js", "Vite"), use it
521
536
  - If it mentions architectural style (e.g., "monolithic", "REST API"), use it to disambiguate specgen variant
522
- 2. **Fallback to CLAUDE.md** (if Architecture Principle is absent or incomplete):
537
+ 3. **Fallback to CLAUDE.md** (if Architecture Principle is absent or incomplete):
523
538
  - Read application details from CLAUDE.md (already in context)
524
539
  - Identify the technology stack:
525
540
  - Framework (Laravel, Spring Boot, etc.)
526
541
  - ORM (Eloquent, JPA/Hibernate, etc.)
527
542
  - View engine (Blade, JTE, etc.)
528
543
  - Frontend enhancement (HTMX, Alpine.js, etc.)
529
- 3. Record the inferred technology stack for the next step
544
+ 4. Record the inferred technology stack (or the resolved custom stack doc path) for the next step
530
545
 
531
546
  #### Step 1.8: Generate Technical Specification
532
547
 
533
548
  1. **Check if artifacts exist**: List files in `<app_folder>/context/specification/`
534
549
  - If `.md` files already exist AND this is NOT a version increment → **SKIP** this step
535
550
  - If this IS a version increment, **proceed** to re-invoke the skill with version/module args
536
- 2. Determine the appropriate specification generator:
537
- - Check available skills matching `specgen-*` pattern
538
- - For Laravel + Eloquent + Blade + HTMX `Skill(skill: "co2-skills:specgen-laravel-eloquent-bladehtmx", args: "<app_folder> [version:<version>] [module:<module>]")`
539
- - For Spring Boot + JPA + JTE + HTMX → `Skill(skill: "co2-skills:specgen-spring-jpa-jtehtmx", args: "<app_folder> [version:<version>] [module:<module>]")`
540
- - For a self-hosted Node.js web app distributed as a global npm CLI (Hono + embedded React SPA + SQLite) → `Skill(skill: "co2-skills:specgen-node-cli-web", args: "<app_folder> [version:<version>] [module:<module>]")`
541
- - Match the skill name against the inferred technology stack components
551
+ 2. Determine the appropriate specification generator, **in this priority order**:
552
+ - **a. Explicit custom stack spec (from Step 1.7)** — if Step 1.7 resolved a custom stack doc,
553
+ use `specgen-custom` regardless of whether a built-in specgen would also match the stack:
554
+ `Skill(skill: "co2-skills:specgen-custom", args: "<app_folder> [version:<version>] [module:<module>] stack:<resolved-stack-doc-path>")`
555
+ - **b. Built-in specgen match** otherwise, check available skills matching the `specgen-*`
556
+ pattern (excluding `specgen-custom`) and match against the inferred technology stack.
557
+ Only route to a variant that actually exists as an invokable skill (has a SKILL.md):
558
+ - For Laravel + Eloquent + Blade + HTMX → `Skill(skill: "co2-skills:specgen-laravel-eloquent-bladehtmx", args: "<app_folder> [version:<version>] [module:<module>]")`
559
+ - For Spring Boot + JPA + JTE + HTMX → `Skill(skill: "co2-skills:specgen-spring-jpa-jtehtmx", args: "<app_folder> [version:<version>] [module:<module>]")`
560
+ - For a self-hosted Node.js web app distributed as a global npm CLI (Hono + embedded React SPA + SQLite) → `Skill(skill: "co2-skills:specgen-node-cli-web", args: "<app_folder> [version:<version>] [module:<module>]")`
561
+ - Match the skill name against the inferred technology stack components
562
+ - **c. No match — fallback to specgen-custom** — if NO built-in specgen matches the inferred
563
+ stack, do NOT stop and do NOT force-fit the closest variant. Invoke:
564
+ `Skill(skill: "co2-skills:specgen-custom", args: "<app_folder> [version:<version>] [module:<module>] stack-desc:\"<inferred stack summary from Step 1.7>\"")`
565
+ specgen-custom will first attempt to auto-discover a stack doc at its well-known paths
566
+ (`<app_folder>/context/reference/STACK.md`, `<app_folder>/context/STACK.md`,
567
+ `<root>/shared_context/STACK.md`); if none exists it generates from the inferred stack
568
+ description, annotating every assumption with `[TODO]`. Surface the applied defaults to
569
+ the user in the run summary.
542
570
  3. Wait for the skill to complete. The output will be specification files in `<app_folder>/context/specification/`
543
571
 
544
572
  #### Step 1.9: Generate Test Specification