@atlashub/smartstack-cli 3.36.0 → 3.38.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 (219) hide show
  1. package/dist/index.js +16 -24
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +201 -256
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +3 -2
  6. package/scripts/extract-api-endpoints.ts +325 -0
  7. package/scripts/extract-business-rules.ts +440 -0
  8. package/scripts/generate-doc-with-mock-ui.ts +804 -0
  9. package/scripts/health-check.sh +168 -0
  10. package/scripts/postinstall.js +18 -0
  11. package/templates/agents/ba-reader.md +9 -9
  12. package/templates/agents/ba-writer.md +12 -15
  13. package/templates/agents/code-reviewer.md +1 -1
  14. package/templates/agents/docs-context-reader.md +1 -1
  15. package/templates/agents/gitflow/merge.md +0 -4
  16. package/templates/agents/gitflow/pr.md +0 -4
  17. package/templates/agents/gitflow/start.md +30 -5
  18. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
  19. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
  20. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
  21. package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
  22. package/templates/skills/_shared.md +15 -17
  23. package/templates/skills/ai-prompt/SKILL.md +1 -1
  24. package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
  25. package/templates/skills/apex/SKILL.md +3 -4
  26. package/templates/skills/apex/_shared.md +10 -20
  27. package/templates/skills/apex/references/analysis-methods.md +141 -0
  28. package/templates/skills/apex/references/challenge-questions.md +1 -21
  29. package/templates/skills/apex/references/core-seed-data.md +35 -57
  30. package/templates/skills/apex/references/examine-build-validation.md +87 -0
  31. package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
  32. package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
  33. package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
  34. package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
  35. package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
  36. package/templates/skills/apex/references/post-checks.md +145 -40
  37. package/templates/skills/apex/references/smartstack-api.md +35 -51
  38. package/templates/skills/apex/references/smartstack-frontend.md +17 -17
  39. package/templates/skills/apex/references/smartstack-layers.md +38 -62
  40. package/templates/skills/apex/steps/step-00-init.md +14 -26
  41. package/templates/skills/apex/steps/step-01-analyze.md +10 -143
  42. package/templates/skills/apex/steps/step-02-plan.md +10 -92
  43. package/templates/skills/apex/steps/step-03-execute.md +47 -249
  44. package/templates/skills/apex/steps/step-04-examine.md +14 -78
  45. package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
  46. package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
  47. package/templates/skills/application/SKILL.md +6 -7
  48. package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
  49. package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
  50. package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
  51. package/templates/skills/application/references/backend-verification.md +1 -1
  52. package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
  53. package/templates/skills/application/references/frontend-route-naming.md +117 -0
  54. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
  55. package/templates/skills/application/references/frontend-verification.md +12 -12
  56. package/templates/skills/application/references/init-parameter-detection.md +120 -0
  57. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
  58. package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
  59. package/templates/skills/application/references/provider-template.md +2 -6
  60. package/templates/skills/application/references/roles-client-project-handling.md +55 -0
  61. package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
  62. package/templates/skills/application/references/test-coverage-requirements.md +213 -0
  63. package/templates/skills/application/references/test-frontend.md +3 -3
  64. package/templates/skills/application/steps/step-00-init.md +11 -141
  65. package/templates/skills/application/steps/step-01-navigation.md +3 -3
  66. package/templates/skills/application/steps/step-02-permissions.md +4 -4
  67. package/templates/skills/application/steps/step-03-roles.md +18 -175
  68. package/templates/skills/application/steps/step-03b-provider.md +1 -2
  69. package/templates/skills/application/steps/step-04-backend.md +19 -110
  70. package/templates/skills/application/steps/step-05-frontend.md +17 -143
  71. package/templates/skills/application/steps/step-06-migration.md +12 -60
  72. package/templates/skills/application/steps/step-07-tests.md +9 -76
  73. package/templates/skills/application/templates-backend.md +29 -27
  74. package/templates/skills/application/templates-frontend.md +48 -48
  75. package/templates/skills/application/templates-seed.md +57 -131
  76. package/templates/skills/business-analyse/SKILL.md +27 -30
  77. package/templates/skills/business-analyse/_architecture.md +6 -6
  78. package/templates/skills/business-analyse/_shared.md +60 -88
  79. package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
  80. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  81. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
  82. package/templates/skills/business-analyse/react/application-viewer.md +12 -12
  83. package/templates/skills/business-analyse/react/components.md +8 -12
  84. package/templates/skills/business-analyse/react/schema.md +11 -11
  85. package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
  86. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
  87. package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
  88. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
  89. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
  90. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
  91. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
  92. package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
  93. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  94. package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
  95. package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
  96. package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
  97. package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
  98. package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
  99. package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
  100. package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
  101. package/templates/skills/business-analyse/references/prd-generation.md +2 -2
  102. package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
  103. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  104. package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
  105. package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
  106. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  107. package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
  108. package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
  109. package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
  110. package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
  111. package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
  112. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
  113. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
  114. package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
  115. package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
  116. package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
  117. package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
  118. package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
  119. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
  120. package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
  121. package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
  122. package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
  123. package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
  124. package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
  125. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  126. package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
  127. package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
  128. package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
  129. package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
  130. package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
  131. package/templates/skills/business-analyse/templates-frd.md +25 -25
  132. package/templates/skills/business-analyse/templates-react.md +15 -21
  133. package/templates/skills/controller/SKILL.md +1 -1
  134. package/templates/skills/controller/postman-templates.md +1 -1
  135. package/templates/skills/controller/references/controller-code-templates.md +2 -2
  136. package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
  137. package/templates/skills/controller/references/permission-sync-templates.md +13 -16
  138. package/templates/skills/controller/steps/step-00-init.md +11 -11
  139. package/templates/skills/controller/steps/step-03-generate.md +64 -103
  140. package/templates/skills/controller/templates.md +67 -71
  141. package/templates/skills/debug/SKILL.md +13 -218
  142. package/templates/skills/debug/steps/step-00-init.md +57 -0
  143. package/templates/skills/debug/steps/step-01-analyze.md +219 -0
  144. package/templates/skills/debug/steps/step-02-resolve.md +85 -0
  145. package/templates/skills/documentation/SKILL.md +49 -345
  146. package/templates/skills/documentation/data-schema.md +11 -8
  147. package/templates/skills/documentation/steps/step-00-init.md +70 -0
  148. package/templates/skills/documentation/steps/step-01-scan.md +113 -0
  149. package/templates/skills/documentation/steps/step-02-generate.md +231 -0
  150. package/templates/skills/documentation/steps/step-03-validate.md +238 -0
  151. package/templates/skills/documentation/templates.md +480 -322
  152. package/templates/skills/efcore/references/both-contexts.md +32 -0
  153. package/templates/skills/efcore/references/database-operations.md +67 -0
  154. package/templates/skills/efcore/references/destructive-operations.md +38 -0
  155. package/templates/skills/efcore/references/reset-operations.md +81 -0
  156. package/templates/skills/efcore/references/seed-methods.md +86 -0
  157. package/templates/skills/efcore/references/shared-init-functions.md +250 -0
  158. package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
  159. package/templates/skills/efcore/references/troubleshooting.md +81 -0
  160. package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
  161. package/templates/skills/efcore/steps/db/step-reset.md +7 -103
  162. package/templates/skills/efcore/steps/db/step-seed.md +10 -132
  163. package/templates/skills/efcore/steps/db/step-status.md +5 -44
  164. package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
  165. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
  166. package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
  167. package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
  168. package/templates/skills/feature-full/SKILL.md +1 -1
  169. package/templates/skills/feature-full/steps/step-00-init.md +57 -0
  170. package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
  171. package/templates/skills/gitflow/SKILL.md +1 -1
  172. package/templates/skills/gitflow/_shared.md +23 -0
  173. package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
  174. package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
  175. package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
  176. package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
  177. package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
  178. package/templates/skills/gitflow/references/init-questions.md +185 -0
  179. package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
  180. package/templates/skills/gitflow/references/init-version-detection.md +21 -0
  181. package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
  182. package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
  183. package/templates/skills/gitflow/references/merge-execution.md +62 -0
  184. package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
  185. package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
  186. package/templates/skills/gitflow/references/pr-generation.md +58 -0
  187. package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
  188. package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
  189. package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
  190. package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
  191. package/templates/skills/gitflow/steps/step-commit.md +12 -91
  192. package/templates/skills/gitflow/steps/step-finish.md +15 -159
  193. package/templates/skills/gitflow/steps/step-init.md +24 -326
  194. package/templates/skills/gitflow/steps/step-merge.md +17 -176
  195. package/templates/skills/gitflow/steps/step-pr.md +10 -116
  196. package/templates/skills/gitflow/steps/step-start.md +16 -109
  197. package/templates/skills/gitflow/steps/step-sync.md +6 -69
  198. package/templates/skills/ralph-loop/SKILL.md +6 -0
  199. package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
  200. package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
  201. package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
  202. package/templates/skills/ralph-loop/references/module-transition.md +151 -0
  203. package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
  204. package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
  205. package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
  206. package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
  207. package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
  208. package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
  209. package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
  210. package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
  211. package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
  212. package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
  213. package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
  214. package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
  215. package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
  216. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
  217. package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
  218. package/templates/skills/workflow/SKILL.md +1 -1
  219. package/templates/skills/workflow/steps/step-00-init.md +57 -0
@@ -0,0 +1,297 @@
1
+ # Compilation Structure Cards Reference
2
+
3
+ Exact JSON format templates for specification compilation (step-03c). All data MUST fit these schemas exactly.
4
+
5
+ ## STRUCTURE CARD: analysis.entities[].attributes[]
6
+
7
+ **CRITICAL:** Entity attributes MUST use STRUCTURED properties, not free-text validation strings.
8
+
9
+ ```json
10
+ {
11
+ "name": "occupancyRate",
12
+ "description": "Employee occupancy percentage",
13
+ "type": "decimal",
14
+ "maxLength": null,
15
+ "nullable": true,
16
+ "required": false,
17
+ "unique": false,
18
+ "indexed": false,
19
+ "defaultValue": "100",
20
+ "validation": "min:0, max:100, step:0.01",
21
+ "foreignKey": null
22
+ }
23
+ ```
24
+
25
+ **MANDATORY fields:** `name`, `type`
26
+ **type values:** `string`, `int`, `long`, `decimal`, `double`, `bool`, `DateTime`, `DateOnly`, `TimeOnly`, `Guid`, `enum:{EnumName}`, `byte[]`
27
+
28
+ ### For FK attributes:
29
+
30
+ ```json
31
+ {
32
+ "name": "departmentId",
33
+ "description": "FK to Department",
34
+ "type": "Guid",
35
+ "required": true,
36
+ "foreignKey": { "targetEntity": "Department", "targetField": "Id", "onDelete": "restrict" }
37
+ }
38
+ ```
39
+
40
+ ### Type Inference Priority Table
41
+
42
+ | Attribute name pattern | Inferred type | Example |
43
+ |----------------------|---------------|---------|
44
+ | `name\|title\|code\|description\|label\|email\|phone\|address` | `string` | `positionTitle` → `string` |
45
+ | `*Id` (ends with Id) | `Guid` | `departmentId` → `Guid` |
46
+ | `*date\|*At` (ends with date/At) | `DateTime` | `hireDate` → `DateTime` |
47
+ | `is*\|has*\|active\|enabled` | `bool` | `isActive` → `bool` |
48
+ | `amount\|salary\|rate\|price\|total` | `decimal` | `hourlyRate` → `decimal` |
49
+ | `count\|number\|order\|sort\|index` | `int` | `displayOrder` → `int` |
50
+ | `validation` contains `max NNN` | `string` + `maxLength: NNN` | `"Max 200"` → `string`, `200` |
51
+ | No match | `string` (safe default) | — |
52
+
53
+ ## STRUCTURE CARD: specification.actors[]
54
+
55
+ ```json
56
+ {
57
+ "role": "Sales Manager",
58
+ "description": "Creates and approves orders",
59
+ "permissions": [
60
+ "{app}.{module}.read",
61
+ "{app}.{module}.create",
62
+ "{app}.{module}.update"
63
+ ]
64
+ }
65
+ ```
66
+
67
+ **MANDATORY fields:** `role`, `permissions` (array of permission paths)
68
+ **FORBIDDEN fields:** Do NOT use `systemRole`. Use `permissions` array.
69
+
70
+ ## STRUCTURE CARD: specification.useCases[]
71
+
72
+ ```json
73
+ {
74
+ "id": "UC-{PREFIX}-001",
75
+ "name": "Create Order",
76
+ "primaryActor": "Sales Representative",
77
+ "permission": "{app}.{module}.create",
78
+ "preconditions": ["Customer exists", "Products in stock"],
79
+ "postconditions": ["Order created with Draft status"],
80
+ "mainScenario": [
81
+ "1. User navigates to creation form",
82
+ "2. User fills in required fields",
83
+ "3. System validates data (BR-VAL-{PREFIX}-001)",
84
+ "4. System creates the record",
85
+ "5. System displays confirmation"
86
+ ],
87
+ "alternativeScenarios": [
88
+ { "name": "Validation failure", "steps": ["1. System detects invalid data", "2. System highlights errors"] }
89
+ ],
90
+ "errorScenarios": [
91
+ { "name": "Server error", "steps": ["1. System shows error message", "2. Data preserved for retry"] }
92
+ ],
93
+ "linkedRules": ["BR-VAL-{PREFIX}-001", "BR-WF-{PREFIX}-002"]
94
+ }
95
+ ```
96
+
97
+ **MANDATORY fields:** `id`, `name`, `primaryActor`, `permission`, `mainScenario`, `linkedRules`
98
+ **FORBIDDEN fields:** Do NOT use `actor`, `linkedBRs`, `linkedFRs`
99
+
100
+ ## STRUCTURE CARD: specification.functionalRequirements[]
101
+
102
+ ```json
103
+ {
104
+ "id": "FR-{PREFIX}-001",
105
+ "statement": "System MUST validate customer budget before order creation",
106
+ "priority": "must|should|could",
107
+ "linkedRules": ["BR-VAL-{PREFIX}-001"],
108
+ "linkedUseCases": ["UC-{PREFIX}-001"],
109
+ "acceptanceCriteria": [
110
+ "Order rejected if total > budget",
111
+ "Error message displayed with remaining budget"
112
+ ]
113
+ }
114
+ ```
115
+
116
+ **MANDATORY fields:** `id`, `statement`, `priority`, `linkedUseCases`
117
+ **FORBIDDEN fields:** Do NOT use `name`/`description`, `linkedUCs`, `linkedBRs`
118
+
119
+ ## STRUCTURE CARD: specification.permissionMatrix
120
+
121
+ ```json
122
+ {
123
+ "permissions": [
124
+ { "path": "{app}.{module}.read", "action": "read", "description": "View records" },
125
+ { "path": "{app}.{module}.create", "action": "create", "description": "Create new records" },
126
+ { "path": "{app}.{module}.update", "action": "update", "description": "Update existing records" },
127
+ { "path": "{app}.{module}.delete", "action": "delete", "description": "Delete records" },
128
+ { "path": "{app}.{module}.export", "action": "export", "description": "Export data" },
129
+ { "path": "{app}.{module}.dashboard.read", "action": "read", "description": "View dashboard (section-level)" }
130
+ ],
131
+ "roleAssignments": [
132
+ { "role": "{App} Admin", "permissions": ["{app}.{module}.read", "{app}.{module}.create", "{app}.{module}.update", "{app}.{module}.delete", "{app}.{module}.export", "{app}.{module}.dashboard.read"] },
133
+ { "role": "{App} Manager", "permissions": ["{app}.{module}.read", "{app}.{module}.create", "{app}.{module}.update", "{app}.{module}.dashboard.read"] },
134
+ { "role": "{App} Viewer", "permissions": ["{app}.{module}.read"] }
135
+ ]
136
+ }
137
+ ```
138
+
139
+ **STRUCTURE:** Object with 2 arrays: `permissions[]` and `roleAssignments[]`
140
+ **Permission levels:** Module-level = `{app}.{module}.{action}` (3 segments). Section-level = `{app}.{module}.{section}.{action}` (4 segments).
141
+
142
+ ## STRUCTURE CARD: specification.navigation
143
+
144
+ ```json
145
+ {
146
+ "entries": [
147
+ { "level": "module", "code": "{module}", "labels": {"fr": "...", "en": "...", "it": "...", "de": "..."}, "route": "/{app}/{module}", "icon": "list" },
148
+ { "level": "section", "code": "list", "labels": {"fr": "Liste", "en": "List", "it": "Elenco", "de": "Liste"}, "route": "/{app}/{module}", "icon": "list" },
149
+ { "level": "section", "code": "dashboard", "labels": {"fr": "Tableau de bord", "en": "Dashboard", "it": "Cruscotto", "de": "Dashboard"}, "route": "/{app}/{module}/dashboard", "icon": "chart-bar", "isNew": true }
150
+ ]
151
+ }
152
+ ```
153
+
154
+ ## STRUCTURE CARD: specification.seedDataCore
155
+
156
+ ```json
157
+ {
158
+ "navigationApplications": [
159
+ { "code": "{app}", "label": "{Application Name}", "icon": "{icon}", "route": "/{app-kebab}", "sort": 1 }
160
+ ],
161
+ "applicationRoles": [
162
+ { "code": "admin", "name": "{App} Admin", "permissions": "*" },
163
+ { "code": "manager", "name": "{App} Manager", "permissions": "CRU" },
164
+ { "code": "contributor", "name": "{App} Contributor", "permissions": "CR" },
165
+ { "code": "viewer", "name": "{App} Viewer", "permissions": "R" }
166
+ ],
167
+ "navigationModules": [
168
+ { "code": "{module}", "label": "{Module Name}", "icon": "list", "route": "/{app}/{module}", "parentCode": "{app}", "sort": 1 }
169
+ ],
170
+ "navigationSections": [
171
+ { "code": "list", "label": "Liste", "icon": "List", "route": "/{app}/{module}", "parentCode": "{module}", "permission": "{app}.{module}.read", "sort": 1 },
172
+ { "code": "detail", "label": "Détail", "icon": "FileText", "route": "/{app}/{module}/:id", "parentCode": "{module}", "permission": "{app}.{module}.read", "sort": 2, "navigation": "hidden" },
173
+ { "code": "dashboard", "label": "Dashboard", "icon": "BarChart", "route": "/{app}/{module}/dashboard", "parentCode": "{module}", "permission": "{app}.{module}.dashboard.read", "sort": 3 }
174
+ ],
175
+ "navigationResources": [
176
+ { "code": "{module}-grid", "type": "SmartTable", "entity": "{Entity}", "parentCode": "list", "permission": "{app}.{module}.read" },
177
+ { "code": "{module}-detail-card", "type": "DetailCard", "entity": "{Entity}", "parentCode": "detail", "permission": "{app}.{module}.read" }
178
+ ],
179
+ "navigationTranslations": [
180
+ { "moduleCode": "{module}", "language": "fr", "label": "..." },
181
+ { "moduleCode": "{module}", "language": "en", "label": "..." },
182
+ { "moduleCode": "{module}", "language": "it", "label": "..." },
183
+ { "moduleCode": "{module}", "language": "de", "label": "..." }
184
+ ],
185
+ "permissions": [
186
+ { "path": "{app}.{module}.read", "action": "read", "description": "View {module}" },
187
+ { "path": "{app}.{module}.create", "action": "create", "description": "Create {module}" },
188
+ { "path": "{app}.{module}.dashboard.read", "action": "read", "description": "View {module} dashboard (section-level)" }
189
+ ],
190
+ "rolePermissions": [
191
+ { "role": "{App} Admin", "permissionPath": "{app}.{module}.*" },
192
+ { "role": "{App} Manager", "permissionPath": "{app}.{module}.read" }
193
+ ],
194
+ "permissionConstants": [
195
+ { "constantName": "{Module}Read", "path": "{app}.{module}.read" },
196
+ { "constantName": "{Module}Create", "path": "{app}.{module}.create" }
197
+ ]
198
+ }
199
+ ```
200
+
201
+ **MANDATORY:** All 9 arrays must be present. Each element must be an object, NOT a string.
202
+
203
+ ## STRUCTURE CARD: specification.validations[]
204
+
205
+ ```json
206
+ {
207
+ "entity": "Order",
208
+ "field": "amount",
209
+ "rules": ["required", "decimal", "min:0.01", "max:999999.99"],
210
+ "errorMessageKey": "validation.{module}.amount.invalid"
211
+ }
212
+ ```
213
+
214
+ **MANDATORY fields:** `entity`, `field`, `rules` (array), `errorMessageKey`
215
+
216
+ ## STRUCTURE CARD: specification.messages[]
217
+
218
+ ```json
219
+ {
220
+ "code": "{MODULE}-SUCCESS-CREATE",
221
+ "type": "success|error|warning|info",
222
+ "title": "Record Created",
223
+ "message": "The record {code} has been created successfully.",
224
+ "i18nKey": "message.{module}.created"
225
+ }
226
+ ```
227
+
228
+ **MANDATORY fields:** `code`, `type`, `message`, `i18nKey`
229
+
230
+ ## STRUCTURE CARD: specification.lifeCycles[]
231
+
232
+ ```json
233
+ {
234
+ "entity": "Order",
235
+ "field": "status",
236
+ "initialState": "draft",
237
+ "states": [
238
+ { "id": "draft", "displayName": "Brouillon", "color": "gray", "allowedTransitions": ["submitted"], "isTerminal": false },
239
+ { "id": "submitted", "displayName": "Soumis", "color": "blue", "allowedTransitions": ["approved", "rejected"], "isTerminal": false },
240
+ { "id": "approved", "displayName": "Approuvé", "color": "green", "allowedTransitions": ["archived"], "isTerminal": false },
241
+ { "id": "rejected", "displayName": "Rejeté", "color": "red", "allowedTransitions": [], "isTerminal": true }
242
+ ],
243
+ "transitions": [
244
+ {
245
+ "from": "draft", "to": "submitted", "action": "submit",
246
+ "label": { "fr": "Soumettre", "en": "Submit" },
247
+ "permission": "{app}.{module}.update",
248
+ "guards": ["BR-VAL-{PREFIX}-001"],
249
+ "effects": [{ "type": "notification", "target": "role:manager", "template": "{module}-submitted" }],
250
+ "confirm": true
251
+ }
252
+ ]
253
+ }
254
+ ```
255
+
256
+ **Colors:** gray (draft/new), blue (in-progress), green (active/approved), yellow (warning/pending), orange (review), red (error/rejected), purple (archived/terminal)
257
+
258
+ ## STRUCTURE CARD: specification.apiEndpoints[]
259
+
260
+ ```json
261
+ {
262
+ "method": "GET|POST|PUT|PATCH|DELETE",
263
+ "path": "/api/{app}/{module}",
264
+ "permission": "{app}.{module}.read",
265
+ "requestDto": "Get{Module}Query",
266
+ "responseDto": "{Module}Dto[]",
267
+ "description": "List all records with pagination and filters"
268
+ }
269
+ ```
270
+
271
+ **MANDATORY fields:** `method`, `path`, `permission`, `description`
272
+
273
+ ## STRUCTURE CARD: specification.i18nKeys
274
+
275
+ **CRITICAL:** ALL leaf translation keys MUST have 4 languages (fr, en, it, de).
276
+
277
+ ```json
278
+ {
279
+ "title": { "fr": "{Module}", "en": "{Module}", "it": "{Module}", "de": "{Module}" },
280
+ "list": {
281
+ "title": { "fr": "Liste", "en": "List", "it": "Elenco", "de": "Liste" },
282
+ "empty": { "fr": "Aucun enregistrement", "en": "No records", "it": "Nessun record", "de": "Keine Einträge" }
283
+ },
284
+ "create": { "title": { "fr": "Nouveau", "en": "New", "it": "Nuovo", "de": "Neu" } },
285
+ "detail": { "title": { "fr": "Détail", "en": "Detail", "it": "Dettaglio", "de": "Detail" } },
286
+ "buttons": {
287
+ "create": { "fr": "Créer", "en": "Create", "it": "Crea", "de": "Erstellen" },
288
+ "edit": { "fr": "Modifier", "en": "Edit", "it": "Modifica", "de": "Bearbeiten" },
289
+ "delete": { "fr": "Supprimer", "en": "Delete", "it": "Elimina", "de": "Löschen" },
290
+ "save": { "fr": "Enregistrer", "en": "Save", "it": "Salva", "de": "Speichern" },
291
+ "cancel": { "fr": "Annuler", "en": "Cancel", "it": "Annulla", "de": "Abbrechen" }
292
+ },
293
+ "validation": {
294
+ "required": { "fr": "Ce champ est requis", "en": "This field is required", "it": "Campo obbligatorio", "de": "Pflichtfeld" }
295
+ }
296
+ }
297
+ ```
@@ -50,8 +50,8 @@
50
50
  | BR | `BR-(VAL\|CALC\|WF\|SEC\|DATA)-{PREFIX}-\d{3}` | BR-VAL-RM-001 |
51
51
  | UC | `UC-{PREFIX}-\d{3}` | UC-RM-001 |
52
52
  | FR | `FR-{PREFIX}-\d{3}` | FR-RM-001 |
53
- | Permissions (module) | `business.{app}.{module}.{action}` | business.freebike.repairs.create |
54
- | Permissions (section) | `business.{app}.{module}.{section}.{action}` | business.freebike.repairs.dashboard.read |
53
+ | Permissions (module) | `{app}.{module}.{action}` | freebike.repairs.create |
54
+ | Permissions (section) | `{app}.{module}.{section}.{action}` | freebike.repairs.dashboard.read |
55
55
 
56
56
  ## D. Cross-Module ID Uniqueness
57
57
 
@@ -40,8 +40,8 @@ Full handoff across multiple applications within a project:
40
40
  - Per-application cross-module: `.ralph/prd-CrossModule-{appCode}.json` (if app has 2+ modules)
41
41
  - Cross-application: `.ralph/prd-CrossApplication.json` (integration tests between applications)
42
42
  - Progress tracker: `.ralph/progress.txt` (grouped by application, then by module)
43
- - BA manifest: `docs/business/index.json` (project-level entry + per-application + per-module entries)
44
- - Interactive HTML: one HTML file per application at `docs/{context}/{app}/business-analyse/v{version}/ba-interactive.html`
43
+ - BA manifest: `docs/index.json` (project-level entry + per-application + per-module entries)
44
+ - Interactive HTML: one HTML file per application at `docs/{app}/business-analyse/v{version}/ba-interactive.html`
45
45
 
46
46
  **Project-level manifest entry:**
47
47
  ```json
@@ -89,9 +89,9 @@ Full handoff across multiple applications within a project:
89
89
  ```
90
90
 
91
91
  **seedDataCore differences:**
92
- - `navigationApplications[]` has one entry per application (different contexts possible)
92
+ - `navigationApplications[]` has one entry per application
93
93
  - `navigationModules[]` includes `applicationCode` field for each module
94
- - `permissions[]` use per-application context prefixes (e.g., `business.hr.*` vs `platform.admin.*`)
94
+ - `permissions[]` use per-application prefixes (e.g., `hr.*` vs `admin.*`)
95
95
  - `rolePermissions[]` are scoped per application (same role can have different permissions per app)
96
96
  - Seed data order: applications in topological order, then modules within each application
97
97
 
@@ -107,7 +107,7 @@ Full handoff across multiple applications within a project:
107
107
  | All modules missing handoff data | Return to step-05a-handoff.md. Handoff MUST be written to each module feature.json. |
108
108
  | prd.json generation failed | Verify ss derive-prd command is installed and feature.json path is correct. |
109
109
  | progress.txt incomplete | Ensure all CORE SeedData entries are present: 2 app-level (NavigationApplication + ApplicationRoles) + per module (NavigationModule + NavigationSections + Permissions + Roles). Check topological order. |
110
- | BA manifest not found | Create docs/business/index.json if missing. Use schema provided in section 3. |
110
+ | BA manifest not found | Create docs/index.json if missing. Use schema provided in section 3. |
111
111
  | Manifest entries incorrect | Verify appCode, moduleCode, and version match feature.json metadata exactly. |
112
112
  | ba-interactive.html is too small (< 100KB) | FEATURE_DATA not serialized correctly. Verify JSON structure. Re-run FEATURE_DATA build. |
113
113
  | moduleSpecs missing from HTML | FEATURE_DATA.moduleSpecs is empty or not included in JSON. Verify each module is iterated and populated. |
@@ -20,8 +20,8 @@ function detectReviewMode(feature_description) {
20
20
  return { mode: null };
21
21
  }
22
22
 
23
- // Scan docs/business/ for most recent application
24
- const applications = glob('docs/business/*/business-analyse/*/feature.json')
23
+ // Scan docs/ for most recent application
24
+ const applications = glob('docs/*/business-analyse/*/feature.json')
25
25
  .map(path => ({
26
26
  path,
27
27
  metadata: readJSON(path).metadata,
@@ -81,7 +81,7 @@ function detectReviewMode(feature_description) {
81
81
 
82
82
  **Error 1: No Applications Found**
83
83
  ```
84
- ERROR: No existing applications found in docs/business/
84
+ ERROR: No existing applications found in docs/
85
85
 
86
86
  You must create an application first using:
87
87
  /business-analyse
@@ -91,7 +91,7 @@ Then generate ba-interactive.html, make corrections, and export ba-review.json.
91
91
 
92
92
  **Error 2: No Review File**
93
93
  ```
94
- ERROR: No ba-review.json found in docs/business/{app}/business-analyse/v{version}/
94
+ ERROR: No ba-review.json found in docs/{app}/business-analyse/v{version}/
95
95
 
96
96
  To create one:
97
97
  1. Open the ba-interactive.html in your browser
@@ -113,7 +113,7 @@ Expected path: {expectedPath}
113
113
 
114
114
  ```javascript
115
115
  function scanExistingApplications() {
116
- const featureFiles = glob('docs/business/*/business-analyse/*/feature.json');
116
+ const featureFiles = glob('docs/*/business-analyse/*/feature.json');
117
117
 
118
118
  const existingApps = featureFiles.map(path => {
119
119
  const feature = readJSON(path);
@@ -144,7 +144,7 @@ interface ExistingApp {
144
144
  featureId: string; // "FEAT-001"
145
145
  description: string; // "Gestion des projets et absences"
146
146
  version: string; // "1.0", "1.1", "2.0"
147
- path: string; // "docs/business/HumanResources/..."
147
+ path: string; // "docs/HumanResources/..."
148
148
  updatedAt: string; // ISO timestamp
149
149
  modules: string[]; // ["Projects", "TimeTracking", "Reporting"]
150
150
  status: string; // "draft", "consolidated", "handed-off"
@@ -347,7 +347,7 @@ function initiateUpdateMode(existingApp) {
347
347
  };
348
348
 
349
349
  // 3. Write new version feature.json
350
- const newPath = `docs/business/${existingApp.app}/business-analyse/v${newVersion.version}/feature.json`;
350
+ const newPath = `docs/${existingApp.app}/business-analyse/v${newVersion.version}/feature.json`;
351
351
  writeJSON(newPath, newFeature);
352
352
 
353
353
  return {
@@ -1,16 +1,8 @@
1
1
  # Handoff File Templates (7 Categories)
2
2
 
3
- > **PATH HIERARCHY CONVENTION:** All backend file paths MUST include the context and application hierarchy.
4
- > - `{ContextPascal}` = PascalCase of `metadata.context` (e.g., `"business"` -> `"Business"`)
3
+ > **PATH HIERARCHY CONVENTION:** All backend file paths MUST include the application hierarchy.
5
4
  > - `{ApplicationName}` = `metadata.application` (e.g., `"HumanResources"`)
6
5
  > - `{ModuleName}` = `metadata.module` (e.g., `"Projects"`)
7
- >
8
- > **Controller context-to-folder mapping (`{ContextShort}`):**
9
- > | metadata.context | Controller Folder |
10
- > |-----------------|-------------------|
11
- > | `business` | `Business` |
12
- > | `platform` | `Admin` |
13
- > | `personal` | `User` |
14
6
 
15
7
  ## 4.1 Domain Files
16
8
 
@@ -18,7 +10,7 @@ From `analysis.entities[]`:
18
10
 
19
11
  ```json
20
12
  "domain": [
21
- { "path": "src/Domain/Entities/{ContextPascal}/{ApplicationName}/{ModuleName}/{EntityName}.cs", "type": "Entity", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" }
13
+ { "path": "src/Domain/Entities/{ApplicationName}/{ModuleName}/{EntityName}.cs", "type": "Entity", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" }
22
14
  ]
23
15
  ```
24
16
 
@@ -30,9 +22,9 @@ From `analysis.useCases[]`:
30
22
 
31
23
  ```json
32
24
  "application": [
33
- { "path": "src/Application/Services/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}Service.cs", "type": "Service", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" },
34
- { "path": "src/Application/DTOs/{ContextPascal}/{ApplicationName}/{ModuleName}/{DtoName}Dto.cs", "type": "Dto", "linkedUCs": [], "module": "{moduleCode}" },
35
- { "path": "src/Application/Validators/{ContextPascal}/{ApplicationName}/{ModuleName}/{ValidatorName}Validator.cs", "type": "Validator", "linkedFRs": [], "module": "{moduleCode}" }
25
+ { "path": "src/Application/Services/{ApplicationName}/{ModuleName}/{ServiceName}Service.cs", "type": "Service", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" },
26
+ { "path": "src/Application/DTOs/{ApplicationName}/{ModuleName}/{DtoName}Dto.cs", "type": "Dto", "linkedUCs": [], "module": "{moduleCode}" },
27
+ { "path": "src/Application/Validators/{ApplicationName}/{ModuleName}/{ValidatorName}Validator.cs", "type": "Validator", "linkedFRs": [], "module": "{moduleCode}" }
36
28
  ]
37
29
  ```
38
30
 
@@ -44,7 +36,7 @@ From `analysis.entities[]`:
44
36
 
45
37
  ```json
46
38
  "infrastructure": [
47
- { "path": "src/Infrastructure/Persistence/Configurations/{ContextPascal}/{ApplicationName}/{ModuleName}/{EntityName}Configuration.cs", "type": "EFConfiguration", "linkedFRs": [], "module": "{moduleCode}" }
39
+ { "path": "src/Infrastructure/Persistence/Configurations/{ApplicationName}/{ModuleName}/{EntityName}Configuration.cs", "type": "EFConfiguration", "linkedFRs": [], "module": "{moduleCode}" }
48
40
  ]
49
41
  ```
50
42
 
@@ -56,7 +48,7 @@ From `specification.apiEndpoints[]`:
56
48
 
57
49
  ```json
58
50
  "api": [
59
- { "path": "src/API/Controllers/{ContextShort}/{ApplicationName}/{EntityName}Controller.cs", "type": "ApiController", "linkedUCs": [], "linkedFRs": [], "module": "{moduleCode}" }
51
+ { "path": "src/API/Controllers/{ApplicationName}/{EntityName}Controller.cs", "type": "ApiController", "linkedUCs": [], "linkedFRs": [], "module": "{moduleCode}" }
60
52
  ]
61
53
  ```
62
54
 
@@ -70,9 +62,9 @@ From `specification.uiWireframes[]`, `specification.dashboards[]` and `analysis.
70
62
 
71
63
  ```json
72
64
  "frontend": [
73
- { "path": "src/pages/{ContextPascal}/{ApplicationName}/{ModuleName}/{PageName}Page.tsx", "type": "Page", "linkedUCs": [], "linkedWireframes": ["{module}-list"], "module": "{moduleCode}", "wireframeAcceptanceCriteria": "Layout MUST match wireframe...", "skill": "/ui-components" },
74
- { "path": "src/pages/{ContextPascal}/{ApplicationName}/{ModuleName}/{PageName}DetailPage.tsx", "type": "Page", "linkedUCs": [], "linkedWireframes": ["{module}-detail"], "module": "{moduleCode}", "skill": "/ui-components" },
75
- { "path": "src/pages/{ContextPascal}/{ApplicationName}/{ModuleName}/{DashboardName}DashboardPage.tsx", "type": "DashboardPage", "linkedUCs": [], "linkedWireframes": ["{module}-dashboard"], "module": "{moduleCode}", "dashboardRef": "{module}-dashboard", "instructions": "Use Recharts library...", "skill": "/ui-components" },
65
+ { "path": "src/pages/{ApplicationName}/{ModuleName}/{PageName}Page.tsx", "type": "Page", "linkedUCs": [], "linkedWireframes": ["{module}-list"], "module": "{moduleCode}", "wireframeAcceptanceCriteria": "Layout MUST match wireframe...", "skill": "/ui-components" },
66
+ { "path": "src/pages/{ApplicationName}/{ModuleName}/{PageName}DetailPage.tsx", "type": "Page", "linkedUCs": [], "linkedWireframes": ["{module}-detail"], "module": "{moduleCode}", "skill": "/ui-components" },
67
+ { "path": "src/pages/{ApplicationName}/{ModuleName}/{DashboardName}DashboardPage.tsx", "type": "DashboardPage", "linkedUCs": [], "linkedWireframes": ["{module}-dashboard"], "module": "{moduleCode}", "dashboardRef": "{module}-dashboard", "instructions": "Use Recharts library...", "skill": "/ui-components" },
76
68
  { "path": "src/components/{ModuleName}/{ComponentName}.tsx", "type": "Component", "linkedUCs": [], "linkedWireframes": [], "module": "{moduleCode}", "skill": "/ui-components" },
77
69
  { "path": "src/hooks/use{ModuleName}{Hook}.ts", "type": "Hook", "linkedUCs": [], "module": "{moduleCode}" },
78
70
  { "path": "src/i18n/locales/fr/{moduleLower}.json", "type": "I18n", "language": "fr", "module": "{moduleCode}" },
@@ -120,9 +112,9 @@ From `specification.uiWireframes[]`, `specification.dashboards[]` and `analysis.
120
112
 
121
113
  ```json
122
114
  "tests": [
123
- { "path": "src/Tests/Unit/Domain/{ContextPascal}/{ApplicationName}/{ModuleName}/{Entity}Tests.cs", "type": "UnitTests", "linkedFRs": [], "module": "{moduleCode}" },
124
- { "path": "src/Tests/Unit/Application/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}ServiceTests.cs", "type": "UnitTests", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" },
125
- { "path": "src/Tests/Integration/{ContextPascal}/{ApplicationName}/{ModuleName}/{ApiControllerName}ControllerTests.cs", "type": "IntegrationTests", "linkedUCs": [], "module": "{moduleCode}" },
126
- { "path": "src/Tests/Security/{ContextPascal}/{ApplicationName}/{ModuleName}/{ModuleName}SecurityTests.cs", "type": "SecurityTests", "linkedFRs": [], "module": "{moduleCode}" }
115
+ { "path": "src/Tests/Unit/Domain/{ApplicationName}/{ModuleName}/{Entity}Tests.cs", "type": "UnitTests", "linkedFRs": [], "module": "{moduleCode}" },
116
+ { "path": "src/Tests/Unit/Application/{ApplicationName}/{ModuleName}/{ServiceName}ServiceTests.cs", "type": "UnitTests", "linkedFRs": [], "linkedUCs": [], "module": "{moduleCode}" },
117
+ { "path": "src/Tests/Integration/{ApplicationName}/{ModuleName}/{ApiControllerName}ControllerTests.cs", "type": "IntegrationTests", "linkedUCs": [], "module": "{moduleCode}" },
118
+ { "path": "src/Tests/Security/{ApplicationName}/{ModuleName}/{ModuleName}SecurityTests.cs", "type": "SecurityTests", "linkedFRs": [], "module": "{moduleCode}" }
127
119
  ]
128
120
  ```
@@ -44,10 +44,10 @@ Layers: Domain, Application, Infrastructure, API, Frontend
44
44
  {
45
45
  "operation": "ListOrders",
46
46
  "method": "GET",
47
- "route": "/api/business/orders",
47
+ "route": "/api/orders",
48
48
  "linkedUC": "UC-001",
49
49
  "linkedFR": "FR-001",
50
- "permissions": ["business.orders.read"],
50
+ "permissions": ["orders.read"],
51
51
  "requestSchema": { "type": "query", "params": ["pageNumber", "pageSize", "status"] },
52
52
  "responseSchema": { "type": "PaginatedOrderDto[]" },
53
53
  "errorCodes": [401, 403, 400, 500],
@@ -56,10 +56,10 @@ Layers: Domain, Application, Infrastructure, API, Frontend
56
56
  {
57
57
  "operation": "CreateOrder",
58
58
  "method": "POST",
59
- "route": "/api/business/orders",
59
+ "route": "/api/orders",
60
60
  "linkedUC": "UC-002",
61
61
  "linkedFR": "FR-002",
62
- "permissions": ["business.orders.create"],
62
+ "permissions": ["orders.create"],
63
63
  "requestSchema": { "type": "body", "schema": "CreateOrderDto" },
64
64
  "responseSchema": { "type": "OrderDto" },
65
65
  "errorCodes": [400, 401, 403, 422, 500],