@atlashub/smartstack-cli 4.17.1 → 4.18.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 (34) hide show
  1. package/package.json +1 -1
  2. package/templates/agents/ba-reader.md +9 -9
  3. package/templates/agents/ba-writer.md +13 -8
  4. package/templates/skills/business-analyse/SKILL.md +4 -4
  5. package/templates/skills/business-analyse/_rules.md +142 -0
  6. package/templates/skills/business-analyse/questionnaire/10-documentation.md +22 -7
  7. package/templates/skills/business-analyse/references/acceptance-criteria.md +4 -4
  8. package/templates/skills/business-analyse/references/agent-module-prompt.md +13 -9
  9. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  10. package/templates/skills/business-analyse/references/deploy-data-build.md +3 -2
  11. package/templates/skills/business-analyse/references/prd-generation.md +15 -10
  12. package/templates/skills/business-analyse/references/robustness-checks.md +12 -9
  13. package/templates/skills/business-analyse/references/team-orchestration.md +77 -6
  14. package/templates/skills/business-analyse/references/validation-checklist.md +7 -4
  15. package/templates/skills/business-analyse/schemas/shared/common-defs.json +2 -1
  16. package/templates/skills/business-analyse/steps/step-00-init.md +31 -63
  17. package/templates/skills/business-analyse/steps/step-01-cadrage.md +97 -7
  18. package/templates/skills/business-analyse/steps/step-03a1-setup.md +3 -23
  19. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +2 -3
  20. package/templates/skills/business-analyse/steps/step-03b-ui.md +2 -22
  21. package/templates/skills/business-analyse/steps/step-03c-compile.md +44 -139
  22. package/templates/skills/business-analyse/steps/step-03d-validate.md +198 -290
  23. package/templates/skills/business-analyse/steps/step-05a-handoff.md +117 -20
  24. package/templates/skills/ralph-loop/SKILL.md +8 -3
  25. package/templates/skills/ralph-loop/references/category-completeness.md +20 -4
  26. package/templates/skills/ralph-loop/references/compact-loop.md +80 -48
  27. package/templates/skills/ralph-loop/references/init-resume-recovery.md +3 -1
  28. package/templates/skills/ralph-loop/references/parallel-execution.md +27 -27
  29. package/templates/skills/ralph-loop/steps/step-00-init.md +19 -9
  30. package/templates/skills/ralph-loop/steps/step-01-task.md +10 -2
  31. package/templates/skills/ralph-loop/steps/step-02-execute.md +9 -4
  32. package/templates/skills/ralph-loop/steps/step-03-commit.md +1 -1
  33. package/templates/skills/ralph-loop/steps/step-04-check.md +5 -21
  34. package/templates/skills/ralph-loop/steps/step-05-report.md +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "4.17.1",
3
+ "version": "4.18.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -13,8 +13,8 @@ You are a business analysis reader agent specialized in extracting and synthesiz
13
13
  Read feature.json files at both application-level and module-level, and provide structured answers, context summaries, or cross-feature insights. Support discovery, documentation, and skill orchestration.
14
14
 
15
15
  **File locations:**
16
- - Application-level: `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
17
- - Module-level: `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
16
+ - Application-level: `docs/{app}/business-analyse/v{X.Y}/feature.json`
17
+ - Module-level: `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json`
18
18
 
19
19
  ## Core Operations
20
20
 
@@ -27,7 +27,7 @@ Locate a feature by ID and return its latest version path.
27
27
  - Optional: scope ("application" | "module" | "any") — default: "any"
28
28
 
29
29
  **Process:**
30
- 1. Glob pattern: `docs/business/**/business-analyse/*/feature.json`
30
+ 1. Glob pattern: `docs/**/business-analyse/*/feature.json`
31
31
  2. Read each feature.json and check id field
32
32
  3. If scope filter provided, also check scope field
33
33
  4. If multiple versions exist, sort numerically by version
@@ -49,7 +49,7 @@ Locate the master (application-level) feature.json for a given app.
49
49
  - OR featureId: FEAT-NNN
50
50
 
51
51
  **Process:**
52
- 1. Glob: `docs/business/{app}/business-analyse/*/feature.json`
52
+ 1. Glob: `docs/{app}/business-analyse/*/feature.json`
53
53
  2. Read and verify scope = "application"
54
54
  3. Return latest version path
55
55
 
@@ -215,7 +215,7 @@ Search all features for matching content.
215
215
  - Optional: scope (all | names-only | ids-only)
216
216
 
217
217
  **Process:**
218
- 1. Glob all feature.json files in docs/business/
218
+ 1. Glob all feature.json files in docs/
219
219
  2. Search across:
220
220
  - Feature IDs
221
221
  - Entity names
@@ -240,8 +240,8 @@ Get the highest version number for a feature or module.
240
240
 
241
241
  **Process:**
242
242
  1. Glob paths:
243
- - Single feature: `docs/business/**/business-analyse/v*/feature.json` filtered by ID
244
- - Module: `docs/business/{app}/{module}/business-analyse/v*/feature.json`
243
+ - Single feature: `docs/**/business-analyse/v*/feature.json` filtered by ID
244
+ - Module: `docs/{app}/{module}/business-analyse/v*/feature.json`
245
245
  2. Extract version numbers (v1.0, v1.5, v2.1, etc.)
246
246
  3. Sort numerically
247
247
  4. Return highest version path and number
@@ -321,8 +321,8 @@ Generate compact context for use by other skills and agents.
321
321
 
322
322
  When searching for feature data:
323
323
 
324
- 1. **Primary (application):** `docs/business/{app}/business-analyse/*/feature.json` (scope: application)
325
- 2. **Primary (module):** `docs/business/{app}/{module}/business-analyse/*/feature.json` (scope: module)
324
+ 1. **Primary (application):** `docs/{app}/business-analyse/*/feature.json` (scope: application)
325
+ 2. **Primary (module):** `docs/{app}/{module}/business-analyse/*/feature.json` (scope: module)
326
326
  3. **Fallback:** `.business-analyse/` (legacy format)
327
327
  - Read: `00-context.md` + `3-functional-specification.md`
328
328
  - Warn user about old format
@@ -431,7 +431,7 @@ Perform these structural checks before every write:
431
431
  - BR IDs: must match `BR-(VAL|CALC|WF|SEC|DATA)-[A-Z]{2,4}-\d{3}` (e.g., BR-SEC-RM-042) — module prefix MANDATORY in multi-module mode
432
432
  - UC IDs: must match `UC-[A-Z]{2,4}-\d{3}` (e.g., UC-RM-007) — module prefix MANDATORY in multi-module mode
433
433
  - FR IDs: must match `FR-[A-Z]{2,4}-\d{3}` (e.g., FR-RM-012) — module prefix MANDATORY in multi-module mode
434
- - Permission paths: must match `{app}\.{module}\.{resource}\.{action}` (e.g., crm.contacts.read)
434
+ - Permission paths: module-level `{app}\.{module}\.{action}` (3 segments, e.g., `crm.contacts.read`) OR section-level `{app}\.{module}\.{section}\.{action}` (4 segments, e.g., `crm.contacts.dashboard.read`) — all segments kebab-case lowercase
435
435
 
436
436
  **Metadata:**
437
437
  - id, version, status, scope are required
@@ -455,9 +455,10 @@ Perform these structural checks before every write:
455
455
  ### Module-Level Sections
456
456
 
457
457
  **analysis.entities[]** — REQUIRED fields: `name`, `description`, `attributes[]`, `relationships[]`
458
- - attributes[]: REQUIRED `name`, `description`, `required` | OPTIONAL `unique`, `validation`
458
+ - attributes[]: REQUIRED `name`, `description`, `required` | OPTIONAL `unique`, `validation`, `type`
459
459
  - relationships[]: REQUIRED `target`, `type`, `description`
460
- - FORBIDDEN: `type` in attributes (use `description`), `values` (use `validation`), `rules` (use `validation`)
460
+ - FORBIDDEN: `values` (use `validation`), `rules` (use `validation`)
461
+ - **Two-phase `type` field:** `type` is FORBIDDEN in raw analysis input (step-03a2, before compilation). After step-03c compilation, `type` is MANDATORY (auto-inferred C# type: `string`, `int`, `decimal`, `bool`, `DateTime`, `Guid`, `enum:{Name}`, etc.). The writer ACCEPTS `type` when the value is a recognized C# type — it is only auto-removed from pre-compilation writes.
461
462
 
462
463
  **analysis.businessRules[]** — REQUIRED: `id`, `name`, `category`, `statement`, `priority`
463
464
  - OPTIONAL: `conditions[]`, `examples[]`, `testability`
@@ -502,15 +503,19 @@ Perform these structural checks before every write:
502
503
  - transitions[]: REQUIRED `{from, to, action, label, permission}` | OPTIONAL `guards[]`, `effects[]`, `confirm`
503
504
  - FORBIDDEN: flat string arrays for states (e.g., `["Active", "Inactive"]`), `terminalStates` as separate array
504
505
 
505
- **specification.seedDataCore** — REQUIRED 5 arrays: `navigationModules[]`, `navigationTranslations[]`, `permissions[]`, `rolePermissions[]`, `permissionConstants[]`
506
+ **specification.seedDataCore** — REQUIRED 9 arrays: `navigationApplications[]`, `applicationRoles[]`, `navigationModules[]`, `navigationSections[]`, `navigationResources[]`, `navigationTranslations[]`, `permissions[]`, `rolePermissions[]`, `permissionConstants[]`
507
+ - navigationApplications[]: `{code, label, icon, route, sort}`
508
+ - applicationRoles[]: `{code, name, permissions}`
506
509
  - navigationModules[]: `{code, label, icon, route, parentCode, sort}`
507
- - navigationTranslations[]: `{moduleCode, language, label}` (4 languages: fr, en, nl, de)
510
+ - navigationSections[]: `{code, label, icon, route, parentCode, permission, sort}`
511
+ - navigationResources[]: `{code, type, entity, parentCode, permission}`
512
+ - navigationTranslations[]: `{moduleCode, language, label}` (4 languages: fr, en, it, de)
508
513
  - permissions[]: `{path, action, description}`
509
514
  - rolePermissions[]: `{role, permissionPath}`
510
515
  - permissionConstants[]: `{constantName, path}`
511
516
  - FORBIDDEN: flat object, comma-separated strings, singular constants
512
517
 
513
- **specification.gherkinScenarios** — REQUIRED shape: `{feature, scenarios[]}`
518
+ **specification.gherkinScenarios** — REQUIRED shape: `[{feature, scenarios[]}]` (array)
514
519
  - scenarios[]: `{name, tags[], given[], when[], then[]}`
515
520
  - FORBIDDEN: flat array of scenario objects without wrapping `feature`
516
521
 
@@ -525,7 +530,7 @@ Perform these structural checks before every write:
525
530
 
526
531
  **specification.navigation** — REQUIRED: `entries[]` where each: `{code, label, icon, route, parentCode, sort}`
527
532
 
528
- **specification.i18nKeys[]** — REQUIRED: `key`, `fr`, `en`, `nl`, `de`
533
+ **specification.i18nKeys[]** — REQUIRED: `key`, `fr`, `en`, `it`, `de`
529
534
 
530
535
  **validation** — REQUIRED: `completenessChecks[]`, `consistencyChecks[]`, `semanticChecks[]`, `decision`
531
536
  - decision: `{approved, reason, checkedAt}`
@@ -718,7 +723,7 @@ After EVERY write, report file size status:
718
723
 
719
724
  ```
720
725
  ✓ feature.json written successfully
721
- Path: docs/business/HumanResources/Projects/business-analyse/v1.0/feature.json
726
+ Path: docs/HumanResources/Projects/business-analyse/v1.0/feature.json
722
727
  Size: 87.3 KB (↑ 12.1 KB from previous)
723
728
  Status: ⚠ Approaching 100KB threshold
724
729
  Recommendation: Use enrichSectionIncremental for remaining modules
@@ -241,16 +241,16 @@ Load ONLY relevant categories based on feature type:
241
241
  | 07 | `questionnaire/07-ui.md` | 19 | Si module oriente interface |
242
242
  | 08 | `questionnaire/08-performance.md` | 8 | Si performance critique |
243
243
  | 09 | `questionnaire/09-constraints.md` | 6 | Si contraintes |
244
- | 10 | `questionnaire/10-documentation.md` | 7 | Si documentation requise |
244
+ | 10 | `questionnaire/10-documentation.md` | 7 | Toujours |
245
245
  | 11 | `questionnaire/11-data-lifecycle.md` | 14 | Si lifecycle requis (retention, archivage, RGPD) |
246
246
  | 12 | `questionnaire/12-migration.md` | 14 | Si nouveau module (migration donnees existantes) |
247
247
  | 13 | `questionnaire/13-cross-module.md` | 14 | Si nouveau module OU references autres modules |
248
248
  | 14 | `questionnaire/14-risk-assumptions.md`| 16 | Toujours |
249
249
  | 15 | `questionnaire/15-success-metrics.md` | 17 | Toujours |
250
250
 
251
- **Total noyau (toujours chargés) : 130 questions** (contexte, acteurs, périmètre, risques, métriques)
252
- **Total avec application : 148 questions** (+ identité application si mode multi-module)
253
- **Total conditionnel : 124 questions** (data, intégrations, sécurité, UI, performance, contraintes, doc, lifecycle, migration, cross-module)
251
+ **Total noyau (toujours chargés) : 137 questions** (contexte, acteurs, périmètre, risques, métriques, documentation)
252
+ **Total avec application : 155 questions** (+ identité application si mode multi-module)
253
+ **Total conditionnel : 117 questions** (data, intégrations, sécurité, UI, performance, contraintes, lifecycle, migration, cross-module)
254
254
  **Total maximum possible : 272 questions** (noyau + application + tous conditionnels chargés)
255
255
 
256
256
  </questionnaire_files>
@@ -0,0 +1,142 @@
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,7 +1,7 @@
1
1
  # Category 10: Documentation & Support
2
2
 
3
3
  > **Usage:** Documentation and support needs
4
- > **When to load:** If documentation explicitly required
4
+ > **When to load:** Toujours (chargé en step-01 §4g — every application requires documentation decisions)
5
5
 
6
6
  ---
7
7
 
@@ -9,10 +9,10 @@
9
9
 
10
10
  | # | Question | Answer Type |
11
11
  |---|----------|-------------|
12
- | Q10.1 | User documentation needed? | Yes/No + type |
13
- | Q10.2 | Technical documentation needed? | Yes/No + type |
14
- | Q10.3 | User training planned? | Plan |
15
- | Q10.4 | Knowledge base to create? | Scope |
12
+ | Q10.1 | User documentation needed? (tooltips intégrés, guide pas-à-pas, FAQ, vidéo tutoriel) | Yes/No + format |
13
+ | Q10.2 | Technical documentation needed? (API Swagger, ERD schéma données, guide développeur) | Yes/No + type |
14
+ | Q10.3 | Who is responsible for maintaining documentation after delivery? | Person/Role |
15
+ | Q10.4 | Knowledge base or training planned? (onboarding, wiki, release notes) | Scope + timeline |
16
16
 
17
17
  ---
18
18
 
@@ -20,12 +20,26 @@
20
20
 
21
21
  | Type | Generated by | Format |
22
22
  |------|-------------|--------|
23
- | Documentation module | `/documentation` (auto step-08) | React page intégrée via doc-data.ts + DocRenderer |
23
+ | Documentation module | `/documentation` skill (après `/ralph-loop`) | React page intégrée via doc-data.ts + DocRenderer |
24
24
  | Swagger API | Automatic (Swashbuckle) | OpenAPI 3.0 |
25
25
  | User guide | Manual or AI | Markdown / PDF |
26
26
  | Release notes | `/gitflow finish` | Changelog automatique |
27
27
  | ERD (schéma données) | `/documentation` skill | Mermaid diagram |
28
28
 
29
+ ## Génération automatique
30
+
31
+ | Livrable | Quand | Comment |
32
+ |----------|-------|---------|
33
+ | Swagger API | Automatique (ASP.NET Core + Swashbuckle) | Disponible à `/swagger` dès le déploiement |
34
+ | ERD (schéma données) | Après `/ralph-loop` | Skill `/documentation` type ERD |
35
+ | Module documentation | Après `/ralph-loop` | Skill `/documentation` type user-module |
36
+ | Release notes | À chaque release | Skill `/gitflow finish` |
37
+ | Tooltips in-app (doc-data.ts) | Pendant `/ralph-loop` | Catégorie `documentation` du PRD |
38
+
39
+ > **Flux recommandé :** `/business-analyse` capture les besoins → `/ralph-loop` génère les fichiers de base (doc-data.ts) → `/documentation` génère ERD + guides complets → `/gitflow finish` génère release notes.
40
+
41
+ ---
42
+
29
43
  ## Elicitation Guide
30
44
 
31
45
  ### Follow-ups by Question
@@ -40,4 +54,5 @@
40
54
 
41
55
  | Signal | Anti-pattern | Action |
42
56
  |--------|-------------|--------|
43
- | "La doc se fera après" | **Documentation en dette** | Le feature.json EST la doc. `/documentation` la génère automatiquement au step-08. |
57
+ | "La doc se fera après" | **Documentation en dette** | Le feature.json EST la doc. `/documentation` la génère automatiquement après `/ralph-loop`. |
58
+ | "On n'a pas besoin de doc" | **Documentation inexistante** | Même sans guide utilisateur, Swagger + ERD sont générés automatiquement. Le skill `/documentation` ne coûte rien à lancer. |
@@ -16,7 +16,7 @@ All previous checks were **pseudocode interpreted by the model**. The model can
16
16
 
17
17
  | # | Criterion | Minimum | Field Path | Blocking | Category |
18
18
  |---|-----------|---------|------------|----------|----------|
19
- | AC-01 | Entities present | 1 | `analysis.entities[]` | YES | Data Model |
19
+ | AC-01 | Entities present | 2 | `analysis.entities[]` | YES | Data Model |
20
20
  | AC-02 | Entity attributes have `type` field | ALL | `analysis.entities[].attributes[].type` | YES | Data Model |
21
21
  | AC-03 | Use cases present | 2 | `specification.useCases[]` | YES | Requirements |
22
22
  | AC-04 | Functional requirements present | 4 | `specification.functionalRequirements[]` | YES | Requirements |
@@ -24,7 +24,7 @@ All previous checks were **pseudocode interpreted by the model**. The model can
24
24
  | AC-06 | Wireframes >= sections | count match | wireframes.length >= sections.length | YES | UI |
25
25
  | AC-07 | Wireframe content non-empty | ALL | `wireframe.mockup \|\| wireframe.ascii \|\| wireframe.content` | YES | UI |
26
26
  | AC-08 | Sections present | 1 | `specification.sections[]` | YES | UI |
27
- | AC-09 | SeedDataCore 7 arrays non-empty | 7/7 | `specification.seedDataCore.*` | YES | Seed Data |
27
+ | AC-09 | SeedDataCore 9 arrays non-empty | 9/9 | `specification.seedDataCore.*` | YES | Seed Data |
28
28
  | AC-10 | Gherkin scenarios is array | `Array.isArray` | `specification.gherkinScenarios` | YES | Format |
29
29
  | AC-11 | API endpoints present | 1 | `specification.apiEndpoints[]` | YES | API |
30
30
  | AC-12 | Messages present | 4 | `specification.messages[]` | YES | Messages |
@@ -53,13 +53,13 @@ const sections = spec.sections || [];
53
53
  const sdc = spec.seedDataCore || {};
54
54
 
55
55
  const checks = [
56
- ['AC-01: entities >= 1', (analysis.entities||[]).length, 1],
56
+ ['AC-01: entities >= 2', (analysis.entities||[]).length, 2],
57
57
  ['AC-03: useCases >= 2', (spec.useCases||[]).length, 2],
58
58
  ['AC-04: FRs >= 4', (spec.functionalRequirements||[]).length, 4],
59
59
  ['AC-05: wireframes >= 1', wf.length, 1],
60
60
  ['AC-06: wireframes >= sections', wf.length, sections.length],
61
61
  ['AC-08: sections >= 1', sections.length, 1],
62
- ['AC-09: seedDataCore 7 arrays', Object.keys(sdc).filter(k => Array.isArray(sdc[k]) && sdc[k].length > 0).length, 7],
62
+ ['AC-09: seedDataCore 9 arrays', Object.keys(sdc).filter(k => Array.isArray(sdc[k]) && sdc[k].length > 0).length, 9],
63
63
  ['AC-10: gherkin is array', Array.isArray(spec.gherkinScenarios) ? 1 : 0, 1],
64
64
  ['AC-11: apiEndpoints >= 1', (spec.apiEndpoints||[]).length, 1],
65
65
  ['AC-12: messages >= 4', (spec.messages||[]).length, 4],
@@ -81,7 +81,7 @@ Reference their entities for FK relationships:
81
81
  Execute these steps IN ORDER. Each step is a separate file to load:
82
82
 
83
83
  ### Step 1: Setup (step-03a1-setup.md)
84
- Load: `templates/skills/business-analyse/steps/step-03a1-setup.md`
84
+ Load: `~/.claude/skills/business-analyse/steps/step-03a1-setup.md`
85
85
 
86
86
  Execute sections 1-8 (skip AskUserQuestion calls — decide autonomously):
87
87
  - Determine current module from workflow state
@@ -99,7 +99,7 @@ Execute sections 1-8 (skip AskUserQuestion calls — decide autonomously):
99
99
  - Questionnaires: Skip (no user to ask) — use ULTRATHINK to cover key concerns
100
100
 
101
101
  ### Step 2: Analysis (step-03a2-analysis.md)
102
- Load: `templates/skills/business-analyse/steps/step-03a2-analysis.md`
102
+ Load: `~/.claude/skills/business-analyse/steps/step-03a2-analysis.md`
103
103
 
104
104
  Execute sections for objectives, entities, business rules, process flow:
105
105
  - Define 2-4 objectives per module
@@ -120,7 +120,7 @@ Execute sections for objectives, entities, business rules, process flow:
120
120
  - reporting: configure → generate → view → export
121
121
 
122
122
  ### Step 3: UI Specification (step-03b-ui.md)
123
- Load: `templates/skills/business-analyse/steps/step-03b-ui.md`
123
+ Load: `~/.claude/skills/business-analyse/steps/step-03b-ui.md`
124
124
 
125
125
  Execute: state machines, wireframes, layouts:
126
126
  - Define lifecycle state machine (if entity has status)
@@ -140,14 +140,14 @@ Execute: state machines, wireframes, layouts:
140
140
  - Layouts: Always use standard SmartStack responsive grid
141
141
 
142
142
  ### Step 4: Compile (step-03c-compile.md)
143
- Load: `templates/skills/business-analyse/steps/step-03c-compile.md`
143
+ Load: `~/.claude/skills/business-analyse/steps/step-03c-compile.md`
144
144
 
145
145
  Execute ALL compilation sections:
146
146
  - Actors (2+ per module)
147
147
  - Use Cases with Gherkin scenarios
148
148
  - Functional Requirements
149
149
  - Permission matrix (CRUD per entity + module admin)
150
- - Navigation seed data (7 arrays — CRITICAL)
150
+ - Navigation seed data (9 arrays — CRITICAL)
151
151
  - i18n keys (4 languages: fr, en, it, de)
152
152
  - API endpoints summary
153
153
 
@@ -163,14 +163,18 @@ Execute ALL compilation sections:
163
163
  9. permissionConstants (C# constant names)
164
164
 
165
165
  ### Step 5: Validate & Propose (step-03d-validate.md)
166
- Load: `templates/skills/business-analyse/steps/step-03d-validate.md`
166
+ Load: `~/.claude/skills/business-analyse/steps/step-03d-validate.md`
167
167
 
168
168
  Execute validation checks, write to feature.json, then send proposal:
169
169
  1. Run ALL completeness checks from step-03d section 9
170
170
  2. Fix any FAIL checks before proceeding
171
171
  3. Write module feature.json via ba-writer
172
- 4. Build structured summary (see Communication Protocol below)
173
- 5. Send PROPOSAL_READY to team lead
172
+ 4. Run POST-CHECK verifications (sections 11-POST-CHECK and 11-POST-CHECK-BASH)
173
+ 5. Build structured summary (see Communication Protocol below)
174
+ 6. Send PROPOSAL_READY to team lead
175
+
176
+ > **Note:** Section 11-bis (incremental HTML deployment) is handled by the **team lead** after module approval.
177
+ > You do NOT need to deploy the HTML — focus on validation, writing feature.json, and sending the proposal.
174
178
 
175
179
  ## Communication Protocol
176
180
 
@@ -349,7 +353,7 @@ NEVER use bare IDs (UC-001, BR-VAL-001) — always prefixed.
349
353
  - [ ] All FK fields are Guid type with navigation property
350
354
  - [ ] All sections have at least 1 resource
351
355
  - [ ] All sections have a wireframe (+ create/edit wireframes for data-centric sections)
352
- - [ ] seedDataCore has all 7 arrays with content
356
+ - [ ] seedDataCore has all 9 arrays with content
353
357
  - [ ] Permissions follow {app}.{module}.{entity}.{action} pattern
354
358
  - [ ] i18n has all keys in **4 languages (fr, en, it, de)** — not just fr/en
355
359
  - [ ] At least 2 actors, 2 use cases, 4 functional requirements
@@ -19,9 +19,9 @@
19
19
  | `specification.sections[]` | YES | Must have >=1 section with resources |
20
20
  | `specification.uiWireframes[]` | YES | Must have >=1 wireframe with `layout` object |
21
21
  | `specification.lifeCycles[]` | IF entities have status | States must be objects (NOT strings) |
22
- | `specification.seedDataCore` | YES | Must have 7 arrays: navigationModules, navigationSections, navigationResources, navigationTranslations, permissions, rolePermissions, permissionConstants |
22
+ | `specification.seedDataCore` | YES | Must have 9 arrays: navigationApplications, applicationRoles, navigationModules, navigationSections, navigationResources, navigationTranslations, permissions, rolePermissions, permissionConstants |
23
23
  | `specification.seedDataBusiness` | NO (WARNING) | Business seed data is generated during implementation (ralph-loop), not during BA. If present, validates format. |
24
- | `specification.gherkinScenarios` | YES | Must be `{feature, scenarios[]}` (NOT flat array) |
24
+ | `specification.gherkinScenarios` | YES | Must be `[{feature, scenarios[]}]` (array of objects, NOT single object or flat array) |
25
25
  | `specification.navigation` | YES | Must have entries[] |
26
26
  | `specification.i18nKeys[]` | YES | Must have >=1 key with fr, en, it, de |
27
27
  | `validation` | YES | Must have completenessChecks, consistencyChecks, semanticChecks, decision |
@@ -1,6 +1,7 @@
1
1
  # FEATURE_DATA & EMBEDDED_ARTIFACTS Build Reference
2
2
 
3
3
  > Reference for step-05b-deploy.md — complete mapping specification for the interactive HTML.
4
+ > **Canonical field mapping reference:** See also `html-data-mapping.md` for the authoritative field name mapping between feature.json and HTML data objects.
4
5
 
5
6
  ## FEATURE_DATA Object
6
7
 
@@ -84,12 +85,12 @@ const FEATURE_DATA = {
84
85
  : (ent.fields || []).filter(f => f.foreignKey)
85
86
  .map(f => `${f.foreignKey.table} (N:1) - ${f.description || f.name}`)
86
87
  })),
87
- permissions: module.specification.permissions || [],
88
+ permissions: module.specification.permissionMatrix?.permissions || [],
88
89
  apiEndpoints: module.specification.apiEndpoints || []
89
90
  }
90
91
  },
91
92
  consolidation: {
92
- integrations: master.consolidation.integrations || [],
93
+ integrations: master.consolidation.crossModuleInteractions || [],
93
94
  sharedEntities: master.consolidation.sharedEntities || [],
94
95
  sequenceDiagrams: master.consolidation.e2eFlows || []
95
96
  },
@@ -52,7 +52,8 @@ Fix: Re-run ss derive-prd with latest version
52
52
  "api": [...],
53
53
  "frontend": [...],
54
54
  "seedData": [...],
55
- "tests": [...]
55
+ "tests": [...],
56
+ "documentation": [...]
56
57
  }
57
58
  }
58
59
  }
@@ -79,9 +80,9 @@ ss derive-prd --feature {path} --output .ralph/prd-{moduleCode}.json
79
80
 
80
81
  ---
81
82
 
82
- ### 3. Seven Categories (MANDATORY)
83
+ ### 3. Eight Categories (MANDATORY)
83
84
 
84
- All PRD files MUST include these 7 categories under `implementation.filesToCreate`:
85
+ All PRD files MUST include these 8 categories under `implementation.filesToCreate`:
85
86
 
86
87
  | Category | Description | Examples |
87
88
  |----------|-------------|----------|
@@ -92,10 +93,13 @@ All PRD files MUST include these 7 categories under `implementation.filesToCreat
92
93
  | **frontend** | React pages, components, hooks | `ProjectsPage.tsx`, `useProjects.ts` |
93
94
  | **seedData** | Seed data classes | `ProjectSeedData.cs` |
94
95
  | **tests** | Unit tests, integration tests | `ProjectServiceTests.cs`, `ProjectsControllerTests.cs` |
96
+ | **documentation** | Technical docs, user guides, API specs | `doc-data.ts`, `UserGuide.md`, `api-spec.yaml` |
97
+
98
+ > **Note `documentation`:** Cette catégorie peut contenir des fichiers générés par le skill `/documentation` après `/ralph-loop`. Elle est obligatoire dans la structure PRD (peut être un tableau vide `[]` si aucune doc n'est prévue, mais DOIT être présente).
95
99
 
96
100
  **Validation:**
97
101
  ```javascript
98
- const categories = ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests'];
102
+ const categories = ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests', 'documentation'];
99
103
  const missingCategories = categories.filter(cat => !prd.implementation.filesToCreate[cat]);
100
104
 
101
105
  if (missingCategories.length > 0) {
@@ -106,7 +110,8 @@ if (missingCategories.length > 0) {
106
110
  **Common Errors:**
107
111
  - Missing `tests` category → often forgotten
108
112
  - Missing `seedData` category → sometimes omitted for modules without seed data
109
- - Empty arrays allowed (e.g., `"seedData": []`) if genuinely no files needed
113
+ - Missing `documentation` category must be present even if empty
114
+ - Empty arrays allowed (e.g., `"seedData": []`, `"documentation": []`) if genuinely no files needed
110
115
 
111
116
  ---
112
117
 
@@ -116,7 +121,7 @@ if (missingCategories.length > 0) {
116
121
 
117
122
  ```javascript
118
123
  const featureHandoff = moduleFeature.handoff.filesToCreate;
119
- const categories = ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests'];
124
+ const categories = ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests', 'documentation'];
120
125
 
121
126
  for (const cat of categories) {
122
127
  const prdCount = prd.implementation.filesToCreate[cat]?.length ?? 0;
@@ -170,7 +175,7 @@ Use this checklist when validating PRD files:
170
175
  |-------|-----------|--------|
171
176
  | **Version** | `$version === "3.0.0"` | PASS/FAIL |
172
177
  | **Structure** | `implementation.filesToCreate` exists (not root) | PASS/FAIL |
173
- | **Categories** | All 7 categories present | PASS/FAIL |
178
+ | **Categories** | All 8 categories present | PASS/FAIL |
174
179
  | **File Counts** | PRD counts match feature.json handoff | PASS/FAIL |
175
180
  | **File Schemas** | All files have path, type, module | PASS/FAIL |
176
181
 
@@ -194,12 +199,12 @@ BLOCKING_ERROR: filesToCreate is at ROOT level (wrong structure)
194
199
 
195
200
  ### Error 3: Missing Categories
196
201
  ```
197
- BLOCKING_ERROR: Missing categories: seedData, tests
202
+ BLOCKING_ERROR: Missing categories: seedData, tests, documentation
198
203
  ```
199
204
  **Fix:**
200
- - Check feature.json handoff.filesToCreate has all 7 categories
205
+ - Check feature.json handoff.filesToCreate has all 8 categories
201
206
  - Re-derive PRD after fixing feature.json
202
- - If genuinely no files needed, use empty array: `"seedData": []`
207
+ - If genuinely no files needed, use empty array: `"seedData": []`, `"documentation": []`
203
208
 
204
209
  ### Error 4: File Count Mismatch
205
210
  ```
@@ -1,5 +1,6 @@
1
1
  # Robustness Checks for Business Analysis
2
2
 
3
+ > **Authoritative minimums:** See `_rules.md` § "Minimum Counts" for the single source of truth on all minimum thresholds.
3
4
  > **Objective:** Prevent incomplete specifications and broken references from reaching development.
4
5
 
5
6
  ## Overview
@@ -74,17 +75,19 @@ Ensures each module has ALL required components before being marked as "specifie
74
75
 
75
76
  | # | Check | Minimum | Blocking | Rationale |
76
77
  |---|-------|---------|----------|-----------|
77
- | 7.1 | CORE seed data sections | All 7 sections present | YES | Missing CORE data breaks deployment |
78
+ | 7.1 | CORE seed data arrays | All 9 arrays present (per `_rules.md` § "Minimum Counts") | YES | Missing CORE data breaks deployment |
78
79
  | 7.2 | Business seed data | Template defined | NO (WARNING) | Helps with testing |
79
80
 
80
- **CORE sections required:**
81
- 1. `navigationModules`
82
- 2. `navigationSections`
83
- 3. `navigationResources`
84
- 4. `navigationTranslations`
85
- 5. `permissions`
86
- 6. `rolePermissions`
87
- 7. `permissionConstants`
81
+ **CORE arrays required (9 total — see `_rules.md` § "seedDataCore arrays"):**
82
+ 1. `navigationApplications` — required for 1st module, can be `[]` for subsequent
83
+ 2. `applicationRoles` — required for 1st module, can be `[]` for subsequent
84
+ 3. `navigationModules`
85
+ 4. `navigationSections`
86
+ 5. `navigationResources`
87
+ 6. `navigationTranslations`
88
+ 7. `permissions`
89
+ 8. `rolePermissions`
90
+ 9. `permissionConstants`
88
91
 
89
92
  #### SECTION 8: API Endpoints (2 checks)
90
93