@atlashub/smartstack-cli 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.documentation/agents.html +147 -40
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +3 -3
  4. package/.documentation/cli-commands.html +2 -2
  5. package/.documentation/commands.html +14 -14
  6. package/.documentation/efcore.html +14 -14
  7. package/.documentation/gitflow.html +12 -12
  8. package/.documentation/hooks.html +41 -3
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +2 -2
  11. package/.documentation/installation.html +11 -11
  12. package/.documentation/js/app.js +1 -1
  13. package/.documentation/ralph-loop.html +1 -1
  14. package/.documentation/test-web.html +4 -4
  15. package/dist/index.js +19 -11
  16. package/dist/index.js.map +1 -1
  17. package/dist/mcp-entry.mjs +57595 -4569
  18. package/dist/mcp-entry.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/templates/agents/ba-reader.md +250 -0
  21. package/templates/agents/ba-writer.md +210 -0
  22. package/templates/agents/docs-context-reader.md +51 -33
  23. package/templates/skills/_shared.md +2 -0
  24. package/templates/skills/business-analyse/SKILL.md +120 -108
  25. package/templates/skills/business-analyse/_shared.md +191 -160
  26. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
  27. package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
  28. package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
  29. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
  30. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
  31. package/templates/skills/business-analyse/questionnaire.md +72 -76
  32. package/templates/skills/business-analyse/react/components.md +317 -154
  33. package/templates/skills/business-analyse/react/i18n-template.md +167 -106
  34. package/templates/skills/business-analyse/react/schema.md +325 -106
  35. package/templates/skills/business-analyse/schemas/feature-schema.json +690 -0
  36. package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
  37. package/templates/skills/business-analyse/steps/step-01-analyse.md +505 -0
  38. package/templates/skills/business-analyse/steps/step-02-specify.md +833 -0
  39. package/templates/skills/business-analyse/steps/step-03-validate.md +862 -0
  40. package/templates/skills/business-analyse/steps/step-04-handoff.md +1593 -0
  41. package/templates/skills/business-analyse/templates/tpl-handoff.md +95 -43
  42. package/templates/skills/controller/templates.md +82 -0
  43. package/templates/skills/efcore/references/zero-downtime-patterns.md +227 -0
  44. package/templates/skills/efcore/steps/migration/step-03-validate.md +19 -0
  45. package/templates/skills/review-code/SKILL.md +4 -2
  46. package/templates/skills/review-code/references/owasp-api-top10.md +243 -0
  47. package/templates/skills/review-code/references/security-checklist.md +86 -1
  48. package/templates/skills/review-code/references/smartstack-conventions.md +166 -0
  49. package/templates/skills/workflow/SKILL.md +27 -0
  50. package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
  51. package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
  52. package/templates/skills/business-analyse/steps/step-03-specify.md +0 -409
  53. package/templates/skills/business-analyse/steps/step-04-validate.md +0 -313
  54. package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -658
  55. package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
  56. package/templates/skills/business-analyse/templates/00-context.md +0 -105
  57. package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
  58. package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
  59. package/templates/skills/business-analyse/tracking/change-template.md +0 -30
@@ -1,313 +0,0 @@
1
- ---
2
- name: step-04-validate
3
- description: Validation gate - APPROVED or REJECTED decision
4
- next_step: steps/step-05-handoff.md
5
- ---
6
-
7
- ## YOUR TASK:
8
-
9
- Validate that all specifications are complete and consistent.
10
- Gate decision: APPROVED or REJECTED with reasons.
11
-
12
- ## EXECUTION SEQUENCE:
13
-
14
- ### 1. Read Current State
15
-
16
- Read `{output_dir}/00-context.md` for state variables.
17
- Read all previous outputs:
18
- - `1-discovery.md`
19
- - `2-business-requirements.md`
20
- - `3-functional-specification.md`
21
-
22
- Update progress: `04-validate` -> "In Progress"
23
-
24
- **Read digest from previous step:**
25
- Read `{output_dir}/digest-03.md` for compressed context from previous step.
26
- **DO NOT read full output files** unless in resume mode (`-r`).
27
-
28
- ---
29
-
30
- ### 2. Completeness Checklist
31
-
32
- **Discovery validation:**
33
- - [ ] Business problem clearly defined
34
- - [ ] All stakeholders identified
35
- - [ ] Scope (In/Out) explicit
36
- - [ ] Acceptance criteria defined
37
- - [ ] No critical open questions
38
-
39
- **BRD validation:**
40
- - [ ] All business objectives measurable
41
- - [ ] All business rules have BR-ID
42
- - [ ] Rules are testable (conditions + examples)
43
- - [ ] Process flow documented
44
- - [ ] Data entities complete
45
-
46
- **FRD validation:**
47
- - [ ] All UC have permission mapping
48
- - [ ] All FR trace to BR
49
- - [ ] Permission matrix complete
50
- - [ ] UI wireframes provided
51
- - [ ] Gherkin scenarios cover happy path + errors
52
- - [ ] i18n keys defined for messages
53
-
54
- ---
55
-
56
- ### 3. Consistency Checks
57
-
58
- **Cross-reference validation:**
59
-
60
- | Check | Source | Target | Status |
61
- |-------|--------|--------|--------|
62
- | BR -> FR | 2-brd.md | 3-frd.md | {OK/FAIL} |
63
- | AC -> UC | 1-discovery.md | 3-frd.md | {OK/FAIL} |
64
- | Stakeholder -> Actor | 1-discovery.md | 3-frd.md | {OK/FAIL} |
65
- | Entity -> Endpoint | 2-brd.md | 3-frd.md | {OK/FAIL} |
66
-
67
- **Identify gaps:**
68
- - BR without FR coverage
69
- - AC without UC coverage
70
- - Endpoints without permissions
71
-
72
- ---
73
-
74
- ### 4. SmartStack Convention Validation
75
-
76
- **Permission path format:**
77
- ```
78
- VALID: business.{app}.{module}.{action}
79
- INVALID: business.{app}.{action}
80
- INVALID: {app}.{module}.{action}
81
- ```
82
-
83
- **NavRoute compliance:**
84
- - Controller route must match: `business.{app}.{module}`
85
- - Permissions must use same base path
86
-
87
- **Entity naming:**
88
- - PascalCase for entity names
89
- - Matches module naming convention
90
-
91
- ---
92
-
93
- ### 5. Documentation Freshness Check
94
-
95
- **If `docs-manifest.json` exists in project root:**
96
-
97
- | Check | Expected | Status |
98
- |-------|----------|--------|
99
- | Module has manifest entry | Entry exists | {OK/MISSING} |
100
- | Last doc update < 30 days from last code change | Within threshold | {OK/DRIFT} |
101
- | All 8 business-first sections present | 8/8 | {X/8} |
102
- | i18n FR complete (minimum) | All keys present | {OK/INCOMPLETE} |
103
- | frd-data.ts exists | File present | {OK/MISSING} |
104
-
105
- **If drift detected:**
106
- - Add to validation report: `"documentationDrift": true`
107
- - Add to issues: `"Documentation is {N} days behind code changes"`
108
- - Severity: WARNING (non-blocking for BA validation)
109
-
110
- **If `docs-manifest.json` absent:** Skip this section silently.
111
-
112
- ---
113
-
114
- ### 6. Risk Assessment
115
-
116
- | Risk | Severity | Mitigation |
117
- |------|----------|------------|
118
- | {identified risk} | High/Medium/Low | {mitigation strategy} |
119
-
120
- **Common risks to check:**
121
- - [ ] Missing error handling for integrations
122
- - [ ] Performance concerns for large datasets
123
- - [ ] Security gaps in permission model
124
- - [ ] Complex workflow without clear rollback
125
-
126
- ---
127
-
128
- ### 7. Make Decision
129
-
130
- **APPROVED if:**
131
- - All completeness checks pass (100%)
132
- - All consistency checks pass
133
- - No HIGH severity risks unmitigated
134
- - SmartStack conventions respected
135
-
136
- **REJECTED if:**
137
- - Any critical completeness check fails
138
- - Consistency gap found
139
- - HIGH severity risk without mitigation
140
- - Convention violations
141
-
142
- ---
143
-
144
- ### 8b. Generate Context Digest
145
-
146
- **Write digest to:** `{output_dir}/digest-04.md`
147
-
148
- ```markdown
149
- # Digest: Step 04 - Validate
150
-
151
- ## Changes
152
- - {output_dir}/validation.json: Validation report created
153
-
154
- ## Decisions
155
- - Gate decision: {APPROVED/REJECTED}
156
- - Completeness: {score}
157
- - Consistency: {all checks status}
158
-
159
- ## Findings
160
- - Convention compliance: {status}
161
- - Documentation drift: {status}
162
- - Risks: {count} identified, {count} mitigated
163
-
164
- ## State Updates
165
- | Variable | New Value |
166
- |----------|-----------|
167
- | validation_status | {APPROVED/REJECTED} |
168
- | completeness_score | {score} |
169
- | risk_count | {count} |
170
-
171
- ## For Next Step
172
- - Validation: {APPROVED/REJECTED}
173
- - If REJECTED: {list of issues to fix}
174
- - If APPROVED: ready for handoff generation
175
- ```
176
-
177
- ---
178
-
179
- ### 9. Generate Validation Report
180
-
181
- ```json
182
- {
183
- "featureId": "{feature_id}",
184
- "validatedAt": "{timestamp}",
185
- "validatedBy": "Business Analyst (Claude)",
186
- "decision": "APPROVED" | "REJECTED",
187
- "completeness": {
188
- "discovery": {
189
- "score": "5/5",
190
- "issues": []
191
- },
192
- "brd": {
193
- "score": "5/5",
194
- "issues": []
195
- },
196
- "frd": {
197
- "score": "6/6",
198
- "issues": []
199
- }
200
- },
201
- "consistency": {
202
- "brToFr": "OK",
203
- "acToUc": "OK",
204
- "stakeholderToActor": "OK",
205
- "entityToEndpoint": "OK"
206
- },
207
- "conventions": {
208
- "permissions": "OK",
209
- "navRoute": "OK",
210
- "naming": "OK"
211
- },
212
- "risks": [
213
- {
214
- "risk": "{description}",
215
- "severity": "Medium",
216
- "mitigation": "{strategy}",
217
- "status": "Mitigated"
218
- }
219
- ],
220
- "summary": "{Overall assessment}",
221
- "nextStep": "step-05-handoff" | "Revision required"
222
- }
223
- ```
224
-
225
- ---
226
-
227
- ### 10. Save Output
228
-
229
- Write to: `{output_dir}/validation.json`
230
-
231
- Update `00-context.md`:
232
- - Progress: `04-validate` -> "Complete"
233
- - Add validation status
234
-
235
- ---
236
-
237
- ### 11. Handle Decision
238
-
239
- **If APPROVED:**
240
-
241
- Display:
242
-
243
- | Field | Value |
244
- |-------|-------|
245
- | Step | VALIDATION |
246
- | Feature | {feature_id} |
247
- | Status | APPROVED |
248
- | Completeness | 100% |
249
- | Consistency | All checks passed |
250
- | Conventions | SmartStack compliant |
251
- | Risks | {count} mitigated |
252
- | Output | {output_dir}/validation.json |
253
- | Next | step-05-handoff (Development prompt) |
254
-
255
- Load next step: `steps/step-05-handoff.md`
256
-
257
- **If REJECTED:**
258
-
259
- Display:
260
-
261
- | Field | Value |
262
- |-------|-------|
263
- | Step | VALIDATION |
264
- | Feature | {feature_id} |
265
- | Status | REJECTED |
266
- | Issues | {issue 1}, {issue 2}, {issue 3} |
267
- | Action 1 | {action 1} |
268
- | Action 2 | {action 2} |
269
- | Next | Revise specifications |
270
-
271
- **Ask user:**
272
- ```json
273
- {
274
- "questions": [
275
- {
276
- "question": "How would you like to proceed?",
277
- "header": "Action",
278
- "options": [
279
- {"label": "Auto-revise", "description": "Claude fixes the identified issues"},
280
- {"label": "Manual revision", "description": "You fix and relaunch validation"},
281
- {"label": "Force approval", "description": "Continue despite issues (not recommended)"}
282
- ],
283
- "multiSelect": false
284
- }
285
- ]
286
- }
287
- ```
288
-
289
- ---
290
-
291
- ## OUTPUT FORMAT:
292
-
293
- This step produces:
294
- - `{output_dir}/validation.json` (created)
295
- - `{output_dir}/00-context.md` (updated)
296
-
297
- Gate decision enables or blocks next step.
298
-
299
- ## ERROR HANDLING:
300
-
301
- **If previous output files are missing:**
302
- 1. List which files exist vs expected
303
- 2. If partial: validate only available documents
304
- 3. Add "Missing document" as CRITICAL issue in validation report
305
-
306
- **If validation gate REJECTED:**
307
- 1. Present issues to user with severity
308
- 2. Offer: auto-revise / manual revision / force approval
309
- 3. If auto-revise: loop back to the step that needs fixing
310
-
311
- ## NEXT STEP:
312
-
313
- After completion, proceed to `steps/step-05-handoff.md`