@atlashub/smartstack-cli 2.5.3 → 2.6.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 (42) hide show
  1. package/.documentation/business-analyse.html +4 -4
  2. package/.documentation/commands.html +2 -2
  3. package/.documentation/index.html +2 -2
  4. package/.documentation/js/app.js +2 -2
  5. package/package.json +1 -1
  6. package/templates/mcp-scaffolding/component.tsx.hbs +14 -14
  7. package/templates/mcp-scaffolding/controller.cs.hbs +6 -5
  8. package/templates/skills/_resources/docs-manifest-schema.md +3 -3
  9. package/templates/skills/_resources/mcp-validate-documentation-spec.md +6 -6
  10. package/templates/skills/apex/steps/step-04b-doc-sync.md +4 -4
  11. package/templates/skills/apex/steps/step-05-examine.md +1 -1
  12. package/templates/skills/apex/templates/04b-doc-sync.md +1 -1
  13. package/templates/skills/application/SKILL.md +33 -16
  14. package/templates/skills/application/steps/step-00-init.md +86 -3
  15. package/templates/skills/application/steps/step-01-navigation.md +34 -0
  16. package/templates/skills/application/steps/step-02-permissions.md +37 -0
  17. package/templates/skills/application/steps/step-03-roles.md +23 -2
  18. package/templates/skills/application/steps/step-03b-provider.md +251 -0
  19. package/templates/skills/application/steps/step-04-backend.md +75 -0
  20. package/templates/skills/application/steps/step-05-frontend.md +149 -10
  21. package/templates/skills/application/steps/step-06-migration.md +27 -15
  22. package/templates/skills/application/steps/step-07-tests.md +404 -0
  23. package/templates/skills/application/steps/step-08-documentation.md +137 -0
  24. package/templates/skills/application/templates-frontend.md +133 -26
  25. package/templates/skills/application/templates-seed.md +116 -0
  26. package/templates/skills/business-analyse/SKILL.md +1 -1
  27. package/templates/skills/business-analyse/questionnaire/07-ui.md +15 -0
  28. package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
  29. package/templates/skills/business-analyse/schemas/feature-schema.json +96 -7
  30. package/templates/skills/business-analyse/steps/step-03-specify.md +134 -5
  31. package/templates/skills/business-analyse/steps/step-05-handoff.md +61 -8
  32. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  33. package/templates/skills/business-analyse/templates-frd.md +8 -8
  34. package/templates/skills/business-analyse/templates-react.md +26 -26
  35. package/templates/skills/documentation/SKILL.md +6 -6
  36. package/templates/skills/documentation/data-schema.md +70 -44
  37. package/templates/skills/documentation/templates.md +6 -6
  38. package/templates/skills/ralph-loop/SKILL.md +1 -2
  39. package/templates/skills/ralph-loop/steps/step-01-task.md +1 -1
  40. package/templates/skills/ui-components/SKILL.md +33 -2
  41. package/templates/skills/ui-components/patterns/dashboard-chart.md +327 -0
  42. package/templates/skills/ui-components/style-guide.md +27 -0
@@ -633,7 +633,7 @@ default → step-00 → step-01 (full) →
633
633
  <rect x="0" y="0" width="130" height="80" rx="10" fill="url(#specifyGrad)"/>
634
634
  <text x="65" y="25" text-anchor="middle" fill="white" font-size="10" font-weight="700">STEP 02</text>
635
635
  <text x="65" y="42" text-anchor="middle" fill="white" font-size="13" font-weight="600">Specify</text>
636
- <text x="65" y="60" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Use cases, FRD</text>
636
+ <text x="65" y="60" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Use cases, Specs</text>
637
637
  <text x="65" y="72" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Permissions, Gherkin</text>
638
638
  </g>
639
639
 
@@ -788,10 +788,10 @@ default &rarr; step-00 &rarr; step-01 (full) &rarr;
788
788
  </div>
789
789
  <div class="command-body">
790
790
  <p data-lang="fr">
791
- <strong>Mission :</strong> Decouverte fusionnee + analyse metier (BRD). Exploration du codebase, questionnaire progressif, regles metier, entites, suggestions proactives.
791
+ <strong>Mission :</strong> Decouverte fusionnee + analyse metier. Exploration du codebase, questionnaire progressif, regles metier, entites, suggestions proactives.
792
792
  </p>
793
793
  <p data-lang="en">
794
- <strong>Mission:</strong> Merged discovery + business analysis (BRD). Codebase exploration, progressive questionnaire, business rules, entities, proactive suggestions.
794
+ <strong>Mission:</strong> Merged discovery + business analysis. Codebase exploration, progressive questionnaire, business rules, entities, proactive suggestions.
795
795
  </p>
796
796
 
797
797
  <h4 data-lang="fr">Detection du type de feature</h4>
@@ -980,7 +980,7 @@ default &rarr; step-00 &rarr; step-01 (full) &rarr;
980
980
  <div class="command-header">
981
981
  <code class="command-name">step-02-specify</code>
982
982
  <span class="badge badge-purple">Sonnet</span>
983
- <span class="badge badge-teal">FRD</span>
983
+ <span class="badge badge-teal">Spec</span>
984
984
  </div>
985
985
  <div class="command-body">
986
986
  <p data-lang="fr">
@@ -358,8 +358,8 @@
358
358
  <td><code>/business-analyse 4-specify</code></td>
359
359
  <td><span class="badge badge-purple">ULTRATHINK</span></td>
360
360
  <td>
361
- <span data-lang="fr">Specification fonctionnelle (FRD)</span>
362
- <span data-lang="en">Functional Requirements Document (FRD)</span>
361
+ <span data-lang="fr">Specification fonctionnelle</span>
362
+ <span data-lang="en">Functional Specification</span>
363
363
  </td>
364
364
  <td><a href="business-analyse.html#phase-4">BA</a></td>
365
365
  </tr>
@@ -192,8 +192,8 @@
192
192
  </div>
193
193
  </div>
194
194
  <div class="card-body">
195
- <p data-lang="fr">Workflow de specification fonctionnelle et technique en 6 phases. Questions adaptatives, BRD/FRD, prompts autonomes pour developpeurs.</p>
196
- <p data-lang="en">Functional and technical specification workflow in 6 phases. Adaptive questions, BRD/FRD, autonomous prompts for developers.</p>
195
+ <p data-lang="fr">Workflow de specification fonctionnelle et technique en 6 phases. Questions adaptatives, exigences metier, prompts autonomes pour developpeurs.</p>
196
+ <p data-lang="en">Functional and technical specification workflow in 6 phases. Adaptive questions, business requirements, autonomous prompts for developers.</p>
197
197
  <span class="tag tag-workflow">7 commands</span>
198
198
  </div>
199
199
  </a>
@@ -442,11 +442,11 @@ function initSearch() {
442
442
 
443
443
  // Business Analyse
444
444
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: '', anchor: '',
445
- keywords: 'business analyse analysis specification brd frd requirements exigences babok' },
445
+ keywords: 'business analyse analysis specification requirements exigences babok' },
446
446
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Discovery', en: 'Discovery' }, anchor: 'phase-2',
447
447
  keywords: 'discover discovery questionnaire questions adaptatives ultrathink elicitation' },
448
448
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Specification', en: 'Specification' }, anchor: 'phase-4',
449
- keywords: 'specify specification frd use cases wireframes gherkin acceptance criteria' },
449
+ keywords: 'specify specification use cases wireframes gherkin acceptance criteria' },
450
450
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Handoff', en: 'Handoff' }, anchor: 'phase-6',
451
451
  keywords: 'handoff dev prompt developer implementation autonome autonomous' },
452
452
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "2.5.3",
3
+ "version": "2.6.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, APEX, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -134,8 +134,8 @@ export const {{name}}: React.FC<{{name}}Props> = ({
134
134
  if (isLoading && !data.id) {
135
135
  return (
136
136
  <div className="flex items-center justify-center p-8">
137
- <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" />
138
- <span className="ml-2 text-gray-600">Loading...</span>
137
+ <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-accent-500)]" />
138
+ <span className="ml-2 text-[var(--text-secondary)]">Loading...</span>
139
139
  </div>
140
140
  );
141
141
  }
@@ -143,16 +143,16 @@ export const {{name}}: React.FC<{{name}}Props> = ({
143
143
  // Render error state
144
144
  if (error) {
145
145
  return (
146
- <div className="p-4 bg-red-50 border border-red-200 rounded-lg">
146
+ <div className="p-4 bg-[var(--error-bg)] border border-[var(--error-border)] rounded-[var(--radius-card)]">
147
147
  <div className="flex items-center">
148
- <svg className="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor">
148
+ <svg className="h-5 w-5 text-[var(--error-text)]" viewBox="0 0 20 20" fill="currentColor">
149
149
  <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clipRule="evenodd" />
150
150
  </svg>
151
- <span className="ml-2 text-red-700">{error}</span>
151
+ <span className="ml-2 text-[var(--error-text)]">{error}</span>
152
152
  </div>
153
153
  <button
154
154
  onClick={() => id && fetchData(id)}
155
- className="mt-2 text-sm text-red-600 hover:text-red-800 underline"
155
+ className="mt-2 text-sm text-[var(--error-text)] hover:opacity-80 underline"
156
156
  >
157
157
  Try again
158
158
  </button>
@@ -161,33 +161,33 @@ export const {{name}}: React.FC<{{name}}Props> = ({
161
161
  }
162
162
 
163
163
  return (
164
- <div className="bg-white rounded-lg shadow-sm border border-gray-200">
164
+ <div className="bg-[var(--bg-card)] rounded-[var(--radius-card)] shadow-sm border border-[var(--border-color)]">
165
165
  {/* Header */}
166
- <div className="px-6 py-4 border-b border-gray-200">
167
- <h2 className="text-xl font-semibold text-gray-900">
166
+ <div className="px-6 py-4 border-b border-[var(--border-color)]">
167
+ <h2 className="text-xl font-semibold text-[var(--text-primary)]">
168
168
  {id ? 'Edit' : 'Create'} {{name}}
169
169
  </h2>
170
170
  {isDirty && (
171
- <span className="text-sm text-amber-600">Unsaved changes</span>
171
+ <span className="text-sm text-[var(--warning-text)]">Unsaved changes</span>
172
172
  )}
173
173
  </div>
174
174
 
175
175
  {/* Form */}
176
176
  <form onSubmit={handleSubmit} className="p-6 space-y-6">
177
177
  {/* TODO: Add form fields */}
178
- <div className="text-gray-500 text-center py-8">
178
+ <div className="text-[var(--text-secondary)] text-center py-8">
179
179
  Add your form fields here
180
180
  </div>
181
181
 
182
182
  {/* Actions */}
183
183
  {!readOnly && (
184
- <div className="flex items-center justify-end gap-3 pt-4 border-t border-gray-200">
184
+ <div className="flex items-center justify-end gap-3 pt-4 border-t border-[var(--border-color)]">
185
185
  {onCancel && (
186
186
  <button
187
187
  type="button"
188
188
  onClick={handleCancel}
189
189
  disabled={isLoading}
190
- className="px-4 py-2 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50"
190
+ className="px-4 py-2 text-[var(--text-secondary)] bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-[var(--radius-button)] hover:bg-[var(--bg-hover)] disabled:opacity-50"
191
191
  >
192
192
  Cancel
193
193
  </button>
@@ -195,7 +195,7 @@ export const {{name}}: React.FC<{{name}}Props> = ({
195
195
  <button
196
196
  type="submit"
197
197
  disabled={isLoading || !isDirty}
198
- className="px-4 py-2 text-white bg-blue-600 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"
198
+ className="px-4 py-2 text-white bg-[var(--color-accent-600)] rounded-[var(--radius-button)] hover:bg-[var(--color-accent-700)] disabled:opacity-50 disabled:cursor-not-allowed"
199
199
  >
200
200
  {isLoading ? 'Saving...' : 'Save'}
201
201
  </button>
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
5
5
  using Microsoft.AspNetCore.Authorization;
6
6
  using Microsoft.AspNetCore.Mvc;
7
7
  using Microsoft.Extensions.Logging;
8
+ using SmartStack.Api.Authorization;
8
9
 
9
10
  namespace {{namespace}}.Controllers;
10
11
 
@@ -39,7 +40,7 @@ public class {{name}}Controller : ControllerBase
39
40
  /// <returns>List of {{namePlural}}</returns>
40
41
  [HttpGet]
41
42
  {{#if navRoute}}
42
- [Authorize(Policy = "{{navRoute}}.read")]
43
+ [RequirePermission("{{navRoute}}.read")]
43
44
  {{/if}}
44
45
  [ProducesResponseType(typeof(IEnumerable<{{name}}Dto>), 200)]
45
46
  public async Task<ActionResult<IEnumerable<{{name}}Dto>>> GetAll(CancellationToken cancellationToken = default)
@@ -61,7 +62,7 @@ public class {{name}}Controller : ControllerBase
61
62
  /// <returns>{{name}} details</returns>
62
63
  [HttpGet("{id:guid}")]
63
64
  {{#if navRoute}}
64
- [Authorize(Policy = "{{navRoute}}.read")]
65
+ [RequirePermission("{{navRoute}}.read")]
65
66
  {{/if}}
66
67
  [ProducesResponseType(typeof({{name}}Dto), 200)]
67
68
  [ProducesResponseType(404)]
@@ -87,7 +88,7 @@ public class {{name}}Controller : ControllerBase
87
88
  /// <returns>Created {{nameCamel}}</returns>
88
89
  [HttpPost]
89
90
  {{#if navRoute}}
90
- [Authorize(Policy = "{{navRoute}}.create")]
91
+ [RequirePermission("{{navRoute}}.create")]
91
92
  {{/if}}
92
93
  [ProducesResponseType(typeof({{name}}Dto), 201)]
93
94
  [ProducesResponseType(400)]
@@ -113,7 +114,7 @@ public class {{name}}Controller : ControllerBase
113
114
  /// <param name="cancellationToken">Cancellation token</param>
114
115
  [HttpPut("{id:guid}")]
115
116
  {{#if navRoute}}
116
- [Authorize(Policy = "{{navRoute}}.update")]
117
+ [RequirePermission("{{navRoute}}.update")]
117
118
  {{/if}}
118
119
  [ProducesResponseType(204)]
119
120
  [ProducesResponseType(404)]
@@ -138,7 +139,7 @@ public class {{name}}Controller : ControllerBase
138
139
  /// <param name="cancellationToken">Cancellation token</param>
139
140
  [HttpDelete("{id:guid}")]
140
141
  {{#if navRoute}}
141
- [Authorize(Policy = "{{navRoute}}.delete")]
142
+ [RequirePermission("{{navRoute}}.delete")]
142
143
  {{/if}}
143
144
  [ProducesResponseType(204)]
144
145
  [ProducesResponseType(404)]
@@ -23,7 +23,7 @@ The `docs-manifest.json` file maps code modules to their documentation artifacts
23
23
  "src/SmartStack.Api/Controllers/Business/{Module}Controller.cs"
24
24
  ],
25
25
  "docFiles": [
26
- "web/smartstack-web/src/pages/docs/business/{app}/{module}/frd-data.ts",
26
+ "web/smartstack-web/src/pages/docs/business/{app}/{module}/doc-data.ts",
27
27
  "web/smartstack-web/src/i18n/locales/fr/docs-{app}-{module}.json"
28
28
  ],
29
29
  "baOutputs": [
@@ -58,7 +58,7 @@ The `docs-manifest.json` file maps code modules to their documentation artifacts
58
58
  | `featureId` | string | Yes | BA feature ID (FEAT-NNN) |
59
59
  | `displayName` | string | Yes | Human-readable module name |
60
60
  | `codeFiles` | string[] | Yes | Source code files for this module |
61
- | `docFiles` | string[] | Yes | Documentation files (frd-data.ts, i18n) |
61
+ | `docFiles` | string[] | Yes | Documentation files (doc-data.ts, i18n) |
62
62
  | `baOutputs` | string[] | No | Business Analysis output directory |
63
63
  | `screenshots` | object | No | Map of stepKey → image path |
64
64
  | `lastCodeChange` | ISO date | Yes | Last code modification timestamp |
@@ -119,7 +119,7 @@ ELSE:
119
119
  "src/SmartStack.Api/Controllers/Business/SlaController.cs"
120
120
  ],
121
121
  "docFiles": [
122
- "web/smartstack-web/src/pages/docs/business/support/sla/frd-data.ts",
122
+ "web/smartstack-web/src/pages/docs/business/support/sla/doc-data.ts",
123
123
  "web/smartstack-web/src/i18n/locales/fr/docs-support-sla.json"
124
124
  ],
125
125
  "baOutputs": [
@@ -65,11 +65,11 @@ FOR each module in manifest:
65
65
  ### completeness
66
66
  Verify that documented modules have all 8 business-first sections.
67
67
 
68
- **Input:** frd-data.ts files, i18n JSON files
68
+ **Input:** doc-data.ts files, i18n JSON files
69
69
  **Logic:**
70
70
  ```
71
71
  FOR each module with documentation:
72
- Read frd-data.ts
72
+ Read doc-data.ts
73
73
  Check presence of:
74
74
  1. overview (valeur métier)
75
75
  2. useCases (cas d'usage)
@@ -99,21 +99,21 @@ FOR each module with documentation:
99
99
  ### accuracy
100
100
  Compare documented permissions, endpoints, and entities against actual code.
101
101
 
102
- **Input:** frd-data.ts, controllers, PermissionConfiguration.cs, entities
102
+ **Input:** doc-data.ts, controllers, PermissionConfiguration.cs, entities
103
103
  **Logic:**
104
104
  ```
105
105
  FOR each module:
106
- documentedPermissions = frdData.permissions
106
+ documentedPermissions = docData.permissions
107
107
  actualPermissions = scan PermissionConfiguration.cs for module path
108
108
  IF documentedPermissions != actualPermissions:
109
109
  issues.push("permission mismatch")
110
110
 
111
- documentedEndpoints = frdData.apiEndpoints
111
+ documentedEndpoints = docData.apiEndpoints
112
112
  actualEndpoints = scan Controller for [Http*] attributes
113
113
  IF documentedEndpoints != actualEndpoints:
114
114
  issues.push("endpoint mismatch")
115
115
 
116
- documentedEntities = frdData (entity references)
116
+ documentedEntities = docData (entity references)
117
117
  actualEntities = scan Domain/Entities for module
118
118
  IF documentedEntities != actualEntities:
119
119
  issues.push("entity mismatch")
@@ -92,14 +92,14 @@ For each affected module:
92
92
  - Agent returns structured summary of current doc state
93
93
 
94
94
  **If {economy_mode} = true:**
95
- - Read `frd-data.ts` directly
95
+ - Read `doc-data.ts` directly
96
96
  - Read i18n FR file directly
97
97
 
98
98
  ### 5. Update Documentation Data
99
99
 
100
100
  For each affected module and impacted section:
101
101
 
102
- 1. Read current `frd-data.ts`
102
+ 1. Read current `doc-data.ts`
103
103
  2. Compare with actual code state
104
104
  3. Update affected fields:
105
105
  - **apiEndpoints**: Scan controller for `[Http*]` attributes
@@ -107,7 +107,7 @@ For each affected module and impacted section:
107
107
  - **businessRules**: Scan validators and entity methods
108
108
  - **useCases**: Update if commands/queries changed
109
109
  - **features**: Update if new functionality added
110
- 4. Write updated `frd-data.ts`
110
+ 4. Write updated `doc-data.ts`
111
111
  5. Update i18n FR file if label keys changed
112
112
 
113
113
  ### 6. Update Documentation Manifest
@@ -144,7 +144,7 @@ Write `{output_dir}/04b-doc-sync.md` with:
144
144
  ## FAILURE MODES:
145
145
 
146
146
  - docs-manifest.json absent → skip gracefully (not a failure)
147
- - frd-data.ts has unexpected format → report warning, skip module
147
+ - doc-data.ts has unexpected format → report warning, skip module
148
148
  - No modules affected → display "No documented modules affected by changes"
149
149
 
150
150
  ---
@@ -77,7 +77,7 @@ Self-review with checklist:
77
77
  - [ ] Clear naming
78
78
 
79
79
  ## Documentation Checklist
80
- - [ ] Documented modules updated (frd-data.ts reflects code changes)
80
+ - [ ] Documented modules updated (doc-data.ts reflects code changes)
81
81
  - [ ] API endpoints reflected in documentation
82
82
  - [ ] Documented permissions match code
83
83
  - [ ] i18n keys added for new labels
@@ -17,7 +17,7 @@
17
17
  ## Documentation Updates
18
18
 
19
19
  ### Module: {{module_path}}
20
- - **frd-data.ts:** Updated fields: {{fields}}
20
+ - **doc-data.ts:** Updated fields: {{fields}}
21
21
  - **i18n FR:** {{updated|no_change}}
22
22
  - **Manifest:** Status → synced
23
23
 
@@ -21,15 +21,18 @@ This skill uses progressive step loading. Each step calls MCP tools for generati
21
21
 
22
22
  ## STEP FILES
23
23
 
24
- | Step | File | MCP Tool Called |
25
- |------|------|-----------------|
26
- | 00 | `steps/step-00-init.md` | `validate_conventions` (MCP check) |
27
- | 01 | `steps/step-01-navigation.md` | `scaffold_navigation` |
28
- | 02 | `steps/step-02-permissions.md` | `generate_permissions` |
29
- | 03 | `steps/step-03-roles.md` | `scaffold_role_permissions` |
30
- | 04 | `steps/step-04-backend.md` | `scaffold_extension` |
31
- | 05 | `steps/step-05-frontend.md` | `scaffold_api_client`, `scaffold_routes` |
32
- | 06 | `steps/step-06-migration.md` | `suggest_migration` |
24
+ | Step | File | MCP Tool Called | Condition |
25
+ |------|------|-----------------|-----------|
26
+ | 00 | `steps/step-00-init.md` | `validate_conventions` (MCP check) | Always |
27
+ | 01 | `steps/step-01-navigation.md` | `scaffold_navigation` | Always |
28
+ | 02 | `steps/step-02-permissions.md` | `generate_permissions` | Always |
29
+ | 03 | `steps/step-03-roles.md` | `scaffold_role_permissions` | Always |
30
+ | 03b | `steps/step-03b-provider.md` | (none - direct generation) | Client projects only |
31
+ | 04 | `steps/step-04-backend.md` | `scaffold_extension` | Always |
32
+ | 05 | `steps/step-05-frontend.md` | `scaffold_api_client`, `scaffold_routes` | Always |
33
+ | 06 | `steps/step-06-migration.md` | `suggest_migration` | Always |
34
+ | 07 | `steps/step-07-tests.md` | `scaffold_tests` | Always |
35
+ | 08 | `steps/step-08-documentation.md` | `/documentation` skill | If userDocRequired |
33
36
 
34
37
  ## MCP INTEGRATION
35
38
 
@@ -45,6 +48,7 @@ This skill uses progressive step loading. Each step calls MCP tools for generati
45
48
  | `mcp__smartstack__scaffold_api_client` | TypeScript API client |
46
49
  | `mcp__smartstack__scaffold_routes` | React Router configuration |
47
50
  | `mcp__smartstack__suggest_migration` | Migration name suggestion |
51
+ | `mcp__smartstack__scaffold_tests` | Test suite generation |
48
52
 
49
53
  ## WHEN THIS SKILL ACTIVATES
50
54
 
@@ -81,15 +85,24 @@ WEB (React) → API (.NET) → Application → Infrastructure → Database
81
85
  ```
82
86
  1. DB SEED (Navigation + Translations 4 languages)
83
87
  2. PERMISSIONS (Permissions.cs + PermissionConfiguration.cs) ← 2 files!
84
- 3. API (Controller + DTOs via /controller:create)
85
- 4. SERVICES (Interface + Implementation)
86
- 5. FRONTEND (Page + Components + Hooks)
87
- 6. I18N (fr, en, it, de)
88
- 7. ROUTES (nested routes mandatory)
89
- 8. PREFERENCES (Hook pattern)
90
- 9. MIGRATION (/efcore:migration)
88
+ 3. ROLES (RolePermission mappings)
89
+ 3b. CLIENT SEED PROVIDER (client projects only - IClientSeedDataProvider)
90
+ 4. API (Controller + DTOs via /controller:create)
91
+ 5. SERVICES (Interface + Implementation)
92
+ 6. FRONTEND (Page + Components + Hooks)
93
+ 7. I18N (fr, en, it, de)
94
+ 8. ROUTES (nested routes mandatory)
95
+ 9. PREFERENCES (Hook pattern)
96
+ 10. MIGRATION (/efcore:migration)
97
+ 11. TESTS (scaffold_tests - 6 categories)
98
+ 12. DOCUMENTATION (in-app user doc via /documentation - if userDocRequired)
91
99
  ```
92
100
 
101
+ ### 3b. Client Seed Provider (client projects only)
102
+ Generates `IClientSeedDataProvider` implementation that wires navigation + permissions + roles
103
+ into the SmartStack Core seeding pipeline. Only runs when `{seeding_strategy}` = "provider".
104
+ Core projects skip this step entirely.
105
+
93
106
  ### 4. Automatic Chaining
94
107
  - `/controller:create` → API Controllers
95
108
  - `/efcore:migration` → DB Migrations
@@ -138,6 +151,7 @@ export function use{Module}Preferences() {
138
151
  | `/workflow` | Automated emails | IWorkflowService.TriggerAsync |
139
152
  | `/ai-prompt` | AI assistance | IAiCompletionService |
140
153
  | `/feature-full` | Complete feature | Orchestration all skills |
154
+ | `/documentation` | In-app user doc | Documentation page via doc-data.ts + DocRenderer |
141
155
 
142
156
  ### Notification Integration Pattern
143
157
  ```csharp
@@ -172,9 +186,12 @@ await _workflowService.TriggerAsync("{entity}.created", new Dictionary<string, o
172
186
  - [steps/step-01-navigation.md](steps/step-01-navigation.md) - Generate navigation
173
187
  - [steps/step-02-permissions.md](steps/step-02-permissions.md) - Generate permissions
174
188
  - [steps/step-03-roles.md](steps/step-03-roles.md) - Assign roles
189
+ - [steps/step-03b-provider.md](steps/step-03b-provider.md) - Client seed provider (client projects only)
175
190
  - [steps/step-04-backend.md](steps/step-04-backend.md) - Generate backend
176
191
  - [steps/step-05-frontend.md](steps/step-05-frontend.md) - Generate frontend
177
192
  - [steps/step-06-migration.md](steps/step-06-migration.md) - Create migration
193
+ - [steps/step-07-tests.md](steps/step-07-tests.md) - Generate test suite
194
+ - [steps/step-08-documentation.md](steps/step-08-documentation.md) - Generate in-app documentation
178
195
 
179
196
  ### Templates (REFERENCE ONLY - Do Not Use Directly)
180
197
  > These templates are kept for documentation purposes.
@@ -89,7 +89,79 @@ Args: { checks: ["tables"] }
89
89
  **DO NOT** proceed with step files.
90
90
  **STOP the skill immediately.**
91
91
 
92
- ### 4. Build Full Path
92
+ ### 4. Detect Project Type
93
+
94
+ Read `.smartstack/config.json` at the project root to determine the seeding strategy:
95
+
96
+ ```
97
+ Read: .smartstack/config.json
98
+ Extract: projectType, dbContext
99
+ ```
100
+
101
+ | projectType | dbContext | Seeding Strategy |
102
+ |-------------|----------|-----------------|
103
+ | `core` | `core` | HasData() in Configuration files (existing pattern) |
104
+ | `client` | `extensions` | IClientSeedDataProvider (runtime seeding) |
105
+
106
+ **If file not found or projectType missing:** Default to `core` / `hasdata`.
107
+
108
+ Store:
109
+ ```
110
+ {project_type} = "core" or "client"
111
+ {db_context} = "core" or "extensions"
112
+ {seeding_strategy} = "hasdata" or "provider"
113
+ ```
114
+
115
+ ### 4b. Detect Feature.json Context (Optional Enrichment)
116
+
117
+ Search for a Business Analysis feature.json for the target module:
118
+
119
+ ```
120
+ Glob: docs/business/*/{code}/business-analyse/v*/feature.json
121
+ .business-analyse/business/*/modules/{code}/features/*/feature.json
122
+ ```
123
+
124
+ **If found (status = "handed-off" or "consolidated"):**
125
+
126
+ Read the feature.json and extract context for subsequent steps:
127
+
128
+ | feature.json Section | Used In Step | Extracted Data |
129
+ |----------------------|-------------|----------------|
130
+ | `analysis.entities[]` | step-04 (backend) | Entity names, attributes, relationships, validations |
131
+ | `specification.useCases[]` | step-04 (backend) | API endpoint definitions beyond basic CRUD |
132
+ | `specification.permissionMatrix` | step-02 (permissions) | Custom permission paths and role assignments |
133
+ | `specification.apiEndpoints[]` | step-04 (backend) | Exact HTTP methods, routes, DTOs |
134
+ | `specification.navigation` | step-01 (navigation) | Navigation hierarchy with labels and icons |
135
+ | `specification.i18nKeys` | step-05 (frontend) | Pre-defined translation keys |
136
+ | `specification.validations[]` | step-04 (backend) | Field-level validation rules |
137
+ | `specification.uiWireframes[]` | step-05 (frontend) | UI layout guidance |
138
+ | `specification.seedDataCore` | step-01, step-02, step-03 | Pre-computed seeds |
139
+ | `analysis.businessRules[]` | step-04, step-07 | Business rules for service logic and tests |
140
+ | `specification.lifeCycles[]` | step-04 (backend) | Entity state machines |
141
+ | `specification.dashboards` | step-05 (frontend) | Dashboard KPIs and chart specs |
142
+ | `documentation` | step-08 | userDocRequired / techDocRequired flags |
143
+
144
+ Store:
145
+ ```
146
+ {feature_json_path} = "path/to/feature.json" or null
147
+ {has_feature_context} = true or false
148
+ {feature_data} = parsed feature.json object (if found)
149
+ ```
150
+
151
+ **If NOT found or status not in ["handed-off", "consolidated"]:**
152
+
153
+ ```
154
+ {has_feature_context} = false
155
+ ```
156
+
157
+ Continue normally. All subsequent steps use their standard generation logic (generic CRUD).
158
+
159
+ > **When `{has_feature_context} = true`**, subsequent steps SHOULD use the feature.json data
160
+ > to generate more accurate code: entities with correct attributes and relationships, custom
161
+ > permissions beyond basic CRUD, specific API routes, validation rules, and business logic
162
+ > in services. This reduces post-generation manual corrections significantly.
163
+
164
+ ### 5. Build Full Path
93
165
 
94
166
  ```
95
167
  {full_path} = {parentPath}.{code} (if parentPath exists)
@@ -102,7 +174,7 @@ Example:
102
174
  → full_path: erp.sales.products
103
175
  ```
104
176
 
105
- ### 5. Infer Descriptions (if not provided)
177
+ ### 6. Infer Descriptions (if not provided)
106
178
 
107
179
  ```yaml
108
180
  descriptions:
@@ -112,7 +184,7 @@ descriptions:
112
184
  de: "Verwaltung von {labels.de}"
113
185
  ```
114
186
 
115
- ### 6. Show Summary
187
+ ### 7. Show Summary
116
188
 
117
189
  ```
118
190
  ## Application Skill: {level} - {code}
@@ -125,6 +197,9 @@ descriptions:
125
197
  | Parent | {parentPath} |
126
198
  | Icon | {icon} |
127
199
  | Display Order | {displayOrder} |
200
+ | Project Type | {project_type} |
201
+ | Seeding Strategy | {seeding_strategy} |
202
+ | Feature.json | {has_feature_context ? feature_json_path : "Not found (standard generation)"} |
128
203
 
129
204
  ### Labels
130
205
  | Language | Label |
@@ -152,6 +227,12 @@ descriptions:
152
227
  | `{icon}` | Lucide icon name |
153
228
  | `{display_order}` | Numeric display order |
154
229
  | `{mcp_available}` | Boolean - MCP connectivity status |
230
+ | `{project_type}` | "core" or "client" (from .smartstack/config.json) |
231
+ | `{db_context}` | "core" or "extensions" (from .smartstack/config.json) |
232
+ | `{seeding_strategy}` | "hasdata" (core) or "provider" (client) |
233
+ | `{feature_json_path}` | Path to feature.json (null if not found) |
234
+ | `{has_feature_context}` | Boolean - whether BA context is available |
235
+ | `{feature_data}` | Parsed feature.json object (null if not found) |
155
236
 
156
237
  ---
157
238
 
@@ -160,6 +241,8 @@ descriptions:
160
241
  - Level correctly detected
161
242
  - All required parameters extracted
162
243
  - MCP availability verified
244
+ - Project type and seeding strategy detected
245
+ - Feature.json detected if available (enrichment context loaded)
163
246
  - Full path computed correctly
164
247
  - Summary displayed
165
248
  - Proceeded to step-01-navigation.md
@@ -38,11 +38,16 @@ From step-00-init:
38
38
  | `{icon}` | Lucide icon name |
39
39
  | `{display_order}` | Numeric display order |
40
40
  | `{mcp_available}` | Boolean - MCP connectivity status |
41
+ | `{project_type}` | "core" or "client" |
42
+ | `{seeding_strategy}` | "hasdata" or "provider" |
41
43
 
42
44
  ---
43
45
 
44
46
  ## EXECUTION SEQUENCE (MCP Primary)
45
47
 
48
+ > **Branch:** If `{seeding_strategy}` = "provider", jump to **CLIENT PROJECT HANDLING** section below.
49
+ > The MCP and FALLBACK sections apply only when `{seeding_strategy}` = "hasdata" (core projects).
50
+
46
51
  ### 1. Call MCP scaffold_navigation
47
52
 
48
53
  ```
@@ -106,10 +111,39 @@ If MCP call fails or `{mcp_available}` = false:
106
111
 
107
112
  ---
108
113
 
114
+ ## CLIENT PROJECT HANDLING
115
+
116
+ > **Condition:** `{seeding_strategy}` = "provider"
117
+
118
+ For client projects, navigation is NOT seeded via HasData() in Configuration files.
119
+ It will be seeded at runtime via `IClientSeedDataProvider` generated at step 03b.
120
+
121
+ ### Actions for a client project:
122
+
123
+ 1. **Generate the navigation GUID** (deterministic, same method as core)
124
+ 2. **Create the SeedData file** (same pattern as existing)
125
+ - `Infrastructure/Persistence/Seeding/Data/{Domain}/{Module}NavigationSeedData.cs`
126
+ - Contains static GUIDs and `GetNavigationEntries()`
127
+ 3. **Create the translations file**
128
+ - `Infrastructure/Persistence/Seeding/Data/{Domain}/{Module}NavigationTranslationSeedData.cs`
129
+ 4. **DO NOT search for** `NavigationModuleConfiguration.cs` (does not exist in client projects)
130
+ 5. **DO NOT write** HasData() in Configuration files
131
+ 6. **Store** `{navigation_guid}` for subsequent steps
132
+
133
+ The SeedData files will be consumed by the `IClientSeedDataProvider` generated at step 03b.
134
+
135
+ **After creating SeedData files:** Store `{navigation_guid}` and proceed to step-02-permissions.md.
136
+
137
+ ---
138
+
109
139
  ## FALLBACK PROCEDURE (When MCP Unavailable)
110
140
 
111
141
  > This procedure generates navigation seeds following SmartStack.app patterns.
112
142
  > Reference: `templates-seed.md` for code templates.
143
+ >
144
+ > **Branch by Project Type:**
145
+ > - If `{seeding_strategy}` = "hasdata" (core project): Follow F1-F8 below (existing pattern)
146
+ > - If `{seeding_strategy}` = "provider" (client project): Follow **CLIENT PROJECT HANDLING** above (create SeedData classes only, no HasData)
113
147
 
114
148
  ### F1. Read Existing Configuration Files
115
149