@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.
Files changed (47) hide show
  1. package/dist/mcp-entry.mjs +62 -37
  2. package/dist/mcp-entry.mjs.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/agents/efcore/scan.md +3 -1
  5. package/templates/agents/gitflow/commit.md +74 -0
  6. package/templates/agents/gitflow/finish.md +5 -2
  7. package/templates/agents/gitflow/init-clone.md +3 -3
  8. package/templates/agents/gitflow/init-validate.md +3 -2
  9. package/templates/agents/gitflow/merge.md +5 -0
  10. package/templates/agents/gitflow/pr.md +5 -0
  11. package/templates/agents/gitflow/start.md +8 -1
  12. package/templates/hooks/hooks.json +11 -0
  13. package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
  14. package/templates/skills/apex/references/core-seed-data.md +0 -1
  15. package/templates/skills/apex/references/examine-build-validation.md +1 -6
  16. package/templates/skills/apex/references/smartstack-frontend.md +1 -1
  17. package/templates/skills/apex/steps/step-03-execute.md +4 -9
  18. package/templates/skills/apex/steps/step-08-run-tests.md +1 -2
  19. package/templates/skills/application/SKILL.md +241 -241
  20. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +5 -5
  21. package/templates/skills/application/references/frontend-verification.md +1 -1
  22. package/templates/skills/application/references/init-parameter-detection.md +121 -120
  23. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -100
  24. package/templates/skills/application/references/nav-fallback-procedure.md +199 -199
  25. package/templates/skills/application/steps/step-00-init.md +130 -130
  26. package/templates/skills/application/steps/step-01-navigation.md +170 -170
  27. package/templates/skills/application/steps/step-02-permissions.md +196 -196
  28. package/templates/skills/application/steps/step-03-roles.md +182 -182
  29. package/templates/skills/application/steps/step-03b-provider.md +133 -133
  30. package/templates/skills/application/steps/step-04-backend.md +174 -174
  31. package/templates/skills/application/steps/step-05-frontend.md +1 -1
  32. package/templates/skills/application/templates-frontend.md +7 -7
  33. package/templates/skills/business-analyse/react/schema.md +836 -836
  34. package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
  35. package/templates/skills/business-analyse/templates-frd.md +1 -1
  36. package/templates/skills/efcore/SKILL.md +1 -1
  37. package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
  38. package/templates/skills/gitflow/SKILL.md +27 -4
  39. package/templates/skills/gitflow/_shared.md +86 -12
  40. package/templates/skills/gitflow/phases/abort.md +4 -0
  41. package/templates/skills/gitflow/phases/cleanup.md +4 -0
  42. package/templates/skills/gitflow/references/finish-cleanup.md +4 -0
  43. package/templates/skills/gitflow/references/init-structure-creation.md +4 -0
  44. package/templates/skills/gitflow/references/start-worktree-creation.md +1 -1
  45. package/templates/skills/ralph-loop/steps/step-04-check.md +1 -2
  46. package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
  47. 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
- ## Parameter Extraction
20
-
21
- Required parameters to extract:
22
-
23
- ```yaml
24
- # Required
25
- level: application | module | section
26
- code: kebab-case (e.g., "products", "order-management")
27
- labels:
28
- fr: "Label français"
29
- en: "English label"
30
- it: "Etichetta italiana"
31
- de: "Deutsche Bezeichnung"
32
- icon: Lucide icon name (e.g., "Package", "ShoppingCart")
33
- displayOrder: number
34
-
35
- # Conditional (required for module and section levels)
36
- parentPath: "application.module" (dot-separated)
37
- ```
38
-
39
- ---
40
-
41
- ## Project Type & Seeding Strategy
42
-
43
- Read `.smartstack/config.json` at the project root:
44
-
45
- | projectType | dbContext | Seeding Strategy |
46
- |-------------|----------|-----------------|
47
- | `core` | `core` | HasData() in Configuration files (existing pattern) |
48
- | `client` | `extensions` | IClientSeedDataProvider (runtime seeding) |
49
-
50
- **If file not found or projectType missing:** Default to `core` / `hasdata`.
51
-
52
- Store:
53
- ```
54
- {project_type} = "core" or "client"
55
- {db_context} = "core" or "extensions"
56
- {seeding_strategy} = "hasdata" or "provider"
57
- ```
58
-
59
- ---
60
-
61
- ## Feature.json Context (Optional Enrichment)
62
-
63
- Search for a Business Analysis feature.json for the target module:
64
-
65
- ```
66
- Glob: docs/business/*/{code}/business-analyse/v*/feature.json
67
- .business-analyse/business/*/modules/{code}/features/*/feature.json
68
- ```
69
-
70
- **If found (status = "handed-off" or "consolidated"):**
71
-
72
- Extract context for subsequent steps:
73
-
74
- | feature.json Section | Used In Step | Extracted Data |
75
- |----------------------|-------------|----------------|
76
- | `analysis.entities[]` | step-04 (backend) | Entity names, attributes, relationships, validations |
77
- | `specification.useCases[]` | step-04 (backend) | API endpoint definitions beyond basic CRUD |
78
- | `specification.permissionMatrix` | step-02 (permissions) | Custom permission paths and role assignments |
79
- | `specification.apiEndpoints[]` | step-04 (backend) | Exact HTTP methods, routes, DTOs |
80
- | `specification.navigation` | step-01 (navigation) | Navigation hierarchy with labels and icons |
81
- | `specification.i18nKeys` | step-05 (frontend) | Pre-defined translation keys |
82
- | `specification.validations[]` | step-04 (backend) | Field-level validation rules |
83
- | `specification.uiWireframes[]` | step-05 (frontend) | UI layout guidance |
84
- | `specification.seedDataCore` | step-01, step-02, step-03 | Pre-computed seeds |
85
- | `analysis.businessRules[]` | step-04, step-07 | Business rules for service logic and tests |
86
- | `specification.lifeCycles[]` | step-04 (backend) | Entity state machines |
87
- | `specification.dashboards` | step-05 (frontend) | Dashboard KPIs and chart specs |
88
- | `documentation` | step-08 | userDocRequired / techDocRequired flags |
89
-
90
- Store:
91
- ```
92
- {feature_json_path} = "path/to/feature.json" or null
93
- {has_feature_context} = true or false
94
- {feature_data} = parsed feature.json object (if found)
95
- ```
96
-
97
- **If NOT found or status not in ["handed-off", "consolidated"]:**
98
- ```
99
- {has_feature_context} = false
100
- ```
101
-
102
- Continue normally. All subsequent steps use their standard generation logic (generic CRUD).
103
-
104
- > **When `{has_feature_context} = true`**, subsequent steps SHOULD use the feature.json data
105
- > to generate more accurate code: entities with correct attributes and relationships, custom
106
- > permissions beyond basic CRUD, specific API routes, validation rules, and business logic
107
- > in services. This reduces post-generation manual corrections significantly.
108
-
109
- ---
110
-
111
- ## MCP Prerequisite Check (BLOCKING)
112
-
113
- **CRITICAL:** This check is **BLOCKING** - the skill cannot proceed without MCP.
114
-
115
- Call: `mcp__smartstack__validate_conventions`
116
- Args: `{ checks: ["tables"] }`
117
-
118
- **On success:** Set `mcp_available = true`, continue.
119
-
120
- **On failure (STOP):** Display MCP installation instructions and halt.
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