@atlashub/smartstack-cli 3.37.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 (216) 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 +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/gitflow/merge.md +0 -4
  13. package/templates/agents/gitflow/pr.md +0 -4
  14. package/templates/agents/gitflow/start.md +30 -5
  15. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
  16. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
  17. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
  18. package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
  19. package/templates/skills/_shared.md +15 -17
  20. package/templates/skills/ai-prompt/SKILL.md +1 -1
  21. package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
  22. package/templates/skills/apex/SKILL.md +3 -4
  23. package/templates/skills/apex/_shared.md +10 -20
  24. package/templates/skills/apex/references/analysis-methods.md +141 -0
  25. package/templates/skills/apex/references/challenge-questions.md +1 -21
  26. package/templates/skills/apex/references/core-seed-data.md +35 -57
  27. package/templates/skills/apex/references/examine-build-validation.md +87 -0
  28. package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
  29. package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
  30. package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
  31. package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
  32. package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
  33. package/templates/skills/apex/references/post-checks.md +145 -40
  34. package/templates/skills/apex/references/smartstack-api.md +35 -51
  35. package/templates/skills/apex/references/smartstack-frontend.md +17 -17
  36. package/templates/skills/apex/references/smartstack-layers.md +38 -62
  37. package/templates/skills/apex/steps/step-00-init.md +14 -26
  38. package/templates/skills/apex/steps/step-01-analyze.md +10 -143
  39. package/templates/skills/apex/steps/step-02-plan.md +10 -92
  40. package/templates/skills/apex/steps/step-03-execute.md +47 -249
  41. package/templates/skills/apex/steps/step-04-examine.md +14 -78
  42. package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
  43. package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
  44. package/templates/skills/application/SKILL.md +6 -7
  45. package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
  46. package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
  47. package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
  48. package/templates/skills/application/references/backend-verification.md +1 -1
  49. package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
  50. package/templates/skills/application/references/frontend-route-naming.md +117 -0
  51. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
  52. package/templates/skills/application/references/frontend-verification.md +12 -12
  53. package/templates/skills/application/references/init-parameter-detection.md +120 -0
  54. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
  55. package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
  56. package/templates/skills/application/references/provider-template.md +2 -6
  57. package/templates/skills/application/references/roles-client-project-handling.md +55 -0
  58. package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
  59. package/templates/skills/application/references/test-coverage-requirements.md +213 -0
  60. package/templates/skills/application/references/test-frontend.md +3 -3
  61. package/templates/skills/application/steps/step-00-init.md +11 -141
  62. package/templates/skills/application/steps/step-01-navigation.md +3 -3
  63. package/templates/skills/application/steps/step-02-permissions.md +4 -4
  64. package/templates/skills/application/steps/step-03-roles.md +18 -175
  65. package/templates/skills/application/steps/step-03b-provider.md +1 -2
  66. package/templates/skills/application/steps/step-04-backend.md +19 -110
  67. package/templates/skills/application/steps/step-05-frontend.md +17 -143
  68. package/templates/skills/application/steps/step-06-migration.md +12 -60
  69. package/templates/skills/application/steps/step-07-tests.md +9 -76
  70. package/templates/skills/application/templates-backend.md +29 -27
  71. package/templates/skills/application/templates-frontend.md +48 -48
  72. package/templates/skills/application/templates-seed.md +57 -131
  73. package/templates/skills/business-analyse/SKILL.md +27 -30
  74. package/templates/skills/business-analyse/_architecture.md +6 -6
  75. package/templates/skills/business-analyse/_shared.md +60 -88
  76. package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
  77. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  78. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
  79. package/templates/skills/business-analyse/react/application-viewer.md +12 -12
  80. package/templates/skills/business-analyse/react/components.md +8 -12
  81. package/templates/skills/business-analyse/react/schema.md +11 -11
  82. package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
  83. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
  84. package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
  85. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
  86. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
  87. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
  88. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
  89. package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
  90. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  91. package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
  92. package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
  93. package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
  94. package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
  95. package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
  96. package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
  97. package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
  98. package/templates/skills/business-analyse/references/prd-generation.md +2 -2
  99. package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
  100. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  101. package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
  102. package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
  103. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  104. package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
  105. package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
  106. package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
  107. package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
  108. package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
  109. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
  110. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
  111. package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
  112. package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
  113. package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
  114. package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
  115. package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
  116. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
  117. package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
  118. package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
  119. package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
  120. package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
  121. package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
  122. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  123. package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
  124. package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
  125. package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
  126. package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
  127. package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
  128. package/templates/skills/business-analyse/templates-frd.md +25 -25
  129. package/templates/skills/business-analyse/templates-react.md +15 -21
  130. package/templates/skills/controller/SKILL.md +1 -1
  131. package/templates/skills/controller/postman-templates.md +1 -1
  132. package/templates/skills/controller/references/controller-code-templates.md +2 -2
  133. package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
  134. package/templates/skills/controller/references/permission-sync-templates.md +13 -16
  135. package/templates/skills/controller/steps/step-00-init.md +11 -11
  136. package/templates/skills/controller/steps/step-03-generate.md +64 -103
  137. package/templates/skills/controller/templates.md +67 -71
  138. package/templates/skills/debug/SKILL.md +13 -218
  139. package/templates/skills/debug/steps/step-00-init.md +57 -0
  140. package/templates/skills/debug/steps/step-01-analyze.md +219 -0
  141. package/templates/skills/debug/steps/step-02-resolve.md +85 -0
  142. package/templates/skills/documentation/SKILL.md +49 -345
  143. package/templates/skills/documentation/data-schema.md +11 -8
  144. package/templates/skills/documentation/steps/step-00-init.md +70 -0
  145. package/templates/skills/documentation/steps/step-01-scan.md +113 -0
  146. package/templates/skills/documentation/steps/step-02-generate.md +231 -0
  147. package/templates/skills/documentation/steps/step-03-validate.md +238 -0
  148. package/templates/skills/documentation/templates.md +480 -322
  149. package/templates/skills/efcore/references/both-contexts.md +32 -0
  150. package/templates/skills/efcore/references/database-operations.md +67 -0
  151. package/templates/skills/efcore/references/destructive-operations.md +38 -0
  152. package/templates/skills/efcore/references/reset-operations.md +81 -0
  153. package/templates/skills/efcore/references/seed-methods.md +86 -0
  154. package/templates/skills/efcore/references/shared-init-functions.md +250 -0
  155. package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
  156. package/templates/skills/efcore/references/troubleshooting.md +81 -0
  157. package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
  158. package/templates/skills/efcore/steps/db/step-reset.md +7 -103
  159. package/templates/skills/efcore/steps/db/step-seed.md +10 -132
  160. package/templates/skills/efcore/steps/db/step-status.md +5 -44
  161. package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
  162. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
  163. package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
  164. package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
  165. package/templates/skills/feature-full/SKILL.md +1 -1
  166. package/templates/skills/feature-full/steps/step-00-init.md +57 -0
  167. package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
  168. package/templates/skills/gitflow/SKILL.md +1 -1
  169. package/templates/skills/gitflow/_shared.md +23 -0
  170. package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
  171. package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
  172. package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
  173. package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
  174. package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
  175. package/templates/skills/gitflow/references/init-questions.md +185 -0
  176. package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
  177. package/templates/skills/gitflow/references/init-version-detection.md +21 -0
  178. package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
  179. package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
  180. package/templates/skills/gitflow/references/merge-execution.md +62 -0
  181. package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
  182. package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
  183. package/templates/skills/gitflow/references/pr-generation.md +58 -0
  184. package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
  185. package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
  186. package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
  187. package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
  188. package/templates/skills/gitflow/steps/step-commit.md +12 -91
  189. package/templates/skills/gitflow/steps/step-finish.md +15 -159
  190. package/templates/skills/gitflow/steps/step-init.md +24 -326
  191. package/templates/skills/gitflow/steps/step-merge.md +17 -176
  192. package/templates/skills/gitflow/steps/step-pr.md +10 -116
  193. package/templates/skills/gitflow/steps/step-start.md +16 -109
  194. package/templates/skills/gitflow/steps/step-sync.md +6 -69
  195. package/templates/skills/ralph-loop/SKILL.md +6 -0
  196. package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
  197. package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
  198. package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
  199. package/templates/skills/ralph-loop/references/module-transition.md +151 -0
  200. package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
  201. package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
  202. package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
  203. package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
  204. package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
  205. package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
  206. package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
  207. package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
  208. package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
  209. package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
  210. package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
  211. package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
  212. package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
  213. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
  214. package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
  215. package/templates/skills/workflow/SKILL.md +1 -1
  216. package/templates/skills/workflow/steps/step-00-init.md +57 -0
@@ -77,11 +77,12 @@ For each entity:
77
77
  2. Verify ALL EF configurations are registered (ApplyConfigurationsFromAssembly or individual)
78
78
  3. MCP suggest_migration → get standardized name
79
79
  4. dotnet ef migrations add {Name} --project src/{Infra}.csproj --startup-project src/{Api}.csproj -o Persistence/Migrations
80
- 5. Cleanup corrupted EF Core artifacts:
81
- for d in src/*/bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
80
+ 5. Cleanup corrupted EF Core artifacts (WSL Roslyn bug — creates literal `bin\Debug` folder):
81
+ for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
82
82
  6. dotnet ef database update (if local DB)
83
83
  7. dotnet build → MUST PASS
84
84
  8. Verify: dotnet ef migrations has-pending-model-changes → MUST report "No pending model changes"
85
+ 9. Post-build cleanup (WSL recreates artifacts): for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
85
86
  ```
86
87
 
87
88
  **BLOCKING:** If build fails after migration, fix EF configs before proceeding.
@@ -91,6 +92,8 @@ For each entity:
91
92
 
92
93
  ```bash
93
94
  dotnet build
95
+ # Cleanup WSL Roslyn artifacts (literal bin\Debug folders)
96
+ for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
94
97
  ```
95
98
 
96
99
  **MUST PASS before Layer 1. If NuGet error, run `dotnet restore` first. If file lock (MSB3021), use `--output /tmp/{project}_build`.**
@@ -99,111 +102,33 @@ dotnet build
99
102
 
100
103
  ## Layer 1 — Application + API + Seed Data
101
104
 
102
- ### NavRoute and Permission Kebab-Case (CRITICAL)
103
-
104
- > **ALL NavRoute segments and permission codes MUST use kebab-case for multi-word identifiers.**
105
- > Root cause (test-apex-007): Controllers had `[NavRoute("business.humanresources.employees")]`
106
- > instead of `[NavRoute("business.human-resources.employees")]`. This mismatched seed data routes
107
- > and permission codes, causing 404s and permission denials at runtime.
108
-
109
- **Rules:**
110
- - NavRoute: `business.human-resources.employees` (NEVER `business.humanresources.employees`)
111
- - Permissions: `business.human-resources.employees.read` (segments MATCH NavRoute exactly)
112
- - Seed data codes: `human-resources` (NEVER `humanresources`)
113
- - C# class names stay PascalCase (`HumanResourcesController`) only route/permission strings use kebab-case
114
- - POST-CHECKs 41 + 48 validate this. Fix BEFORE committing.
115
-
116
- ### Controller Route Attribute (BLOCKING)
117
-
118
- > **Controllers with `[NavRoute]` must NOT have `[Route]` attribute.**
119
- > Root cause (test-apex-007): ALL 7 controllers had BOTH `[Route("api/...")]` AND `[NavRoute("...")]`.
120
- > In SmartStack, `[NavRoute]` resolves routes dynamically from Navigation entities in the database at startup.
121
- > Having `[Route]` alongside causes route conflicts → all endpoints return 404.
122
-
123
- **Rules:**
124
- - `[NavRoute("context.app.module")]` is the ONLY route attribute needed on controllers
125
- - **FORBIDDEN:** `[Route("api/business/human-resources/employees")]` alongside `[NavRoute]`
126
- - **FORBIDDEN:** `[Route("api/[controller]")]` alongside `[NavRoute]`
127
- - If generating via MCP `scaffold_extension` with `navRoute` option → output is correct (NavRoute only)
128
- - If generating via `/controller` skill verify NO `[Route]` is added
129
- - POST-CHECK 50 validates this. Fix BEFORE committing.
130
-
131
- ### Validators DI Registration (CRITICAL)
132
-
133
- > After creating validators, they MUST be registered in DI. Without registration, `[FromBody]` DTOs are never validated.
134
-
135
- ```
136
- In DependencyInjection.cs (or ServiceCollectionExtensions.cs):
137
- services.AddValidatorsFromAssemblyContaining<Create{Entity}DtoValidator>();
138
- ```
139
-
140
- POST-CHECK 46 validates this. If validators exist but no DI registration → BLOCKING.
141
-
142
- ### If economy_mode: Sequential execution
143
-
144
- Execute each item from the plan sequentially using skills and MCP.
145
-
146
- ### Date Fields — Use DateOnly (CRITICAL)
147
-
148
- > **ALL date-only fields in DTOs MUST use `DateOnly`, NEVER `string`.**
149
- > Root cause (test-apex-007): WorkLog DTO had `string Date` instead of `DateOnly Date`.
150
- > This causes: no date validation, inconsistent date formats, parsing errors.
151
-
152
- **Type mapping for DTOs:**
153
- | Domain type | DTO type | Example |
154
- |-------------|----------|---------|
155
- | `DateTime` | `DateTime` | `CreatedAt`, `UpdatedAt` |
156
- | Date-only field | `DateOnly` | `Date`, `StartDate`, `EndDate`, `BirthDate` |
157
- | `string` for date | **FORBIDDEN** | Never use `string` for dates |
158
- | `DateTime` for date-only | **Avoid** | Use `DateOnly` when no time component needed |
159
-
160
- POST-CHECK 47 validates this. If a DTO has `string` type for a property named `*Date*` → BLOCKING.
161
-
162
- ### Code Generation (if entities have codePattern != "manual")
163
-
164
- For each entity with auto-generated code pattern (from feature.json or step-02 decisions):
165
-
166
- ```
167
- 1. Create CodePatternConfig for the entity (strategy, prefix, digits from codePattern)
168
- 2. Register ICodeGenerator<TEntity> in DependencyInjection.cs (Infrastructure layer)
169
- → See references/code-generation.md for DI registration pattern
170
- 3. Update CreateDto: REMOVE Code property (auto-generated, not user-provided)
171
- 4. Update CreateDtoValidator: REMOVE Code regex rule (not in DTO anymore)
172
- 5. Update service CreateAsync: inject ICodeGenerator<TEntity>, call NextCodeAsync()
173
- → Code is auto-generated BEFORE entity creation
174
- → See references/code-generation.md for service integration pattern
175
- 6. Keep Code in ResponseDto (returned to frontend after creation)
176
- 7. Keep Code in UpdateDto ONLY if code is mutable (rare — discuss with user)
177
- ```
178
-
179
- **CRITICAL:** If `codePattern.strategy == "manual"` (or no codePattern), keep the current behavior:
180
- Code stays in CreateDto, user provides it, validator has regex rule.
181
-
182
- **For frontend tasks (economy_mode):** Follow the same rules as exec-frontend above:
183
- - `MCP scaffold_api_client` → API client + types + React Query hook
184
- - `MCP scaffold_routes` with `outputFormat: 'clientRoutes'` for lazy imports
185
- - **INVOKE `/ui-components` skill** (read SKILL.md + ALL patterns) — MANDATORY for ALL page types
186
- - **Create ALL 4 page types per module:**
187
- - `ListPage.tsx` — entity list with SmartTable/EntityCard
188
- - `DetailPage.tsx` — entity detail view
189
- - `EntityCreatePage.tsx` (route: `/create`) — FULL PAGE form, NEVER modal
190
- - `EntityEditPage.tsx` (route: `/:id/edit`) — FULL PAGE form, NEVER modal
191
- - **Wire ALL routes in App.tsx:** `index` (ListPage), `:id` (DetailPage), `create` (CreatePage), `:id/edit` (EditPage)
192
- - **FK FIELDS (CRITICAL):** Any Guid FK property (e.g., EmployeeId, DepartmentId) MUST use `EntityLookup` component — NEVER a `<select>` dropdown, NEVER a `<input type="text">`. A `<select>` loaded from API state is NOT a substitute for EntityLookup. See `smartstack-frontend.md` section 6.
193
- - **ZERO modals/popups/drawers for forms — ALL forms are full pages with their own URL**
194
- - **TABS ON DETAIL PAGES (CRITICAL):** Tabs MUST switch content LOCALLY via `setActiveTab()` — NEVER `navigate()` to another page. Sub-resource data (e.g., employee's leaves) loads inline via API call filtered by parent entity ID. See `smartstack-frontend.md` section 3 "Tab Behavior Rules".
195
- - **Form tests: Generate `EntityCreatePage.test.tsx` and `EntityEditPage.test.tsx` (co-located)**
196
- - **SECTION PERMISSIONS:** After calling `MCP generate_permissions` for the module navRoute (3 segments: `{context}.{app}.{module}`), also call it for EACH section navRoute (4 segments: `{context}.{app}.{module}.{section}`)
197
- - **SECTION ROUTES:** After generating module routes, add section child routes to the module's `children` array. Wire `PermissionGuard` for section routes with section-level permissions.
198
- - **SUB-RESOURCE COMPLETENESS:** If a section controller has sub-resource endpoints (e.g., `[HttpGet("types")]` for LeaveTypes inside LeavesController), you MUST EITHER:
199
- - Create dedicated frontend pages for the sub-resource (ListPage, CreatePage, EditPage) with routes wired in App.tsx, OR
200
- - NOT include any `navigate()` button that links to those sub-resource pages
201
- - **Prefer separate controllers** with `[NavRoute(..., Suffix = "types")]` — see `smartstack-api.md` Sub-Resource Pattern
202
- - A dead link (navigate to a route with no page) is a BLOCKING issue (POST-CHECK 42)
203
- - Read `references/smartstack-frontend.md` for mandatory patterns (sections 3b + 8)
204
- - Generate i18n JSON files for all 4 languages (fr, en, it, de) — `src/i18n/locales/{lang}/{module}.json`
205
- - **I18n REGISTRATION (CRITICAL):** After creating i18n JSON files, register EACH new namespace in the i18n config file (config.ts/index.ts/i18n.ts). Unregistered namespaces → `useTranslation(['module'])` returns empty strings at runtime. POST-CHECK 45 validates this.
206
- - All pages must follow loading → error → content pattern with CSS variables
105
+ > **Reference:** Load `references/execution-layer1-rules.md` for critical Layer 1 rules:
106
+ > - NavRoute and permission kebab-case (POST-CHECKs 41 + 48)
107
+ > - Controller route attributes (POST-CHECK 50)
108
+ > - Validators DI registration (POST-CHECK 46)
109
+ > - DateOnly vs string (POST-CHECK 47)
110
+ > - Code generation patterns (ICodeGenerator<T> registration)
111
+
112
+ ### Backend Tasks (sequential or parallel)
113
+
114
+ - **Services/DTOs:** MCP scaffold_extension
115
+ - **Controllers:** use /controller skill for complex, MCP scaffold_extension for simple
116
+ - **IMPORTANT:** ALL GetAll endpoints MUST support `?search=` query parameter (enables EntityLookup on frontend)
117
+ - **Seed data:** MCP generate_permissions, then follow smartstack-layers.md templates
118
+
119
+ ### Frontend Tasks (sequential or parallel)
120
+
121
+ > **Reference:** Load `references/execution-frontend-patterns.md` for complete frontend patterns:
122
+ > - API client generation (MCP scaffold_api_client)
123
+ > - Route scaffolding (MCP scaffold_routes)
124
+ > - Page types (ListPage, DetailPage, CreatePage, EditPage)
125
+ > - FK field handling (EntityLookup component)
126
+ > - Form structure (ZERO modals — all full pages)
127
+ > - Detail page tabs (local state only)
128
+ > - Testing patterns (co-located form tests)
129
+ > - Section-level routes and permissions
130
+ > - Sub-resource handling
131
+ > - I18n JSON structure and registration (POST-CHECK 45)
207
132
 
208
133
  ### If NOT economy_mode: Agent Teams (parallel)
209
134
 
@@ -266,15 +191,15 @@ Spawn 2 teammates (Opus, full tools):
266
191
  → EntityEditPage.test.tsx (co-located next to page)
267
192
  → Cover: rendering, validation, submit, pre-fill, navigation, errors
268
193
  → See smartstack-frontend.md section 8 for test templates
269
- - **SECTION PERMISSIONS:** After MCP generate_permissions for the module navRoute (3 segments),
270
- also call MCP generate_permissions for EACH section navRoute (4 segments: {context}.{app}.{module}.{section})
194
+ - **SECTION PERMISSIONS:** After MCP generate_permissions for the module navRoute (2 segments),
195
+ also call MCP generate_permissions for EACH section navRoute (3 segments: {app}.{module}.{section})
271
196
  - **SECTION ROUTES:** Add section child routes to the module's children array.
272
197
  Wire PermissionGuard for section routes with section-level permissions.
273
198
  - I18n: Generate 4 JSON files per module namespace (fr, en, it, de)
274
199
  → Follow JSON template from smartstack-frontend.md
275
200
  → Keys: actions, labels, errors, validation, columns, form, messages, empty
276
201
  → ALL t() calls MUST use namespace prefix + fallback: t('ns:key', 'Default text')
277
- - MUST use src/pages/{Context}/{App}/{Module}/ hierarchy (NOT flat)
202
+ - MUST use src/pages/{App}/{Module}/ hierarchy (NOT flat)
278
203
 
279
204
  After ALL tasks done:
280
205
  SendMessage(type:'message', recipient:'team-lead', content:'FRONTEND_COMPLETE', summary:'Frontend layer done')"
@@ -295,7 +220,7 @@ shutdown_request → shutdown_response → TeamDelete("apex-exec")
295
220
  | Skill | When | Context to provide |
296
221
  |-------|------|--------------------|
297
222
  | /controller | Custom routes, complex auth, file upload | entity, CRUD actions, permissions, routes |
298
- | /application | Full context/app/module from scratch | context, app, module names |
223
+ | /application | Full app/module from scratch | app, module names |
299
224
  | /ui-components | Complex pages (tables, grids, dashboards) | entity, fields, page type |
300
225
  | /efcore | Complex EF configs, inheritance | relationships, indexes |
301
226
  | /notification | In-app or email notifications | trigger, recipients, template |
@@ -339,6 +264,7 @@ After Layer 1 completes:
339
264
 
340
265
  2. Build gate:
341
266
  dotnet build → MUST PASS
267
+ for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
342
268
  npm run typecheck → MUST PASS (if frontend)
343
269
  ```
344
270
 
@@ -346,146 +272,18 @@ After Layer 1 completes:
346
272
 
347
273
  ## FRONTEND COMPLIANCE GATE (MANDATORY before commit)
348
274
 
349
- > **BLOCKING:** Do NOT commit frontend changes until ALL checks pass.
350
- > These issues are the most common failures in generated code verify EVERY item.
351
-
352
- **Run these checks on ALL generated/modified `.tsx` files BEFORE creating the frontend commit:**
353
-
354
- ### Gate 1: CSS Variables (Theme System)
355
-
356
- ```bash
357
- # Check for hardcoded Tailwind colors — MUST use CSS variables
358
- ALL_PAGES=$(find src/pages/ src/components/ -name "*.tsx" 2>/dev/null | grep -v node_modules | grep -v "\.test\.")
359
- if [ -n "$ALL_PAGES" ]; then
360
- HARDCODED=$(grep -Pn '(bg|text|border)-(?!\[)(red|blue|green|gray|white|black|slate|zinc|neutral|stone)-' $ALL_PAGES 2>/dev/null)
361
- if [ -n "$HARDCODED" ]; then
362
- echo "FAIL: Hardcoded Tailwind colors found — must use CSS variables"
363
- echo "$HARDCODED"
364
- else
365
- echo "PASS: CSS variables"
366
- fi
367
- fi
368
- ```
369
-
370
- **If hardcoded colors found, replace BEFORE committing:**
371
- - `bg-white` → `bg-[var(--bg-card)]`
372
- - `bg-gray-50` → `bg-[var(--bg-primary)]`
373
- - `text-gray-900` → `text-[var(--text-primary)]`
374
- - `text-gray-500/600` → `text-[var(--text-secondary)]`
375
- - `border-gray-200` → `border-[var(--border-color)]`
376
- - `bg-blue-600` / `text-blue-600` → `bg-[var(--color-accent-500)]` / `text-[var(--color-accent-500)]`
377
- - `hover:bg-blue-700` → `hover:bg-[var(--color-accent-600)]`
378
- - `text-red-500` → `text-[var(--error-text)]`
379
- - `bg-green-500` → `bg-[var(--success-bg)]`
380
-
381
- ### Gate 2: Forms as Pages (ZERO Modals/Drawers/Slide-overs)
382
-
383
- ```bash
384
- # Check for modal/dialog/drawer/slide-over imports and inline form patterns — FORBIDDEN
385
- PAGE_FILES=$(find src/pages/ -name "*.tsx" 2>/dev/null)
386
- if [ -n "$PAGE_FILES" ]; then
387
- FAIL=false
388
-
389
- # 2a. Component imports
390
- MODAL_IMPORTS=$(grep -Pn "import.*(?:Modal|Dialog|Drawer|Popup|Sheet|SlideOver|Overlay)" $PAGE_FILES 2>/dev/null)
391
- if [ -n "$MODAL_IMPORTS" ]; then
392
- echo "FAIL: Modal/Dialog/Drawer component imports — forms MUST be full pages"
393
- echo "$MODAL_IMPORTS"
394
- FAIL=true
395
- fi
396
-
397
- # 2b. State variables for inline forms (catches drawers/slide-overs without imports)
398
- MODAL_STATE=$(grep -Pn "useState.*(?:isOpen|showModal|showDialog|showCreate|showEdit|showForm|isCreating|isEditing|showDrawer|showPanel|showSlideOver|selectedEntity|editingEntity)" $PAGE_FILES 2>/dev/null)
399
- if [ -n "$MODAL_STATE" ]; then
400
- echo "FAIL: Inline form state detected — forms MUST be separate page components with own routes"
401
- echo "$MODAL_STATE"
402
- FAIL=true
403
- fi
404
-
405
- if [ "$FAIL" = true ]; then
406
- echo ""
407
- echo "Fix: Create EntityCreatePage.tsx (route: /create) and EntityEditPage.tsx (route: /:id/edit)"
408
- echo "See smartstack-frontend.md section 3b"
409
- else
410
- echo "PASS: No modals/drawers"
411
- fi
412
- fi
413
- ```
414
-
415
- **If modals/drawers found:** Replace with separate `EntityCreatePage.tsx` (route: `/{module}/create`) and `EntityEditPage.tsx` (route: `/{module}/:id/edit`). See `smartstack-frontend.md` section 3b.
416
-
417
- ### Gate 3: I18n File Structure
418
-
419
- ```bash
420
- # Verify translation files exist as separate JSON per language
421
- if [ ! -d "src/i18n/locales" ]; then
422
- echo "FAIL: Missing src/i18n/locales/ directory — create it with 4 languages"
423
- else
424
- for LANG in fr en it de; do
425
- JSON_FILES=$(find "src/i18n/locales/$LANG" -name "*.json" 2>/dev/null | wc -l)
426
- if [ "$JSON_FILES" -eq 0 ]; then
427
- echo "FAIL: No JSON files in src/i18n/locales/$LANG/"
428
- else
429
- echo "PASS: $LANG ($JSON_FILES files)"
430
- fi
431
- done
432
- fi
433
- ```
434
-
435
- **If i18n structure wrong:** Create `src/i18n/locales/{fr,en,it,de}/{module}.json` following the template in `smartstack-frontend.md` section 2. NEVER embed translations in a single `.ts` file.
436
-
437
- ### Gate 4: Lazy Loading
438
-
439
- ```bash
440
- # Check for static page imports in route/App files
441
- APP_TSX=$(find src/ -name "App.tsx" -not -path "*/node_modules/*" 2>/dev/null | head -1)
442
- ROUTE_FILES=$(find src/routes/ -name "*.tsx" -o -name "*.ts" 2>/dev/null)
443
- if [ -n "$APP_TSX" ]; then
444
- STATIC_IMPORTS=$(grep -Pn "^import .+ from '@/pages/" "$APP_TSX" $ROUTE_FILES 2>/dev/null)
445
- if [ -n "$STATIC_IMPORTS" ]; then
446
- echo "FAIL: Static page imports in App.tsx/routes — MUST use React.lazy()"
447
- echo "$STATIC_IMPORTS"
448
- else
449
- echo "PASS: Lazy loading"
450
- fi
451
- fi
452
- ```
453
-
454
- ### Gate 5: useTranslation in Pages
455
-
456
- ```bash
457
- # Verify pages use i18n
458
- PAGE_FILES=$(find src/pages/ -name "*.tsx" 2>/dev/null | grep -v "\.test\." | grep -v node_modules)
459
- if [ -n "$PAGE_FILES" ]; then
460
- TOTAL=$(echo "$PAGE_FILES" | wc -l)
461
- WITH_I18N=$(grep -l "useTranslation" $PAGE_FILES 2>/dev/null | wc -l)
462
- if [ "$WITH_I18N" -eq 0 ]; then
463
- echo "FAIL: No pages use useTranslation — all text must be translated"
464
- else
465
- echo "PASS: $WITH_I18N/$TOTAL pages use useTranslation"
466
- fi
467
- fi
468
- ```
469
-
470
- > **ALL 5 gates MUST pass before creating the frontend commit.** If ANY gate fails, fix the issues first.
471
-
472
- ### Explicit I18n File Creation
473
-
474
- When creating i18n files, generate EXACTLY this structure:
475
-
476
- ```
477
- src/i18n/locales/
478
- ├── fr/{module}.json ← French (primary)
479
- ├── en/{module}.json ← English
480
- ├── it/{module}.json ← Italian
481
- └── de/{module}.json ← German
482
- ```
275
+ > **Reference:** Load `references/execution-frontend-gates.md` for all 5 mandatory checks:
276
+ > 1. CSS Variables (theme system)POST-CHECK 13
277
+ > 2. Forms as Pages (ZERO modals/drawers/slide-overs)
278
+ > 3. I18n File Structure (4 languages, separate JSON files)
279
+ > 4. Lazy Loading (React.lazy() — no static imports)
280
+ > 5. useTranslation in Pages (all text translated)
483
281
 
484
- Each file MUST contain these keys: `title`, `description`, `actions`, `labels`, `columns`, `form`, `errors`, `validation`, `messages`, `empty`. See `smartstack-frontend.md` section 2 for the complete JSON template.
282
+ **BLOCKING:** Do NOT commit frontend changes until ALL 5 gates pass.
485
283
 
486
- **When delegating to `/ui-components`:** ALWAYS include these explicit instructions in the delegation context:
487
- - "CSS: Use CSS variables ONLY — `bg-[var(--bg-card)]`, `text-[var(--text-primary)]`. NEVER use hardcoded Tailwind colors like `bg-white` or `text-gray-900`."
488
- - "Forms: Create/Edit forms are FULL PAGES with own routes (e.g., `/create`, `/:id/edit`). NEVER use modals/dialogs."
284
+ When delegating to `/ui-components` skill, include explicit instructions:
285
+ - "CSS: Use CSS variables ONLY — `bg-[var(--bg-card)]`, `text-[var(--text-primary)]`."
286
+ - "Forms: Create/Edit forms are FULL PAGES with own routes (e.g., `/create`, `/:id/edit`)."
489
287
  - "I18n: ALL text must use `t('namespace:key', 'Fallback')`. Generate JSON files in `src/i18n/locales/`."
490
288
 
491
289
  ---
@@ -130,83 +130,14 @@ fi
130
130
 
131
131
  ---
132
132
 
133
- ## 4. Build Verification
133
+ ## 4-5. Build & Migration Validation
134
134
 
135
- ```bash
136
- # Cleanup corrupted EF Core design-time artifacts (Roslyn BuildHost bug on Windows)
137
- for d in src/*/bin?Debug; do [ -d "$d" ] && echo "Removing corrupted artifact: $d" && rm -rf "$d"; done
138
-
139
- # Backend
140
- dotnet clean && dotnet restore && dotnet build
141
-
142
- # Frontend (if applicable)
143
- npm run typecheck
144
- ```
145
-
146
- **BLOCKING:** Both must pass. If failure, classify error per `references/error-classification.md` before attempting fix:
147
- - Category A (missing package) → `dotnet add package` → rebuild
148
- - Category B (assembly conflict) → resolve version → rebuild
149
- - Category C (DI missing) → fix DI registration → rebuild
150
- - Category D (migration broken) → fix migration → rebuild
151
- - Category E (config) → fix config → rebuild
152
- - Category F (source code) → fix code → rebuild
153
-
154
- ---
155
-
156
- ## 5. Database & Migration Validation (if needs_migration)
157
-
158
- ### 5a. Pending Model Changes Check
159
-
160
- ```bash
161
- INFRA_PROJECT=$(ls src/*Infrastructure*/*.csproj 2>/dev/null | head -1)
162
- API_PROJECT=$(ls src/*Api*/*.csproj 2>/dev/null | head -1)
163
-
164
- dotnet ef migrations has-pending-model-changes \
165
- --project "$INFRA_PROJECT" \
166
- --startup-project "$API_PROJECT"
167
- ```
168
-
169
- **BLOCKING** if pending changes detected → migration is missing.
170
-
171
- ### 5b. Migration Application Test (SQL Server LocalDB)
172
-
173
- ```bash
174
- DB_NAME="SmartStack_Apex_Examine_$(date +%s)"
175
- CONN_STRING="Server=(localdb)\\MSSQLLocalDB;Database=$DB_NAME;Integrated Security=true;TrustServerCertificate=true;Connect Timeout=120;"
176
-
177
- dotnet ef database update \
178
- --connection "$CONN_STRING" \
179
- --project "$INFRA_PROJECT" \
180
- --startup-project "$API_PROJECT"
181
- ```
182
-
183
- **BLOCKING** if migration fails on SQL Server. Common issues:
184
- - SQLite-only syntax in migrations (fix: regenerate migration)
185
- - Column type mismatches (fix: update EF configuration)
186
- - Missing foreign key targets (fix: reorder migrations)
187
-
188
- ### 5c. Integration Tests on Real SQL Server
189
-
190
- ```bash
191
- # Integration tests use DatabaseFixture → real SQL Server LocalDB
192
- # This validates: LINQ→SQL, multi-tenant isolation, soft delete, EF configs
193
- INT_TEST_PROJECT=$(ls tests/*Tests.Integration*/*.csproj 2>/dev/null | head -1)
194
- if [ -n "$INT_TEST_PROJECT" ]; then
195
- dotnet test "$INT_TEST_PROJECT" --no-build --verbosity normal
196
- fi
197
- ```
198
-
199
- Tests running against SQL Server catch issues that SQLite misses:
200
- - Case sensitivity in string comparisons
201
- - Date/time function differences
202
- - IDENTITY vs AUTOINCREMENT behavior
203
- - Global query filter translation to T-SQL
204
-
205
- ### 5d. Cleanup
206
-
207
- ```bash
208
- sqlcmd -S "(localdb)\MSSQLLocalDB" -Q "IF DB_ID('$DB_NAME') IS NOT NULL BEGIN ALTER DATABASE [$DB_NAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE [$DB_NAME]; END" 2>/dev/null
209
- ```
135
+ > **Reference:** Load `references/examine-build-validation.md` for detailed procedures:
136
+ > - Build verification (dotnet clean restore build + npm typecheck)
137
+ > - Error classification (categories A-F per error-classification.md)
138
+ > - Migration validation (pending changes, SQL Server apply, cleanup)
139
+ > - Integration tests (real SQL Server LocalDB)
140
+ > - Test database management
210
141
 
211
142
  ---
212
143
 
@@ -216,7 +147,9 @@ sqlcmd -S "(localdb)\MSSQLLocalDB" -Q "IF DB_ID('$DB_NAME') IS NOT NULL BEGIN AL
216
147
  |------|--------|
217
148
  | NavigationApplicationSeedData | MUST be first, deterministic GUID for application (NOT for context — context is looked up by code), 4 lang translations |
218
149
  | ApplicationRolesSeedData | 4 roles (admin, manager, contributor, viewer), deterministic GUIDs, references NavigationApplicationSeedData.ApplicationId |
219
- | NavigationModuleSeedData | Deterministic GUIDs (SHA256), 4 languages, GetModuleEntry + GetTranslationEntries |
150
+ | NavigationModuleSeedData | Deterministic GUIDs (SHA256), 4 languages (fr, en, it, de), GetModuleEntry + GetTranslationEntries |
151
+ | ↳ Section methods (same file) | (conditional: if sections exist) GetSectionEntries + GetSectionTranslationEntries, 4 languages, deterministic GUIDs, query actual module from DB for FK |
152
+ | ↳ Resource methods (same file) | (conditional: if resources exist) GetResourceEntries + resource translations, 4 languages, deterministic GUIDs, query actual section from DB for FK |
220
153
  | Permissions.cs | Static constants class with `public static class {Module} { Read, Create, Update, Delete }`, paths match PermissionsSeedData |
221
154
  | PermissionsSeedData | MCP generate_permissions used, paths match Permissions.cs, wildcard + CRUD |
222
155
  | RolesSeedData | Admin=wildcard(*), Manager=CRU, Contributor=CR, Viewer=R. Role-permission entries reference permission paths from PermissionsSeedData |
@@ -268,7 +201,10 @@ AC2: {criterion} → PASS / FAIL (evidence: {file:line or test})
268
201
  | I18n registration | Namespaces registered in i18n config (POST-CHECK 45) | PASS / N/A |
269
202
  | Validators DI | FluentValidation registered in DI (POST-CHECK 46) | PASS / N/A |
270
203
  | Route/NavRoute conflict | No [Route] alongside [NavRoute] on controllers (POST-CHECK 50) | PASS / N/A |
271
- | POST-CHECKs | 50 checks from references/post-checks.md | PASS / N/A |
204
+ | Role-permission matrix | Admin=wildcard, Manager=CRU, Contributor=CR, Viewer=R (POST-CHECK 51) | PASS / N/A |
205
+ | PermissionAction enum | No Enum.Parse, only typed enum values 0-10 (POST-CHECK 52) | PASS / N/A |
206
+ | Navigation translations | 4 langs per level, section/resource translations present (POST-CHECK 53) | PASS / N/A |
207
+ | POST-CHECKs | 53 checks from references/post-checks.md | PASS / N/A |
272
208
  | Acceptance criteria | AC1..ACn | {X}/{Y} PASS |
273
209
  ```
274
210
 
@@ -51,14 +51,14 @@ For each changed file, check:
51
51
  - [ ] Services follow CQRS pattern
52
52
  - [ ] DTOs separate from domain entities
53
53
  - [ ] Controllers return DTOs, not entities
54
- - [ ] Frontend in correct hierarchy (Context/App/Module)
54
+ - [ ] Frontend in correct hierarchy (App/Module)
55
55
 
56
56
  **SmartStack conventions:**
57
57
  - [ ] Deterministic GUIDs in seed data (not Guid.NewGuid())
58
58
  - [ ] 4 languages in translations
59
59
  - [ ] CSS variables (not hardcoded colors)
60
60
  - [ ] SmartTable/SmartForm (not raw HTML tables/forms)
61
- - [ ] Correct Layout wrapper per context
61
+ - [ ] Correct Layout wrapper per application
62
62
 
63
63
  **FK Fields & Forms:**
64
64
  - [ ] FK Guid fields use `EntityLookup` component (NEVER `<input>`, NEVER `<select>`)
@@ -17,6 +17,8 @@ next_step: COMPLETE
17
17
 
18
18
  ```bash
19
19
  dotnet build --no-restore
20
+ # Cleanup WSL Roslyn artifacts (literal bin\Debug folders)
21
+ for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
20
22
  ```
21
23
 
22
24
  **MUST PASS before running tests.**
@@ -3,10 +3,10 @@ name: application
3
3
  description: |
4
4
  Creates SmartStack full-stack applications/modules.
5
5
  Use this skill when:
6
- - User asks to create an application, module, or context
6
+ - User asks to create an application or module
7
7
  - User mentions "new module", "new application", "add a feature"
8
8
  - User wants to extend navigation with new entries
9
- Scope: Context → Application → Module → Section (all levels)
9
+ Scope: Application → Module → Section (all levels)
10
10
  ---
11
11
 
12
12
  # Skill Application SmartStack
@@ -59,8 +59,8 @@ This skill uses progressive step loading. Each step calls MCP tools for generati
59
59
  |---------|---------|
60
60
  | Explicit request | "Create a module to manage products" |
61
61
  | New feature | "We need to add order management" |
62
- | Navigation extension | "Add a CRM application in business" |
63
- | Keywords | "new module", "new application", "add a context" |
62
+ | Navigation extension | "Add a CRM application" |
63
+ | Keywords | "new module", "new application" |
64
64
 
65
65
  ## FLOW ARCHITECTURE
66
66
 
@@ -76,13 +76,12 @@ WEB (React) → API (.NET) → Application → Infrastructure → Database
76
76
 
77
77
  | Hint | → Level |
78
78
  |------|---------|
79
- | "context", "workspace" | Context |
80
79
  | "application", "app" | Application |
81
80
  | "module", "feature" | Module |
82
81
  | "section", "tab" | Section |
83
82
 
84
83
  ### 2. Parameter Extraction
85
- `$LEVEL`, `$PARENT` (platform/business/personal), `$CODE` (kebab-case), `$LABEL_EN`, `$ICON` (Lucide)
84
+ `$LEVEL`, `$CODE` (kebab-case), `$LABEL_EN`, `$ICON` (Lucide)
86
85
 
87
86
  ### 3. Full-Stack Generation
88
87
  ```
@@ -232,7 +231,7 @@ await _workflowService.TriggerAsync("{entity}.created", new Dictionary<string, o
232
231
  - [templates-seed.md](templates-seed.md) - Seed data patterns reference
233
232
 
234
233
  <success_criteria>
235
- - Navigation entries created with correct hierarchy (Context/Application/Module)
234
+ - Navigation entries created with correct hierarchy (Application/Module)
236
235
  - Permissions generated via MCP with 2-file pattern (constants + seed)
237
236
  - Roles assigned with appropriate permission sets
238
237
  - Backend layers follow SmartStack conventions (validated by MCP)
@@ -6,32 +6,32 @@
6
6
 
7
7
  ## Controller File Location
8
8
 
9
- Controllers are organized by **context short name** and **application** (matching SmartStack.app pattern):
9
+ Controllers are organized by **application** (matching SmartStack.app pattern):
10
10
 
11
11
  ```
12
12
  Api/Controllers/
13
- ├── Admin/ platform.administration
14
- │ ├── {Application}/ Application sub-folder (e.g., AI/, Communications/, Tenants/)
13
+ ├── Administration/ ← administration.*
14
+ │ ├── {Module}/ Module sub-folder (e.g., AI/, Communications/, Tenants/)
15
15
  │ │ └── {EntityName}Controller.cs
16
- │ └── {EntityName}Controller.cs ← Direct controllers (no application sub-folder)
17
- ├── Business/ business.*
16
+ │ └── {EntityName}Controller.cs ← Direct controllers (no module sub-folder)
17
+ ├── Support/ support.*
18
18
  │ └── {EntityName}Controller.cs
19
- ├── Support/ platform.support
19
+ ├── {ApplicationPascal}/ Other applications (e.g., Sales/, HumanResources/)
20
20
  │ └── {EntityName}Controller.cs
21
- ├── User/ personal.*
21
+ ├── MySpace/ myspace.*
22
22
  │ └── {EntityName}Controller.cs
23
23
  └── {SharedControllers}.cs ← Root-level (Auth, Config, Navigation, etc.)
24
24
  ```
25
25
 
26
- ## Context-to-Folder Mapping
26
+ ## Application-to-Folder Mapping
27
27
 
28
- | NavRoute Context | Controller Folder | Example |
28
+ | NavRoute Application | Controller Folder | Example |
29
29
  |-----------------|-------------------|---------|
30
- | `platform.administration` | `Admin` | `Controllers/Admin/TenantsController.cs` |
31
- | `platform.administration.{app}` | `Admin/{App}` | `Controllers/Admin/AI/AiPromptsController.cs` |
32
- | `platform.support` | `Support` | `Controllers/Support/TicketsController.cs` |
33
- | `business.*` | `Business` | `Controllers/Business/MyTicketsController.cs` |
34
- | `personal.*` | `User` | `Controllers/User/PreferencesController.cs` |
30
+ | `administration` | `Administration` | `Controllers/Administration/TenantsController.cs` |
31
+ | `administration.{module}` | `Administration/{Module}` | `Controllers/Administration/AI/AiPromptsController.cs` |
32
+ | `support` | `Support` | `Controllers/Support/TicketsController.cs` |
33
+ | `{application}` | `{ApplicationPascal}` | `Controllers/Sales/ProductsController.cs` |
34
+ | `myspace` | `MySpace` | `Controllers/MySpace/PreferencesController.cs` |
35
35
 
36
36
  ## Controller Attributes
37
37
 
@@ -44,7 +44,7 @@ The generated controller uses NavRoute attribute:
44
44
  public class {EntityName}Controller : ControllerBase
45
45
  {
46
46
  [HttpGet]
47
- [RequirePermission(Permissions.{Context}.{Application}.{Module}.Read)]
47
+ [RequirePermission(Permissions.{Application}.{Module}.Read)]
48
48
  public async Task<ActionResult<IEnumerable<{EntityName}Dto>>> GetAll() { ... }
49
49
 
50
50
  // ... other CRUD methods
@@ -55,4 +55,4 @@ This ensures:
55
55
  - API route is derived from navigation path
56
56
  - Permissions use the constants from Permissions.cs
57
57
  - Frontend can discover API path from NavRoute registry
58
- - Controller file is in the correct context/application folder
58
+ - Controller file is in the correct application folder