@atlashub/smartstack-cli 1.33.0 → 1.35.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/installation.html +60 -38
- package/dist/index.js +1098 -582
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/docs-context-reader.md +125 -0
- package/templates/agents/docs-sync-checker.md +122 -0
- package/templates/hooks/docs-drift-check.md +97 -0
- package/templates/skills/_resources/context-digest-template.md +53 -0
- package/templates/skills/_resources/doc-context-cache.md +62 -0
- package/templates/skills/_resources/docs-manifest-schema.md +157 -0
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +183 -0
- package/templates/skills/_shared.md +8 -0
- package/templates/skills/apex/SKILL.md +6 -0
- package/templates/skills/apex/steps/step-00-init.md +9 -0
- package/templates/skills/apex/steps/step-01-analyze.md +36 -0
- package/templates/skills/apex/steps/step-02-plan.md +38 -0
- package/templates/skills/apex/steps/step-03-execute.md +39 -0
- package/templates/skills/apex/steps/step-04-validate.md +31 -1
- package/templates/skills/apex/steps/step-04b-doc-sync.md +162 -0
- package/templates/skills/apex/steps/step-05-examine.md +7 -0
- package/templates/skills/apex/templates/04b-doc-sync.md +31 -0
- package/templates/skills/apex/templates/context-digest.md +35 -0
- package/templates/skills/business-analyse/SKILL.md +18 -5
- package/templates/skills/business-analyse/_shared.md +306 -4
- package/templates/skills/business-analyse/questionnaire/01-context.md +21 -6
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +34 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +23 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +44 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +29 -7
- package/templates/skills/business-analyse/questionnaire/06-security.md +28 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +32 -7
- package/templates/skills/business-analyse/questionnaire/08-performance.md +21 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +29 -6
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +27 -6
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +59 -0
- package/templates/skills/business-analyse/questionnaire/12-migration.md +58 -0
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +69 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -16
- package/templates/skills/business-analyse/steps/step-01-discover.md +530 -85
- package/templates/skills/business-analyse/steps/step-02-analyse.md +81 -25
- package/templates/skills/business-analyse/steps/step-03-specify.md +116 -24
- package/templates/skills/business-analyse/steps/step-04-validate.md +107 -33
- package/templates/skills/business-analyse/steps/step-05-handoff.md +256 -33
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +84 -25
- package/templates/skills/business-analyse/templates/{frd-handoff.md → tpl-handoff.md} +18 -4
- package/templates/skills/business-analyse/templates-frd.md +19 -5
- package/templates/skills/business-analyse/tracking/change-template.md +30 -0
- package/templates/skills/documentation/SKILL.md +68 -31
- package/templates/skills/documentation/data-schema.md +198 -0
- package/templates/skills/documentation/templates.md +30 -1
- package/templates/skills/gitflow/steps/step-init.md +268 -20
- package/templates/skills/gitflow/templates/config.json +7 -0
- package/templates/skills/ralph-loop/SKILL.md +3 -0
- /package/templates/skills/business-analyse/templates/{frd-brd.md → tpl-brd.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-discovery.md → tpl-discovery.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-spec.md → tpl-frd.md} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Step 04b: Documentation Sync
|
|
2
|
+
|
|
3
|
+
**Task:** {{task_description}}
|
|
4
|
+
**Started:** {{timestamp}}
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Manifest Status
|
|
9
|
+
- **Found:** Yes | No
|
|
10
|
+
- **Modules in manifest:** {{count}}
|
|
11
|
+
|
|
12
|
+
## Affected Modules
|
|
13
|
+
|
|
14
|
+
| Module | Changed Files | Impacted Sections | Updated |
|
|
15
|
+
|--------|---------------|-------------------|---------|
|
|
16
|
+
|
|
17
|
+
## Documentation Updates
|
|
18
|
+
|
|
19
|
+
### Module: {{module_path}}
|
|
20
|
+
- **frd-data.ts:** Updated fields: {{fields}}
|
|
21
|
+
- **i18n FR:** {{updated|no_change}}
|
|
22
|
+
- **Manifest:** Status → synced
|
|
23
|
+
|
|
24
|
+
## Summary
|
|
25
|
+
|
|
26
|
+
- **Modules checked:** {{count}}
|
|
27
|
+
- **Modules updated:** {{count}}
|
|
28
|
+
- **Modules skipped:** {{count}} (no documentation)
|
|
29
|
+
- **Sections updated:** {{count}}
|
|
30
|
+
|
|
31
|
+
**Status:** Complete
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Context Digest Template
|
|
2
|
+
|
|
3
|
+
> This template defines the format for context digests generated between APEX steps.
|
|
4
|
+
> Each step produces a digest (max 50 lines) that replaces reading full output files.
|
|
5
|
+
|
|
6
|
+
## Digest Format
|
|
7
|
+
|
|
8
|
+
```markdown
|
|
9
|
+
# Digest: step-{NN}
|
|
10
|
+
|
|
11
|
+
## Changes ({count} files)
|
|
12
|
+
- `path/file.ts` - {brief description of what changed}
|
|
13
|
+
- `path/other.ts` - {brief description}
|
|
14
|
+
|
|
15
|
+
## Decisions
|
|
16
|
+
- {key architectural or implementation decision}
|
|
17
|
+
|
|
18
|
+
## Findings
|
|
19
|
+
- {issue or pattern identified}
|
|
20
|
+
|
|
21
|
+
## State Updates
|
|
22
|
+
- {variable}: {new_value}
|
|
23
|
+
|
|
24
|
+
## For Next Step
|
|
25
|
+
- {what the next step needs to know}
|
|
26
|
+
- {specific files to read if needed}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- **Max 50 lines** total
|
|
32
|
+
- **Paths only** for files (no content)
|
|
33
|
+
- **1 line per item** (no multi-line descriptions)
|
|
34
|
+
- **Skip empty sections** (if no decisions, omit Decisions)
|
|
35
|
+
- **Resume mode exception**: When resuming (`-r`), read full output files instead of digest
|
|
@@ -106,6 +106,15 @@ All outputs saved to PROJECT directory:
|
|
|
106
106
|
├── bugs/
|
|
107
107
|
└── hotfixes/
|
|
108
108
|
```
|
|
109
|
+
|
|
110
|
+
**Ralph Loop files (generated by step-05):**
|
|
111
|
+
```
|
|
112
|
+
.ralph/
|
|
113
|
+
├── prd.json # Task breakdown for /ralph-loop -r
|
|
114
|
+
├── progress.txt # Links to BA documents
|
|
115
|
+
├── logs/
|
|
116
|
+
└── reports/
|
|
117
|
+
```
|
|
109
118
|
</output_structure>
|
|
110
119
|
|
|
111
120
|
<resume_workflow>
|
|
@@ -187,6 +196,9 @@ Load ONLY relevant categories based on feature type:
|
|
|
187
196
|
| 08 | `questionnaire/08-performance.md` | If performance-critical |
|
|
188
197
|
| 09 | `questionnaire/09-constraints.md` | If constraints exist |
|
|
189
198
|
| 10 | `questionnaire/10-documentation.md` | If doc required |
|
|
199
|
+
| 11 | `questionnaire/11-data-lifecycle.md` | If data-centric or full module |
|
|
200
|
+
| 12 | `questionnaire/12-migration.md` | Always for new modules |
|
|
201
|
+
| 13 | `questionnaire/13-cross-module.md` | Always for new modules |
|
|
190
202
|
|
|
191
203
|
</questionnaire_files>
|
|
192
204
|
|
|
@@ -195,10 +207,10 @@ Load ONLY relevant categories based on feature type:
|
|
|
195
207
|
|
|
196
208
|
| Template | File | Used in step |
|
|
197
209
|
| -------- | ----------------------------- | ------------ |
|
|
198
|
-
| discovery | `templates/
|
|
199
|
-
| brd | `templates/
|
|
200
|
-
| frd | `templates/frd
|
|
201
|
-
| handoff | `templates/
|
|
210
|
+
| discovery | `templates/tpl-discovery.md` | 01 |
|
|
211
|
+
| brd | `templates/tpl-brd.md` | 02 |
|
|
212
|
+
| frd | `templates/tpl-frd.md` | 03 |
|
|
213
|
+
| handoff | `templates/tpl-handoff.md` | 05 |
|
|
202
214
|
|
|
203
215
|
</template_files>
|
|
204
216
|
|
|
@@ -218,6 +230,7 @@ Load ONLY relevant categories based on feature type:
|
|
|
218
230
|
- Each step loaded progressively (max 300-400 lines/step)
|
|
219
231
|
- All outputs saved to feature folder
|
|
220
232
|
- Validation gate passed (APPROVED)
|
|
221
|
-
- Development handoff ready for `/
|
|
233
|
+
- Development handoff ready for `/ralph-loop -r` (iterative) or `/feature-full` (one-shot)
|
|
234
|
+
- Ralph Loop prd.json generated with atomic task breakdown
|
|
222
235
|
- Clear completion summary with next steps
|
|
223
236
|
</success_criteria>
|
|
@@ -16,13 +16,13 @@ steps/step-00-init.md (parse flags, create state)
|
|
|
16
16
|
↓
|
|
17
17
|
steps/step-01-discover.md (charge questionnaire/XX.md on-demand)
|
|
18
18
|
↓
|
|
19
|
-
steps/step-02-analyse.md (charge templates/
|
|
19
|
+
steps/step-02-analyse.md (charge templates/tpl-brd.md)
|
|
20
20
|
↓
|
|
21
|
-
steps/step-03-specify.md (charge templates/frd
|
|
21
|
+
steps/step-03-specify.md (charge templates/tpl-frd.md)
|
|
22
22
|
↓
|
|
23
23
|
steps/step-04-validate.md (validation gate)
|
|
24
24
|
↓
|
|
25
|
-
steps/step-05-handoff.md (charge templates/
|
|
25
|
+
steps/step-05-handoff.md (charge templates/tpl-handoff.md)
|
|
26
26
|
↓
|
|
27
27
|
steps/step-06-doc-html.md (charge react/*.md on-demand)
|
|
28
28
|
```
|
|
@@ -46,6 +46,82 @@ validate_business_context(context):
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
+
## Architecture SmartStack (Référence BA)
|
|
50
|
+
|
|
51
|
+
> **Objectif :** Fournir le contexte architectural au BA pour des questions pertinentes et des recommandations alignées.
|
|
52
|
+
|
|
53
|
+
### 5 Couches (Clean Architecture)
|
|
54
|
+
|
|
55
|
+
| Couche | Projet | Contenu | Impact BA |
|
|
56
|
+
|--------|--------|---------|-----------|
|
|
57
|
+
| **Domain** | `SmartStack.Domain` | Entités, enums, interfaces | Entités identifiées en discovery |
|
|
58
|
+
| **Application** | `SmartStack.Application` | CQRS (Commands/Queries), validations, DTOs | Use cases de la spécification |
|
|
59
|
+
| **Infrastructure** | `SmartStack.Infrastructure` | EF Core, services externes, jobs | Intégrations et contraintes techniques |
|
|
60
|
+
| **API** | `SmartStack.API` | Controllers REST, permissions | Endpoints et sécurité |
|
|
61
|
+
| **Web** | `smartstack-web` | React 19, pages, composants | UI/UX et navigation |
|
|
62
|
+
|
|
63
|
+
### Hiérarchie de Navigation
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Context (business) → Application (Sales) → Module (Orders) → Section (list/detail)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Route pattern : `/business/{application}/{module}/{section}`
|
|
70
|
+
|
|
71
|
+
### Classes de Base des Entités
|
|
72
|
+
|
|
73
|
+
| Classe | Champs auto-inclus | Quand utiliser |
|
|
74
|
+
|--------|--------------------|----------------|
|
|
75
|
+
| `Entity` | `Id` (Guid) | Entité simple sans audit |
|
|
76
|
+
| `AuditableEntity` | + `CreatedBy`, `CreatedDate`, `ModifiedBy`, `ModifiedDate` | **Défaut pour toute entité métier** |
|
|
77
|
+
| `SoftDeletableEntity` | + `IsDeleted`, `DeletedBy`, `DeletedDate` | Entité avec suppression logique |
|
|
78
|
+
| `HierarchicalEntity` | + `ParentId`, `Level`, `Path` | Arborescences (catégories, menus) |
|
|
79
|
+
|
|
80
|
+
> **IMPORTANT :** Ne JAMAIS proposer `CreatedBy`, `ModifiedBy`, `IsDeleted` comme champs explicites — ils sont AUTOMATIQUES via la classe de base.
|
|
81
|
+
|
|
82
|
+
### Services d'Intégration Disponibles
|
|
83
|
+
|
|
84
|
+
| Service | Interface | Quand le proposer |
|
|
85
|
+
|---------|-----------|-------------------|
|
|
86
|
+
| Notifications in-app | `INotificationService` | Alertes, événements, rappels |
|
|
87
|
+
| Workflow automatisé | `IWorkflowService` | Emails transactionnels, webhooks, actions chaînées |
|
|
88
|
+
| Complétion IA | `IAICompletionService` | Suggestions, classification, génération contenu |
|
|
89
|
+
| SignalR temps réel | `IHubContext<BusinessHub>` | Mises à jour en temps réel |
|
|
90
|
+
| Jobs planifiés | Hangfire `IBackgroundJobClient` | Traitements différés, purges, imports |
|
|
91
|
+
|
|
92
|
+
### Conventions Base de Données
|
|
93
|
+
|
|
94
|
+
| Aspect | Convention |
|
|
95
|
+
|--------|------------|
|
|
96
|
+
| Schema | `core` (socle) vs `ext` (extensions/métier) |
|
|
97
|
+
| Tables | PascalCase au pluriel (`Orders`, `OrderLines`) |
|
|
98
|
+
| FK | `{Entity}Id` (ex: `ClientId`, `OrderId`) |
|
|
99
|
+
| Index | `IX_{Table}_{Column}` |
|
|
100
|
+
| Migration | 1 migration par feature, nommée via MCP |
|
|
101
|
+
|
|
102
|
+
### Contraintes Non-Négociables
|
|
103
|
+
|
|
104
|
+
| Contrainte | Détail |
|
|
105
|
+
|------------|--------|
|
|
106
|
+
| **Multi-tenant** | `TenantId` sur toute entité métier, isolation automatique |
|
|
107
|
+
| **RBAC** | Permissions `business.{app}.{module}.{action}`, HasData pattern |
|
|
108
|
+
| **CQRS** | Commands (write) et Queries (read) séparés via MediatR |
|
|
109
|
+
| **Validation** | FluentValidation pour toute commande |
|
|
110
|
+
| **i18n** | 4 langues obligatoires (fr, en, it, de) |
|
|
111
|
+
| **Soft Delete** | Pas de DELETE physique sauf purge RGPD planifiée |
|
|
112
|
+
|
|
113
|
+
### Outils MCP Pertinents pour le BA
|
|
114
|
+
|
|
115
|
+
| Phase BA | Outil MCP | Usage |
|
|
116
|
+
|----------|-----------|-------|
|
|
117
|
+
| Pre-research (01) | `analyze_extension_points` | Découvrir modules/entités existants |
|
|
118
|
+
| Pre-research (01) | `api_docs` | Consulter la documentation API existante |
|
|
119
|
+
| Analyse (02) | `validate_conventions` | Vérifier les noms d'entités proposés |
|
|
120
|
+
| Spécification (03) | `generate_permissions` | Générer la matrice de permissions |
|
|
121
|
+
| Handoff (05) | `scaffold_extension` | Préparer le scaffolding |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
49
125
|
## Feature Directory Structure
|
|
50
126
|
|
|
51
127
|
```
|
|
@@ -65,10 +141,24 @@ validate_business_context(context):
|
|
|
65
141
|
├── 4-development-handoff.md
|
|
66
142
|
└── tracking/
|
|
67
143
|
├── changes/
|
|
144
|
+
│ └── CHANGE-NNN.md
|
|
68
145
|
├── bugs/
|
|
69
|
-
|
|
146
|
+
├── hotfixes/
|
|
147
|
+
└── docs-manifest-entry.json
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Ralph Loop Integration (generated by step-05):**
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
.ralph/
|
|
154
|
+
├── prd.json # Task breakdown derived from handoff (for /ralph-loop -r)
|
|
155
|
+
├── progress.txt # Links back to BA feature documents
|
|
156
|
+
├── logs/
|
|
157
|
+
└── reports/
|
|
70
158
|
```
|
|
71
159
|
|
|
160
|
+
> **Note:** `.ralph/prd.json` is generated by step-05-handoff from the file mapping, business rules, and test requirements. It provides an atomic task list following the SmartStack layer order (Domain -> Application -> Infrastructure -> API -> Frontend -> i18n -> Tests -> Validation).
|
|
161
|
+
|
|
72
162
|
---
|
|
73
163
|
|
|
74
164
|
## Feature ID Generation
|
|
@@ -97,6 +187,129 @@ generate_feature_id():
|
|
|
97
187
|
|
|
98
188
|
---
|
|
99
189
|
|
|
190
|
+
## Interactive Elicitation Protocol
|
|
191
|
+
|
|
192
|
+
> **RULE: ALL questions MUST be asked interactively using `AskUserQuestion`.**
|
|
193
|
+
> **NEVER dump a list of questions as text. ALWAYS use the tool.**
|
|
194
|
+
|
|
195
|
+
### Protocol
|
|
196
|
+
|
|
197
|
+
1. **Group questions by theme** — max 4 questions per `AskUserQuestion` call (tool limit)
|
|
198
|
+
2. **Propose predefined options** — for questions with predictable answers, provide 2-4 options
|
|
199
|
+
3. **The user can always choose "Other"** — the tool adds this automatically for free-text answers
|
|
200
|
+
4. **Process answers immediately** — apply ULTRATHINK + follow-ups before moving to next group
|
|
201
|
+
5. **Adapt next questions** — based on previous answers, skip irrelevant questions
|
|
202
|
+
|
|
203
|
+
### Batching Strategy
|
|
204
|
+
|
|
205
|
+
| Category | Questions | Batches |
|
|
206
|
+
|----------|-----------|---------|
|
|
207
|
+
| 01-context | Q1.1-Q1.8 | 2 calls (Q1.1-Q1.4 then Q1.5-Q1.8) |
|
|
208
|
+
| 02-stakeholders | Q2.1-Q2.8 | 2 calls (Q2.1-Q2.4 then Q2.5-Q2.8) |
|
|
209
|
+
| 03-scope | Q3.1-Q3.8 | 2 calls (Q3.1-Q3.4 then Q3.5-Q3.8) |
|
|
210
|
+
| 04-data | Q4.1-Q4.8 | 2 calls (Q4.1-Q4.4 then Q4.5-Q4.8) |
|
|
211
|
+
| 05-integrations | Q5.1-Q5.8 | 2 calls (Q5.1-Q5.4 then Q5.5-Q5.8) |
|
|
212
|
+
| 06-security | Q6.1-Q6.8 | 2 calls (Q6.1-Q6.4 then Q6.5-Q6.8) |
|
|
213
|
+
| 07-10 | Q7-Q10 | 1-2 calls each |
|
|
214
|
+
|
|
215
|
+
### AskUserQuestion Format
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
AskUserQuestion({
|
|
219
|
+
questions: [
|
|
220
|
+
{
|
|
221
|
+
question: "Quel problème métier ce module doit-il résoudre ?",
|
|
222
|
+
header: "Problème", // max 12 chars
|
|
223
|
+
options: [
|
|
224
|
+
{ label: "Processus manuel", description: "Automatiser un processus existant fait manuellement" },
|
|
225
|
+
{ label: "Données dispersées", description: "Centraliser des données éparpillées dans plusieurs outils" },
|
|
226
|
+
{ label: "Manque visibilité", description: "Obtenir des indicateurs et du suivi inexistants aujourd'hui" },
|
|
227
|
+
{ label: "Conformité", description: "Répondre à une obligation réglementaire ou de sécurité" }
|
|
228
|
+
],
|
|
229
|
+
multiSelect: false
|
|
230
|
+
},
|
|
231
|
+
// ... up to 4 questions per call
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### After Each Batch
|
|
237
|
+
|
|
238
|
+
1. **Evaluate answer quality** (see Answer Quality Indicators)
|
|
239
|
+
2. **If insufficient** → follow-up AskUserQuestion with targeted probes from the Elicitation Guide
|
|
240
|
+
3. **If solution-oriented** → reframe using Technique 1 before proceeding
|
|
241
|
+
4. **If sufficient/excellent** → record and move to next batch
|
|
242
|
+
5. **Summarize** what was understood before moving to the next category
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Elicitation Techniques
|
|
247
|
+
|
|
248
|
+
> **Loaded by:** step-01-discover (Opus ULTRATHINK)
|
|
249
|
+
> **Purpose:** Guide HOW to question, not just WHAT to ask.
|
|
250
|
+
|
|
251
|
+
### Technique 1: Solution → Problem Reframing
|
|
252
|
+
|
|
253
|
+
If the user describes a **solution** (button, field, screen, API), reframe as a **need**:
|
|
254
|
+
|
|
255
|
+
| User says | BA agent asks |
|
|
256
|
+
|-----------|---------------|
|
|
257
|
+
| "I need a Role dropdown on the User form" | "What problem are you trying to solve with different user access levels?" |
|
|
258
|
+
| "We need an export button" | "What do you do with the exported data? Who needs it and why?" |
|
|
259
|
+
| "Add a status field" | "What lifecycle does this entity go through? What triggers each transition?" |
|
|
260
|
+
|
|
261
|
+
### Technique 2: 5 Whys (Root Cause)
|
|
262
|
+
|
|
263
|
+
When the need seems superficial, chain up to 5 "Why?":
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
User: "We need to track user activity"
|
|
267
|
+
→ Why? "To know who modified what"
|
|
268
|
+
→ Why? "Because we had data integrity issues"
|
|
269
|
+
→ Why? "Because multiple people edit the same records"
|
|
270
|
+
→ ROOT CAUSE: Concurrent editing conflict → Need audit trail + optimistic locking
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Technique 3: Concrete Scenario Extraction
|
|
274
|
+
|
|
275
|
+
Never accept abstract descriptions. Always ask for **a real day-in-the-life scenario**:
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
"Walk me through a typical day: you arrive at the office,
|
|
279
|
+
you open the application — what is the FIRST thing you need to do?
|
|
280
|
+
Then what? What information do you look at? What decisions do you make?"
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Technique 4: Absence Test
|
|
284
|
+
|
|
285
|
+
Validate necessity by asking what happens WITHOUT:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
"If this feature did NOT exist, what would you do instead?
|
|
289
|
+
How much time/money does the current workaround cost?"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Technique 5: Completeness Probing
|
|
293
|
+
|
|
294
|
+
For every list answer, challenge completeness:
|
|
295
|
+
|
|
296
|
+
| Answer type | Probe |
|
|
297
|
+
|-------------|-------|
|
|
298
|
+
| "There are 3 user types" | "Are there external actors? Auditors? System admins? Automated processes?" |
|
|
299
|
+
| "The main flow is A→B→C" | "What if the user cancels at step B? What if step C fails? What if they go back to A?" |
|
|
300
|
+
| "Required fields: name, email" | "What uniqueness constraints? What format? What happens on duplicate?" |
|
|
301
|
+
|
|
302
|
+
### Answer Quality Indicators
|
|
303
|
+
|
|
304
|
+
| Quality | Signal | Action |
|
|
305
|
+
|---------|--------|--------|
|
|
306
|
+
| **Insufficient** | < 1 sentence, "I don't know", vague adjective | Apply technique 1-5, ask for concrete example |
|
|
307
|
+
| **Solution-oriented** | Contains UI/tech terms (button, field, API, database) | Apply technique 1 (reframe to problem) |
|
|
308
|
+
| **Sufficient** | Contains WHO, WHAT, WHY, concrete example | Proceed, note confidence level |
|
|
309
|
+
| **Excellent** | Includes edge cases, constraints, measurable criteria | Proceed, mark as "Confirmed" |
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
100
313
|
## ULTRATHINK
|
|
101
314
|
|
|
102
315
|
Behavioral mode for critical phases (01, 02, 03, 05):
|
|
@@ -107,11 +320,13 @@ ULTRATHINK MODE:
|
|
|
107
320
|
- Challenge EVERY assumption
|
|
108
321
|
- Anticipate UNEXPRESSED needs
|
|
109
322
|
- Validate completeness before output
|
|
323
|
+
- Apply Elicitation Techniques (see above)
|
|
110
324
|
|
|
111
325
|
DO NOT:
|
|
112
326
|
- Accept vague answers
|
|
113
327
|
- Skip question categories
|
|
114
328
|
- Assume stakeholder thought of everything
|
|
329
|
+
- Accept solutions without understanding the problem first
|
|
115
330
|
```
|
|
116
331
|
|
|
117
332
|
**DO NOT invoke** as a skill/tool - it is a thinking mode.
|
|
@@ -228,6 +443,47 @@ Example:
|
|
|
228
443
|
|
|
229
444
|
---
|
|
230
445
|
|
|
446
|
+
## Configuration Langue de Communication
|
|
447
|
+
|
|
448
|
+
> **Objectif :** La langue de communication avec le client est configurable.
|
|
449
|
+
> Toute interaction via `AskUserQuestion` (questions, options, reformulations, relances)
|
|
450
|
+
> doit être dans la langue configurée.
|
|
451
|
+
|
|
452
|
+
### Configuration
|
|
453
|
+
|
|
454
|
+
Le champ `language` dans `.business-analyse/config.json` définit la langue :
|
|
455
|
+
|
|
456
|
+
| Langue | Code | Défaut |
|
|
457
|
+
|--------|------|--------|
|
|
458
|
+
| Français | `fr` | **Oui** |
|
|
459
|
+
| English | `en` | Non |
|
|
460
|
+
| Italiano | `it` | Non |
|
|
461
|
+
| Deutsch | `de` | Non |
|
|
462
|
+
|
|
463
|
+
### Portée
|
|
464
|
+
|
|
465
|
+
| Élément | Adapté à la langue ? |
|
|
466
|
+
|---------|---------------------|
|
|
467
|
+
| Questions `AskUserQuestion` (labels, descriptions, options) | **OUI** — toujours dans `{language}` |
|
|
468
|
+
| Reformulations et résumés de catégorie | **OUI** — toujours dans `{language}` |
|
|
469
|
+
| Relances et follow-ups (Elicitation Guide) | **OUI** — traduire les probes à la volée |
|
|
470
|
+
| Documents générés (discovery, BRD, FRD, handoff) | **OUI** — rédigés dans `{language}` |
|
|
471
|
+
| Référence technique interne (patterns, architecture) | NON — reste en langue du fichier |
|
|
472
|
+
| Noms de code (entités, permissions, paths) | NON — toujours en anglais (convention SmartStack) |
|
|
473
|
+
|
|
474
|
+
### Règle
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
1. Lire {language} depuis 00-context.md (défaut: "fr")
|
|
478
|
+
2. Adapter TOUTE communication AskUserQuestion dans {language}
|
|
479
|
+
3. Les exemples de probes/relances dans les questionnaires sont en français
|
|
480
|
+
→ Si {language} ≠ "fr", les traduire à la volée
|
|
481
|
+
4. Les documents générés sont rédigés dans {language}
|
|
482
|
+
5. Le code, les noms d'entités et les paths restent TOUJOURS en anglais
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
231
487
|
## Config Template
|
|
232
488
|
|
|
233
489
|
```json
|
|
@@ -235,6 +491,7 @@ Example:
|
|
|
235
491
|
"project": "{Name}",
|
|
236
492
|
"lastFeatureId": 0,
|
|
237
493
|
"context": "business",
|
|
494
|
+
"language": "fr",
|
|
238
495
|
"standards": ["BABOK-v3", "IEEE-830"],
|
|
239
496
|
"contact": "support@atlshub.ch"
|
|
240
497
|
}
|
|
@@ -253,6 +510,51 @@ Example:
|
|
|
253
510
|
|
|
254
511
|
---
|
|
255
512
|
|
|
513
|
+
## Context Digest (Between Steps)
|
|
514
|
+
|
|
515
|
+
Each step produces a compressed digest file (max 50 lines) at completion to reduce token usage in the next step.
|
|
516
|
+
|
|
517
|
+
**File naming:** `{output_dir}/digest-{step_number}.md` (e.g., `digest-01.md`, `digest-02.md`)
|
|
518
|
+
|
|
519
|
+
| Section | Max Lines | Content |
|
|
520
|
+
|---------|-----------|---------|
|
|
521
|
+
| Changes | 10 | Files modified with brief description |
|
|
522
|
+
| Decisions | 10 | Key architectural decisions |
|
|
523
|
+
| Findings | 10 | Issues found, patterns identified |
|
|
524
|
+
| State | 5 | Updated state variables |
|
|
525
|
+
| Next | 5 | What the next step needs to know |
|
|
526
|
+
|
|
527
|
+
**Protocol:**
|
|
528
|
+
- **Generate:** Each step writes `digest-{step_number}.md` before completing
|
|
529
|
+
- **Read:** Next step reads `digest-{prev_step_number}.md` instead of full output files
|
|
530
|
+
- **Resume mode (`-r`):** Reads full output files directly (digest is for progressive loading only)
|
|
531
|
+
- **Step-00:** Does not read a digest (it is the first step)
|
|
532
|
+
- **Step-00:** Generates `digest-00.md` with initial state variables and configuration
|
|
533
|
+
|
|
534
|
+
**Template:**
|
|
535
|
+
```markdown
|
|
536
|
+
# Digest: Step {NN} - {Step Name}
|
|
537
|
+
|
|
538
|
+
## Changes
|
|
539
|
+
- {file}: {brief description}
|
|
540
|
+
|
|
541
|
+
## Decisions
|
|
542
|
+
- {decision and rationale}
|
|
543
|
+
|
|
544
|
+
## Findings
|
|
545
|
+
- {finding}
|
|
546
|
+
|
|
547
|
+
## State Updates
|
|
548
|
+
| Variable | New Value |
|
|
549
|
+
|----------|-----------|
|
|
550
|
+
| {var} | {value} |
|
|
551
|
+
|
|
552
|
+
## For Next Step
|
|
553
|
+
- {what the next step needs to know}
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
256
558
|
## Support
|
|
257
559
|
|
|
258
560
|
Contact: **support@atlshub.ch**
|
|
@@ -25,9 +25,24 @@
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
## Elicitation Guide
|
|
29
|
+
|
|
30
|
+
### Follow-ups by Question
|
|
31
|
+
|
|
32
|
+
| Question | If answer is vague/insufficient | Probe |
|
|
33
|
+
|----------|-------------------------------|-------|
|
|
34
|
+
| Q1.1 (problem) | User describes a solution, not a problem | "Oublions la solution un instant — quel problème rencontrez-vous concrètement aujourd'hui ?" |
|
|
35
|
+
| Q1.2 (AS-IS) | No concrete workflow described | "Décrivez-moi une journée type : vous arrivez, vous ouvrez l'outil — que faites-vous en premier ?" |
|
|
36
|
+
| Q1.3 (TO-BE) | Vague ("ça ira mieux") | "Concrètement, quel geste ou tâche sera différent ? Combien de clics/minutes en moins ?" |
|
|
37
|
+
| Q1.4 (KPIs) | No measurable metric | "Comment saurez-vous dans 3 mois que cette fonctionnalité a réussi ? Quel chiffre regarderez-vous ?" |
|
|
38
|
+
| Q1.5 (ROI) | "I don't know" | "Combien de temps passez-vous sur ce processus aujourd'hui par semaine ? À combien de personnes ?" |
|
|
39
|
+
| Q1.7 (if NOT built) | Minimized impact | "Si on ne fait rien pendant 6 mois, qu'est-ce qui empire ? Quel est le coût de l'inaction ?" |
|
|
40
|
+
|
|
41
|
+
### Anti-patterns to Detect
|
|
42
|
+
|
|
43
|
+
| Signal | Anti-pattern | Action |
|
|
44
|
+
|--------|-------------|--------|
|
|
45
|
+
| "Il faudrait un bouton/écran/champ..." | **Solution disguised as need** | Apply Solution → Problem Reframing |
|
|
46
|
+
| "C'est évident", "tout le monde sait" | **Implicit assumption** | "Pouvez-vous le formuler explicitement pour que je puisse le documenter ?" |
|
|
47
|
+
| KPIs are feelings ("ça sera mieux") | **Non-measurable success** | "Quel chiffre regarderez-vous pour savoir si c'est réussi ?" |
|
|
48
|
+
| Q1.7 = "rien de grave" | **Faible justification business** | Challenge: si ce n'est pas grave, pourquoi le développer ? |
|
|
@@ -27,9 +27,43 @@
|
|
|
27
27
|
|
|
28
28
|
## Role -> Permission Mapping
|
|
29
29
|
|
|
30
|
+
> **⚠️ RBAC RULE: Roles are SmartStack permissions, NOT entity attributes.**
|
|
31
|
+
>
|
|
32
|
+
> When stakeholders mention "roles" (admin, manager, user...), these MUST be mapped
|
|
33
|
+
> to SmartStack's RBAC permission system (`business.{app}.{module}.{action}`).
|
|
34
|
+
>
|
|
35
|
+
> **NEVER** model a role as:
|
|
36
|
+
> - A property/column on a User entity (e.g. `User.Role`, `User.RoleType`)
|
|
37
|
+
> - An enum or string attribute on any business entity
|
|
38
|
+
> - A separate `Role` entity with a FK on User
|
|
39
|
+
>
|
|
40
|
+
> **ALWAYS** map roles to permission sets in the matrix below:
|
|
41
|
+
|
|
30
42
|
| Discovered Role | SmartStack Permission |
|
|
31
43
|
|-----------------|----------------------|
|
|
32
44
|
| Admin | `*.admin` |
|
|
33
45
|
| Manager | `*.read,create,update` |
|
|
34
46
|
| User | `*.read,create` |
|
|
35
47
|
| ReadOnly | `*.read` |
|
|
48
|
+
|
|
49
|
+
> If the business need requires **custom roles beyond these 4**, document them
|
|
50
|
+
> as additional permission sets — not as data model concepts.
|
|
51
|
+
|
|
52
|
+
## Elicitation Guide
|
|
53
|
+
|
|
54
|
+
### Follow-ups by Question
|
|
55
|
+
|
|
56
|
+
| Question | If answer is vague/insufficient | Probe |
|
|
57
|
+
|----------|-------------------------------|-------|
|
|
58
|
+
| Q2.1 (end users) | Only 1-2 roles listed | "Y a-t-il des auditeurs, des administrateurs système, du support, des processus automatisés ?" |
|
|
59
|
+
| Q2.5 (tasks per role) | Generic tasks ("manage data") | "Prenons le rôle {role} : en arrivant le matin, quelle est sa première action ? Et après ?" |
|
|
60
|
+
| Q2.6 (frequency) | "Régulièrement" | "Quotidien ? 10 fois/jour ou 1 fois ? Certains jours plus que d'autres ?" |
|
|
61
|
+
| Q2.8 (frustrations) | "Rien de particulier" | "Quel processus prend le plus de temps ? Qu'est-ce qui vous fait soupirer ?" |
|
|
62
|
+
|
|
63
|
+
### Anti-patterns to Detect
|
|
64
|
+
|
|
65
|
+
| Signal | Anti-pattern | Action |
|
|
66
|
+
|--------|-------------|--------|
|
|
67
|
+
| Un seul type d'utilisateur identifié | **Stakeholders manquants** | Proposer systématiquement : admin, utilisateur métier, lecteur, auditeur, support N1 |
|
|
68
|
+
| "Tous les utilisateurs font la même chose" | **Rôles non différenciés** | "Qui peut supprimer ? Qui ne fait que consulter ? Qui valide ?" |
|
|
69
|
+
| Mélange rôle organisationnel et accès | **Confusion rôle/permission** | Séparer : rôle métier (chef de projet) vs niveau d'accès (lecture/écriture) |
|
|
@@ -33,3 +33,26 @@
|
|
|
33
33
|
| Should | Brings significant value but can wait for v2 |
|
|
34
34
|
| Could | Nice-to-have, can be implemented if time available |
|
|
35
35
|
| Won't | Explicitly excluded from scope |
|
|
36
|
+
|
|
37
|
+
## Elicitation Guide
|
|
38
|
+
|
|
39
|
+
### Follow-ups by Question
|
|
40
|
+
|
|
41
|
+
| Question | If answer is vague/insufficient | Probe |
|
|
42
|
+
|----------|-------------------------------|-------|
|
|
43
|
+
| Q3.1 (Must-Have) | > 10 items listed | "Si vous ne pouviez en garder que 3 pour la v1, lesquels ? Les autres sont peut-être Should-Have." |
|
|
44
|
+
| Q3.1 (Must-Have) | Mélange CRUD + complexe | "Le CRUD de base (liste, création, modification, suppression) est-il un Must, ou certaines actions sont Could ?" |
|
|
45
|
+
| Q3.2 (Should-Have) | Vide | "Y a-t-il des fonctionnalités utiles mais qui peuvent attendre une v2 ? Export, filtres avancés, notifications ?" |
|
|
46
|
+
| Q3.4 (exclusions) | Vide | "Que ne voulez-vous surtout PAS dans ce module ? Intégrations, reporting, mobile, historique ?" |
|
|
47
|
+
| Q3.5 (main flow) | < 3 étapes | "Détaillez : l'utilisateur arrive sur l'écran → que voit-il ? → que clique-t-il ? → que se passe-t-il ?" |
|
|
48
|
+
| Q3.7 (alt flows) | "Il n'y en a pas" | "Que se passe-t-il si l'utilisateur annule ? S'il n'a pas la permission ? Si les données sont invalides ?" |
|
|
49
|
+
| Q3.8 (errors) | Liste vide | "Que se passe-t-il si le réseau coupe ? Si un champ obligatoire manque ? Si un doublon existe ?" |
|
|
50
|
+
|
|
51
|
+
### Anti-patterns to Detect
|
|
52
|
+
|
|
53
|
+
| Signal | Anti-pattern | Action |
|
|
54
|
+
|--------|-------------|--------|
|
|
55
|
+
| Tout est Must-Have | **Scope non priorisé** | Appliquer le test : "Sans cette fonctionnalité, le module a-t-il ZÉRO valeur ?" |
|
|
56
|
+
| Q3.4 vide (rien d'exclu) | **Scope illimité** | "Si tout est inclus, le risque est de ne jamais livrer. Qu'est-ce qui est hors périmètre v1 ?" |
|
|
57
|
+
| Flow linéaire sans alternative | **Happy path uniquement** | "Que se passe-t-il au step X si la condition Y n'est pas remplie ?" |
|
|
58
|
+
| Mélange fonctionnel/technique | **Solution dans le scope** | Séparer : "gérer les commandes" (fonctionnel) vs "utiliser Redis" (technique) |
|
|
@@ -34,3 +34,47 @@
|
|
|
34
34
|
| Unique attribute | `HasIndex().IsUnique()` |
|
|
35
35
|
| 1:N relationship | Navigation property |
|
|
36
36
|
| Sensitive data | Encryption + audit |
|
|
37
|
+
|
|
38
|
+
> **⚠️ RBAC EXCLUSION: The following concepts are handled by SmartStack's RBAC system
|
|
39
|
+
> and MUST NOT be modeled as entity attributes or separate entities:**
|
|
40
|
+
>
|
|
41
|
+
> | Concept | ❌ Wrong (entity attribute) | ✅ Correct (RBAC) |
|
|
42
|
+
> |---------|---------------------------|-------------------|
|
|
43
|
+
> | User role | `User.Role` property | Permission set `business.{app}.{module}.*` |
|
|
44
|
+
> | Access level | `User.AccessLevel` enum | Permission matrix per role |
|
|
45
|
+
> | Is admin | `User.IsAdmin` boolean | `business.{app}.{module}.admin` permission |
|
|
46
|
+
> | Can edit | `User.CanEdit` boolean | `business.{app}.{module}.update` permission |
|
|
47
|
+
>
|
|
48
|
+
> When Q4.2 asks for "important attributes", **exclude** any role/permission/access concept.
|
|
49
|
+
|
|
50
|
+
## Elicitation Guide
|
|
51
|
+
|
|
52
|
+
### Follow-ups by Question
|
|
53
|
+
|
|
54
|
+
| Question | If answer is vague/insufficient | Probe |
|
|
55
|
+
|----------|-------------------------------|-------|
|
|
56
|
+
| Q4.1 (entities) | Single entity listed | "Cette entité a-t-elle des sous-éléments ? (lignes de commande, pièces jointes, historique)" |
|
|
57
|
+
| Q4.1 (entities) | Mentions "User" as entity | "L'utilisateur est géré par SmartStack (Identity). Décrivez plutôt l'entité MÉTIER (Client, Employee, Contact...)" |
|
|
58
|
+
| Q4.2 (attributes) | Liste de champs techniques (ID, CreatedDate) | "Les champs techniques (Id, TenantId, audit) sont auto-gérés. Quels sont les attributs MÉTIER ?" |
|
|
59
|
+
| Q4.3 (relationships) | "1:N" without detail | "Un {Parent} peut avoir combien de {Children} max ? Un {Child} peut-il exister sans {Parent} ?" |
|
|
60
|
+
| Q4.4 (volume) | "Beaucoup" | "Ordre de grandeur : dizaines, centaines, milliers, millions ? Croissance par mois ?" |
|
|
61
|
+
| Q4.5 (validations) | Validations basiques seulement | "Y a-t-il des règles inter-champs ? (date fin > date début, montant selon statut)" |
|
|
62
|
+
| Q4.8 (sensitive) | "Non" | "Pas de données personnelles (nom, email, téléphone) ? Pas de données financières ?" |
|
|
63
|
+
|
|
64
|
+
### Anti-patterns to Detect
|
|
65
|
+
|
|
66
|
+
| Signal | Anti-pattern | Action |
|
|
67
|
+
|--------|-------------|--------|
|
|
68
|
+
| Entity "User" avec attributs métier | **Confusion User/Identity** | SmartStack gère les Users via Identity. L'entité métier = Client, Employee, Contact |
|
|
69
|
+
| Attributs Id, TenantId, CreatedBy listés | **Champs techniques comme métier** | Ces champs sont auto-générés par `AuditableEntity`. Ne pas les lister. |
|
|
70
|
+
| Pas de soft delete mentionné | **Suppression non clarifiée** | "Les données supprimées sont-elles effacées définitivement ou archivées ?" → `SoftDeletableEntity` |
|
|
71
|
+
| Aucune contrainte d'unicité | **Unicité non vérifiée** | "Deux entités peuvent-elles avoir le même nom/code/email ?" |
|
|
72
|
+
|
|
73
|
+
### SmartStack Entity Patterns
|
|
74
|
+
|
|
75
|
+
| Besoin métier | Base class SmartStack | Inclut automatiquement |
|
|
76
|
+
|---------------|----------------------|----------------------|
|
|
77
|
+
| Entité simple | `Entity` | Id, TenantId |
|
|
78
|
+
| Avec audit | `AuditableEntity` | + CreatedBy, CreatedDate, ModifiedBy, ModifiedDate |
|
|
79
|
+
| Avec suppression logique | `SoftDeletableEntity` | + IsDeleted, DeletedBy, DeletedDate |
|
|
80
|
+
| Avec hiérarchie | `HierarchicalEntity` | + ParentId, Level, Path |
|