@atlashub/smartstack-cli 3.38.0 → 3.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp-entry.mjs +62 -37
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/scan.md +3 -1
- package/templates/agents/gitflow/commit.md +74 -0
- package/templates/agents/gitflow/finish.md +5 -2
- package/templates/agents/gitflow/init-clone.md +3 -3
- package/templates/agents/gitflow/init-validate.md +3 -2
- package/templates/agents/gitflow/merge.md +5 -0
- package/templates/agents/gitflow/pr.md +5 -0
- package/templates/agents/gitflow/start.md +8 -1
- package/templates/hooks/hooks.json +11 -0
- package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
- package/templates/skills/apex/references/core-seed-data.md +0 -1
- package/templates/skills/apex/references/examine-build-validation.md +1 -6
- package/templates/skills/apex/references/smartstack-frontend.md +1 -1
- package/templates/skills/apex/steps/step-03-execute.md +4 -9
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -2
- package/templates/skills/application/SKILL.md +241 -241
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +5 -5
- package/templates/skills/application/references/frontend-verification.md +1 -1
- package/templates/skills/application/references/init-parameter-detection.md +121 -120
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -100
- package/templates/skills/application/references/nav-fallback-procedure.md +199 -199
- package/templates/skills/application/steps/step-00-init.md +130 -130
- package/templates/skills/application/steps/step-01-navigation.md +170 -170
- package/templates/skills/application/steps/step-02-permissions.md +196 -196
- package/templates/skills/application/steps/step-03-roles.md +182 -182
- package/templates/skills/application/steps/step-03b-provider.md +133 -133
- package/templates/skills/application/steps/step-04-backend.md +174 -174
- package/templates/skills/application/steps/step-05-frontend.md +1 -1
- package/templates/skills/application/templates-frontend.md +7 -7
- package/templates/skills/business-analyse/react/schema.md +836 -836
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/business-analyse/templates-frd.md +1 -1
- package/templates/skills/efcore/SKILL.md +1 -1
- package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
- package/templates/skills/gitflow/SKILL.md +27 -4
- package/templates/skills/gitflow/_shared.md +86 -12
- package/templates/skills/gitflow/phases/abort.md +4 -0
- package/templates/skills/gitflow/phases/cleanup.md +4 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +4 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +4 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +1 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -2
- package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
- package/templates/skills/validate-feature/steps/step-01-compile.md +1 -6
|
@@ -1,120 +1,121 @@
|
|
|
1
|
-
# Initialization: Parameter Detection & Extraction
|
|
2
|
-
|
|
3
|
-
> Referenced from `steps/step-00-init.md` — Parameter parsing and MCP validation.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Navigation Level Detection
|
|
8
|
-
|
|
9
|
-
From user request, identify the level:
|
|
10
|
-
|
|
11
|
-
| Hint in Request | → Level | Parent Required |
|
|
12
|
-
|-----------------|---------|-----------------|
|
|
13
|
-
| "application", "app", "nouvelle application" | application | No |
|
|
14
|
-
| "module", "feature", "nouveau module" | module | Yes (application) |
|
|
15
|
-
| "section", "tab", "nouvelle section" | section | Yes (application.module) |
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
| `
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
| `
|
|
78
|
-
| `specification.
|
|
79
|
-
| `specification.
|
|
80
|
-
| `specification.
|
|
81
|
-
| `specification.
|
|
82
|
-
| `specification.
|
|
83
|
-
| `specification.
|
|
84
|
-
| `specification.
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `specification.
|
|
88
|
-
| `
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
>
|
|
106
|
-
>
|
|
107
|
-
>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
1
|
+
# Initialization: Parameter Detection & Extraction
|
|
2
|
+
|
|
3
|
+
> Referenced from `steps/step-00-init.md` — Parameter parsing and MCP validation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Navigation Level Detection
|
|
8
|
+
|
|
9
|
+
From user request, identify the level:
|
|
10
|
+
|
|
11
|
+
| Hint in Request | → Level | Parent Required |
|
|
12
|
+
|-----------------|---------|-----------------|
|
|
13
|
+
| "application", "app", "nouvelle application" | application | No |
|
|
14
|
+
| "module", "feature", "nouveau module" | module | Yes (application) |
|
|
15
|
+
| "section", "tab", "nouvelle section" | section | Yes (application.module) |
|
|
16
|
+
| "resource", "sous-section" | resource | Yes (application.module.section) |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Parameter Extraction
|
|
21
|
+
|
|
22
|
+
Required parameters to extract:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
# Required
|
|
26
|
+
level: application | module | section | resource
|
|
27
|
+
code: kebab-case (e.g., "products", "order-management")
|
|
28
|
+
labels:
|
|
29
|
+
fr: "Label français"
|
|
30
|
+
en: "English label"
|
|
31
|
+
it: "Etichetta italiana"
|
|
32
|
+
de: "Deutsche Bezeichnung"
|
|
33
|
+
icon: Lucide icon name (e.g., "Package", "ShoppingCart")
|
|
34
|
+
displayOrder: number
|
|
35
|
+
|
|
36
|
+
# Conditional (required for module and section levels)
|
|
37
|
+
parentPath: "application.module" or "application.module.section" (dot-separated)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Project Type & Seeding Strategy
|
|
43
|
+
|
|
44
|
+
Read `.smartstack/config.json` at the project root:
|
|
45
|
+
|
|
46
|
+
| projectType | dbContext | Seeding Strategy |
|
|
47
|
+
|-------------|----------|-----------------|
|
|
48
|
+
| `core` | `core` | HasData() in Configuration files (existing pattern) |
|
|
49
|
+
| `client` | `extensions` | IClientSeedDataProvider (runtime seeding) |
|
|
50
|
+
|
|
51
|
+
**If file not found or projectType missing:** Default to `core` / `hasdata`.
|
|
52
|
+
|
|
53
|
+
Store:
|
|
54
|
+
```
|
|
55
|
+
{project_type} = "core" or "client"
|
|
56
|
+
{db_context} = "core" or "extensions"
|
|
57
|
+
{seeding_strategy} = "hasdata" or "provider"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Feature.json Context (Optional Enrichment)
|
|
63
|
+
|
|
64
|
+
Search for a Business Analysis feature.json for the target module:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Glob: docs/business/*/{code}/business-analyse/v*/feature.json
|
|
68
|
+
.business-analyse/business/*/modules/{code}/features/*/feature.json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**If found (status = "handed-off" or "consolidated"):**
|
|
72
|
+
|
|
73
|
+
Extract context for subsequent steps:
|
|
74
|
+
|
|
75
|
+
| feature.json Section | Used In Step | Extracted Data |
|
|
76
|
+
|----------------------|-------------|----------------|
|
|
77
|
+
| `analysis.entities[]` | step-04 (backend) | Entity names, attributes, relationships, validations |
|
|
78
|
+
| `specification.useCases[]` | step-04 (backend) | API endpoint definitions beyond basic CRUD |
|
|
79
|
+
| `specification.permissionMatrix` | step-02 (permissions) | Custom permission paths and role assignments |
|
|
80
|
+
| `specification.apiEndpoints[]` | step-04 (backend) | Exact HTTP methods, routes, DTOs |
|
|
81
|
+
| `specification.navigation` | step-01 (navigation) | Navigation hierarchy with labels and icons |
|
|
82
|
+
| `specification.i18nKeys` | step-05 (frontend) | Pre-defined translation keys |
|
|
83
|
+
| `specification.validations[]` | step-04 (backend) | Field-level validation rules |
|
|
84
|
+
| `specification.uiWireframes[]` | step-05 (frontend) | UI layout guidance |
|
|
85
|
+
| `specification.seedDataCore` | step-01, step-02, step-03 | Pre-computed seeds |
|
|
86
|
+
| `analysis.businessRules[]` | step-04, step-07 | Business rules for service logic and tests |
|
|
87
|
+
| `specification.lifeCycles[]` | step-04 (backend) | Entity state machines |
|
|
88
|
+
| `specification.dashboards` | step-05 (frontend) | Dashboard KPIs and chart specs |
|
|
89
|
+
| `documentation` | step-08 | userDocRequired / techDocRequired flags |
|
|
90
|
+
|
|
91
|
+
Store:
|
|
92
|
+
```
|
|
93
|
+
{feature_json_path} = "path/to/feature.json" or null
|
|
94
|
+
{has_feature_context} = true or false
|
|
95
|
+
{feature_data} = parsed feature.json object (if found)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**If NOT found or status not in ["handed-off", "consolidated"]:**
|
|
99
|
+
```
|
|
100
|
+
{has_feature_context} = false
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Continue normally. All subsequent steps use their standard generation logic (generic CRUD).
|
|
104
|
+
|
|
105
|
+
> **When `{has_feature_context} = true`**, subsequent steps SHOULD use the feature.json data
|
|
106
|
+
> to generate more accurate code: entities with correct attributes and relationships, custom
|
|
107
|
+
> permissions beyond basic CRUD, specific API routes, validation rules, and business logic
|
|
108
|
+
> in services. This reduces post-generation manual corrections significantly.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## MCP Prerequisite Check (BLOCKING)
|
|
113
|
+
|
|
114
|
+
**CRITICAL:** This check is **BLOCKING** - the skill cannot proceed without MCP.
|
|
115
|
+
|
|
116
|
+
Call: `mcp__smartstack__validate_conventions`
|
|
117
|
+
Args: `{ checks: ["tables"] }`
|
|
118
|
+
|
|
119
|
+
**On success:** Set `mcp_available = true`, continue.
|
|
120
|
+
|
|
121
|
+
**On failure (STOP):** Display MCP installation instructions and halt.
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
# Migration: Checklist & Troubleshooting
|
|
2
|
-
|
|
3
|
-
> Referenced from `steps/step-06-migration.md` — Migration verification and common issues.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Pre-Migration Build Verification (BLOCKING)
|
|
8
|
-
|
|
9
|
-
**CRITICAL:** The backend MUST build successfully before creating a migration.
|
|
10
|
-
EF Core tools compile the project internally; a build failure produces confusing errors
|
|
11
|
-
that do not point to the actual source file.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
dotnet build {SolutionName}.sln --no-restore
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Common causes at this stage:**
|
|
18
|
-
- Missing DbSet registration (should have been caught in step-04 Check 2)
|
|
19
|
-
- Missing DI registration (should have been caught in step-04 Check 3)
|
|
20
|
-
- Circular references between generated services
|
|
21
|
-
- Missing package references (e.g., FluentValidation)
|
|
22
|
-
- Frontend changes that modified shared files
|
|
23
|
-
|
|
24
|
-
**After build succeeds:** Continue to migration name suggestion.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Migration Content Verification
|
|
29
|
-
|
|
30
|
-
The migration should include:
|
|
31
|
-
- Navigation entity (Application/Module/Section)
|
|
32
|
-
- Navigation translations (4 languages)
|
|
33
|
-
- Permissions (CRUD + wildcard)
|
|
34
|
-
- RolePermissions (role assignments)
|
|
35
|
-
- Domain entity table
|
|
36
|
-
- Indexes and constraints
|
|
37
|
-
- SQL Objects injection (if any .sql files exist)
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## SQL Objects Injection
|
|
42
|
-
|
|
43
|
-
Check if any SQL object files exist:
|
|
44
|
-
```
|
|
45
|
-
Glob: **/Persistence/SqlObjects/Functions/*.sql
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If SQL files are found, the migration's `Up()` method should include a call to re-apply all SQL objects:
|
|
49
|
-
```csharp
|
|
50
|
-
// At the end of the Up() method:
|
|
51
|
-
SqlObjectHelper.ApplyAll(migrationBuilder);
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This ensures SQL functions/views are re-applied with each migration (`CREATE OR ALTER` = idempotent).
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Troubleshooting
|
|
59
|
-
|
|
60
|
-
### Common Issues
|
|
61
|
-
|
|
62
|
-
| Issue | Solution |
|
|
63
|
-
|-------|----------|
|
|
64
|
-
| Migration conflicts | Run `/efcore:conflicts` to analyze |
|
|
65
|
-
| Permission 403 errors | Verify Permissions.cs and PermissionConfiguration.cs are in sync |
|
|
66
|
-
| Navigation not visible | Check user role has appropriate permissions |
|
|
67
|
-
| Route not found | Verify nested route structure in routes.tsx |
|
|
68
|
-
| i18n missing | Check locale files exist and are properly loaded |
|
|
69
|
-
| EF Core compilation error | Check DbSet and DI registration |
|
|
70
|
-
| FK constraint errors | Verify all entity references exist in seed data |
|
|
71
|
-
|
|
72
|
-
### Quick Fixes
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Rebuild and restart
|
|
76
|
-
dotnet build
|
|
77
|
-
dotnet ef database update
|
|
78
|
-
|
|
79
|
-
# Clear frontend cache
|
|
80
|
-
cd web && rm -rf node_modules/.cache && npm run dev
|
|
81
|
-
|
|
82
|
-
# Reset database (development only)
|
|
83
|
-
dotnet ef database drop --context CoreDbContext --force
|
|
84
|
-
dotnet ef database update --context CoreDbContext
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Final Checklist
|
|
90
|
-
|
|
91
|
-
- [ ] Pre-migration build passed
|
|
92
|
-
- [ ] Migration name suggested via MCP
|
|
93
|
-
- [ ] Migration created with correct context
|
|
94
|
-
- [ ] Migration includes navigation, permissions, and entity table
|
|
95
|
-
- [ ] SQL objects injected (if applicable)
|
|
96
|
-
- [ ] Migration applied successfully
|
|
97
|
-
- [ ] Database updated without errors
|
|
98
|
-
- [ ] DbSet registered in DbContext
|
|
99
|
-
- [ ] DI registration in place
|
|
100
|
-
- [ ] Application starts without errors
|
|
1
|
+
# Migration: Checklist & Troubleshooting
|
|
2
|
+
|
|
3
|
+
> Referenced from `steps/step-06-migration.md` — Migration verification and common issues.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pre-Migration Build Verification (BLOCKING)
|
|
8
|
+
|
|
9
|
+
**CRITICAL:** The backend MUST build successfully before creating a migration.
|
|
10
|
+
EF Core tools compile the project internally; a build failure produces confusing errors
|
|
11
|
+
that do not point to the actual source file.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
dotnet build {SolutionName}.sln --no-restore
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Common causes at this stage:**
|
|
18
|
+
- Missing DbSet registration (should have been caught in step-04 Check 2)
|
|
19
|
+
- Missing DI registration (should have been caught in step-04 Check 3)
|
|
20
|
+
- Circular references between generated services
|
|
21
|
+
- Missing package references (e.g., FluentValidation)
|
|
22
|
+
- Frontend changes that modified shared files
|
|
23
|
+
|
|
24
|
+
**After build succeeds:** Continue to migration name suggestion.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Migration Content Verification
|
|
29
|
+
|
|
30
|
+
The migration should include:
|
|
31
|
+
- Navigation entity (Application/Module/Section/Resource)
|
|
32
|
+
- Navigation translations (4 languages)
|
|
33
|
+
- Permissions (CRUD + wildcard)
|
|
34
|
+
- RolePermissions (role assignments)
|
|
35
|
+
- Domain entity table
|
|
36
|
+
- Indexes and constraints
|
|
37
|
+
- SQL Objects injection (if any .sql files exist)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## SQL Objects Injection
|
|
42
|
+
|
|
43
|
+
Check if any SQL object files exist:
|
|
44
|
+
```
|
|
45
|
+
Glob: **/Persistence/SqlObjects/Functions/*.sql
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If SQL files are found, the migration's `Up()` method should include a call to re-apply all SQL objects:
|
|
49
|
+
```csharp
|
|
50
|
+
// At the end of the Up() method:
|
|
51
|
+
SqlObjectHelper.ApplyAll(migrationBuilder);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This ensures SQL functions/views are re-applied with each migration (`CREATE OR ALTER` = idempotent).
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Troubleshooting
|
|
59
|
+
|
|
60
|
+
### Common Issues
|
|
61
|
+
|
|
62
|
+
| Issue | Solution |
|
|
63
|
+
|-------|----------|
|
|
64
|
+
| Migration conflicts | Run `/efcore:conflicts` to analyze |
|
|
65
|
+
| Permission 403 errors | Verify Permissions.cs and PermissionConfiguration.cs are in sync |
|
|
66
|
+
| Navigation not visible | Check user role has appropriate permissions |
|
|
67
|
+
| Route not found | Verify nested route structure in routes.tsx |
|
|
68
|
+
| i18n missing | Check locale files exist and are properly loaded |
|
|
69
|
+
| EF Core compilation error | Check DbSet and DI registration |
|
|
70
|
+
| FK constraint errors | Verify all entity references exist in seed data |
|
|
71
|
+
|
|
72
|
+
### Quick Fixes
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Rebuild and restart
|
|
76
|
+
dotnet build
|
|
77
|
+
dotnet ef database update
|
|
78
|
+
|
|
79
|
+
# Clear frontend cache
|
|
80
|
+
cd web && rm -rf node_modules/.cache && npm run dev
|
|
81
|
+
|
|
82
|
+
# Reset database (development only)
|
|
83
|
+
dotnet ef database drop --context CoreDbContext --force
|
|
84
|
+
dotnet ef database update --context CoreDbContext
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Final Checklist
|
|
90
|
+
|
|
91
|
+
- [ ] Pre-migration build passed
|
|
92
|
+
- [ ] Migration name suggested via MCP
|
|
93
|
+
- [ ] Migration created with correct context
|
|
94
|
+
- [ ] Migration includes navigation, permissions, and entity table
|
|
95
|
+
- [ ] SQL objects injected (if applicable)
|
|
96
|
+
- [ ] Migration applied successfully
|
|
97
|
+
- [ ] Database updated without errors
|
|
98
|
+
- [ ] DbSet registered in DbContext
|
|
99
|
+
- [ ] DI registration in place
|
|
100
|
+
- [ ] Application starts without errors
|