@atlashub/smartstack-cli 2.6.2 → 2.7.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.
- package/.documentation/agents.html +1 -1
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +749 -1419
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/commands.html +1 -1
- package/.documentation/css/styles.css +160 -0
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +3 -453
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +177 -68
- package/.documentation/init.html +747 -290
- package/.documentation/installation.html +63 -8
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/dist/index.js +588 -339
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +23 -0
- package/templates/agents/ba-writer.md +63 -4
- package/templates/skills/business-analyse/questionnaire/00-application.md +1 -1
- package/templates/skills/business-analyse/questionnaire/03-scope.md +2 -2
- package/templates/skills/business-analyse/questionnaire.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +88 -1
- package/templates/skills/business-analyse/schemas/application-schema.json +16 -1
- package/templates/skills/business-analyse/schemas/feature-schema.json +19 -986
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +157 -0
- package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +82 -0
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +80 -0
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +69 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +445 -0
- package/templates/skills/business-analyse/schemas/sections/validation-schema.json +93 -0
- package/templates/skills/business-analyse/schemas/shared/common-defs.json +133 -0
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +22 -3
- package/templates/skills/business-analyse/steps/step-03-specify.md +129 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +38 -5
- package/templates/skills/business-analyse/steps/step-05-handoff.md +94 -218
|
@@ -545,202 +545,42 @@ Total endpoints = count of specification.apiEndpoints[] across all modules.
|
|
|
545
545
|
|
|
546
546
|
---
|
|
547
547
|
|
|
548
|
-
### 7. Generate prd.json
|
|
548
|
+
### 7. Generate prd.json (PROGRAMMATIC)
|
|
549
549
|
|
|
550
|
-
> **
|
|
550
|
+
> **RULE:** prd.json is extracted by CLI code, **NEVER** generated by LLM.
|
|
551
|
+
> The `ss derive-prd` command performs a deterministic data transformation from feature.json.
|
|
551
552
|
|
|
552
|
-
**For
|
|
553
|
+
**For each module:**
|
|
553
554
|
|
|
554
555
|
```
|
|
555
|
-
|
|
556
|
-
header: "Structure PRD"
|
|
557
|
-
options:
|
|
558
|
-
- label: "Un par module (Recommandé)"
|
|
559
|
-
description: "Chaque module a son propre prd.json (.ralph/prd-{module}.json). Plus facile à suivre individuellement."
|
|
560
|
-
- label: "Consolidé"
|
|
561
|
-
description: "Un seul prd.json (.ralph/prd.json) avec tous les modules. Vue d'ensemble unique."
|
|
556
|
+
Execute: ss derive-prd --feature {moduleFeaturePath} --output .ralph/prd-{moduleCode}.json
|
|
562
557
|
```
|
|
563
558
|
|
|
564
|
-
**For
|
|
559
|
+
**For consolidated view (multi-module, optional):**
|
|
565
560
|
|
|
566
|
-
|
|
561
|
+
```
|
|
562
|
+
Execute: ss derive-prd --application {masterFeaturePath}
|
|
563
|
+
→ Generates .ralph/prd-{moduleCode}.json for each module
|
|
564
|
+
```
|
|
567
565
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
"title": "Product Requirements Document - {application} {module}",
|
|
580
|
-
"status": "handed-off",
|
|
581
|
-
"createdBy": "business-analyse skill v4.0",
|
|
582
|
-
"createdAt": "2026-02-02T14:30:00Z"
|
|
583
|
-
},
|
|
584
|
-
"project": {
|
|
585
|
-
"name": "...",
|
|
586
|
-
"application": "...",
|
|
587
|
-
"module": "... (or omit for consolidated)",
|
|
588
|
-
"namespace": "From .smartstack/config.json.baseNamespace"
|
|
589
|
-
},
|
|
590
|
-
"overview": {
|
|
591
|
-
"summary": "From feature.json.specification.overview.summary",
|
|
592
|
-
"businessGoals": ["Goal 1", "Goal 2"],
|
|
593
|
-
"stakeholders": ["Stakeholder 1"],
|
|
594
|
-
"constraints": "From feature.json.specification.overview.constraints"
|
|
595
|
-
},
|
|
596
|
-
"requirements": {
|
|
597
|
-
"functional": {
|
|
598
|
-
"useCases": [
|
|
599
|
-
{
|
|
600
|
-
"id": "UC-001",
|
|
601
|
-
"title": "...",
|
|
602
|
-
"description": "...",
|
|
603
|
-
"actors": ["..."],
|
|
604
|
-
"steps": "...step 1, step 2...",
|
|
605
|
-
"postconditions": "..."
|
|
606
|
-
}
|
|
607
|
-
],
|
|
608
|
-
"features": [
|
|
609
|
-
{
|
|
610
|
-
"id": "FR-001",
|
|
611
|
-
"title": "...",
|
|
612
|
-
"description": "...",
|
|
613
|
-
"priority": "must | should | could",
|
|
614
|
-
"linkedUCs": ["UC-001"]
|
|
615
|
-
}
|
|
616
|
-
]
|
|
617
|
-
},
|
|
618
|
-
"nonFunctional": {
|
|
619
|
-
"performance": "...",
|
|
620
|
-
"security": "...",
|
|
621
|
-
"scalability": "...",
|
|
622
|
-
"usability": "..."
|
|
623
|
-
}
|
|
624
|
-
},
|
|
625
|
-
"businessRules": [
|
|
626
|
-
{
|
|
627
|
-
"id": "BR-VAL-001",
|
|
628
|
-
"title": "...",
|
|
629
|
-
"description": "...",
|
|
630
|
-
"type": "validation | constraint | calculation | security",
|
|
631
|
-
"severity": "critical | high | medium | low",
|
|
632
|
-
"implementedIn": ["Domain.Order", "API.OrdersController"]
|
|
633
|
-
}
|
|
634
|
-
],
|
|
635
|
-
"architecture": {
|
|
636
|
-
"entities": [
|
|
637
|
-
{
|
|
638
|
-
"name": "...",
|
|
639
|
-
"description": "...",
|
|
640
|
-
"properties": ["prop1: string", "prop2: int"],
|
|
641
|
-
"relationships": ["Order → Customer", "Order → OrderItems"],
|
|
642
|
-
"linkedFR": "FR-001"
|
|
643
|
-
}
|
|
644
|
-
],
|
|
645
|
-
"apiEndpoints": [
|
|
646
|
-
{
|
|
647
|
-
"method": "GET",
|
|
648
|
-
"route": "/api/business/orders",
|
|
649
|
-
"operation": "ListOrders",
|
|
650
|
-
"permissions": ["business.orders.read"],
|
|
651
|
-
"linkedUC": "UC-001"
|
|
652
|
-
}
|
|
653
|
-
],
|
|
654
|
-
"permissionMatrix": [
|
|
655
|
-
{
|
|
656
|
-
"role": "OrderManager",
|
|
657
|
-
"permissions": ["business.orders.read", "business.orders.create"],
|
|
658
|
-
"description": "Can view and create orders"
|
|
659
|
-
}
|
|
660
|
-
],
|
|
661
|
-
"dataModels": "From specification.dataModels"
|
|
662
|
-
},
|
|
663
|
-
"implementation": {
|
|
664
|
-
"strategy": "module-by-module | layer-by-layer | hybrid",
|
|
665
|
-
"moduleOrder": ["Module1", "Module2", "Module3"],
|
|
666
|
-
"dependencyOrder": "Topologically ordered based on feature.json.modules[].dependencies",
|
|
667
|
-
"taskBreakdown": {
|
|
668
|
-
"domain": "X tasks across entities, value objects, domain logic",
|
|
669
|
-
"application": "Y tasks across services, DTOs, validators",
|
|
670
|
-
"infrastructure": "Z tasks across repositories, persistence",
|
|
671
|
-
"api": "A tasks across controllers, error handling",
|
|
672
|
-
"frontend": "B tasks across pages, components, hooks (each with linkedWireframes)",
|
|
673
|
-
"seedData": "5 CORE + C business seed data tasks",
|
|
674
|
-
"tests": "D unit + E integration + F security tests",
|
|
675
|
-
"i18n": "G i18n key implementations"
|
|
676
|
-
},
|
|
677
|
-
"totalTasks": "X + Y + Z + A + B + (5 + C) + (D + E + F) + G",
|
|
678
|
-
"fileMapping": "See handoff.filesToCreate structured object"
|
|
679
|
-
},
|
|
680
|
-
"testing": {
|
|
681
|
-
"unitTests": [
|
|
682
|
-
{
|
|
683
|
-
"component": "Domain.Order",
|
|
684
|
-
"scenarios": ["Valid order creation", "Invalid total rejection"],
|
|
685
|
-
"coverage": "95%"
|
|
686
|
-
}
|
|
687
|
-
],
|
|
688
|
-
"integrationTests": [
|
|
689
|
-
{
|
|
690
|
-
"endpoint": "POST /api/business/orders",
|
|
691
|
-
"scenarios": ["Happy path", "Validation failure", "Authorization failure"],
|
|
692
|
-
"coverage": "90%"
|
|
693
|
-
}
|
|
694
|
-
],
|
|
695
|
-
"e2eTests": [
|
|
696
|
-
{
|
|
697
|
-
"userFlow": "Create Order → View Details → Update Status",
|
|
698
|
-
"coverage": "End-to-end"
|
|
699
|
-
}
|
|
700
|
-
],
|
|
701
|
-
"testStrategy": "From specification.testing"
|
|
702
|
-
},
|
|
703
|
-
"i18n": {
|
|
704
|
-
"keys": [
|
|
705
|
-
{
|
|
706
|
-
"key": "orders.list.title",
|
|
707
|
-
"defaultValue": "Orders",
|
|
708
|
-
"usedIn": ["OrdersPage.tsx"],
|
|
709
|
-
"linkedUC": "UC-001"
|
|
710
|
-
}
|
|
711
|
-
],
|
|
712
|
-
"locales": ["fr", "en", "it", "de"],
|
|
713
|
-
"translationStatus": "From specification.i18n.locales"
|
|
714
|
-
},
|
|
715
|
-
"seedData": {
|
|
716
|
-
"core": {
|
|
717
|
-
"navigationModules": "Module navigation structure",
|
|
718
|
-
"permissions": "Role-based permissions",
|
|
719
|
-
"roles": "Predefined roles",
|
|
720
|
-
"tenants": "Test tenants",
|
|
721
|
-
"users": "Test users"
|
|
722
|
-
},
|
|
723
|
-
"business": [
|
|
724
|
-
{
|
|
725
|
-
"entity": "OrderStatus",
|
|
726
|
-
"samples": ["Pending", "Confirmed", "Shipped", "Delivered"],
|
|
727
|
-
"source": "specification.seedDataBusiness"
|
|
728
|
-
}
|
|
729
|
-
]
|
|
730
|
-
},
|
|
731
|
-
"risks": "From feature.json.risks (if present)",
|
|
732
|
-
"schedule": "Estimated based on complexity and strategy"
|
|
733
|
-
}
|
|
734
|
-
}
|
|
566
|
+
**Verification:** After execution, read the generated prd.json and display summary:
|
|
567
|
+
|
|
568
|
+
```
|
|
569
|
+
prd.json generated for module {moduleCode}:
|
|
570
|
+
- Use cases: {count}
|
|
571
|
+
- Functional requirements: {count}
|
|
572
|
+
- Business rules: {count}
|
|
573
|
+
- API endpoints: {count}
|
|
574
|
+
- Sections: {count}
|
|
575
|
+
- Files to create: {count}
|
|
576
|
+
- BR-to-code mappings: {count}
|
|
735
577
|
```
|
|
736
578
|
|
|
737
|
-
**Key
|
|
738
|
-
- Source MUST reference feature.json (traceability)
|
|
739
|
-
- All
|
|
740
|
-
-
|
|
741
|
-
-
|
|
742
|
-
- Task breakdown based on filesToCreate count
|
|
743
|
-
- Everything is **derived**, not invented
|
|
579
|
+
**Key guarantees:**
|
|
580
|
+
- Source MUST reference feature.json path (traceability)
|
|
581
|
+
- All data is EXACT COPY from feature.json (no transformation, no invention)
|
|
582
|
+
- prd.json version: "2.0.0"
|
|
583
|
+
- source.type: "ba-handoff-programmatic"
|
|
744
584
|
|
|
745
585
|
---
|
|
746
586
|
|
|
@@ -913,9 +753,54 @@ COLORS:
|
|
|
913
753
|
|
|
914
754
|
### 9. Write Handoff to Feature.json
|
|
915
755
|
|
|
916
|
-
|
|
756
|
+
> **BLOCKING RULE: The handoff MUST be written in EACH module feature.json.**
|
|
757
|
+
> A handoff at master level alone is INSUFFICIENT. Ralph-loop consumes module-level handoffs.
|
|
758
|
+
> An empty module handoff (`"handoff": {}`) is a CRITICAL BUG that blocks all downstream generation.
|
|
759
|
+
|
|
760
|
+
#### 9a. Module Handoff Loop (MANDATORY)
|
|
761
|
+
|
|
762
|
+
**For i = 0; i < modules.length; i++:**
|
|
763
|
+
|
|
764
|
+
```
|
|
765
|
+
1. moduleCode = modules[i].code
|
|
766
|
+
2. moduleFeatureId = modules[i].featureJsonPath or find via ba-reader.findFeature()
|
|
767
|
+
3. Read the module feature.json via ba-reader.findFeature(moduleFeatureId)
|
|
768
|
+
4. Build the handoff payload for THIS module:
|
|
769
|
+
- complexity (from step 3 calculation)
|
|
770
|
+
- filesToCreate (full 7-category structure from step 4, filtered for this module)
|
|
771
|
+
- brToCodeMapping (from step 5, filtered for this module)
|
|
772
|
+
- apiEndpointSummary (from step 6, filtered for this module)
|
|
773
|
+
- prdFile path
|
|
774
|
+
- totalFiles count
|
|
775
|
+
- totalTasks count
|
|
776
|
+
- handedOffAt timestamp
|
|
777
|
+
|
|
778
|
+
5. Write via ba-writer:
|
|
779
|
+
ba-writer.enrichModuleHandoff({
|
|
780
|
+
moduleFeatureId: {moduleFeatureId},
|
|
781
|
+
handoffData: {
|
|
782
|
+
complexity: "{simple|medium|complex}",
|
|
783
|
+
filesToCreate: {...},
|
|
784
|
+
brToCodeMapping: [...],
|
|
785
|
+
apiEndpointSummary: [...],
|
|
786
|
+
prdFile: ".ralph/prd-{moduleCode}.json",
|
|
787
|
+
totalFiles: {count},
|
|
788
|
+
totalTasks: {count},
|
|
789
|
+
handedOffAt: "{ISO timestamp}"
|
|
790
|
+
}
|
|
791
|
+
})
|
|
792
|
+
|
|
793
|
+
6. VERIFICATION (MANDATORY - done automatically by enrichModuleHandoff):
|
|
794
|
+
- handoff !== {}
|
|
795
|
+
- handoff.filesToCreate has 7 categories
|
|
796
|
+
- handoff.brToCodeMapping.length > 0
|
|
797
|
+
IF verification fails → STOP, report error, do NOT continue
|
|
798
|
+
|
|
799
|
+
7. Display progress:
|
|
800
|
+
"✓ Handoff module {i+1}/{N} : {moduleCode} ({fileCount} fichiers, {brCount} BRs mappées)"
|
|
801
|
+
```
|
|
917
802
|
|
|
918
|
-
|
|
803
|
+
#### 9b. Master Handoff (after ALL modules written successfully)
|
|
919
804
|
|
|
920
805
|
```
|
|
921
806
|
ba-writer.enrichSection({
|
|
@@ -927,46 +812,37 @@ ba-writer.enrichSection({
|
|
|
927
812
|
implementationStrategy: "{strategy}",
|
|
928
813
|
moduleCount: {count},
|
|
929
814
|
moduleOrder: [...],
|
|
930
|
-
totalFilesToCreate: {
|
|
931
|
-
totalTasks: {
|
|
815
|
+
totalFilesToCreate: {sum across all modules},
|
|
816
|
+
totalTasks: {sum across all modules},
|
|
932
817
|
prdStructure: "per-module | consolidated",
|
|
933
818
|
prdFiles: [
|
|
934
|
-
{ module: "
|
|
935
|
-
{ module: "
|
|
819
|
+
{ module: "{module1}", path: ".ralph/prd-{module1}.json" },
|
|
820
|
+
{ module: "{module2}", path: ".ralph/prd-{module2}.json" }
|
|
936
821
|
],
|
|
937
822
|
progressTrackerPath: ".ralph/progress.txt",
|
|
938
|
-
handedOffAt: "
|
|
823
|
+
handedOffAt: "{ISO timestamp}"
|
|
939
824
|
}
|
|
940
825
|
})
|
|
941
826
|
```
|
|
942
827
|
|
|
943
|
-
|
|
828
|
+
#### 9c. Final Verification (BLOCKING)
|
|
944
829
|
|
|
945
830
|
```
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
```
|
|
962
|
-
|
|
963
|
-
**Update status:**
|
|
964
|
-
|
|
965
|
-
```
|
|
966
|
-
ba-writer.updateStatus({
|
|
967
|
-
featureId: {feature_id},
|
|
968
|
-
status: "handed-off"
|
|
969
|
-
})
|
|
831
|
+
count = 0
|
|
832
|
+
FOR each module in modules[]:
|
|
833
|
+
Read module feature.json
|
|
834
|
+
IF module.handoff !== {} AND module.status === "handed-off":
|
|
835
|
+
count++
|
|
836
|
+
|
|
837
|
+
IF count < modules.length:
|
|
838
|
+
→ BLOCKING ERROR: {modules.length - count} modules missing handoff
|
|
839
|
+
→ List the missing modules by name
|
|
840
|
+
→ DO NOT proceed to step 10
|
|
841
|
+
→ Return to 9a for missing modules only
|
|
842
|
+
|
|
843
|
+
IF count === modules.length:
|
|
844
|
+
ba-writer.updateStatus({feature_id}, "handed-off")
|
|
845
|
+
Display: "✓ Handoff complet: {count}/{modules.length} modules avec handoff valide"
|
|
970
846
|
```
|
|
971
847
|
|
|
972
848
|
Status journey: analyze → consolidate → **handed-off**
|