@atlashub/smartstack-cli 1.13.2 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.documentation/agents.html +1 -1
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +1 -1
- package/.documentation/cli-commands.html +3 -3
- package/.documentation/commands.html +1 -1
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +231 -236
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +1 -1
- package/.documentation/init.html +3 -3
- package/.documentation/installation.html +1075 -351
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/README.md +88 -20
- package/config/default-config.json +10 -1
- package/dist/index.js +276 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/code-reviewer.md +163 -0
- package/templates/agents/efcore/db-deploy.md +25 -7
- package/templates/agents/efcore/db-reset.md +31 -10
- package/templates/agents/efcore/db-status.md +22 -5
- package/templates/agents/efcore/migration.md +70 -20
- package/templates/agents/gitflow/cleanup.md +8 -1
- package/templates/agents/gitflow/commit.md +7 -5
- package/templates/agents/gitflow/finish.md +6 -4
- package/templates/agents/gitflow/pr.md +8 -1
- package/templates/agents/gitflow/start.md +1 -1
- package/templates/commands/check-version.md +267 -0
- package/templates/commands/efcore/_shared.md +31 -2
- package/templates/commands/efcore/db-reset.md +18 -6
- package/templates/commands/efcore/migration.md +1 -1
- package/templates/commands/efcore/rebase-snapshot.md +1 -1
- package/templates/commands/efcore/squash.md +1 -0
- package/templates/commands/refactor.md +164 -0
- package/templates/project/DependencyInjection.Application.cs.template +25 -0
- package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
- package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
- package/templates/project/ExampleEntity.cs.template +116 -0
- package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
- package/templates/project/ExampleService.cs.template +146 -0
- package/templates/project/ExtensionsDbContext.cs.template +41 -0
- package/templates/project/IExtensionsDbContext.cs.template +22 -0
- package/templates/project/Program.cs.template +47 -0
- package/templates/project/README.md +79 -0
- package/templates/ralph/README.md +10 -8
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/_shared.md +44 -44
- package/templates/skills/ai-prompt/SKILL.md +55 -55
- package/templates/skills/apex/SKILL.md +235 -0
- package/templates/skills/apex/steps/step-00-init.md +203 -0
- package/templates/skills/apex/steps/step-01-analyze.md +210 -0
- package/templates/skills/apex/steps/step-02-plan.md +217 -0
- package/templates/skills/apex/steps/step-03-execute.md +178 -0
- package/templates/skills/apex/steps/step-04-validate.md +217 -0
- package/templates/skills/apex/steps/step-05-examine.md +207 -0
- package/templates/skills/apex/steps/step-06-resolve.md +181 -0
- package/templates/skills/apex/steps/step-07-tests.md +206 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
- package/templates/skills/apex/templates/00-context.md +46 -0
- package/templates/skills/apex/templates/01-analyze.md +63 -0
- package/templates/skills/apex/templates/02-plan.md +63 -0
- package/templates/skills/apex/templates/03-execute.md +34 -0
- package/templates/skills/apex/templates/04-validate.md +61 -0
- package/templates/skills/apex/templates/05-examine.md +58 -0
- package/templates/skills/apex/templates/06-resolve.md +39 -0
- package/templates/skills/apex/templates/07-tests.md +56 -0
- package/templates/skills/apex/templates/08-run-tests.md +41 -0
- package/templates/skills/apex/templates/README.md +69 -0
- package/templates/skills/application/SKILL.md +50 -50
- package/templates/skills/application/templates-backend.md +25 -25
- package/templates/skills/application/templates-frontend.md +43 -43
- package/templates/skills/application/templates-i18n.md +29 -29
- package/templates/skills/application/templates-seed.md +77 -77
- package/templates/skills/business-analyse/SKILL.md +223 -0
- package/templates/skills/business-analyse/_shared.md +258 -0
- package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
- package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
- package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
- package/templates/skills/business-analyse/questionnaire.md +177 -177
- package/templates/skills/business-analyse/react/components.md +340 -0
- package/templates/skills/business-analyse/react/i18n-template.md +245 -0
- package/templates/skills/business-analyse/react/schema.md +151 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
- package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
- package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
- package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
- package/templates/skills/business-analyse/templates/00-context.md +105 -0
- package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
- package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
- package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
- package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
- package/templates/skills/business-analyse/templates-frd.md +217 -217
- package/templates/skills/business-analyse/templates-react.md +26 -26
- package/templates/skills/controller/SKILL.md +141 -92
- package/templates/skills/controller/postman-templates.md +15 -15
- package/templates/skills/controller/steps/step-00-init.md +191 -0
- package/templates/skills/controller/steps/step-01-analyze.md +146 -0
- package/templates/skills/controller/steps/step-02-plan.md +176 -0
- package/templates/skills/controller/steps/step-03-generate.md +219 -0
- package/templates/skills/controller/steps/step-04-perms.md +219 -0
- package/templates/skills/controller/steps/step-05-validate.md +107 -0
- package/templates/skills/controller/templates.md +77 -77
- package/templates/skills/documentation/SKILL.md +79 -79
- package/templates/skills/feature-full/SKILL.md +38 -38
- package/templates/skills/gitflow/SKILL.md +277 -0
- package/templates/{commands → skills}/gitflow/_shared.md +20 -20
- package/templates/skills/gitflow/phases/abort.md +173 -0
- package/templates/skills/gitflow/phases/cleanup.md +226 -0
- package/templates/skills/gitflow/phases/status.md +178 -0
- package/templates/skills/gitflow/steps/step-commit.md +255 -0
- package/templates/skills/gitflow/steps/step-finish.md +255 -0
- package/templates/skills/gitflow/steps/step-init.md +209 -0
- package/templates/skills/gitflow/steps/step-merge.md +225 -0
- package/templates/skills/gitflow/steps/step-plan.md +208 -0
- package/templates/skills/gitflow/steps/step-pr.md +235 -0
- package/templates/skills/gitflow/steps/step-start.md +334 -0
- package/templates/skills/gitflow/steps/step-sync.md +200 -0
- package/templates/skills/gitflow/templates/config.json +53 -0
- package/templates/skills/notification/SKILL.md +51 -51
- package/templates/skills/ralph-loop/SKILL.md +228 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
- package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
- package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
- package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
- package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
- package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
- package/templates/skills/review-code/SKILL.md +219 -0
- package/templates/skills/review-code/references/clean-code-principles.md +140 -0
- package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
- package/templates/skills/review-code/references/feedback-patterns.md +149 -0
- package/templates/skills/review-code/references/security-checklist.md +127 -0
- package/templates/skills/ui-components/SKILL.md +54 -54
- package/templates/skills/workflow/SKILL.md +46 -46
- package/templates/commands/ai-prompt.md +0 -315
- package/templates/commands/apex/1-analyze.md +0 -100
- package/templates/commands/apex/2-plan.md +0 -145
- package/templates/commands/apex/3-execute.md +0 -171
- package/templates/commands/apex/4-examine.md +0 -116
- package/templates/commands/apex/5-tasks.md +0 -209
- package/templates/commands/apex.md +0 -76
- package/templates/commands/application/create.md +0 -362
- package/templates/commands/application/templates-backend.md +0 -463
- package/templates/commands/application/templates-frontend.md +0 -517
- package/templates/commands/application/templates-i18n.md +0 -478
- package/templates/commands/application/templates-seed.md +0 -362
- package/templates/commands/application.md +0 -303
- package/templates/commands/business-analyse/0-orchestrate.md +0 -156
- package/templates/commands/business-analyse/1-init.md +0 -99
- package/templates/commands/business-analyse/2-discover.md +0 -143
- package/templates/commands/business-analyse/3-analyse.md +0 -106
- package/templates/commands/business-analyse/4-specify.md +0 -133
- package/templates/commands/business-analyse/5-validate.md +0 -132
- package/templates/commands/business-analyse/6-handoff.md +0 -157
- package/templates/commands/business-analyse/7-doc-html.md +0 -103
- package/templates/commands/business-analyse/_shared.md +0 -176
- package/templates/commands/business-analyse/bug.md +0 -118
- package/templates/commands/business-analyse/change-request.md +0 -144
- package/templates/commands/business-analyse/hotfix.md +0 -116
- package/templates/commands/business-analyse.md +0 -121
- package/templates/commands/controller/create.md +0 -216
- package/templates/commands/controller/postman-templates.md +0 -528
- package/templates/commands/controller/templates.md +0 -600
- package/templates/commands/controller.md +0 -337
- package/templates/commands/create/agent.md +0 -138
- package/templates/commands/create/command.md +0 -166
- package/templates/commands/create/hook.md +0 -234
- package/templates/commands/create/plugin.md +0 -329
- package/templates/commands/create/project.md +0 -508
- package/templates/commands/create/skill.md +0 -199
- package/templates/commands/create.md +0 -220
- package/templates/commands/documentation/module.md +0 -202
- package/templates/commands/documentation/templates.md +0 -432
- package/templates/commands/documentation.md +0 -190
- package/templates/commands/epct.md +0 -69
- package/templates/commands/explain.md +0 -186
- package/templates/commands/feature-full.md +0 -267
- package/templates/commands/gitflow/1-init.md +0 -188
- package/templates/commands/gitflow/10-start.md +0 -190
- package/templates/commands/gitflow/11-finish.md +0 -382
- package/templates/commands/gitflow/12-cleanup.md +0 -103
- package/templates/commands/gitflow/13-sync.md +0 -216
- package/templates/commands/gitflow/14-rebase.md +0 -251
- package/templates/commands/gitflow/2-status.md +0 -122
- package/templates/commands/gitflow/3-commit.md +0 -209
- package/templates/commands/gitflow/4-plan.md +0 -174
- package/templates/commands/gitflow/5-exec.md +0 -202
- package/templates/commands/gitflow/6-abort.md +0 -121
- package/templates/commands/gitflow/7-pull-request.md +0 -176
- package/templates/commands/gitflow/8-review.md +0 -113
- package/templates/commands/gitflow/9-merge.md +0 -157
- package/templates/commands/gitflow.md +0 -128
- package/templates/commands/implement.md +0 -663
- package/templates/commands/init.md +0 -567
- package/templates/commands/mcp-integration.md +0 -330
- package/templates/commands/notification.md +0 -129
- package/templates/commands/oneshot.md +0 -57
- package/templates/commands/quickstart.md +0 -154
- package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
- package/templates/commands/ralph-loop/help.md +0 -126
- package/templates/commands/ralph-loop/ralph-loop.md +0 -120
- package/templates/commands/review.md +0 -106
- package/templates/commands/workflow.md +0 -193
- package/templates/gitflow/config.json +0 -138
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-04-validate
|
|
3
|
+
description: Validation gate - APPROVED or REJECTED decision
|
|
4
|
+
model: haiku
|
|
5
|
+
prev_step: steps/step-03-specify.md
|
|
6
|
+
next_step: steps/step-05-handoff.md
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Validate that all specifications are complete and consistent.
|
|
11
|
+
Gate decision: APPROVED or REJECTED with reasons.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
## EXECUTION SEQUENCE
|
|
15
|
+
|
|
16
|
+
### 1. Read Current State
|
|
17
|
+
|
|
18
|
+
Read `{output_dir}/00-context.md` for state variables.
|
|
19
|
+
Read all previous outputs:
|
|
20
|
+
- `1-discovery.md`
|
|
21
|
+
- `2-business-requirements.md`
|
|
22
|
+
- `3-functional-specification.md`
|
|
23
|
+
|
|
24
|
+
Update progress: `04-validate` -> "In Progress"
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### 2. Completeness Checklist
|
|
29
|
+
|
|
30
|
+
**Discovery validation:**
|
|
31
|
+
- [ ] Business problem clearly defined
|
|
32
|
+
- [ ] All stakeholders identified
|
|
33
|
+
- [ ] Scope (In/Out) explicit
|
|
34
|
+
- [ ] Acceptance criteria defined
|
|
35
|
+
- [ ] No critical open questions
|
|
36
|
+
|
|
37
|
+
**BRD validation:**
|
|
38
|
+
- [ ] All business objectives measurable
|
|
39
|
+
- [ ] All business rules have BR-ID
|
|
40
|
+
- [ ] Rules are testable (conditions + examples)
|
|
41
|
+
- [ ] Process flow documented
|
|
42
|
+
- [ ] Data entities complete
|
|
43
|
+
|
|
44
|
+
**FRD validation:**
|
|
45
|
+
- [ ] All UC have permission mapping
|
|
46
|
+
- [ ] All FR trace to BR
|
|
47
|
+
- [ ] Permission matrix complete
|
|
48
|
+
- [ ] UI wireframes provided
|
|
49
|
+
- [ ] Gherkin scenarios cover happy path + errors
|
|
50
|
+
- [ ] i18n keys defined for messages
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### 3. Consistency Checks
|
|
55
|
+
|
|
56
|
+
**Cross-reference validation:**
|
|
57
|
+
|
|
58
|
+
| Check | Source | Target | Status |
|
|
59
|
+
|-------|--------|--------|--------|
|
|
60
|
+
| BR -> FR | 2-brd.md | 3-frd.md | {OK/FAIL} |
|
|
61
|
+
| AC -> UC | 1-discovery.md | 3-frd.md | {OK/FAIL} |
|
|
62
|
+
| Stakeholder -> Actor | 1-discovery.md | 3-frd.md | {OK/FAIL} |
|
|
63
|
+
| Entity -> Endpoint | 2-brd.md | 3-frd.md | {OK/FAIL} |
|
|
64
|
+
|
|
65
|
+
**Identify gaps:**
|
|
66
|
+
- BR without FR coverage
|
|
67
|
+
- AC without UC coverage
|
|
68
|
+
- Endpoints without permissions
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 4. SmartStack Convention Validation
|
|
73
|
+
|
|
74
|
+
**Permission path format:**
|
|
75
|
+
```
|
|
76
|
+
VALID: business.{app}.{module}.{action}
|
|
77
|
+
INVALID: business.{app}.{action}
|
|
78
|
+
INVALID: {app}.{module}.{action}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**NavRoute compliance:**
|
|
82
|
+
- Controller route must match: `business.{app}.{module}`
|
|
83
|
+
- Permissions must use same base path
|
|
84
|
+
|
|
85
|
+
**Entity naming:**
|
|
86
|
+
- PascalCase for entity names
|
|
87
|
+
- Matches module naming convention
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### 5. Risk Assessment
|
|
92
|
+
|
|
93
|
+
| Risk | Severity | Mitigation |
|
|
94
|
+
|------|----------|------------|
|
|
95
|
+
| {identified risk} | High/Medium/Low | {mitigation strategy} |
|
|
96
|
+
|
|
97
|
+
**Common risks to check:**
|
|
98
|
+
- [ ] Missing error handling for integrations
|
|
99
|
+
- [ ] Performance concerns for large datasets
|
|
100
|
+
- [ ] Security gaps in permission model
|
|
101
|
+
- [ ] Complex workflow without clear rollback
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### 6. Make Decision
|
|
106
|
+
|
|
107
|
+
**APPROVED if:**
|
|
108
|
+
- All completeness checks pass (100%)
|
|
109
|
+
- All consistency checks pass
|
|
110
|
+
- No HIGH severity risks unmitigated
|
|
111
|
+
- SmartStack conventions respected
|
|
112
|
+
|
|
113
|
+
**REJECTED if:**
|
|
114
|
+
- Any critical completeness check fails
|
|
115
|
+
- Consistency gap found
|
|
116
|
+
- HIGH severity risk without mitigation
|
|
117
|
+
- Convention violations
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### 7. Generate Validation Report
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"featureId": "{feature_id}",
|
|
126
|
+
"validatedAt": "{timestamp}",
|
|
127
|
+
"validatedBy": "Business Analyst (Claude)",
|
|
128
|
+
"decision": "APPROVED" | "REJECTED",
|
|
129
|
+
"completeness": {
|
|
130
|
+
"discovery": {
|
|
131
|
+
"score": "5/5",
|
|
132
|
+
"issues": []
|
|
133
|
+
},
|
|
134
|
+
"brd": {
|
|
135
|
+
"score": "5/5",
|
|
136
|
+
"issues": []
|
|
137
|
+
},
|
|
138
|
+
"frd": {
|
|
139
|
+
"score": "6/6",
|
|
140
|
+
"issues": []
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"consistency": {
|
|
144
|
+
"brToFr": "OK",
|
|
145
|
+
"acToUc": "OK",
|
|
146
|
+
"stakeholderToActor": "OK",
|
|
147
|
+
"entityToEndpoint": "OK"
|
|
148
|
+
},
|
|
149
|
+
"conventions": {
|
|
150
|
+
"permissions": "OK",
|
|
151
|
+
"navRoute": "OK",
|
|
152
|
+
"naming": "OK"
|
|
153
|
+
},
|
|
154
|
+
"risks": [
|
|
155
|
+
{
|
|
156
|
+
"risk": "{description}",
|
|
157
|
+
"severity": "Medium",
|
|
158
|
+
"mitigation": "{strategy}",
|
|
159
|
+
"status": "Mitigated"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"summary": "{Overall assessment}",
|
|
163
|
+
"nextStep": "step-05-handoff" | "Revision required"
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### 8. Save Output
|
|
170
|
+
|
|
171
|
+
Write to: `{output_dir}/validation.json`
|
|
172
|
+
|
|
173
|
+
Update `00-context.md`:
|
|
174
|
+
- Progress: `04-validate` -> "Complete"
|
|
175
|
+
- Add validation status
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### 9. Handle Decision
|
|
180
|
+
|
|
181
|
+
**If APPROVED:**
|
|
182
|
+
|
|
183
|
+
Display:
|
|
184
|
+
```
|
|
185
|
+
VALIDATION - {feature_id}
|
|
186
|
+
├── Status: APPROVED
|
|
187
|
+
├── Completeness: 100%
|
|
188
|
+
├── Consistency: All checks passed
|
|
189
|
+
├── Conventions: SmartStack compliant
|
|
190
|
+
├── Risks: {count} mitigated
|
|
191
|
+
├── Output: {output_dir}/validation.json
|
|
192
|
+
└── Next: step-05-handoff (Development prompt)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Load next step: `steps/step-05-handoff.md`
|
|
196
|
+
|
|
197
|
+
**If REJECTED:**
|
|
198
|
+
|
|
199
|
+
Display:
|
|
200
|
+
```
|
|
201
|
+
VALIDATION - {feature_id}
|
|
202
|
+
├── Status: REJECTED
|
|
203
|
+
├── Issues found:
|
|
204
|
+
│ ├── {issue 1}
|
|
205
|
+
│ ├── {issue 2}
|
|
206
|
+
│ └── {issue 3}
|
|
207
|
+
├── Required actions:
|
|
208
|
+
│ ├── {action 1}
|
|
209
|
+
│ └── {action 2}
|
|
210
|
+
└── Next: Revise specifications
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Ask user:**
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"questions": [
|
|
217
|
+
{
|
|
218
|
+
"question": "How would you like to proceed?",
|
|
219
|
+
"header": "Action",
|
|
220
|
+
"options": [
|
|
221
|
+
{"label": "Auto-revise", "description": "Claude fixes the identified issues"},
|
|
222
|
+
{"label": "Manual revision", "description": "You fix and relaunch validation"},
|
|
223
|
+
{"label": "Force approval", "description": "Continue despite issues (not recommended)"}
|
|
224
|
+
],
|
|
225
|
+
"multiSelect": false
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## OUTPUT
|
|
234
|
+
|
|
235
|
+
This step produces:
|
|
236
|
+
- `{output_dir}/validation.json` (created)
|
|
237
|
+
- `{output_dir}/00-context.md` (updated)
|
|
238
|
+
|
|
239
|
+
Gate decision enables or blocks next step.
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-05-handoff
|
|
3
|
+
description: Handoff phase - Generate autonomous development prompt
|
|
4
|
+
model: opus
|
|
5
|
+
prev_step: steps/step-04-validate.md
|
|
6
|
+
next_step: steps/step-06-doc-html.md
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Generate a complete, autonomous development prompt for `/implement`.
|
|
11
|
+
The handoff must be zero-ambiguity: a developer (or Claude) can implement without questions.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<ultrathink>
|
|
15
|
+
ULTRATHINK MODE - Handoff Generation:
|
|
16
|
+
- Every implementation detail must be explicit
|
|
17
|
+
- File paths must be exact
|
|
18
|
+
- Patterns must reference existing code
|
|
19
|
+
- No assumptions about "obvious" behavior
|
|
20
|
+
</ultrathink>
|
|
21
|
+
|
|
22
|
+
## EXECUTION SEQUENCE
|
|
23
|
+
|
|
24
|
+
### 1. Read Current State
|
|
25
|
+
|
|
26
|
+
Read `{output_dir}/00-context.md` for state variables.
|
|
27
|
+
Read validation: `{output_dir}/validation.json`
|
|
28
|
+
Read specs: `{output_dir}/3-functional-specification.md`
|
|
29
|
+
|
|
30
|
+
Update progress: `05-handoff` -> "In Progress"
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### 2. Verify Validation Passed
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
IF validation.decision != "APPROVED" THEN
|
|
38
|
+
DISPLAY ERROR: "Validation must pass before handoff"
|
|
39
|
+
EXIT to step-04-validate
|
|
40
|
+
END IF
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### 3. Load Handoff Template
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Read: templates/frd-handoff.md # ~100 lines
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### 4. Explore Existing Patterns
|
|
54
|
+
|
|
55
|
+
**CRITICAL: Handoff must reference ACTUAL code patterns!**
|
|
56
|
+
|
|
57
|
+
If `{economy_mode}` = false, launch parallel agents:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Agent 1: Backend patterns
|
|
61
|
+
"Explore src/SmartStack.Domain/Entities/ and
|
|
62
|
+
src/SmartStack.Application/Features/ to document:
|
|
63
|
+
- Entity naming pattern
|
|
64
|
+
- CQRS handler pattern
|
|
65
|
+
- Validation pattern
|
|
66
|
+
- Repository pattern"
|
|
67
|
+
|
|
68
|
+
Agent 2: Frontend patterns
|
|
69
|
+
"Explore web/smartstack-web/src/pages/business/ to document:
|
|
70
|
+
- Page component structure
|
|
71
|
+
- API service pattern
|
|
72
|
+
- i18n usage pattern
|
|
73
|
+
- Form handling pattern"
|
|
74
|
+
|
|
75
|
+
Agent 3: Infrastructure patterns
|
|
76
|
+
"Explore src/SmartStack.Infrastructure/ to document:
|
|
77
|
+
- EF Core configuration pattern
|
|
78
|
+
- DbContext registration
|
|
79
|
+
- Migration naming convention"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If `{economy_mode}` = true:
|
|
83
|
+
- Use Glob/Grep to find similar modules
|
|
84
|
+
- Read 2-3 reference files directly
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 5. Map Specifications to Files
|
|
89
|
+
|
|
90
|
+
**Backend files to create:**
|
|
91
|
+
|
|
92
|
+
| Layer | File | Template/Pattern |
|
|
93
|
+
|-------|------|------------------|
|
|
94
|
+
| Domain | `src/SmartStack.Domain/Entities/Business/{Entity}.cs` | Standard entity |
|
|
95
|
+
| Application | `src/SmartStack.Application/Features/{Module}/Commands/` | CQRS pattern |
|
|
96
|
+
| Application | `src/SmartStack.Application/Features/{Module}/Queries/` | CQRS pattern |
|
|
97
|
+
| Application | `src/SmartStack.Application/Features/{Module}/DTOs/` | Request/Response DTOs |
|
|
98
|
+
| Application | `src/SmartStack.Application/Features/{Module}/Validators/` | FluentValidation |
|
|
99
|
+
| Infrastructure | `src/SmartStack.Infrastructure/Persistence/Configurations/` | EF Core config |
|
|
100
|
+
| API | `src/SmartStack.Api/Controllers/Business/{Module}Controller.cs` | NavRoute controller |
|
|
101
|
+
|
|
102
|
+
**Frontend files to create:**
|
|
103
|
+
|
|
104
|
+
| Layer | File | Pattern |
|
|
105
|
+
|-------|------|---------|
|
|
106
|
+
| Pages | `web/smartstack-web/src/pages/business/{app}/{module}/` | Page components |
|
|
107
|
+
| Services | `web/smartstack-web/src/services/api/{module}Api.ts` | Axios service |
|
|
108
|
+
| i18n | `web/smartstack-web/src/i18n/locales/{lang}/{module}.json` | 4 languages |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### 6. Generate Implementation Instructions
|
|
113
|
+
|
|
114
|
+
For each file, provide explicit instructions:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
### Backend: {Entity}.cs
|
|
118
|
+
|
|
119
|
+
**Path:** `src/SmartStack.Domain/Entities/Business/{Entity}.cs`
|
|
120
|
+
|
|
121
|
+
**Reference:** Copy pattern from `src/SmartStack.Domain/Entities/Business/[ExistingEntity].cs`
|
|
122
|
+
|
|
123
|
+
**Properties to add:**
|
|
124
|
+
| Property | Type | Attributes | From BR |
|
|
125
|
+
|----------|------|------------|---------|
|
|
126
|
+
| Id | Guid | [Key] | - |
|
|
127
|
+
| {attr1} | string | [Required, MaxLength(100)] | BR-001 |
|
|
128
|
+
| {attr2} | decimal | [Precision(18,2)] | BR-002 |
|
|
129
|
+
| TenantId | Guid | [Required] | Multi-tenant |
|
|
130
|
+
| CreatedAt | DateTime | Audit | - |
|
|
131
|
+
| UpdatedAt | DateTime | Audit | - |
|
|
132
|
+
|
|
133
|
+
**Business rules to implement:**
|
|
134
|
+
- BR-001: {rule} -> Implement in Validator
|
|
135
|
+
- BR-002: {rule} -> Implement in Entity method
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### 7. Map Business Rules to Code
|
|
141
|
+
|
|
142
|
+
| BR-ID | Rule | Implementation Location | Code Pattern |
|
|
143
|
+
|-------|------|------------------------|--------------|
|
|
144
|
+
| BR-001 | {rule} | `{Entity}Validator.cs` | `.RuleFor(x => x.Field).NotEmpty()` |
|
|
145
|
+
| BR-002 | {rule} | `{Entity}.cs` method | `public bool CanXXX() { ... }` |
|
|
146
|
+
| BR-003 | {rule} | `{Handler}.cs` | `if (!entity.CanXXX()) throw` |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### 8. Define API Endpoints
|
|
151
|
+
|
|
152
|
+
| Endpoint | Method | Handler | Permission | Request DTO | Response DTO |
|
|
153
|
+
|----------|--------|---------|------------|-------------|--------------|
|
|
154
|
+
| `/api/business/{module}` | GET | `GetAll{Entity}Query` | `.read` | - | `{Entity}ListResponse` |
|
|
155
|
+
| `/api/business/{module}` | POST | `Create{Entity}Command` | `.create` | `Create{Entity}Request` | `{Entity}Response` |
|
|
156
|
+
| `/api/business/{module}/{id}` | GET | `Get{Entity}ByIdQuery` | `.read` | - | `{Entity}Response` |
|
|
157
|
+
| `/api/business/{module}/{id}` | PUT | `Update{Entity}Command` | `.update` | `Update{Entity}Request` | `{Entity}Response` |
|
|
158
|
+
| `/api/business/{module}/{id}` | DELETE | `Delete{Entity}Command` | `.delete` | - | `204` |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### 9. Generate Test Requirements
|
|
163
|
+
|
|
164
|
+
**Unit tests:**
|
|
165
|
+
- [ ] `{Entity}ValidatorTests.cs` - Validation rules
|
|
166
|
+
- [ ] `{Entity}Tests.cs` - Entity methods
|
|
167
|
+
|
|
168
|
+
**Integration tests:**
|
|
169
|
+
- [ ] `{Module}ControllerTests.cs` - All endpoints
|
|
170
|
+
- [ ] Permission tests - 403 for unauthorized
|
|
171
|
+
- [ ] Validation tests - 400 for invalid data
|
|
172
|
+
|
|
173
|
+
**Gherkin reference:** Copy scenarios from FRD section 7
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### 10. Generate i18n Keys
|
|
178
|
+
|
|
179
|
+
**Keys to create:**
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"{module}": {
|
|
184
|
+
"title": "{Module display name}",
|
|
185
|
+
"fields": {
|
|
186
|
+
"{field1}": "{Label}",
|
|
187
|
+
"{field2}": "{Label}"
|
|
188
|
+
},
|
|
189
|
+
"messages": {
|
|
190
|
+
"created": "{Entity} created successfully",
|
|
191
|
+
"updated": "{Entity} updated successfully",
|
|
192
|
+
"deleted": "{Entity} deleted successfully"
|
|
193
|
+
},
|
|
194
|
+
"errors": {
|
|
195
|
+
"{field1}Required": "{Field1} is required",
|
|
196
|
+
"notFound": "{Entity} not found",
|
|
197
|
+
"permissionDenied": "You don't have permission to perform this action"
|
|
198
|
+
},
|
|
199
|
+
"buttons": {
|
|
200
|
+
"create": "Create {Entity}",
|
|
201
|
+
"edit": "Edit",
|
|
202
|
+
"delete": "Delete",
|
|
203
|
+
"save": "Save",
|
|
204
|
+
"cancel": "Cancel"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### 11. Compile Handoff Document
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
# Development Handoff - {feature_id} {feature_description}
|
|
216
|
+
|
|
217
|
+
> **Module:** business/{application_name}/{module_name}
|
|
218
|
+
> **Version:** 1.0
|
|
219
|
+
> **Validated Specs:** FRD v1.0 (validation.json: APPROVED)
|
|
220
|
+
> **Implementation:** `/implement {feature_id}`
|
|
221
|
+
|
|
222
|
+
## DEVELOPER INSTRUCTIONS
|
|
223
|
+
|
|
224
|
+
This document is a standalone prompt for Claude Code. Execute:
|
|
225
|
+
```
|
|
226
|
+
/implement {feature_id}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 1. QUICK CONTEXT
|
|
232
|
+
|
|
233
|
+
| Attribute | Value |
|
|
234
|
+
|-----------|-------|
|
|
235
|
+
| Feature ID | {feature_id} |
|
|
236
|
+
| Module | business/{application_name}/{module_name} |
|
|
237
|
+
| Permission base | `business.{app}.{module}` |
|
|
238
|
+
| Complexity | {Simple/Medium/Complex} |
|
|
239
|
+
| Entities | {entity count} |
|
|
240
|
+
| Endpoints | {endpoint count} |
|
|
241
|
+
|
|
242
|
+
## 2. [EXPLORE] EXISTING PATTERNS
|
|
243
|
+
|
|
244
|
+
{Patterns discovered in step 4}
|
|
245
|
+
|
|
246
|
+
## 3. FILES TO CREATE
|
|
247
|
+
|
|
248
|
+
{File mapping table}
|
|
249
|
+
|
|
250
|
+
## 4. DETAILED SPECIFICATIONS
|
|
251
|
+
|
|
252
|
+
{Per-file instructions}
|
|
253
|
+
|
|
254
|
+
## 5. BUSINESS RULES → CODE
|
|
255
|
+
|
|
256
|
+
{BR to code mapping}
|
|
257
|
+
|
|
258
|
+
## 6. REQUIRED TESTS
|
|
259
|
+
|
|
260
|
+
{Test checklist}
|
|
261
|
+
|
|
262
|
+
## 7. POST-IMPLEMENTATION CHECKLIST
|
|
263
|
+
|
|
264
|
+
- [ ] Build backend OK (`dotnet build`)
|
|
265
|
+
- [ ] Build frontend OK (`pnpm build`)
|
|
266
|
+
- [ ] Tests pass (`dotnet test`)
|
|
267
|
+
- [ ] EF Core migration created
|
|
268
|
+
- [ ] Permissions in PermissionConfiguration.cs
|
|
269
|
+
- [ ] i18n complete (FR, EN, IT, DE)
|
|
270
|
+
- [ ] Documentation: `/business-analyse:6-doc-html {feature_id}`
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## EXECUTION
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
/implement {feature_id}
|
|
278
|
+
```
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
### 12. Save Output
|
|
284
|
+
|
|
285
|
+
Write to: `{output_dir}/4-development-handoff.md`
|
|
286
|
+
|
|
287
|
+
Update `00-context.md`:
|
|
288
|
+
- Progress: `05-handoff` -> "Complete"
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### 13. Display Summary and Offer Next Step
|
|
293
|
+
|
|
294
|
+
**Display:**
|
|
295
|
+
```
|
|
296
|
+
HANDOFF - {feature_id}
|
|
297
|
+
├── Status: Complete
|
|
298
|
+
├── Files to create: {file count}
|
|
299
|
+
├── Tests to write: {test count}
|
|
300
|
+
├── Output: {output_dir}/4-development-handoff.md
|
|
301
|
+
├── Execute: /implement {feature_id}
|
|
302
|
+
└── Optional: step-06-doc-html (React documentation)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Ask user:**
|
|
306
|
+
```json
|
|
307
|
+
{
|
|
308
|
+
"questions": [
|
|
309
|
+
{
|
|
310
|
+
"question": "What would you like to do now?",
|
|
311
|
+
"header": "Next",
|
|
312
|
+
"options": [
|
|
313
|
+
{"label": "Generate HTML documentation", "description": "Create the React documentation page"},
|
|
314
|
+
{"label": "Launch implementation", "description": "Execute /implement {feature_id}"},
|
|
315
|
+
{"label": "End BA", "description": "Stop here, implement later"}
|
|
316
|
+
],
|
|
317
|
+
"multiSelect": false
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
If "Generate HTML documentation":
|
|
324
|
+
```
|
|
325
|
+
Read and execute: steps/step-06-doc-html.md
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## OUTPUT
|
|
331
|
+
|
|
332
|
+
This step produces:
|
|
333
|
+
- `{output_dir}/4-development-handoff.md` (created)
|
|
334
|
+
- `{output_dir}/00-context.md` (updated)
|
|
335
|
+
|
|
336
|
+
Handoff is ready for `/implement {feature_id}`.
|