@atlashub/smartstack-cli 3.33.0 → 3.34.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 (55) hide show
  1. package/.documentation/agents.html +5 -1
  2. package/.documentation/apex.html +644 -0
  3. package/.documentation/business-analyse.html +81 -1
  4. package/.documentation/cli-commands.html +5 -1
  5. package/.documentation/commands.html +5 -1
  6. package/.documentation/efcore.html +5 -1
  7. package/.documentation/gitflow.html +5 -1
  8. package/.documentation/hooks.html +5 -1
  9. package/.documentation/index.html +60 -2
  10. package/.documentation/init.html +5 -1
  11. package/.documentation/installation.html +5 -1
  12. package/.documentation/ralph-loop.html +365 -216
  13. package/.documentation/test-web.html +5 -1
  14. package/package.json +1 -1
  15. package/templates/agents/ba-writer.md +142 -15
  16. package/templates/skills/apex/SKILL.md +7 -1
  17. package/templates/skills/apex/_shared.md +49 -4
  18. package/templates/skills/{ralph-loop → apex}/references/core-seed-data.md +20 -11
  19. package/templates/skills/{ralph-loop → apex}/references/error-classification.md +2 -1
  20. package/templates/skills/apex/references/post-checks.md +238 -3
  21. package/templates/skills/apex/references/smartstack-api.md +47 -7
  22. package/templates/skills/apex/references/smartstack-frontend.md +47 -1
  23. package/templates/skills/apex/references/smartstack-layers.md +3 -1
  24. package/templates/skills/apex/steps/step-00-init.md +48 -1
  25. package/templates/skills/apex/steps/step-01-analyze.md +37 -0
  26. package/templates/skills/apex/steps/step-02-plan.md +36 -0
  27. package/templates/skills/apex/steps/step-03-execute.md +42 -2
  28. package/templates/skills/apex/steps/step-04-examine.md +110 -2
  29. package/templates/skills/business-analyse/SKILL.md +29 -19
  30. package/templates/skills/business-analyse/_module-loop.md +68 -9
  31. package/templates/skills/business-analyse/_shared.md +71 -21
  32. package/templates/skills/business-analyse/questionnaire/00-application.md +4 -2
  33. package/templates/skills/business-analyse/questionnaire/00b-project.md +85 -0
  34. package/templates/skills/business-analyse/references/deploy-modes.md +69 -0
  35. package/templates/skills/business-analyse/references/team-orchestration.md +158 -7
  36. package/templates/skills/business-analyse/schemas/application-schema.json +2 -1
  37. package/templates/skills/business-analyse/schemas/project-schema.json +490 -0
  38. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
  39. package/templates/skills/business-analyse/steps/step-00-init.md +30 -4
  40. package/templates/skills/business-analyse/steps/step-01-cadrage.md +62 -2
  41. package/templates/skills/business-analyse/steps/step-01b-applications.md +252 -0
  42. package/templates/skills/business-analyse/steps/step-02-decomposition.md +23 -6
  43. package/templates/skills/business-analyse/steps/step-03d-validate.md +27 -6
  44. package/templates/skills/business-analyse/steps/step-04a-collect.md +111 -0
  45. package/templates/skills/business-analyse/steps/step-05a-handoff.md +296 -103
  46. package/templates/skills/business-analyse/steps/step-05b-deploy.md +46 -14
  47. package/templates/skills/documentation/SKILL.md +92 -2
  48. package/templates/skills/ralph-loop/SKILL.md +9 -17
  49. package/templates/skills/ralph-loop/references/category-rules.md +43 -692
  50. package/templates/skills/ralph-loop/references/compact-loop.md +104 -427
  51. package/templates/skills/ralph-loop/references/team-orchestration.md +13 -14
  52. package/templates/skills/ralph-loop/steps/step-02-execute.md +49 -704
  53. package/templates/skills/ralph-loop/steps/step-03-commit.md +38 -79
  54. package/templates/skills/ralph-loop/steps/step-04-check.md +39 -58
  55. package/templates/skills/ralph-loop/steps/step-05-report.md +12 -123
@@ -88,10 +88,11 @@ Follow the data-driven workflow from [templates.md](templates.md):
88
88
  ```
89
89
  1. Read source data (feature.json, code patterns)
90
90
  2. Generate doc-data.ts (data file, ~50 lines)
91
- 3. Generate index.tsx (page wrapper, ~10 lines)
91
+ 3. Generate index.tsx (page wrapper, ~10 lines) with i18nNamespace prop
92
92
  4. Generate i18n FR file (source language only)
93
93
  5. Update docs-manifest.json
94
94
  6. Update App.tsx routing and parent indexes
95
+ 7. Update DocPanelContext.tsx mapping (contextual doc panel)
95
96
  ```
96
97
 
97
98
  **For UPDATE documentation (type = update):**
@@ -118,16 +119,20 @@ Follow the data-driven workflow from [templates.md](templates.md):
118
119
  4. **ALWAYS** confirm before creating
119
120
  5. **ALWAYS** update App.tsx and parent indexes
120
121
  6. **ALWAYS** add module in `UserIndexPage.tsx` (IF type == `user`)
122
+ 7. **ALWAYS** update `DocPanelContext.tsx` mapping (IF type == `user`)
123
+ 8. **ALWAYS** pass `i18nNamespace` prop to DocRenderer in index.tsx
121
124
  </execution_rules>
122
125
 
123
126
  ---
124
127
 
125
128
  <success_criteria>
126
129
  - Documentation page renders correctly in React app
127
- - i18n files created for all 4 languages (FR, EN, IT, DE)
130
+ - i18n FR file created (EN/IT/DE deferred to translation pipeline)
128
131
  - Route registered in App.tsx
129
132
  - docs-manifest.json updated
130
133
  - Module appears in UserIndexPage (if type = user)
134
+ - DocPanelContext.tsx mapping updated (if type = user)
135
+ - BookOpen edge button opens correct doc for the module's routes
131
136
  </success_criteria>
132
137
 
133
138
  ---
@@ -151,6 +156,87 @@ Follow the data-driven workflow from [templates.md](templates.md):
151
156
 
152
157
  ---
153
158
 
159
+ ## DocPanelContext Integration (TYPE: user)
160
+
161
+ **MANDATORY** for `user` modules: Update the contextual documentation panel mapping.
162
+
163
+ ### How it works
164
+
165
+ When a user clicks the BookOpen icon (edge button) on any application page, the `DocPanelContext` resolves the current route to the matching documentation URL and opens it in an iframe panel.
166
+
167
+ ### File to update
168
+
169
+ `web/smartstack-web/src/contexts/DocPanelContext.tsx`
170
+
171
+ ### What to add
172
+
173
+ For each module, add entries in the `docMapping` object for ALL the module's routes:
174
+
175
+ ```typescript
176
+ const docMapping: Record<string, string> = {
177
+ // Platform > Administration > {Module}
178
+ '{module}': '/docs/business/platform/administration/{module}',
179
+ '{module}/list': '/docs/business/platform/administration/{module}',
180
+ '{module}/create': '/docs/business/platform/administration/{module}',
181
+ '{module}/dashboard': '/docs/business/platform/administration/{module}',
182
+ // ... add ALL sub-routes that exist for the module
183
+ };
184
+ ```
185
+
186
+ ### Key resolution logic
187
+
188
+ The `getDocUrlForPath()` function extracts segments from the pathname:
189
+ - `/platform/administration/users/list` → tries `users/list`, then `users`
190
+ - `/platform/support/tickets/123` → tries `tickets/123`, then `tickets`
191
+
192
+ **Also update `appDocMapping`** if the module is the "default" for its application:
193
+
194
+ ```typescript
195
+ const appDocMapping: Record<string, string> = {
196
+ 'administration': '/docs/business/platform/administration/users', // default for admin
197
+ };
198
+ ```
199
+
200
+ ### index.tsx must pass i18nNamespace
201
+
202
+ Each doc page wrapper MUST pass the correct i18n namespace to DocRenderer:
203
+
204
+ ```tsx
205
+ import { DocRenderer } from '@/components/docs';
206
+ import { docData } from './doc-data';
207
+
208
+ export default function {Module}DocPage() {
209
+ return (
210
+ <DocRenderer
211
+ data={docData}
212
+ backPath="/docs/business/platform"
213
+ backLabel="nav.backToAdministration"
214
+ i18nNamespace="docsAdministration{Module}"
215
+ />
216
+ );
217
+ }
218
+ ```
219
+
220
+ ### i18n namespace naming convention
221
+
222
+ | Module | Namespace | File |
223
+ |--------|-----------|------|
224
+ | users | `docsAdministrationUsers` | `docs-administration-users.json` |
225
+ | permissions | `docsAdministrationPermissions` | `docs-administration-permissions.json` |
226
+ | tenants | `docsAdministrationTenants` | `docs-administration-tenants.json` |
227
+
228
+ The JSON file root key MUST match the namespace: `{ "docsAdministration{Module}": { ... } }`
229
+
230
+ ### i18n config update
231
+
232
+ Add the new namespace to `web/smartstack-web/src/i18n/config.ts`:
233
+ 1. Add to the destructured imports in `loadLanguageResources`
234
+ 2. Add the dynamic import with `.catch(() => ({ default: {} }))`
235
+ 3. Add to the return object
236
+ 4. Add to the `ns` array in `i18n.init()`
237
+
238
+ ---
239
+
154
240
  ## DATA SOURCES
155
241
 
156
242
  | Data | Source |
@@ -168,5 +254,9 @@ Follow the data-driven workflow from [templates.md](templates.md):
168
254
  - **Data Schema:** [data-schema.md](data-schema.md)
169
255
  - **DocRenderer:** `web/smartstack-web/src/components/docs/DocRenderer.tsx`
170
256
  - **Types:** `web/smartstack-web/src/components/docs/types.ts`
257
+ - **DocPanelContext:** `web/smartstack-web/src/contexts/DocPanelContext.tsx`
258
+ - **DocEdgeButton:** `web/smartstack-web/src/components/ui/DocEdgeButton.tsx`
259
+ - **DocPanel:** `web/smartstack-web/src/components/ui/DocPanel.tsx`
260
+ - **i18n Config:** `web/smartstack-web/src/i18n/config.ts`
171
261
  - **Manifest Schema:** `_resources/docs-manifest-schema.md`
172
262
  - **Complete Command:** `.claude/commands/documentation-module.md`
@@ -5,7 +5,9 @@ argument-hint: "[-m N] [-c TEXT] [-v] <task description>"
5
5
  ---
6
6
 
7
7
  <objective>
8
- Execute the Ralph Weegund technique — iterative development where the same prompt is fed repeatedly until completion. Uses progressive step loading with MCP validation, progress persistence, and Agent Teams for multi-module parallelization.
8
+ Execute the Ralph Weegund technique — iterative module orchestration. Ralph reads PRDs from `/business-analyse`, resolves task dependencies, and delegates all code generation to `/apex -d`. Uses progress persistence and Agent Teams for multi-module parallelization.
9
+
10
+ **Key principle:** Ralph ORCHESTRATES (task selection, module sequencing, PRD state, reporting). All code generation is delegated to `/apex`.
9
11
  </objective>
10
12
 
11
13
  <quick_start>
@@ -63,8 +65,7 @@ Execute the Ralph Weegund technique — iterative development where the same pro
63
65
 
64
66
  **Task execution cycle:**
65
67
  ```
66
- LOAD → GENERATE COMPILE TEST [FAIL?] FIXRE-TEST [PASS!] COMMIT → NEXT
67
- ↑___________________________|
68
+ LOAD → DELEGATE TO /apex -dVERIFY PRD STATECOMMIT PRDNEXT MODULE
68
69
  ```
69
70
 
70
71
  </workflow>
@@ -85,14 +86,7 @@ LOAD → GENERATE → COMPILE → TEST → [FAIL?] → FIX → RE-TEST → [PASS
85
86
  1. `mcp__smartstack__validate_conventions` — verify connectivity
86
87
  2. `mcp__context7__resolve-library-id` — verify connectivity
87
88
 
88
- **During work:**
89
- - `validate_conventions` — before commits
90
- - `check_migrations` — before EF Core changes
91
- - `suggest_migration` — migration naming
92
- - `generate_permissions` — RBAC seed data
93
- - `scaffold_api_client` — frontend API client
94
- - `scaffold_routes` — frontend routing
95
- - `scaffold_tests` — test generation
89
+ **During work:** All MCP tool calls are handled by `/apex` during delegation. Ralph only uses `validate_conventions` for initial connectivity check.
96
90
  </mcp_requirements>
97
91
 
98
92
  <execution_guarantee>
@@ -116,7 +110,7 @@ When the user invokes `/ralph-loop`, they are giving you the instruction to:
116
110
  - Ask the user to choose between supervised/autonomous mode
117
111
  - Ask the user to choose a completion promise
118
112
  - Wait for user input between iterations
119
- - Delegate the loop to sub-agents (except team mode)
113
+ - Delegate the loop to sub-agents (except team mode and /apex delegation)
120
114
 
121
115
  **The ONLY valid stop conditions are:**
122
116
  - ALL tasks completed (→ step-05 report)
@@ -137,7 +131,7 @@ When the user invokes `/ralph-loop`, they are giving you the instruction to:
137
131
  |------|------|---------|-------------|
138
132
  | 00 | `steps/step-00-init.md` | Parse args, verify MCP, init state, team setup | ~150 |
139
133
  | 01 | `steps/step-01-task.md` | Load/create tasks from prd.json | ~365 |
140
- | 02 | `steps/step-02-execute.md` | Execute ONE task (first iteration) | ~140 |
134
+ | 02 | `steps/step-02-execute.md` | Delegate module to /apex -d | ~120 |
141
135
  | 03 | `steps/step-03-commit.md` | Commit, update prd.json/progress.txt | ~135 |
142
136
  | 04 | `steps/step-04-check.md` | Check completion, compact loop entry | ~185 |
143
137
  | 05 | `steps/step-05-report.md` | Generate final report | ~150 |
@@ -145,10 +139,8 @@ When the user invokes `/ralph-loop`, they are giving you the instruction to:
145
139
  **Reference files (loaded conditionally):**
146
140
  | File | Loaded when |
147
141
  |------|-------------|
148
- | `references/category-rules.md` | Step-02 and compact loop (execution rules per category) |
149
- | `references/compact-loop.md` | Step-04 section 5 (inline execution after first iteration) |
150
- | `references/core-seed-data.md` | Infrastructure task with seed data keywords |
151
- | `references/error-classification.md` | Build failure in compact loop or validation (error diagnosis) |
142
+ | `references/category-rules.md` | Step-01 and compact loop (category ordering and dependency rules) |
143
+ | `references/compact-loop.md` | Step-04 section 5 (module loop with /apex delegation) |
152
144
  | `references/team-orchestration.md` | Step-00 when multi-module detected (2+ PRDs) |
153
145
  </step_files>
154
146