@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
@@ -0,0 +1,271 @@
1
+ # Specification Template — Custom Stack Application
2
+
3
+ This is the authoritative template for the generated specification. It is
4
+ **stack-agnostic**: every technology-specific value is rendered from the resolved custom
5
+ stack spec doc (Mode 1) or the synthesized stack definition (Mode 2) — see SKILL.md. The
6
+ specification is split into **two types of files**:
7
+
8
+ 1. **`SPECIFICATION.md`** (root) — Table of Contents, project overview, project structure
9
+ & build configuration, data & persistence, application composition, authentication
10
+ (if applicable), UI shell (UI stacks only), testing, build/run/packaging. Generated
11
+ once per application.
12
+ 2. **`<module-name>/SPEC.md`** (per-module) — Self-contained module blueprint spanning
13
+ every layer the stack doc declares. Generated once per module from PRD.md.
14
+
15
+ ```
16
+ specification/
17
+ ├── SPECIFICATION.md
18
+ ├── <module-1>/
19
+ │ └── SPEC.md
20
+ ├── <module-2>/
21
+ │ └── SPEC.md
22
+ └── ...
23
+ ```
24
+
25
+ Placeholders use `{{VARIABLE}}` syntax and must be replaced with actual values. Sections
26
+ marked *[UI stacks only]* are omitted for headless stacks (API/CLI/batch/library);
27
+ sections marked *[if applicable]* are included only when their capability exists.
28
+
29
+ ---
30
+
31
+ # Part A: Root SPECIFICATION.md
32
+
33
+ ---
34
+
35
+ ## Table of Contents
36
+
37
+ Generate a TOC with anchor links. Include a **Modules** section linking to each module's
38
+ `SPEC.md`:
39
+
40
+ ```markdown
41
+ ## Table of Contents
42
+
43
+ ### Shared Infrastructure
44
+ - [1. Project Overview](#1-project-overview)
45
+ - [2. Project Structure & Build Configuration](#2-project-structure--build-configuration)
46
+ - ...
47
+
48
+ ### Modules
49
+ - [{{Module 1}}]({{module-1}}/SPEC.md)
50
+ - ...
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Section 1: Project Overview
56
+
57
+ ```
58
+ # {{APPLICATION_NAME}} — Technical Specification
59
+
60
+ ## 1. Project Overview
61
+
62
+ **Application Name**: {{APPLICATION_NAME}}
63
+ **Application Type**: {{web | api | cli | mobile | batch | library — from the stack doc}}
64
+ **Description**: {{APP_DESCRIPTION}}
65
+ **Versions Covered**: v1.0.0 — v{{LATEST_VERSION}}
66
+ **Stack Definition**: {{path to the custom stack spec doc, or "inferred (Mode 2) — see [TODO] markers"}}
67
+
68
+ ### Architecture Model
69
+ {{The Architecture Style from the stack doc, expanded into 1–2 paragraphs: process
70
+ model, layering, module boundary rules, communication style. Cite compatible PRD.md
71
+ Architecture Principle statements here.}}
72
+
73
+ ### Technology Stack
74
+ {{Render the full Layer | Technology | Version table from the stack doc, plus any
75
+ capability-driven additions from Key Libraries. Unpinned versions carry
76
+ [TODO: pin version]; Mode 2 rows carry [TODO: confirm — defaulted by specgen-custom].}}
77
+
78
+ ### Capability Determination (Auto-Determined from PRD)
79
+ {{The capability list from the Determination Summary — grids, charts, file upload,
80
+ background jobs, integrations — each mapped to the stack doc's Key Libraries entry or
81
+ marked [TODO: choose library].}}
82
+
83
+ ### User Roles [if applicable]
84
+ | Role | Source (mockup folder) | Capabilities summary |
85
+ |------|------------------------|----------------------|
86
+ | {{role}} | mockup/{{role}}/ | {{...}} |
87
+
88
+ ### Module Index
89
+ | Module | Spec File | {{Persistence Units}} | {{Routes / Commands / Screens}} |
90
+ |--------|-----------|----------------------|--------------------------------|
91
+ | {{Module}} | [{{module}}/SPEC.md]({{module}}/SPEC.md) | {{tables/collections/files}} | {{...}} |
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Section 2: Project Structure & Build Configuration
97
+
98
+ - Render the **Project Layout tree from the stack doc** with actual module names from
99
+ PRD.md substituted into the module slots.
100
+ - Complete, copy-pasteable **manifest and build configuration files** (whatever the stack
101
+ uses: `go.mod` + `Makefile`, `pyproject.toml`, `pom.xml`, `package.json`, ...), with
102
+ every dependency from the Technology Stack table at its pinned version.
103
+ - State the **structural rules** from the stack doc's Coding Conventions (naming,
104
+ file-size limits, error handling, forbidden patterns). Defaulted conventions carry
105
+ `[TODO: confirm conventions]`.
106
+
107
+ ### Section 2a: Application Version Configuration (MANDATORY)
108
+
109
+ This subsection is never omitted — `conductor-feature-develop` reads it on every version
110
+ increment:
111
+
112
+ - **Version carrier**: the manifest file + field ({{from the stack doc's Packaging &
113
+ Deployment section, e.g., "`version` in `pyproject.toml`"}}) MUST be set to the version
114
+ from skill invocation (highest, if multiple).
115
+ - **Environment variable**: {{e.g., APP_VERSION}} mirrors the manifest value.
116
+ - **Surfacing**: how the running application exposes the version — {{UI footer / CLI
117
+ `--version` flag / info endpoint, per application type}} — with a complete code sample.
118
+ - If the stack doc named no version carrier, name the stack's primary manifest here and
119
+ mark the choice `[TODO: confirm version carrier]`.
120
+
121
+ ---
122
+
123
+ ## Section 3: Data & Persistence
124
+
125
+ From the stack doc's Data & Persistence section and the module model files:
126
+
127
+ - Datastore, access layer (ORM / query builder / driver) and connection management —
128
+ complete configuration sample
129
+ - Migration tool and workflow (file location, generation command, when migrations run)
130
+ - The **complete schema/entity definitions** for shared/system tables; per-module tables
131
+ live in each module's SPEC.md
132
+ - If the model family (relational vs NoSQL) mismatches the stack doc's datastore, the
133
+ mapping decisions are documented here
134
+
135
+ ---
136
+
137
+ ## Section 4: Application Composition
138
+
139
+ The application's entry point and composition root, in the stack doc's framework:
140
+
141
+ - Entry point sample (main function / bootstrap / CLI program) — complete
142
+ - Middleware/interceptor order or command wiring (request ID, logging, auth resolution,
143
+ guards, routes/commands)
144
+ - Configuration loading (env vars / config file per the stack doc), validated at startup —
145
+ complete sample
146
+ - Logging setup per the stack doc's logging library
147
+ - Health/status surface ({{endpoint / command}}) used by tests and operations
148
+
149
+ ---
150
+
151
+ ## Section 5: Authentication & Security [if applicable]
152
+
153
+ Only when PRD.md defines auth stories or the stack doc declares Authentication & Security:
154
+
155
+ - The auth mechanism from the stack doc (sessions / OIDC / API keys / ...) with complete
156
+ samples: credential verification, session/token issue + resolve + revoke, guards
157
+ - Password/credential policy as validation schemas shared by UI and API
158
+ - Role model and route/command guard configuration
159
+ - Security invariants as explicit, testable statements (e.g., "cannot delete the last
160
+ admin"), each mapped to a PRD constraint ID where one exists
161
+
162
+ ---
163
+
164
+ ## Section 6: UI Shell [UI stacks only]
165
+
166
+ - The UI technology setup from the stack doc (SPA build config / template engine layout /
167
+ mobile navigation shell) — complete samples
168
+ - Design tokens from the PRD Design System file or mockup CSS, mapped into the stack
169
+ doc's styling mechanism
170
+ - Shared layout (navigation, topbar/sidebar, footer rendering `v{{VERSION}}` from the
171
+ version surface defined in Section 2a)
172
+ - Route/screen registration pattern and role-guarded navigation derived from mockup role
173
+ folders
174
+
175
+ ---
176
+
177
+ ## Section 7: Testing Strategy
178
+
179
+ From the stack doc's Testing Stack section (or the CO2 default: dominant unit framework +
180
+ Playwright E2E, marked `[TODO]` when defaulted):
181
+
182
+ - Unit/integration test setup — real persistence layer in tests where the stack allows
183
+ (in-memory / testcontainers), never a fully mocked data layer
184
+ - The mandatory coverage list: every PRD constraint invariant, auth invariants (if
185
+ applicable), and one regression assertion per `### Bug` entry in PRD.md
186
+ - E2E setup and the scenario ordering (from High Level Process Flow when present)
187
+
188
+ ---
189
+
190
+ ## Section 8: Build, Run & Packaging
191
+
192
+ - The **verbatim command table** from the stack doc (install / build / run-dev /
193
+ run-prod / test / lint) — `conductor-feature-develop` executes these as-is
194
+ - Packaging: artifact type and production run model from the stack doc's Packaging &
195
+ Deployment section
196
+ - Configuration reference: every env var / config key, type, and default
197
+
198
+ ---
199
+
200
+ # Part B: Per-Module `<module-name>/SPEC.md`
201
+
202
+ Every module file is **self-contained** — a coding agent implements it independently
203
+ after the shared infrastructure exists. Layer sections use the stack doc's layer names;
204
+ the generic names below are placeholders to be renamed accordingly (e.g., "Routes" →
205
+ "Handlers" for Gin, "Commands" for a CLI, "Screens" for mobile).
206
+
207
+ ## Template
208
+
209
+ ```
210
+ # {{MODULE_NAME}} — Module Specification
211
+
212
+ > Part of [{{APPLICATION_NAME}} Technical Specification](../SPECIFICATION.md).
213
+ > Implement after the shared infrastructure (root spec sections 2–{{N}}) is in place.
214
+
215
+ ## 1. Traceability
216
+
217
+ ### User Stories
218
+ | ID | Version | Summary | Implemented By |
219
+ |----|---------|---------|----------------|
220
+ | {{USXX00001}} | [v1.0.0] | {{summary}} | {{handler / service / screen file}} |
221
+
222
+ ### Non-Functional Requirements
223
+ | ID | Version | Requirement | Technical Decision |
224
+ |----|---------|-------------|--------------------|
225
+
226
+ ### Constraints
227
+ | ID | Version | Constraint | Enforcement Point |
228
+ |----|---------|------------|-------------------|
229
+
230
+ ### Mockup Screens [UI stacks only]
231
+ | Screen | Role | Route/Screen | Component/Template |
232
+ |--------|------|--------------|--------------------|
233
+
234
+ ### Removed / Replaced
235
+ | Removed ID | Removed In | Replaced By | Reason |
236
+ |-----------|------------|-------------|--------|
237
+
238
+ ## 2. Data Model
239
+ The module's persistence definitions (tables / collections / entities) in the stack
240
+ doc's access layer — field-for-field from the model files, with relations and the
241
+ migration file name. Complete sample.
242
+
243
+ ## 3. Schemas & Validation
244
+ The module's input/output schemas in the stack doc's validation mechanism — entity,
245
+ create/update inputs, query params — with derived types where the language supports it.
246
+ Complete sample.
247
+
248
+ ## 4. Service / Business Logic
249
+ The module's service layer — pure business logic taking the data access handle;
250
+ business rules from PRD constraints as explicit invariants. No transport concerns.
251
+ Complete sample.
252
+
253
+ ## 5. API / Routes / Commands
254
+ The module's transport surface in the stack doc's framework — every route/command with
255
+ validation, guards, and typed responses; wired into the composition root (Section 4 of
256
+ the root spec). Complete sample. Surface table: {{method+path or command}}, guard,
257
+ request schema, response, story IDs.
258
+
259
+ ## 6. UI Feature [UI stacks only]
260
+ - One UI blueprint per mockup screen in the stack doc's UI technology, matching the
261
+ mockup layout
262
+ - Forms bound to the Section 3 schemas
263
+ - Data access via the pattern defined in the root spec
264
+ - Route/screen registration + role-guarded navigation entries
265
+ Complete samples for every component.
266
+
267
+ ## 7. Tests
268
+ - Unit/integration: service + transport tests per the root Testing Strategy; every
269
+ constraint invariant has a test; every `### Bug` entry has a regression assertion
270
+ - E2E: the module's user-visible flows appended to the E2E suite [UI stacks only]
271
+ ```
@@ -0,0 +1,154 @@
1
+ <!--
2
+ CUSTOM STACK SPEC TEMPLATE (CO2 / specgen-custom)
3
+
4
+ Copy this file into your project — recommended location:
5
+ <app_folder>/context/reference/STACK.md
6
+ (also discovered at <app_folder>/context/STACK.md and <root>/shared_context/STACK.md)
7
+
8
+ Fill every REQUIRED section, then declare it in the application's PRD.md under
9
+ `# Architecture Principle` as:
10
+
11
+ Stack per custom stack spec at `context/reference/STACK.md`
12
+
13
+ (or equivalently in the application's CLAUDE.md entry under # Custom Applications).
14
+
15
+ RECOMMENDED sections may be omitted — specgen-custom will apply a sensible default and
16
+ mark it inline with [TODO: confirm — defaulted by specgen-custom] for your review.
17
+ Replace every {{placeholder}}. Delete these comment blocks when done.
18
+ -->
19
+
20
+ # Stack Overview
21
+
22
+ <!-- REQUIRED context paragraph. State the application type explicitly:
23
+ web app / REST API / CLI / mobile app / batch job / library. -->
24
+
25
+ {{One paragraph: what kind of application this stack builds, its runtime model
26
+ (single process? client + server? serverless?), and how end users run or consume it.}}
27
+
28
+ **Application type**: {{web | api | cli | mobile | batch | library}}
29
+
30
+ # Languages & Frameworks
31
+
32
+ <!-- REQUIRED. The primary framework MUST be named. Versions are strongly recommended —
33
+ unpinned entries get "latest stable" + [TODO: pin version] in the generated spec. -->
34
+
35
+ | Layer | Technology | Version |
36
+ |-------|------------|---------|
37
+ | Language | {{e.g., Go}} | {{e.g., 1.23}} |
38
+ | Framework | {{e.g., Gin}} | {{e.g., 1.10}} |
39
+ | {{Frontend / Templates}} | {{e.g., templ + HTMX}} | {{...}} |
40
+ | {{...}} | {{...}} | {{...}} |
41
+
42
+ # Architecture Style
43
+
44
+ <!-- REQUIRED. Defines the layering and module boundaries of the whole specification. -->
45
+
46
+ - {{Monolith / modular monolith / microservices / hexagonal / layered MVC ...}}
47
+ - {{Module boundary rule — e.g., "one package per business module, no cross-module
48
+ imports except through the service interfaces"}}
49
+ - {{Communication style — e.g., "server-rendered pages + HTMX partials", "JSON REST",
50
+ "gRPC between services"}}
51
+
52
+ # Project Layout
53
+
54
+ <!-- REQUIRED. Annotated directory tree. specgen-custom substitutes actual module names
55
+ from PRD.md into this layout. -->
56
+
57
+ ```
58
+ {{project-root/
59
+ ├── cmd/server/main.go # entry point
60
+ ├── internal/
61
+ │ ├── <module>/ # one package per business module
62
+ │ │ ├── handler.go
63
+ │ │ ├── service.go
64
+ │ │ └── repo.go
65
+ │ └── platform/ # shared: db, config, auth, logging
66
+ ├── migrations/ # SQL migrations
67
+ ├── web/ # templates + static assets
68
+ └── Makefile}}
69
+ ```
70
+
71
+ # Build, Run & Test Commands
72
+
73
+ <!-- REQUIRED. conductor-feature-develop runs these verbatim — they must be exact. -->
74
+
75
+ | Purpose | Command |
76
+ |---------|---------|
77
+ | Install dependencies | {{e.g., go mod download}} |
78
+ | Build | {{e.g., go build -o bin/app ./cmd/server}} |
79
+ | Run (dev) | {{e.g., go run ./cmd/server}} |
80
+ | Run (prod) | {{e.g., ./bin/app}} |
81
+ | Unit/integration tests | {{e.g., go test ./...}} |
82
+ | E2E tests | {{e.g., npx playwright test}} |
83
+ | Lint/format | {{e.g., golangci-lint run}} |
84
+
85
+ # Data & Persistence
86
+
87
+ <!-- RECOMMENDED. Default when absent: derived from the module model files and the
88
+ CLAUDE.md dependency list, marked [TODO]. -->
89
+
90
+ - **Datastore**: {{e.g., PostgreSQL 16}}
91
+ - **Access layer**: {{ORM / query builder / driver — e.g., sqlc, GORM, raw pgx}}
92
+ - **Migrations**: {{tool + workflow — e.g., "golang-migrate; files in migrations/,
93
+ applied on deploy via make migrate"}}
94
+
95
+ # Authentication & Security
96
+
97
+ <!-- RECOMMENDED. Default when absent: derived from PRD.md auth stories; omitted
98
+ entirely for headless stacks with no auth stories. -->
99
+
100
+ - **Mechanism**: {{e.g., session cookies / OIDC via Keycloak / API keys / none}}
101
+ - **Session/token handling**: {{storage, expiry, revocation}}
102
+ - **Role model**: {{roles and how routes/commands are guarded}}
103
+
104
+ # Testing Stack
105
+
106
+ <!-- RECOMMENDED. Default when absent: the stack's dominant unit-test framework +
107
+ Playwright E2E. NOTE: the CO2 pipeline (testgen-functional and the develop phase)
108
+ assumes Playwright E2E for UI-bearing applications — if your stack cannot run
109
+ Playwright (embedded, desktop-native, ...), declare the substitute here explicitly. -->
110
+
111
+ - **Unit/integration**: {{framework + conventions}}
112
+ - **E2E**: {{Playwright (CO2 default) or declared substitute}}
113
+ - **Test data**: {{fixtures / in-memory DB / testcontainers ...}}
114
+
115
+ # Key Libraries
116
+
117
+ <!-- RECOMMENDED. Capabilities not covered here get a [TODO: choose library] in the spec
118
+ when PRD NFRs demand them (grids, charts, file upload, background jobs, HTTP...). -->
119
+
120
+ | Purpose | Library | Version |
121
+ |---------|---------|---------|
122
+ | Validation | {{...}} | {{...}} |
123
+ | Logging | {{...}} | {{...}} |
124
+ | HTTP client | {{...}} | {{...}} |
125
+ | {{...}} | {{...}} | {{...}} |
126
+
127
+ # Coding Conventions
128
+
129
+ <!-- RECOMMENDED. Default when absent: the language's community standard, marked [TODO]. -->
130
+
131
+ - {{Naming conventions, file-size limits, error-handling style, typing strictness,
132
+ lint configuration, forbidden patterns}}
133
+
134
+ # Packaging & Deployment
135
+
136
+ <!-- RECOMMENDED but IMPORTANT: name the manifest file/field and environment variable
137
+ that carry the application version — conductor-feature-develop updates these on
138
+ every version increment and surfaces the version in the app footer/--version/info
139
+ endpoint. Default when absent: the stack's primary manifest + [TODO]. -->
140
+
141
+ - **Artifact**: {{e.g., single static binary / jar / npm package / container image}}
142
+ - **Version carrier**: {{manifest file + field, e.g., "version constant in
143
+ internal/platform/version.go" or "version field in pyproject.toml"}} and
144
+ {{env var, e.g., APP_VERSION}}
145
+ - **Configuration**: {{how config is supplied — env vars / config file + naming
146
+ conventions}}
147
+
148
+ # Exclusions
149
+
150
+ <!-- OPTIONAL. Technologies that must NOT appear in the generated spec, even where the
151
+ coding agent would habitually reach for them. -->
152
+
153
+ - {{e.g., No ORM — raw SQL via sqlc only}}
154
+ - {{e.g., No Docker}}