@atlashub/smartstack-cli 3.13.0 → 3.15.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/dist/index.js +26 -28
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +626 -141
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/migration.md +15 -0
- package/templates/skills/apex/steps/step-04-validate.md +64 -5
- package/templates/skills/application/references/frontend-verification.md +20 -0
- package/templates/skills/application/steps/step-04-backend.md +17 -1
- package/templates/skills/application/steps/step-05-frontend.md +49 -23
- package/templates/skills/application/templates-seed.md +14 -4
- package/templates/skills/business-analyse/SKILL.md +3 -2
- package/templates/skills/business-analyse/_module-loop.md +5 -5
- package/templates/skills/business-analyse/html/ba-interactive.html +165 -0
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +2 -0
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +85 -0
- package/templates/skills/business-analyse/html/src/styles/05-modules.css +65 -0
- package/templates/skills/business-analyse/html/src/template.html +13 -0
- package/templates/skills/business-analyse/questionnaire.md +1 -1
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +11 -23
- package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +112 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +6 -1
- package/templates/skills/business-analyse/references/deploy-data-build.md +1 -1
- package/templates/skills/business-analyse/references/html-data-mapping.md +1 -1
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +1 -1
- package/templates/skills/business-analyse/schemas/application-schema.json +38 -1
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +18 -22
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +383 -128
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +42 -16
- package/templates/skills/business-analyse/steps/step-03a-data.md +5 -31
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +41 -2
- package/templates/skills/business-analyse/steps/step-03b-ui.md +20 -11
- package/templates/skills/business-analyse/steps/step-03d-validate.md +6 -6
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +5 -31
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +1 -1
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +3 -3
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
- package/templates/skills/efcore/steps/shared/step-00-init.md +55 -0
- package/templates/skills/ralph-loop/SKILL.md +1 -0
- package/templates/skills/ralph-loop/references/category-rules.md +131 -27
- package/templates/skills/ralph-loop/references/compact-loop.md +61 -3
- package/templates/skills/ralph-loop/references/core-seed-data.md +251 -5
- package/templates/skills/ralph-loop/references/error-classification.md +143 -0
- package/templates/skills/ralph-loop/steps/step-05-report.md +54 -0
- package/templates/skills/review-code/references/smartstack-conventions.md +16 -0
- package/templates/skills/validate-feature/SKILL.md +11 -1
- package/templates/skills/validate-feature/steps/step-00-dependencies.md +121 -0
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +61 -13
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +250 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +0 -87
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-01-cadrage
|
|
3
|
-
description: Application/module framing -
|
|
3
|
+
description: Application/module framing - listen, reformulate, challenge, anticipate, bound scope
|
|
4
4
|
model: opus
|
|
5
5
|
next_step: steps/step-02-decomposition.md
|
|
6
6
|
---
|
|
@@ -12,21 +12,35 @@ next_step: steps/step-02-decomposition.md
|
|
|
12
12
|
## MANDATORY EXECUTION RULES
|
|
13
13
|
|
|
14
14
|
- ALWAYS use ULTRATHINK mode for this step
|
|
15
|
-
- ALWAYS apply the
|
|
15
|
+
- ALWAYS apply the Elicitation Techniques from `_elicitation.md`
|
|
16
16
|
- NEVER accept vague answers — probe deeper
|
|
17
17
|
- NEVER define entities or business rules here — that's per-module in step-03
|
|
18
18
|
- ALL questions via AskUserQuestion tool (NEVER as text dumps)
|
|
19
19
|
- ALL communication in `{language}` (from feature.json.metadata.language)
|
|
20
|
+
- **NEVER skip the reformulation phase** — it is the foundation of good analysis
|
|
21
|
+
- **NEVER auto-infer cadrage data without client validation** — every key decision is confirmed
|
|
20
22
|
|
|
21
23
|
## YOUR TASK
|
|
22
24
|
|
|
23
|
-
Frame the analysis scope at the **application level
|
|
25
|
+
Frame the analysis scope at the **application level** through an interactive conversation with the client: understand the problem, stakeholders, scope, and define application-level roles. The analysis phase is ALWAYS interactive — the AI listens, reformulates, challenges, and validates with the user.
|
|
24
26
|
|
|
25
|
-
**Key difference from
|
|
27
|
+
**Key difference from step-03:** This step does NOT define entities, business rules, or process flows. Those are per-module and handled in step-03.
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
29
|
-
## EXECUTION
|
|
31
|
+
## EXECUTION FLOW — 5 PHASES
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Phase 1: ECOUTE → Read brief + codebase pre-research + silent pre-analysis
|
|
35
|
+
Phase 2: REFORMULATION → Rephrase the need back to the client for validation
|
|
36
|
+
Phase 3: APPROFONDISSEMENT → Challenge assumptions with targeted questionnaires
|
|
37
|
+
Phase 4: ANTICIPATION → Suggest unexpressed needs from domain expertise
|
|
38
|
+
Phase 5: PERIMETRE → Bound scope with roles, coverage matrix (sections + resources)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## PHASE 1: ECOUTE (Listen)
|
|
30
44
|
|
|
31
45
|
### 1. Read Current State
|
|
32
46
|
|
|
@@ -43,7 +57,7 @@ IF cadrage already completed (status = "framed"):
|
|
|
43
57
|
|
|
44
58
|
### 2. Codebase Pre-Research
|
|
45
59
|
|
|
46
|
-
> **
|
|
60
|
+
> **Understand what already exists before engaging the client.**
|
|
47
61
|
|
|
48
62
|
**Phase 2a: MCP Tools (if available)**
|
|
49
63
|
```
|
|
@@ -70,100 +84,287 @@ Launch 3 agents in parallel:
|
|
|
70
84
|
Merge findings into {codebase_context}
|
|
71
85
|
```
|
|
72
86
|
|
|
73
|
-
###
|
|
87
|
+
### 2b. Silent Pre-Analysis (ULTRATHINK — no output to client)
|
|
74
88
|
|
|
75
|
-
> **The
|
|
76
|
-
> Skip organizational questions (adoption, change management, governance, KPIs).
|
|
77
|
-
> Focus on functional decisions and technical challenges.
|
|
78
|
-
> **Always optimize for high traffic and production-grade performance.**
|
|
89
|
+
> **The AI prepares the conversation before speaking.** This is NOT output — it's internal reasoning.
|
|
79
90
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
Load: [references/cadrage-pre-analysis.md](../references/cadrage-pre-analysis.md)
|
|
92
|
+
|
|
93
|
+
Analyze `{feature_description}` silently:
|
|
94
|
+
|
|
95
|
+
1. **Identify problem type** from keywords (replace, automate, centralize, new tool)
|
|
96
|
+
2. **Extract explicit modules/features** mentioned in the description
|
|
97
|
+
3. **Detect shadow zones** — what is NOT said but should be:
|
|
98
|
+
- Missing stakeholders (who else would use this?)
|
|
99
|
+
- Missing sections (reports mentioned but no details?)
|
|
100
|
+
- Implicit relationships (1:1, 1:N — why this cardinality?)
|
|
101
|
+
- Missing non-functional needs (security, performance, compliance)
|
|
102
|
+
4. **Prepare challenge questions** — specific to this brief, not generic
|
|
103
|
+
5. **Pre-identify anticipated sections and resources** per detected module
|
|
104
|
+
|
|
105
|
+
Store in `{pre_analysis}` (internal use only, NOT written to feature.json):
|
|
106
|
+
```yaml
|
|
107
|
+
pre_analysis:
|
|
108
|
+
problem_type: "new_tool|replace|automate|centralize"
|
|
109
|
+
detected_modules: [{name, description, detected_sections}]
|
|
110
|
+
shadow_zones: [{topic, why_it_matters, challenge_question}]
|
|
111
|
+
anticipated_suggestions: [{suggestion, justification, module}]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## PHASE 2: REFORMULATION (Rephrase & Validate)
|
|
117
|
+
|
|
118
|
+
### 3. Reformulation du besoin (MANDATORY — NEVER SKIP)
|
|
119
|
+
|
|
120
|
+
> **Golden rule of requirements analysis: NEVER proceed without reformulating.**
|
|
121
|
+
> The analyst must prove they understood before digging deeper.
|
|
122
|
+
> This is what distinguishes a professional analysis from a superficial one.
|
|
123
|
+
|
|
124
|
+
**Process:**
|
|
125
|
+
|
|
126
|
+
1. From `{feature_description}` and `{pre_analysis}`, build a structured reformulation.
|
|
127
|
+
|
|
128
|
+
2. **Display as markdown** (direct text output, NOT inside AskUserQuestion):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
## {language == "fr" ? "Voici ce que j'ai compris de votre besoin" : "Here is my understanding of your need"}
|
|
132
|
+
|
|
133
|
+
**Application :** {detected application name}
|
|
134
|
+
**Objectif :** {reformulation in 2-3 sentences of the global need — in the client's own words, not technical jargon}
|
|
135
|
+
|
|
136
|
+
**Modules identifiés :**
|
|
137
|
+
- **{Module 1}** : {functional description}
|
|
138
|
+
- Sections pressenties : {list, detail, create, edit...}
|
|
139
|
+
- Resources clés : {grid, form, card, chart...}
|
|
140
|
+
- **{Module 2}** : {functional description}
|
|
141
|
+
- Sections pressenties : {list, create...}
|
|
142
|
+
- Resources clés : {grid, form...}
|
|
143
|
+
|
|
144
|
+
**Points que j'ai notés :**
|
|
145
|
+
- {specific point 1 from the brief, quoted verbatim when possible}
|
|
146
|
+
- {specific point 2}
|
|
147
|
+
|
|
148
|
+
**Points qui me semblent ambigus ou non précisés :**
|
|
149
|
+
- {shadow zone 1 — what I don't know yet}
|
|
150
|
+
- {shadow zone 2}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
3. Then ask via AskUserQuestion:
|
|
154
|
+
```
|
|
155
|
+
question: "{language == 'fr' ? 'Cette reformulation correspond-elle à votre besoin ?' : 'Does this reformulation match your need?'}"
|
|
156
|
+
header: "Validation"
|
|
157
|
+
options:
|
|
158
|
+
- label: "{language == 'fr' ? 'Oui, c\'est correct' : 'Yes, correct'}"
|
|
159
|
+
description: "{language == 'fr' ? 'La reformulation reflète bien mon besoin' : 'The reformulation accurately reflects my need'}"
|
|
160
|
+
- label: "{language == 'fr' ? 'Partiellement' : 'Partially'}"
|
|
161
|
+
description: "{language == 'fr' ? 'Certains points sont corrects mais d\'autres à ajuster' : 'Some points are correct but others need adjustment'}"
|
|
162
|
+
- label: "{language == 'fr' ? 'Non, à revoir' : 'No, needs revision'}"
|
|
163
|
+
description: "{language == 'fr' ? 'La reformulation ne correspond pas à mon besoin' : 'The reformulation does not match my need'}"
|
|
164
|
+
```
|
|
83
165
|
|
|
84
|
-
|
|
166
|
+
4. IF "Partially" or "No":
|
|
167
|
+
- Ask for corrections via AskUserQuestion (open-ended "Other" option)
|
|
168
|
+
- Re-reformulate and re-validate (loop until confirmed)
|
|
85
169
|
|
|
86
|
-
|
|
170
|
+
5. Once confirmed, update `{pre_analysis}` with any corrections.
|
|
87
171
|
|
|
88
172
|
---
|
|
89
173
|
|
|
90
|
-
##
|
|
174
|
+
## PHASE 3: APPROFONDISSEMENT (Challenge & Deepen)
|
|
175
|
+
|
|
176
|
+
### 4. Targeted Questionnaires
|
|
177
|
+
|
|
178
|
+
> **Principle: Do NOT ask ALL questions from ALL questionnaires.**
|
|
179
|
+
> Select the RELEVANT questions based on the pre-analysis and detected shadow zones.
|
|
180
|
+
> Apply elicitation techniques from `_elicitation.md` after each batch.
|
|
181
|
+
> The goal is a CONVERSATION, not an interrogation.
|
|
182
|
+
|
|
183
|
+
#### 4a. Business Context (ALWAYS — from `questionnaire/01-context.md`)
|
|
184
|
+
|
|
185
|
+
> Load the full questionnaire reference for elicitation guides and alert signals.
|
|
91
186
|
|
|
92
|
-
|
|
187
|
+
Select the most relevant questions from Q1.1-Q1.12.
|
|
188
|
+
**Mandatory minimum:** Q1.1 (problem), Q1.4 (current tools), Q1.8 (vision), Q1.11 (trigger).
|
|
93
189
|
|
|
94
|
-
|
|
190
|
+
Ask in 1-2 batches via AskUserQuestion (max 4 questions per batch).
|
|
95
191
|
|
|
96
|
-
|
|
192
|
+
Apply ULTRATHINK after each batch:
|
|
193
|
+
- If answer is vague → probe deeper using the elicitation guide from 01-context.md
|
|
194
|
+
- If answer is solution-oriented → apply Technique 1 (reformulate as need)
|
|
195
|
+
- If answer is superficial → apply Technique 2 (chain of whys)
|
|
196
|
+
- If answer is excellent → record and move on
|
|
97
197
|
|
|
98
|
-
|
|
198
|
+
#### 4b. Stakeholders (ALWAYS — from `questionnaire/02-stakeholders.md`)
|
|
99
199
|
|
|
100
|
-
**
|
|
101
|
-
- Application name (PascalCase)
|
|
102
|
-
- Application purpose (1-2 sentences)
|
|
200
|
+
**Mandatory minimum:** Q2.1 (users), Q2.5 (tasks per profile), Q2.9 (access levels).
|
|
103
201
|
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
202
|
+
Ask in 1-2 batches. After each batch:
|
|
203
|
+
- If only 1 user type mentioned → probe: "Who else interacts? Managers? Admins? External users?"
|
|
204
|
+
- If "everyone sees everything" → challenge: "Even interns? Contractors? Salary data?"
|
|
205
|
+
- If tasks are generic → ask for a concrete scenario: "Walk me through a typical day"
|
|
107
206
|
|
|
108
|
-
|
|
109
|
-
- Standard 4-tier roles or customize
|
|
110
|
-
- Module-specific role restrictions
|
|
207
|
+
#### 4c. Functional Scope (ALWAYS — from `questionnaire/03-scope.md`)
|
|
111
208
|
|
|
112
|
-
**
|
|
113
|
-
- Business processes spanning modules
|
|
114
|
-
- Default role for new users
|
|
209
|
+
**Mandatory minimum:** Q3.2 (must-have), Q3.4 (exclusions), Q3.5 (main journey).
|
|
115
210
|
|
|
116
|
-
After each batch:
|
|
211
|
+
Ask in 1-2 batches. After each batch:
|
|
212
|
+
- If everything is "must-have" → apply priority test: "If you could only keep 3 features, which ones?"
|
|
213
|
+
- If no exclusions → probe: "What should this system explicitly NOT do?"
|
|
214
|
+
- If journey is too simple → detail: "What happens when something goes wrong? When someone cancels?"
|
|
117
215
|
|
|
118
|
-
|
|
216
|
+
#### 4d. Challenge Implicit Assumptions (CRITICAL)
|
|
119
217
|
|
|
120
|
-
|
|
218
|
+
> **Apply elicitation techniques to challenge what the client considers "obvious".**
|
|
219
|
+
> This is what separates a deep analysis from a shallow one.
|
|
121
220
|
|
|
122
|
-
|
|
123
|
-
- Q1.1-Q1.12 : Probleme, situation actuelle, vision, declencheur
|
|
124
|
-
- 3 lots AskUserQuestion (probleme, processus actuel, vision et urgence)
|
|
125
|
-
- ULTRATHINK : Identifier la douleur reelle, pas la solution imaginee
|
|
221
|
+
For EACH specific point from the brief, prepare a targeted challenge question.
|
|
126
222
|
|
|
127
|
-
**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
223
|
+
**Rules for challenge questions:**
|
|
224
|
+
1. Identify the assumption (what the client stated as fact)
|
|
225
|
+
2. Formulate a "what if the opposite?" question
|
|
226
|
+
3. Use Technique 4 (absence test) or Technique 7 (contradiction test)
|
|
131
227
|
|
|
132
|
-
**
|
|
133
|
-
- Q3.1-Q3.12 : Priorites (indispensable/important/optionnel/hors perimetre), parcours, besoins transversaux
|
|
134
|
-
- 3 lots AskUserQuestion
|
|
135
|
-
- ULTRATHINK : S'assurer que le perimetre couvre les besoins identifies
|
|
228
|
+
**Examples by domain pattern:**
|
|
136
229
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
|
|
230
|
+
| Brief statement | Implicit assumption | Challenge question |
|
|
231
|
+
|----------------|--------------------|--------------------|
|
|
232
|
+
| "Entities are 1:1 extensions of X" | Cardinality is always 1:1 | "Can a user be linked to multiple employee records (temp contracts, part-time multi-position)? Can an employee NOT have a user account?" |
|
|
233
|
+
| "Entry split into activity and absence" | Binary decomposition is sufficient | "What granularity? Day, half-day, hour? Are activities linked to projects or clients? Are there other entry types (training, travel, on-call)?" |
|
|
234
|
+
| "A reports section" | Reports are a simple addition | "Which reports exactly? For whom? How often? PDF/Excel export? Real-time dashboards? Aggregated or detailed?" |
|
|
235
|
+
| "Module X manages Y" | The scope of "manages" is clear | "What does 'manage' mean concretely? Create, read, update, delete? Approve? Archive? Import/export?" |
|
|
141
236
|
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
237
|
+
Use these techniques:
|
|
238
|
+
- **Technique 3** (concrete scenario): "Walk me through a typical day of [role] using this module"
|
|
239
|
+
- **Technique 4** (absence test): "If [feature] didn't exist, how would you handle it?"
|
|
240
|
+
- **Technique 8** (impact escalation): "With 50 records this works, but with 500? 5000? Does the process stay the same?"
|
|
146
241
|
|
|
147
|
-
|
|
242
|
+
Ask challenge questions via AskUserQuestion (1-2 batches of max 4).
|
|
148
243
|
|
|
149
|
-
|
|
244
|
+
#### 4d-bis. Entity Sourcing Pattern (MANDATORY for detected dependencies)
|
|
150
245
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
246
|
+
> **When the analysis detects a referenced entity/concept (e.g., "Projets" referenced by activities, "Clients" referenced by orders), ALWAYS ask how this entity is sourced.**
|
|
247
|
+
> This question detects potential new modules that were not mentioned in the original brief.
|
|
248
|
+
|
|
249
|
+
For EACH referenced entity/concept detected during phases 2-4 that is NOT already covered by an identified module:
|
|
250
|
+
|
|
251
|
+
Ask via AskUserQuestion:
|
|
252
|
+
```
|
|
253
|
+
question: "{language == 'fr'
|
|
254
|
+
? 'Les {entity_plural} auxquel(le)s les {parent_entity_plural} sont lié(e)s : comment sont-ils gérés ?'
|
|
255
|
+
: 'The {entity_plural} that {parent_entity_plural} are linked to: how are they managed?'}"
|
|
256
|
+
header: "{entity_name}"
|
|
257
|
+
options:
|
|
258
|
+
- label: "{language == 'fr' ? 'Gérés dans l\'app' : 'Managed in app'}"
|
|
259
|
+
description: "{language == 'fr'
|
|
260
|
+
? 'Les {entity_plural} sont créés et gérés dans cette application (liste simple)'
|
|
261
|
+
: '{entity_plural} are created and managed in this application (simple list)'}"
|
|
262
|
+
- label: "{language == 'fr' ? 'Nouveau module dédié' : 'New dedicated module'}"
|
|
263
|
+
description: "{language == 'fr'
|
|
264
|
+
? 'Les {entity_plural} méritent leur propre module avec CRUD complet, permissions et navigation'
|
|
265
|
+
: '{entity_plural} deserve their own module with full CRUD, permissions and navigation'}"
|
|
266
|
+
- label: "{language == 'fr' ? 'Système externe' : 'External system'}"
|
|
267
|
+
description: "{language == 'fr'
|
|
268
|
+
? 'Les {entity_plural} viennent d\'un autre système (import ou API)'
|
|
269
|
+
: '{entity_plural} come from another system (import or API)'}"
|
|
270
|
+
- label: "{language == 'fr' ? 'Liste simple en config' : 'Simple config list'}"
|
|
271
|
+
description: "{language == 'fr'
|
|
272
|
+
? 'Juste une liste configurable par l\'admin, pas un module complet'
|
|
273
|
+
: 'Just a configurable list managed by admin, not a full module'}"
|
|
274
|
+
```
|
|
158
275
|
|
|
159
|
-
|
|
276
|
+
**Processing each answer:**
|
|
277
|
+
|
|
278
|
+
| Choice | Action |
|
|
279
|
+
|--------|--------|
|
|
280
|
+
| **Gérés dans l'app** | Entity stays as a child/section of the current module. Note in coverageMatrix. |
|
|
281
|
+
| **Nouveau module dédié** | **Add new module to `{pre_analysis}.detected_modules[]`**. Flag for inclusion in decomposition (step-02). Add to `coverageMatrix` as mustHave with anticipated sections (list, detail, create, edit). This module becomes a dependency of the referencing module. |
|
|
282
|
+
| **Système externe** | Flag for integration specification. Add to `coverageMatrix` as integration. Load `questionnaire/05-integrations.md` if not already loaded. |
|
|
283
|
+
| **Liste simple en config** | Entity becomes a lookup/reference table (no dedicated module). Note in coverageMatrix as config data. |
|
|
284
|
+
|
|
285
|
+
> **CRITICAL:** The "Nouveau module dédié" option is essential for detecting modules not mentioned in the original brief. Without it, complex entities get reduced to simple config lists when they deserve full CRUD management.
|
|
286
|
+
|
|
287
|
+
#### 4e. Risks & Success Criteria (ALWAYS — from `questionnaire/14-risk-assumptions.md` and `questionnaire/15-success-metrics.md`)
|
|
288
|
+
|
|
289
|
+
Select the most pertinent questions:
|
|
290
|
+
- **14-risk-assumptions.md:** Q14.1 (identified risks), Q14.4 (unvalidated assumptions)
|
|
291
|
+
- **15-success-metrics.md:** Q15.1 (success definition), Q15.4 (measurable objectives)
|
|
292
|
+
|
|
293
|
+
Ask in 1 batch via AskUserQuestion.
|
|
294
|
+
|
|
295
|
+
#### 4f. Conditional Deep-Dives
|
|
296
|
+
|
|
297
|
+
Based on brief analysis, load additional categories if relevant:
|
|
298
|
+
|
|
299
|
+
| Condition | Category | Questionnaire |
|
|
300
|
+
|-----------|----------|---------------|
|
|
301
|
+
| Security or compliance mentioned | 06 | `questionnaire/06-security.md` |
|
|
302
|
+
| External system integration | 05 | `questionnaire/05-integrations.md` |
|
|
303
|
+
| Performance requirements | 08 | `questionnaire/08-performance.md` |
|
|
304
|
+
| Technical constraints | 09 | `questionnaire/09-constraints.md` |
|
|
305
|
+
| Documentation needs | 10 | `questionnaire/10-documentation.md` |
|
|
306
|
+
|
|
307
|
+
> **Categories 04 (data), 07 (UI), 11 (lifecycle), 12 (migration), 13 (cross-module) are per-module and loaded in step-03.**
|
|
308
|
+
|
|
309
|
+
---
|
|
160
310
|
|
|
161
|
-
|
|
311
|
+
## PHASE 4: ANTICIPATION (Suggest Unexpressed Needs)
|
|
312
|
+
|
|
313
|
+
### 5. Proactive Suggestions
|
|
314
|
+
|
|
315
|
+
> **An expert analyst doesn't just capture what is said.**
|
|
316
|
+
> They anticipate what the client hasn't thought to ask for.
|
|
317
|
+
|
|
318
|
+
**Process:**
|
|
319
|
+
|
|
320
|
+
1. Load: `patterns/suggestion-catalog.md`
|
|
321
|
+
2. Match suggestion patterns against the project context (domain, modules, features)
|
|
322
|
+
3. Add implicit needs for this type of system that weren't mentioned
|
|
323
|
+
|
|
324
|
+
4. **Display as markdown** (direct text, NOT inside AskUserQuestion):
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
## {language == "fr" ? "Besoins complémentaires que je vous suggère" : "Complementary needs I suggest"}
|
|
328
|
+
|
|
329
|
+
{language == "fr"
|
|
330
|
+
? "D'après mon analyse de votre besoin, voici des aspects que vous n'avez peut-être pas mentionnés mais qui sont souvent nécessaires pour ce type d'application :"
|
|
331
|
+
: "Based on my analysis of your need, here are aspects you may not have mentioned but that are often necessary for this type of application:"}
|
|
332
|
+
|
|
333
|
+
| # | Suggestion | Justification | Module concerné |
|
|
334
|
+
|---|-----------|---------------|-----------------|
|
|
335
|
+
| 1 | {suggestion} | {why it's relevant for THIS project} | {module} |
|
|
336
|
+
| 2 | {suggestion} | {why} | {module} |
|
|
337
|
+
| 3 | {suggestion} | {why} | {module} |
|
|
338
|
+
| ... | ... | ... | ... |
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
5. Then ask via AskUserQuestion (multiSelect: true):
|
|
342
|
+
```
|
|
343
|
+
question: "{language == 'fr' ? 'Quelles suggestions souhaitez-vous inclure dans le périmètre ?' : 'Which suggestions would you like to include in scope?'}"
|
|
344
|
+
header: "Suggestions"
|
|
345
|
+
multiSelect: true
|
|
346
|
+
options:
|
|
347
|
+
- label: "{suggestion 1 short name}"
|
|
348
|
+
description: "{justification in 1 sentence}"
|
|
349
|
+
- label: "{suggestion 2 short name}"
|
|
350
|
+
description: "{justification in 1 sentence}"
|
|
351
|
+
- label: "{suggestion 3 short name}"
|
|
352
|
+
description: "{justification in 1 sentence}"
|
|
353
|
+
- label: "{language == 'fr' ? 'Aucune' : 'None'}"
|
|
354
|
+
description: "{language == 'fr' ? 'Je n\'ai pas besoin de ces suggestions' : 'I don\'t need any of these suggestions'}"
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
6. Accepted suggestions enrich `coverageMatrix` and `globalScope`.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## PHASE 5: PERIMETRE (Bound Scope)
|
|
362
|
+
|
|
363
|
+
### 6. Application Roles Definition
|
|
162
364
|
|
|
163
365
|
> **Define roles at the APPLICATION level, not per-module.**
|
|
164
366
|
|
|
165
|
-
|
|
166
|
-
Propose the standard 4-tier roles:
|
|
367
|
+
Propose the standard 4-tier roles:
|
|
167
368
|
|
|
168
369
|
```
|
|
169
370
|
Application Roles for {application_name}:
|
|
@@ -178,102 +379,152 @@ Application Roles for {application_name}:
|
|
|
178
379
|
|
|
179
380
|
Ask via AskUserQuestion:
|
|
180
381
|
```
|
|
181
|
-
question: "Ces 4 rôles conviennent-ils pour
|
|
382
|
+
question: "{language == 'fr' ? 'Ces 4 rôles conviennent-ils pour votre application ?' : 'Do these 4 roles suit your application?'}"
|
|
182
383
|
header: "Rôles"
|
|
183
384
|
options:
|
|
184
|
-
- label: "Oui, parfait"
|
|
185
|
-
description: "Utiliser les 4 rôles standards tels quels"
|
|
186
|
-
- label: "Renommer"
|
|
187
|
-
description: "Garder 4 niveaux mais personnaliser les noms"
|
|
188
|
-
- label: "Personnaliser"
|
|
189
|
-
description: "Modifier le nombre ou les permissions des rôles"
|
|
385
|
+
- label: "{language == 'fr' ? 'Oui, parfait' : 'Yes, perfect'}"
|
|
386
|
+
description: "{language == 'fr' ? 'Utiliser les 4 rôles standards tels quels' : 'Use the 4 standard roles as-is'}"
|
|
387
|
+
- label: "{language == 'fr' ? 'Renommer' : 'Rename'}"
|
|
388
|
+
description: "{language == 'fr' ? 'Garder 4 niveaux mais personnaliser les noms' : 'Keep 4 levels but customize names'}"
|
|
389
|
+
- label: "{language == 'fr' ? 'Personnaliser' : 'Customize'}"
|
|
390
|
+
description: "{language == 'fr' ? 'Modifier le nombre ou les permissions des rôles' : 'Modify number or permissions of roles'}"
|
|
190
391
|
```
|
|
191
392
|
|
|
192
393
|
IF single-module mode:
|
|
193
394
|
Same role definition but inferred from stakeholders
|
|
194
395
|
|
|
195
|
-
###
|
|
396
|
+
### 6b. Table Prefix Definition (MANDATORY)
|
|
196
397
|
|
|
197
|
-
> **
|
|
398
|
+
> **Every business application MUST define a table prefix.**
|
|
399
|
+
> This prefix identifies which application a database table belongs to (e.g., `rh_Employees`, `fi_Invoices`).
|
|
198
400
|
|
|
199
|
-
|
|
401
|
+
**Process:**
|
|
200
402
|
|
|
201
|
-
1.
|
|
202
|
-
2
|
|
203
|
-
|
|
204
|
-
4. Store accepted suggestions in `suggestions[]`
|
|
403
|
+
1. Derive a suggested prefix from the application name:
|
|
404
|
+
- Use the most recognizable abbreviation (2-5 lowercase letters + `_`)
|
|
405
|
+
- Examples: HumanResources → `rh_`, SalesManagement → `sales_`, Finance → `fi_`, CRM → `crm_`
|
|
205
406
|
|
|
206
|
-
|
|
407
|
+
2. **Display as markdown** (direct text output):
|
|
207
408
|
|
|
208
|
-
Ask via AskUserQuestion:
|
|
209
409
|
```
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
410
|
+
{language == "fr"
|
|
411
|
+
? "### Préfixe de table\n\nToutes les tables de cette application en base de données porteront un préfixe pour identifier leur appartenance.\n\nPréfixe suggéré : **`{suggested_prefix}`**\n\nExemple : `{suggested_prefix}Employees`, `{suggested_prefix}Contracts`"
|
|
412
|
+
: "### Table Prefix\n\nAll database tables for this application will carry a prefix to identify their ownership.\n\nSuggested prefix: **`{suggested_prefix}`**\n\nExample: `{suggested_prefix}Employees`, `{suggested_prefix}Contracts`"}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
3. Ask via AskUserQuestion:
|
|
416
|
+
```
|
|
417
|
+
question: "{language == 'fr' ? 'Ce préfixe de table vous convient-il ?' : 'Does this table prefix work for you?'}"
|
|
418
|
+
header: "Préfixe"
|
|
213
419
|
options:
|
|
214
|
-
- label: "
|
|
215
|
-
description: "
|
|
216
|
-
- label: "
|
|
217
|
-
description: "
|
|
218
|
-
- label: "Dépendances techniques"
|
|
219
|
-
description: "Dépendance à des systèmes externes ou des APIs"
|
|
220
|
-
- label: "Complexité fonctionnelle"
|
|
221
|
-
description: "Règles métier complexes ou mal documentées"
|
|
420
|
+
- label: "{language == 'fr' ? 'Oui, parfait' : 'Yes, perfect'}"
|
|
421
|
+
description: "{language == 'fr' ? 'Utiliser le préfixe suggéré' : 'Use the suggested prefix'}"
|
|
422
|
+
- label: "{language == 'fr' ? 'Personnaliser' : 'Customize'}"
|
|
423
|
+
description: "{language == 'fr' ? 'Choisir un autre préfixe (2-5 lettres minuscules + _)' : 'Choose a different prefix (2-5 lowercase letters + _)'}"
|
|
222
424
|
```
|
|
223
425
|
|
|
224
|
-
|
|
225
|
-
- High/High → Critical (mitigation required)
|
|
226
|
-
- High/Low or Low/High → Medium (monitor)
|
|
227
|
-
- Low/Low → Low (accept)
|
|
426
|
+
4. IF "Customize" → ask for custom prefix via AskUserQuestion (open-ended "Other" option)
|
|
228
427
|
|
|
229
|
-
|
|
428
|
+
5. **Validate the prefix:**
|
|
429
|
+
- Format: `^[a-z]{2,5}_$` (2-5 lowercase letters followed by underscore)
|
|
430
|
+
- Must NOT collide with platform prefixes: `auth_`, `nav_`, `usr_`, `ai_`, `cfg_`, `wkf_`, `support_`, `entra_`, `ref_`, `loc_`, `lic_`, `tenant_`
|
|
431
|
+
- If collision detected → ask the user to choose another prefix
|
|
432
|
+
|
|
433
|
+
6. Store in `metadata.tablePrefix`
|
|
230
434
|
|
|
231
|
-
|
|
435
|
+
### 7. Coverage Matrix with Sections & Resources (MANDATORY)
|
|
232
436
|
|
|
233
|
-
|
|
437
|
+
> **ENRICHMENT: The coverage matrix now includes anticipated sections (Level 4) and resources (Level 5).**
|
|
438
|
+
> This gives downstream steps (step-02, step-03) a concrete starting point.
|
|
234
439
|
|
|
235
440
|
BEFORE transitioning to step-02:
|
|
236
441
|
|
|
237
442
|
1. Re-read the original prompt/brief in its entirety
|
|
238
|
-
2.
|
|
239
|
-
|
|
443
|
+
2. Re-read ALL answers collected during phases 2-4
|
|
444
|
+
3. For EACH distinct feature/requirement identified:
|
|
445
|
+
a. Create an entry in `cadrage.coverageMatrix[]`
|
|
240
446
|
b. Assign it to mustHave, shouldHave, couldHave, or outOfScope
|
|
241
447
|
c. Assign the module that will cover it (or null if cross-cutting)
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
4.
|
|
246
|
-
|
|
448
|
+
d. **List anticipated sections** (Level 4) based on module type and feature needs
|
|
449
|
+
e. **List anticipated resources** (Level 5) for each section
|
|
450
|
+
|
|
451
|
+
4. **OUTPUT the matrix as text** (do NOT put it inside AskUserQuestion — it won't render):
|
|
452
|
+
|
|
453
|
+
Print a markdown table with columns: **Fonctionnalité | Priorité | Module | Sections pressenties | Resources clés**
|
|
454
|
+
|
|
455
|
+
Example:
|
|
456
|
+
```
|
|
457
|
+
{language == "fr"
|
|
458
|
+
? "Voici la matrice de couverture enrichie. J'ai identifié {N} fonctionnalités :"
|
|
459
|
+
: "Here is the enriched coverage matrix. I identified {N} features:"}
|
|
460
|
+
|
|
461
|
+
| Fonctionnalité | Priorité | Module | Sections pressenties | Resources clés |
|
|
462
|
+
|---|---|---|---|---|
|
|
463
|
+
| Gestion des employés | mustHave | Employees | list, detail, create, edit | employee-grid, employee-form, employee-card |
|
|
464
|
+
| Saisie d'activités | mustHave | TimeTracking | list, create, edit | activity-grid, activity-form |
|
|
465
|
+
| Saisie d'absences | mustHave | TimeTracking | list, create | absence-grid, absence-form, absence-calendar |
|
|
466
|
+
| Rapports temps | mustHave | TimeTracking | dashboard, export | time-summary-chart, time-export-panel |
|
|
467
|
+
| Soldes de congés | shouldHave | TimeTracking | detail | leave-balance-card |
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
5. **THEN** (after the table is displayed) ask via AskUserQuestion:
|
|
471
|
+
```
|
|
472
|
+
question: "{language == 'fr' ? 'Cette matrice de couverture vous convient-elle ?' : 'Does this coverage matrix suit you?'}"
|
|
473
|
+
header: "Couverture"
|
|
474
|
+
options:
|
|
475
|
+
- label: "{language == 'fr' ? 'Oui, parfait' : 'Yes, perfect'}"
|
|
476
|
+
description: "{language == 'fr' ? 'La classification et les sections sont correctes' : 'Classification and sections are correct'}"
|
|
477
|
+
- label: "{language == 'fr' ? 'Ajouter des éléments' : 'Add items'}"
|
|
478
|
+
description: "{language == 'fr' ? 'Il manque des fonctionnalités ou des sections' : 'Missing features or sections'}"
|
|
479
|
+
- label: "{language == 'fr' ? 'Réajuster' : 'Readjust'}"
|
|
480
|
+
description: "{language == 'fr' ? 'Modifier les priorités, modules ou sections' : 'Change priorities, modules, or sections'}"
|
|
481
|
+
```
|
|
247
482
|
|
|
248
|
-
|
|
249
|
-
If a feature is in mustHave → it MUST have at least one UC in the corresponding module (verified in step-03).
|
|
483
|
+
6. Iterate until the client confirms.
|
|
250
484
|
|
|
251
|
-
|
|
485
|
+
**VALIDATION:**
|
|
486
|
+
- Every line of the original prompt must map to at least one coverageMatrix entry.
|
|
487
|
+
- If a feature is in mustHave → it MUST have at least one anticipated section.
|
|
488
|
+
- Accepted suggestions from Phase 4 must appear in the matrix.
|
|
252
489
|
|
|
253
|
-
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## WRITE & SUMMARY
|
|
493
|
+
|
|
494
|
+
### 8. Write Cadrage to Feature.json
|
|
495
|
+
|
|
496
|
+
Use ba-writer to enrich master feature.json. **Follow the STRUCTURE CARDS exactly.**
|
|
254
497
|
|
|
255
498
|
See [references/cadrage-structure-cards.md](../references/cadrage-structure-cards.md) for exact JSON formats of: `stakeholders[]`, `applicationRoles[]`, `risks[]`, `acceptanceCriteria[]`, `coverageMatrix[]`, `codebaseContext`.
|
|
256
499
|
|
|
257
500
|
```
|
|
501
|
+
ba-writer.enrichSection({
|
|
502
|
+
featureId: {feature_id},
|
|
503
|
+
section: "metadata",
|
|
504
|
+
data: {
|
|
505
|
+
tablePrefix: "{from Phase 5, section 6b — validated prefix, e.g., rh_}"
|
|
506
|
+
}
|
|
507
|
+
})
|
|
508
|
+
|
|
258
509
|
ba-writer.enrichSection({
|
|
259
510
|
featureId: {feature_id},
|
|
260
511
|
section: "cadrage",
|
|
261
512
|
data: {
|
|
262
|
-
problem: {Q1.1 answer},
|
|
263
|
-
asIs: {Q1.
|
|
264
|
-
toBe: {Q1.
|
|
265
|
-
trigger: {Q1.
|
|
266
|
-
stakeholders: [{
|
|
513
|
+
problem: {from Phase 3, section 4a — Q1.1 answer or refined problem},
|
|
514
|
+
asIs: {from Phase 3, section 4a — Q1.4 answer},
|
|
515
|
+
toBe: {from Phase 3, section 4a — Q1.8 answer},
|
|
516
|
+
trigger: {from Phase 3, section 4a — Q1.11 answer},
|
|
517
|
+
stakeholders: [{from Phase 3, section 4b — use STRUCTURE CARD format}],
|
|
267
518
|
globalScope: {
|
|
268
|
-
mustHave: [{from
|
|
269
|
-
shouldHave: [{from
|
|
270
|
-
couldHave: [{from
|
|
271
|
-
outOfScope: [{from Q3.
|
|
519
|
+
mustHave: [{from Phase 3, section 4c + Phase 4 accepted suggestions}],
|
|
520
|
+
shouldHave: [{from coverage matrix}],
|
|
521
|
+
couldHave: [{from coverage matrix}],
|
|
522
|
+
outOfScope: [{from Phase 3, section 4c — Q3.4 exclusions}]
|
|
272
523
|
},
|
|
273
|
-
applicationRoles: [{from section 6 — use STRUCTURE CARD format}],
|
|
274
|
-
risks: [{from section
|
|
275
|
-
acceptanceCriteria: [{
|
|
276
|
-
coverageMatrix: [{from section
|
|
524
|
+
applicationRoles: [{from Phase 5, section 6 — use STRUCTURE CARD format}],
|
|
525
|
+
risks: [{from Phase 3, section 4e — use STRUCTURE CARD format}],
|
|
526
|
+
acceptanceCriteria: [{from Phase 3, section 4e — use STRUCTURE CARD format}],
|
|
527
|
+
coverageMatrix: [{from Phase 5, section 7 — use STRUCTURE CARD format with anticipatedSections and anticipatedResources}],
|
|
277
528
|
codebaseContext: "{string summary of codebase findings}"
|
|
278
529
|
}
|
|
279
530
|
})
|
|
@@ -281,7 +532,7 @@ ba-writer.enrichSection({
|
|
|
281
532
|
ba-writer.updateStatus({feature_id}, "framed")
|
|
282
533
|
```
|
|
283
534
|
|
|
284
|
-
###
|
|
535
|
+
### 9. Display Summary
|
|
285
536
|
|
|
286
537
|
```
|
|
287
538
|
## Cadrage Complete - {feature_id}
|
|
@@ -293,10 +544,14 @@ ba-writer.updateStatus({feature_id}, "framed")
|
|
|
293
544
|
| Application roles | {count} |
|
|
294
545
|
| Risks identified | {count} |
|
|
295
546
|
| Suggestions accepted | {count} |
|
|
547
|
+
| Anticipated sections | {total across all modules} |
|
|
296
548
|
|
|
297
549
|
### Application Roles
|
|
298
550
|
{table of roles with permission levels}
|
|
299
551
|
|
|
552
|
+
### Coverage Highlights
|
|
553
|
+
{top 3-5 must-have items with their anticipated sections}
|
|
554
|
+
|
|
300
555
|
### Next Step
|
|
301
556
|
→ Module decomposition (step-02-decomposition.md)
|
|
302
557
|
```
|