@atlashub/smartstack-cli 4.18.0 → 4.19.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 (160) hide show
  1. package/package.json +1 -1
  2. package/templates/agents/ba-reader.md +86 -80
  3. package/templates/agents/ba-writer.md +318 -415
  4. package/templates/agents/docs-context-reader.md +3 -3
  5. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  6. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +126 -0
  7. package/templates/skills/apex/SKILL.md +29 -16
  8. package/templates/skills/apex/_shared.md +62 -9
  9. package/templates/skills/apex/references/analysis-methods.md +8 -6
  10. package/templates/skills/apex/references/challenge-questions.md +5 -5
  11. package/templates/skills/apex/references/core-seed-data.md +68 -45
  12. package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +26 -21
  13. package/templates/skills/apex/references/parallel-execution.md +156 -0
  14. package/templates/skills/apex/references/person-extension-pattern.md +12 -12
  15. package/templates/skills/apex/references/post-checks.md +1748 -1726
  16. package/templates/skills/apex/references/smartstack-api.md +63 -57
  17. package/templates/skills/apex/references/smartstack-frontend-compliance.md +594 -0
  18. package/templates/skills/apex/references/smartstack-frontend.md +1246 -1842
  19. package/templates/skills/apex/references/smartstack-layers.md +98 -145
  20. package/templates/skills/apex/steps/step-00-init.md +30 -6
  21. package/templates/skills/apex/steps/step-01-analyze.md +27 -23
  22. package/templates/skills/apex/steps/step-02-plan.md +12 -12
  23. package/templates/skills/apex/steps/step-03-execute.md +198 -143
  24. package/templates/skills/apex/steps/step-04-examine.md +24 -93
  25. package/templates/skills/apex/steps/step-05-deep-review.md +16 -16
  26. package/templates/skills/apex/steps/step-06-resolve.md +9 -9
  27. package/templates/skills/apex/steps/step-07-tests.md +3 -1
  28. package/templates/skills/apex/steps/step-08-run-tests.md +1 -1
  29. package/templates/skills/business-analyse/SKILL.md +182 -301
  30. package/templates/skills/business-analyse/_shared.md +119 -336
  31. package/templates/skills/business-analyse/html/ba-interactive.html +703 -82
  32. package/templates/skills/business-analyse/html/build-html.js +41 -3
  33. package/templates/skills/business-analyse/html/src/partials/cadrage-context.html +34 -0
  34. package/templates/skills/business-analyse/html/src/partials/cadrage-risks.html +48 -0
  35. package/templates/skills/business-analyse/html/src/partials/cadrage-scope.html +49 -0
  36. package/templates/skills/business-analyse/html/src/partials/cadrage-stakeholders.html +55 -0
  37. package/templates/skills/business-analyse/html/src/partials/cadrage-success.html +34 -0
  38. package/templates/skills/business-analyse/html/src/partials/consol-datamodel.html +8 -0
  39. package/templates/skills/business-analyse/html/src/partials/consol-flows.html +29 -0
  40. package/templates/skills/business-analyse/html/src/partials/consol-interactions.html +8 -0
  41. package/templates/skills/business-analyse/html/src/partials/consol-permissions.html +8 -0
  42. package/templates/skills/business-analyse/html/src/partials/decomp-dependencies.html +38 -0
  43. package/templates/skills/business-analyse/html/src/partials/decomp-modules.html +51 -0
  44. package/templates/skills/business-analyse/html/src/partials/handoff-summary.html +24 -0
  45. package/templates/skills/business-analyse/html/src/partials/module-spec-container.html +4 -0
  46. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +17 -1
  47. package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +31 -5
  48. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +100 -63
  49. package/templates/skills/business-analyse/html/src/scripts/06-render-mockups.js +372 -0
  50. package/templates/skills/business-analyse/html/src/scripts/10-comments.js +41 -13
  51. package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
  52. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
  53. package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +142 -0
  54. package/templates/skills/business-analyse/questionnaire/03-data-ui.md +94 -0
  55. package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +150 -0
  56. package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
  57. package/templates/skills/business-analyse/questionnaire.md +23 -280
  58. package/templates/skills/business-analyse/react/application-viewer.md +2 -2
  59. package/templates/skills/business-analyse/react/components.md +4 -4
  60. package/templates/skills/business-analyse/react/i18n-template.md +1 -1
  61. package/templates/skills/business-analyse/react/schema.md +14 -14
  62. package/templates/skills/business-analyse/references/acceptance-criteria.md +21 -21
  63. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +3 -3
  64. package/templates/skills/business-analyse/references/compilation-structure-cards.md +1 -1
  65. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +5 -5
  66. package/templates/skills/business-analyse/references/deploy-data-build.md +12 -11
  67. package/templates/skills/business-analyse/references/deploy-modes.md +10 -10
  68. package/templates/skills/business-analyse/references/detection-strategies.md +6 -6
  69. package/templates/skills/business-analyse/references/html-data-mapping.md +15 -15
  70. package/templates/skills/business-analyse/references/naming-conventions.md +4 -4
  71. package/templates/skills/business-analyse/references/review-data-mapping.md +29 -29
  72. package/templates/skills/business-analyse/references/robustness-checks.md +36 -36
  73. package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
  74. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  75. package/templates/skills/business-analyse/references/ui-resource-cards.md +1 -1
  76. package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
  77. package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +2 -2
  78. package/templates/skills/business-analyse/schemas/application-schema.json +8 -8
  79. package/templates/skills/business-analyse/schemas/feature-schema.json +3 -3
  80. package/templates/skills/business-analyse/schemas/index-schema.json +47 -0
  81. package/templates/skills/business-analyse/schemas/project-schema.json +6 -6
  82. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
  83. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +5 -3
  84. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +4 -4
  85. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
  86. package/templates/skills/business-analyse/schemas/shared/common-defs.json +4 -4
  87. package/templates/skills/business-analyse/steps/step-00-init.md +68 -77
  88. package/templates/skills/business-analyse/steps/step-01-cadrage.md +54 -180
  89. package/templates/skills/business-analyse/steps/step-02-structure.md +175 -0
  90. package/templates/skills/business-analyse/steps/step-03-specify.md +198 -0
  91. package/templates/skills/business-analyse/steps/step-04-consolidate.md +478 -0
  92. package/templates/skills/business-analyse/steps/step-05-deploy.md +220 -0
  93. package/templates/skills/business-analyse/steps/step-06-review.md +51 -69
  94. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  95. package/templates/skills/business-analyse/templates/tpl-handoff.md +20 -17
  96. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +2 -2
  97. package/templates/skills/business-analyse/templates-react.md +2 -2
  98. package/templates/skills/derive-prd/SKILL.md +92 -0
  99. package/templates/skills/derive-prd/references/acceptance-criteria.md +169 -0
  100. package/templates/skills/derive-prd/references/entity-domain-mapping.md +115 -0
  101. package/templates/skills/{business-analyse → derive-prd}/references/handoff-file-templates.md +131 -120
  102. package/templates/skills/{business-analyse → derive-prd}/references/handoff-mappings.md +95 -95
  103. package/templates/skills/{business-analyse → derive-prd}/references/handoff-seeddata-generation.md +312 -312
  104. package/templates/skills/{business-analyse → derive-prd}/references/prd-generation.md +262 -263
  105. package/templates/skills/derive-prd/references/readiness-scoring.md +104 -0
  106. package/templates/skills/derive-prd/schemas/handoff-schema.json +95 -0
  107. package/templates/skills/derive-prd/steps/step-00-validate.md +130 -0
  108. package/templates/skills/derive-prd/steps/step-01-transform.md +206 -0
  109. package/templates/skills/derive-prd/steps/step-02-export.md +181 -0
  110. package/templates/skills/{business-analyse → derive-prd}/templates/tpl-progress.md +172 -172
  111. package/templates/skills/ralph-loop/SKILL.md +2 -1
  112. package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
  113. package/templates/skills/ralph-loop/steps/step-01-task.md +2 -2
  114. package/templates/skills/apex/references/agent-teams-protocol.md +0 -203
  115. package/templates/skills/business-analyse/_architecture.md +0 -124
  116. package/templates/skills/business-analyse/_elicitation.md +0 -206
  117. package/templates/skills/business-analyse/_module-loop.md +0 -115
  118. package/templates/skills/business-analyse/_rules.md +0 -142
  119. package/templates/skills/business-analyse/_suggestions.md +0 -34
  120. package/templates/skills/business-analyse/questionnaire/00-application.md +0 -160
  121. package/templates/skills/business-analyse/questionnaire/00b-project.md +0 -85
  122. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +0 -189
  123. package/templates/skills/business-analyse/questionnaire/03-scope.md +0 -164
  124. package/templates/skills/business-analyse/questionnaire/04-data.md +0 -88
  125. package/templates/skills/business-analyse/questionnaire/05-integrations.md +0 -58
  126. package/templates/skills/business-analyse/questionnaire/06-security.md +0 -68
  127. package/templates/skills/business-analyse/questionnaire/07-ui.md +0 -76
  128. package/templates/skills/business-analyse/questionnaire/08-performance.md +0 -42
  129. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -45
  130. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -58
  131. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +0 -59
  132. package/templates/skills/business-analyse/questionnaire/12-migration.md +0 -58
  133. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +0 -69
  134. package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +0 -135
  135. package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +0 -136
  136. package/templates/skills/business-analyse/references/agent-module-prompt.md +0 -366
  137. package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +0 -557
  138. package/templates/skills/business-analyse/references/cache-warming-strategy.md +0 -566
  139. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +0 -41
  140. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +0 -74
  141. package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +0 -115
  142. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +0 -68
  143. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +0 -85
  144. package/templates/skills/business-analyse/references/team-orchestration.md +0 -1093
  145. package/templates/skills/business-analyse/references/validate-incremental-html.md +0 -121
  146. package/templates/skills/business-analyse/steps/step-01b-applications.md +0 -419
  147. package/templates/skills/business-analyse/steps/step-02-decomposition.md +0 -387
  148. package/templates/skills/business-analyse/steps/step-03a-data.md +0 -16
  149. package/templates/skills/business-analyse/steps/step-03a1-setup.md +0 -486
  150. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -300
  151. package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -405
  152. package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -516
  153. package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -691
  154. package/templates/skills/business-analyse/steps/step-04-consolidation.md +0 -17
  155. package/templates/skills/business-analyse/steps/step-04a-collect.md +0 -415
  156. package/templates/skills/business-analyse/steps/step-04b-analyze.md +0 -163
  157. package/templates/skills/business-analyse/steps/step-04c-decide.md +0 -186
  158. package/templates/skills/business-analyse/steps/step-05a-handoff.md +0 -937
  159. package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -522
  160. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +0 -703
@@ -1,124 +0,0 @@
1
- # Business Analysis - SmartStack Architecture Reference (_architecture.md)
2
-
3
- > **Loaded by:** step-01-cadrage, step-03a-data, step-05a-handoff
4
- > **Purpose:** Provide architectural context for relevant questions and aligned recommendations
5
-
6
- ---
7
-
8
- ## 5 Couches (Clean Architecture)
9
-
10
- | Couche | Projet | Contenu | Impact BA |
11
- |--------|--------|---------|-----------|
12
- | **Domain** | `SmartStack.Domain` | Entites, enums, interfaces | Entites identifiees en discovery |
13
- | **Application** | `SmartStack.Application` | CQRS (Commands/Queries), validations, DTOs | Use cases de la specification |
14
- | **Infrastructure** | `SmartStack.Infrastructure` | EF Core, services externes, jobs | Integrations et contraintes techniques |
15
- | **API** | `SmartStack.API` | Controllers REST, permissions | Endpoints et securite |
16
- | **Web** | `smartstack-web` | React 19, pages, composants | UI/UX et navigation |
17
-
18
- ---
19
-
20
- ## Classes de Base des Entites
21
-
22
- | Classe | Interface | Champs auto-inclus | Quand utiliser |
23
- |--------|-----------|---------------------|----------------|
24
- | `BaseEntity` | - | `Id` (Guid), `TenantId`, `CreatedAt`, `UpdatedAt` | **Defaut pour toute entite metier** |
25
- | `BaseEntity` | `IAuditableEntity` | + `CreatedBy`, `UpdatedBy` | Entite avec audit complet |
26
- | `SystemEntity` | - | `Id` (Guid), `CreatedAt` (pas de TenantId) | Entites systeme (navigation, permissions) |
27
- | `BaseEntity` | `ISoftDeletable` | + `IsDeleted`, `DeletedBy`, `DeletedAt` | Entite avec suppression logique |
28
- | `HierarchicalEntity` | - | + `ParentId`, `Level`, `Path` | Arborescences (categories, menus) |
29
- | `BaseEntity + UserId FK` | `ITenantEntity` | + `UserId` (Guid FK to User) | Person Role Extension — entity represents a person linked to User. Use `isPersonRole: true` in scaffold_extension. |
30
-
31
- > **IMPORTANT :** Ne JAMAIS proposer `CreatedBy`, `UpdatedBy`, `IsDeleted`, `TenantId` comme champs explicites — ils sont AUTOMATIQUES via la classe de base ou l'interface.
32
-
33
- ---
34
-
35
- ## Services d'Integration Disponibles
36
-
37
- | Service | Interface | Quand le proposer |
38
- |---------|-----------|-------------------|
39
- | Notifications in-app | `INotificationService` | Alertes, evenements, rappels |
40
- | Workflow automatise | `IWorkflowService` | Emails transactionnels, webhooks, actions chainees |
41
- | Completion IA | `IAICompletionService` | Suggestions, classification, generation contenu |
42
- | SignalR temps reel | `IHubContext<BusinessHub>` | Mises a jour en temps reel |
43
- | Jobs planifies | Hangfire `IBackgroundJobClient` | Traitements differes, purges, imports |
44
-
45
- ---
46
-
47
- ## Conventions Base de Donnees
48
-
49
- | Aspect | Convention | Exemple |
50
- |--------|------------|---------|
51
- | Schema | `core` (socle SmartStack) vs `extensions` (entites client/metier) | `core.auth_Roles`, `nav_Applications`, `supp_Tickets` |
52
- | Tables | `{prefix}_{EntityPlural}` (prefixe domaine + PascalCase pluriel) | `auth_Users`, `nav_Applications`, `supp_Tickets` |
53
- | Prefixes domaine | `auth_`, `nav_`, `cfg_`, `ref_`, `wkf_`, `ai_`, `loc_`, `lic_`, `tenant_`, `support_` | Pour un nouveau module metier : choisir un prefixe court (3-5 chars) |
54
- | FK | `{Entity}Id` (ex: `ClientId`, `OrderId`) | |
55
- | Index | `IX_{Table}_{Column}` | `IX_bik_FreeBickes_TenantId_Code` |
56
- | Migration | 1 migration par feature, nommee via MCP (`suggest_migration`) | `extensions_v1.0.0_001_AddFreeBicke` |
57
-
58
- ---
59
-
60
- ## Conventions de Dossiers (Clean Architecture)
61
-
62
- | Couche | Pattern de dossiers | Exemple (module FreeBicke dans business > operations) |
63
- |--------|--------------------|---------------------------------------------------------|
64
- | **Domain** | `{Project}.Domain/Business/{Application}/{Module}/` | `Domain/Business/Operations/FreeBicke/FreeBicke.cs` |
65
- | **Application/DTOs** | `{Project}.Application/Business/{Application}/{Module}/DTOs/` | `Application/Business/Operations/FreeBicke/DTOs/FreeBickeDto.cs` |
66
- | **Application/Interfaces** | `{Project}.Application/Common/Interfaces/` | `Application/Common/Interfaces/IFreeBickeService.cs` |
67
- | **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{Application}/{Module}/` | `Configurations/Operations/FreeBicke/FreeBickeConfiguration.cs` |
68
- | **Infrastructure/Services** | `{Project}.Infrastructure/Services/{Application}/{Module}/` | `Services/Operations/FreeBicke/FreeBickeService.cs` |
69
- | **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{Application}/{Module}/` | `Seeding/Data/Operations/FreeBicke/FreeBickeSeedData.cs` |
70
- | **API/Controllers** | `{Project}.Api/Controllers/Business/{Application}/` | `Controllers/Business/Operations/FreeBickeController.cs` |
71
- | **Frontend/Pages** | `web/src/pages/{application}/{module}/` | `pages/operations/freebicke/page.tsx` |
72
- | **Frontend/i18n** | `web/src/i18n/locales/{lang}/{module}.json` | `locales/fr/freebicke.json` |
73
-
74
- > **IMPORTANT :** Chaque module a son **propre sous-dossier** dans chaque couche. Ne JAMAIS mettre tous les fichiers a la racine d'une couche.
75
-
76
- ---
77
-
78
- ## SeedData Core (Obligatoire pour chaque feature)
79
-
80
- > **Chaque nouvelle feature necessite des SeedData dans 5 fichiers core** pour etre fonctionnelle (navigation visible, permissions actives, roles assignes).
81
-
82
- | # | Fichier | Contenu | Mecanisme |
83
- |---|---------|---------|-----------|
84
- | 1 | `NavigationModuleConfiguration.cs` | Entree module dans `nav_Modules` (HasData) | EF Core Migration |
85
- | 2 | `NavigationTranslationConfiguration.cs` | Traductions du module (4 langues x chaque entite nav) | EF Core Migration |
86
- | 3 | `PermissionConfiguration.cs` | Permissions CRUD + wildcards dans `nav_Permissions` (HasData) | EF Core Migration |
87
- | 4 | `Permissions.cs` (Application layer) | Constantes compile-time pour `[RequirePermission]` | Code |
88
- | 5 | `RolePermissionConfiguration.cs` | Associations role-permission dans `auth_RolePermissions` (HasData) | EF Core Migration |
89
-
90
- **Roles par defaut pour chaque application (4 niveaux) :**
91
-
92
- | Role | Permissions | Description |
93
- |------|-------------|-------------|
94
- | **{App} Admin** | `{app}.*` (wildcard) | Acces complet a l'application |
95
- | **{App} Manager** | `read`, `create`, `update`, `assign` | Gestion complete sans suppression |
96
- | **{App} Contributor** | `read`, `create`, `update` | Contribution active |
97
- | **{App} Viewer** | `read` uniquement | Consultation seule |
98
-
99
- > **CRITIQUE :** Si les SeedData ne sont pas crees, le module sera invisible dans la navigation et les permissions retourneront 403.
100
-
101
- ---
102
-
103
- ## Contraintes Non-Negociables
104
-
105
- | Contrainte | Detail |
106
- |------------|--------|
107
- | **Multi-tenant** | `TenantId` sur toute entite metier, isolation automatique |
108
- | **RBAC** | Permissions `{app}.{module}.{action}`, HasData pattern |
109
- | **CQRS** | Commands (write) et Queries (read) separes via MediatR |
110
- | **Validation** | FluentValidation pour toute commande |
111
- | **i18n** | 4 langues obligatoires (fr, en, it, de) |
112
- | **Soft Delete** | Pas de DELETE physique sauf purge RGPD planifiee |
113
-
114
- ---
115
-
116
- ## Outils MCP Pertinents pour le BA
117
-
118
- | Phase BA | Outil MCP | Usage |
119
- |----------|-----------|-------|
120
- | Pre-research (01) | `analyze_extension_points` | Decouvrir modules/entites existants |
121
- | Pre-research (01) | `api_docs` | Consulter la documentation API existante |
122
- | Analyse (02) | `validate_conventions` | Verifier les noms d'entites proposes |
123
- | Specification (03) | `generate_permissions` | Generer la matrice de permissions |
124
- | Handoff (05) | `scaffold_extension` | Preparer le scaffolding |
@@ -1,206 +0,0 @@
1
- # Business Analysis - Elicitation & Interaction (_elicitation.md)
2
-
3
- > **Loaded by:** step-01-cadrage, step-03a-data
4
- > **Purpose:** Interactive questioning techniques, AskUserQuestion formatting, ULTRATHINK mode
5
-
6
- ---
7
-
8
- ## Interactive Elicitation Protocol
9
-
10
- > **RULE: ALL questions MUST be asked interactively using `AskUserQuestion`.**
11
- > **NEVER dump a list of questions as text. ALWAYS use the tool.**
12
-
13
- ### Protocol
14
-
15
- 1. **Group questions by theme** — max 4 questions per `AskUserQuestion` call (tool limit)
16
- 2. **Propose predefined options** — for questions with predictable answers, provide 2-4 options
17
- 3. **The user can always choose "Other"** — the tool adds this automatically for free-text answers
18
- 4. **Process answers immediately** — apply ULTRATHINK + follow-ups before moving to next group
19
- 5. **Adapt next questions** — based on previous answers, skip irrelevant questions
20
-
21
- ### Batching Strategy
22
-
23
- | Category | Questions | Batches |
24
- |----------|-----------|---------|
25
- | 01-context | Q1.1-Q1.4 | 1 call |
26
- | 02-stakeholders | Q2.1-Q2.8 | 2 calls |
27
- | 03-scope | Q3.1-Q3.8 | 2 calls |
28
- | 04-data | Q4.1-Q4.8 | 2 calls |
29
- | 05-integrations | Q5.1-Q5.8 | 2 calls |
30
- | 06-security | Q6.1-Q6.8 | 2 calls |
31
- | 07-ui | Q7.1-Q7.8 | 2 calls |
32
- | 08-performance | Q8.1-Q8.4 | 1 call |
33
- | 09-constraints | Q9.1-Q9.4 | 1 call |
34
- | 10-documentation | Q10.1-Q10.4 | 1 call |
35
- | 11-data-lifecycle | Q11.1-Q11.8 | 2 calls |
36
- | 12-migration | Q12.1-Q12.8 | 2 calls |
37
- | 13-cross-module | Q13.1-Q13.8 | 2 calls |
38
-
39
- ### AskUserQuestion Format
40
-
41
- > **FORMATTING CRITICAL: `AskUserQuestion` does NOT support markdown or line breaks.**
42
- > Le champ `question` est rendu en texte brut (plain text). Il n'y a pas de retour a la ligne,
43
- > pas de gras, pas de puces. Une question simple reste lisible meme longue. Mais du contenu
44
- > structure (listes, resumes multi-points, tableaux) devient un mur de texte illisible.
45
-
46
- | Field | Rule |
47
- |-------|------|
48
- | `question` | **1 question ou 1 phrase.** Jamais de liste, resume multi-points ou contenu structure. |
49
- | `header` | 1-2 mots (max 12 chars) |
50
- | `label` (option) | Court et clair (~20 chars) |
51
- | `description` (option) | 1 phrase explicative (~60 chars) |
52
-
53
- > **Pour afficher du contenu structure** (resumes, listes, tableaux, syntheses) :
54
- > **TOUJOURS** utiliser du **texte direct** (output text) AVANT l'appel `AskUserQuestion`.
55
- > Le texte direct supporte le markdown et sera correctement formate avec titres, puces, gras, etc.
56
- >
57
- > **Exemple — Validation de synthese :**
58
- > 1. Afficher le resume structure en markdown (texte direct)
59
- > 2. Puis poser une question courte : "Cette synthese est-elle correcte ?"
60
-
61
- ```
62
- AskUserQuestion({
63
- questions: [
64
- {
65
- question: "Quel probleme metier ce module doit-il resoudre ?",
66
- header: "Probleme", // max 12 chars
67
- options: [
68
- { label: "Processus manuel", description: "Automatiser un processus existant fait manuellement" },
69
- { label: "Donnees dispersees", description: "Centraliser des donnees eparpillees dans plusieurs outils" },
70
- { label: "Manque visibilite", description: "Obtenir des indicateurs et du suivi inexistants aujourd'hui" },
71
- { label: "Conformite", description: "Repondre a une obligation reglementaire ou de securite" }
72
- ],
73
- multiSelect: false
74
- },
75
- // ... up to 4 questions per call
76
- ]
77
- })
78
- ```
79
-
80
- ### After Each Batch
81
-
82
- 1. **Evaluate answer quality** (see Answer Quality Indicators)
83
- 2. **If insufficient** -> follow-up AskUserQuestion with targeted probes from the Elicitation Guide
84
- 3. **If solution-oriented** -> reframe using Technique 1 before proceeding
85
- 4. **If sufficient/excellent** -> record and move to next batch
86
- 5. **Summarize** what was understood before moving to the next category
87
-
88
- ---
89
-
90
- ## Techniques d'elicitation
91
-
92
- > **Objectif :** Guider COMMENT questionner, pas seulement QUOI demander.
93
- > **Principe :** Chaque technique doit etre appliquee naturellement dans le flux de la conversation,
94
- > pas comme un outil supplementaire. L'analyste choisit la technique adaptee a la situation.
95
-
96
- ### Technique 1 : Reformulation du besoin
97
-
98
- Quand le client decrit une **solution** (bouton, ecran, champ, outil), reformuler en **besoin** :
99
-
100
- | Le client dit | L'analyste demande |
101
- |---------------|-------------------|
102
- | "Il me faut un menu deroulant pour les roles" | "Quel probleme rencontrez-vous aujourd'hui avec la gestion des acces ? Pourquoi certaines personnes doivent-elles avoir des acces differents ?" |
103
- | "On a besoin d'un bouton d'export" | "Que faites-vous avec les donnees une fois exportees ? Qui en a besoin et pourquoi ?" |
104
- | "Ajoutez un champ statut" | "Quel parcours suit cet element du debut a la fin ? Quels evenements declenchent un changement d'etat ?" |
105
-
106
- ### Technique 2 : Chaine des pourquoi
107
-
108
- Quand le besoin semble superficiel, enchainez jusqu'a 5 "Pourquoi ?" pour trouver la cause racine :
109
-
110
- ```
111
- Client : "On a besoin de suivre l'activite des utilisateurs"
112
- -> Pourquoi ? "Pour savoir qui a modifie quoi"
113
- -> Pourquoi ? "Parce qu'on a eu des problemes de donnees incorrectes"
114
- -> Pourquoi ? "Parce que plusieurs personnes modifient les memes fiches"
115
- -> CAUSE RACINE : Conflit d'edition simultanee -> Besoin de journal d'activite + protection des modifications
116
- ```
117
-
118
- ### Technique 3 : Extraction de scenario concret
119
-
120
- Ne jamais accepter de descriptions abstraites. Toujours demander un **scenario de vie reelle** :
121
-
122
- ```
123
- "Racontez-moi une journee type : vous arrivez au bureau, vous ouvrez l'application.
124
- Quelle est la PREMIERE chose que vous devez faire ?
125
- Puis ensuite ? Quelles informations consultez-vous ? Quelles decisions prenez-vous ?"
126
- ```
127
-
128
- ### Technique 4 : Test d'absence
129
-
130
- Valider la necessite en demandant ce qui se passe SANS :
131
-
132
- ```
133
- "Si cette fonctionnalite N'EXISTAIT PAS, que feriez-vous a la place ?
134
- Combien de temps ou d'argent le contournement actuel coute-t-il ?"
135
- ```
136
-
137
- ### Technique 5 : Verification de completude
138
-
139
- Pour chaque reponse sous forme de liste, verifier qu'il ne manque rien :
140
-
141
- | Type de reponse | Relance |
142
- |-----------------|---------|
143
- | "Il y a 3 types d'utilisateurs" | "Y a-t-il des acteurs externes ? Des auditeurs ? Des administrateurs systeme ? Des processus automatiques ?" |
144
- | "Le flux principal est A puis B puis C" | "Que se passe-t-il si l'utilisateur annule a l'etape B ? Si l'etape C echoue ? S'il veut revenir a A ?" |
145
- | "Champs obligatoires : nom et email" | "Quelles contraintes d'unicite ? Quel format ? Que se passe-t-il en cas de doublon ?" |
146
-
147
- ### Technique 6 : Projection dans le futur
148
-
149
- Demander au client de se projeter pour decouvrir des besoins non exprimes :
150
-
151
- ```
152
- "Imaginons que nous sommes 2 ans dans le futur et que l'application fonctionne parfaitement.
153
- Qu'est-ce qui a change dans votre facon de travailler ?
154
- Quels nouveaux besoins sont apparus auxquels vous ne pensez pas aujourd'hui ?"
155
- ```
156
-
157
- ### Technique 7 : Test de contradiction
158
-
159
- Quand deux reponses semblent contradictoires, les confronter pour clarifier :
160
-
161
- ```
162
- "Vous avez mentionne que [affirmation A], mais vous dites aussi que [affirmation B].
163
- Ces deux elements semblent en tension. Pouvez-vous m'aider a comprendre
164
- comment ils coexistent dans la realite ?"
165
- ```
166
-
167
- ### Technique 8 : Escalade d'impact
168
-
169
- Augmenter progressivement l'echelle pour tester les limites :
170
-
171
- ```
172
- "Aujourd'hui vous avez 50 fiches. Que se passe-t-il avec 500 ? Avec 5000 ?
173
- Est-ce que le processus reste le meme ou faudrait-il faire differemment ?"
174
- ```
175
-
176
- ### Indicateurs de qualite des reponses
177
-
178
- | Qualite | Signal | Action |
179
- |---------|--------|--------|
180
- | **Insuffisante** | Moins d'une phrase, "je ne sais pas", adjectif vague | Appliquer les techniques 1 a 8, demander un exemple concret |
181
- | **Orientee solution** | Contient des termes d'interface ou techniques (bouton, champ, base de donnees) | Appliquer la technique 1 (reformuler en besoin) |
182
- | **Suffisante** | Contient QUI, QUOI, POURQUOI et un exemple concret | Continuer, noter le niveau de confiance |
183
- | **Excellente** | Inclut les cas limites, les contraintes et des criteres mesurables | Continuer, marquer comme "Confirme" |
184
-
185
- ---
186
-
187
- ## ULTRATHINK
188
-
189
- Behavioral mode for critical phases (01, 03a):
190
-
191
- ```
192
- ULTRATHINK MODE:
193
- - Consider ALL edge cases
194
- - Challenge EVERY assumption
195
- - Anticipate UNEXPRESSED needs
196
- - Validate completeness before output
197
- - Apply Elicitation Techniques (see above)
198
-
199
- DO NOT:
200
- - Accept vague answers
201
- - Skip question categories
202
- - Assume stakeholder thought of everything
203
- - Accept solutions without understanding the problem first
204
- ```
205
-
206
- **DO NOT invoke** as a skill/tool - it is a thinking mode.
@@ -1,115 +0,0 @@
1
- # Business Analysis - Module Loop Protocol (_module-loop.md)
2
-
3
- > **Loaded by:** step-03a1-setup, step-03b-ui, step-03c-compile, step-03d-validate
4
- > **Purpose:** State management and iteration logic for multi-module specification loop + application loop (project mode)
5
-
6
- ---
7
-
8
- ## State Management (Application Mode — single app)
9
-
10
- ```json
11
- {
12
- "metadata": {
13
- "workflow": {
14
- "mode": "application",
15
- "moduleOrder": ["Customers", "Products", "Orders", "Invoices"],
16
- "currentModuleIndex": 2,
17
- "completedModules": ["Customers", "Products"],
18
- "currentModule": "Orders"
19
- }
20
- }
21
- }
22
- ```
23
-
24
- ## State Management (Project Mode — multi app)
25
-
26
- Project-level feature.json tracks the application loop:
27
-
28
- ```json
29
- {
30
- "metadata": {
31
- "workflow": {
32
- "mode": "project",
33
- "applicationOrder": ["HumanResources", "EmployeeSelfService"],
34
- "currentApplicationIndex": 0,
35
- "completedApplications": [],
36
- "currentApplication": "HumanResources"
37
- }
38
- }
39
- }
40
- ```
41
-
42
- Each application-level feature.json tracks its own module loop (same as application mode).
43
-
44
- ## Module Loop Logic (end of each step-03 iteration)
45
-
46
- ```
47
- 1. Mark current module as "validated" in application-level feature.json
48
- 2. Add to completedModules[]
49
- 3. IF currentModuleIndex + 1 < moduleOrder.length:
50
- currentModuleIndex++
51
- currentModule = moduleOrder[currentModuleIndex]
52
- Write application-level feature.json
53
- Display: "Module {name} complete. Next: {next_name} ({N}/{total})"
54
- RE-LOAD: steps/step-03a1-setup.md
55
- 4. ELSE (all modules for current application specified):
56
- IF workflow.mode === "project":
57
- → Execute APPLICATION LOOP LOGIC (below)
58
- ELSE:
59
- application.status = "specified"
60
- Load: steps/step-04a-collect.md
61
- ```
62
-
63
- ## Application Loop Logic (project mode only)
64
-
65
- > Only applicable when `workflow.mode === "project"` in the project-level feature.json.
66
-
67
- ```
68
- 1. Mark current application as "specified" in project feature.json
69
- ba-writer.updateApplicationStatus(projectId, currentApp, "specified")
70
- 2. Add to completedApplications[]
71
- ba-writer.advanceApplicationLoop(projectId)
72
- 3. IF currentApplicationIndex + 1 < applicationOrder.length:
73
- Display: "═══ Application {currentApp} complete ({N}/{total}). Next: {nextApp} ═══"
74
- Load: steps/step-02-decomposition.md (for next application's module decomposition)
75
- 4. ELSE (all applications specified):
76
- Display: "═══ All applications specified! Proceeding to cross-application consolidation... ═══"
77
- project.status = "specified"
78
- Load: steps/step-04a-collect.md (with cross-application consolidation)
79
- ```
80
-
81
- ## Context Management During Loop
82
-
83
- To prevent context explosion as modules accumulate:
84
- - **Current module:** Load full module feature.json
85
- - **Completed modules:** Only load compact summary via `ba-reader.getCompletedModulesSummary()` (max 100 lines)
86
- - **Master feature.json:** Only read workflow state + application roles
87
- - **In project mode — completed applications:** Only load compact summary via `ba-reader.getCompletedApplicationsSummary()` (max 50 lines per app)
88
-
89
- ## Resume After Interruption
90
-
91
- ### Application Mode (single app)
92
- ```
93
- 1. ba-reader.findApplicationFeature() -> locate application-level feature.json
94
- 2. Read metadata.workflow.currentModuleIndex
95
- 3. IF currentModule has a feature.json with status != "validated":
96
- Resume step-03a1-setup for that module
97
- 4. ELSE:
98
- Start step-03a1-setup for next module
99
- ```
100
-
101
- ### Project Mode (multi app)
102
- ```
103
- 1. ba-reader.findProjectFeature() -> locate project-level feature.json
104
- 2. Read metadata.workflow.currentApplicationIndex
105
- 3. Locate current application's feature.json
106
- 4. Read application's metadata.workflow.currentModuleIndex
107
- 5. IF currentModule has a feature.json with status != "validated":
108
- Resume step-03a1-setup for that module in that application
109
- 6. ELSE IF application has unspecified modules:
110
- Start step-03a1-setup for next module in current application
111
- 7. ELSE IF more applications remain:
112
- Start step-02-decomposition for next application
113
- 8. ELSE:
114
- All done → Resume step-04a-collect
115
- ```
@@ -1,142 +0,0 @@
1
- # Business Analyse — Canonical Rules
2
-
3
- > **This file is the SINGLE SOURCE OF TRUTH for all rules referenced across step files.**
4
- > Step files MUST reference this file instead of duplicating rules.
5
-
6
- ---
7
-
8
- ## § ID Naming Convention
9
-
10
- All IDs MUST include a module prefix to guarantee application-wide uniqueness.
11
- The prefix is derived from the module code initials (2-4 chars):
12
-
13
- | Module | Prefix |
14
- |--------|--------|
15
- | UserManagement | UM |
16
- | VehicleManagement | VM |
17
- | PartsInventory | PI |
18
- | RepairManagement | RM |
19
- | MaintenanceSchedule | MS |
20
- | DataSync | DS |
21
- | Notifications | NT |
22
- | Dashboard | DB |
23
- | Orders | OR |
24
- | Customers | CU |
25
-
26
- **Patterns:**
27
-
28
- | ID Type | Pattern | Example |
29
- |---------|---------|---------|
30
- | Use Case | `UC-{PREFIX}-{NNN}` | UC-RM-001, UC-PI-003 |
31
- | Business Rule | `BR-{CAT}-{PREFIX}-{NNN}` | BR-VAL-RM-001, BR-CALC-PI-002 |
32
- | Functional Req | `FR-{PREFIX}-{NNN}` | FR-RM-001 |
33
- | Objective | `OBJ-{PREFIX}-{NNN}` | OBJ-RM-001 |
34
- | Acceptance Crit | `AC-{PREFIX}-{NNN}` | AC-RM-001 |
35
- | Risk | `RISK-{PREFIX}-{NNN}` | RISK-RM-001 |
36
-
37
- **NEVER use bare IDs** (UC-001, BR-VAL-001) in multi-module mode.
38
-
39
- ---
40
-
41
- ## § Schema Conformity
42
-
43
- ALL data MUST fit within the defined `feature-schema.json` structure.
44
-
45
- - NEVER create custom top-level fields (KPIDefinitions, ChartConfigurations, etc.)
46
- - Dashboard modules MUST use `specification.dashboards[]` (it exists in the schema).
47
- - If truly needed, use `specification.extensions: {}` (additionalProperties: true).
48
-
49
- ---
50
-
51
- ## § Auto-Fix: Wireframe Field Names
52
-
53
- Before writing wireframes to feature.json, normalize field names to canonical form.
54
-
55
- | Source field | Canonical field | Action |
56
- |---|---|---|
57
- | `title` | `screen` | Rename if `screen` absent |
58
- | `name` | `screen` | Rename if `screen` absent |
59
- | `ascii` | `mockup` | Rename if `mockup` absent |
60
- | `content` | `mockup` | Rename if `mockup` absent |
61
-
62
- After renaming, store wireframes under the canonical key `specification.uiWireframes`.
63
-
64
- ---
65
-
66
- ## § Auto-Fix: Entity Attribute Type Inference
67
-
68
- When an entity attribute is missing a `type` field, infer it from the attribute name pattern.
69
-
70
- | Pattern (attribute name) | Inferred type |
71
- |---|---|
72
- | `*name`, `*title`, `*code`, `*description`, `*label`, `*email`, `*phone`, `*address` | `string` |
73
- | `*Id` (suffix) | `Guid` |
74
- | `*date*`, `*At` (suffix) | `DateTime` |
75
- | `is*`, `has*`, `*active`, `*enabled` | `bool` |
76
- | `*amount`, `*salary`, `*rate`, `*price`, `*total` | `decimal` |
77
- | `*count`, `*number`, `*order`, `*sort`, `*index` | `int` |
78
- | (no match — default) | `string` |
79
-
80
- **Additional normalization:**
81
- - If `validation` contains `max {N}`, extract and set `maxLength = N`.
82
- - If `required` is undefined, default to `true`.
83
-
84
- ---
85
-
86
- ## § Minimum Counts (Authoritative)
87
-
88
- > **These are the AUTHORITATIVE minimums used across step-03d validation and robustness checks.**
89
- > When in doubt, use these values. They are the strictest (most correct) across all sources.
90
-
91
- | Section | Minimum | Blocking | Notes |
92
- |---|---|---|---|
93
- | `analysis.entities` | ≥ 2 | YES | Single-entity modules are rare and likely incomplete |
94
- | Entity attributes (each) | ≥ 3 | YES | Entities with < 3 attributes are incomplete |
95
- | `analysis.businessRules` | ≥ 4 | YES | Mix of VAL/CALC/WF/SEC/DATA |
96
- | BR categories | ≥ 2 | YES | Single-category modules likely incomplete |
97
- | `specification.useCases` | ≥ 6 | YES | CRUD (5) + 1 business-specific minimum |
98
- | `specification.functionalRequirements` | ≥ 4 | YES | FRs must cover key functionality |
99
- | UC-FR linkage | Every UC has ≥ 1 FR | YES | Orphan UCs indicate incomplete requirements |
100
- | `specification.actors` | ≥ 2 | YES | At least 2 roles with permissions |
101
- | `specification.permissionMatrix.permissions` | ≥ 5 | YES | CRUD (4) + 1 business action |
102
- | `specification.permissionMatrix.roleAssignments` | ≥ 2 | YES | All roles must have ≥ 1 permission |
103
- | `specification.sections` | ≥ 2 | YES | list + detail/form minimum |
104
- | Wireframes | 1 per section | YES | EVERY section MUST have a wireframe |
105
- | `specification.navigation.entries` | ≥ 1 | YES | Module must be accessible in menu |
106
- | `specification.seedDataCore` | All 9 arrays present | YES | Missing CORE data breaks deployment |
107
- | `specification.messages` | ≥ 4 | YES | 1 success, 1 error, 1 warning, 1 info |
108
- | `specification.validations` | ≥ 1 | YES | Modules need field validation rules |
109
- | `specification.apiEndpoints` | ≥ 5 | YES | CRUD (5) minimum |
110
- | `specification.i18nKeys` leaf count | ≥ 42 | YES | Entities, fields, messages, validation, navigation |
111
- | i18n languages per leaf | 4 (fr, en, it, de) | YES | Missing translations break multi-language |
112
- | `specification.gherkinScenarios` | ≥ 1 entry (array) | YES | Must be array, not single object |
113
- | Gherkin scenario count | ≥ 2 | NO (WARNING) | Enables automated testing |
114
- | `analysis.dataLifecycle` | present | YES | Missing causes BLOCKING errors downstream |
115
-
116
- **seedDataCore arrays (9 total):**
117
- 1. `navigationApplications` — required for 1st module, can be `[]` for subsequent
118
- 2. `applicationRoles` — required for 1st module, can be `[]` for subsequent
119
- 3. `navigationModules` — min 1
120
- 4. `navigationSections` — min 1
121
- 5. `navigationResources` — min 1
122
- 6. `navigationTranslations` — min 2 (fr + en)
123
- 7. `permissions` — min 1
124
- 8. `rolePermissions` — min 1
125
- 9. `permissionConstants` — min 1
126
-
127
- ---
128
-
129
- ## § Format Checks
130
-
131
- These format rules apply to ALL modules (including the first). They validate canonical schema compliance.
132
-
133
- | Check | Rule | Auto-fix |
134
- |---|---|---|
135
- | Gherkin format | `gherkinScenarios` MUST be an **array** `[{feature, scenarios}]`, not a single object | Wrap single object in array |
136
- | Validation rules | `validations[].rules` MUST be an **array**, not a singular `rule` string | Convert string to `[string]`; rename `rule` → `rules` |
137
- | Message field | `messages[]` MUST have a `message` field (not only `description`) | Copy `description` → `message` if `message` absent |
138
- | Wireframe fields | Wireframes MUST use canonical field names (`screen`, `mockup`) | Apply § "Auto-Fix: Wireframe Field Names" table above |
139
- | Entity attributes | Entities MUST use `attributes[]` (not `fields[]`), no `tableName` or `primaryKey` | Structural error — must be fixed manually |
140
- | Entity attribute types | ALL attributes MUST have a `type` field | Apply § "Auto-Fix: Entity Attribute Type Inference" table above |
141
- | Navigation routes | FORBIDDEN: `/module/list` (use `/module`), `/module/detail/:id` (use `/module/:id`) | Rewrite route |
142
- | Permission paths | Dot-separated lowercase: module-level `{app}.{module}.{action}` (3 segments) or section-level `{app}.{module}.{section}.{action}` (4 segments) | — |
@@ -1,34 +0,0 @@
1
- # Business Analysis - Suggestions & Context7 (_suggestions.md)
2
-
3
- > **Loaded by:** step-01-cadrage, step-04-consolidation
4
- > **Purpose:** Proactive suggestion patterns and Context7 library references
5
-
6
- ---
7
-
8
- ## Proactive Suggestions
9
-
10
- After scope definition in step-01, the skill suggests complementary modules/sections:
11
-
12
- 1. Analyze feature type and scope from questionnaire answers
13
- 2. Load `patterns/suggestion-catalog.md`
14
- 3. Match against catalog patterns
15
- 4. Present suggestions via AskUserQuestion (accept/reject per suggestion)
16
- 5. Store in feature.json.suggestions[]
17
-
18
- Accepted suggestions become candidates for future /business-analyse runs.
19
-
20
- ---
21
-
22
- ## Context7 (Step 04)
23
-
24
- ```
25
- Prompt pattern:
26
- "use context7 with /facebook/react and /i18next/react-i18next
27
- to generate {component} following SmartStack patterns"
28
- ```
29
-
30
- Libraries:
31
- - `/facebook/react` - React 19 patterns
32
- - `/i18next/react-i18next` - Internationalization
33
- - `/remix-run/react-router` - React Router v7
34
- - `/lucide-icons/lucide-react` - Icons