@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.
- package/dist/index.js +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +201 -256
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +3 -2
- package/scripts/extract-api-endpoints.ts +325 -0
- package/scripts/extract-business-rules.ts +440 -0
- package/scripts/generate-doc-with-mock-ui.ts +804 -0
- package/scripts/health-check.sh +168 -0
- package/scripts/postinstall.js +18 -0
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/gitflow/merge.md +0 -4
- package/templates/agents/gitflow/pr.md +0 -4
- package/templates/agents/gitflow/start.md +30 -5
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -57
- package/templates/skills/apex/references/examine-build-validation.md +87 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +17 -17
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +47 -249
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
- package/templates/skills/application/SKILL.md +6 -7
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +120 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +11 -141
- package/templates/skills/application/steps/step-01-navigation.md +3 -3
- package/templates/skills/application/steps/step-02-permissions.md +4 -4
- package/templates/skills/application/steps/step-03-roles.md +18 -175
- package/templates/skills/application/steps/step-03b-provider.md +1 -2
- package/templates/skills/application/steps/step-04-backend.md +19 -110
- package/templates/skills/application/steps/step-05-frontend.md +17 -143
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +48 -48
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +11 -11
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +1 -1
- package/templates/skills/gitflow/_shared.md +23 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -52,98 +52,16 @@ IF delegate_mode:
|
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## 1.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| 1 | API (controllers) | Parallel |
|
|
66
|
-
| 1 | Infrastructure - Seed Data | Parallel |
|
|
67
|
-
| 2 | Frontend (pages, components) | Parallel |
|
|
68
|
-
| 2 | I18n (translations) | Parallel |
|
|
69
|
-
| 3 | Tests | Sequential |
|
|
70
|
-
|
|
71
|
-
**Entity Definition Template:** Each entity in the plan MUST include:
|
|
72
|
-
```
|
|
73
|
-
Entity: {EntityName}
|
|
74
|
-
- tenantMode: strict | optional | scoped | none
|
|
75
|
-
- codePattern: auto-generated strategy (if applicable)
|
|
76
|
-
- fkFields: [{field, targetEntity}] (if applicable)
|
|
77
|
-
- acceptance criteria: [AC1, AC2, ...]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
The `tenantMode` decision (from step-01, section 4a) drives EF query filters, seed data approach, and API authorization. See `smartstack-layers.md` for tenant mode seed data strategies.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 2. Assign Skill/MCP per File
|
|
85
|
-
|
|
86
|
-
For EACH file in the plan, specify HOW it will be created/modified:
|
|
87
|
-
|
|
88
|
-
```markdown
|
|
89
|
-
### Layer 0 — Domain + Infrastructure (sequential)
|
|
90
|
-
|
|
91
|
-
| # | File | Action | Tool |
|
|
92
|
-
|---|------|--------|------|
|
|
93
|
-
| 1 | Domain/Entities/.../MyEntity.cs | create | MCP scaffold_extension |
|
|
94
|
-
| 2 | Infrastructure/.../MyEntityConfiguration.cs | create | MCP scaffold_extension |
|
|
95
|
-
| 3 | Migration | create | MCP suggest_migration + dotnet ef |
|
|
96
|
-
|
|
97
|
-
### Layer 1 — Application + API (parallel)
|
|
98
|
-
|
|
99
|
-
| # | File | Action | Tool |
|
|
100
|
-
|---|------|--------|------|
|
|
101
|
-
| 4 | Application/Services/.../MyService.cs | create | MCP scaffold_extension |
|
|
102
|
-
| 5 | Application/DTOs/.../MyDto.cs | create | MCP scaffold_extension |
|
|
103
|
-
| 6 | Api/Controllers/.../MyController.cs | create | /controller skill |
|
|
104
|
-
| 7 | Seeding/Data/NavigationApplicationSeedData.cs | create | ref smartstack-layers.md (once per app) |
|
|
105
|
-
| 7b | Seeding/Data/ApplicationRolesSeedData.cs | create | ref smartstack-layers.md (once per app) |
|
|
106
|
-
| 7c | Infrastructure/Services/CodeGeneration/ | create | ref code-generation.md (ICodeGenerator<T> + DI, per entity with codePattern != manual) |
|
|
107
|
-
| 8 | Seeding/Data/.../NavigationModuleSeedData.cs | create | ref smartstack-layers.md |
|
|
108
|
-
| 8b | Application/Authorization/Permissions.cs | create | MCP generate_permissions → static constants |
|
|
109
|
-
| 9 | Seeding/Data/.../PermissionsSeedData.cs | create | MCP generate_permissions |
|
|
110
|
-
| 10 | Seeding/Data/.../RolesSeedData.cs | create | ref smartstack-layers.md |
|
|
111
|
-
|
|
112
|
-
### Layer 2 — Frontend + I18n (parallel)
|
|
113
|
-
|
|
114
|
-
| # | File | Action | Tool |
|
|
115
|
-
|---|------|--------|------|
|
|
116
|
-
| 11 | src/pages/{Ctx}/{App}/{Mod}/ListPage.tsx | create | /ui-components skill |
|
|
117
|
-
| 11b | src/pages/{Ctx}/{App}/{Mod}/CreatePage.tsx | create | /ui-components skill (EntityLookup for FK fields) |
|
|
118
|
-
| 11c | src/pages/{Ctx}/{App}/{Mod}/EditPage.tsx | create | /ui-components skill (EntityLookup for FK fields) |
|
|
119
|
-
| 11d | src/pages/{Ctx}/{App}/{Mod}/{Section}Page.tsx | create | /ui-components skill (per section in `{sections}`) |
|
|
120
|
-
| 11e | src/pages/{Ctx}/{App}/{Mod}/{Section}DetailPage.tsx | create | /ui-components skill (per section in `{sections}`) |
|
|
121
|
-
| 12 | src/services/api/{module}Api.ts | create | MCP scaffold_api_client |
|
|
122
|
-
| 13 | src/routes/{module}.tsx | create | MCP scaffold_routes |
|
|
123
|
-
| 14 | src/i18n/locales/{lang}/{module}.json | create | ref smartstack-frontend.md (4 languages: fr, en, it, de) |
|
|
124
|
-
|
|
125
|
-
**FK Field Guidance:** If step-01 identified `fkFields[]`, every Create/Edit page MUST use `EntityLookup` for those fields (see `smartstack-frontend.md` section 6). The corresponding backend GetAll endpoints (Layer 1) MUST support `?search=` parameter.
|
|
126
|
-
|
|
127
|
-
### Layer 2b — Documentation (after frontend pages exist)
|
|
128
|
-
|
|
129
|
-
| # | File | Action | Tool |
|
|
130
|
-
|---|------|--------|------|
|
|
131
|
-
| 14b | src/pages/docs/business/{app}/{module}/doc-data.ts | create | /documentation skill |
|
|
132
|
-
| 14c | src/pages/docs/business/{app}/{module}/index.tsx | create | /documentation skill |
|
|
133
|
-
|
|
134
|
-
### Layer 3 — Tests (sequential)
|
|
135
|
-
|
|
136
|
-
| # | File | Action | Tool |
|
|
137
|
-
|---|------|--------|------|
|
|
138
|
-
| 15 | tests/.../MyEntityTests.cs | create | MCP scaffold_tests |
|
|
139
|
-
| 16 | tests/.../MyServiceTests.cs | create | MCP scaffold_tests |
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 3. Identify Parallelization (Agent Teams)
|
|
145
|
-
|
|
146
|
-
If NOT economy_mode AND Layer 1 has both backend and frontend work:
|
|
55
|
+
## 1-3. Layer Mapping, Skill Assignment, Parallelization
|
|
56
|
+
|
|
57
|
+
> **Reference:** Load `references/planning-layer-mapping.md` for detailed planning procedures:
|
|
58
|
+
> - Layer assignment matrix (Domain/Infrastructure/Application/API/Seed/Frontend/Tests)
|
|
59
|
+
> - Entity definition template (tenantMode, codePattern, fkFields, ACs)
|
|
60
|
+
> - Skill/MCP assignment table (per file, per layer)
|
|
61
|
+
> - Layer 0/1/2b/3 file lists with tools
|
|
62
|
+
> - FK field guidance (EntityLookup + backend ?search= parameter)
|
|
63
|
+
> - Parallelization strategy (Agent Teams for Layer 1 backend+frontend)
|
|
64
|
+
> - Delegate mode fast path (PRD task mapping to layers)
|
|
147
65
|
|
|
148
66
|
```
|
|
149
67
|
Layer 0: SEQUENTIAL (agent principal)
|
|
@@ -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
|
-
|
|
103
|
-
|
|
104
|
-
>
|
|
105
|
-
>
|
|
106
|
-
>
|
|
107
|
-
>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
###
|
|
117
|
-
|
|
118
|
-
> **
|
|
119
|
-
>
|
|
120
|
-
>
|
|
121
|
-
>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
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 (
|
|
270
|
-
also call MCP generate_permissions for EACH section navRoute (
|
|
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/{
|
|
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
|
|
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
|
-
> **
|
|
350
|
-
>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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
|
-
|
|
282
|
+
**BLOCKING:** Do NOT commit frontend changes until ALL 5 gates pass.
|
|
485
283
|
|
|
486
|
-
|
|
487
|
-
- "CSS: Use CSS variables ONLY — `bg-[var(--bg-card)]`, `text-[var(--text-primary)]`.
|
|
488
|
-
- "Forms: Create/Edit forms are FULL PAGES with own routes (e.g., `/create`, `/:id/edit`).
|
|
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
|
|
133
|
+
## 4-5. Build & Migration Validation
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
|
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 (
|
|
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
|
|
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>`)
|