@atlashub/smartstack-cli 2.2.0 → 2.4.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/business-analyse.html +1503 -1058
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/init.html +1 -1
- package/.documentation/installation.html +1 -1
- package/dist/index.js +76 -47
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/templates/agents/ba-reader.md +114 -9
- package/templates/agents/ba-writer.md +108 -27
- package/templates/agents/mcp-healthcheck.md +1 -1
- package/templates/ralph/README.md +1 -1
- package/templates/ralph/ralph.config.yaml +1 -1
- package/templates/skills/_shared.md +60 -0
- package/templates/skills/application/steps/step-00-init.md +32 -8
- package/templates/skills/business-analyse/SKILL.md +65 -42
- package/templates/skills/business-analyse/_shared.md +161 -51
- package/templates/skills/business-analyse/questionnaire/00-application.md +166 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +7 -7
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +63 -19
- package/templates/skills/business-analyse/react/application-viewer.md +242 -0
- package/templates/skills/business-analyse/react/components.md +60 -8
- package/templates/skills/business-analyse/react/schema.md +413 -34
- package/templates/skills/business-analyse/schemas/application-schema.json +389 -0
- package/templates/skills/business-analyse/schemas/feature-schema.json +287 -46
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -44
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +259 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +282 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +489 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +336 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +1119 -0
- package/templates/skills/business-analyse/templates/tpl-handoff.md +11 -2
- package/templates/skills/mcp/SKILL.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-analyse.md +0 -505
- package/templates/skills/business-analyse/steps/step-02-specify.md +0 -833
- package/templates/skills/business-analyse/steps/step-03-validate.md +0 -862
- package/templates/skills/business-analyse/steps/step-04-handoff.md +0 -1593
|
@@ -18,9 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"status": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"enum": ["draft", "analysed", "specified", "approved", "handed-off"],
|
|
21
|
+
"enum": ["draft", "framed", "analysed", "specified", "approved", "consolidated", "handed-off"],
|
|
22
22
|
"description": "Current lifecycle status, enriched by each step"
|
|
23
23
|
},
|
|
24
|
+
"scope": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["application", "module"],
|
|
27
|
+
"default": "module",
|
|
28
|
+
"description": "Scope of this feature.json: application (master) or module (detailed)"
|
|
29
|
+
},
|
|
24
30
|
|
|
25
31
|
"metadata": {
|
|
26
32
|
"type": "object",
|
|
@@ -57,12 +63,35 @@
|
|
|
57
63
|
},
|
|
58
64
|
"mcpAvailable": { "type": "boolean" },
|
|
59
65
|
"economyMode": { "type": "boolean" },
|
|
66
|
+
"scope": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": ["application", "module"],
|
|
69
|
+
"default": "module",
|
|
70
|
+
"description": "Explicitly marks this as module-scope"
|
|
71
|
+
},
|
|
72
|
+
"applicationRef": {
|
|
73
|
+
"type": ["string", "null"],
|
|
74
|
+
"description": "Reference to parent application feature ID (FEAT-XXX) when part of multi-module analysis"
|
|
75
|
+
},
|
|
76
|
+
"applicationPath": {
|
|
77
|
+
"type": ["string", "null"],
|
|
78
|
+
"description": "Path to the parent application-level feature.json"
|
|
79
|
+
},
|
|
80
|
+
"moduleIndex": {
|
|
81
|
+
"type": ["integer", "null"],
|
|
82
|
+
"description": "Position in topological order within the application (0-based)"
|
|
83
|
+
},
|
|
84
|
+
"inheritsRoles": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"default": false,
|
|
87
|
+
"description": "Whether roles are inherited from application-level (true for multi-module)"
|
|
88
|
+
},
|
|
60
89
|
"steps": {
|
|
61
90
|
"type": "object",
|
|
62
91
|
"description": "Progress tracking per step",
|
|
63
92
|
"properties": {
|
|
64
93
|
"init": { "$ref": "#/$defs/stepStatus" },
|
|
65
|
-
"
|
|
94
|
+
"cadrage": { "$ref": "#/$defs/stepStatus" },
|
|
66
95
|
"specify": { "$ref": "#/$defs/stepStatus" },
|
|
67
96
|
"validate": { "$ref": "#/$defs/stepStatus" },
|
|
68
97
|
"handoff": { "$ref": "#/$defs/stepStatus" }
|
|
@@ -71,6 +100,35 @@
|
|
|
71
100
|
}
|
|
72
101
|
},
|
|
73
102
|
|
|
103
|
+
"applicationContext": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"description": "Inherited from parent application feature.json when part of multi-module analysis",
|
|
106
|
+
"properties": {
|
|
107
|
+
"applicationRoles": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"description": "Copied from master feature.json for reference",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"role": { "type": "string" },
|
|
114
|
+
"description": { "type": "string" },
|
|
115
|
+
"level": { "type": "string", "enum": ["admin", "manager", "contributor", "viewer"] },
|
|
116
|
+
"permissionPattern": { "type": "string" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"permissionBase": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Application-level permission base (e.g., business.sales)"
|
|
123
|
+
},
|
|
124
|
+
"relatedModules": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": { "type": "string" },
|
|
127
|
+
"description": "Other modules in the same application"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
74
132
|
"discovery": {
|
|
75
133
|
"type": "object",
|
|
76
134
|
"description": "Enriched by step-01-analyse (discovery part)",
|
|
@@ -227,7 +285,7 @@
|
|
|
227
285
|
"required": ["target", "type"],
|
|
228
286
|
"properties": {
|
|
229
287
|
"target": { "type": "string" },
|
|
230
|
-
"type": { "type": "string", "enum": ["1:1", "1:N", "N:M"] },
|
|
288
|
+
"type": { "type": "string", "enum": ["1:1", "1:N", "N:1", "N:M"] },
|
|
231
289
|
"description": { "type": "string" }
|
|
232
290
|
}
|
|
233
291
|
}
|
|
@@ -518,7 +576,132 @@
|
|
|
518
576
|
"description": { "type": "string" },
|
|
519
577
|
"elements": { "type": "array", "items": { "type": "string" } },
|
|
520
578
|
"actions": { "type": "array", "items": { "type": "string" } },
|
|
521
|
-
"permissionsRequired": { "type": "array", "items": { "type": "string" } }
|
|
579
|
+
"permissionsRequired": { "type": "array", "items": { "type": "string" } },
|
|
580
|
+
"mockupFormat": {
|
|
581
|
+
"type": "string",
|
|
582
|
+
"enum": ["ascii", "svg"],
|
|
583
|
+
"description": "Format of the mockup: ascii (rendered in <pre>) or svg (rendered as inline SVG)"
|
|
584
|
+
},
|
|
585
|
+
"mockup": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"description": "ASCII art or SVG markup of the wireframe"
|
|
588
|
+
},
|
|
589
|
+
"section": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"description": "Navigation section this wireframe belongs to (e.g., list, detail, create)"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
"messages": {
|
|
597
|
+
"type": "array",
|
|
598
|
+
"description": "Business messages (success, error, warning, info) with i18n keys. MANDATORY: ≥4 messages.",
|
|
599
|
+
"items": {
|
|
600
|
+
"type": "object",
|
|
601
|
+
"required": ["code", "type", "i18nKey"],
|
|
602
|
+
"properties": {
|
|
603
|
+
"code": { "type": "string", "description": "SCREAMING_SNAKE_CASE identifier (e.g., VEHICLE_CREATED_SUCCESS)" },
|
|
604
|
+
"type": { "type": "string", "enum": ["success", "error", "warning", "info"] },
|
|
605
|
+
"title": { "type": "string" },
|
|
606
|
+
"message": { "type": "string", "description": "User-facing message with {placeholders}" },
|
|
607
|
+
"i18nKey": { "type": "string", "description": "Dot-separated i18n key (e.g., freebike.messages.vehicleCreated)" }
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
"lifeCycles": {
|
|
612
|
+
"type": "array",
|
|
613
|
+
"description": "Per-entity state machines for entities with Status fields. MANDATORY: ≥1 entity.",
|
|
614
|
+
"items": {
|
|
615
|
+
"type": "object",
|
|
616
|
+
"required": ["entity", "states"],
|
|
617
|
+
"properties": {
|
|
618
|
+
"entity": { "type": "string", "description": "PascalCase entity name" },
|
|
619
|
+
"states": {
|
|
620
|
+
"type": "array",
|
|
621
|
+
"items": {
|
|
622
|
+
"type": "object",
|
|
623
|
+
"required": ["id", "allowedTransitions"],
|
|
624
|
+
"properties": {
|
|
625
|
+
"id": { "type": "string", "description": "State code (e.g., Draft, Active, Completed)" },
|
|
626
|
+
"displayName": { "type": "string" },
|
|
627
|
+
"description": { "type": "string" },
|
|
628
|
+
"allowedTransitions": { "type": "array", "items": { "type": "string" } },
|
|
629
|
+
"isTerminal": { "type": "boolean", "default": false }
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
"seedDataCore": {
|
|
637
|
+
"type": "object",
|
|
638
|
+
"description": "5 mandatory SmartStack core SeedData definitions derived from navigation + permissionMatrix. CRITICAL: without these, module is invisible (403).",
|
|
639
|
+
"properties": {
|
|
640
|
+
"navigationModules": {
|
|
641
|
+
"type": "array",
|
|
642
|
+
"description": "Entries for nav_Modules table (HasData). Derived from navigation.entries.",
|
|
643
|
+
"items": {
|
|
644
|
+
"type": "object",
|
|
645
|
+
"required": ["code", "label", "icon", "route"],
|
|
646
|
+
"properties": {
|
|
647
|
+
"code": { "type": "string" },
|
|
648
|
+
"label": { "type": "string" },
|
|
649
|
+
"icon": { "type": "string" },
|
|
650
|
+
"route": { "type": "string" },
|
|
651
|
+
"parentCode": { "type": ["string", "null"] },
|
|
652
|
+
"sort": { "type": "integer" }
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"navigationTranslations": {
|
|
657
|
+
"type": "array",
|
|
658
|
+
"description": "Translations for nav_Translations table (HasData). One entry per module per language.",
|
|
659
|
+
"items": {
|
|
660
|
+
"type": "object",
|
|
661
|
+
"required": ["moduleCode", "language", "label"],
|
|
662
|
+
"properties": {
|
|
663
|
+
"moduleCode": { "type": "string" },
|
|
664
|
+
"language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
|
|
665
|
+
"label": { "type": "string" }
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"permissions": {
|
|
670
|
+
"type": "array",
|
|
671
|
+
"description": "Entries for nav_Permissions table (HasData). Full paths from permissionMatrix.permissions.",
|
|
672
|
+
"items": {
|
|
673
|
+
"type": "object",
|
|
674
|
+
"required": ["path", "action"],
|
|
675
|
+
"properties": {
|
|
676
|
+
"path": { "type": "string", "description": "Full permission path (business.{app}.{module}.{resource}.{action})" },
|
|
677
|
+
"action": { "type": "string" },
|
|
678
|
+
"description": { "type": "string" }
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
"rolePermissions": {
|
|
683
|
+
"type": "array",
|
|
684
|
+
"description": "Entries for auth_RolePermissions table (HasData). Derived from permissionMatrix.roleAssignments.",
|
|
685
|
+
"items": {
|
|
686
|
+
"type": "object",
|
|
687
|
+
"required": ["role", "permissionPath"],
|
|
688
|
+
"properties": {
|
|
689
|
+
"role": { "type": "string" },
|
|
690
|
+
"permissionPath": { "type": "string", "description": "Full permission path (must match permissions[].path)" }
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"permissionConstants": {
|
|
695
|
+
"type": "array",
|
|
696
|
+
"description": "Compile-time constants for Permissions.cs (Application layer). Used in [RequirePermission] attributes.",
|
|
697
|
+
"items": {
|
|
698
|
+
"type": "object",
|
|
699
|
+
"required": ["constantName", "path"],
|
|
700
|
+
"properties": {
|
|
701
|
+
"constantName": { "type": "string", "description": "PascalCase constant (e.g., VehiclesRead)" },
|
|
702
|
+
"path": { "type": "string", "description": "Matching permission path" }
|
|
703
|
+
}
|
|
704
|
+
}
|
|
522
705
|
}
|
|
523
706
|
}
|
|
524
707
|
}
|
|
@@ -529,53 +712,74 @@
|
|
|
529
712
|
"type": "object",
|
|
530
713
|
"description": "Enriched by step-03-validate",
|
|
531
714
|
"properties": {
|
|
532
|
-
"decision": { "type": "string", "enum": ["approved", "rejected", "pending"] },
|
|
533
715
|
"validatedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
534
|
-
"
|
|
535
|
-
"type": "
|
|
536
|
-
"
|
|
537
|
-
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
716
|
+
"completenessChecks": {
|
|
717
|
+
"type": "array",
|
|
718
|
+
"description": "Per-section completeness verification",
|
|
719
|
+
"items": {
|
|
720
|
+
"type": "object",
|
|
721
|
+
"properties": {
|
|
722
|
+
"section": { "type": "string" },
|
|
723
|
+
"count": { "type": "integer" },
|
|
724
|
+
"minimum": { "type": "integer" },
|
|
725
|
+
"status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] }
|
|
726
|
+
}
|
|
543
727
|
}
|
|
544
728
|
},
|
|
545
|
-
"
|
|
546
|
-
"type": "
|
|
547
|
-
"description": "Cross-reference
|
|
548
|
-
"
|
|
549
|
-
"
|
|
550
|
-
"
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
729
|
+
"consistencyChecks": {
|
|
730
|
+
"type": "array",
|
|
731
|
+
"description": "Cross-reference consistency checks (UC↔FR, FR↔BR, Actor↔Matrix, etc.)",
|
|
732
|
+
"items": {
|
|
733
|
+
"type": "object",
|
|
734
|
+
"properties": {
|
|
735
|
+
"check": { "type": "string" },
|
|
736
|
+
"passed": { "type": "integer" },
|
|
737
|
+
"warnings": { "type": "integer" },
|
|
738
|
+
"errors": { "type": "integer" },
|
|
739
|
+
"status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] }
|
|
740
|
+
}
|
|
554
741
|
}
|
|
555
742
|
},
|
|
556
|
-
"
|
|
557
|
-
"type": "
|
|
558
|
-
"description": "SmartStack convention validation",
|
|
559
|
-
"
|
|
560
|
-
"
|
|
561
|
-
"
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
743
|
+
"conventionChecks": {
|
|
744
|
+
"type": "array",
|
|
745
|
+
"description": "SmartStack convention validation (naming, permissions, routes, etc.)",
|
|
746
|
+
"items": {
|
|
747
|
+
"type": "object",
|
|
748
|
+
"properties": {
|
|
749
|
+
"check": { "type": "string" },
|
|
750
|
+
"status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] },
|
|
751
|
+
"details": { "type": "string" }
|
|
752
|
+
}
|
|
566
753
|
}
|
|
567
754
|
},
|
|
568
|
-
"
|
|
755
|
+
"riskAssessments": {
|
|
569
756
|
"type": "array",
|
|
757
|
+
"description": "Scope and complexity risk evaluation",
|
|
570
758
|
"items": {
|
|
571
759
|
"type": "object",
|
|
572
760
|
"properties": {
|
|
573
|
-
"
|
|
574
|
-
"
|
|
575
|
-
"
|
|
576
|
-
"
|
|
761
|
+
"risk": { "type": "string" },
|
|
762
|
+
"value": { "type": "integer" },
|
|
763
|
+
"threshold": { "type": "integer" },
|
|
764
|
+
"status": { "type": "string", "enum": ["ACCEPTABLE", "WARNING", "CRITICAL", "MONITORED"] }
|
|
577
765
|
}
|
|
578
766
|
}
|
|
767
|
+
},
|
|
768
|
+
"warnings": {
|
|
769
|
+
"type": "array",
|
|
770
|
+
"description": "Non-blocking warnings and observations",
|
|
771
|
+
"items": { "type": "string" }
|
|
772
|
+
},
|
|
773
|
+
"decision": {
|
|
774
|
+
"type": "object",
|
|
775
|
+
"description": "Final approval decision",
|
|
776
|
+
"properties": {
|
|
777
|
+
"approved": { "type": "boolean" },
|
|
778
|
+
"reason": { "type": "string" },
|
|
779
|
+
"approvalMode": { "type": "string", "enum": ["standard", "micro", "delta", "force"] },
|
|
780
|
+
"approvedBy": { "type": "string" },
|
|
781
|
+
"approvedAt": { "type": "string", "format": "date-time" }
|
|
782
|
+
}
|
|
579
783
|
}
|
|
580
784
|
}
|
|
581
785
|
},
|
|
@@ -599,12 +803,40 @@
|
|
|
599
803
|
},
|
|
600
804
|
"brToCodeMapping": {
|
|
601
805
|
"type": "array",
|
|
806
|
+
"description": "Maps each business rule to its implementation points across layers. Derived from analysis.businessRules[].",
|
|
807
|
+
"items": {
|
|
808
|
+
"type": "object",
|
|
809
|
+
"required": ["ruleId", "implementationPoints"],
|
|
810
|
+
"properties": {
|
|
811
|
+
"ruleId": { "type": "string", "description": "BR-XXX identifier from analysis.businessRules" },
|
|
812
|
+
"title": { "type": "string", "description": "Business rule title" },
|
|
813
|
+
"implementationPoints": {
|
|
814
|
+
"type": "array",
|
|
815
|
+
"items": {
|
|
816
|
+
"type": "object",
|
|
817
|
+
"required": ["layer", "component"],
|
|
818
|
+
"properties": {
|
|
819
|
+
"layer": { "type": "string", "description": "Architecture layer (Domain, Application, Infrastructure, API, Frontend)" },
|
|
820
|
+
"component": { "type": "string", "description": "File name (e.g., Order.cs, OrdersController.cs)" },
|
|
821
|
+
"method": { "type": "string", "description": "Method or attribute (e.g., Validate(), [Authorize])" },
|
|
822
|
+
"implementation": { "type": "string", "description": "How the rule is enforced" }
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"apiEndpointSummary": {
|
|
830
|
+
"type": "array",
|
|
831
|
+
"description": "Subset of specification.apiEndpoints enriched with linkedUC. MUST use EXACT same routes as specification.",
|
|
602
832
|
"items": {
|
|
603
833
|
"type": "object",
|
|
604
834
|
"properties": {
|
|
605
|
-
"
|
|
606
|
-
"
|
|
607
|
-
"
|
|
835
|
+
"operation": { "type": "string" },
|
|
836
|
+
"method": { "type": "string", "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"] },
|
|
837
|
+
"route": { "type": "string", "description": "MUST match specification.apiEndpoints[].path exactly" },
|
|
838
|
+
"linkedUC": { "type": "string" },
|
|
839
|
+
"permissions": { "type": "string" }
|
|
608
840
|
}
|
|
609
841
|
}
|
|
610
842
|
},
|
|
@@ -619,7 +851,7 @@
|
|
|
619
851
|
"properties": {
|
|
620
852
|
"id": { "type": "integer" },
|
|
621
853
|
"description": { "type": "string" },
|
|
622
|
-
"category": { "type": "string", "enum": ["domain", "application", "infrastructure", "api", "frontend", "i18n", "test", "validation"] },
|
|
854
|
+
"category": { "type": "string", "enum": ["domain", "seedData", "seedDataCore", "application", "infrastructure", "api", "frontend", "i18n", "test", "validation"] },
|
|
623
855
|
"dependencies": { "type": "array", "items": { "type": "integer" } },
|
|
624
856
|
"acceptanceCriteria": { "type": "string" }
|
|
625
857
|
}
|
|
@@ -654,15 +886,18 @@
|
|
|
654
886
|
|
|
655
887
|
"changelog": {
|
|
656
888
|
"type": "array",
|
|
657
|
-
"description": "Version history and change tracking",
|
|
889
|
+
"description": "Version history and change tracking. Each step adds an entry.",
|
|
658
890
|
"items": {
|
|
659
891
|
"type": "object",
|
|
660
|
-
"required": ["
|
|
892
|
+
"required": ["timestamp", "changes"],
|
|
661
893
|
"properties": {
|
|
662
|
-
"
|
|
894
|
+
"step": { "type": "string", "description": "Step identifier (e.g., step-01-analyse, step-02-specify, step-03-validate, step-04-handoff)" },
|
|
895
|
+
"version": { "type": "string", "description": "Feature version at this point" },
|
|
663
896
|
"timestamp": { "type": "string", "format": "date-time" },
|
|
664
897
|
"author": { "type": "string" },
|
|
665
|
-
"changes": { "type": "array", "items": { "type": "string" } }
|
|
898
|
+
"changes": { "type": "array", "items": { "type": "string" } },
|
|
899
|
+
"warnings": { "type": "array", "items": { "type": "string" }, "description": "Non-blocking warnings from this step" },
|
|
900
|
+
"decision": { "type": "string", "description": "Step decision outcome (e.g., approved, rejected)" }
|
|
666
901
|
}
|
|
667
902
|
}
|
|
668
903
|
}
|
|
@@ -679,8 +914,14 @@
|
|
|
679
914
|
},
|
|
680
915
|
"fileSpec": {
|
|
681
916
|
"type": "object",
|
|
917
|
+
"required": ["path", "type"],
|
|
682
918
|
"properties": {
|
|
683
919
|
"path": { "type": "string", "description": "Relative file path" },
|
|
920
|
+
"type": { "type": "string", "description": "File type (Entity, Service, DTO, Repository, Migration, HasData, Constants, ApiController, Page, Component, ApiClient, ReduxSlice, UnitTests, IntegrationTests, Enum)" },
|
|
921
|
+
"linkedFRs": { "type": "array", "items": { "type": "string" }, "description": "Linked functional requirement IDs (FR-XXX)" },
|
|
922
|
+
"linkedUCs": { "type": "array", "items": { "type": "string" }, "description": "Linked use case IDs (UC-XXX)" },
|
|
923
|
+
"category": { "type": "string", "enum": ["core", "business"], "description": "SeedData category: core (navigation/permissions) or business (lookup tables)" },
|
|
924
|
+
"source": { "type": "string", "description": "Source path in feature.json for derivation (e.g., specification.seedDataCore.permissions)" },
|
|
684
925
|
"description": { "type": "string" },
|
|
685
926
|
"pattern": { "type": "string", "description": "Reference pattern from existing codebase" },
|
|
686
927
|
"instructions": { "type": "string" }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-00-init
|
|
3
3
|
description: Initialize Business Analysis - Parse flags, route use case, create feature.json
|
|
4
|
-
next_step: steps/step-01-
|
|
4
|
+
next_step: steps/step-01-cadrage.md
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Step 00: Initialize Business Analysis
|
|
@@ -37,6 +37,7 @@ question_mode: false
|
|
|
37
37
|
refactor_mode: false
|
|
38
38
|
micro_mode: false
|
|
39
39
|
interactive_mode: false
|
|
40
|
+
application_mode: false # Multi-module application analysis
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
### Flag Parsing Rules
|
|
@@ -51,6 +52,7 @@ interactive_mode: false
|
|
|
51
52
|
| `-r` | `--refactor` | Refactoring mode | next arg = FEAT-ID, remaining = change description |
|
|
52
53
|
| `-m` | `--micro` | Micro feature mode | none |
|
|
53
54
|
| `-i` | `--interactive` | Interactive mode | none |
|
|
55
|
+
| `-app` | `--application` | Application mode: multi-module analysis | none |
|
|
54
56
|
|
|
55
57
|
**Remaining arguments after flag removal = feature_description**
|
|
56
58
|
|
|
@@ -135,33 +137,79 @@ ba -m "Add email notification on approval"
|
|
|
135
137
|
ba "Create order management system"
|
|
136
138
|
```
|
|
137
139
|
|
|
138
|
-
## Step
|
|
140
|
+
## Step 2B: Application Mode Detection
|
|
139
141
|
|
|
140
|
-
|
|
142
|
+
**IF `-app` flag is set:**
|
|
143
|
+
- Set `{workflow_mode}` = "application"
|
|
144
|
+
- Set `{use_case}` = "application"
|
|
141
145
|
|
|
142
|
-
**
|
|
146
|
+
**ELSE IF no explicit mode flag:**
|
|
147
|
+
- Analyze `{feature_description}` for multi-module signals:
|
|
148
|
+
- Keywords: "application", "system", "platform", "suite", "complet", "ensemble"
|
|
149
|
+
- Multiple module mentions (3+ distinct functional areas)
|
|
150
|
+
- Scope description spanning multiple domains
|
|
151
|
+
- IF multi-module signals detected:
|
|
152
|
+
```
|
|
153
|
+
AskUserQuestion:
|
|
154
|
+
question: "Votre description semble couvrir plusieurs modules. Voulez-vous une analyse multi-module (application complète) ?"
|
|
155
|
+
header: "Mode"
|
|
156
|
+
options:
|
|
157
|
+
- label: "Oui, analyse application"
|
|
158
|
+
description: "Identifier les modules, les analyser un par un avec validation client"
|
|
159
|
+
- label: "Non, module unique"
|
|
160
|
+
description: "Traiter comme un seul module"
|
|
161
|
+
```
|
|
162
|
+
- IF user confirms multi-module: Set `{workflow_mode}` = "application"
|
|
163
|
+
- ELSE: Set `{workflow_mode}` = "module"
|
|
143
164
|
|
|
144
|
-
|
|
145
|
-
|-----------|--------|
|
|
146
|
-
| File missing | Perform full health check |
|
|
147
|
-
| > 7 days old | Perform full health check |
|
|
148
|
-
| ≤ 7 days old | Quick connectivity test |
|
|
149
|
-
| Error status | Display warning, continue |
|
|
165
|
+
## Step 3: MCP Prerequisite Check (BLOCKING)
|
|
150
166
|
|
|
151
|
-
**
|
|
152
|
-
1. Call `mcp__smartstack__validate_conventions`
|
|
153
|
-
2. Verify installed version
|
|
154
|
-
3. List available tools
|
|
155
|
-
4. Update `.claude/mcp-status.json`
|
|
167
|
+
Verify MCP availability. **This check is BLOCKING** - the skill cannot proceed without MCP.
|
|
156
168
|
|
|
157
|
-
|
|
158
|
-
- Bash only, no LLM call
|
|
159
|
-
- Check if `.claude/mcp/` exists and has recent files
|
|
169
|
+
> See `_shared.md` → "MCP Prerequisite Guard (BLOCKING)" for the full pattern.
|
|
160
170
|
|
|
161
|
-
**
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
**Detection:** Call MCP with minimal parameters:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
mcp__smartstack__validate_conventions({ checks: ["tables"] })
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Decision matrix:**
|
|
178
|
+
|
|
179
|
+
| Result | Action |
|
|
180
|
+
|--------|--------|
|
|
181
|
+
| Success response | Set `mcp_available = true`, continue to Step 4 |
|
|
182
|
+
| Connection error / tool not found | **STOP EXECUTION** - display error below |
|
|
183
|
+
|
|
184
|
+
**On success:**
|
|
185
|
+
- Set `mcp_available = true`
|
|
186
|
+
- Update `.claude/mcp-status.json` cache
|
|
187
|
+
- Continue workflow
|
|
188
|
+
|
|
189
|
+
**On failure (STOP):**
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
═══════════════════════════════════════════════════════════════
|
|
193
|
+
MCP SMARTSTACK NOT AVAILABLE - SKILL BLOCKED
|
|
194
|
+
═══════════════════════════════════════════════════════════════
|
|
195
|
+
|
|
196
|
+
The SmartStack MCP server is required for business-analyse
|
|
197
|
+
but could not be reached.
|
|
198
|
+
|
|
199
|
+
To install:
|
|
200
|
+
claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp
|
|
201
|
+
|
|
202
|
+
To verify:
|
|
203
|
+
/mcp:healthcheck
|
|
204
|
+
|
|
205
|
+
After installation, restart Claude Code and retry.
|
|
206
|
+
|
|
207
|
+
═══════════════════════════════════════════════════════════════
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**DO NOT** offer fallback modes, economy mode workarounds, or degraded execution.
|
|
211
|
+
**DO NOT** continue to Step 4 or any subsequent step.
|
|
212
|
+
**STOP the skill immediately.**
|
|
165
213
|
|
|
166
214
|
## Step 4: Interactive Mode
|
|
167
215
|
|
|
@@ -301,25 +349,43 @@ docs_dir: "docs/business/{app}/{module}/business-analyse/v{version}"
|
|
|
301
349
|
output_dir: same as docs_dir
|
|
302
350
|
```
|
|
303
351
|
|
|
304
|
-
## Step 10: Create
|
|
305
|
-
|
|
306
|
-
Create the
|
|
307
|
-
|
|
308
|
-
**
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
352
|
+
## Step 10: Create Master feature.json
|
|
353
|
+
|
|
354
|
+
Create the master feature document using ba-writer agent.
|
|
355
|
+
|
|
356
|
+
**Use ba-writer agent:**
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
ba-writer.createApplicationFeature({
|
|
360
|
+
id: {feature_id},
|
|
361
|
+
version: "1.0",
|
|
362
|
+
scope: "application",
|
|
363
|
+
status: "draft",
|
|
364
|
+
metadata: {
|
|
365
|
+
application: {application_name},
|
|
366
|
+
context: "business",
|
|
367
|
+
language: {language},
|
|
368
|
+
featureDescription: {feature_description},
|
|
369
|
+
useCase: {use_case},
|
|
370
|
+
mcpAvailable: {mcp_available},
|
|
371
|
+
economyMode: {economy_mode},
|
|
372
|
+
workflow: {
|
|
373
|
+
mode: {workflow_mode},
|
|
374
|
+
moduleOrder: [],
|
|
375
|
+
currentModuleIndex: 0,
|
|
376
|
+
completedModules: [],
|
|
377
|
+
currentModule: null
|
|
378
|
+
}
|
|
379
|
+
}
|
|
320
380
|
})
|
|
321
381
|
```
|
|
322
382
|
|
|
383
|
+
**Output path:**
|
|
384
|
+
- Application mode: `docs/business/{app}/business-analyse/v1.0/feature.json`
|
|
385
|
+
- Module mode: `docs/business/{app}/business-analyse/v1.0/feature.json` (same - always create master first)
|
|
386
|
+
|
|
387
|
+
> **Note:** Even in single-module mode, we create the master feature.json. The decomposition step will trivially identify one module.
|
|
388
|
+
|
|
323
389
|
**Result structure:**
|
|
324
390
|
```json
|
|
325
391
|
{
|
|
@@ -443,18 +509,17 @@ NEXT STEP: step-01-analyse ({use_case} mode)
|
|
|
443
509
|
|
|
444
510
|
## Step 13: Load Next Step
|
|
445
511
|
|
|
446
|
-
|
|
512
|
+
**All modes except question (-q) and micro (-m):**
|
|
513
|
+
After showing initialization summary, proceed to `./step-01-cadrage.md`
|
|
447
514
|
|
|
448
|
-
**
|
|
449
|
-
|
|
450
|
-
steps/step-01-analyse.md
|
|
451
|
-
```
|
|
515
|
+
**Question mode (-q):** EXIT after ba-reader answers the question.
|
|
516
|
+
**Micro mode (-m):** Load `./step-05-handoff.md` directly.
|
|
452
517
|
|
|
453
518
|
**Pass context variables:**
|
|
454
519
|
```yaml
|
|
455
520
|
feature_id: string
|
|
456
521
|
feature_description: string
|
|
457
|
-
use_case: "new" | "question" | "refactoring" | "micro"
|
|
522
|
+
use_case: "new" | "question" | "refactoring" | "micro" | "application"
|
|
458
523
|
application_name: string
|
|
459
524
|
module_name: string
|
|
460
525
|
language: string
|
|
@@ -463,6 +528,7 @@ auto_mode: boolean
|
|
|
463
528
|
economy_mode: boolean
|
|
464
529
|
interactive_mode: boolean
|
|
465
530
|
mcp_available: boolean
|
|
531
|
+
workflow_mode: string
|
|
466
532
|
```
|
|
467
533
|
|
|
468
534
|
## Error Handling
|