@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
@@ -0,0 +1,690 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "feature.json",
4
+ "title": "SmartStack Business Analysis Feature",
5
+ "description": "Single JSON file enriched progressively by each BA step. Published to docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json",
6
+ "type": "object",
7
+ "required": ["id", "version", "status", "metadata"],
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^FEAT-\\d{3,}$",
12
+ "description": "Unique feature identifier (e.g., FEAT-001)"
13
+ },
14
+ "version": {
15
+ "type": "string",
16
+ "pattern": "^\\d+\\.\\d+$",
17
+ "description": "Document version (e.g., 1.0, 1.1)"
18
+ },
19
+ "status": {
20
+ "type": "string",
21
+ "enum": ["draft", "analysed", "specified", "approved", "handed-off"],
22
+ "description": "Current lifecycle status, enriched by each step"
23
+ },
24
+
25
+ "metadata": {
26
+ "type": "object",
27
+ "required": ["createdAt", "updatedAt", "application", "module", "context", "language", "featureDescription"],
28
+ "properties": {
29
+ "createdAt": { "type": "string", "format": "date-time" },
30
+ "updatedAt": { "type": "string", "format": "date-time" },
31
+ "application": { "type": "string", "description": "Application name (PascalCase)" },
32
+ "module": { "type": "string", "description": "Module name (PascalCase)" },
33
+ "context": { "type": "string", "const": "business" },
34
+ "language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
35
+ "featureDescription": { "type": "string" },
36
+ "featureType": {
37
+ "type": "string",
38
+ "enum": ["data-centric", "integration", "ui-centric", "workflow", "reporting", "full-module", "micro"],
39
+ "description": "Auto-classified from feature description"
40
+ },
41
+ "useCase": {
42
+ "type": "string",
43
+ "enum": ["new", "refactoring", "micro"],
44
+ "description": "Which use case triggered this analysis"
45
+ },
46
+ "permissionBase": {
47
+ "type": "string",
48
+ "description": "e.g., business.sales.orders"
49
+ },
50
+ "previousVersion": {
51
+ "type": ["string", "null"],
52
+ "description": "Reference to previous version (for refactoring)"
53
+ },
54
+ "changeReason": {
55
+ "type": ["string", "null"],
56
+ "description": "Why this version was created (refactoring delta)"
57
+ },
58
+ "mcpAvailable": { "type": "boolean" },
59
+ "economyMode": { "type": "boolean" },
60
+ "steps": {
61
+ "type": "object",
62
+ "description": "Progress tracking per step",
63
+ "properties": {
64
+ "init": { "$ref": "#/$defs/stepStatus" },
65
+ "analyse": { "$ref": "#/$defs/stepStatus" },
66
+ "specify": { "$ref": "#/$defs/stepStatus" },
67
+ "validate": { "$ref": "#/$defs/stepStatus" },
68
+ "handoff": { "$ref": "#/$defs/stepStatus" }
69
+ }
70
+ }
71
+ }
72
+ },
73
+
74
+ "discovery": {
75
+ "type": "object",
76
+ "description": "Enriched by step-01-analyse (discovery part)",
77
+ "properties": {
78
+ "problem": { "type": "string", "description": "Q1.1 - Business problem to solve" },
79
+ "asIs": { "type": "string", "description": "Q1.2 - Current situation" },
80
+ "toBe": { "type": "string", "description": "Q1.3 - Target situation" },
81
+ "trigger": { "type": "string", "description": "Q1.4 - What triggered this need" },
82
+ "stakeholders": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "required": ["role"],
87
+ "properties": {
88
+ "role": { "type": "string" },
89
+ "function": { "type": "string" },
90
+ "involvement": { "type": "string", "enum": ["approver", "decision-maker", "consulted", "informed", "end-user"] },
91
+ "tasks": { "type": "array", "items": { "type": "string" } },
92
+ "frequency": { "type": "string" },
93
+ "painPoints": { "type": "array", "items": { "type": "string" } }
94
+ }
95
+ }
96
+ },
97
+ "scope": {
98
+ "type": "object",
99
+ "properties": {
100
+ "mustHave": { "type": "array", "items": { "type": "string" } },
101
+ "shouldHave": { "type": "array", "items": { "type": "string" } },
102
+ "couldHave": { "type": "array", "items": { "type": "string" } },
103
+ "outOfScope": { "type": "array", "items": { "type": "string" } },
104
+ "mainFlow": { "type": "string" },
105
+ "decisionPoints": { "type": "array", "items": { "type": "string" } },
106
+ "alternativeFlows": { "type": "array", "items": { "type": "string" } },
107
+ "errorCases": { "type": "array", "items": { "type": "string" } }
108
+ }
109
+ },
110
+ "risks": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "object",
114
+ "required": ["id", "type", "description"],
115
+ "properties": {
116
+ "id": { "type": "string", "pattern": "^RISK-\\d{3}$" },
117
+ "type": { "type": "string", "enum": ["business", "technical", "organizational"] },
118
+ "description": { "type": "string" },
119
+ "probability": { "type": "string", "enum": ["high", "medium", "low"] },
120
+ "impact": { "type": "string", "enum": ["high", "medium", "low"] },
121
+ "priority": { "type": "string", "enum": ["critical", "medium", "low"] },
122
+ "mitigation": { "type": "string" }
123
+ }
124
+ }
125
+ },
126
+ "acceptanceCriteria": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "object",
130
+ "required": ["id", "criterion"],
131
+ "properties": {
132
+ "id": { "type": "string", "pattern": "^AC-\\d{3}$" },
133
+ "criterion": { "type": "string" },
134
+ "validated": { "type": "boolean", "default": false }
135
+ }
136
+ }
137
+ },
138
+ "codebaseContext": {
139
+ "type": "string",
140
+ "description": "Summary of existing modules/patterns found during pre-research"
141
+ },
142
+ "openQuestions": {
143
+ "type": "array",
144
+ "items": {
145
+ "type": "object",
146
+ "properties": {
147
+ "id": { "type": "string" },
148
+ "question": { "type": "string" },
149
+ "answer": { "type": ["string", "null"] },
150
+ "status": { "type": "string", "enum": ["pending", "answered", "deferred"] }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ },
156
+
157
+ "analysis": {
158
+ "type": "object",
159
+ "description": "Enriched by step-01-analyse (analysis part, merged from old BRD step)",
160
+ "properties": {
161
+ "objectives": {
162
+ "type": "array",
163
+ "items": {
164
+ "type": "object",
165
+ "required": ["id", "objective"],
166
+ "properties": {
167
+ "id": { "type": "string", "pattern": "^OBJ-\\d{3}$" },
168
+ "objective": { "type": "string" },
169
+ "metric": { "type": "string" },
170
+ "target": { "type": "string" }
171
+ }
172
+ }
173
+ },
174
+ "businessRules": {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "object",
178
+ "required": ["id", "name", "category", "statement"],
179
+ "properties": {
180
+ "id": { "type": "string", "pattern": "^BR-(VAL|CALC|WF|SEC|DATA)-\\d{3}$" },
181
+ "name": { "type": "string" },
182
+ "category": { "type": "string", "enum": ["validation", "calculation", "workflow", "security", "data"] },
183
+ "statement": { "type": "string", "description": "IF ... THEN ... ELSE ..." },
184
+ "priority": { "type": "string", "enum": ["must", "should", "could"] },
185
+ "conditions": { "type": "array", "items": { "type": "string" } },
186
+ "examples": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "object",
190
+ "properties": {
191
+ "input": { "type": "string" },
192
+ "expected": { "type": "string" }
193
+ }
194
+ }
195
+ },
196
+ "testability": { "type": "string" }
197
+ }
198
+ }
199
+ },
200
+ "entities": {
201
+ "type": "array",
202
+ "description": "Business-view entities only. NO technical fields (Id, TenantId, CreatedBy, etc.)",
203
+ "items": {
204
+ "type": "object",
205
+ "required": ["name"],
206
+ "properties": {
207
+ "name": { "type": "string", "description": "PascalCase entity name" },
208
+ "description": { "type": "string" },
209
+ "attributes": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "object",
213
+ "required": ["name"],
214
+ "properties": {
215
+ "name": { "type": "string" },
216
+ "description": { "type": "string" },
217
+ "required": { "type": "boolean", "default": false },
218
+ "unique": { "type": "boolean", "default": false },
219
+ "validation": { "type": "string" }
220
+ }
221
+ }
222
+ },
223
+ "relationships": {
224
+ "type": "array",
225
+ "items": {
226
+ "type": "object",
227
+ "required": ["target", "type"],
228
+ "properties": {
229
+ "target": { "type": "string" },
230
+ "type": { "type": "string", "enum": ["1:1", "1:N", "N:M"] },
231
+ "description": { "type": "string" }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "processFlow": {
239
+ "type": "object",
240
+ "properties": {
241
+ "entryPoints": { "type": "array", "items": { "type": "string" } },
242
+ "mainFlow": {
243
+ "type": "array",
244
+ "items": {
245
+ "type": "object",
246
+ "properties": {
247
+ "step": { "type": "integer" },
248
+ "actor": { "type": "string" },
249
+ "action": { "type": "string" },
250
+ "system": { "type": "string" }
251
+ }
252
+ }
253
+ },
254
+ "decisionPoints": {
255
+ "type": "array",
256
+ "items": {
257
+ "type": "object",
258
+ "properties": {
259
+ "condition": { "type": "string" },
260
+ "ifTrue": { "type": "string" },
261
+ "ifFalse": { "type": "string" },
262
+ "rule": { "type": "string", "description": "Reference to BR-XXX" }
263
+ }
264
+ }
265
+ },
266
+ "alternativeFlows": { "type": "array", "items": { "type": "object" } }
267
+ }
268
+ },
269
+ "integrations": {
270
+ "type": "array",
271
+ "items": {
272
+ "type": "object",
273
+ "properties": {
274
+ "system": { "type": "string" },
275
+ "direction": { "type": "string", "enum": ["in", "out", "bidirectional"] },
276
+ "data": { "type": "string" },
277
+ "frequency": { "type": "string" },
278
+ "errorStrategy": { "type": "string" }
279
+ }
280
+ }
281
+ },
282
+ "dataLifecycle": {
283
+ "type": "object",
284
+ "properties": {
285
+ "retentionPeriod": { "type": "string" },
286
+ "archiveStrategy": { "type": "string" },
287
+ "gdprCompliance": { "type": "string" },
288
+ "states": {
289
+ "type": "array",
290
+ "items": {
291
+ "type": "object",
292
+ "properties": {
293
+ "name": { "type": "string" },
294
+ "transitions": { "type": "array", "items": { "type": "string" } }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ },
300
+ "crossModuleImpact": {
301
+ "type": "object",
302
+ "properties": {
303
+ "existingModules": { "type": "array", "items": { "type": "string" } },
304
+ "sharedData": { "type": "array", "items": { "type": "string" } },
305
+ "events": { "type": "array", "items": { "type": "string" } },
306
+ "modifications": { "type": "array", "items": { "type": "string" } }
307
+ }
308
+ }
309
+ }
310
+ },
311
+
312
+ "specification": {
313
+ "type": "object",
314
+ "description": "Enriched by step-02-specify",
315
+ "properties": {
316
+ "actors": {
317
+ "type": "array",
318
+ "items": {
319
+ "type": "object",
320
+ "required": ["role", "permissions"],
321
+ "properties": {
322
+ "role": { "type": "string" },
323
+ "description": { "type": "string" },
324
+ "permissions": { "type": "array", "items": { "type": "string" } }
325
+ }
326
+ }
327
+ },
328
+ "useCases": {
329
+ "type": "array",
330
+ "items": {
331
+ "type": "object",
332
+ "required": ["id", "name", "primaryActor", "permission"],
333
+ "properties": {
334
+ "id": { "type": "string", "pattern": "^UC-\\d{3}$" },
335
+ "name": { "type": "string" },
336
+ "primaryActor": { "type": "string" },
337
+ "permission": { "type": "string", "description": "business.{app}.{module}.{action}" },
338
+ "preconditions": { "type": "array", "items": { "type": "string" } },
339
+ "postconditions": { "type": "array", "items": { "type": "string" } },
340
+ "mainScenario": { "type": "array", "items": { "type": "string" } },
341
+ "alternativeScenarios": {
342
+ "type": "array",
343
+ "items": {
344
+ "type": "object",
345
+ "properties": {
346
+ "name": { "type": "string" },
347
+ "steps": { "type": "array", "items": { "type": "string" } }
348
+ }
349
+ }
350
+ },
351
+ "errorScenarios": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "properties": {
356
+ "name": { "type": "string" },
357
+ "steps": { "type": "array", "items": { "type": "string" } }
358
+ }
359
+ }
360
+ },
361
+ "linkedRules": {
362
+ "type": "array",
363
+ "items": { "type": "string" },
364
+ "description": "Cross-references to BR-XXX in analysis.businessRules"
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "functionalRequirements": {
370
+ "type": "array",
371
+ "items": {
372
+ "type": "object",
373
+ "required": ["id", "statement", "priority"],
374
+ "properties": {
375
+ "id": { "type": "string", "pattern": "^FR-\\d{3}$" },
376
+ "statement": { "type": "string", "description": "System MUST/SHOULD/COULD ..." },
377
+ "priority": { "type": "string", "enum": ["must", "should", "could"] },
378
+ "linkedRules": {
379
+ "type": "array",
380
+ "items": { "type": "string" },
381
+ "description": "Cross-references to BR-XXX"
382
+ },
383
+ "linkedUseCases": {
384
+ "type": "array",
385
+ "items": { "type": "string" },
386
+ "description": "Cross-references to UC-XXX"
387
+ },
388
+ "acceptanceCriteria": { "type": "array", "items": { "type": "string" } }
389
+ }
390
+ }
391
+ },
392
+ "permissionMatrix": {
393
+ "type": "object",
394
+ "properties": {
395
+ "permissions": {
396
+ "type": "array",
397
+ "description": "All permissions for this module",
398
+ "items": {
399
+ "type": "object",
400
+ "required": ["path", "action"],
401
+ "properties": {
402
+ "path": { "type": "string", "description": "business.{app}.{module}.{action}" },
403
+ "action": { "type": "string", "enum": ["read", "create", "update", "delete", "export", "import", "admin", "*"] },
404
+ "description": { "type": "string" }
405
+ }
406
+ }
407
+ },
408
+ "roleAssignments": {
409
+ "type": "array",
410
+ "description": "Role-to-permission mapping (SeedData source)",
411
+ "items": {
412
+ "type": "object",
413
+ "required": ["role", "permissions"],
414
+ "properties": {
415
+ "role": { "type": "string" },
416
+ "permissions": {
417
+ "type": "array",
418
+ "items": { "type": "string" },
419
+ "description": "Permission paths assigned to this role"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ },
426
+ "navigation": {
427
+ "type": "object",
428
+ "description": "Navigation hierarchy for SeedData generation",
429
+ "properties": {
430
+ "entries": {
431
+ "type": "array",
432
+ "items": {
433
+ "type": "object",
434
+ "required": ["level", "code", "route"],
435
+ "properties": {
436
+ "level": { "type": "string", "enum": ["context", "application", "module", "section", "resource"] },
437
+ "code": { "type": "string" },
438
+ "labels": {
439
+ "type": "object",
440
+ "properties": {
441
+ "fr": { "type": "string" },
442
+ "en": { "type": "string" },
443
+ "it": { "type": "string" },
444
+ "de": { "type": "string" }
445
+ }
446
+ },
447
+ "route": { "type": "string" },
448
+ "icon": { "type": "string" },
449
+ "isNew": { "type": "boolean" }
450
+ }
451
+ }
452
+ }
453
+ }
454
+ },
455
+ "gherkinScenarios": {
456
+ "type": "array",
457
+ "items": {
458
+ "type": "object",
459
+ "properties": {
460
+ "feature": { "type": "string" },
461
+ "scenarios": {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "object",
465
+ "properties": {
466
+ "name": { "type": "string" },
467
+ "tags": { "type": "array", "items": { "type": "string" } },
468
+ "given": { "type": "array", "items": { "type": "string" } },
469
+ "when": { "type": "array", "items": { "type": "string" } },
470
+ "then": { "type": "array", "items": { "type": "string" } }
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+ },
477
+ "validations": {
478
+ "type": "array",
479
+ "description": "Field-level validations for entities",
480
+ "items": {
481
+ "type": "object",
482
+ "properties": {
483
+ "entity": { "type": "string" },
484
+ "field": { "type": "string" },
485
+ "rules": { "type": "array", "items": { "type": "string" } },
486
+ "errorMessageKey": { "type": "string" }
487
+ }
488
+ }
489
+ },
490
+ "apiEndpoints": {
491
+ "type": "array",
492
+ "items": {
493
+ "type": "object",
494
+ "properties": {
495
+ "method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
496
+ "path": { "type": "string" },
497
+ "permission": { "type": "string" },
498
+ "requestDto": { "type": "string" },
499
+ "responseDto": { "type": "string" },
500
+ "description": { "type": "string" }
501
+ }
502
+ }
503
+ },
504
+ "i18nKeys": {
505
+ "type": "object",
506
+ "description": "Translation keys organized by section",
507
+ "additionalProperties": {
508
+ "type": "object",
509
+ "additionalProperties": { "type": "string" }
510
+ }
511
+ },
512
+ "uiWireframes": {
513
+ "type": "array",
514
+ "items": {
515
+ "type": "object",
516
+ "properties": {
517
+ "screen": { "type": "string" },
518
+ "description": { "type": "string" },
519
+ "elements": { "type": "array", "items": { "type": "string" } },
520
+ "actions": { "type": "array", "items": { "type": "string" } },
521
+ "permissionsRequired": { "type": "array", "items": { "type": "string" } }
522
+ }
523
+ }
524
+ }
525
+ }
526
+ },
527
+
528
+ "validation": {
529
+ "type": "object",
530
+ "description": "Enriched by step-03-validate",
531
+ "properties": {
532
+ "decision": { "type": "string", "enum": ["approved", "rejected", "pending"] },
533
+ "validatedAt": { "type": ["string", "null"], "format": "date-time" },
534
+ "completeness": {
535
+ "type": "object",
536
+ "properties": {
537
+ "discovery": { "type": "boolean" },
538
+ "analysis": { "type": "boolean" },
539
+ "specification": { "type": "boolean" },
540
+ "score": { "type": "integer" },
541
+ "total": { "type": "integer" },
542
+ "details": { "type": "array", "items": { "type": "string" } }
543
+ }
544
+ },
545
+ "consistency": {
546
+ "type": "object",
547
+ "description": "Cross-reference validation results",
548
+ "properties": {
549
+ "rulesToRequirements": { "type": "boolean", "description": "All BR mapped to FR" },
550
+ "useCasesToActors": { "type": "boolean", "description": "All UC have valid actors" },
551
+ "requirementsToRules": { "type": "boolean", "description": "All FR trace to BR" },
552
+ "entitiesToEndpoints": { "type": "boolean", "description": "All entities have CRUD endpoints" },
553
+ "details": { "type": "array", "items": { "type": "string" } }
554
+ }
555
+ },
556
+ "conventions": {
557
+ "type": "object",
558
+ "description": "SmartStack convention validation",
559
+ "properties": {
560
+ "permissionPaths": { "type": "boolean" },
561
+ "navRoutes": { "type": "boolean" },
562
+ "entityNaming": { "type": "boolean" },
563
+ "folderStructure": { "type": "boolean" },
564
+ "seedDataComplete": { "type": "boolean" },
565
+ "details": { "type": "array", "items": { "type": "string" } }
566
+ }
567
+ },
568
+ "issues": {
569
+ "type": "array",
570
+ "items": {
571
+ "type": "object",
572
+ "properties": {
573
+ "severity": { "type": "string", "enum": ["critical", "warning", "info"] },
574
+ "category": { "type": "string" },
575
+ "description": { "type": "string" },
576
+ "suggestion": { "type": "string" }
577
+ }
578
+ }
579
+ }
580
+ }
581
+ },
582
+
583
+ "handoff": {
584
+ "type": "object",
585
+ "description": "Enriched by step-04-handoff",
586
+ "properties": {
587
+ "complexity": { "type": "string", "enum": ["simple", "medium", "complex"] },
588
+ "filesToCreate": {
589
+ "type": "object",
590
+ "properties": {
591
+ "domain": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
592
+ "application": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
593
+ "infrastructure": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
594
+ "api": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
595
+ "frontend": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
596
+ "seedData": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } },
597
+ "tests": { "type": "array", "items": { "$ref": "#/$defs/fileSpec" } }
598
+ }
599
+ },
600
+ "brToCodeMapping": {
601
+ "type": "array",
602
+ "items": {
603
+ "type": "object",
604
+ "properties": {
605
+ "ruleId": { "type": "string" },
606
+ "implementationFile": { "type": "string" },
607
+ "pattern": { "type": "string" }
608
+ }
609
+ }
610
+ },
611
+ "ralphPrd": {
612
+ "type": "object",
613
+ "description": "Embedded Ralph Loop task breakdown (also exported to .ralph/prd.json)",
614
+ "properties": {
615
+ "tasks": {
616
+ "type": "array",
617
+ "items": {
618
+ "type": "object",
619
+ "properties": {
620
+ "id": { "type": "integer" },
621
+ "description": { "type": "string" },
622
+ "category": { "type": "string", "enum": ["domain", "application", "infrastructure", "api", "frontend", "i18n", "test", "validation"] },
623
+ "dependencies": { "type": "array", "items": { "type": "integer" } },
624
+ "acceptanceCriteria": { "type": "string" }
625
+ }
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+ },
632
+
633
+ "suggestions": {
634
+ "type": "array",
635
+ "description": "Proactive AI suggestions for complementary modules/sections",
636
+ "items": {
637
+ "type": "object",
638
+ "required": ["type", "code", "reason"],
639
+ "properties": {
640
+ "type": {
641
+ "type": "string",
642
+ "enum": ["module", "section", "integration", "enhancement"]
643
+ },
644
+ "code": { "type": "string", "description": "Suggested module/section code (PascalCase)" },
645
+ "title": { "type": "string" },
646
+ "reason": { "type": "string", "description": "Why this is suggested based on the current analysis" },
647
+ "accepted": {
648
+ "type": ["boolean", "null"],
649
+ "description": "null = not yet answered, true = accepted, false = rejected"
650
+ }
651
+ }
652
+ }
653
+ },
654
+
655
+ "changelog": {
656
+ "type": "array",
657
+ "description": "Version history and change tracking",
658
+ "items": {
659
+ "type": "object",
660
+ "required": ["version", "timestamp", "changes"],
661
+ "properties": {
662
+ "version": { "type": "string" },
663
+ "timestamp": { "type": "string", "format": "date-time" },
664
+ "author": { "type": "string" },
665
+ "changes": { "type": "array", "items": { "type": "string" } }
666
+ }
667
+ }
668
+ }
669
+ },
670
+
671
+ "$defs": {
672
+ "stepStatus": {
673
+ "type": "object",
674
+ "properties": {
675
+ "status": { "type": "string", "enum": ["pending", "in-progress", "completed", "skipped"] },
676
+ "startedAt": { "type": ["string", "null"], "format": "date-time" },
677
+ "completedAt": { "type": ["string", "null"], "format": "date-time" }
678
+ }
679
+ },
680
+ "fileSpec": {
681
+ "type": "object",
682
+ "properties": {
683
+ "path": { "type": "string", "description": "Relative file path" },
684
+ "description": { "type": "string" },
685
+ "pattern": { "type": "string", "description": "Reference pattern from existing codebase" },
686
+ "instructions": { "type": "string" }
687
+ }
688
+ }
689
+ }
690
+ }