@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,199 +1,199 @@
1
- # Navigation: Fallback Procedure (When MCP Unavailable)
2
-
3
- > Reference for step-01-navigation.md — generates navigation seeds following SmartStack.app patterns.
4
- > Reference: `templates-seed.md` for code templates.
5
- >
6
- > **Branch by Project Type:**
7
- > - If `{seeding_strategy}` = "hasdata" (core project): Follow F1-F8 below
8
- > - If `{seeding_strategy}` = "provider" (client project): Follow **CLIENT PROJECT HANDLING** in step file
9
-
10
- ## F1. Read Existing Configuration Files
11
-
12
- **CRITICAL:** Before generating any code, read existing files to determine state:
13
-
14
- 1. **Find the Navigation Configuration directory:**
15
- ```
16
- Glob: **/Persistence/Configurations/Navigation/Navigation*Configuration.cs
17
- ```
18
-
19
- 2. **Read NavigationTranslationConfiguration.cs** - Find the last GUID index:
20
- ```
21
- Search for: the last call to GenerateGuid(index++)
22
- The index variable starts at 1 and increments per translation entry.
23
- Your new translations MUST continue from the next index value.
24
- ```
25
-
26
- 3. **Read Navigation{Level}Configuration.cs** - Check existing entities:
27
- ```
28
- Read the Configuration for the target level (Application, Module, Section).
29
- Check if it already references a SeedData class: builder.HasData(Navigation{Level}SeedData.GetSeedData())
30
- If yes: Read the corresponding SeedData class to find existing entries.
31
- If no: You will need to add HasData() call.
32
- ```
33
-
34
- 4. **Read existing SeedData files** (if they exist):
35
- ```
36
- Glob: **/Seeding/Data/Navigation/Navigation{Level}SeedData.cs
37
- Check for existing entity IDs to avoid collisions.
38
- ```
39
-
40
- ## F2. Determine Parent GUID
41
-
42
- For non-application levels, find the parent entity GUID:
43
-
44
- | Level | Parent | Where to Find Parent GUID |
45
- |-------|--------|---------------------------|
46
- | application | (none — top level) | — |
47
- | module | application | `NavigationApplicationSeedData.cs` → e.g. `AdministrationAppId` |
48
- | section | module | `NavigationModuleSeedData.cs` → e.g. `UsersModuleId` |
49
-
50
- Read the parent SeedData class and find the GUID matching `{parent_path}`.
51
-
52
- ## F3. Generate Navigation Entity GUID
53
-
54
- Generate a deterministic GUID for the new navigation entity:
55
-
56
- ```csharp
57
- // Use SHA256 hash of the full_path for deterministic generation
58
- using var sha256 = System.Security.Cryptography.SHA256.Create();
59
- var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes("navigation-{level}-{full_path}"));
60
- var guid = new Guid(hash.Take(16).ToArray());
61
- ```
62
-
63
- **Rules:**
64
- - NEVER use `Guid.NewGuid()`
65
- - Read existing SeedData GUIDs to verify no collision
66
- - Store result as `{navigation_guid}`
67
-
68
- ## F4. Write Navigation Entity Seed
69
-
70
- Based on `{level}`, write the seed entry.
71
-
72
- **Option A: Project uses SeedData classes (SmartStack.app pattern)**
73
-
74
- If `Navigation{Level}SeedData.cs` exists, add the new entity:
75
-
76
- ```csharp
77
- // In Infrastructure/Persistence/Seeding/Data/Navigation/Navigation{Level}SeedData.cs
78
-
79
- // Add static GUID field
80
- public static readonly Guid {PascalCode}Id = Guid.Parse("{navigation_guid}");
81
-
82
- // Add to GetSeedData() return array
83
- new {
84
- Id = {PascalCode}Id,
85
- ParentFk = Navigation{ParentLevel}SeedData.{ParentPascalCode}Id, // FK varies by level
86
- Code = "{code}",
87
- Label = "{labels.en}",
88
- Description = "{descriptions.en}",
89
- Icon = "{icon}",
90
- IconType = IconType.Lucide,
91
- Route = "/{full_path_with_slashes}",
92
- DisplayOrder = {display_order},
93
- IsActive = true,
94
- CreatedAt = SeedConstants.SeedDate
95
- }
96
- ```
97
-
98
- **FK property by level:**
99
-
100
- | Level | FK Property | References |
101
- |-------|-------------|------------|
102
- | application | (none — top level) | — |
103
- | module | `ApplicationId` | NavigationApplicationSeedData.{Parent}Id |
104
- | section | `ModuleId` | NavigationModuleSeedData.{Parent}Id |
105
-
106
- **Option B: Project uses inline HasData**
107
-
108
- If no SeedData class exists, add directly to `Navigation{Level}Configuration.cs`:
109
-
110
- ```csharp
111
- // In Configure method, add:
112
- builder.HasData(new {
113
- Id = Guid.Parse("{navigation_guid}"),
114
- // ... same properties as Option A
115
- });
116
- ```
117
-
118
- ## F5. Write Translation Entries
119
-
120
- Add 4 translation entries to `NavigationTranslationConfiguration.cs`:
121
-
122
- 1. Read the file to find the current highest `index` value
123
- 2. Continue from `index + 1`
124
- 3. Use the SAME `GenerateGuid` method already defined in the file:
125
-
126
- ```csharp
127
- // In GetSeedData() method, add at the end before return:
128
-
129
- // {level}: {code} translations
130
- translations.Add(new {
131
- Id = GenerateGuid(index++),
132
- EntityType = NavigationEntityType.{Level},
133
- EntityId = Navigation{Level}SeedData.{PascalCode}Id, // or Guid.Parse("{navigation_guid}")
134
- LanguageCode = "fr",
135
- Label = "{labels.fr}",
136
- Description = "{descriptions.fr}",
137
- CreatedAt = seedDate
138
- });
139
- translations.Add(new {
140
- Id = GenerateGuid(index++),
141
- EntityType = NavigationEntityType.{Level},
142
- EntityId = Navigation{Level}SeedData.{PascalCode}Id,
143
- LanguageCode = "en",
144
- Label = "{labels.en}",
145
- Description = "{descriptions.en}",
146
- CreatedAt = seedDate
147
- });
148
- translations.Add(new {
149
- Id = GenerateGuid(index++),
150
- EntityType = NavigationEntityType.{Level},
151
- EntityId = Navigation{Level}SeedData.{PascalCode}Id,
152
- LanguageCode = "it",
153
- Label = "{labels.it}",
154
- Description = "{descriptions.it}",
155
- CreatedAt = seedDate
156
- });
157
- translations.Add(new {
158
- Id = GenerateGuid(index++),
159
- EntityType = NavigationEntityType.{Level},
160
- EntityId = Navigation{Level}SeedData.{PascalCode}Id,
161
- LanguageCode = "de",
162
- Label = "{labels.de}",
163
- Description = "{descriptions.de}",
164
- CreatedAt = seedDate
165
- });
166
- ```
167
-
168
- ## F6. Store Result
169
-
170
- ```
171
- {navigation_guid} = [generated GUID]
172
- {seed_method} = "fallback" // Indicates MCP was not used
173
- ```
174
-
175
- ## F7. Validation Checklist
176
-
177
- Before proceeding, verify:
178
- - [ ] Deterministic GUID generated (not NewGuid())
179
- - [ ] 4 languages present (fr, en, it, de)
180
- - [ ] Translation index continues existing sequence (no gaps, no collisions)
181
- - [ ] Parent GUID correctly references existing entity
182
- - [ ] Route path matches `/{app}/{module}` pattern
183
- - [ ] DisplayOrder is consistent with existing entities
184
- - [ ] Code is WRITTEN to files, not just displayed
185
-
186
- ## F8. Present Summary
187
-
188
- ```markdown
189
- ## Navigation Seeds Generated (Fallback)
190
-
191
- **Entity:** {level} - {code}
192
- **GUID:** {navigation_guid}
193
- **Path:** {full_path}
194
-
195
- ### Files Updated
196
-
197
- 1. **Navigation{Level}SeedData.cs** (or Configuration.cs) - New entity entry
198
- 2. **NavigationTranslationConfiguration.cs** - 4 translation entries added
199
- ```
1
+ # Navigation: Fallback Procedure (When MCP Unavailable)
2
+
3
+ > Reference for step-01-navigation.md — generates navigation seeds following SmartStack.app patterns.
4
+ > Reference: `templates-seed.md` for code templates.
5
+ >
6
+ > **Branch by Project Type:**
7
+ > - If `{seeding_strategy}` = "hasdata" (core project): Follow F1-F8 below
8
+ > - If `{seeding_strategy}` = "provider" (client project): Follow **CLIENT PROJECT HANDLING** in step file
9
+
10
+ ## F1. Read Existing Configuration Files
11
+
12
+ **CRITICAL:** Before generating any code, read existing files to determine state:
13
+
14
+ 1. **Find the Navigation Configuration directory:**
15
+ ```
16
+ Glob: **/Persistence/Configurations/Navigation/Navigation*Configuration.cs
17
+ ```
18
+
19
+ 2. **Read NavigationTranslationConfiguration.cs** - Find the last GUID index:
20
+ ```
21
+ Search for: the last call to GenerateGuid(index++)
22
+ The index variable starts at 1 and increments per translation entry.
23
+ Your new translations MUST continue from the next index value.
24
+ ```
25
+
26
+ 3. **Read Navigation{Level}Configuration.cs** - Check existing entities:
27
+ ```
28
+ Read the Configuration for the target level (Application, Module, Section, Resource).
29
+ Check if it already references a SeedData class: builder.HasData(Navigation{Level}SeedData.GetSeedData())
30
+ If yes: Read the corresponding SeedData class to find existing entries.
31
+ If no: You will need to add HasData() call.
32
+ ```
33
+
34
+ 4. **Read existing SeedData files** (if they exist):
35
+ ```
36
+ Glob: **/Seeding/Data/Navigation/Navigation{Level}SeedData.cs
37
+ Check for existing entity IDs to avoid collisions.
38
+ ```
39
+
40
+ ## F2. Determine Parent GUID
41
+
42
+ For non-application levels, find the parent entity GUID:
43
+
44
+ | Level | Parent | Where to Find Parent GUID |
45
+ |-------|--------|---------------------------|
46
+ | application | (none — top level) | — |
47
+ | module | application | `NavigationApplicationSeedData.cs` → e.g. `AdministrationAppId` |
48
+ | section | module | `NavigationModuleSeedData.cs` → e.g. `UsersModuleId` |
49
+
50
+ Read the parent SeedData class and find the GUID matching `{parent_path}`.
51
+
52
+ ## F3. Generate Navigation Entity GUID
53
+
54
+ Generate a deterministic GUID for the new navigation entity:
55
+
56
+ ```csharp
57
+ // Use SHA256 hash of the full_path for deterministic generation
58
+ using var sha256 = System.Security.Cryptography.SHA256.Create();
59
+ var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes("navigation-{level}-{full_path}"));
60
+ var guid = new Guid(hash.Take(16).ToArray());
61
+ ```
62
+
63
+ **Rules:**
64
+ - NEVER use `Guid.NewGuid()`
65
+ - Read existing SeedData GUIDs to verify no collision
66
+ - Store result as `{navigation_guid}`
67
+
68
+ ## F4. Write Navigation Entity Seed
69
+
70
+ Based on `{level}`, write the seed entry.
71
+
72
+ **Option A: Project uses SeedData classes (SmartStack.app pattern)**
73
+
74
+ If `Navigation{Level}SeedData.cs` exists, add the new entity:
75
+
76
+ ```csharp
77
+ // In Infrastructure/Persistence/Seeding/Data/Navigation/Navigation{Level}SeedData.cs
78
+
79
+ // Add static GUID field
80
+ public static readonly Guid {PascalCode}Id = Guid.Parse("{navigation_guid}");
81
+
82
+ // Add to GetSeedData() return array
83
+ new {
84
+ Id = {PascalCode}Id,
85
+ ParentFk = Navigation{ParentLevel}SeedData.{ParentPascalCode}Id, // FK varies by level
86
+ Code = "{code}",
87
+ Label = "{labels.en}",
88
+ Description = "{descriptions.en}",
89
+ Icon = "{icon}",
90
+ IconType = IconType.Lucide,
91
+ Route = "/{full_path_with_slashes}",
92
+ DisplayOrder = {display_order},
93
+ IsActive = true,
94
+ CreatedAt = SeedConstants.SeedDate
95
+ }
96
+ ```
97
+
98
+ **FK property by level:**
99
+
100
+ | Level | FK Property | References |
101
+ |-------|-------------|------------|
102
+ | application | (none — top level) | — |
103
+ | module | `ApplicationId` | NavigationApplicationSeedData.{Parent}Id |
104
+ | section | `ModuleId` | NavigationModuleSeedData.{Parent}Id |
105
+
106
+ **Option B: Project uses inline HasData**
107
+
108
+ If no SeedData class exists, add directly to `Navigation{Level}Configuration.cs`:
109
+
110
+ ```csharp
111
+ // In Configure method, add:
112
+ builder.HasData(new {
113
+ Id = Guid.Parse("{navigation_guid}"),
114
+ // ... same properties as Option A
115
+ });
116
+ ```
117
+
118
+ ## F5. Write Translation Entries
119
+
120
+ Add 4 translation entries to `NavigationTranslationConfiguration.cs`:
121
+
122
+ 1. Read the file to find the current highest `index` value
123
+ 2. Continue from `index + 1`
124
+ 3. Use the SAME `GenerateGuid` method already defined in the file:
125
+
126
+ ```csharp
127
+ // In GetSeedData() method, add at the end before return:
128
+
129
+ // {level}: {code} translations
130
+ translations.Add(new {
131
+ Id = GenerateGuid(index++),
132
+ EntityType = NavigationEntityType.{Level},
133
+ EntityId = Navigation{Level}SeedData.{PascalCode}Id, // or Guid.Parse("{navigation_guid}")
134
+ LanguageCode = "fr",
135
+ Label = "{labels.fr}",
136
+ Description = "{descriptions.fr}",
137
+ CreatedAt = seedDate
138
+ });
139
+ translations.Add(new {
140
+ Id = GenerateGuid(index++),
141
+ EntityType = NavigationEntityType.{Level},
142
+ EntityId = Navigation{Level}SeedData.{PascalCode}Id,
143
+ LanguageCode = "en",
144
+ Label = "{labels.en}",
145
+ Description = "{descriptions.en}",
146
+ CreatedAt = seedDate
147
+ });
148
+ translations.Add(new {
149
+ Id = GenerateGuid(index++),
150
+ EntityType = NavigationEntityType.{Level},
151
+ EntityId = Navigation{Level}SeedData.{PascalCode}Id,
152
+ LanguageCode = "it",
153
+ Label = "{labels.it}",
154
+ Description = "{descriptions.it}",
155
+ CreatedAt = seedDate
156
+ });
157
+ translations.Add(new {
158
+ Id = GenerateGuid(index++),
159
+ EntityType = NavigationEntityType.{Level},
160
+ EntityId = Navigation{Level}SeedData.{PascalCode}Id,
161
+ LanguageCode = "de",
162
+ Label = "{labels.de}",
163
+ Description = "{descriptions.de}",
164
+ CreatedAt = seedDate
165
+ });
166
+ ```
167
+
168
+ ## F6. Store Result
169
+
170
+ ```
171
+ {navigation_guid} = [generated GUID]
172
+ {seed_method} = "fallback" // Indicates MCP was not used
173
+ ```
174
+
175
+ ## F7. Validation Checklist
176
+
177
+ Before proceeding, verify:
178
+ - [ ] Deterministic GUID generated (not NewGuid())
179
+ - [ ] 4 languages present (fr, en, it, de)
180
+ - [ ] Translation index continues existing sequence (no gaps, no collisions)
181
+ - [ ] Parent GUID correctly references existing entity
182
+ - [ ] Route path matches `/{app}/{module}` pattern
183
+ - [ ] DisplayOrder is consistent with existing entities
184
+ - [ ] Code is WRITTEN to files, not just displayed
185
+
186
+ ## F8. Present Summary
187
+
188
+ ```markdown
189
+ ## Navigation Seeds Generated (Fallback)
190
+
191
+ **Entity:** {level} - {code}
192
+ **GUID:** {navigation_guid}
193
+ **Path:** {full_path}
194
+
195
+ ### Files Updated
196
+
197
+ 1. **Navigation{Level}SeedData.cs** (or Configuration.cs) - New entity entry
198
+ 2. **NavigationTranslationConfiguration.cs** - 4 translation entries added
199
+ ```
@@ -1,130 +1,130 @@
1
- ---
2
- name: step-00-init
3
- description: Initialize application/module creation - parse parameters and validate context
4
- next_step: steps/step-01-navigation.md
5
- ---
6
-
7
- # Step 0: Initialization
8
-
9
- ## MANDATORY EXECUTION RULES
10
-
11
- - NEVER skip parameter validation
12
- - ALWAYS detect the navigation level from user request
13
- - ALWAYS validate MCP availability before proceeding
14
- - YOU ARE AN INITIALIZER, not an executor
15
- - FORBIDDEN to call MCP tools until init is complete
16
-
17
- ## YOUR TASK
18
-
19
- Initialize the application/module creation by parsing parameters, detecting level, and validating the SmartStack context.
20
-
21
- ---
22
-
23
- ## EXECUTION SEQUENCE
24
-
25
- ### 1-4. Parameter Detection & Project Analysis
26
-
27
- See [references/init-parameter-detection.md](../references/init-parameter-detection.md) for:
28
- - Navigation level detection (application/module/section)
29
- - Parameter extraction (code, labels, icon, displayOrder)
30
- - Project type & seeding strategy detection
31
- - Feature.json context enrichment (optional)
32
- - MCP prerequisite validation (BLOCKING)
33
-
34
- ### 5. Build Full Path
35
-
36
- ```
37
- {full_path} = {parentPath}.{code} (if parentPath exists)
38
- {full_path} = {code} (if application level)
39
-
40
- Example:
41
- level: module
42
- parentPath: sales
43
- code: products
44
- → full_path: sales.products
45
- ```
46
-
47
- ### 6. Infer Descriptions (if not provided)
48
-
49
- ```yaml
50
- descriptions:
51
- fr: "Gestion de {labels.fr}"
52
- en: "{labels.en} management"
53
- it: "Gestione di {labels.it}"
54
- de: "Verwaltung von {labels.de}"
55
- ```
56
-
57
- ### 7. Show Summary
58
-
59
- ```
60
- ## Application Skill: {level} - {code}
61
-
62
- | Parameter | Value |
63
- |-----------|-------|
64
- | Level | {level} |
65
- | Code | {code} |
66
- | Full Path | {full_path} |
67
- | Parent | {parentPath} |
68
- | Icon | {icon} |
69
- | Display Order | {displayOrder} |
70
- | Project Type | {project_type} |
71
- | Seeding Strategy | {seeding_strategy} |
72
- | Feature.json | {has_feature_context ? feature_json_path : "Not found (standard generation)"} |
73
-
74
- ### Labels
75
- | Language | Label |
76
- |----------|-------|
77
- | FR | {labels.fr} |
78
- | EN | {labels.en} |
79
- | IT | {labels.it} |
80
- | DE | {labels.de} |
81
-
82
- → Proceeding to navigation generation...
83
- ```
84
-
85
- ---
86
-
87
- ## STATE VARIABLES TO PERSIST
88
-
89
- | Variable | Description |
90
- |----------|-------------|
91
- | `{level}` | application, module, or section |
92
- | `{code}` | kebab-case identifier |
93
- | `{full_path}` | Complete navigation path |
94
- | `{parent_path}` | Parent path (null for context) |
95
- | `{labels}` | Object with fr, en, it, de |
96
- | `{descriptions}` | Object with fr, en, it, de |
97
- | `{icon}` | Lucide icon name |
98
- | `{display_order}` | Numeric display order |
99
- | `{mcp_available}` | Boolean - MCP connectivity status |
100
- | `{project_type}` | "core" or "client" (from .smartstack/config.json) |
101
- | `{db_context}` | "core" or "extensions" (from .smartstack/config.json) |
102
- | `{seeding_strategy}` | "hasdata" (core) or "provider" (client) |
103
- | `{feature_json_path}` | Path to feature.json (null if not found) |
104
- | `{has_feature_context}` | Boolean - whether BA context is available |
105
- | `{feature_data}` | Parsed feature.json object (null if not found) |
106
-
107
- ---
108
-
109
- ## SUCCESS METRICS
110
-
111
- - Level correctly detected
112
- - All required parameters extracted
113
- - MCP availability verified
114
- - Project type and seeding strategy detected
115
- - Feature.json detected if available (enrichment context loaded)
116
- - Full path computed correctly
117
- - Summary displayed
118
- - Proceeded to step-01-navigation.md
119
-
120
- ## FAILURE MODES
121
-
122
- - Missing required parameters (ask user)
123
- - Invalid level detection (clarify with user)
124
- - MCP not available (STOP - display install instructions)
125
-
126
- ---
127
-
128
- ## NEXT STEP
129
-
130
- After showing initialization summary, proceed to `./step-01-navigation.md`
1
+ ---
2
+ name: step-00-init
3
+ description: Initialize application/module creation - parse parameters and validate context
4
+ next_step: steps/step-01-navigation.md
5
+ ---
6
+
7
+ # Step 0: Initialization
8
+
9
+ ## MANDATORY EXECUTION RULES
10
+
11
+ - NEVER skip parameter validation
12
+ - ALWAYS detect the navigation level from user request
13
+ - ALWAYS validate MCP availability before proceeding
14
+ - YOU ARE AN INITIALIZER, not an executor
15
+ - FORBIDDEN to call MCP tools until init is complete
16
+
17
+ ## YOUR TASK
18
+
19
+ Initialize the application/module creation by parsing parameters, detecting level, and validating the SmartStack context.
20
+
21
+ ---
22
+
23
+ ## EXECUTION SEQUENCE
24
+
25
+ ### 1-4. Parameter Detection & Project Analysis
26
+
27
+ See [references/init-parameter-detection.md](../references/init-parameter-detection.md) for:
28
+ - Navigation level detection (application/module/section/resource)
29
+ - Parameter extraction (code, labels, icon, displayOrder)
30
+ - Project type & seeding strategy detection
31
+ - Feature.json context enrichment (optional)
32
+ - MCP prerequisite validation (BLOCKING)
33
+
34
+ ### 5. Build Full Path
35
+
36
+ ```
37
+ {full_path} = {parentPath}.{code} (if parentPath exists)
38
+ {full_path} = {code} (if application level)
39
+
40
+ Example:
41
+ level: module
42
+ parentPath: sales
43
+ code: products
44
+ → full_path: sales.products
45
+ ```
46
+
47
+ ### 6. Infer Descriptions (if not provided)
48
+
49
+ ```yaml
50
+ descriptions:
51
+ fr: "Gestion de {labels.fr}"
52
+ en: "{labels.en} management"
53
+ it: "Gestione di {labels.it}"
54
+ de: "Verwaltung von {labels.de}"
55
+ ```
56
+
57
+ ### 7. Show Summary
58
+
59
+ ```
60
+ ## Application Skill: {level} - {code}
61
+
62
+ | Parameter | Value |
63
+ |-----------|-------|
64
+ | Level | {level} |
65
+ | Code | {code} |
66
+ | Full Path | {full_path} |
67
+ | Parent | {parentPath} |
68
+ | Icon | {icon} |
69
+ | Display Order | {displayOrder} |
70
+ | Project Type | {project_type} |
71
+ | Seeding Strategy | {seeding_strategy} |
72
+ | Feature.json | {has_feature_context ? feature_json_path : "Not found (standard generation)"} |
73
+
74
+ ### Labels
75
+ | Language | Label |
76
+ |----------|-------|
77
+ | FR | {labels.fr} |
78
+ | EN | {labels.en} |
79
+ | IT | {labels.it} |
80
+ | DE | {labels.de} |
81
+
82
+ → Proceeding to navigation generation...
83
+ ```
84
+
85
+ ---
86
+
87
+ ## STATE VARIABLES TO PERSIST
88
+
89
+ | Variable | Description |
90
+ |----------|-------------|
91
+ | `{level}` | application, module, section, or resource |
92
+ | `{code}` | kebab-case identifier |
93
+ | `{full_path}` | Complete navigation path |
94
+ | `{parent_path}` | Parent path (null for context) |
95
+ | `{labels}` | Object with fr, en, it, de |
96
+ | `{descriptions}` | Object with fr, en, it, de |
97
+ | `{icon}` | Lucide icon name |
98
+ | `{display_order}` | Numeric display order |
99
+ | `{mcp_available}` | Boolean - MCP connectivity status |
100
+ | `{project_type}` | "core" or "client" (from .smartstack/config.json) |
101
+ | `{db_context}` | "core" or "extensions" (from .smartstack/config.json) |
102
+ | `{seeding_strategy}` | "hasdata" (core) or "provider" (client) |
103
+ | `{feature_json_path}` | Path to feature.json (null if not found) |
104
+ | `{has_feature_context}` | Boolean - whether BA context is available |
105
+ | `{feature_data}` | Parsed feature.json object (null if not found) |
106
+
107
+ ---
108
+
109
+ ## SUCCESS METRICS
110
+
111
+ - Level correctly detected
112
+ - All required parameters extracted
113
+ - MCP availability verified
114
+ - Project type and seeding strategy detected
115
+ - Feature.json detected if available (enrichment context loaded)
116
+ - Full path computed correctly
117
+ - Summary displayed
118
+ - Proceeded to step-01-navigation.md
119
+
120
+ ## FAILURE MODES
121
+
122
+ - Missing required parameters (ask user)
123
+ - Invalid level detection (clarify with user)
124
+ - MCP not available (STOP - display install instructions)
125
+
126
+ ---
127
+
128
+ ## NEXT STEP
129
+
130
+ After showing initialization summary, proceed to `./step-01-navigation.md`