@atlashub/smartstack-cli 3.37.0 → 3.39.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 (228) hide show
  1. package/dist/index.js +16 -24
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +235 -265
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/scripts/extract-api-endpoints.ts +5 -5
  7. package/scripts/generate-doc-with-mock-ui.ts +10 -17
  8. package/templates/agents/ba-reader.md +9 -9
  9. package/templates/agents/ba-writer.md +12 -15
  10. package/templates/agents/code-reviewer.md +1 -1
  11. package/templates/agents/docs-context-reader.md +1 -1
  12. package/templates/agents/efcore/scan.md +3 -1
  13. package/templates/agents/gitflow/commit.md +74 -0
  14. package/templates/agents/gitflow/finish.md +5 -2
  15. package/templates/agents/gitflow/init-clone.md +3 -3
  16. package/templates/agents/gitflow/init-validate.md +3 -2
  17. package/templates/agents/gitflow/merge.md +5 -4
  18. package/templates/agents/gitflow/pr.md +5 -4
  19. package/templates/agents/gitflow/start.md +37 -5
  20. package/templates/hooks/hooks.json +11 -0
  21. package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
  22. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
  23. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
  24. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
  25. package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
  26. package/templates/skills/_shared.md +15 -17
  27. package/templates/skills/ai-prompt/SKILL.md +1 -1
  28. package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
  29. package/templates/skills/apex/SKILL.md +3 -4
  30. package/templates/skills/apex/_shared.md +10 -20
  31. package/templates/skills/apex/references/analysis-methods.md +141 -0
  32. package/templates/skills/apex/references/challenge-questions.md +1 -21
  33. package/templates/skills/apex/references/core-seed-data.md +35 -58
  34. package/templates/skills/apex/references/examine-build-validation.md +82 -0
  35. package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
  36. package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
  37. package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
  38. package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
  39. package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
  40. package/templates/skills/apex/references/post-checks.md +145 -40
  41. package/templates/skills/apex/references/smartstack-api.md +35 -51
  42. package/templates/skills/apex/references/smartstack-frontend.md +18 -18
  43. package/templates/skills/apex/references/smartstack-layers.md +38 -62
  44. package/templates/skills/apex/steps/step-00-init.md +14 -26
  45. package/templates/skills/apex/steps/step-01-analyze.md +10 -143
  46. package/templates/skills/apex/steps/step-02-plan.md +10 -92
  47. package/templates/skills/apex/steps/step-03-execute.md +45 -252
  48. package/templates/skills/apex/steps/step-04-examine.md +14 -78
  49. package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
  50. package/templates/skills/apex/steps/step-08-run-tests.md +1 -0
  51. package/templates/skills/application/SKILL.md +241 -242
  52. package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
  53. package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
  54. package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
  55. package/templates/skills/application/references/backend-verification.md +1 -1
  56. package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
  57. package/templates/skills/application/references/frontend-route-naming.md +117 -0
  58. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
  59. package/templates/skills/application/references/frontend-verification.md +12 -12
  60. package/templates/skills/application/references/init-parameter-detection.md +121 -0
  61. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
  62. package/templates/skills/application/references/nav-fallback-procedure.md +199 -200
  63. package/templates/skills/application/references/provider-template.md +2 -6
  64. package/templates/skills/application/references/roles-client-project-handling.md +55 -0
  65. package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
  66. package/templates/skills/application/references/test-coverage-requirements.md +213 -0
  67. package/templates/skills/application/references/test-frontend.md +3 -3
  68. package/templates/skills/application/steps/step-00-init.md +130 -260
  69. package/templates/skills/application/steps/step-01-navigation.md +170 -170
  70. package/templates/skills/application/steps/step-02-permissions.md +196 -196
  71. package/templates/skills/application/steps/step-03-roles.md +182 -339
  72. package/templates/skills/application/steps/step-03b-provider.md +133 -134
  73. package/templates/skills/application/steps/step-04-backend.md +174 -265
  74. package/templates/skills/application/steps/step-05-frontend.md +18 -144
  75. package/templates/skills/application/steps/step-06-migration.md +12 -60
  76. package/templates/skills/application/steps/step-07-tests.md +9 -76
  77. package/templates/skills/application/templates-backend.md +29 -27
  78. package/templates/skills/application/templates-frontend.md +49 -49
  79. package/templates/skills/application/templates-seed.md +57 -131
  80. package/templates/skills/business-analyse/SKILL.md +27 -30
  81. package/templates/skills/business-analyse/_architecture.md +6 -6
  82. package/templates/skills/business-analyse/_shared.md +60 -88
  83. package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
  84. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  85. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
  86. package/templates/skills/business-analyse/react/application-viewer.md +12 -12
  87. package/templates/skills/business-analyse/react/components.md +8 -12
  88. package/templates/skills/business-analyse/react/schema.md +836 -836
  89. package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
  90. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
  91. package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
  92. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
  93. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
  94. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
  95. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
  96. package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
  97. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  98. package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
  99. package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
  100. package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
  101. package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
  102. package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
  103. package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
  104. package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
  105. package/templates/skills/business-analyse/references/prd-generation.md +2 -2
  106. package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
  107. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  108. package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
  109. package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
  110. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  111. package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
  112. package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
  113. package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
  114. package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
  115. package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
  116. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
  117. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
  118. package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
  119. package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
  120. package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
  121. package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
  122. package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
  123. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
  124. package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
  125. package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
  126. package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
  127. package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
  128. package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
  129. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  130. package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
  131. package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
  132. package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
  133. package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
  134. package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
  135. package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
  136. package/templates/skills/business-analyse/templates-frd.md +25 -25
  137. package/templates/skills/business-analyse/templates-react.md +15 -21
  138. package/templates/skills/controller/SKILL.md +1 -1
  139. package/templates/skills/controller/postman-templates.md +1 -1
  140. package/templates/skills/controller/references/controller-code-templates.md +2 -2
  141. package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
  142. package/templates/skills/controller/references/permission-sync-templates.md +13 -16
  143. package/templates/skills/controller/steps/step-00-init.md +11 -11
  144. package/templates/skills/controller/steps/step-03-generate.md +64 -103
  145. package/templates/skills/controller/templates.md +67 -71
  146. package/templates/skills/debug/SKILL.md +13 -218
  147. package/templates/skills/debug/steps/step-00-init.md +57 -0
  148. package/templates/skills/debug/steps/step-01-analyze.md +219 -0
  149. package/templates/skills/debug/steps/step-02-resolve.md +85 -0
  150. package/templates/skills/documentation/SKILL.md +49 -345
  151. package/templates/skills/documentation/data-schema.md +11 -8
  152. package/templates/skills/documentation/steps/step-00-init.md +70 -0
  153. package/templates/skills/documentation/steps/step-01-scan.md +113 -0
  154. package/templates/skills/documentation/steps/step-02-generate.md +231 -0
  155. package/templates/skills/documentation/steps/step-03-validate.md +238 -0
  156. package/templates/skills/documentation/templates.md +480 -322
  157. package/templates/skills/efcore/SKILL.md +1 -1
  158. package/templates/skills/efcore/references/both-contexts.md +32 -0
  159. package/templates/skills/efcore/references/database-operations.md +67 -0
  160. package/templates/skills/efcore/references/destructive-operations.md +38 -0
  161. package/templates/skills/efcore/references/reset-operations.md +81 -0
  162. package/templates/skills/efcore/references/seed-methods.md +86 -0
  163. package/templates/skills/efcore/references/shared-init-functions.md +250 -0
  164. package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
  165. package/templates/skills/efcore/references/troubleshooting.md +81 -0
  166. package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
  167. package/templates/skills/efcore/steps/db/step-reset.md +7 -103
  168. package/templates/skills/efcore/steps/db/step-seed.md +10 -132
  169. package/templates/skills/efcore/steps/db/step-status.md +5 -44
  170. package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
  171. package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
  172. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
  173. package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
  174. package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
  175. package/templates/skills/feature-full/SKILL.md +1 -1
  176. package/templates/skills/feature-full/steps/step-00-init.md +57 -0
  177. package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
  178. package/templates/skills/gitflow/SKILL.md +28 -5
  179. package/templates/skills/gitflow/_shared.md +109 -12
  180. package/templates/skills/gitflow/phases/abort.md +4 -0
  181. package/templates/skills/gitflow/phases/cleanup.md +4 -0
  182. package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
  183. package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
  184. package/templates/skills/gitflow/references/finish-cleanup.md +55 -0
  185. package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
  186. package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
  187. package/templates/skills/gitflow/references/init-questions.md +185 -0
  188. package/templates/skills/gitflow/references/init-structure-creation.md +75 -0
  189. package/templates/skills/gitflow/references/init-version-detection.md +21 -0
  190. package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
  191. package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
  192. package/templates/skills/gitflow/references/merge-execution.md +62 -0
  193. package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
  194. package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
  195. package/templates/skills/gitflow/references/pr-generation.md +58 -0
  196. package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
  197. package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
  198. package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
  199. package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
  200. package/templates/skills/gitflow/steps/step-commit.md +12 -91
  201. package/templates/skills/gitflow/steps/step-finish.md +15 -159
  202. package/templates/skills/gitflow/steps/step-init.md +24 -326
  203. package/templates/skills/gitflow/steps/step-merge.md +17 -176
  204. package/templates/skills/gitflow/steps/step-pr.md +10 -116
  205. package/templates/skills/gitflow/steps/step-start.md +16 -109
  206. package/templates/skills/gitflow/steps/step-sync.md +6 -69
  207. package/templates/skills/ralph-loop/SKILL.md +6 -0
  208. package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
  209. package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
  210. package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
  211. package/templates/skills/ralph-loop/references/module-transition.md +151 -0
  212. package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
  213. package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
  214. package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
  215. package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
  216. package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
  217. package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
  218. package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
  219. package/templates/skills/ralph-loop/steps/step-04-check.md +20 -73
  220. package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
  221. package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
  222. package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
  223. package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
  224. package/templates/skills/validate-feature/steps/step-01-compile.md +1 -3
  225. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
  226. package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
  227. package/templates/skills/workflow/SKILL.md +1 -1
  228. package/templates/skills/workflow/steps/step-00-init.md +57 -0
@@ -186,25 +186,17 @@ Example:
186
186
 
187
187
  For **EACH module** in topological order:
188
188
 
189
- > **PATH HIERARCHY CONVENTION:** All backend file paths MUST include the context and application hierarchy.
189
+ > **PATH HIERARCHY CONVENTION:** All backend file paths MUST include the application hierarchy.
190
190
  > Derive from module feature.json metadata:
191
- > - `{ContextPascal}` = PascalCase of `metadata.context` (e.g., `"business"` → `"Business"`)
192
191
  > - `{ApplicationName}` = `metadata.application` (e.g., `"HumanResources"`)
193
192
  > - `{ModuleName}` = `metadata.module` (e.g., `"Projects"`)
194
193
  >
195
- > **Controller context-to-folder mapping (`{ContextShort}`):**
196
- > | metadata.context | Controller Folder |
197
- > |-----------------|-------------------|
198
- > | `business` | `Business` |
199
- > | `platform` | `Admin` |
200
- > | `personal` | `User` |
201
- >
202
- > **Example** for context=business, application=HumanResources, module=Projects:
203
- > - Domain: `src/Domain/Entities/Business/HumanResources/Projects/Project.cs`
204
- > - Application: `src/Application/Services/Business/HumanResources/Projects/ProjectService.cs`
205
- > - Infrastructure: `src/Infrastructure/Persistence/Configurations/Business/HumanResources/Projects/ProjectConfiguration.cs`
206
- > - API: `src/API/Controllers/Business/HumanResources/ProjectsController.cs`
207
- > - Tests: `src/Tests/Unit/Domain/Business/HumanResources/Projects/ProjectTests.cs`
194
+ > **Example** for application=HumanResources, module=Projects:
195
+ > - Domain: `src/Domain/Entities/HumanResources/Projects/Project.cs`
196
+ > - Application: `src/Application/Services/HumanResources/Projects/ProjectService.cs`
197
+ > - Infrastructure: `src/Infrastructure/Persistence/Configurations/HumanResources/Projects/ProjectConfiguration.cs`
198
+ > - API: `src/API/Controllers/HumanResources/ProjectsController.cs`
199
+ > - Tests: `src/Tests/Unit/Domain/HumanResources/Projects/ProjectTests.cs`
208
200
 
209
201
  #### 4.1-4.7 File Category Templates
210
202
 
@@ -215,7 +207,7 @@ See [references/handoff-file-templates.md](../references/handoff-file-templates.
215
207
  | **4.1 Domain** | `analysis.entities[]` | Entities, ValueObjects, Enums, Exceptions |
216
208
  | **4.2 Application** | `analysis.useCases[]` | Services, DTOs, Validators |
217
209
  | **4.3 Infrastructure** | `analysis.entities[]` | EF Configurations, DbSet, DI. **DEPENDENCY:** Each EF config task MUST `dependsOn` its corresponding domain entity task. |
218
- | **4.4 API** | `specification.apiEndpoints[]` | Controllers with `{ContextShort}` mapping |
210
+ | **4.4 API** | `specification.apiEndpoints[]` | Controllers |
219
211
  | **4.5 Frontend** | `specification.uiWireframes[]` | Pages, Components, Hooks + wireframe traceability |
220
212
  | **4.6 SeedData** | `specification.seedDataCore` | 2 app-level + per module CORE (NavigationModule + NavigationSections + Permissions + Roles) + business + IClientSeedDataProvider |
221
213
  | **4.7 Tests** | All layers | Unit, Integration, Security tests |
@@ -227,7 +219,7 @@ See [references/handoff-file-templates.md](../references/handoff-file-templates.
227
219
 
228
220
  **Problem:**
229
221
  - Module codes in feature.json are **PascalCase** (e.g., `"HumanResources"`)
230
- - Routes in seed data MUST be **kebab-case** (e.g., `"/business/human-resources"`)
222
+ - Routes in seed data MUST be **kebab-case** (e.g., `"/human-resources"`)
231
223
  - Failing to transform causes 404 when clicking menu items
232
224
 
233
225
  **Solution:**
@@ -245,10 +237,17 @@ function toKebabCase(code) {
245
237
  // Example usage in seedDataCore generation
246
238
  const moduleCode = "TimeManagement"; // PascalCase (C#)
247
239
  const appCode = "HumanResources"; // PascalCase (C#)
248
- const contextCode = "business"; // lowercase
249
240
 
250
- const route = `/${contextCode}/${toKebabCase(appCode)}/${toKebabCase(moduleCode)}`;
251
- // Result: "/business/human-resources/time-management"
241
+ const route = `/${toKebabCase(appCode)}/${toKebabCase(moduleCode)}`;
242
+ // Result: "/human-resources/time-management"
243
+ ```
244
+
245
+ **Validation:** All kebab-case routes in seed data MUST NOT include `/business/` prefix.
246
+
247
+ Example in NavigationModule:
248
+ ```csharp
249
+ route = "/human-resources"; // ✓ Correct (kebab-case module code only)
250
+ route = "/business/human-resources"; // ✗ WRONG (contains /business/)
252
251
  ```
253
252
 
254
253
  **Include in task instructions:**
@@ -260,7 +259,7 @@ For NavigationSeedData tasks in `handoff.filesToCreate`, add:
260
259
  "path": "Infrastructure/Persistence/Seeding/Data/{Module}/NavigationSeedData.cs",
261
260
  "type": "SeedData",
262
261
  "category": "core",
263
- "instructions": "Generate NavigationModule seed data. CRITICAL: Use ToKebabCase() helper for Route property. Example: Route = ToKebabCase($\"/{context}/{app}/{module}\"). See core-seed-data.md template."
262
+ "instructions": "Generate NavigationModule seed data. CRITICAL: Use ToKebabCase() helper for Route property. Example: Route = ToKebabCase($\"/{app}/{module}\"). See core-seed-data.md template."
264
263
  }
265
264
  ```
266
265
 
@@ -270,7 +269,7 @@ For NavigationSeedData tasks in `handoff.filesToCreate`, add:
270
269
  - Convention documented in naming-conventions.md
271
270
 
272
271
  **Critical rules:**
273
- - All backend paths include `{ContextPascal}/{ApplicationName}/` hierarchy
272
+ - All backend paths include `{ApplicationName}/` hierarchy
274
273
  - Frontend pages MUST have `linkedWireframes[]` + `wireframeAcceptanceCriteria`
275
274
  - SeedData: 2 app-level CORE (NavigationApplication + ApplicationRoles) + per-module CORE (NavigationModule + NavigationSections + Permissions + Roles) + IClientSeedDataProvider for client projects
276
275
  - **Acceptance Criteria Mapping:** Each task's `acceptanceCriteria` MUST be derived from its own `linkedFRs[]` entries (lookup FR → `acceptanceCriteria`). NEVER map by sequential FR index — use the task's explicit linkedFRs to resolve the correct criteria.
@@ -307,10 +306,10 @@ For each module, generate these SEPARATE frontend file entries (not one monolith
307
306
 
308
307
  ```json
309
308
  "frontend": [
310
- { "path": "src/pages/{Context}/{App}/{Mod}/{ListPage}Page.tsx", "type": "Page", "linkedWireframes": ["{module}-list"], "module": "{moduleCode}", "skill": "/ui-components" },
311
- { "path": "src/pages/{Context}/{App}/{Mod}/{Entity}CreatePage.tsx", "type": "Page", "linkedWireframes": ["{module}-create"], "module": "{moduleCode}", "skill": "/ui-components", "fkFields": ["EmployeeId→Employee", "DepartmentId→Department"] },
312
- { "path": "src/pages/{Context}/{App}/{Mod}/{Entity}EditPage.tsx", "type": "Page", "linkedWireframes": ["{module}-edit"], "module": "{moduleCode}", "skill": "/ui-components", "fkFields": ["EmployeeId→Employee", "DepartmentId→Department"] },
313
- { "path": "src/pages/{Context}/{App}/{Mod}/{DetailPage}Page.tsx", "type": "Page", "linkedWireframes": ["{module}-detail"], "module": "{moduleCode}", "skill": "/ui-components" },
309
+ { "path": "src/pages/{App}/{Mod}/{ListPage}Page.tsx", "type": "Page", "linkedWireframes": ["{module}-list"], "module": "{moduleCode}", "skill": "/ui-components" },
310
+ { "path": "src/pages/{App}/{Mod}/{Entity}CreatePage.tsx", "type": "Page", "linkedWireframes": ["{module}-create"], "module": "{moduleCode}", "skill": "/ui-components", "fkFields": ["EmployeeId→Employee", "DepartmentId→Department"] },
311
+ { "path": "src/pages/{App}/{Mod}/{Entity}EditPage.tsx", "type": "Page", "linkedWireframes": ["{module}-edit"], "module": "{moduleCode}", "skill": "/ui-components", "fkFields": ["EmployeeId→Employee", "DepartmentId→Department"] },
312
+ { "path": "src/pages/{App}/{Mod}/{DetailPage}Page.tsx", "type": "Page", "linkedWireframes": ["{module}-detail"], "module": "{moduleCode}", "skill": "/ui-components" },
314
313
  { "path": "src/hooks/use{Module}.ts", "type": "Hook", "module": "{moduleCode}" },
315
314
  { "path": "src/i18n/locales/fr/{moduleLower}.json", "type": "I18n", "language": "fr", "module": "{moduleCode}" },
316
315
  { "path": "src/i18n/locales/en/{moduleLower}.json", "type": "I18n", "language": "en", "module": "{moduleCode}" },
@@ -391,21 +390,21 @@ Write to: `.ralph/prd-CrossApplication.json`
391
390
  #### 7a. Module Handoff Loop (MANDATORY)
392
391
 
393
392
  > **STRUCTURE CARD: handoff** — Field names are EXACT. Include ALL fields below.
394
- > **PATH RULE:** All backend paths MUST include `{ContextPascal}/{ApplicationName}/` hierarchy (see section 4).
393
+ > **PATH RULE:** All backend paths MUST include `{ApplicationName}/` hierarchy (see section 4).
395
394
  > ```json
396
395
  > {
397
396
  > "complexity": "simple|medium|complex",
398
397
  > "filesToCreate": {
399
- > "domain": [{"path": "src/Domain/Entities/{Ctx}/{App}/{Mod}/{Entity}.cs", "type": "Entity|ValueObject|Enum", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
400
- > "application": [{"path": "src/Application/Services/{Ctx}/{App}/{Mod}/{Svc}Service.cs", "type": "Service|Dto|Validator", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
401
- > "infrastructure": [{"path": "src/Infrastructure/Persistence/Configurations/{Ctx}/{App}/{Mod}/{Entity}Configuration.cs", "type": "EFConfiguration", "linkedFRs": [], "module": "..."}],
402
- > "api": [{"path": "src/API/Controllers/{CtxShort}/{App}/{Entity}Controller.cs", "type": "ApiController", "linkedUCs": [], "linkedFRs": [], "module": "..."}],
403
- > "frontend": [{"path": "src/pages/{Ctx}/{App}/{Mod}/{Page}Page.tsx", "type": "Page|Component|Hook|DashboardPage|I18n", "linkedUCs": [], "linkedWireframes": [], "module": "...", "skill": "/ui-components"}],
398
+ > "domain": [{"path": "src/Domain/Entities/{App}/{Mod}/{Entity}.cs", "type": "Entity|ValueObject|Enum", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
399
+ > "application": [{"path": "src/Application/Services/{App}/{Mod}/{Svc}Service.cs", "type": "Service|Dto|Validator", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
400
+ > "infrastructure": [{"path": "src/Infrastructure/Persistence/Configurations/{App}/{Mod}/{Entity}Configuration.cs", "type": "EFConfiguration", "linkedFRs": [], "module": "..."}],
401
+ > "api": [{"path": "src/API/Controllers/{App}/{Entity}Controller.cs", "type": "ApiController", "linkedUCs": [], "linkedFRs": [], "module": "..."}],
402
+ > "frontend": [{"path": "src/pages/{App}/{Mod}/{Page}Page.tsx", "type": "Page|Component|Hook|DashboardPage|I18n", "linkedUCs": [], "linkedWireframes": [], "module": "...", "skill": "/ui-components"}],
404
403
  > "seedData": [{"path": "src/Infrastructure/Persistence/Seeding/Data/{Mod}/...SeedData.cs", "type": "SeedData", "category": "core|business", "source": "...", "module": "..."}],
405
- > "tests": [{"path": "src/Tests/Unit/Domain/{Ctx}/{App}/{Mod}/{Entity}Tests.cs", "type": "UnitTests|IntegrationTests|SecurityTests", "linkedFRs": [], "linkedUCs": [], "module": "..."}]
404
+ > "tests": [{"path": "src/Tests/Unit/Domain/{App}/{Mod}/{Entity}Tests.cs", "type": "UnitTests|IntegrationTests|SecurityTests", "linkedFRs": [], "linkedUCs": [], "module": "..."}]
406
405
  > },
407
406
  > "brToCodeMapping": [{"ruleId": "BR-...", "files": ["path1", "path2"], "implementation": "description"}],
408
- > "apiEndpointSummary": [{"method": "GET|POST|PUT|DELETE", "path": "/api/...", "permission": "business.{app}.{module}.{action}", "linkedUC": "UC-..."}],
407
+ > "apiEndpointSummary": [{"method": "GET|POST|PUT|DELETE", "path": "/api/...", "permission": "{app}.{module}.{action}", "linkedUC": "UC-..."}],
409
408
  > "prdFile": ".ralph/prd-{module}.json",
410
409
  > "totalFiles": 0,
411
410
  > "totalTasks": 0,
@@ -458,8 +457,22 @@ Write to: `.ralph/prd-CrossApplication.json`
458
457
 
459
458
  #### 7b. Generate seedDataCore (MANDATORY for master feature.json)
460
459
 
461
- > **The seedDataCore provides ralph-loop with the exact navigation, permissions, and translations to seed.**
462
- > Without seedDataCore, ralph-loop must INVENT this data — leading to inconsistencies.
460
+ > **Reference:** Load `references/handoff-seeddata-generation.md` for complete seedDataCore generation logic.
461
+
462
+ **The seedDataCore provides ralph-loop with the exact navigation, permissions, and translations to seed.**
463
+ Without seedDataCore, ralph-loop must INVENT this data — leading to inconsistencies.
464
+
465
+ The reference includes:
466
+ - Helper functions (toHumanReadable, toKebabCase)
467
+ - Complete seedDataCore template with all 9 arrays
468
+ - Icon inference for application and module levels
469
+ - POST-CHECK validation rules (BLOCKING for icons/application, warning for counts)
470
+
471
+ Key points:
472
+ - Icons must NEVER be null (use fallback if not inferred)
473
+ - All 9 seedDataCore arrays must be present (even if empty for multi-module scenarios)
474
+ - PROJECT MODE: Generate one entry per application from project feature.json
475
+ - SINGLE-APP MODE: Generate one entry from master feature.json
463
476
 
464
477
  ```
465
478
  // Derive seedDataCore from modules[], applicationRoles[], and coverageMatrix[]
@@ -471,7 +484,6 @@ function toHumanReadable(pascalCase) {
471
484
  .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');
472
485
  }
473
486
 
474
- const contextCode = master.metadata.context || "business";
475
487
  const appCode = master.metadata.application;
476
488
  const appLabel = toHumanReadable(appCode);
477
489
  const appDesc = master.cadrage?.problem?.split('.')[0] || `Gestion ${appLabel}`;
@@ -486,7 +498,6 @@ const seedDataCore = {
486
498
  // Multi-app: one navigation entry per application
487
499
  return projectFeature.applications.map((app, idx) => {
488
500
  const appLabel = toHumanReadable(app.code);
489
- const appContext = app.context || "business";
490
501
  return {
491
502
  code: app.code.toLowerCase(),
492
503
  name: app.code,
@@ -504,8 +515,7 @@ const seedDataCore = {
504
515
  },
505
516
  icon: app.icon || inferIconFromApplication({ metadata: { application: app.code } }) || "layout-grid",
506
517
  iconType: "lucide",
507
- context: appContext,
508
- route: `/${appContext}/${toKebabCase(app.code)}`,
518
+ route: `/${toKebabCase(app.code)}`,
509
519
  displayOrder: (idx + 1) * 10
510
520
  };
511
521
  });
@@ -528,8 +538,7 @@ const seedDataCore = {
528
538
  },
529
539
  icon: inferIconFromApplication(master) || "layout-grid",
530
540
  iconType: "lucide",
531
- context: contextCode,
532
- route: `/${contextCode}/${toKebabCase(appCode)}`,
541
+ route: `/${toKebabCase(appCode)}`,
533
542
  displayOrder: 1
534
543
  }];
535
544
  }
@@ -541,7 +550,6 @@ const seedDataCore = {
541
550
  if (workflow.mode === "project") {
542
551
  let order = 0;
543
552
  return projectFeature.applications.flatMap(app => {
544
- const appContext = app.context || "business";
545
553
  return (app.modules || []).map(m => ({
546
554
  code: m.code,
547
555
  applicationCode: app.code,
@@ -549,7 +557,7 @@ const seedDataCore = {
549
557
  description: m.description,
550
558
  icon: inferIconFromModule(m) || "folder",
551
559
  iconType: "lucide",
552
- route: `/${appContext}/${toKebabCase(app.code)}/${toKebabCase(m.code)}`,
560
+ route: `/${toKebabCase(app.code)}/${toKebabCase(m.code)}`,
553
561
  displayOrder: (++order) * 10
554
562
  }));
555
563
  });
@@ -560,14 +568,14 @@ const seedDataCore = {
560
568
  description: m.description,
561
569
  icon: inferIconFromModule(m) || "folder",
562
570
  iconType: "lucide",
563
- route: `/${contextCode}/${toKebabCase(appCode)}/${toKebabCase(m.code)}`,
571
+ route: `/${toKebabCase(appCode)}/${toKebabCase(m.code)}`,
564
572
  displayOrder: (i + 1) * 10
565
573
  }));
566
574
  }
567
575
  })(),
568
576
 
569
577
  navigationSections: (() => {
570
- const buildSections = (modules, appContextCode, appCode) =>
578
+ const buildSections = (modules, appCode) =>
571
579
  modules.flatMap(m =>
572
580
  (m.anticipatedSections || []).map((s, j) => ({
573
581
  moduleCode: m.code,
@@ -575,10 +583,10 @@ const seedDataCore = {
575
583
  label: s.description?.split(':')[0] || s.code,
576
584
  description: s.description || "",
577
585
  route: s.code === "list"
578
- ? `/${appContextCode}/${toKebabCase(appCode)}/${toKebabCase(m.code)}`
586
+ ? `/${toKebabCase(appCode)}/${toKebabCase(m.code)}`
579
587
  : s.code === "detail"
580
- ? `/${appContextCode}/${toKebabCase(appCode)}/${toKebabCase(m.code)}/:id`
581
- : `/${appContextCode}/${toKebabCase(appCode)}/${toKebabCase(m.code)}/${toKebabCase(s.code)}`,
588
+ ? `/${toKebabCase(appCode)}/${toKebabCase(m.code)}/:id`
589
+ : `/${toKebabCase(appCode)}/${toKebabCase(m.code)}/${toKebabCase(s.code)}`,
582
590
  displayOrder: (j + 1) * 10,
583
591
  navigation: s.code === "detail" ? "hidden" : "visible"
584
592
  }))
@@ -586,10 +594,10 @@ const seedDataCore = {
586
594
 
587
595
  if (workflow.mode === "project") {
588
596
  return projectFeature.applications.flatMap(app =>
589
- buildSections(app.modules || [], app.context || "business", app.code)
597
+ buildSections(app.modules || [], app.code)
590
598
  );
591
599
  } else {
592
- return buildSections(master.modules, contextCode, appCode);
600
+ return buildSections(master.modules, appCode);
593
601
  }
594
602
  })(),
595
603
 
@@ -616,11 +624,11 @@ const seedDataCore = {
616
624
  }),
617
625
 
618
626
  // PROJECT MODE: permissions scoped per application context
619
- // SINGLE-APP MODE: all permissions under business.{app}
627
+ // SINGLE-APP MODE: all permissions under {app}
620
628
  permissions: (() => {
621
- const buildPermissions = (modules, appContext, appCode) =>
629
+ const buildPermissions = (modules, appCode) =>
622
630
  modules.flatMap(m => {
623
- const basePath = `${appContext}.${toKebabCase(appCode)}.${toKebabCase(m.code)}`;
631
+ const basePath = `${toKebabCase(appCode)}.${toKebabCase(m.code)}`;
624
632
  const actions = ['read', 'create', 'update', 'delete'];
625
633
  return [
626
634
  { path: `${basePath}.*`, action: '*', description: `Full ${m.name || m.code} access` },
@@ -634,19 +642,19 @@ const seedDataCore = {
634
642
 
635
643
  if (workflow.mode === "project") {
636
644
  return projectFeature.applications.flatMap(app =>
637
- buildPermissions(app.modules || [], app.context || "business", app.code)
645
+ buildPermissions(app.modules || [], app.code)
638
646
  );
639
647
  } else {
640
- return buildPermissions(master.modules, contextCode, appCode);
648
+ return buildPermissions(master.modules, appCode);
641
649
  }
642
650
  })(),
643
651
 
644
652
  rolePermissions: (() => {
645
- const buildRolePermissions = (roles, modules, appContext, appCode) =>
653
+ const buildRolePermissions = (roles, modules, appCode) =>
646
654
  roles.map(role => ({
647
655
  role: role.role,
648
656
  level: role.level,
649
- permissions: modules.map(m => `${appContext}.${toKebabCase(appCode)}.${toKebabCase(m.code)}.${
657
+ permissions: modules.map(m => `${toKebabCase(appCode)}.${toKebabCase(m.code)}.${
650
658
  role.level === 'admin' ? '*' :
651
659
  role.level === 'manager' ? 'read,create,update' :
652
660
  role.level === 'contributor' ? 'read,create' : 'read'
@@ -655,10 +663,10 @@ const seedDataCore = {
655
663
 
656
664
  if (workflow.mode === "project") {
657
665
  return projectFeature.applications.flatMap(app =>
658
- buildRolePermissions(app.applicationRoles || [], app.modules || [], app.context || "business", app.code)
666
+ buildRolePermissions(app.applicationRoles || [], app.modules || [], app.code)
659
667
  );
660
668
  } else {
661
- return buildRolePermissions(master.cadrage.applicationRoles, master.modules, contextCode, appCode);
669
+ return buildRolePermissions(master.cadrage.applicationRoles, master.modules, appCode);
662
670
  }
663
671
  })(),
664
672
 
@@ -670,7 +678,7 @@ const seedDataCore = {
670
678
  application: appCode,
671
679
  action: action,
672
680
  constant: `${appCode}${m.code}${action}`,
673
- path: `${contextCode}.${toKebabCase(appCode)}.${toKebabCase(m.code)}.${action.toLowerCase()}`
681
+ path: `${toKebabCase(appCode)}.${toKebabCase(m.code)}.${action.toLowerCase()}`
674
682
  }))
675
683
  );
676
684
 
@@ -684,48 +692,10 @@ const seedDataCore = {
684
692
  })()
685
693
  };
686
694
 
687
- // Icon inference for APPLICATION level (NEVER leave as null)
688
- function inferIconFromApplication(master) {
689
- const appLC = (master.metadata.application || '').toLowerCase();
690
- const iconMap = {
691
- 'humanresource': 'users', 'rh': 'users', 'hr': 'users', 'personnel': 'users',
692
- 'sales': 'shopping-cart', 'vente': 'shopping-cart', 'commerce': 'shopping-cart',
693
- 'finance': 'wallet', 'comptabilite': 'calculator', 'accounting': 'calculator',
694
- 'inventory': 'warehouse', 'stock': 'package', 'logistic': 'truck',
695
- 'crm': 'building-2', 'customer': 'building', 'client': 'building-2',
696
- 'project': 'folder-kanban', 'task': 'check-square', 'gestion': 'layout-grid',
697
- 'admin': 'shield', 'support': 'headphones', 'maintenance': 'wrench',
698
- 'production': 'factory', 'quality': 'badge-check', 'document': 'file-text',
699
- 'fleet': 'car', 'vehicle': 'car', 'transport': 'truck',
700
- 'education': 'graduation-cap', 'formation': 'graduation-cap', 'training': 'graduation-cap'
701
- };
702
- for (const [keyword, icon] of Object.entries(iconMap)) {
703
- if (appLC.includes(keyword)) return icon;
704
- }
705
- return "layout-grid"; // fallback — NEVER null
706
- }
707
-
708
- // Icon inference from module context (NEVER leave as null)
709
- function inferIconFromModule(module) {
710
- const codeLC = module.code.toLowerCase();
711
- const iconMap = {
712
- 'employee': 'users', 'staff': 'users', 'personnel': 'users', 'user': 'users',
713
- 'project': 'folder-kanban', 'task': 'check-square', 'work': 'briefcase',
714
- 'time': 'clock', 'schedule': 'calendar', 'planning': 'calendar-days',
715
- 'absence': 'calendar-off', 'leave': 'calendar-off', 'vacation': 'palm-tree',
716
- 'finance': 'wallet', 'billing': 'receipt', 'invoice': 'file-text',
717
- 'inventory': 'warehouse', 'stock': 'package', 'product': 'shopping-bag',
718
- 'customer': 'building', 'client': 'building-2', 'contact': 'contact',
719
- 'report': 'bar-chart', 'dashboard': 'layout-dashboard', 'analytics': 'trending-up',
720
- 'document': 'file-text', 'notification': 'bell', 'setting': 'settings',
721
- 'order': 'shopping-cart', 'vehicle': 'car', 'maintenance': 'wrench',
722
- 'audit': 'shield-check', 'workflow': 'git-branch', 'approval': 'check-circle'
723
- };
724
- for (const [keyword, icon] of Object.entries(iconMap)) {
725
- if (codeLC.includes(keyword)) return icon;
726
- }
727
- return "folder"; // fallback — NEVER null
728
- }
695
+ // Icon inference functions are defined in the reference
696
+ // inferIconFromApplication(master) - Application level icons
697
+ // inferIconFromModule(module) - Module level icons
698
+ // See references/handoff-seeddata-generation.md for complete implementation
729
699
 
730
700
  ba-writer.enrichSection({
731
701
  featureId: {feature_id},
@@ -737,7 +707,7 @@ ba-writer.enrichSection({
737
707
  **POST-CHECK (BLOCKING for icons/application, warning for counts):**
738
708
  ```
739
709
  IF !seedDataCore.navigationApplications || seedDataCore.navigationApplications.length === 0:
740
- BLOCKING ERROR: "navigationApplications is empty — Application navigation will NOT be seeded. Menu will show Context → (nothing) → Modules."
710
+ BLOCKING ERROR: "navigationApplications is empty — Application navigation will NOT be seeded. Menu will show (nothing) → Modules."
741
711
  IF seedDataCore.navigationApplications[0].icon === null || seedDataCore.navigationApplications[0].icon === undefined:
742
712
  BLOCKING ERROR: "Application icon is null — ralph-loop will render empty navigation"
743
713
  IF !seedDataCore.navigationApplications[0].labels?.fr || !seedDataCore.navigationApplications[0].labels?.en:
@@ -14,7 +14,7 @@ next_step: steps/step-05c-ralph-readiness.md
14
14
  - **ALWAYS** verify all module handoffs are complete before generating artifacts
15
15
  - **ALWAYS** derive prd.json from feature.json (NEVER independently)
16
16
  - **NEVER** invent entities/FRs/BRs not in feature.json
17
- - **ALWAYS** update BA manifest at docs/business/index.json
17
+ - **ALWAYS** update BA manifest at docs/index.json
18
18
  - **ALWAYS** deploy ba-interactive.html PRE-POPULATED with all data
19
19
  - **ALWAYS** follow references/html-data-mapping.md EXACTLY for FEATURE_DATA and EMBEDDED_ARTIFACTS mapping
20
20
  - **FEATURE_DATA.moduleSpecs MUST be populated for EACH module** — empty moduleSpecs = BROKEN specification tabs
@@ -148,9 +148,9 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
148
148
  ### 3. Update BA Manifest (MANDATORY)
149
149
 
150
150
  > **The BA manifest enables the SmartStack web app to discover and display all available business analyses.**
151
- > It is a JSON index file at `docs/business/index.json` that lists all feature.json files.
151
+ > It is a JSON index file at `docs/index.json` that lists all feature.json files.
152
152
 
153
- **Path:** `docs/business/index.json` (project root relative)
153
+ **Path:** `docs/index.json` (project root relative)
154
154
 
155
155
  **Schema:**
156
156
  ```json
@@ -173,9 +173,11 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
173
173
  }
174
174
  ```
175
175
 
176
+ > Note: The "path" field uses `{app_code}` directly without any prefix (e.g., `FreeBike/business-analyse/v1.0/feature.json`).
177
+
176
178
  **Update logic:**
177
179
 
178
- 1. Read existing manifest at `docs/business/index.json` (or create empty `{ "version": "1.0", "updatedAt": "", "analyses": [] }`)
180
+ 1. Read existing manifest at `docs/index.json` (or create empty `{ "version": "1.0", "updatedAt": "", "analyses": [] }`)
179
181
 
180
182
  2. **PROJECT MODE (`workflow.mode === "project"`):**
181
183
  a. Add/update PROJECT-level entry:
@@ -185,11 +187,11 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
185
187
  b. For EACH APPLICATION:
186
188
  - Find existing entry where `appCode == {app_code}` AND `moduleCode == null` AND `version == {version}`
187
189
  - If found: update `status`, `updatedAt`, `featureDescription`
188
- - If not found: append new entry with `moduleCode: null`, `context: "{app.context}"`, and `path: "{context}/{app_code}/business-analyse/v{version}/feature.json"`
190
+ - If not found: append new entry with `moduleCode: null` and `path: "{app_code}/business-analyse/v{version}/feature.json"`
189
191
  c. For EACH MODULE within each application:
190
192
  - Find existing entry where `appCode == {app_code}` AND `moduleCode == {module_code}` AND `version == {version}`
191
193
  - If found: update `status`, `updatedAt`, `featureDescription`
192
- - If not found: append new entry with `path: "{context}/{app_code}/{module_code}/business-analyse/v{version}/feature.json"`
194
+ - If not found: append new entry with `path: "{app_code}/{module_code}/business-analyse/v{version}/feature.json"`
193
195
 
194
196
  3. **SINGLE-APP MODE (default):**
195
197
  a. For the APPLICATION-level feature.json:
@@ -202,11 +204,11 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
202
204
  - If not found: append new entry with `moduleCode: "{module_code}"` and `path: "{app_code}/{module_code}/business-analyse/v{version}/feature.json"`
203
205
 
204
206
  4. Update root `updatedAt` to current timestamp
205
- 5. Write manifest back to `docs/business/index.json`
207
+ 5. Write manifest back to `docs/index.json`
206
208
 
207
209
  **Display confirmation:**
208
210
  ```
209
- ✓ BA manifest updated: docs/business/index.json
211
+ ✓ BA manifest updated: docs/index.json
210
212
  Entries: {total_count} ({project_count} projects, {app_count} applications, {module_count} modules)
211
213
  Web viewer: /system/docs/ba
212
214
  ```
@@ -293,12 +295,12 @@ See [references/wireframe-svg-style-guide.md](../references/wireframe-svg-style-
293
295
 
294
296
  ### 8. Write and Verify
295
297
 
296
- 1. Write the populated HTML to the output directory: `docs/business/{app}/business-analyse/v{version}/ba-interactive.html`
298
+ 1. Write the populated HTML to the output directory: `docs/{app}/business-analyse/v{version}/ba-interactive.html`
297
299
  2. Display deployment confirmation:
298
300
 
299
301
  ```
300
302
  [OK] Interactive HTML deployed:
301
- Path: docs/business/{app}/business-analyse/v{version}/ba-interactive.html
303
+ Path: docs/{app}/business-analyse/v{version}/ba-interactive.html
302
304
  Pre-populated with: {stakeholder_count} stakeholders, {module_count} modules,
303
305
  {total_uc} use cases, {total_br} business rules, {total_entity} entities
304
306
  Visual artifacts: {total_wireframes} wireframes, {e2e_flow_count} E2E diagrams
@@ -314,7 +316,7 @@ Before displaying completion, VERIFY:
314
316
 
315
317
  1. **`.ralph/prd-{module}.json`** exists for ALL modules (file size > 100 bytes each)
316
318
  2. **`.ralph/progress.txt`** exists (file size > 500 bytes)
317
- 3. **`docs/business/index.json`** exists with correct entry count
319
+ 3. **`docs/index.json`** exists with correct entry count
318
320
  4. **ba-interactive.html** exists and file size > 100KB
319
321
  5. **FEATURE_DATA contains moduleSpecs** with entries for ALL modules
320
322
  6. **cadrage.scope uses HTML keys** (vital/important/optional/excluded)
@@ -203,11 +203,11 @@ Write .ralph/progress.txt with:
203
203
  ## Step 10: Update Manifest
204
204
 
205
205
  ```
206
- 1. Read docs/business/index.json
206
+ 1. Read docs/index.json
207
207
  2. Find entry for this application
208
208
  3. Update version, lastModified, status
209
209
  4. If entry doesn't exist, create it
210
- 5. Write docs/business/index.json
210
+ 5. Write docs/index.json
211
211
  ```
212
212
 
213
213
  ## Step 11: Regenerate Interactive HTML
@@ -258,7 +258,7 @@ Artifacts regenerated:
258
258
  | ba-interactive.html | {new_docs_dir}/ba-interactive.html |
259
259
  | PRD files | .ralph/prd-*.json |
260
260
  | progress.txt | .ralph/progress.txt |
261
- | Manifest | docs/business/index.json |
261
+ | Manifest | docs/index.json |
262
262
 
263
263
  NEXT STEPS:
264
264
  1. Open the new ba-interactive.html to verify corrections
@@ -11,7 +11,7 @@
11
11
  > **Module:** business/{application}/{module}
12
12
  > **Version:** 1.0
13
13
  > **Based on:** 2-brd.md v1.0
14
- > **Permission path:** business.{application}.{module}.*
14
+ > **Permission path:** {application}.{module}.*
15
15
 
16
16
  ## 1. Overview
17
17
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  | Actor | Description | Required Permissions |
24
24
  |--------|-------------|---------------------|
25
- | {Role} | {description} | `business.{app}.{module}.{action}` |
25
+ | {Role} | {description} | `{app}.{module}.{action}` |
26
26
 
27
27
  ## 2. Use Cases
28
28
 
@@ -35,7 +35,7 @@
35
35
  | **Primary Actor** | {Role} |
36
36
  | **Preconditions** | {required conditions} |
37
37
  | **Postconditions** | {final state} |
38
- | **Permission** | `business.{app}.{module}.{action}` |
38
+ | **Permission** | `{app}.{module}.{action}` |
39
39
 
40
40
  **Main Scenario:**
41
41
  1. The user {action}
@@ -125,19 +125,19 @@
125
125
 
126
126
  | Permission | Admin | Manager | User | ReadOnly |
127
127
  |------------|-------|---------|------|----------|
128
- | `business.{app}.{module}.read` | ✅ | ✅ | ✅ | ✅ |
129
- | `business.{app}.{module}.create` | ✅ | ✅ | ❌ | ❌ |
130
- | `business.{app}.{module}.update` | ✅ | ✅ | ❌ | ❌ |
131
- | `business.{app}.{module}.delete` | ✅ | ❌ | ❌ | ❌ |
128
+ | `{app}.{module}.read` | ✅ | ✅ | ✅ | ✅ |
129
+ | `{app}.{module}.create` | ✅ | ✅ | ❌ | ❌ |
130
+ | `{app}.{module}.update` | ✅ | ✅ | ❌ | ❌ |
131
+ | `{app}.{module}.delete` | ✅ | ❌ | ❌ | ❌ |
132
132
 
133
133
  ### 6.2 Endpoint-Permission Mapping
134
134
 
135
135
  | Endpoint | Method | Required Permission |
136
136
  |----------|--------|-------------------|
137
- | `/api/business/{module}` | GET | `{module}.read` |
138
- | `/api/business/{module}` | POST | `{module}.create` |
139
- | `/api/business/{module}/{id}` | PUT | `{module}.update` |
140
- | `/api/business/{module}/{id}` | DELETE | `{module}.delete` |
137
+ | `/api/{module}` | GET | `{module}.read` |
138
+ | `/api/{module}` | POST | `{module}.create` |
139
+ | `/api/{module}/{id}` | PUT | `{module}.update` |
140
+ | `/api/{module}/{id}` | DELETE | `{module}.delete` |
141
141
 
142
142
  ## 7. Gherkin Scenarios
143
143
 
@@ -147,13 +147,13 @@ Feature: {FEAT-XXX} {Feature Name}
147
147
  @permission @403
148
148
  Scenario: User without permission cannot create
149
149
  Given I am logged in as "user@test.com" with role "ReadOnly"
150
- When I send POST to "/api/business/{module}"
150
+ When I send POST to "/api/{module}"
151
151
  Then the response status should be 403
152
152
 
153
153
  @happy-path
154
154
  Scenario: Admin creates new item
155
155
  Given I am logged in as "admin@test.com" with role "Admin"
156
- When I send POST to "/api/business/{module}" with:
156
+ When I send POST to "/api/{module}" with:
157
157
  | field1 | value1 |
158
158
  Then the response status should be 201
159
159
  ```
@@ -8,10 +8,10 @@
8
8
  ```markdown
9
9
  # Development Handoff - {FEAT-XXX} {Feature Name}
10
10
 
11
- > **Module:** business/{application}/{module}
11
+ > **Module:** {application}/{module}
12
12
  > **Version:** {version}
13
13
  > **Validated Specs:** feature.json (validation.decision = APPROVED)
14
- > **Source:** `docs/business/{app}/{module}/business-analyse/v{version}/feature.json`
14
+ > **Source:** `docs/{app}/{module}/business-analyse/v{version}/feature.json`
15
15
  > **Implementation:** `/ralph-loop`
16
16
 
17
17
  ## DEVELOPER INSTRUCTIONS
@@ -32,8 +32,8 @@ This document is a self-contained prompt for Claude Code.
32
32
  | Attribute | Value |
33
33
  |----------|--------|
34
34
  | Feature ID | {feature.id} |
35
- | Module | business/{feature.metadata.application}/{feature.metadata.module} |
36
- | Base Permission | `business.{app}.{module}` |
35
+ | Module | {feature.metadata.application}/{feature.metadata.module} |
36
+ | Base Permission | `{app}.{module}` |
37
37
  | Project Namespace | {feature.metadata.projectNamespace} |
38
38
  | DB Schema | `extensions` (client entities) / `core` (navigation, permissions) |
39
39
  | Table Prefix | `{prefix}_` |
@@ -59,7 +59,7 @@ SEED DATA (CRITICAL):
59
59
  - RolePermissionConfiguration.cs -> How role-permission mappings are seeded
60
60
 
61
61
  FRONTEND:
62
- - web/src/pages/business/ -> Existing pages
62
+ - web/src/pages/ -> Existing pages
63
63
  - web/src/components/ -> Reusable components
64
64
  - web/src/services/api/ -> API calls
65
65
  ```
@@ -77,8 +77,8 @@ FRONTEND:
77
77
  | DTOs | `Application/Business/{Application}/{Module}/DTOs/{Entity}Dto.cs` | Response, Create, Update records |
78
78
  | Mapping | `Application/Business/{Application}/{Module}/DTOs/{Entity}MappingExtensions.cs` | Entity <-> DTO mapping |
79
79
  | Permission Constants | `Application/Business/{Application}/{Module}/Permissions.cs` | Compile-time constants |
80
- | EF Configuration | `Infrastructure/Persistence/Configurations/{Context}/{Application}/{Module}/{Entity}Configuration.cs` | Table + indexes + HasData |
81
- | Service Implementation | `Infrastructure/Services/{Context}/{Application}/{Module}/{Entity}Service.cs` | Business logic |
80
+ | EF Configuration | `Infrastructure/Persistence/Configurations/{Application}/{Module}/{Entity}Configuration.cs` | Table + indexes + HasData |
81
+ | Service Implementation | `Infrastructure/Services/{Application}/{Module}/{Entity}Service.cs` | Business logic |
82
82
  | Controller | `Api/Controllers/Business/{Application}/{Module}Controller.cs` | NavRoute + RequirePermission |
83
83
 
84
84
  ### 3.2 SeedData Core (CRITICAL -- without these, module is invisible and returns 403)
@@ -100,8 +100,8 @@ FRONTEND:
100
100
 
101
101
  | File | Path Pattern | Description |
102
102
  |------|-------------|-------------|
103
- | Main Page | `pages/business/{app}/{module}/page.tsx` | List + actions |
104
- | Components | `components/business/{module}/` | Entity-specific components |
103
+ | Main Page | `pages/{app}/{module}/page.tsx` | List + actions |
104
+ | Components | `components/{app}/{module}/` | Entity-specific components |
105
105
  | API Service | `services/api/{module}Api.ts` | Typed Axios calls |
106
106
  | Translations | `i18n/locales/{lang}/{module}.json` | FR, EN, IT, DE |
107
107
 
@@ -137,7 +137,7 @@ From: `feature.specification.seedDataCore` (5 core files), `feature.specificatio
137
137
  > **IMPORTANT :** Les données des 5 fichiers SeedData Core doivent être dérivées de `specification.seedDataCore` :
138
138
  > - `navigationModules` → NavigationModuleConfiguration.cs
139
139
  > - `navigationTranslations` → NavigationTranslationConfiguration.cs
140
- > - `permissions` → PermissionConfiguration.cs (module-level: `business.{app}.{module}.{action}`, section-level: `business.{app}.{module}.{section}.{action}`)
140
+ > - `permissions` → PermissionConfiguration.cs (module-level: `{app}.{module}.{action}`, section-level: `{app}.{module}.{section}.{action}`)
141
141
  > - `rolePermissions` → RolePermissionConfiguration.cs
142
142
  > - `permissionConstants` → Permissions.cs (PascalCase constants)
143
143
 
@@ -158,8 +158,8 @@ From: `feature.specification.seedDataCore` (5 core files), `feature.specificatio
158
158
  **Folder Conventions:**
159
159
  - [ ] Domain entities in `Domain/Business/{Application}/{Module}/`
160
160
  - [ ] Application DTOs in `Application/Business/{Application}/{Module}/DTOs/`
161
- - [ ] Infrastructure configs in `Configurations/{Context}/{Application}/{Module}/`
162
- - [ ] Infrastructure services in `Services/{Context}/{Application}/{Module}/`
161
+ - [ ] Infrastructure configs in `Configurations/{Application}/{Module}/`
162
+ - [ ] Infrastructure services in `Services/{Application}/{Module}/`
163
163
  - [ ] Controller in `Controllers/Business/{Application}/`
164
164
 
165
165
  **SeedData Core (CRITICAL):**
@@ -72,7 +72,7 @@
72
72
  □ Create custom hook use{ModuleName}
73
73
  □ Implement pagination, filtering, sorting
74
74
  □ Validate all pages match their wireframe layout
75
- □ ⚠️ Routes MUST be INSIDE Layout wrapper (AdminLayout/BusinessLayout/UserLayout)
75
+ □ ⚠️ Routes MUST be INSIDE the AppLayout wrapper
76
76
  Total: C tasks
77
77
 
78
78
  [I18N] Internationalization Keys