@rashidee/co2 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.co2-dat/app.db +0 -0
- package/dist/.co2-dat/app.db-shm +0 -0
- package/dist/.co2-dat/app.db-wal +0 -0
- package/dist/index.js +204 -75
- package/package.json +41 -41
- package/plugin/skills/conductor-feature-develop/SKILL.md +1384 -1383
- package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +225 -224
- package/plugin/skills/mockgen-shadcn/SKILL.md +1073 -1067
- package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +5 -3
- package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +631 -498
- package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +2 -2
- package/plugin/skills/mockgen-tailwind/SKILL.md +913 -904
- package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +722 -720
- package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +631 -498
- package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -190
- package/static/assets/{abnfDiagram-VRR7QNED-CsyqZblo.js → abnfDiagram-VRR7QNED-C0CrqPXX.js} +1 -1
- package/static/assets/{arc-it3yvCvj.js → arc-BFSRYIcI.js} +1 -1
- package/static/assets/{architectureDiagram-ZJ3FMSHR-sjNv2MOQ.js → architectureDiagram-ZJ3FMSHR-DuwTK2W9.js} +1 -1
- package/static/assets/{blockDiagram-677ZJIJ3-DW9ZjtwO.js → blockDiagram-677ZJIJ3-Bn9tAB0n.js} +1 -1
- package/static/assets/{c4Diagram-LMCZKHZV-DP3gJkhN.js → c4Diagram-LMCZKHZV-CDiCEjY7.js} +1 -1
- package/static/assets/channel-CZGeGYqv.js +1 -0
- package/static/assets/{chunk-2Q5K7J3B-ByxTr7KB.js → chunk-2Q5K7J3B-BMwS7NgW.js} +1 -1
- package/static/assets/{chunk-32BRIVSS-vNETwpX4.js → chunk-32BRIVSS-8l0XBCjq.js} +1 -1
- package/static/assets/{chunk-5VM5RSS4-DbdsRtpE.js → chunk-5VM5RSS4-C6Cv-67E.js} +1 -1
- package/static/assets/{chunk-EX3LRPZG-DPkDGikN.js → chunk-EX3LRPZG-DjWs4lB9.js} +1 -1
- package/static/assets/{chunk-JWPE2WC7-Ccpx-Rog.js → chunk-JWPE2WC7-DuK_Mu9c.js} +1 -1
- package/static/assets/{chunk-MOJQB5TN-CnRPtHb3.js → chunk-MOJQB5TN-K-bFFmpr.js} +1 -1
- package/static/assets/{chunk-RYQCIY6F-C--_KRGR.js → chunk-RYQCIY6F-B-b4TyDb.js} +1 -1
- package/static/assets/{chunk-V7JOEXUC-BJQ5fwNa.js → chunk-V7JOEXUC-BZRKjyVr.js} +1 -1
- package/static/assets/{chunk-VR4S4FIN-BPcVRYqJ.js → chunk-VR4S4FIN-BcvbM_n3.js} +1 -1
- package/static/assets/{chunk-XXDRQBXY-BoC3DCKQ.js → chunk-XXDRQBXY-Z2nhcpRg.js} +1 -1
- package/static/assets/classDiagram-OUVF2IWQ-DV5beYlE.js +1 -0
- package/static/assets/classDiagram-v2-EOCWNBFH-DV5beYlE.js +1 -0
- package/static/assets/{cose-bilkent-JH36ORCC-DlKrOw_E.js → cose-bilkent-JH36ORCC-CPBw8Z2X.js} +1 -1
- package/static/assets/{cynefin-VYW2F7L2-CZQhaPM1.js → cynefin-VYW2F7L2-DeJ1X-1F.js} +1 -1
- package/static/assets/{cynefinDiagram-TSTJHNR4-cZP74_0I.js → cynefinDiagram-TSTJHNR4-BPs3jIZR.js} +1 -1
- package/static/assets/{dagre-VKFMJZFB-tB2cBd_e.js → dagre-VKFMJZFB-Bn5Xp63O.js} +1 -1
- package/static/assets/{diagram-FQU43EPY-QwoADT9c.js → diagram-FQU43EPY-DWIlVMUR.js} +1 -1
- package/static/assets/{diagram-G47NLZAW-Bjz2rwUz.js → diagram-G47NLZAW-BWxpunVI.js} +1 -1
- package/static/assets/{diagram-NH7WQ7WH-DS9j6K7F.js → diagram-NH7WQ7WH-CpoAYUis.js} +1 -1
- package/static/assets/{diagram-OA4YK3LP-CUPwlGEi.js → diagram-OA4YK3LP-Dv1XfQGK.js} +1 -1
- package/static/assets/{diagram-WEI45ONY-iejOZOdV.js → diagram-WEI45ONY-DSk6wZtO.js} +1 -1
- package/static/assets/{ebnfDiagram-CCIWWBDH-Bg3puNXE.js → ebnfDiagram-CCIWWBDH-DIDhI2dD.js} +1 -1
- package/static/assets/{erDiagram-Q63AITRT-DTxdGEtK.js → erDiagram-Q63AITRT-CGO6ep6G.js} +1 -1
- package/static/assets/{flowDiagram-23GEKE2U-CRl-AJlj.js → flowDiagram-23GEKE2U-D8nzLjfG.js} +1 -1
- package/static/assets/{ganttDiagram-NO4QXBWP-wCOJ8cfC.js → ganttDiagram-NO4QXBWP-Usz8f26d.js} +1 -1
- package/static/assets/{gitGraphDiagram-IHSO6WYX-CnVtKot-.js → gitGraphDiagram-IHSO6WYX-WEJUXa7P.js} +1 -1
- package/static/assets/{index-xLqMMC0F.css → index-CM4GfOLV.css} +1 -1
- package/static/assets/{index-DAL1vVaa.js → index-j3pCmOym.js} +194 -194
- package/static/assets/{infoDiagram-FWYZ7A6U-DmvEl4fi.js → infoDiagram-FWYZ7A6U-BRPwqRvz.js} +1 -1
- package/static/assets/{ishikawaDiagram-FXEZZL3T-CjKerAXn.js → ishikawaDiagram-FXEZZL3T-CrntEiqz.js} +1 -1
- package/static/assets/{journeyDiagram-5HDEW3XC-Bmc4ARKl.js → journeyDiagram-5HDEW3XC-BmhRsz4F.js} +1 -1
- package/static/assets/{kanban-definition-HUTT4EX6-BZ9I3imN.js → kanban-definition-HUTT4EX6-CWxUXdc3.js} +1 -1
- package/static/assets/{linear-CrHKLpp_.js → linear-BGjzqzT6.js} +1 -1
- package/static/assets/{mindmap-definition-LN4V7U3C-SUk59XXF.js → mindmap-definition-LN4V7U3C-CoVNmO4b.js} +1 -1
- package/static/assets/{pegDiagram-2B236MQR-CknFYdh_.js → pegDiagram-2B236MQR-hBHOzL7x.js} +1 -1
- package/static/assets/{pieDiagram-ENE6RG2P-B3VlLXXT.js → pieDiagram-ENE6RG2P-Cpv7VZPG.js} +1 -1
- package/static/assets/{quadrantDiagram-ABIIQ3AL-BUkZjvW_.js → quadrantDiagram-ABIIQ3AL-BIQAB21D.js} +1 -1
- package/static/assets/{railroadDiagram-RFXS5EU6-LklmPimD.js → railroadDiagram-RFXS5EU6-DX6hST3S.js} +1 -1
- package/static/assets/{requirementDiagram-TGXJPOKE-DnRFaZbz.js → requirementDiagram-TGXJPOKE-Gas2cE_l.js} +1 -1
- package/static/assets/{sankeyDiagram-HTMAVEWB-D242DUlQ.js → sankeyDiagram-HTMAVEWB-BpwoyJDe.js} +1 -1
- package/static/assets/{sequenceDiagram-DBY2YBRQ-DmiiStqo.js → sequenceDiagram-DBY2YBRQ-CzBxna5k.js} +1 -1
- package/static/assets/{sizeCapture-X5ZJPWSS-cbMvR047.js → sizeCapture-X5ZJPWSS-Cn-5NsLr.js} +1 -1
- package/static/assets/{stateDiagram-2N3HPSRC-YIIylI9N.js → stateDiagram-2N3HPSRC-BiW03iCW.js} +1 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-CmQ_Kjkj.js +1 -0
- package/static/assets/{swimlanes-5IMT3BWC-Ba309Ysu.js → swimlanes-5IMT3BWC-3jPuufWt.js} +2 -2
- package/static/assets/swimlanesDiagram-G3AALYLV-OaMW2HRF.js +8 -0
- package/static/assets/{timeline-definition-FHXFAJF6-BdpW3kGY.js → timeline-definition-FHXFAJF6-CzThWt1O.js} +1 -1
- package/static/assets/{vennDiagram-L72KCM5P-BiSgQ9Lf.js → vennDiagram-L72KCM5P-D1Axj0CM.js} +1 -1
- package/static/assets/{wardleyDiagram-EHGQE667-Clr8YWGW.js → wardleyDiagram-EHGQE667-mKj7UT6Q.js} +1 -1
- package/static/assets/{xychartDiagram-FW5EYKEG-LsC066MO.js → xychartDiagram-FW5EYKEG-CSAkvAer.js} +1 -1
- package/static/index.html +2 -2
- package/static/assets/channel-C_J_aLZ7.js +0 -1
- package/static/assets/classDiagram-OUVF2IWQ-yUfBrCjx.js +0 -1
- package/static/assets/classDiagram-v2-EOCWNBFH-yUfBrCjx.js +0 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-m0MSGh0v.js +0 -1
- package/static/assets/swimlanesDiagram-G3AALYLV-DY_J_ih_.js +0 -8
|
@@ -1,1383 +1,1384 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: conductor-feature-develop
|
|
3
|
-
model: claude-sonnet-5
|
|
4
|
-
effort: high
|
|
5
|
-
description: >
|
|
6
|
-
Application development orchestrator — orchestrates full-stack code implementation
|
|
7
|
-
module-by-module (code + Playwright E2E tests), tracking progress in IMPLEMENTATION_MASTER.md
|
|
8
|
-
and per-module IMPLEMENTATION_MODULE.md. Takes an application name (mandatory), with optional
|
|
9
|
-
source code path, version and module filters. Version supports single version, comma-separated
|
|
10
|
-
list, "all", or omit for all versions. When multiple versions are resolved, they are processed
|
|
11
|
-
SEQUENTIALLY in ascending semver order — all modules for version N are fully implemented before
|
|
12
|
-
version N+1 begins. Requires context artifacts (module models, HTML mockups, technical
|
|
13
|
-
specifications, test specifications) to already exist — use "conductor-feature-prepare" first
|
|
14
|
-
if they don't. Use this skill when the user asks to "implement the application", "start
|
|
15
|
-
development", "build the app module by module", "orchestrate implementation", "develop from
|
|
16
|
-
specs", "implement from test specs", or any request to systematically develop a full application
|
|
17
|
-
from existing specs. Also trigger when user says "resume implementation" to continue from where
|
|
18
|
-
a previous session left off using IMPLEMENTATION_MASTER.md and IMPLEMENTATION_MODULE.md
|
|
19
|
-
progress files.
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# Feature Conductor — Develop
|
|
23
|
-
|
|
24
|
-
Application development orchestrator — implements full-stack code module-by-module, driven by
|
|
25
|
-
test specs and tracked via implementation checklists. Requires context artifacts to already
|
|
26
|
-
exist (use `conductor-feature-prepare` first).
|
|
27
|
-
|
|
28
|
-
## Ralph Loop Integration (AUTO-START — MANDATORY)
|
|
29
|
-
|
|
30
|
-
This skill AUTOMATICALLY starts a Ralph Loop to ensure complete implementation across all modules.
|
|
31
|
-
Without Ralph Loop, the implementation may stop prematurely due to context window limits, API
|
|
32
|
-
usage limits, or the agent incorrectly concluding work is "done enough". Ralph Loop ensures
|
|
33
|
-
the same prompt is re-fed after each session exit, and the agent picks up where it left off
|
|
34
|
-
using the IMPLEMENTATION_MASTER.md and IMPLEMENTATION_MODULE.md tracking files.
|
|
35
|
-
|
|
36
|
-
### FIRST ACTION: Start Ralph Loop
|
|
37
|
-
|
|
38
|
-
**BEFORE doing anything else** (before Phase 0, before reading any files), you MUST invoke the
|
|
39
|
-
Ralph Loop skill using the Skill tool. This is a blocking requirement — do NOT proceed with
|
|
40
|
-
any implementation work until Ralph Loop is active.
|
|
41
|
-
|
|
42
|
-
**Invoke this immediately:**
|
|
43
|
-
```
|
|
44
|
-
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop <application> [source:<source-code-path>] [version:<version>] [module:<module>] --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Replace `<application>` and optional arguments with the actual arguments provided by the user.
|
|
48
|
-
|
|
49
|
-
**Example:** If the user invokes:
|
|
50
|
-
```
|
|
51
|
-
/conductor-feature-develop mainapp
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Then invoke:
|
|
55
|
-
```
|
|
56
|
-
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop mainapp --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If the user provides optional arguments:
|
|
60
|
-
```
|
|
61
|
-
/conductor-feature-develop mainapp version:v2 module:user
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Then invoke:
|
|
65
|
-
```
|
|
66
|
-
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop mainapp version:v2 module:user --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
After Ralph Loop is active, proceed with Phase 0 (Resume Check) and continue normally.
|
|
70
|
-
|
|
71
|
-
### How It Works
|
|
72
|
-
|
|
73
|
-
1. This skill auto-starts a Ralph Loop with the orchestrator prompt as the loop body
|
|
74
|
-
2. On each iteration, the agent reads IMPLEMENTATION_MASTER.md to find the next pending module
|
|
75
|
-
3. The agent implements one or more modules until context runs out or a module completes
|
|
76
|
-
4. When the agent tries to exit, the Ralph Loop stop hook re-feeds the same prompt
|
|
77
|
-
5. The next iteration resumes from where the last one left off (tracked in IMPLEMENTATION_MASTER.md)
|
|
78
|
-
6. When ALL modules are COMPLETED, the agent outputs the completion promise to exit the loop
|
|
79
|
-
|
|
80
|
-
### Completion Promise
|
|
81
|
-
|
|
82
|
-
When ALL modules in IMPLEMENTATION_MASTER.md have status `COMPLETED`, output the following
|
|
83
|
-
promise tag to signal the Ralph Loop that implementation is finished:
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
<promise>ALL MODULES IMPLEMENTED</promise>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**CRITICAL**: Only output this promise when EVERY module in the execution order has:
|
|
90
|
-
- Status = COMPLETED in IMPLEMENTATION_MASTER.md
|
|
91
|
-
- All E2E tests passing
|
|
92
|
-
- IMPLEMENTATION_MODULE.md fully updated
|
|
93
|
-
|
|
94
|
-
Do NOT output the promise prematurely. Do NOT output it to escape the loop. The Ralph Loop
|
|
95
|
-
will verify this tag and only exit when it is present.
|
|
96
|
-
|
|
97
|
-
### Iteration Awareness
|
|
98
|
-
|
|
99
|
-
At the START of every iteration (including the first), the agent MUST:
|
|
100
|
-
1. Check if Ralph Loop is already active (if `.claude/ralph-loop.local.md` exists, skip re-invoking)
|
|
101
|
-
2. Read IMPLEMENTATION_MASTER.md to determine what is already completed
|
|
102
|
-
3. Find the FIRST module with status != COMPLETED
|
|
103
|
-
4. If that module has an IMPLEMENTATION_MODULE.md, read it to find the last incomplete step
|
|
104
|
-
5. Resume from exactly that point — do NOT re-implement completed work
|
|
105
|
-
6. If ALL modules are COMPLETED, output the completion promise and stop
|
|
106
|
-
|
|
107
|
-
### Never Stop Prematurely
|
|
108
|
-
|
|
109
|
-
Within a Ralph Loop iteration, the agent MUST:
|
|
110
|
-
- Continue implementing modules sequentially until context limits force a stop
|
|
111
|
-
- After completing one module, IMMEDIATELY start the next pending module
|
|
112
|
-
- Do NOT stop after a single module "to let the user review" — Ralph Loop handles iteration
|
|
113
|
-
- Do NOT output the completion promise until ALL modules are verified complete
|
|
114
|
-
- If approaching context limits mid-module, save progress to IMPLEMENTATION_MODULE.md so the
|
|
115
|
-
next iteration can resume from the exact step
|
|
116
|
-
|
|
117
|
-
## Inputs
|
|
118
|
-
|
|
119
|
-
The skill expects these arguments:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
/conductor-feature-develop <application> [source:<source-code-path>] [version:<version>] [module:<module>]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
| Argument | Required | Example | Description |
|
|
126
|
-
|----------|----------|---------|-------------|
|
|
127
|
-
| `<application>` | Yes | `mainapp` | Application name to locate the context folder |
|
|
128
|
-
| `source:<path>` | No | `source:mainapp` | Path where source code resides. Defaults to `<app_folder>` (same as the resolved application folder) |
|
|
129
|
-
| `version:<version>` | No | `version:v2` or `version:v1,v2` or `version:all` | Filter user stories and artifacts by version. Supports single version, comma-separated list, `all`, or omit for all versions. Multiple versions are processed sequentially in ascending semver order |
|
|
130
|
-
| `module:<module>` | No | `module:user` | If provided, process only this module. If omitted, process all modules |
|
|
131
|
-
|
|
132
|
-
### Input Resolution
|
|
133
|
-
|
|
134
|
-
The application name is matched against root-level application folders:
|
|
135
|
-
1. Strip any leading `<number>_` prefix from folder names (e.g., `1_hub_middleware` → `hub_middleware`)
|
|
136
|
-
2. Match case-insensitively against the provided application name
|
|
137
|
-
3. Accept snake_case, kebab-case, or title-case input
|
|
138
|
-
4. If no match found, list available applications and stop
|
|
139
|
-
|
|
140
|
-
### Auto-Resolved Paths
|
|
141
|
-
|
|
142
|
-
| File | Resolved Path |
|
|
143
|
-
|------|---------------|
|
|
144
|
-
| PRD.md | `<app_folder>/context/PRD.md` |
|
|
145
|
-
| Module Models | `<app_folder>/context/model/` |
|
|
146
|
-
| HTML Mockups | `<app_folder>/context/mockup/` |
|
|
147
|
-
| Specifications | `<app_folder>/context/specification/` |
|
|
148
|
-
| Test Specs | `<app_folder>/context/test/` |
|
|
149
|
-
| References | `<app_folder>/context/reference/` |
|
|
150
|
-
| Development Output | `<app_folder>/context/develop/` |
|
|
151
|
-
|
|
152
|
-
### Version Resolution
|
|
153
|
-
|
|
154
|
-
The `version:` argument supports four forms:
|
|
155
|
-
|
|
156
|
-
| Form | Example | Behavior |
|
|
157
|
-
|------|---------|----------|
|
|
158
|
-
| Single version | `version:v2` | Process only v2 |
|
|
159
|
-
| Comma-separated list | `version:v1,v2,v3` | Process each version sequentially in ascending semver order |
|
|
160
|
-
| Explicit all | `version:all` | Discover all versions from PRD.md, process sequentially in ascending semver order |
|
|
161
|
-
| Omitted | _(no version arg)_ | Same as `version:all` |
|
|
162
|
-
|
|
163
|
-
#### Version Discovery
|
|
164
|
-
|
|
165
|
-
When `version:all` or omitted:
|
|
166
|
-
1. Scan PRD.md for all `[vX.Y.Z]` version tags across all module sections
|
|
167
|
-
2. Collect unique versions
|
|
168
|
-
3. Sort in ascending semantic version order (v1.0.0 < v1.0.1 < v1.1.0 < v2.0.0)
|
|
169
|
-
4. This becomes the ordered version list for sequential processing
|
|
170
|
-
|
|
171
|
-
#### Sequential Version Processing Rule
|
|
172
|
-
|
|
173
|
-
**Versions are ALWAYS processed one at a time, in ascending semver order.** All modules for
|
|
174
|
-
version N must be fully implemented (status `COMPLETED`) before version N+1 begins. This ensures:
|
|
175
|
-
- The application is scaffolded and fully functional at version N before N+1 changes are layered on
|
|
176
|
-
- Feature implementations build incrementally on prior version work
|
|
177
|
-
- E2E tests validate each version's functionality before the next version modifies the codebase
|
|
178
|
-
|
|
179
|
-
#### How It Works with Multiple Versions
|
|
180
|
-
|
|
181
|
-
1. **First version** (e.g., v1.0.0): Full implementation — scaffolding (Phase 2) + all modules (Phase 3)
|
|
182
|
-
2. **Each subsequent version** (e.g., v1.0.1, v1.0.2): Version increment — reset affected modules
|
|
183
|
-
to PENDING, update the application version, then re-implement only modules with changes for
|
|
184
|
-
that version. The existing "Version Increment" logic in Phase 0 handles this naturally.
|
|
185
|
-
3. **README** (Phase 5): Generated ONCE after the LAST version in the list is fully
|
|
186
|
-
implemented
|
|
187
|
-
|
|
188
|
-
### Application Folder Structure (Expected)
|
|
189
|
-
|
|
190
|
-
Source code and context artifacts coexist in the same `<app_folder>`. The `context/` subfolder
|
|
191
|
-
holds all generated artifacts (models, mockups, specs, tests, tracking). All other files and
|
|
192
|
-
folders at the root of `<app_folder>` are **source code** (e.g., `app/`, `Modules/`, `resources/`,
|
|
193
|
-
`composer.json`, `pom.xml`, `src/`, etc.).
|
|
194
|
-
|
|
195
|
-
**CRITICAL**: When scaffolding a new project (e.g., `composer create-project`, `mvn archetype:generate`),
|
|
196
|
-
the source code MUST be placed directly in `<source-code-path>/` — NOT in a nested subdirectory.
|
|
197
|
-
For example, with `composer create-project laravel/laravel`, you must either:
|
|
198
|
-
- Create in a temp directory and move all files (including dotfiles) up to `<source-code-path>/`, OR
|
|
199
|
-
- Use a technique that installs directly into the existing directory
|
|
200
|
-
|
|
201
|
-
The `context/` folder already exists in `<app_folder>` and must NOT be overwritten or deleted.
|
|
202
|
-
|
|
203
|
-
```
|
|
204
|
-
<app_folder>/ # = <source-code-path> (by default)
|
|
205
|
-
context/ # Context artifacts (NOT source code)
|
|
206
|
-
PRD.md
|
|
207
|
-
model/
|
|
208
|
-
MODEL.md
|
|
209
|
-
<module-slug>/
|
|
210
|
-
model.md
|
|
211
|
-
schemas.json
|
|
212
|
-
document-model.mermaid
|
|
213
|
-
mockup/
|
|
214
|
-
MOCKUP.html
|
|
215
|
-
mockup-manifest.json
|
|
216
|
-
<role>/content/
|
|
217
|
-
specification/
|
|
218
|
-
SPECIFICATION.md
|
|
219
|
-
<module-slug>/SPEC.md
|
|
220
|
-
test/
|
|
221
|
-
TEST_PLAN.md
|
|
222
|
-
<module-slug>/TEST_SPEC.md
|
|
223
|
-
reference/
|
|
224
|
-
develop/ # Implementation tracking files
|
|
225
|
-
(source code files) # All other files are source code
|
|
226
|
-
app/ # Laravel: app directory
|
|
227
|
-
Modules/ # Laravel: nwidart modules
|
|
228
|
-
resources/ # Laravel: views, CSS, JS
|
|
229
|
-
routes/ # Laravel: route files
|
|
230
|
-
config/ # Laravel: config files
|
|
231
|
-
composer.json # Laravel: PHP dependencies
|
|
232
|
-
package.json # Laravel: JS dependencies
|
|
233
|
-
... # (or src/, pom.xml for Spring Boot, etc.)
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## Pre-Requisite: Project Information from CLAUDE.md (MANDATORY)
|
|
237
|
-
|
|
238
|
-
**CLAUDE.md is automatically loaded into context** at the start of every session. It contains
|
|
239
|
-
project details, infrastructure paths, credentials, and configuration. You do NOT need to read
|
|
240
|
-
it manually — the information is already available in your context.
|
|
241
|
-
|
|
242
|
-
**Before executing ANY tool command** (Maven build, Spring Boot run, database CLI, Keycloak CLI,
|
|
243
|
-
Playwright test, npm start, etc.), use the following from CLAUDE.md (already in context):
|
|
244
|
-
|
|
245
|
-
- **JDK path** — Use the exact `JAVA_HOME` path specified in CLAUDE.md
|
|
246
|
-
- **Maven path** — Use the exact Maven binary path specified in CLAUDE.md
|
|
247
|
-
- **Database credentials** — Host, port, username, password for MongoDB, MySQL, etc.
|
|
248
|
-
- **Message queue credentials** — RabbitMQ host, port, username, password
|
|
249
|
-
- **Keycloak configuration** — Host, admin credentials, CLI path
|
|
250
|
-
- **Mailcatcher configuration** — SMTP host/port, web UI URL
|
|
251
|
-
- **Any other infrastructure details** — Ports, URLs, connection strings
|
|
252
|
-
|
|
253
|
-
**WHY**: CLAUDE.md contains the actual system paths, credentials, and configuration for the
|
|
254
|
-
developer's machine. Hardcoding or guessing these values will cause commands to fail. Every shell
|
|
255
|
-
command that involves JDK, Maven, database access, or any external service MUST use the values
|
|
256
|
-
from CLAUDE.md.
|
|
257
|
-
|
|
258
|
-
## PRD.md Extended Sections
|
|
259
|
-
|
|
260
|
-
During implementation, check PRD.md for the following extended sections and use them as high-level context:
|
|
261
|
-
|
|
262
|
-
### Design System
|
|
263
|
-
|
|
264
|
-
If PRD.md contains a `# Design System` section, read it and any file it references (e.g., `[DESIGN_SYSTEM.md](reference/DESIGN_SYSTEM.md)`) before implementing **any UI module** (Blade views, JTE templates, React components, etc.). Treat the design system as the **authoritative source** for code-level styling:
|
|
265
|
-
|
|
266
|
-
- **Color tokens, typography, spacing, radii, shadows** — apply directly in Tailwind config, CSS variables, or MUI theme. Do not invent new values.
|
|
267
|
-
- **Component patterns** — buttons, forms, tables, dialogs, alerts must match the design system's visual rules and accessibility behavior.
|
|
268
|
-
- **Branding** — logos, favicons, and brand voice must be applied consistently across all rendered views.
|
|
269
|
-
- **Accessibility rules** — WCAG level, contrast ratios, focus states, keyboard navigation requirements declared in the design system are non-negotiable.
|
|
270
|
-
|
|
271
|
-
**Conflict resolution**: If `SPECIFICATION.md`'s "Design System Integration" subsection contradicts the PRD.md design system file (e.g., different color values, different component variants), the **PRD.md design system file wins**. Flag the discrepancy for human review and proceed with the design system file.
|
|
272
|
-
|
|
273
|
-
If absent, fall back to `SPECIFICATION.md`'s design system guidance and CLAUDE.md's CSS framework declaration (existing behavior).
|
|
274
|
-
|
|
275
|
-
### Architecture Principle
|
|
276
|
-
|
|
277
|
-
If PRD.md contains an `# Architecture Principle` section, read it and use as implementation constraints:
|
|
278
|
-
- **Stateless**: Ensure no module implementation stores data in HTTP session — user context must come from JWT tokens or external identity providers
|
|
279
|
-
- **Event-driven**: Ensure inter-module communication uses event publishing (e.g., Spring ApplicationEvent, Laravel Event) rather than direct service injection across module boundaries
|
|
280
|
-
- **Message driven**: When implementing message consumers/publishers, follow the patterns described in the architecture (e.g., dedicated queues per country, independent queue configurations)
|
|
281
|
-
- **Monolithic with modular architecture**: Modules can share the same database but should not directly access each other's repositories — use events or service interfaces
|
|
282
|
-
|
|
283
|
-
If absent, rely on SPECIFICATION.md for architectural guidance (existing behavior).
|
|
284
|
-
|
|
285
|
-
### High Level Process Flow
|
|
286
|
-
|
|
287
|
-
If PRD.md contains a `# High Level Process Flow` section, use it as the **implementation blueprint** for message-driven modules:
|
|
288
|
-
1. Implement flow steps in order: (1) message consumer, (2) validation logic, (3) data persistence, (4) ACK/NACK publishing
|
|
289
|
-
2. Each flow step maps to a specific method in the service layer
|
|
290
|
-
3. Treat flow steps as mini-specifications within each module's implementation
|
|
291
|
-
4. After implementing all steps of a flow, verify the complete end-to-end flow works before moving to the next module
|
|
292
|
-
|
|
293
|
-
If absent, implement from SPECIFICATION.md messaging sections only (existing behavior).
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
## Pre-Requisite: Context Artifacts Must Exist
|
|
298
|
-
|
|
299
|
-
Before starting implementation, verify that all required context artifacts exist:
|
|
300
|
-
- `<app_folder>/context/model/` — must contain module model files
|
|
301
|
-
- `<app_folder>/context/mockup/` — must contain HTML mockup files
|
|
302
|
-
- `<app_folder>/context/specification/` — must contain specification files
|
|
303
|
-
- `<app_folder>/context/test/` — must contain test specification files
|
|
304
|
-
|
|
305
|
-
If any artifacts are missing, **stop and inform the user** to run `/conductor-feature-prepare`
|
|
306
|
-
first. Do NOT attempt to generate artifacts — that is the responsibility of the prepare skill.
|
|
307
|
-
|
|
308
|
-
## Version Gate
|
|
309
|
-
|
|
310
|
-
Before starting any work, check `CHANGELOG.md` in the application folder (`<app_folder>/CHANGELOG.md`):
|
|
311
|
-
|
|
312
|
-
1. If `<app_folder>/CHANGELOG.md` does not exist, skip this check (first-ever execution for this application).
|
|
313
|
-
2. If `<app_folder>/CHANGELOG.md` exists, scan all `## vX.Y.Z` headings and determine the **highest version** using semantic versioning comparison.
|
|
314
|
-
3. Apply the gate based on the version argument form:
|
|
315
|
-
- **Single version**: If requested version **<** highest version → **STOP immediately**. Print: `"Version {requested} is lower than the current application version {highest} recorded in <app_folder>/CHANGELOG.md. Execution rejected."`
|
|
316
|
-
- **Comma-separated list**: Check the **lowest** version in the list. If lowest **<** highest version → **STOP immediately**. Print: `"Version {lowest} in the provided list is lower than the current application version {highest} recorded in <app_folder>/CHANGELOG.md. Execution rejected."`
|
|
317
|
-
- **`version:all` or omitted**: Skip this check — when processing all discovered versions, historical versions are expected.
|
|
318
|
-
|
|
319
|
-
### Redo/Redevelop Guard
|
|
320
|
-
|
|
321
|
-
This guard prevents accidental re-execution of already-completed work while allowing
|
|
322
|
-
incremental processing of new versions. It uses a **partition and filter** approach.
|
|
323
|
-
|
|
324
|
-
1. Resolve the version list (see Version Resolution).
|
|
325
|
-
2. **Partition** the resolved versions into two groups:
|
|
326
|
-
- `completed_versions` — versions that have a matching `conductor-feature-develop` entry
|
|
327
|
-
in `<app_folder>/CHANGELOG.md`
|
|
328
|
-
- `new_versions` — versions with NO matching entry
|
|
329
|
-
3. **Decision**:
|
|
330
|
-
|
|
331
|
-
| `new_versions` | `completed_versions` | Artifacts/code exist? | Action |
|
|
332
|
-
|---------------|---------------------|----------------------|--------|
|
|
333
|
-
| Not empty | Any (including empty) | Yes (expected — prior versions built them) | **Proceed with `new_versions` only** — filter out completed versions. Existing code is the base for version increment. |
|
|
334
|
-
| Not empty | Any | No | **Proceed with all resolved versions** — no prior code, start from scratch. |
|
|
335
|
-
| Empty | Not empty | Yes | **STOP**. Print: `"All requested versions ({list}) for {application} were already developed (recorded in <app_folder>/CHANGELOG.md) and artifacts/code still exist. To redo, first delete the existing IMPLEMENTATION_MASTER.md and source code, then re-run this skill."` |
|
|
336
|
-
| Empty | Not empty | No | **Proceed with all resolved versions** — code was cleaned up, this is a legitimate redo. |
|
|
337
|
-
|
|
338
|
-
**Artifacts/code exist check**: `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md`
|
|
339
|
-
exists, OR source code files exist in `<app_folder>/` (e.g., `pom.xml`, `composer.json`,
|
|
340
|
-
`package.json`, or `src/` directory).
|
|
341
|
-
|
|
342
|
-
4. **Update the resolved version list** to contain only the versions that will be processed
|
|
343
|
-
(either `new_versions` or all versions for redo). This filtered list is what the Version
|
|
344
|
-
Processing Order table and the sequential version loop will use.
|
|
345
|
-
|
|
346
|
-
## Workflow
|
|
347
|
-
|
|
348
|
-
### Phase 0: Resume Check (Runs Every Ralph Loop Iteration)
|
|
349
|
-
|
|
350
|
-
This phase runs at the START of every iteration, including the first. In a Ralph Loop,
|
|
351
|
-
each iteration begins fresh with the same prompt, so the agent MUST read the tracking
|
|
352
|
-
files to understand what has already been completed.
|
|
353
|
-
|
|
354
|
-
0. **Auto-Start Ralph Loop** — Check if `.claude/ralph-loop.local.md` exists. If it does NOT
|
|
355
|
-
exist, Ralph Loop is not yet active. Invoke it NOW using the Skill tool:
|
|
356
|
-
```
|
|
357
|
-
Skill(skill: "ralph-loop:ralph-loop", args: "<the full /conductor-feature-develop invocation with args> --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
358
|
-
```
|
|
359
|
-
If `.claude/ralph-loop.local.md` already exists, Ralph Loop is active — skip this step.
|
|
360
|
-
|
|
361
|
-
1. **Use project information from CLAUDE.md (already in context)** — extract JDK path, Maven path, database credentials,
|
|
362
|
-
message queue credentials, Keycloak config, and all infrastructure details. These values
|
|
363
|
-
are required for every subsequent tool command in this session.
|
|
364
|
-
2. **Verify context artifacts exist** — Check that model/, mockup/, specification/, and test/
|
|
365
|
-
folders contain the required files. If missing, stop and inform user to run
|
|
366
|
-
`/conductor-feature-prepare` first.
|
|
367
|
-
3. Check if `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md` exists
|
|
368
|
-
4. If it exists, read it and determine the current state:
|
|
369
|
-
- Scan the Module Implementation Status table for the FIRST module with status != COMPLETED
|
|
370
|
-
- If ALL modules are COMPLETED:
|
|
371
|
-
- **Sequential version loop check**: Resolve the version list (see Version Resolution).
|
|
372
|
-
Read the **Version Processing Order** table in IMPLEMENTATION_MASTER.md (if it exists)
|
|
373
|
-
to determine which versions have been completed.
|
|
374
|
-
- Find the FIRST version in the resolved list that is NOT yet tracked or NOT `COMPLETED`
|
|
375
|
-
in the Version Processing Order table.
|
|
376
|
-
- If such a version exists, this is the **next version to process** — perform the
|
|
377
|
-
version increment steps below and proceed to Phase 3.
|
|
378
|
-
- If ALL versions in the resolved list are `COMPLETED`, proceed to the README check below.
|
|
379
|
-
- **Version increment** — For each new version to process:
|
|
380
|
-
1. Update IMPLEMENTATION_MASTER.md: add the new version to the Version Processing Order
|
|
381
|
-
table, reset affected modules to PENDING status.
|
|
382
|
-
2. **Update the application version** in the project manifest and configuration:
|
|
383
|
-
- **Spring Boot**: Update `<version>` in `pom.xml` and `APP_VERSION` in `.env`
|
|
384
|
-
- **Laravel**: Update `version` in `composer.json` and `APP_VERSION` in `.env`
|
|
385
|
-
- **React / Node.js**: Update `version` in `package.json` and `VITE_APP_VERSION`
|
|
386
|
-
in `.env.development` (or `APP_VERSION` in `.env` for Node.js backends)
|
|
387
|
-
- **application.yml / config files**: If `app.version` has a hardcoded default in
|
|
388
|
-
`application.yml` (e.g., `${APP_VERSION:1.0.0}`), update the default to the new
|
|
389
|
-
version (e.g., `${APP_VERSION:1.0.4}`)
|
|
390
|
-
- **config/app.php** (Laravel): Update the default in `env('APP_VERSION', '1.0.0')`
|
|
391
|
-
to the new version
|
|
392
|
-
The version displayed in the application footer (or API info endpoint) MUST reflect
|
|
393
|
-
the new version after this update.
|
|
394
|
-
3. Proceed to Phase 3 (Implementation) for the affected modules.
|
|
395
|
-
- **README check**: If the top-level `**Status**:` in IMPLEMENTATION_MASTER.md is NOT
|
|
396
|
-
yet `COMPLETED`, proceed to Phase 5 (Generate README.md) — all modules are done but
|
|
397
|
-
README hasn't been generated and tracking hasn't been finalized yet.
|
|
398
|
-
- If ALL versions are completed AND top-level status is already
|
|
399
|
-
`COMPLETED` → output `<promise>ALL MODULES IMPLEMENTED</promise>` and stop
|
|
400
|
-
- Otherwise, read its `IMPLEMENTATION_MODULE.md` for detailed progress
|
|
401
|
-
- Resume from the last incomplete step in the checklist
|
|
402
|
-
5. If it does not exist, proceed to Phase 1 (Planning — fresh start)
|
|
403
|
-
|
|
404
|
-
### Phase 1: Planning
|
|
405
|
-
|
|
406
|
-
1. **Use project information from CLAUDE.md (already in context)** — extract all paths, credentials,
|
|
407
|
-
and infrastructure configuration. This is the single source of truth for JDK, Maven, database,
|
|
408
|
-
message queue, Keycloak, and all other tool configurations.
|
|
409
|
-
2. Read `<app_folder>/context/test/TEST_PLAN.md`
|
|
410
|
-
3. Extract the **Execution Order** (Section 5) and **Layer Classification** (Section 4)
|
|
411
|
-
4. The execution order defines the module sequence — use it as-is
|
|
412
|
-
5. Read `<app_folder>/context/specification/SPECIFICATION.md` for shared infrastructure context
|
|
413
|
-
|
|
414
|
-
Create `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md` with this structure:
|
|
415
|
-
|
|
416
|
-
```markdown
|
|
417
|
-
# Implementation Master - <Application Name>
|
|
418
|
-
|
|
419
|
-
**Started**: <date>
|
|
420
|
-
**Source Code**: <source-code-path>
|
|
421
|
-
**Context**: <app_folder>/context
|
|
422
|
-
**Resolved Versions**: <comma-separated sorted version list, e.g., "v1.0.0, v1.0.1, v1.0.2">
|
|
423
|
-
**Status**: IN PROGRESS
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
## Version Processing Order
|
|
428
|
-
|
|
429
|
-
| # | Version | Module Count | Status | Started | Completed |
|
|
430
|
-
|---|---------|-------------|--------|---------|-----------|
|
|
431
|
-
| 1 | v1.0.0 | 12 | NEW | - | - |
|
|
432
|
-
| 2 | v1.0.1 | 3 | NEW | - | - |
|
|
433
|
-
| 3 | v1.0.2 | 1 | NEW | - | - |
|
|
434
|
-
|
|
435
|
-
> **Processing Rule**: All modules for version N must reach COMPLETED before version N+1 begins.
|
|
436
|
-
> **First version**: full scaffolding + all modules. **Subsequent versions**: version increment — only modules with changes.
|
|
437
|
-
|
|
438
|
-
---
|
|
439
|
-
|
|
440
|
-
## Execution Order
|
|
441
|
-
|
|
442
|
-
<Copy the execution order tree from TEST_PLAN.md>
|
|
443
|
-
|
|
444
|
-
---
|
|
445
|
-
|
|
446
|
-
## Module Implementation Status
|
|
447
|
-
|
|
448
|
-
| # | Module | Layer | Version | Status | Started | Completed | Notes |
|
|
449
|
-
|---|--------|-------|---------|--------|---------|-----------|-------|
|
|
450
|
-
| 1 | User | L1 | v1.0.0 | PENDING | - | - | |
|
|
451
|
-
| 2 | Location Information | L2 | v1.0.0 | PENDING | - | - | |
|
|
452
|
-
...
|
|
453
|
-
|
|
454
|
-
> The **Version** column tracks which version is currently being implemented for that module.
|
|
455
|
-
> When a version increment occurs, affected modules are reset to PENDING with the new version.
|
|
456
|
-
|
|
457
|
-
---
|
|
458
|
-
|
|
459
|
-
## Module Details
|
|
460
|
-
|
|
461
|
-
### 1. User
|
|
462
|
-
|
|
463
|
-
**Resources**:
|
|
464
|
-
- User Story: <list relevant story IDs>
|
|
465
|
-
- Model: `model/user/model.md`
|
|
466
|
-
- Specification: `specification/user/SPEC.md`
|
|
467
|
-
- Test Spec: `test/user/TEST_SPEC.md`
|
|
468
|
-
- Mockup: `mockup/<role>/content/<screen>.html`
|
|
469
|
-
|
|
470
|
-
**Dependencies**: None
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
|
|
474
|
-
### 2. Location Information
|
|
475
|
-
...
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
**IMPORTANT — Single version shortcut**: When only a single version is resolved, the Version
|
|
479
|
-
Processing Order table has a single row. The behavior is identical to the original single-version
|
|
480
|
-
flow — no extra complexity.
|
|
481
|
-
|
|
482
|
-
**IMPORTANT — Module Count per version**: For the FIRST version, Module Count = total modules
|
|
483
|
-
(full implementation). For subsequent versions, Module Count = only modules that have new/changed
|
|
484
|
-
user stories for that version.
|
|
485
|
-
|
|
486
|
-
### Phase 2: Pre-Implementation (Scaffolding)
|
|
487
|
-
|
|
488
|
-
Read the SPECIFICATION.md shared infrastructure sections and scaffold the project.
|
|
489
|
-
|
|
490
|
-
**CRITICAL — Source Code Placement Rule:**
|
|
491
|
-
All source code MUST be placed directly in `<source-code-path>/` (which defaults to `<app_folder>/`).
|
|
492
|
-
The `context/` folder already exists there and must be preserved. When using project creation tools
|
|
493
|
-
like `composer create-project` or `mvn archetype:generate`, ensure you do NOT create a nested
|
|
494
|
-
subdirectory. Instead:
|
|
495
|
-
- For Laravel: Create the project in a temporary directory (e.g., `<source-code-path>/_temp_scaffold`),
|
|
496
|
-
then move ALL files (including dotfiles) from that temp directory up to `<source-code-path>/`,
|
|
497
|
-
then remove the empty temp directory. This avoids overwriting the existing `context/` folder.
|
|
498
|
-
- For Spring Boot: Same approach — scaffold into a temp dir, then move files up.
|
|
499
|
-
- NEVER use the project slug/name as the target directory if it would create a nested folder.
|
|
500
|
-
|
|
501
|
-
**Scaffolding Checklist** (adapt to the technology stack from SPECIFICATION.md):
|
|
502
|
-
|
|
503
|
-
1. **Project structure**: Create the project skeleton directly in `<source-code-path>/`
|
|
504
|
-
2. **Build & dependency configuration**: composer.json / pom.xml / build.gradle with all dependencies
|
|
505
|
-
3. **Application version**: Set the application version in the project manifest using the
|
|
506
|
-
FIRST version in the resolved version list (the version currently being implemented).
|
|
507
|
-
If no version argument was provided (all versions), use the first discovered version.
|
|
508
|
-
If no versions exist at all, use `1.0.0`.
|
|
509
|
-
- **Spring Boot**: Set `<version>` in `pom.xml` (e.g., `<version>1.0.0</version>`) and
|
|
510
|
-
`APP_VERSION` in `.env`
|
|
511
|
-
- **Laravel**: Set `version` in `composer.json` and `APP_VERSION` in `.env`
|
|
512
|
-
- **React / Node.js**: Set `version` in `package.json` and `VITE_APP_VERSION` in
|
|
513
|
-
`.env.development` (or `APP_VERSION` in `.env` for Node.js backends)
|
|
514
|
-
- The version in the manifest MUST match the version in the environment variable
|
|
515
|
-
- For multi-version processing, this version will be updated during each version increment
|
|
516
|
-
in the Phase 0 resume check
|
|
517
|
-
4. **Application configuration**: .env, config files, or application.yml as appropriate
|
|
518
|
-
4. **Security configuration**: Keycloak/OAuth2 or other auth provider setup
|
|
519
|
-
5. **Shared layouts**: Blade / JTE / other template layout files (header, footer, sidebar)
|
|
520
|
-
6. **Shared components**: UI components (Tailwind), JS structure, CSS
|
|
521
|
-
7. **Data access layer**: Base repository / model configuration
|
|
522
|
-
8. **Error handling**: Global exception handlers
|
|
523
|
-
9. **Theming**: Theme configuration from spec
|
|
524
|
-
10. **Pagination**: Shared pagination support
|
|
525
|
-
11. **Messaging**: Message queue configuration if applicable
|
|
526
|
-
12. **Scheduling**: Scheduled task configuration if applicable
|
|
527
|
-
13. **Playwright test project**: Initialize Playwright in `<source-code-path>/e2e/` with:
|
|
528
|
-
- `package.json` with Playwright and `dotenv` dependencies
|
|
529
|
-
- `playwright.config.ts` with base URL read from `process.env.TEST_APP_BASE_URL`
|
|
530
|
-
(loaded via `dotenv` at the top of the config)
|
|
531
|
-
- `.env.example` — committed to git, contains all `TEST_*` environment variable names
|
|
532
|
-
with placeholder descriptions (from TEST_PLAN.md Section 2a). No real credentials.
|
|
533
|
-
- `.env` — contains actual values from CLAUDE.md for the current developer's machine.
|
|
534
|
-
Pre-populate with values from CLAUDE.md. This file MUST NOT be committed to git.
|
|
535
|
-
- **`.gitignore` update (MANDATORY)** — Add the following entries to the project's
|
|
536
|
-
`.gitignore` file (or create it if it does not exist):
|
|
537
|
-
- `e2e/.env` — prevents credentials and machine-specific paths from being committed
|
|
538
|
-
- `e2e/node_modules/` — prevents Playwright and dotenv dependencies from being committed
|
|
539
|
-
Verify both entries exist before proceeding with any other scaffolding step.
|
|
540
|
-
- `helpers/config.ts` — **single source of truth** for all infrastructure config.
|
|
541
|
-
Loads `dotenv/config` and exports named constants for every `TEST_*` env var
|
|
542
|
-
(DB, MQ, SSO, app URL). All other helpers and spec files import from this file
|
|
543
|
-
instead of reading `process.env` directly or hardcoding values.
|
|
544
|
-
- Helper utilities for login, navigation, data seeding — all helpers MUST import
|
|
545
|
-
infrastructure values from `helpers/config.ts`. **NEVER hardcode** machine-specific
|
|
546
|
-
paths, CLI tool locations, database credentials, or SSO admin passwords in any
|
|
547
|
-
TypeScript source file (helpers OR spec files).
|
|
548
|
-
14. **Mockup baseline screenshots**: Capture baseline screenshots from HTML mockups for visual consistency testing:
|
|
549
|
-
- Start the shared Mockup Hub (`npm start` in `<root>/mockup/` — zero dependencies, no
|
|
550
|
-
npm install needed; port from `PORT` env or `mockup.config.json`, default
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
-
|
|
555
|
-
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
<php-path-from-CLAUDE.md>/php.exe artisan
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
**
|
|
585
|
-
**
|
|
586
|
-
**
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
|
596
|
-
|
|
|
597
|
-
|
|
|
598
|
-
|
|
|
599
|
-
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
- [ ]
|
|
609
|
-
- [ ]
|
|
610
|
-
- [ ]
|
|
611
|
-
- [ ]
|
|
612
|
-
- [ ]
|
|
613
|
-
- [ ]
|
|
614
|
-
- [ ]
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
- [ ] Implement message
|
|
630
|
-
- [ ] Implement
|
|
631
|
-
- [ ] Implement
|
|
632
|
-
- [ ] Implement
|
|
633
|
-
- [ ] Implement
|
|
634
|
-
- [ ]
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
- [ ]
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
- [ ]
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
-
|
|
653
|
-
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
- `model/<module-slug>/
|
|
661
|
-
- `
|
|
662
|
-
- `
|
|
663
|
-
- `
|
|
664
|
-
-
|
|
665
|
-
-
|
|
666
|
-
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
-
|
|
674
|
-
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
|
700
|
-
|
|
|
701
|
-
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
for
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
//
|
|
753
|
-
// export const
|
|
754
|
-
// export const
|
|
755
|
-
// export const
|
|
756
|
-
// export const
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
export const
|
|
761
|
-
export const
|
|
762
|
-
export const
|
|
763
|
-
export const
|
|
764
|
-
export const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
export const
|
|
769
|
-
export const
|
|
770
|
-
export const
|
|
771
|
-
export const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
import {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
**
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
`
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
import {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
//
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
});
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
- If tests
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
-
|
|
872
|
-
-
|
|
873
|
-
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
import {
|
|
879
|
-
import
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
await page
|
|
885
|
-
await page.
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
//
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
- If
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
-
|
|
905
|
-
-
|
|
906
|
-
-
|
|
907
|
-
-
|
|
908
|
-
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
-
|
|
913
|
-
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
- If visual tests
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
-
|
|
927
|
-
- Record
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
-
|
|
936
|
-
|
|
937
|
-
-
|
|
938
|
-
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
- **
|
|
969
|
-
- **
|
|
970
|
-
- **
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
- For **
|
|
1058
|
-
- For **
|
|
1059
|
-
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
-
|
|
1090
|
-
|
|
1091
|
-
-
|
|
1092
|
-
- If the section **
|
|
1093
|
-
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
/hub-
|
|
1111
|
-
/hub-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
/
|
|
1118
|
-
/
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
| **
|
|
1137
|
-
| **Shared —
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
|
1171
|
-
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
mockup/<
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
- Mockup: `/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
- Update
|
|
1211
|
-
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
iteration
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
(
|
|
1258
|
-
(
|
|
1259
|
-
(
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
-
|
|
1279
|
-
-
|
|
1280
|
-
-
|
|
1281
|
-
-
|
|
1282
|
-
-
|
|
1283
|
-
-
|
|
1284
|
-
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
- Use
|
|
1289
|
-
- Use
|
|
1290
|
-
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
`.
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
-
|
|
1313
|
-
-
|
|
1314
|
-
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
Phase 5
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
application
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
`config` subpackage
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
`
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
| PRD.md →
|
|
1363
|
-
| PRD.md →
|
|
1364
|
-
| PRD.md →
|
|
1365
|
-
| PRD.md →
|
|
1366
|
-
|
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
`
|
|
1
|
+
---
|
|
2
|
+
name: conductor-feature-develop
|
|
3
|
+
model: claude-sonnet-5
|
|
4
|
+
effort: high
|
|
5
|
+
description: >
|
|
6
|
+
Application development orchestrator — orchestrates full-stack code implementation
|
|
7
|
+
module-by-module (code + Playwright E2E tests), tracking progress in IMPLEMENTATION_MASTER.md
|
|
8
|
+
and per-module IMPLEMENTATION_MODULE.md. Takes an application name (mandatory), with optional
|
|
9
|
+
source code path, version and module filters. Version supports single version, comma-separated
|
|
10
|
+
list, "all", or omit for all versions. When multiple versions are resolved, they are processed
|
|
11
|
+
SEQUENTIALLY in ascending semver order — all modules for version N are fully implemented before
|
|
12
|
+
version N+1 begins. Requires context artifacts (module models, HTML mockups, technical
|
|
13
|
+
specifications, test specifications) to already exist — use "conductor-feature-prepare" first
|
|
14
|
+
if they don't. Use this skill when the user asks to "implement the application", "start
|
|
15
|
+
development", "build the app module by module", "orchestrate implementation", "develop from
|
|
16
|
+
specs", "implement from test specs", or any request to systematically develop a full application
|
|
17
|
+
from existing specs. Also trigger when user says "resume implementation" to continue from where
|
|
18
|
+
a previous session left off using IMPLEMENTATION_MASTER.md and IMPLEMENTATION_MODULE.md
|
|
19
|
+
progress files.
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Feature Conductor — Develop
|
|
23
|
+
|
|
24
|
+
Application development orchestrator — implements full-stack code module-by-module, driven by
|
|
25
|
+
test specs and tracked via implementation checklists. Requires context artifacts to already
|
|
26
|
+
exist (use `conductor-feature-prepare` first).
|
|
27
|
+
|
|
28
|
+
## Ralph Loop Integration (AUTO-START — MANDATORY)
|
|
29
|
+
|
|
30
|
+
This skill AUTOMATICALLY starts a Ralph Loop to ensure complete implementation across all modules.
|
|
31
|
+
Without Ralph Loop, the implementation may stop prematurely due to context window limits, API
|
|
32
|
+
usage limits, or the agent incorrectly concluding work is "done enough". Ralph Loop ensures
|
|
33
|
+
the same prompt is re-fed after each session exit, and the agent picks up where it left off
|
|
34
|
+
using the IMPLEMENTATION_MASTER.md and IMPLEMENTATION_MODULE.md tracking files.
|
|
35
|
+
|
|
36
|
+
### FIRST ACTION: Start Ralph Loop
|
|
37
|
+
|
|
38
|
+
**BEFORE doing anything else** (before Phase 0, before reading any files), you MUST invoke the
|
|
39
|
+
Ralph Loop skill using the Skill tool. This is a blocking requirement — do NOT proceed with
|
|
40
|
+
any implementation work until Ralph Loop is active.
|
|
41
|
+
|
|
42
|
+
**Invoke this immediately:**
|
|
43
|
+
```
|
|
44
|
+
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop <application> [source:<source-code-path>] [version:<version>] [module:<module>] --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Replace `<application>` and optional arguments with the actual arguments provided by the user.
|
|
48
|
+
|
|
49
|
+
**Example:** If the user invokes:
|
|
50
|
+
```
|
|
51
|
+
/conductor-feature-develop mainapp
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then invoke:
|
|
55
|
+
```
|
|
56
|
+
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop mainapp --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If the user provides optional arguments:
|
|
60
|
+
```
|
|
61
|
+
/conductor-feature-develop mainapp version:v2 module:user
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Then invoke:
|
|
65
|
+
```
|
|
66
|
+
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-develop mainapp version:v2 module:user --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After Ralph Loop is active, proceed with Phase 0 (Resume Check) and continue normally.
|
|
70
|
+
|
|
71
|
+
### How It Works
|
|
72
|
+
|
|
73
|
+
1. This skill auto-starts a Ralph Loop with the orchestrator prompt as the loop body
|
|
74
|
+
2. On each iteration, the agent reads IMPLEMENTATION_MASTER.md to find the next pending module
|
|
75
|
+
3. The agent implements one or more modules until context runs out or a module completes
|
|
76
|
+
4. When the agent tries to exit, the Ralph Loop stop hook re-feeds the same prompt
|
|
77
|
+
5. The next iteration resumes from where the last one left off (tracked in IMPLEMENTATION_MASTER.md)
|
|
78
|
+
6. When ALL modules are COMPLETED, the agent outputs the completion promise to exit the loop
|
|
79
|
+
|
|
80
|
+
### Completion Promise
|
|
81
|
+
|
|
82
|
+
When ALL modules in IMPLEMENTATION_MASTER.md have status `COMPLETED`, output the following
|
|
83
|
+
promise tag to signal the Ralph Loop that implementation is finished:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
<promise>ALL MODULES IMPLEMENTED</promise>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**CRITICAL**: Only output this promise when EVERY module in the execution order has:
|
|
90
|
+
- Status = COMPLETED in IMPLEMENTATION_MASTER.md
|
|
91
|
+
- All E2E tests passing
|
|
92
|
+
- IMPLEMENTATION_MODULE.md fully updated
|
|
93
|
+
|
|
94
|
+
Do NOT output the promise prematurely. Do NOT output it to escape the loop. The Ralph Loop
|
|
95
|
+
will verify this tag and only exit when it is present.
|
|
96
|
+
|
|
97
|
+
### Iteration Awareness
|
|
98
|
+
|
|
99
|
+
At the START of every iteration (including the first), the agent MUST:
|
|
100
|
+
1. Check if Ralph Loop is already active (if `.claude/ralph-loop.local.md` exists, skip re-invoking)
|
|
101
|
+
2. Read IMPLEMENTATION_MASTER.md to determine what is already completed
|
|
102
|
+
3. Find the FIRST module with status != COMPLETED
|
|
103
|
+
4. If that module has an IMPLEMENTATION_MODULE.md, read it to find the last incomplete step
|
|
104
|
+
5. Resume from exactly that point — do NOT re-implement completed work
|
|
105
|
+
6. If ALL modules are COMPLETED, output the completion promise and stop
|
|
106
|
+
|
|
107
|
+
### Never Stop Prematurely
|
|
108
|
+
|
|
109
|
+
Within a Ralph Loop iteration, the agent MUST:
|
|
110
|
+
- Continue implementing modules sequentially until context limits force a stop
|
|
111
|
+
- After completing one module, IMMEDIATELY start the next pending module
|
|
112
|
+
- Do NOT stop after a single module "to let the user review" — Ralph Loop handles iteration
|
|
113
|
+
- Do NOT output the completion promise until ALL modules are verified complete
|
|
114
|
+
- If approaching context limits mid-module, save progress to IMPLEMENTATION_MODULE.md so the
|
|
115
|
+
next iteration can resume from the exact step
|
|
116
|
+
|
|
117
|
+
## Inputs
|
|
118
|
+
|
|
119
|
+
The skill expects these arguments:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
/conductor-feature-develop <application> [source:<source-code-path>] [version:<version>] [module:<module>]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
| Argument | Required | Example | Description |
|
|
126
|
+
|----------|----------|---------|-------------|
|
|
127
|
+
| `<application>` | Yes | `mainapp` | Application name to locate the context folder |
|
|
128
|
+
| `source:<path>` | No | `source:mainapp` | Path where source code resides. Defaults to `<app_folder>` (same as the resolved application folder) |
|
|
129
|
+
| `version:<version>` | No | `version:v2` or `version:v1,v2` or `version:all` | Filter user stories and artifacts by version. Supports single version, comma-separated list, `all`, or omit for all versions. Multiple versions are processed sequentially in ascending semver order |
|
|
130
|
+
| `module:<module>` | No | `module:user` | If provided, process only this module. If omitted, process all modules |
|
|
131
|
+
|
|
132
|
+
### Input Resolution
|
|
133
|
+
|
|
134
|
+
The application name is matched against root-level application folders:
|
|
135
|
+
1. Strip any leading `<number>_` prefix from folder names (e.g., `1_hub_middleware` → `hub_middleware`)
|
|
136
|
+
2. Match case-insensitively against the provided application name
|
|
137
|
+
3. Accept snake_case, kebab-case, or title-case input
|
|
138
|
+
4. If no match found, list available applications and stop
|
|
139
|
+
|
|
140
|
+
### Auto-Resolved Paths
|
|
141
|
+
|
|
142
|
+
| File | Resolved Path |
|
|
143
|
+
|------|---------------|
|
|
144
|
+
| PRD.md | `<app_folder>/context/PRD.md` |
|
|
145
|
+
| Module Models | `<app_folder>/context/model/` |
|
|
146
|
+
| HTML Mockups | `<app_folder>/context/mockup/` |
|
|
147
|
+
| Specifications | `<app_folder>/context/specification/` |
|
|
148
|
+
| Test Specs | `<app_folder>/context/test/` |
|
|
149
|
+
| References | `<app_folder>/context/reference/` |
|
|
150
|
+
| Development Output | `<app_folder>/context/develop/` |
|
|
151
|
+
|
|
152
|
+
### Version Resolution
|
|
153
|
+
|
|
154
|
+
The `version:` argument supports four forms:
|
|
155
|
+
|
|
156
|
+
| Form | Example | Behavior |
|
|
157
|
+
|------|---------|----------|
|
|
158
|
+
| Single version | `version:v2` | Process only v2 |
|
|
159
|
+
| Comma-separated list | `version:v1,v2,v3` | Process each version sequentially in ascending semver order |
|
|
160
|
+
| Explicit all | `version:all` | Discover all versions from PRD.md, process sequentially in ascending semver order |
|
|
161
|
+
| Omitted | _(no version arg)_ | Same as `version:all` |
|
|
162
|
+
|
|
163
|
+
#### Version Discovery
|
|
164
|
+
|
|
165
|
+
When `version:all` or omitted:
|
|
166
|
+
1. Scan PRD.md for all `[vX.Y.Z]` version tags across all module sections
|
|
167
|
+
2. Collect unique versions
|
|
168
|
+
3. Sort in ascending semantic version order (v1.0.0 < v1.0.1 < v1.1.0 < v2.0.0)
|
|
169
|
+
4. This becomes the ordered version list for sequential processing
|
|
170
|
+
|
|
171
|
+
#### Sequential Version Processing Rule
|
|
172
|
+
|
|
173
|
+
**Versions are ALWAYS processed one at a time, in ascending semver order.** All modules for
|
|
174
|
+
version N must be fully implemented (status `COMPLETED`) before version N+1 begins. This ensures:
|
|
175
|
+
- The application is scaffolded and fully functional at version N before N+1 changes are layered on
|
|
176
|
+
- Feature implementations build incrementally on prior version work
|
|
177
|
+
- E2E tests validate each version's functionality before the next version modifies the codebase
|
|
178
|
+
|
|
179
|
+
#### How It Works with Multiple Versions
|
|
180
|
+
|
|
181
|
+
1. **First version** (e.g., v1.0.0): Full implementation — scaffolding (Phase 2) + all modules (Phase 3)
|
|
182
|
+
2. **Each subsequent version** (e.g., v1.0.1, v1.0.2): Version increment — reset affected modules
|
|
183
|
+
to PENDING, update the application version, then re-implement only modules with changes for
|
|
184
|
+
that version. The existing "Version Increment" logic in Phase 0 handles this naturally.
|
|
185
|
+
3. **README** (Phase 5): Generated ONCE after the LAST version in the list is fully
|
|
186
|
+
implemented
|
|
187
|
+
|
|
188
|
+
### Application Folder Structure (Expected)
|
|
189
|
+
|
|
190
|
+
Source code and context artifacts coexist in the same `<app_folder>`. The `context/` subfolder
|
|
191
|
+
holds all generated artifacts (models, mockups, specs, tests, tracking). All other files and
|
|
192
|
+
folders at the root of `<app_folder>` are **source code** (e.g., `app/`, `Modules/`, `resources/`,
|
|
193
|
+
`composer.json`, `pom.xml`, `src/`, etc.).
|
|
194
|
+
|
|
195
|
+
**CRITICAL**: When scaffolding a new project (e.g., `composer create-project`, `mvn archetype:generate`),
|
|
196
|
+
the source code MUST be placed directly in `<source-code-path>/` — NOT in a nested subdirectory.
|
|
197
|
+
For example, with `composer create-project laravel/laravel`, you must either:
|
|
198
|
+
- Create in a temp directory and move all files (including dotfiles) up to `<source-code-path>/`, OR
|
|
199
|
+
- Use a technique that installs directly into the existing directory
|
|
200
|
+
|
|
201
|
+
The `context/` folder already exists in `<app_folder>` and must NOT be overwritten or deleted.
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
<app_folder>/ # = <source-code-path> (by default)
|
|
205
|
+
context/ # Context artifacts (NOT source code)
|
|
206
|
+
PRD.md
|
|
207
|
+
model/
|
|
208
|
+
MODEL.md
|
|
209
|
+
<module-slug>/
|
|
210
|
+
model.md
|
|
211
|
+
schemas.json
|
|
212
|
+
document-model.mermaid
|
|
213
|
+
mockup/
|
|
214
|
+
MOCKUP.html
|
|
215
|
+
mockup-manifest.json
|
|
216
|
+
<role>/content/
|
|
217
|
+
specification/
|
|
218
|
+
SPECIFICATION.md
|
|
219
|
+
<module-slug>/SPEC.md
|
|
220
|
+
test/
|
|
221
|
+
TEST_PLAN.md
|
|
222
|
+
<module-slug>/TEST_SPEC.md
|
|
223
|
+
reference/
|
|
224
|
+
develop/ # Implementation tracking files
|
|
225
|
+
(source code files) # All other files are source code
|
|
226
|
+
app/ # Laravel: app directory
|
|
227
|
+
Modules/ # Laravel: nwidart modules
|
|
228
|
+
resources/ # Laravel: views, CSS, JS
|
|
229
|
+
routes/ # Laravel: route files
|
|
230
|
+
config/ # Laravel: config files
|
|
231
|
+
composer.json # Laravel: PHP dependencies
|
|
232
|
+
package.json # Laravel: JS dependencies
|
|
233
|
+
... # (or src/, pom.xml for Spring Boot, etc.)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Pre-Requisite: Project Information from CLAUDE.md (MANDATORY)
|
|
237
|
+
|
|
238
|
+
**CLAUDE.md is automatically loaded into context** at the start of every session. It contains
|
|
239
|
+
project details, infrastructure paths, credentials, and configuration. You do NOT need to read
|
|
240
|
+
it manually — the information is already available in your context.
|
|
241
|
+
|
|
242
|
+
**Before executing ANY tool command** (Maven build, Spring Boot run, database CLI, Keycloak CLI,
|
|
243
|
+
Playwright test, npm start, etc.), use the following from CLAUDE.md (already in context):
|
|
244
|
+
|
|
245
|
+
- **JDK path** — Use the exact `JAVA_HOME` path specified in CLAUDE.md
|
|
246
|
+
- **Maven path** — Use the exact Maven binary path specified in CLAUDE.md
|
|
247
|
+
- **Database credentials** — Host, port, username, password for MongoDB, MySQL, etc.
|
|
248
|
+
- **Message queue credentials** — RabbitMQ host, port, username, password
|
|
249
|
+
- **Keycloak configuration** — Host, admin credentials, CLI path
|
|
250
|
+
- **Mailcatcher configuration** — SMTP host/port, web UI URL
|
|
251
|
+
- **Any other infrastructure details** — Ports, URLs, connection strings
|
|
252
|
+
|
|
253
|
+
**WHY**: CLAUDE.md contains the actual system paths, credentials, and configuration for the
|
|
254
|
+
developer's machine. Hardcoding or guessing these values will cause commands to fail. Every shell
|
|
255
|
+
command that involves JDK, Maven, database access, or any external service MUST use the values
|
|
256
|
+
from CLAUDE.md.
|
|
257
|
+
|
|
258
|
+
## PRD.md Extended Sections
|
|
259
|
+
|
|
260
|
+
During implementation, check PRD.md for the following extended sections and use them as high-level context:
|
|
261
|
+
|
|
262
|
+
### Design System
|
|
263
|
+
|
|
264
|
+
If PRD.md contains a `# Design System` section, read it and any file it references (e.g., `[DESIGN_SYSTEM.md](reference/DESIGN_SYSTEM.md)`) before implementing **any UI module** (Blade views, JTE templates, React components, etc.). Treat the design system as the **authoritative source** for code-level styling:
|
|
265
|
+
|
|
266
|
+
- **Color tokens, typography, spacing, radii, shadows** — apply directly in Tailwind config, CSS variables, or MUI theme. Do not invent new values.
|
|
267
|
+
- **Component patterns** — buttons, forms, tables, dialogs, alerts must match the design system's visual rules and accessibility behavior.
|
|
268
|
+
- **Branding** — logos, favicons, and brand voice must be applied consistently across all rendered views.
|
|
269
|
+
- **Accessibility rules** — WCAG level, contrast ratios, focus states, keyboard navigation requirements declared in the design system are non-negotiable.
|
|
270
|
+
|
|
271
|
+
**Conflict resolution**: If `SPECIFICATION.md`'s "Design System Integration" subsection contradicts the PRD.md design system file (e.g., different color values, different component variants), the **PRD.md design system file wins**. Flag the discrepancy for human review and proceed with the design system file.
|
|
272
|
+
|
|
273
|
+
If absent, fall back to `SPECIFICATION.md`'s design system guidance and CLAUDE.md's CSS framework declaration (existing behavior).
|
|
274
|
+
|
|
275
|
+
### Architecture Principle
|
|
276
|
+
|
|
277
|
+
If PRD.md contains an `# Architecture Principle` section, read it and use as implementation constraints:
|
|
278
|
+
- **Stateless**: Ensure no module implementation stores data in HTTP session — user context must come from JWT tokens or external identity providers
|
|
279
|
+
- **Event-driven**: Ensure inter-module communication uses event publishing (e.g., Spring ApplicationEvent, Laravel Event) rather than direct service injection across module boundaries
|
|
280
|
+
- **Message driven**: When implementing message consumers/publishers, follow the patterns described in the architecture (e.g., dedicated queues per country, independent queue configurations)
|
|
281
|
+
- **Monolithic with modular architecture**: Modules can share the same database but should not directly access each other's repositories — use events or service interfaces
|
|
282
|
+
|
|
283
|
+
If absent, rely on SPECIFICATION.md for architectural guidance (existing behavior).
|
|
284
|
+
|
|
285
|
+
### High Level Process Flow
|
|
286
|
+
|
|
287
|
+
If PRD.md contains a `# High Level Process Flow` section, use it as the **implementation blueprint** for message-driven modules:
|
|
288
|
+
1. Implement flow steps in order: (1) message consumer, (2) validation logic, (3) data persistence, (4) ACK/NACK publishing
|
|
289
|
+
2. Each flow step maps to a specific method in the service layer
|
|
290
|
+
3. Treat flow steps as mini-specifications within each module's implementation
|
|
291
|
+
4. After implementing all steps of a flow, verify the complete end-to-end flow works before moving to the next module
|
|
292
|
+
|
|
293
|
+
If absent, implement from SPECIFICATION.md messaging sections only (existing behavior).
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Pre-Requisite: Context Artifacts Must Exist
|
|
298
|
+
|
|
299
|
+
Before starting implementation, verify that all required context artifacts exist:
|
|
300
|
+
- `<app_folder>/context/model/` — must contain module model files
|
|
301
|
+
- `<app_folder>/context/mockup/` — must contain HTML mockup files
|
|
302
|
+
- `<app_folder>/context/specification/` — must contain specification files
|
|
303
|
+
- `<app_folder>/context/test/` — must contain test specification files
|
|
304
|
+
|
|
305
|
+
If any artifacts are missing, **stop and inform the user** to run `/conductor-feature-prepare`
|
|
306
|
+
first. Do NOT attempt to generate artifacts — that is the responsibility of the prepare skill.
|
|
307
|
+
|
|
308
|
+
## Version Gate
|
|
309
|
+
|
|
310
|
+
Before starting any work, check `CHANGELOG.md` in the application folder (`<app_folder>/CHANGELOG.md`):
|
|
311
|
+
|
|
312
|
+
1. If `<app_folder>/CHANGELOG.md` does not exist, skip this check (first-ever execution for this application).
|
|
313
|
+
2. If `<app_folder>/CHANGELOG.md` exists, scan all `## vX.Y.Z` headings and determine the **highest version** using semantic versioning comparison.
|
|
314
|
+
3. Apply the gate based on the version argument form:
|
|
315
|
+
- **Single version**: If requested version **<** highest version → **STOP immediately**. Print: `"Version {requested} is lower than the current application version {highest} recorded in <app_folder>/CHANGELOG.md. Execution rejected."`
|
|
316
|
+
- **Comma-separated list**: Check the **lowest** version in the list. If lowest **<** highest version → **STOP immediately**. Print: `"Version {lowest} in the provided list is lower than the current application version {highest} recorded in <app_folder>/CHANGELOG.md. Execution rejected."`
|
|
317
|
+
- **`version:all` or omitted**: Skip this check — when processing all discovered versions, historical versions are expected.
|
|
318
|
+
|
|
319
|
+
### Redo/Redevelop Guard
|
|
320
|
+
|
|
321
|
+
This guard prevents accidental re-execution of already-completed work while allowing
|
|
322
|
+
incremental processing of new versions. It uses a **partition and filter** approach.
|
|
323
|
+
|
|
324
|
+
1. Resolve the version list (see Version Resolution).
|
|
325
|
+
2. **Partition** the resolved versions into two groups:
|
|
326
|
+
- `completed_versions` — versions that have a matching `conductor-feature-develop` entry
|
|
327
|
+
in `<app_folder>/CHANGELOG.md`
|
|
328
|
+
- `new_versions` — versions with NO matching entry
|
|
329
|
+
3. **Decision**:
|
|
330
|
+
|
|
331
|
+
| `new_versions` | `completed_versions` | Artifacts/code exist? | Action |
|
|
332
|
+
|---------------|---------------------|----------------------|--------|
|
|
333
|
+
| Not empty | Any (including empty) | Yes (expected — prior versions built them) | **Proceed with `new_versions` only** — filter out completed versions. Existing code is the base for version increment. |
|
|
334
|
+
| Not empty | Any | No | **Proceed with all resolved versions** — no prior code, start from scratch. |
|
|
335
|
+
| Empty | Not empty | Yes | **STOP**. Print: `"All requested versions ({list}) for {application} were already developed (recorded in <app_folder>/CHANGELOG.md) and artifacts/code still exist. To redo, first delete the existing IMPLEMENTATION_MASTER.md and source code, then re-run this skill."` |
|
|
336
|
+
| Empty | Not empty | No | **Proceed with all resolved versions** — code was cleaned up, this is a legitimate redo. |
|
|
337
|
+
|
|
338
|
+
**Artifacts/code exist check**: `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md`
|
|
339
|
+
exists, OR source code files exist in `<app_folder>/` (e.g., `pom.xml`, `composer.json`,
|
|
340
|
+
`package.json`, or `src/` directory).
|
|
341
|
+
|
|
342
|
+
4. **Update the resolved version list** to contain only the versions that will be processed
|
|
343
|
+
(either `new_versions` or all versions for redo). This filtered list is what the Version
|
|
344
|
+
Processing Order table and the sequential version loop will use.
|
|
345
|
+
|
|
346
|
+
## Workflow
|
|
347
|
+
|
|
348
|
+
### Phase 0: Resume Check (Runs Every Ralph Loop Iteration)
|
|
349
|
+
|
|
350
|
+
This phase runs at the START of every iteration, including the first. In a Ralph Loop,
|
|
351
|
+
each iteration begins fresh with the same prompt, so the agent MUST read the tracking
|
|
352
|
+
files to understand what has already been completed.
|
|
353
|
+
|
|
354
|
+
0. **Auto-Start Ralph Loop** — Check if `.claude/ralph-loop.local.md` exists. If it does NOT
|
|
355
|
+
exist, Ralph Loop is not yet active. Invoke it NOW using the Skill tool:
|
|
356
|
+
```
|
|
357
|
+
Skill(skill: "ralph-loop:ralph-loop", args: "<the full /conductor-feature-develop invocation with args> --completion-promise \"ALL MODULES IMPLEMENTED\" --max-iterations 100")
|
|
358
|
+
```
|
|
359
|
+
If `.claude/ralph-loop.local.md` already exists, Ralph Loop is active — skip this step.
|
|
360
|
+
|
|
361
|
+
1. **Use project information from CLAUDE.md (already in context)** — extract JDK path, Maven path, database credentials,
|
|
362
|
+
message queue credentials, Keycloak config, and all infrastructure details. These values
|
|
363
|
+
are required for every subsequent tool command in this session.
|
|
364
|
+
2. **Verify context artifacts exist** — Check that model/, mockup/, specification/, and test/
|
|
365
|
+
folders contain the required files. If missing, stop and inform user to run
|
|
366
|
+
`/conductor-feature-prepare` first.
|
|
367
|
+
3. Check if `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md` exists
|
|
368
|
+
4. If it exists, read it and determine the current state:
|
|
369
|
+
- Scan the Module Implementation Status table for the FIRST module with status != COMPLETED
|
|
370
|
+
- If ALL modules are COMPLETED:
|
|
371
|
+
- **Sequential version loop check**: Resolve the version list (see Version Resolution).
|
|
372
|
+
Read the **Version Processing Order** table in IMPLEMENTATION_MASTER.md (if it exists)
|
|
373
|
+
to determine which versions have been completed.
|
|
374
|
+
- Find the FIRST version in the resolved list that is NOT yet tracked or NOT `COMPLETED`
|
|
375
|
+
in the Version Processing Order table.
|
|
376
|
+
- If such a version exists, this is the **next version to process** — perform the
|
|
377
|
+
version increment steps below and proceed to Phase 3.
|
|
378
|
+
- If ALL versions in the resolved list are `COMPLETED`, proceed to the README check below.
|
|
379
|
+
- **Version increment** — For each new version to process:
|
|
380
|
+
1. Update IMPLEMENTATION_MASTER.md: add the new version to the Version Processing Order
|
|
381
|
+
table, reset affected modules to PENDING status.
|
|
382
|
+
2. **Update the application version** in the project manifest and configuration:
|
|
383
|
+
- **Spring Boot**: Update `<version>` in `pom.xml` and `APP_VERSION` in `.env`
|
|
384
|
+
- **Laravel**: Update `version` in `composer.json` and `APP_VERSION` in `.env`
|
|
385
|
+
- **React / Node.js**: Update `version` in `package.json` and `VITE_APP_VERSION`
|
|
386
|
+
in `.env.development` (or `APP_VERSION` in `.env` for Node.js backends)
|
|
387
|
+
- **application.yml / config files**: If `app.version` has a hardcoded default in
|
|
388
|
+
`application.yml` (e.g., `${APP_VERSION:1.0.0}`), update the default to the new
|
|
389
|
+
version (e.g., `${APP_VERSION:1.0.4}`)
|
|
390
|
+
- **config/app.php** (Laravel): Update the default in `env('APP_VERSION', '1.0.0')`
|
|
391
|
+
to the new version
|
|
392
|
+
The version displayed in the application footer (or API info endpoint) MUST reflect
|
|
393
|
+
the new version after this update.
|
|
394
|
+
3. Proceed to Phase 3 (Implementation) for the affected modules.
|
|
395
|
+
- **README check**: If the top-level `**Status**:` in IMPLEMENTATION_MASTER.md is NOT
|
|
396
|
+
yet `COMPLETED`, proceed to Phase 5 (Generate README.md) — all modules are done but
|
|
397
|
+
README hasn't been generated and tracking hasn't been finalized yet.
|
|
398
|
+
- If ALL versions are completed AND top-level status is already
|
|
399
|
+
`COMPLETED` → output `<promise>ALL MODULES IMPLEMENTED</promise>` and stop
|
|
400
|
+
- Otherwise, read its `IMPLEMENTATION_MODULE.md` for detailed progress
|
|
401
|
+
- Resume from the last incomplete step in the checklist
|
|
402
|
+
5. If it does not exist, proceed to Phase 1 (Planning — fresh start)
|
|
403
|
+
|
|
404
|
+
### Phase 1: Planning
|
|
405
|
+
|
|
406
|
+
1. **Use project information from CLAUDE.md (already in context)** — extract all paths, credentials,
|
|
407
|
+
and infrastructure configuration. This is the single source of truth for JDK, Maven, database,
|
|
408
|
+
message queue, Keycloak, and all other tool configurations.
|
|
409
|
+
2. Read `<app_folder>/context/test/TEST_PLAN.md`
|
|
410
|
+
3. Extract the **Execution Order** (Section 5) and **Layer Classification** (Section 4)
|
|
411
|
+
4. The execution order defines the module sequence — use it as-is
|
|
412
|
+
5. Read `<app_folder>/context/specification/SPECIFICATION.md` for shared infrastructure context
|
|
413
|
+
|
|
414
|
+
Create `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md` with this structure:
|
|
415
|
+
|
|
416
|
+
```markdown
|
|
417
|
+
# Implementation Master - <Application Name>
|
|
418
|
+
|
|
419
|
+
**Started**: <date>
|
|
420
|
+
**Source Code**: <source-code-path>
|
|
421
|
+
**Context**: <app_folder>/context
|
|
422
|
+
**Resolved Versions**: <comma-separated sorted version list, e.g., "v1.0.0, v1.0.1, v1.0.2">
|
|
423
|
+
**Status**: IN PROGRESS
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Version Processing Order
|
|
428
|
+
|
|
429
|
+
| # | Version | Module Count | Status | Started | Completed |
|
|
430
|
+
|---|---------|-------------|--------|---------|-----------|
|
|
431
|
+
| 1 | v1.0.0 | 12 | NEW | - | - |
|
|
432
|
+
| 2 | v1.0.1 | 3 | NEW | - | - |
|
|
433
|
+
| 3 | v1.0.2 | 1 | NEW | - | - |
|
|
434
|
+
|
|
435
|
+
> **Processing Rule**: All modules for version N must reach COMPLETED before version N+1 begins.
|
|
436
|
+
> **First version**: full scaffolding + all modules. **Subsequent versions**: version increment — only modules with changes.
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Execution Order
|
|
441
|
+
|
|
442
|
+
<Copy the execution order tree from TEST_PLAN.md>
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Module Implementation Status
|
|
447
|
+
|
|
448
|
+
| # | Module | Layer | Version | Status | Started | Completed | Notes |
|
|
449
|
+
|---|--------|-------|---------|--------|---------|-----------|-------|
|
|
450
|
+
| 1 | User | L1 | v1.0.0 | PENDING | - | - | |
|
|
451
|
+
| 2 | Location Information | L2 | v1.0.0 | PENDING | - | - | |
|
|
452
|
+
...
|
|
453
|
+
|
|
454
|
+
> The **Version** column tracks which version is currently being implemented for that module.
|
|
455
|
+
> When a version increment occurs, affected modules are reset to PENDING with the new version.
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## Module Details
|
|
460
|
+
|
|
461
|
+
### 1. User
|
|
462
|
+
|
|
463
|
+
**Resources**:
|
|
464
|
+
- User Story: <list relevant story IDs>
|
|
465
|
+
- Model: `model/user/model.md`
|
|
466
|
+
- Specification: `specification/user/SPEC.md`
|
|
467
|
+
- Test Spec: `test/user/TEST_SPEC.md`
|
|
468
|
+
- Mockup: `mockup/<role>/content/<screen>.html`
|
|
469
|
+
|
|
470
|
+
**Dependencies**: None
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
### 2. Location Information
|
|
475
|
+
...
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
**IMPORTANT — Single version shortcut**: When only a single version is resolved, the Version
|
|
479
|
+
Processing Order table has a single row. The behavior is identical to the original single-version
|
|
480
|
+
flow — no extra complexity.
|
|
481
|
+
|
|
482
|
+
**IMPORTANT — Module Count per version**: For the FIRST version, Module Count = total modules
|
|
483
|
+
(full implementation). For subsequent versions, Module Count = only modules that have new/changed
|
|
484
|
+
user stories for that version.
|
|
485
|
+
|
|
486
|
+
### Phase 2: Pre-Implementation (Scaffolding)
|
|
487
|
+
|
|
488
|
+
Read the SPECIFICATION.md shared infrastructure sections and scaffold the project.
|
|
489
|
+
|
|
490
|
+
**CRITICAL — Source Code Placement Rule:**
|
|
491
|
+
All source code MUST be placed directly in `<source-code-path>/` (which defaults to `<app_folder>/`).
|
|
492
|
+
The `context/` folder already exists there and must be preserved. When using project creation tools
|
|
493
|
+
like `composer create-project` or `mvn archetype:generate`, ensure you do NOT create a nested
|
|
494
|
+
subdirectory. Instead:
|
|
495
|
+
- For Laravel: Create the project in a temporary directory (e.g., `<source-code-path>/_temp_scaffold`),
|
|
496
|
+
then move ALL files (including dotfiles) from that temp directory up to `<source-code-path>/`,
|
|
497
|
+
then remove the empty temp directory. This avoids overwriting the existing `context/` folder.
|
|
498
|
+
- For Spring Boot: Same approach — scaffold into a temp dir, then move files up.
|
|
499
|
+
- NEVER use the project slug/name as the target directory if it would create a nested folder.
|
|
500
|
+
|
|
501
|
+
**Scaffolding Checklist** (adapt to the technology stack from SPECIFICATION.md):
|
|
502
|
+
|
|
503
|
+
1. **Project structure**: Create the project skeleton directly in `<source-code-path>/`
|
|
504
|
+
2. **Build & dependency configuration**: composer.json / pom.xml / build.gradle with all dependencies
|
|
505
|
+
3. **Application version**: Set the application version in the project manifest using the
|
|
506
|
+
FIRST version in the resolved version list (the version currently being implemented).
|
|
507
|
+
If no version argument was provided (all versions), use the first discovered version.
|
|
508
|
+
If no versions exist at all, use `1.0.0`.
|
|
509
|
+
- **Spring Boot**: Set `<version>` in `pom.xml` (e.g., `<version>1.0.0</version>`) and
|
|
510
|
+
`APP_VERSION` in `.env`
|
|
511
|
+
- **Laravel**: Set `version` in `composer.json` and `APP_VERSION` in `.env`
|
|
512
|
+
- **React / Node.js**: Set `version` in `package.json` and `VITE_APP_VERSION` in
|
|
513
|
+
`.env.development` (or `APP_VERSION` in `.env` for Node.js backends)
|
|
514
|
+
- The version in the manifest MUST match the version in the environment variable
|
|
515
|
+
- For multi-version processing, this version will be updated during each version increment
|
|
516
|
+
in the Phase 0 resume check
|
|
517
|
+
4. **Application configuration**: .env, config files, or application.yml as appropriate
|
|
518
|
+
4. **Security configuration**: Keycloak/OAuth2 or other auth provider setup
|
|
519
|
+
5. **Shared layouts**: Blade / JTE / other template layout files (header, footer, sidebar)
|
|
520
|
+
6. **Shared components**: UI components (Tailwind), JS structure, CSS
|
|
521
|
+
7. **Data access layer**: Base repository / model configuration
|
|
522
|
+
8. **Error handling**: Global exception handlers
|
|
523
|
+
9. **Theming**: Theme configuration from spec
|
|
524
|
+
10. **Pagination**: Shared pagination support
|
|
525
|
+
11. **Messaging**: Message queue configuration if applicable
|
|
526
|
+
12. **Scheduling**: Scheduled task configuration if applicable
|
|
527
|
+
13. **Playwright test project**: Initialize Playwright in `<source-code-path>/e2e/` with:
|
|
528
|
+
- `package.json` with Playwright and `dotenv` dependencies
|
|
529
|
+
- `playwright.config.ts` with base URL read from `process.env.TEST_APP_BASE_URL`
|
|
530
|
+
(loaded via `dotenv` at the top of the config)
|
|
531
|
+
- `.env.example` — committed to git, contains all `TEST_*` environment variable names
|
|
532
|
+
with placeholder descriptions (from TEST_PLAN.md Section 2a). No real credentials.
|
|
533
|
+
- `.env` — contains actual values from CLAUDE.md for the current developer's machine.
|
|
534
|
+
Pre-populate with values from CLAUDE.md. This file MUST NOT be committed to git.
|
|
535
|
+
- **`.gitignore` update (MANDATORY)** — Add the following entries to the project's
|
|
536
|
+
`.gitignore` file (or create it if it does not exist):
|
|
537
|
+
- `e2e/.env` — prevents credentials and machine-specific paths from being committed
|
|
538
|
+
- `e2e/node_modules/` — prevents Playwright and dotenv dependencies from being committed
|
|
539
|
+
Verify both entries exist before proceeding with any other scaffolding step.
|
|
540
|
+
- `helpers/config.ts` — **single source of truth** for all infrastructure config.
|
|
541
|
+
Loads `dotenv/config` and exports named constants for every `TEST_*` env var
|
|
542
|
+
(DB, MQ, SSO, app URL). All other helpers and spec files import from this file
|
|
543
|
+
instead of reading `process.env` directly or hardcoding values.
|
|
544
|
+
- Helper utilities for login, navigation, data seeding — all helpers MUST import
|
|
545
|
+
infrastructure values from `helpers/config.ts`. **NEVER hardcode** machine-specific
|
|
546
|
+
paths, CLI tool locations, database credentials, or SSO admin passwords in any
|
|
547
|
+
TypeScript source file (helpers OR spec files).
|
|
548
|
+
14. **Mockup baseline screenshots**: Capture baseline screenshots from HTML mockups for visual consistency testing:
|
|
549
|
+
- Start the shared Mockup Hub (`npm start` in `<root>/mockup/` — zero dependencies, no
|
|
550
|
+
npm install needed; port from `PORT` env or `mockup.config.json`, default: first
|
|
551
|
+
unused port from 4000 — the effective URL is printed on start)
|
|
552
|
+
- Screens are served at `http://localhost:<hub_port>/<app_slug>/<role>/<page>`
|
|
553
|
+
(shadcn mockups must be built first: `npm run build` in the app's mockup folder)
|
|
554
|
+
- For each role/screen in the mockup, capture a screenshot to `<source-code-path>/e2e/visual-baselines/`
|
|
555
|
+
- Stop the Mockup Hub after capture
|
|
556
|
+
- These baselines will be compared against the application output during module testing
|
|
557
|
+
|
|
558
|
+
After scaffolding, verify the application compiles/starts. **Use the exact paths, CLIs, and
|
|
559
|
+
credentials from `CLAUDE.md`** — do NOT use generic commands or assume default paths:
|
|
560
|
+
```bash
|
|
561
|
+
# Examples (actual paths come from CLAUDE.md):
|
|
562
|
+
|
|
563
|
+
# Laravel:
|
|
564
|
+
<php-path-from-CLAUDE.md>/php.exe artisan --version
|
|
565
|
+
<php-path-from-CLAUDE.md>/php.exe artisan serve
|
|
566
|
+
|
|
567
|
+
# Spring Boot:
|
|
568
|
+
JAVA_HOME="<jdk-path>" <maven-path>/mvn -f <source-code-path>/pom.xml clean compile
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
Update IMPLEMENTATION_MASTER.md: mark scaffolding as COMPLETED.
|
|
572
|
+
|
|
573
|
+
### Phase 3: Implementation (Per Module)
|
|
574
|
+
|
|
575
|
+
For each module in execution order:
|
|
576
|
+
|
|
577
|
+
#### Step 3.1: Initialize Module Tracking
|
|
578
|
+
|
|
579
|
+
Create `<app_folder>/context/develop/<module-slug>/IMPLEMENTATION_MODULE.md`:
|
|
580
|
+
|
|
581
|
+
```markdown
|
|
582
|
+
# Implementation - <Module Name>
|
|
583
|
+
|
|
584
|
+
**Module**: <Module Name>
|
|
585
|
+
**Layer**: <Layer>
|
|
586
|
+
**Status**: IN PROGRESS
|
|
587
|
+
**Started**: <date>
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
## Resources
|
|
592
|
+
|
|
593
|
+
| Resource | Path |
|
|
594
|
+
|----------|------|
|
|
595
|
+
| User Stories | <IDs from PRD.md> |
|
|
596
|
+
| Bug Fixes | <IDs from PRD.md `### Bug` section, if any> |
|
|
597
|
+
| Model | `model/<module-slug>/model.md` |
|
|
598
|
+
| Specification | `specification/<module-slug>/SPEC.md` |
|
|
599
|
+
| Test Spec | `test/<module-slug>/TEST_SPEC.md` |
|
|
600
|
+
| Mockup | `mockup/<role>/content/<screen>.html` |
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
## Implementation Checklist
|
|
605
|
+
|
|
606
|
+
### UI Layer
|
|
607
|
+
|
|
608
|
+
- [ ] 1. Read and analyze module resources
|
|
609
|
+
- [ ] 2. Implement module model (entities/documents)
|
|
610
|
+
- [ ] 3. Implement repository layer
|
|
611
|
+
- [ ] 4. Implement service layer
|
|
612
|
+
- [ ] 5. Implement controller layer
|
|
613
|
+
- [ ] 6. Implement view templates (list, detail, form pages)
|
|
614
|
+
- [ ] 7. Write Playwright E2E tests (UI scenarios)
|
|
615
|
+
- [ ] 8. Run E2E tests and verify
|
|
616
|
+
|
|
617
|
+
### User Stories
|
|
618
|
+
|
|
619
|
+
<For each user story ID from the module's SPEC.md traceability section, add a checklist item:>
|
|
620
|
+
- [ ] USxxxx: <description>
|
|
621
|
+
|
|
622
|
+
### Non-Functional Requirements
|
|
623
|
+
|
|
624
|
+
<For each NFR ID from the module's SPEC.md traceability section, add a checklist item:>
|
|
625
|
+
- [ ] NFRxxxx: <description>
|
|
626
|
+
|
|
627
|
+
### Messaging Pipeline (if applicable — include only if module has messaging NFRs)
|
|
628
|
+
|
|
629
|
+
- [ ] Implement message consumer
|
|
630
|
+
- [ ] Implement message validator
|
|
631
|
+
- [ ] Implement ACK publisher
|
|
632
|
+
- [ ] Implement forward publisher
|
|
633
|
+
- [ ] Implement queue configuration
|
|
634
|
+
- [ ] Implement module events
|
|
635
|
+
- [ ] Write E2E tests for message processing flow
|
|
636
|
+
|
|
637
|
+
### Scheduled Jobs (if applicable — include only if module has scheduling NFRs)
|
|
638
|
+
|
|
639
|
+
- [ ] Implement scheduled job
|
|
640
|
+
- [ ] Write E2E tests for scheduled job
|
|
641
|
+
|
|
642
|
+
### Visual Consistency
|
|
643
|
+
|
|
644
|
+
- [ ] Visual consistency testing (mockup vs application)
|
|
645
|
+
- [ ] Fix visual deviations (if any)
|
|
646
|
+
|
|
647
|
+
---
|
|
648
|
+
|
|
649
|
+
## Implementation Log
|
|
650
|
+
|
|
651
|
+
### Step 1: Analyze Module Resources
|
|
652
|
+
<timestamp> - Started
|
|
653
|
+
- Read model.md, SPEC.md, TEST_SPEC.md, mockup HTML
|
|
654
|
+
- Key findings: ...
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
#### Step 3.2: Analyze Module Resources
|
|
658
|
+
|
|
659
|
+
Read ALL module-specific resources:
|
|
660
|
+
- `model/<module-slug>/model.md` — document structure, collections, fields
|
|
661
|
+
- `model/<module-slug>/schemas.json` — JSON schema examples
|
|
662
|
+
- `specification/<module-slug>/SPEC.md` — full technical specification
|
|
663
|
+
- `test/<module-slug>/TEST_SPEC.md` — test scenarios, seeding scripts, assertions
|
|
664
|
+
- `mockup/<role>/content/<module_screen>.html` — UI mockup for visual reference
|
|
665
|
+
- Relevant entries from `PRD.md` — user stories for this module
|
|
666
|
+
- `### Bug` section from `PRD.md` for this module (if present) — previously fixed bugs
|
|
667
|
+
- Relevant message files from `reference/message/` if applicable
|
|
668
|
+
|
|
669
|
+
**Bug Regression Awareness (Redo/Redevelop Scenario):**
|
|
670
|
+
If the module has a `### Bug` section in PRD.md, this means the application was previously
|
|
671
|
+
developed and users reported bugs that were fixed. During redevelopment, these bug fixes MUST
|
|
672
|
+
be incorporated into the implementation to prevent the same bugs from reappearing:
|
|
673
|
+
- Read each bug entry (e.g., `[BUG-024] Fixed Message ID link...`) to understand what was broken and how it was fixed
|
|
674
|
+
- Treat each bug fix as an implicit requirement — the implementation must produce behavior consistent with the fix description
|
|
675
|
+
- If a bug fix contradicts or supplements a user story or NFR, the bug fix takes precedence (it reflects the latest validated behavior)
|
|
676
|
+
|
|
677
|
+
Update IMPLEMENTATION_MODULE.md: mark step 1 complete with findings summary.
|
|
678
|
+
|
|
679
|
+
#### Step 3.3: Implement Module Code
|
|
680
|
+
|
|
681
|
+
Follow the module SPEC.md to implement, in order:
|
|
682
|
+
1. **Entity/Document classes** — from model.md + schemas.json
|
|
683
|
+
2. **Repository interfaces** — from SPEC.md data access section
|
|
684
|
+
3. **Service classes** — business logic from SPEC.md
|
|
685
|
+
4. **Mappers** — if specified in SPEC.md
|
|
686
|
+
5. **Controller classes** — routes, request handling from SPEC.md
|
|
687
|
+
6. **View templates** — from SPEC.md view section + mockup HTML
|
|
688
|
+
7. **Message listeners** — from SPEC.md messaging section (if applicable)
|
|
689
|
+
8. **Scheduled jobs** — from SPEC.md scheduling section (if applicable)
|
|
690
|
+
|
|
691
|
+
**Traceability comment (MANDATORY)** — Every newly created source file (entity, repository,
|
|
692
|
+
service, mapper, controller, view template, listener, scheduled job, configuration class)
|
|
693
|
+
MUST begin with a top-of-file comment listing the requirement codes it implements.
|
|
694
|
+
Extract the codes verbatim from the module's `SPEC.md` traceability section. Use the
|
|
695
|
+
9-character codes emitted by `util-ustagger` — DO NOT invent or reformat the codes:
|
|
696
|
+
|
|
697
|
+
| Category | Pattern | Example (`HM` initials) |
|
|
698
|
+
|---|---|---|
|
|
699
|
+
| User Story | `US<II><5-digit#>` | `USHM00003` |
|
|
700
|
+
| Non-Functional Requirement | `NFR<II><4-digit#>` | `NFRHM0003` |
|
|
701
|
+
| Constraint | `CONS<II><3-digit#>` | `CONSHM003` |
|
|
702
|
+
| Reference | `REF<II><4-digit#>` | `REFHM0003` |
|
|
703
|
+
|
|
704
|
+
Where `<II>` is the application's 2-letter initials (e.g., `HM` for Hub Middleware).
|
|
705
|
+
The actual codes in any given file come from the module's `SPEC.md` traceability section,
|
|
706
|
+
NOT from this template — never invent codes that do not appear in PRD.md.
|
|
707
|
+
|
|
708
|
+
Use the language's native doc-comment style — Javadoc / PHPDoc / JSDoc (`/** ... */`)
|
|
709
|
+
for code files, `{{-- ... --}}` for Blade, `@* ... *@` for JTE, `<!-- ... -->` for HTML,
|
|
710
|
+
`# ...` for YAML / `.env` / `.properties`.
|
|
711
|
+
|
|
712
|
+
Example (Java service for the Employer module of an app with initials `HM`):
|
|
713
|
+
```java
|
|
714
|
+
/**
|
|
715
|
+
* Implements: USHM00003, USHM00006
|
|
716
|
+
* NFR: NFRHM0003 (audit logging), NFRHM0006 (pagination)
|
|
717
|
+
* Constraints: CONSHM003
|
|
718
|
+
*/
|
|
719
|
+
public class EmployerService { ... }
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
This makes `git blame`, IDE symbol search, and downstream audits trace every line back to
|
|
723
|
+
PRD.md directly — IMPLEMENTATION_MODULE.md is a transient tracking file and is not the
|
|
724
|
+
system of record for traceability.
|
|
725
|
+
|
|
726
|
+
After each major component, update IMPLEMENTATION_MODULE.md checklist.
|
|
727
|
+
|
|
728
|
+
#### Step 3.4: Implement Playwright E2E Tests
|
|
729
|
+
|
|
730
|
+
From the module's TEST_SPEC.md:
|
|
731
|
+
|
|
732
|
+
1. **Create test file**: `<source-code-path>/e2e/tests/<module-slug>.spec.ts`
|
|
733
|
+
2. **Implement data seeding**: Use the seeding scripts from TEST_SPEC.md Section 4.
|
|
734
|
+
All seeding helper functions MUST read paths, credentials, and connection strings
|
|
735
|
+
from `process.env.*` (loaded via `dotenv` from `<source-code-path>/e2e/.env`).
|
|
736
|
+
**NEVER hardcode** machine-specific values (file paths, CLI tool locations, database
|
|
737
|
+
hosts/passwords, SSO admin credentials) in TypeScript source code.
|
|
738
|
+
3. **Implement test scenarios**: Convert each scenario from TEST_SPEC.md Section 5 into Playwright tests
|
|
739
|
+
4. **DO NOT implement cleanup scripts** — test data must persist for downstream modules
|
|
740
|
+
|
|
741
|
+
Pattern for shared config helper (`e2e/helpers/config.ts`) — **single source of truth**
|
|
742
|
+
for all infrastructure configuration. Every other helper and spec file imports from here
|
|
743
|
+
instead of reading `process.env` directly or hardcoding values:
|
|
744
|
+
```typescript
|
|
745
|
+
import 'dotenv/config'; // loads .env from e2e/ directory
|
|
746
|
+
|
|
747
|
+
// Application
|
|
748
|
+
export const APP_BASE_URL = process.env.TEST_APP_BASE_URL!;
|
|
749
|
+
|
|
750
|
+
// Database (include only what exists in CLAUDE.md)
|
|
751
|
+
export const DB_URI = process.env.TEST_DB_URI!; // MongoDB
|
|
752
|
+
// OR for MySQL/PostgreSQL:
|
|
753
|
+
// export const DB_HOST = process.env.TEST_DB_HOST!;
|
|
754
|
+
// export const DB_PORT = process.env.TEST_DB_PORT!;
|
|
755
|
+
// export const DB_USER = process.env.TEST_DB_USER!;
|
|
756
|
+
// export const DB_PASSWORD = process.env.TEST_DB_PASSWORD!;
|
|
757
|
+
// export const DB_NAME = process.env.TEST_DB_NAME!;
|
|
758
|
+
|
|
759
|
+
// Message Queue (include only if MQ exists in CLAUDE.md)
|
|
760
|
+
export const MQ_HOST = process.env.TEST_MQ_HOST!;
|
|
761
|
+
export const MQ_PORT = process.env.TEST_MQ_PORT!;
|
|
762
|
+
export const MQ_USER = process.env.TEST_MQ_USER!;
|
|
763
|
+
export const MQ_PASSWORD = process.env.TEST_MQ_PASSWORD!;
|
|
764
|
+
export const MQ_VHOST = process.env.TEST_MQ_VHOST!;
|
|
765
|
+
export const MQ_URL = process.env.TEST_MQ_URL!;
|
|
766
|
+
|
|
767
|
+
// SSO / Auth (include only if SSO exists in CLAUDE.md)
|
|
768
|
+
export const SSO_HOST = process.env.TEST_SSO_HOST!;
|
|
769
|
+
export const SSO_ADMIN_USER = process.env.TEST_SSO_ADMIN_USER!;
|
|
770
|
+
export const SSO_ADMIN_PASSWORD = process.env.TEST_SSO_ADMIN_PASSWORD!;
|
|
771
|
+
export const SSO_CLI_PATH = process.env.TEST_SSO_CLI_PATH!;
|
|
772
|
+
export const SSO_REALM = process.env.TEST_SSO_REALM!;
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
Pattern for domain-specific helper (e.g., `e2e/helpers/keycloak.ts`) — imports config
|
|
776
|
+
from `config.ts`, never reads `process.env` directly:
|
|
777
|
+
```typescript
|
|
778
|
+
import { execSync } from 'child_process';
|
|
779
|
+
import { SSO_CLI_PATH, SSO_HOST, SSO_ADMIN_USER, SSO_ADMIN_PASSWORD, SSO_REALM } from './config';
|
|
780
|
+
|
|
781
|
+
function runKcadm(command: string): string {
|
|
782
|
+
try {
|
|
783
|
+
return execSync(`"${SSO_CLI_PATH}" ${command}`, { encoding: 'utf-8', timeout: 30000 });
|
|
784
|
+
} catch (error: any) {
|
|
785
|
+
return error.stdout || error.stderr || error.message || '';
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export function kcadmConfig(): void {
|
|
790
|
+
runKcadm(`config credentials --server ${SSO_HOST} --realm master --user ${SSO_ADMIN_USER} --password ${SSO_ADMIN_PASSWORD}`);
|
|
791
|
+
}
|
|
792
|
+
// ... remaining helper functions use the config imports above
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
**No hardcoded config in spec files**: If a spec file needs infrastructure values (e.g.,
|
|
796
|
+
database connection for direct seeding, MQ host for publishing, mail server URL), it MUST
|
|
797
|
+
import them from `helpers/config.ts` — never hardcode them inline in the spec. This applies
|
|
798
|
+
to ALL spec files, not just those with dedicated helper modules.
|
|
799
|
+
|
|
800
|
+
**Test naming convention (MANDATORY)** — Every test name MUST be prefixed with the
|
|
801
|
+
**scenario ID from TEST_SPEC.md Section 4** so test output (CI logs, reports) is traceable
|
|
802
|
+
to TEST_SPEC.md without consulting IMPLEMENTATION_MODULE.md. The scenario IDs are emitted
|
|
803
|
+
by `testgen-functional` and follow the pattern `<TYPE>-<MODULE-PREFIX>-<NNN>`, where
|
|
804
|
+
`<TYPE>` is one of `NAV`, `SRCH`, `VIEW`, `CRUD`, `VAL`, `MAP`, `TOG`, `HIST`, `RAW`,
|
|
805
|
+
`PAGE`, `REG`, or `TSTI`, and `<MODULE-PREFIX>` is the 3-letter module prefix from the
|
|
806
|
+
module model (e.g., `LIN` for Location Information, `EMP` for Employer, `QUO` for Quota).
|
|
807
|
+
|
|
808
|
+
Format: `'<scenario-id>: <scenario-name>'` — copied verbatim from TEST_SPEC.md Section 4.
|
|
809
|
+
Do NOT invent IDs; do NOT collapse or reformat them.
|
|
810
|
+
|
|
811
|
+
Each test MUST also carry a JSDoc traceability comment listing the source codes from
|
|
812
|
+
the scenario's **Source** field in TEST_SPEC.md — these are the same `USHM#####`,
|
|
813
|
+
`NFRHM####`, `CONSHM###`, `TSTHM####`, and `[BUG-XXX]` codes that link the scenario back
|
|
814
|
+
to PRD.md. Copy them verbatim.
|
|
815
|
+
|
|
816
|
+
Pattern for test file:
|
|
817
|
+
```typescript
|
|
818
|
+
import { test, expect } from '@playwright/test';
|
|
819
|
+
import { DB_URI, MQ_URL } from '../helpers/config'; // import what this spec needs
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Module: <Module Name>
|
|
823
|
+
* Implements scenarios: NAV-LIN-001, SRCH-LIN-001, CRUD-LIN-001, CRUD-LIN-002
|
|
824
|
+
* (copied verbatim from TEST_SPEC.md Section 4)
|
|
825
|
+
*/
|
|
826
|
+
test.describe('<Module Name>', () => {
|
|
827
|
+
// Data seeding (runs once before all tests in this module)
|
|
828
|
+
test.beforeAll(async () => {
|
|
829
|
+
// Execute seeding script from TEST_SPEC.md Section 4
|
|
830
|
+
// All infrastructure values come from helpers/config.ts — never hardcode
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
// DO NOT add afterAll cleanup — data persists for dependent modules
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Covers: USHM00003, USHM00006
|
|
837
|
+
* NFR: NFRHM0003
|
|
838
|
+
* Bug regression: [BUG-024] // include only if scenario covers a previously-fixed bug
|
|
839
|
+
*/
|
|
840
|
+
test('NAV-LIN-001: Navigate to Location Information screen', async ({ page }) => {
|
|
841
|
+
// Steps from the matching TEST_SPEC.md Section 4 scenario
|
|
842
|
+
});
|
|
843
|
+
});
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
#### Step 3.5: Run E2E Tests
|
|
847
|
+
|
|
848
|
+
```bash
|
|
849
|
+
cd <source-code-path>/e2e && npx playwright test tests/<module-slug>.spec.ts
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
- If tests pass: proceed to visual consistency testing (Step 3.6)
|
|
853
|
+
- If tests fail: analyze failures, fix code, re-run (do NOT clean test data unless re-seeding is required for retest)
|
|
854
|
+
|
|
855
|
+
#### Step 3.6: Visual Consistency Testing (Mockup vs Application)
|
|
856
|
+
|
|
857
|
+
After functional E2E tests pass, compare the UI output of the application against the approved HTML mockup screens. The goal is to verify **aesthetic consistency** — colors, alignment, padding, margins, font sizes, layout structure — NOT content (data values will differ).
|
|
858
|
+
|
|
859
|
+
**Process:**
|
|
860
|
+
|
|
861
|
+
1. **Identify mockup screens** for this module from `<app_folder>/context/mockup/<role>/content/` that correspond to the implemented views.
|
|
862
|
+
|
|
863
|
+
2. **Capture mockup baselines** (if not already captured during scaffolding):
|
|
864
|
+
- Start the shared Mockup Hub: `cd <root>/mockup && npm start` (no npm install needed)
|
|
865
|
+
- Navigate to each screen for the module at
|
|
866
|
+
`http://localhost:<hub_port>/<app_slug>/<role>/<page>` and capture a screenshot
|
|
867
|
+
- Save to `<source-code-path>/e2e/visual-baselines/<module-slug>/<screen-name>.png`
|
|
868
|
+
- Stop the Mockup Hub
|
|
869
|
+
|
|
870
|
+
3. **Create visual comparison test**: `<source-code-path>/e2e/tests/<module-slug>.visual.spec.ts`
|
|
871
|
+
- For each screen in the module, navigate to the corresponding application page
|
|
872
|
+
- Capture a screenshot of the application output
|
|
873
|
+
- Use Playwright's `toHaveScreenshot()` with a **threshold** to allow content differences while catching layout/styling deviations
|
|
874
|
+
- Compare against the mockup baseline
|
|
875
|
+
|
|
876
|
+
4. **Visual test pattern**:
|
|
877
|
+
```typescript
|
|
878
|
+
import { test, expect } from '@playwright/test';
|
|
879
|
+
import { loginAs } from '../helpers/auth';
|
|
880
|
+
import path from 'path';
|
|
881
|
+
|
|
882
|
+
test.describe('<Module Name> - Visual Consistency', () => {
|
|
883
|
+
test('<screen-name> matches mockup layout', async ({ page }) => {
|
|
884
|
+
await loginAs(page, '<role>');
|
|
885
|
+
await page.goto('<app-route-for-screen>');
|
|
886
|
+
await page.waitForLoadState('networkidle');
|
|
887
|
+
|
|
888
|
+
// Compare against mockup baseline — threshold allows content differences
|
|
889
|
+
// but catches color, alignment, padding, margin, and layout deviations
|
|
890
|
+
await expect(page).toHaveScreenshot('<module-slug>-<screen-name>.png', {
|
|
891
|
+
maxDiffPixelRatio: 0.15, // Allow up to 15% pixel difference (content varies)
|
|
892
|
+
threshold: 0.3, // Per-pixel color threshold (0-1, higher = more lenient)
|
|
893
|
+
animations: 'disabled',
|
|
894
|
+
});
|
|
895
|
+
});
|
|
896
|
+
});
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
5. **On first run**, Playwright generates actual screenshots. Manually review them:
|
|
900
|
+
- If the layout aesthetics match the mockup (colors, spacing, alignment), approve by updating the snapshots
|
|
901
|
+
- If deviations are found, fix the templates / CSS and re-run
|
|
902
|
+
|
|
903
|
+
6. **What to check** (aesthetic consistency):
|
|
904
|
+
- Color scheme matches (backgrounds, borders, text colors, button colors)
|
|
905
|
+
- Spacing and alignment (padding, margins, gaps between elements)
|
|
906
|
+
- Layout structure (grid/flex arrangement, sidebar/header/content proportions)
|
|
907
|
+
- Typography (font sizes, weights, line heights — relative, not exact)
|
|
908
|
+
- Component styling (buttons, tables, forms, cards, badges)
|
|
909
|
+
- Responsive breakpoints if applicable
|
|
910
|
+
|
|
911
|
+
7. **What to ignore** (content differences are expected):
|
|
912
|
+
- Actual text content / data values
|
|
913
|
+
- Number of rows in tables
|
|
914
|
+
- Dynamic timestamps, IDs, or generated values
|
|
915
|
+
|
|
916
|
+
Update IMPLEMENTATION_MODULE.md: mark visual consistency testing step complete with findings.
|
|
917
|
+
|
|
918
|
+
- If visual tests pass: update IMPLEMENTATION_MODULE.md status to COMPLETED
|
|
919
|
+
- If visual tests reveal layout issues: fix templates/CSS, re-run both functional and visual tests
|
|
920
|
+
|
|
921
|
+
### Phase 4: Post-Implementation (Per Module)
|
|
922
|
+
|
|
923
|
+
After each module completes:
|
|
924
|
+
|
|
925
|
+
1. Update `<app_folder>/context/develop/<module-slug>/IMPLEMENTATION_MODULE.md`:
|
|
926
|
+
- Set Status to COMPLETED
|
|
927
|
+
- Record completion date
|
|
928
|
+
- Record test results summary
|
|
929
|
+
|
|
930
|
+
2. Update `<app_folder>/context/develop/IMPLEMENTATION_MASTER.md`:
|
|
931
|
+
- Update module row: Status = COMPLETED, Completed = date
|
|
932
|
+
- Add notes about any issues encountered
|
|
933
|
+
|
|
934
|
+
3. **Check module and version completion**:
|
|
935
|
+
- Scan the Module Implementation Status table in IMPLEMENTATION_MASTER.md
|
|
936
|
+
- If there are still PENDING modules for the **current version**:
|
|
937
|
+
- **IMMEDIATELY proceed to the next module** in execution order — do NOT stop
|
|
938
|
+
- Continue implementing until context limits force a natural stop
|
|
939
|
+
- The Ralph Loop will re-feed the prompt, and the next iteration will resume via Phase 0
|
|
940
|
+
- If ALL modules for the **current version** are COMPLETED:
|
|
941
|
+
- Update the Version Processing Order table: mark current version as `COMPLETED`, record date
|
|
942
|
+
- Check if there are MORE versions in the resolved version list:
|
|
943
|
+
- If YES → perform a **version increment** (update app version in manifest, reset affected
|
|
944
|
+
modules to PENDING with the new version) and **IMMEDIATELY proceed to Phase 3** for the
|
|
945
|
+
next version's modules. Do NOT stop between versions.
|
|
946
|
+
- If NO (this was the last version) → **Proceed to Phase 5 (Generate README.md)**
|
|
947
|
+
before outputting the completion promise
|
|
948
|
+
|
|
949
|
+
### Phase 5: Generate README.md
|
|
950
|
+
|
|
951
|
+
After ALL modules are COMPLETED, generate a `README.md` file in the application root folder
|
|
952
|
+
(`<source-code-path>/README.md`). This file serves as the primary documentation for developers
|
|
953
|
+
to understand the application architecture, navigate the codebase, and run the application.
|
|
954
|
+
|
|
955
|
+
**If `<source-code-path>/README.md` already exists, OVERWRITE it completely.** The existing
|
|
956
|
+
README may have been auto-generated by the project scaffolding tool (e.g., Laravel, Spring
|
|
957
|
+
Initializr) and does not reflect the actual implemented application. Phase 5 always produces
|
|
958
|
+
a fresh README based on the specification and the final implementation state.
|
|
959
|
+
|
|
960
|
+
**CRITICAL**: The README content MUST be derived from `SPECIFICATION.md` — the technical
|
|
961
|
+
specification generated by the chosen `specgen-*` skill. Do NOT invent or assume technology
|
|
962
|
+
details. Extract all architecture, stack, configuration, and run instructions directly from
|
|
963
|
+
the specification document.
|
|
964
|
+
|
|
965
|
+
#### Step 5.1: Read SPECIFICATION.md
|
|
966
|
+
|
|
967
|
+
Read `<app_folder>/context/specification/SPECIFICATION.md` and extract:
|
|
968
|
+
- **Technology stack** — framework, language, template engine, CSS framework, JS libraries, database, auth provider, messaging, scheduling
|
|
969
|
+
- **Application architecture** — packaging structure (e.g., Spring Modulith, Laravel Modules), layer conventions (controller, service, repository, view), shared infrastructure components
|
|
970
|
+
- **Configuration** — environment variables, config files, database connection, auth provider setup, message queue setup
|
|
971
|
+
- **Build and run commands** — how to install dependencies, compile, run the application, run tests
|
|
972
|
+
|
|
973
|
+
#### Step 5.2: Generate README.md
|
|
974
|
+
|
|
975
|
+
Create `<source-code-path>/README.md` with the following structure:
|
|
976
|
+
|
|
977
|
+
```markdown
|
|
978
|
+
# <Application Name>
|
|
979
|
+
|
|
980
|
+
<One-paragraph description from SPECIFICATION.md project overview>
|
|
981
|
+
|
|
982
|
+
## Technology Stack
|
|
983
|
+
|
|
984
|
+
<Table of technologies, versions, and purposes — extracted from SPECIFICATION.md technology stack section>
|
|
985
|
+
|
|
986
|
+
| Technology | Version | Purpose |
|
|
987
|
+
|-----------|---------|---------|
|
|
988
|
+
| ... | ... | ... |
|
|
989
|
+
|
|
990
|
+
## Architecture
|
|
991
|
+
|
|
992
|
+
<Description of the application architecture from SPECIFICATION.md — packaging approach,
|
|
993
|
+
layer conventions, module organization. Include a text-based or Mermaid diagram if the
|
|
994
|
+
specification describes the architecture visually.>
|
|
995
|
+
|
|
996
|
+
## Folder Structure
|
|
997
|
+
|
|
998
|
+
<Tree representation of the actual source code folder structure as implemented. Use the
|
|
999
|
+
real directory layout from `<source-code-path>/`, excluding `context/`, `node_modules/`,
|
|
1000
|
+
`.git/`, and other non-essential directories. Annotate key directories with their purpose.>
|
|
1001
|
+
|
|
1002
|
+
```
|
|
1003
|
+
<source-code-path>/
|
|
1004
|
+
app/ # (Laravel) Application core
|
|
1005
|
+
Modules/ # (Laravel) Feature modules
|
|
1006
|
+
resources/ # (Laravel) Views, CSS, JS
|
|
1007
|
+
src/ # (Spring) Java source
|
|
1008
|
+
e2e/ # Playwright E2E tests
|
|
1009
|
+
...
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
## Prerequisites
|
|
1013
|
+
|
|
1014
|
+
<List of software prerequisites needed to run the application — JDK, PHP, Composer, Maven,
|
|
1015
|
+
Node.js, database, message queue, auth provider, etc. Extracted from SPECIFICATION.md.>
|
|
1016
|
+
|
|
1017
|
+
## Getting Started
|
|
1018
|
+
|
|
1019
|
+
### Installation
|
|
1020
|
+
|
|
1021
|
+
<Step-by-step instructions to install dependencies — e.g., `composer install`, `mvn clean install`,
|
|
1022
|
+
`npm install`. Derived from SPECIFICATION.md build configuration section.>
|
|
1023
|
+
|
|
1024
|
+
### Configuration
|
|
1025
|
+
|
|
1026
|
+
<Instructions for setting up configuration — .env file, application.yml, database setup,
|
|
1027
|
+
auth provider configuration. Reference the specific config files and environment variables
|
|
1028
|
+
from SPECIFICATION.md.>
|
|
1029
|
+
|
|
1030
|
+
### Running the Application
|
|
1031
|
+
|
|
1032
|
+
<Commands to start the application — e.g., `php artisan serve`, `mvn spring-boot:run`.
|
|
1033
|
+
Include the default URL where the application will be accessible.>
|
|
1034
|
+
|
|
1035
|
+
### Running Tests
|
|
1036
|
+
|
|
1037
|
+
<Commands to run the Playwright E2E test suite:>
|
|
1038
|
+
|
|
1039
|
+
```bash
|
|
1040
|
+
cd e2e && npx playwright test
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
<Any additional test commands — unit tests, integration tests — if applicable from the spec.>
|
|
1044
|
+
|
|
1045
|
+
## Modules
|
|
1046
|
+
|
|
1047
|
+
<Table listing all implemented modules, their layer classification, and a brief description.
|
|
1048
|
+
Extracted from IMPLEMENTATION_MASTER.md execution order and module details.>
|
|
1049
|
+
|
|
1050
|
+
| Module | Layer | Description |
|
|
1051
|
+
|--------|-------|-------------|
|
|
1052
|
+
| ... | ... | ... |
|
|
1053
|
+
|
|
1054
|
+
```
|
|
1055
|
+
|
|
1056
|
+
**Adapt the template above** to match the actual technology stack from SPECIFICATION.md:
|
|
1057
|
+
- For **Spring Boot** apps: use Maven/Gradle commands, `src/main/java` paths, `application.yml` config
|
|
1058
|
+
- For **Laravel** apps: use Composer/Artisan commands, `app/` paths, `.env` config
|
|
1059
|
+
- For **REST API** apps: omit view/template sections, focus on API endpoints and Swagger/OpenAPI docs
|
|
1060
|
+
- Include only sections that are relevant to the actual specification — do NOT add sections for
|
|
1061
|
+
features that are not part of the spec (e.g., skip messaging section if no messaging is configured)
|
|
1062
|
+
|
|
1063
|
+
#### Step 5.3: Generate Traceability Matrix
|
|
1064
|
+
|
|
1065
|
+
After the README is generated and BEFORE finalizing tracking, regenerate the requirement-to-code
|
|
1066
|
+
traceability matrix so every PRD requirement ID is linked to the source code that now implements it
|
|
1067
|
+
(the per-file `Implements:` / `NFR:` / `Constraints:` comments written in Step 3.3 are the source
|
|
1068
|
+
of the links).
|
|
1069
|
+
|
|
1070
|
+
1. Invoke the traceability generator (pass the resolved app folder and the version just completed):
|
|
1071
|
+
```
|
|
1072
|
+
Skill(skill: "co2-skills:tracegen-matrix", args: "<app_folder> version:<current-version>")
|
|
1073
|
+
```
|
|
1074
|
+
- If a `module` filter was active for this run, pass it through: append ` module:<module>`.
|
|
1075
|
+
- When processing multiple versions, invoke once after the LAST version (the matrix reflects the
|
|
1076
|
+
full current code state); a per-version invocation is also acceptable.
|
|
1077
|
+
2. Wait for it to complete. It writes/updates `<app_folder>/context/TRACEABILITY.md` and appends its
|
|
1078
|
+
own `CHANGELOG.md` row.
|
|
1079
|
+
3. This step does **not** require the codebase-memory MCP — `tracegen-matrix` resolves links from
|
|
1080
|
+
the in-source traceability comments, falling back to name-based source scanning, and only uses
|
|
1081
|
+
codebase-memory for extra precision when it happens to be installed.
|
|
1082
|
+
|
|
1083
|
+
#### Step 5.4: Update Tracking and Complete
|
|
1084
|
+
|
|
1085
|
+
1. Update IMPLEMENTATION_MASTER.md:
|
|
1086
|
+
- Set top-level `**Status**:` to `COMPLETED`
|
|
1087
|
+
- Add a note: `README.md generated at <source-code-path>/README.md`
|
|
1088
|
+
2. Append entries to `CHANGELOG.md` in the application folder (`<app_folder>/CHANGELOG.md`) — **one entry per version processed**:
|
|
1089
|
+
- Read `<app_folder>/CHANGELOG.md`. If it does not exist, create it with context header.
|
|
1090
|
+
- For EACH version in the resolved version list (ascending order):
|
|
1091
|
+
- Search for a `## {version}` heading matching this version.
|
|
1092
|
+
- If the section **exists**: append a new row to its table.
|
|
1093
|
+
- If the section **does not exist**: insert a new section after the `---` below the context header and before any existing `## vX.Y.Z` section (newest-first ordering), with a new table header and the first row.
|
|
1094
|
+
- Row format: `| {YYYY-MM-DD} | {application_name} | conductor-feature-develop | {module or "All"} | Implemented modules for {version} — {count} modules |`
|
|
1095
|
+
- **Never modify or delete existing rows.**
|
|
1096
|
+
3. Output the Ralph Loop completion promise: `<promise>ALL MODULES IMPLEMENTED</promise>`
|
|
1097
|
+
4. This signals the Ralph Loop to exit
|
|
1098
|
+
|
|
1099
|
+
## Mockup Interpretation Guide (CRITICAL)
|
|
1100
|
+
|
|
1101
|
+
The HTML mockups in `<app_folder>/context/mockup/` are organized into **role-based subfolders**
|
|
1102
|
+
(e.g., `hub_administrator/content/`, `hub_operation_support/content/`). This folder structure
|
|
1103
|
+
represents which screens each role can access — it does **NOT** dictate URL patterns or imply
|
|
1104
|
+
that URLs should contain role names.
|
|
1105
|
+
|
|
1106
|
+
### Rule: Module-Based URLs, NOT Role-Based URLs
|
|
1107
|
+
|
|
1108
|
+
**WRONG** (role in URL — NEVER do this):
|
|
1109
|
+
```
|
|
1110
|
+
/hub-administrator/employer
|
|
1111
|
+
/hub-operation-support/quota
|
|
1112
|
+
/hub-administrator/industrial-classification/create
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
**CORRECT** (module-based URL):
|
|
1116
|
+
```
|
|
1117
|
+
/employer
|
|
1118
|
+
/quota
|
|
1119
|
+
/industrial-classification/create
|
|
1120
|
+
```
|
|
1121
|
+
|
|
1122
|
+
Controllers MUST use module-based `@RequestMapping` paths. Role enforcement is handled via
|
|
1123
|
+
`@PreAuthorize` annotations on the controller class or method level — NOT through URL segregation.
|
|
1124
|
+
|
|
1125
|
+
### Template Strategy for Role-Based UI Differences
|
|
1126
|
+
|
|
1127
|
+
When a module's mockup exists under multiple role folders, the screens may differ. Follow this
|
|
1128
|
+
decision framework to determine the template strategy:
|
|
1129
|
+
|
|
1130
|
+
#### Step 1: Classify Each Screen
|
|
1131
|
+
|
|
1132
|
+
For each screen in the module, compare the mockup versions across roles and classify:
|
|
1133
|
+
|
|
1134
|
+
| Classification | Description | Example |
|
|
1135
|
+
|---------------|-------------|---------|
|
|
1136
|
+
| **Role-Exclusive** | Screen exists under only ONE role folder | `audit_trail.html` (admin only), `job_demand.html` (ops only) |
|
|
1137
|
+
| **Shared — Minor Differences** | Same layout and structure, but some elements are shown/hidden per role (e.g., action buttons, edit toggles, "Add" button) | `document_classification.html` — admin has toggles + edit; ops has read-only badges |
|
|
1138
|
+
| **Shared — Major Differences** | Fundamentally different layout, columns, or purpose despite same module name | `occupation_classification.html` — admin sees CRUD list; ops sees corridor mapping view |
|
|
1139
|
+
|
|
1140
|
+
#### Step 2: Apply the Appropriate Strategy
|
|
1141
|
+
|
|
1142
|
+
**A. Role-Exclusive Screens → Single template, single controller method**
|
|
1143
|
+
|
|
1144
|
+
One template, one route. Only the authorized role can access it. No conditional logic needed.
|
|
1145
|
+
|
|
1146
|
+
**B. Shared — Minor Differences → Single template with role-based conditionals**
|
|
1147
|
+
|
|
1148
|
+
Use **one template** with conditional blocks to show/hide elements based on the user's role.
|
|
1149
|
+
This is the preferred approach when the page layout is structurally the same but some UI
|
|
1150
|
+
elements (buttons, action columns, edit controls, banners) differ.
|
|
1151
|
+
|
|
1152
|
+
The controller method is accessible to both roles with appropriate authorization annotations.
|
|
1153
|
+
|
|
1154
|
+
**C. Shared — Major Differences → Separate templates, controller selects at runtime**
|
|
1155
|
+
|
|
1156
|
+
When the two role versions have **fundamentally different layouts, columns, or purposes**
|
|
1157
|
+
(not just show/hide of a few elements), create separate templates and let the controller
|
|
1158
|
+
choose which to render based on the authenticated user's role.
|
|
1159
|
+
|
|
1160
|
+
#### Step 3: Document the Decision
|
|
1161
|
+
|
|
1162
|
+
In `IMPLEMENTATION_MODULE.md`, under the analysis step, record the template strategy chosen
|
|
1163
|
+
for each screen and why:
|
|
1164
|
+
|
|
1165
|
+
```markdown
|
|
1166
|
+
### Template Strategy
|
|
1167
|
+
|
|
1168
|
+
| Screen | Roles | Classification | Strategy |
|
|
1169
|
+
|--------|-------|---------------|----------|
|
|
1170
|
+
| employer list | ops-only | Role-Exclusive | Single template |
|
|
1171
|
+
| document_classification | both | Minor Differences | Single template + conditional |
|
|
1172
|
+
| occupation_classification | both | Major Differences | Separate templates |
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
### How to Read Mockups During Implementation
|
|
1176
|
+
|
|
1177
|
+
When implementing a module (Step 3.2 — Analyze Module Resources):
|
|
1178
|
+
|
|
1179
|
+
1. **List all mockup files** for this module across ALL role folders:
|
|
1180
|
+
```
|
|
1181
|
+
mockup/<role1>/content/<module>*.html
|
|
1182
|
+
mockup/<role2>/content/<module>*.html
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
2. **Read each version** and compare structure, columns, buttons, and layout
|
|
1186
|
+
|
|
1187
|
+
3. **Classify** each screen using the framework above
|
|
1188
|
+
|
|
1189
|
+
4. **Extract visual design** (colors, spacing, components) from the mockup but
|
|
1190
|
+
**ignore the URL paths** embedded in the mockup HTML (e.g., `href="/hub_administrator/..."`)
|
|
1191
|
+
— these are mockup navigation links, NOT the actual application routes
|
|
1192
|
+
|
|
1193
|
+
5. **Map mockup URLs to module URLs**:
|
|
1194
|
+
- Mockup: `/hub_administrator/employer` → App: `/employer`
|
|
1195
|
+
- Mockup: `/hub_operation_support/quota_allocation` → App: `/quota-allocation`
|
|
1196
|
+
|
|
1197
|
+
## Critical Rules
|
|
1198
|
+
|
|
1199
|
+
1. **CLAUDE.md is the source of truth for all tool commands** — CLAUDE.md is automatically
|
|
1200
|
+
loaded into context. Use the exact JDK path, Maven path, database credentials,
|
|
1201
|
+
message queue credentials, Keycloak CLI path, and all other infrastructure details from
|
|
1202
|
+
CLAUDE.md. NEVER hardcode, guess, or use generic paths like `./mvnw` or `java`.
|
|
1203
|
+
|
|
1204
|
+
2. **No test data cleanup** — DO NOT clean up test data after module tests pass. Test data
|
|
1205
|
+
from earlier modules is required as seed data for downstream modules. Only clean up if
|
|
1206
|
+
you need to re-seed for a retest.
|
|
1207
|
+
|
|
1208
|
+
3. **Context window awareness (Ralph Loop handles recovery)** — If approaching context limits,
|
|
1209
|
+
save progress gracefully:
|
|
1210
|
+
- Update IMPLEMENTATION_MODULE.md with current progress (mark completed steps, log findings)
|
|
1211
|
+
- Update IMPLEMENTATION_MASTER.md with current status
|
|
1212
|
+
- The Ralph Loop will automatically re-feed the prompt, and the next iteration will resume
|
|
1213
|
+
from exactly where you left off via Phase 0 resume check
|
|
1214
|
+
- Do NOT worry about "losing work" — the tracking files ARE your persistence mechanism
|
|
1215
|
+
|
|
1216
|
+
4. **Usage limit handling** — If you hit API usage limits, wait and resume. The tracking
|
|
1217
|
+
files ensure no work is lost. Ralph Loop will re-feed the prompt on next iteration.
|
|
1218
|
+
|
|
1219
|
+
5. **Module order is strict, version order is strict** — Follow the execution order from
|
|
1220
|
+
TEST_PLAN.md exactly within each version. When processing multiple versions, ALL modules
|
|
1221
|
+
for version N must be COMPLETED before ANY module from version N+1 begins. Dependencies
|
|
1222
|
+
mean earlier modules must complete before later ones can start within the same version.
|
|
1223
|
+
|
|
1224
|
+
6. **Track everything** — Every action should be logged in IMPLEMENTATION_MODULE.md so
|
|
1225
|
+
that any future session (or Ralph Loop iteration) can understand what was done and what
|
|
1226
|
+
remains. This is CRITICAL for Ralph Loop — without accurate tracking, iterations will
|
|
1227
|
+
repeat already-completed work.
|
|
1228
|
+
|
|
1229
|
+
7. **Test-driven** — Implementation is guided by TEST_SPEC.md. The test spec defines
|
|
1230
|
+
what the code must do. The SPEC.md defines how to build it.
|
|
1231
|
+
|
|
1232
|
+
8. **Mockup fidelity** — View templates MUST match the approved HTML mockup screens aesthetically.
|
|
1233
|
+
Use the mockup as the visual reference for layout, components, and styling. After functional
|
|
1234
|
+
E2E tests pass, run visual consistency tests comparing app screenshots against mockup
|
|
1235
|
+
baselines to verify colors, alignment, padding, margins, and layout structure match. Content
|
|
1236
|
+
differences (data values, row counts) are expected and acceptable — only aesthetic deviations
|
|
1237
|
+
should be flagged and fixed.
|
|
1238
|
+
|
|
1239
|
+
9. **Specification compliance** — Follow the SPECIFICATION.md shared infrastructure sections
|
|
1240
|
+
for all cross-cutting concerns (security, theming, pagination, error handling, etc.).
|
|
1241
|
+
|
|
1242
|
+
10. **Module-based URLs only** — NEVER use role names in URL paths. Mockup folder structure
|
|
1243
|
+
is for organizing mockups by role visibility, NOT for defining URL routes. All controllers
|
|
1244
|
+
use module-based paths. Role enforcement is via authorization annotations. See the
|
|
1245
|
+
"Mockup Interpretation Guide" section above for the full template strategy framework.
|
|
1246
|
+
|
|
1247
|
+
11. **Ralph Loop discipline — NEVER stop prematurely** — After completing a module, IMMEDIATELY
|
|
1248
|
+
check for the next pending module and start it. After completing all modules for a version,
|
|
1249
|
+
IMMEDIATELY perform the version increment and start the next version's modules. Do NOT
|
|
1250
|
+
output the completion promise (`<promise>ALL MODULES IMPLEMENTED</promise>`) until EVERY
|
|
1251
|
+
module for EVERY version is COMPLETED. Do NOT stop "to let the user review" — Ralph Loop
|
|
1252
|
+
handles multi-iteration execution automatically. The only valid reasons to stop within an
|
|
1253
|
+
iteration are: (a) context window approaching limit, (b) all modules for all versions
|
|
1254
|
+
completed (output promise), or (c) an unrecoverable error requiring user input.
|
|
1255
|
+
|
|
1256
|
+
12. **Complete implementation per module** — Each module must have ALL of these before marking
|
|
1257
|
+
COMPLETED: (a) all source files (entities, repositories, services, controllers, mappers),
|
|
1258
|
+
(b) all view templates (page + fragments), (c) E2E test file with all scenarios from TEST_SPEC,
|
|
1259
|
+
(d) all E2E tests passing, (e) ALL user stories checked off in IMPLEMENTATION_MODULE.md,
|
|
1260
|
+
(f) ALL NFRs checked off in IMPLEMENTATION_MODULE.md. Do NOT mark a module COMPLETED with
|
|
1261
|
+
partial implementation or failing tests — this would cause the next Ralph Loop iteration to
|
|
1262
|
+
skip it. If a module has messaging/async NFRs that cannot be implemented yet (e.g., upstream
|
|
1263
|
+
adapter not available), mark the module as **PARTIALLY COMPLETED** and leave the unchecked
|
|
1264
|
+
NFR items visible in the checklist. Only mark COMPLETED when every user story AND every NFR
|
|
1265
|
+
is implemented and tested.
|
|
1266
|
+
|
|
1267
|
+
13. **Auto-start Ralph Loop** — When this skill is triggered, the FIRST action (Phase 0, Step 0)
|
|
1268
|
+
MUST be to check if Ralph Loop is active (`.claude/ralph-loop.local.md` exists). If not active,
|
|
1269
|
+
invoke `Skill(skill: "ralph-loop:ralph-loop", args: "...")` with the full orchestrator prompt
|
|
1270
|
+
and `--completion-promise "ALL MODULES IMPLEMENTED" --max-iterations 100`. Do NOT proceed
|
|
1271
|
+
with any implementation work until Ralph Loop is confirmed active.
|
|
1272
|
+
|
|
1273
|
+
14. **NO creative alternatives for 3rd party applications (CRITICAL)** — You MUST use the EXACT
|
|
1274
|
+
methods, connection strings, CLIs, and credentials described in `CLAUDE.md` for
|
|
1275
|
+
accessing all external infrastructure. This includes but is not limited to:
|
|
1276
|
+
|
|
1277
|
+
**NEVER do any of the following:**
|
|
1278
|
+
- Connect to databases via Docker (`docker exec`, `docker run`, CLI inside a container)
|
|
1279
|
+
- Start or restart services with alternative databases
|
|
1280
|
+
- Spin up services via Docker Compose or Docker run
|
|
1281
|
+
- Use `docker exec` to access any service that is described as running natively in CLAUDE.md
|
|
1282
|
+
- Install or use alternative CLI tools when CLAUDE.md specifies a different access method
|
|
1283
|
+
- Assume services run in Docker when CLAUDE.md says they run natively (or vice versa)
|
|
1284
|
+
- Use embedded/in-memory databases as substitutes for the actual configured database
|
|
1285
|
+
- Guess connection strings, ports, or credentials — ALWAYS read them from CLAUDE.md
|
|
1286
|
+
|
|
1287
|
+
**ALWAYS do the following:**
|
|
1288
|
+
- Use database connection strings EXACTLY as specified in CLAUDE.md
|
|
1289
|
+
- Use service instances EXACTLY as configured in CLAUDE.md
|
|
1290
|
+
- Use CLIs at the EXACT paths specified in CLAUDE.md
|
|
1291
|
+
- For E2E test data seeding, connect to the database using the EXACT connection details from
|
|
1292
|
+
CLAUDE.md
|
|
1293
|
+
- For E2E test helper classes and seeding utilities, store ALL machine-specific values
|
|
1294
|
+
(CLI paths, connection strings, credentials) in `<source-code-path>/e2e/.env` and read
|
|
1295
|
+
them via `process.env.*` using `dotenv`. Populate `.env` with values from CLAUDE.md
|
|
1296
|
+
for the current machine, but NEVER hardcode these values in TypeScript source files.
|
|
1297
|
+
Commit `.env.example` (with placeholder descriptions) and ensure `e2e/.env` is in
|
|
1298
|
+
`.gitignore` so that credentials and machine-specific paths are never committed.
|
|
1299
|
+
|
|
1300
|
+
**WHY**: Creative alternatives (Docker containers, alternative databases, alternative CLIs) connect to
|
|
1301
|
+
DIFFERENT data stores or service instances than the ones the application is configured to use.
|
|
1302
|
+
This produces wrong test results, missing data, and phantom failures. Hardcoding CLAUDE.md values
|
|
1303
|
+
directly in TypeScript source code makes tests non-portable — other developers with different
|
|
1304
|
+
machine setups cannot run the tests without modifying source files. Using `.env` files allows
|
|
1305
|
+
each developer to configure their own paths and credentials once without touching committed code.
|
|
1306
|
+
|
|
1307
|
+
15. **Source code goes directly in `<source-code-path>/` — NO nested subdirectories (CRITICAL)** —
|
|
1308
|
+
The `<source-code-path>` (which defaults to `<app_folder>`) already contains a `context/` folder
|
|
1309
|
+
with all generated artifacts. Source code files MUST be placed directly alongside `context/` in the same
|
|
1310
|
+
directory — NOT inside a nested project subfolder. When using project scaffolding tools,
|
|
1311
|
+
these tools create a new subdirectory by default. You MUST work around this by:
|
|
1312
|
+
- Creating the project in a temporary subdirectory (e.g., `<source-code-path>/_temp_scaffold`)
|
|
1313
|
+
- Moving ALL files (including dotfiles) up to `<source-code-path>/`
|
|
1314
|
+
- Removing the empty temporary directory
|
|
1315
|
+
- Verifying the `context/` folder was NOT overwritten or deleted
|
|
1316
|
+
|
|
1317
|
+
**WHY**: The folder structure convention is that `<app_folder>` contains both `context/` (artifacts)
|
|
1318
|
+
and source code at the same level. A nested subdirectory breaks all relative paths, makes the
|
|
1319
|
+
project structure confusing, and separates context from code unnecessarily.
|
|
1320
|
+
|
|
1321
|
+
16. **Context artifacts must pre-exist** — This skill does NOT generate context artifacts. If
|
|
1322
|
+
module models, mockups, specifications, or test specs are missing, stop and instruct the
|
|
1323
|
+
user to run `/conductor-feature-prepare` first. Do NOT attempt to generate artifacts inline.
|
|
1324
|
+
|
|
1325
|
+
17. **README.md is mandatory before completion** — After ALL modules are COMPLETED,
|
|
1326
|
+
Phase 5 (Generate README.md) MUST run before outputting the completion promise.
|
|
1327
|
+
Phase 5 generates the README with content derived from SPECIFICATION.md — do NOT
|
|
1328
|
+
invent stack details, run commands, or architecture descriptions. Deployment
|
|
1329
|
+
artifacts (Dockerfile, Kubernetes manifests) are NOT generated by this skill —
|
|
1330
|
+
run `/depgen-k8s` independently after development is complete.
|
|
1331
|
+
|
|
1332
|
+
18. **Spring Boot `app:` namespace for application-specific configuration (CRITICAL)** —
|
|
1333
|
+
When the application stack is Spring Boot, ALL application-owned configuration in
|
|
1334
|
+
`application.yml` MUST be placed under the top-level `app:` key. NEVER place
|
|
1335
|
+
application-specific keys at the YAML root (e.g., top-level `notification:`,
|
|
1336
|
+
`batch-job:`, `audit-trail:`) and NEVER place them under Spring framework namespaces
|
|
1337
|
+
(`spring.*`, `server.*`, `management.*`, `logging.*`, `springdoc.*`).
|
|
1338
|
+
|
|
1339
|
+
**Grouping:**
|
|
1340
|
+
- Cross-cutting values (version, CORS, shared security, shared messaging, shared
|
|
1341
|
+
object-storage) sit directly under `app.*` with no module prefix.
|
|
1342
|
+
- Per-module values MUST be grouped under `app.<module-kebab-case>.*`, one block
|
|
1343
|
+
per module. A single config value per module still gets its own block.
|
|
1344
|
+
|
|
1345
|
+
**Binding:** every `app.*` subtree MUST be bound once via a `@ConfigurationProperties`
|
|
1346
|
+
record in the owning module's `config` subpackage (or in the application-level
|
|
1347
|
+
`config` subpackage for cross-cutting values). NEVER inject individual values via
|
|
1348
|
+
`@Value("${app....}")` scattered across beans. Use kebab-case in YAML; Spring Boot's
|
|
1349
|
+
relaxed binding maps to camelCase Java fields automatically. See SPECIFICATION.md
|
|
1350
|
+
section "Application-Specific Configuration (`app:` namespace)" for the authoritative
|
|
1351
|
+
rules and examples.
|
|
1352
|
+
|
|
1353
|
+
19. **Code-level traceability is MANDATORY** — Every newly created source file (entity,
|
|
1354
|
+
repository, service, mapper, controller, view template, listener, scheduled job,
|
|
1355
|
+
configuration class, test file) MUST carry a top-of-file comment listing the
|
|
1356
|
+
requirement codes it implements. The codes follow the formats emitted by
|
|
1357
|
+
`util-ustagger` and `testgen-functional` — extract them verbatim from the module's
|
|
1358
|
+
`SPEC.md` and `TEST_SPEC.md` traceability sections, never invent or reformat:
|
|
1359
|
+
|
|
1360
|
+
| Source | Code Pattern | Example |
|
|
1361
|
+
|---|---|---|
|
|
1362
|
+
| PRD.md → User Story | `US<II><5-digit#>` | `USHM00003` |
|
|
1363
|
+
| PRD.md → NFR | `NFR<II><4-digit#>` | `NFRHM0003` |
|
|
1364
|
+
| PRD.md → Constraint | `CONS<II><3-digit#>` | `CONSHM003` |
|
|
1365
|
+
| PRD.md → Reference | `REF<II><4-digit#>` | `REFHM0003` |
|
|
1366
|
+
| PRD.md → Test instruction | `TST<II><4-digit#>` | `TSTHM0003` |
|
|
1367
|
+
| TEST_SPEC.md → Scenario | `<TYPE>-<MODULE-PREFIX>-<NNN>` | `NAV-LIN-001`, `CRUD-EMP-002`, `REG-QUO-001` |
|
|
1368
|
+
|
|
1369
|
+
`<II>` is the application's 2-letter initials. `<TYPE>` is one of `NAV`, `SRCH`,
|
|
1370
|
+
`VIEW`, `CRUD`, `VAL`, `MAP`, `TOG`, `HIST`, `RAW`, `PAGE`, `REG`, `TSTI`.
|
|
1371
|
+
`<MODULE-PREFIX>` is the 3-letter module prefix from the module model.
|
|
1372
|
+
|
|
1373
|
+
Use the language's native doc-comment style (Javadoc / PHPDoc / JSDoc / `{{-- --}}` /
|
|
1374
|
+
`@* *@` / `<!-- -->` / `#`). Test names MUST be prefixed with the scenario ID copied
|
|
1375
|
+
verbatim from TEST_SPEC.md Section 4 (e.g., `'NAV-LIN-001: Navigate to Location
|
|
1376
|
+
Information screen'`) so test output is traceable to TEST_SPEC.md without consulting
|
|
1377
|
+
IMPLEMENTATION_MODULE.md.
|
|
1378
|
+
|
|
1379
|
+
**Why**: `git blame`, IDE symbol search, and downstream audits must trace every line
|
|
1380
|
+
of code back to a PRD.md requirement or a TEST_SPEC.md scenario directly.
|
|
1381
|
+
IMPLEMENTATION_MODULE.md is a transient tracking file and is not the system of record
|
|
1382
|
+
for traceability — the source code itself must be self-describing. This rule applies
|
|
1383
|
+
to fresh creation; bug fixes layer additional `[BUG-XXX]` markers as defined by
|
|
1384
|
+
`conductor-defect`.
|