@atlashub/smartstack-cli 3.8.0 → 3.10.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 (130) hide show
  1. package/dist/index.js +365 -2
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -1
  4. package/templates/agents/action.md +1 -0
  5. package/templates/agents/ba-writer.md +211 -0
  6. package/templates/agents/explore-codebase.md +1 -0
  7. package/templates/agents/explore-docs.md +1 -0
  8. package/templates/agents/fix-grammar.md +1 -0
  9. package/templates/agents/snipper.md +1 -0
  10. package/templates/skills/admin/SKILL.md +6 -0
  11. package/templates/skills/ai-prompt/SKILL.md +32 -136
  12. package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
  13. package/templates/skills/apex/SKILL.md +120 -0
  14. package/templates/skills/apex/_shared.md +86 -0
  15. package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
  16. package/templates/skills/apex/references/smartstack-layers.md +173 -0
  17. package/templates/skills/apex/steps/step-00-init.md +156 -0
  18. package/templates/skills/apex/steps/step-01-analyze.md +169 -0
  19. package/templates/skills/apex/steps/step-02-plan.md +160 -0
  20. package/templates/skills/apex/steps/step-03-execute.md +166 -0
  21. package/templates/skills/apex/steps/step-04-validate.md +138 -0
  22. package/templates/skills/apex/steps/step-05-examine.md +124 -0
  23. package/templates/skills/apex/steps/step-06-resolve.md +105 -0
  24. package/templates/skills/apex/steps/step-07-tests.md +130 -0
  25. package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
  26. package/templates/skills/application/SKILL.md +10 -0
  27. package/templates/skills/application/references/application-roles-template.md +227 -0
  28. package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
  29. package/templates/skills/application/references/backend-entity-seeding.md +72 -0
  30. package/templates/skills/application/references/backend-verification.md +88 -0
  31. package/templates/skills/application/references/frontend-verification.md +111 -0
  32. package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
  33. package/templates/skills/application/references/provider-template.md +158 -0
  34. package/templates/skills/application/references/test-frontend.md +73 -0
  35. package/templates/skills/application/references/test-prerequisites.md +72 -0
  36. package/templates/skills/application/steps/step-01-navigation.md +7 -198
  37. package/templates/skills/application/steps/step-03-roles.md +45 -7
  38. package/templates/skills/application/steps/step-03b-provider.md +15 -132
  39. package/templates/skills/application/steps/step-04-backend.md +20 -350
  40. package/templates/skills/application/steps/step-05-frontend.md +12 -101
  41. package/templates/skills/application/steps/step-07-tests.md +12 -132
  42. package/templates/skills/business-analyse/SKILL.md +67 -6
  43. package/templates/skills/business-analyse/html/ba-interactive.html +176 -14
  44. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +1 -0
  45. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +16 -4
  46. package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +7 -2
  47. package/templates/skills/business-analyse/html/src/scripts/09-export.js +103 -0
  48. package/templates/skills/business-analyse/html/src/scripts/10-comments.js +12 -6
  49. package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +24 -2
  50. package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +12 -0
  51. package/templates/skills/business-analyse/html/src/template.html +1 -0
  52. package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +477 -0
  53. package/templates/skills/business-analyse/references/cache-warming-strategy.md +578 -0
  54. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
  55. package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
  56. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
  57. package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
  58. package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
  59. package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
  60. package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
  61. package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
  62. package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
  63. package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
  64. package/templates/skills/business-analyse/references/robustness-checks.md +538 -0
  65. package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
  66. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
  67. package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
  68. package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
  69. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +33 -1
  70. package/templates/skills/business-analyse/steps/step-00-init.md +186 -53
  71. package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
  72. package/templates/skills/business-analyse/steps/step-03a-data.md +42 -49
  73. package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
  74. package/templates/skills/business-analyse/steps/step-03c-compile.md +71 -2
  75. package/templates/skills/business-analyse/steps/step-03d-validate.md +277 -48
  76. package/templates/skills/business-analyse/steps/step-04-consolidation.md +175 -104
  77. package/templates/skills/business-analyse/steps/step-05a-handoff.md +66 -438
  78. package/templates/skills/business-analyse/steps/step-05b-deploy.md +35 -184
  79. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +526 -0
  80. package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
  81. package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
  82. package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
  83. package/templates/skills/check-version/SKILL.md +7 -0
  84. package/templates/skills/controller/references/controller-code-templates.md +159 -0
  85. package/templates/skills/controller/references/permission-sync-templates.md +152 -0
  86. package/templates/skills/controller/steps/step-03-generate.md +166 -158
  87. package/templates/skills/controller/steps/step-04-perms.md +5 -144
  88. package/templates/skills/controller/templates.md +11 -2
  89. package/templates/skills/debug/SKILL.md +7 -0
  90. package/templates/skills/explore/SKILL.md +6 -0
  91. package/templates/skills/feature-full/SKILL.md +39 -142
  92. package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
  93. package/templates/skills/gitflow/references/init-config-template.md +135 -0
  94. package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
  95. package/templates/skills/gitflow/references/plan-template.md +69 -0
  96. package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
  97. package/templates/skills/gitflow/references/start-local-config.md +110 -0
  98. package/templates/skills/gitflow/steps/step-init.md +18 -289
  99. package/templates/skills/gitflow/steps/step-plan.md +6 -63
  100. package/templates/skills/gitflow/steps/step-start.md +16 -126
  101. package/templates/skills/mcp/SKILL.md +9 -213
  102. package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
  103. package/templates/skills/mcp/steps/step-02-tools.md +73 -0
  104. package/templates/skills/notification/SKILL.md +7 -0
  105. package/templates/skills/quick-search/SKILL.md +5 -0
  106. package/templates/skills/ralph-loop/SKILL.md +99 -381
  107. package/templates/skills/ralph-loop/references/category-rules.md +259 -0
  108. package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
  109. package/templates/skills/ralph-loop/references/core-seed-data.md +173 -21
  110. package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
  111. package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
  112. package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
  113. package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
  114. package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
  115. package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
  116. package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
  117. package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
  118. package/templates/skills/refactor/SKILL.md +12 -176
  119. package/templates/skills/refactor/steps/step-01-discover.md +60 -0
  120. package/templates/skills/refactor/steps/step-02-execute.md +67 -0
  121. package/templates/skills/review-code/SKILL.md +19 -257
  122. package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
  123. package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
  124. package/templates/skills/review-code/steps/step-03-react.md +44 -0
  125. package/templates/skills/ui-components/SKILL.md +7 -0
  126. package/templates/skills/utils/SKILL.md +6 -0
  127. package/templates/skills/validate/SKILL.md +6 -0
  128. package/templates/skills/validate-feature/SKILL.md +8 -0
  129. package/templates/skills/workflow/SKILL.md +40 -118
  130. package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
@@ -2,7 +2,7 @@
2
2
  name: step-05b-deploy
3
3
  description: Generate prd.json, deploy artifacts, interactive HTML
4
4
  model: sonnet
5
- next_step: null
5
+ next_step: steps/step-05c-ralph-readiness.md
6
6
  ---
7
7
 
8
8
  > **Context files:** _shared.md
@@ -80,7 +80,7 @@ prd.json generated for module {moduleCode}:
80
80
  **Key guarantees:**
81
81
  - Source MUST reference feature.json path (traceability)
82
82
  - All data is EXACT COPY from feature.json (no transformation, no invention)
83
- - prd.json version: "2.0.0"
83
+ - prd.json $version: "3.0.0" (unified format with pre-computed tasks)
84
84
  - source.type: "ba-handoff-programmatic"
85
85
 
86
86
  **POST-CHECK (BLOCKING — DO NOT SKIP):**
@@ -221,148 +221,20 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
221
221
 
222
222
  ---
223
223
 
224
- ### 5. Build FEATURE_DATA Object
224
+ ### 5-7. Build FEATURE_DATA, EMBEDDED_ARTIFACTS & Replace Placeholders
225
225
 
226
- Reference `references/html-data-mapping.md` EXACTLY. The FEATURE_DATA object must contain:
226
+ See [references/deploy-data-build.md](../references/deploy-data-build.md) for:
227
+ - Complete FEATURE_DATA object structure (metadata, cadrage, modules, moduleSpecs, consolidation, handoff)
228
+ - Complete EMBEDDED_ARTIFACTS object structure (wireframes, e2eFlows, dependencyGraph)
229
+ - 7-step build process for FEATURE_DATA
230
+ - 4-step artifact gathering for EMBEDDED_ARTIFACTS
231
+ - Placeholder replacement rules (8 placeholders)
227
232
 
228
- **Structure:**
229
- ```javascript
230
- const FEATURE_DATA = {
231
- metadata: {
232
- applicationName: master.application_name,
233
- applicationId: master.feature_id,
234
- version: master.version,
235
- createdAt: ISO_TIMESTAMP,
236
- vibeCoding: master.metadata.vibeCoding // "enabled" or "disabled" — controls UI section visibility
237
- },
238
- cadrage: {
239
- goal: master.cadrage.goal,
240
- vision: master.cadrage.vision,
241
- success_criteria: master.cadrage.success_criteria,
242
- scope: {
243
- // CONVERT feature.json keys to HTML keys:
244
- // mustHave → vital
245
- // shouldHave → important
246
- // couldHave → optional
247
- // outOfScope → excluded
248
- vital: master.globalScope.mustHave || [],
249
- important: master.globalScope.shouldHave || [],
250
- optional: master.globalScope.couldHave || [],
251
- excluded: master.globalScope.outOfScope || []
252
- },
253
- constraints: master.cadrage.constraints || [],
254
- risks: master.cadrage.risks || [],
255
- stakeholders: master.stakeholders || []
256
- },
257
- modules: [
258
- {
259
- moduleCode: module.code,
260
- moduleName: module.name,
261
- moduleDescription: module.description || "",
262
- // ... per-module fields from feature.json
263
- }
264
- ],
265
- moduleSpecs: {
266
- // CRITICAL: Must have ONE entry per module with ALL module data
267
- // Each entry keyed by moduleCode:
268
- "{moduleCode}": {
269
- useCases: module.specification.useCases || [],
270
- businessRules: module.analysis.businessRules || [],
271
- entities: module.analysis.entities || [],
272
- permissions: module.specification.permissions || [],
273
- apiEndpoints: module.specification.apiEndpoints || []
274
- }
275
- },
276
- consolidation: {
277
- // Cross-module analysis
278
- integrations: master.consolidation.integrations || [],
279
- sharedEntities: master.consolidation.sharedEntities || [],
280
- sequenceDiagrams: master.consolidation.e2eFlows || []
281
- },
282
- handoff: {
283
- // From feature.json handoff section
284
- complexity: master.handoff.complexity,
285
- implementationStrategy: master.handoff.implementationStrategy,
286
- moduleOrder: master.handoff.moduleOrder,
287
- filesToCreate: master.handoff.filesToCreate,
288
- brToCodeMapping: master.handoff.brToCodeMapping,
289
- apiEndpointSummary: master.handoff.apiEndpointSummary
290
- }
291
- };
292
- ```
293
-
294
- **Build process:**
295
- 1. Extract metadata from master feature.json
296
- 2. Extract cadrage from master feature.json (CONVERT scope keys)
297
- 3. Extract stakeholders from master.stakeholders
298
- 4. Iterate ALL modules and populate moduleSpecs (THIS IS CRITICAL — empty moduleSpecs = BUG)
299
- 5. For EACH module, extract:
300
- - Use cases from specification.useCases
301
- - Business rules from analysis.businessRules
302
- - Entities from analysis.entities
303
- - Permissions from specification.permissions
304
- - API endpoints from specification.apiEndpoints
305
- 6. Extract consolidation data (integrations, shared entities, E2E flows)
306
- 7. Extract handoff section (complexity, strategy, module order, file counts)
307
-
308
- ---
309
-
310
- ### 6. Build EMBEDDED_ARTIFACTS Object
311
-
312
- Extract visual artifacts and diagrams from the analysis:
313
-
314
- ```javascript
315
- const EMBEDDED_ARTIFACTS = {
316
- wireframes: [
317
- // Extract from each module's specification.uiWireframes
318
- {
319
- moduleCode: "{moduleCode}",
320
- screen: wireframe.screen,
321
- description: wireframe.description,
322
- layout: wireframe.layout || "responsive",
323
- components: wireframe.components || []
324
- }
325
- ],
326
- e2eFlows: [
327
- // Extract from master consolidation.e2eFlows
328
- {
329
- flowName: flow.name,
330
- description: flow.description,
331
- sequence: flow.sequence || [],
332
- modules: flow.modules || []
333
- }
334
- ],
335
- dependencyGraph: {
336
- // From master consolidation.dependencyGraph
337
- nodes: master.consolidation.dependencyGraph?.nodes || [],
338
- edges: master.consolidation.dependencyGraph?.edges || []
339
- }
340
- };
341
- ```
342
-
343
- **Artifact gathering:**
344
- 1. Read each module's `specification.uiWireframes[]` and add to wireframes array
345
- 2. Read master's `consolidation.e2eFlows[]` and add to e2eFlows array
346
- 3. Read master's `consolidation.dependencyGraph` and include as-is
347
- 4. Serialize as JSON with 2-space indentation
348
-
349
- ---
350
-
351
- ### 7. Replace Placeholders in Template
352
-
353
- 1. Serialize the FEATURE_DATA object as JSON (with 2-space indentation)
354
- 2. Serialize the EMBEDDED_ARTIFACTS object as JSON (with 2-space indentation)
355
- 3. Replace `{{FEATURE_DATA}}` with the serialized FEATURE_DATA JSON
356
- 4. Replace `{{EMBEDDED_ARTIFACTS}}` with the serialized EMBEDDED_ARTIFACTS JSON
357
- 5. Replace `{{APPLICATION_NAME}}` with `{application_name}`
358
- 6. Replace `{{APPLICATION_ID}}` with `{feature_id}`
359
- 7. Replace `{{VERSION}}` with `{version}`
360
- 8. Replace `{{CREATED_AT}}` with `{ISO timestamp}`
361
-
362
- **Verification during replacement:**
363
- - Ensure FEATURE_DATA JSON is valid (no trailing commas, proper nesting)
364
- - Ensure EMBEDDED_ARTIFACTS JSON is valid
365
- - Verify placeholders are completely replaced (grep for `{{` to confirm)
233
+ **Critical reminders:**
234
+ - FEATURE_DATA.**moduleSpecs** MUST have ONE entry per module (empty = BUG)
235
+ - FEATURE_DATA.**cadrage.scope** converts `mustHave→vital`, `shouldHave→important`, `couldHave→optional`, `outOfScope→excluded`
236
+ - FEATURE_DATA.**metadata.vibeCoding** from `master.metadata.vibeCoding`
237
+ - Also reference `references/html-data-mapping.md` for the full mapping spec
366
238
 
367
239
  ---
368
240
 
@@ -467,7 +339,12 @@ Effort: {total_days} days ({total_hours} hours)
467
339
  1. Ouvrir ba-interactive.html dans le navigateur
468
340
  2. Partager avec les stakeholders pour validation
469
341
  3. Si retours --> relancer /business-analyse pour une nouvelle itération
470
- 4. Une fois validé, lancer le développement:
342
+ 4. Validation de la compatibilité ralph-loop (recommandé):
343
+
344
+ Continuez à step-05c-ralph-readiness.md pour valider
345
+ la complétude et l'intégrité avant développement
346
+
347
+ 5. Une fois validé, lancer le développement:
471
348
 
472
349
  /ralph-loop -r
473
350
 
@@ -476,50 +353,24 @@ Effort: {total_days} days ({total_hours} hours)
476
353
 
477
354
  ---
478
355
 
479
- ## MODE SUPPORT
480
-
481
- ### Standard Mode
356
+ ## NEXT STEP
482
357
 
483
- Full handoff with all implementation details:
484
- - All 7 file categories
485
- - Complete BR-to-code mapping
486
- - Full API endpoint summary
487
- - Detailed prd.json
488
- - Comprehensive progress tracker
358
+ **RECOMMENDED:** Load `steps/step-05c-ralph-readiness.md` to run validation gate before /ralph-loop.
489
359
 
490
- ### Micro Mode (use_case = micro)
360
+ This validation ensures:
361
+ - All module handoffs are complete
362
+ - PRD files are structurally valid
363
+ - Cross-module references are resolvable
364
+ - No blocking issues before development
491
365
 
492
- Simplified handoff with minimal scope:
493
- - Only essential CRUD entity + controller
494
- - 3 core SeedData entries (omit some optional ones)
495
- - Basic prd.json with simplified sections
496
- - Lightweight progress.txt
497
- - Display `/ralph-loop -r` command for later use
498
-
499
- ### Delta Mode (use_case = refactoring)
500
-
501
- Focused handoff for changes:
502
- - Only affected modules listed
503
- - Reuse existing implementation patterns
504
- - Highlight what changed vs baseline
505
- - Update only affected prd.json sections
506
- - Progress tracker shows only delta tasks
366
+ User can skip validation and proceed directly to /ralph-loop, but validation is strongly recommended to catch issues early.
507
367
 
508
368
  ---
509
369
 
510
- ## TROUBLESHOOTING
511
-
512
- | Issue | Resolution |
513
- |-------|-----------|
514
- | All modules missing handoff data | Return to step-05a-handoff.md. Handoff MUST be written to each module feature.json. |
515
- | prd.json generation failed | Verify ss derive-prd command is installed and feature.json path is correct. |
516
- | progress.txt incomplete | Ensure all 5 CORE SeedData entries are present per module. Check topological order. |
517
- | BA manifest not found | Create docs/business/index.json if missing. Use schema provided in section 3. |
518
- | Manifest entries incorrect | Verify appCode, moduleCode, and version match feature.json metadata exactly. |
519
- | ba-interactive.html is too small (< 100KB) | FEATURE_DATA not serialized correctly. Verify JSON structure. Re-run FEATURE_DATA build. |
520
- | moduleSpecs missing from HTML | FEATURE_DATA.moduleSpecs is empty or not included in JSON. Verify each module is iterated and populated. |
521
- | Scope keys still show "mustHave" instead of "vital" | Conversion from feature.json keys to HTML keys failed. Check cadrage.scope conversion logic. |
522
- | Wireframes array is empty | Verify each module has specification.uiWireframes. If missing, add wireframe stubs. |
523
- | dependencyGraph missing | Verify master feature.json has consolidation.dependencyGraph. If missing, create empty nodes/edges arrays. |
524
- | HTML opens but data blank (localStorage issue) | Clear browser localStorage. HTML will load pre-populated FEATURE_DATA on first load. |
525
- | Export/re-import fails | Verify exported JSON matches original feature.json schema. Validate with `/business-analyse -x --validate`. |
370
+ ## MODE SUPPORT & TROUBLESHOOTING
371
+
372
+ See [references/deploy-modes.md](../references/deploy-modes.md) for:
373
+ - **Standard Mode** — full handoff (all 7 categories, complete mapping)
374
+ - **Micro Mode** simplified CRUD (3 core SeedData, lightweight)
375
+ - **Delta Mode** refactoring focus (affected modules only)
376
+ - **Troubleshooting** 12 common issues with resolutions