@atlashub/smartstack-cli 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +365 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/templates/agents/action.md +1 -0
- package/templates/agents/ba-writer.md +33 -0
- package/templates/agents/explore-codebase.md +1 -0
- package/templates/agents/explore-docs.md +1 -0
- package/templates/agents/fix-grammar.md +1 -0
- package/templates/agents/snipper.md +1 -0
- package/templates/skills/admin/SKILL.md +6 -0
- package/templates/skills/ai-prompt/SKILL.md +32 -136
- package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
- package/templates/skills/apex/SKILL.md +120 -0
- package/templates/skills/apex/_shared.md +86 -0
- package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
- package/templates/skills/apex/references/smartstack-layers.md +173 -0
- package/templates/skills/apex/steps/step-00-init.md +156 -0
- package/templates/skills/apex/steps/step-01-analyze.md +169 -0
- package/templates/skills/apex/steps/step-02-plan.md +160 -0
- package/templates/skills/apex/steps/step-03-execute.md +166 -0
- package/templates/skills/apex/steps/step-04-validate.md +138 -0
- package/templates/skills/apex/steps/step-05-examine.md +124 -0
- package/templates/skills/apex/steps/step-06-resolve.md +105 -0
- package/templates/skills/apex/steps/step-07-tests.md +130 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
- package/templates/skills/application/SKILL.md +10 -0
- package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
- package/templates/skills/application/references/backend-entity-seeding.md +72 -0
- package/templates/skills/application/references/backend-verification.md +88 -0
- package/templates/skills/application/references/frontend-verification.md +111 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
- package/templates/skills/application/references/provider-template.md +134 -0
- package/templates/skills/application/references/test-frontend.md +73 -0
- package/templates/skills/application/references/test-prerequisites.md +72 -0
- package/templates/skills/application/steps/step-01-navigation.md +7 -198
- package/templates/skills/application/steps/step-03b-provider.md +4 -128
- package/templates/skills/application/steps/step-04-backend.md +20 -350
- package/templates/skills/application/steps/step-05-frontend.md +12 -101
- package/templates/skills/application/steps/step-07-tests.md +12 -132
- package/templates/skills/business-analyse/SKILL.md +11 -2
- package/templates/skills/business-analyse/html/ba-interactive.html +3214 -2246
- package/templates/skills/business-analyse/html/build-html.js +77 -0
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +130 -0
- package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +22 -0
- package/templates/skills/business-analyse/html/src/scripts/03-render-cadrage.js +208 -0
- package/templates/skills/business-analyse/html/src/scripts/04-render-modules.js +211 -0
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +554 -0
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +110 -0
- package/templates/skills/business-analyse/html/src/scripts/07-render-handoff.js +90 -0
- package/templates/skills/business-analyse/html/src/scripts/08-editing.js +45 -0
- package/templates/skills/business-analyse/html/src/scripts/09-export.js +168 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +171 -0
- package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +161 -0
- package/templates/skills/business-analyse/html/src/styles/01-variables.css +38 -0
- package/templates/skills/business-analyse/html/src/styles/02-layout.css +101 -0
- package/templates/skills/business-analyse/html/src/styles/03-navigation.css +62 -0
- package/templates/skills/business-analyse/html/src/styles/04-cards.css +196 -0
- package/templates/skills/business-analyse/html/src/styles/05-modules.css +325 -0
- package/templates/skills/business-analyse/html/src/styles/06-wireframes.css +230 -0
- package/templates/skills/business-analyse/html/src/styles/07-comments.css +184 -0
- package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +241 -0
- package/templates/skills/business-analyse/html/src/template.html +623 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
- package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
- package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
- package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
- package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
- package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
- package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
- package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +35 -68
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
- package/templates/skills/business-analyse/steps/step-03a-data.md +6 -49
- package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
- package/templates/skills/business-analyse/steps/step-03d-validate.md +3 -48
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +9 -104
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +25 -441
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +19 -187
- package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
- package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
- package/templates/skills/check-version/SKILL.md +7 -0
- package/templates/skills/controller/references/controller-code-templates.md +159 -0
- package/templates/skills/controller/references/permission-sync-templates.md +152 -0
- package/templates/skills/controller/steps/step-03-generate.md +6 -158
- package/templates/skills/controller/steps/step-04-perms.md +5 -144
- package/templates/skills/debug/SKILL.md +7 -0
- package/templates/skills/explore/SKILL.md +6 -0
- package/templates/skills/feature-full/SKILL.md +39 -142
- package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
- package/templates/skills/gitflow/references/init-config-template.md +135 -0
- package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
- package/templates/skills/gitflow/references/plan-template.md +69 -0
- package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
- package/templates/skills/gitflow/references/start-local-config.md +110 -0
- package/templates/skills/gitflow/steps/step-init.md +18 -289
- package/templates/skills/gitflow/steps/step-plan.md +6 -63
- package/templates/skills/gitflow/steps/step-start.md +16 -126
- package/templates/skills/mcp/SKILL.md +9 -213
- package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
- package/templates/skills/mcp/steps/step-02-tools.md +73 -0
- package/templates/skills/notification/SKILL.md +7 -0
- package/templates/skills/quick-search/SKILL.md +5 -0
- package/templates/skills/ralph-loop/SKILL.md +99 -381
- package/templates/skills/ralph-loop/references/category-rules.md +259 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
- package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
- package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
- package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
- package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
- package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
- package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
- package/templates/skills/refactor/SKILL.md +12 -176
- package/templates/skills/refactor/steps/step-01-discover.md +60 -0
- package/templates/skills/refactor/steps/step-02-execute.md +67 -0
- package/templates/skills/review-code/SKILL.md +19 -257
- package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
- package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
- package/templates/skills/review-code/steps/step-03-react.md +44 -0
- package/templates/skills/ui-components/SKILL.md +7 -0
- package/templates/skills/utils/SKILL.md +6 -0
- package/templates/skills/validate/SKILL.md +6 -0
- package/templates/skills/validate-feature/SKILL.md +8 -0
- package/templates/skills/workflow/SKILL.md +40 -118
- package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
|
@@ -47,78 +47,11 @@ From previous steps:
|
|
|
47
47
|
|
|
48
48
|
## PRE-REQUISITES
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Look for existing test project
|
|
56
|
-
ls *Tests*/*.csproj 2>/dev/null || ls tests/*/*.csproj 2>/dev/null
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If NO test project exists, create one:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
dotnet new xunit -n {SolutionName}.Tests -o tests/{SolutionName}.Tests
|
|
63
|
-
dotnet sln add tests/{SolutionName}.Tests/{SolutionName}.Tests.csproj
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 2. Verify Required NuGet Packages
|
|
67
|
-
|
|
68
|
-
The test project MUST have these packages:
|
|
69
|
-
|
|
70
|
-
| Package | Purpose |
|
|
71
|
-
|---------|---------|
|
|
72
|
-
| `xunit` | Test framework |
|
|
73
|
-
| `FluentAssertions` | Assertion library |
|
|
74
|
-
| `Moq` | Mocking framework |
|
|
75
|
-
| `Microsoft.AspNetCore.Mvc.Testing` | Integration test support |
|
|
76
|
-
| `Microsoft.EntityFrameworkCore.Sqlite` | SQLite in-memory for REAL integration tests |
|
|
77
|
-
| `Microsoft.Data.Sqlite` | SQLite connection support |
|
|
78
|
-
| `Microsoft.EntityFrameworkCore.InMemory` | In-memory DB for repository tests |
|
|
79
|
-
| `FluentValidation.TestHelper` | Validator testing support |
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
cd tests/{SolutionName}.Tests
|
|
83
|
-
dotnet add package FluentAssertions
|
|
84
|
-
dotnet add package Moq
|
|
85
|
-
dotnet add package Microsoft.AspNetCore.Mvc.Testing
|
|
86
|
-
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
|
|
87
|
-
dotnet add package Microsoft.Data.Sqlite
|
|
88
|
-
dotnet add package Microsoft.EntityFrameworkCore.InMemory
|
|
89
|
-
dotnet add package FluentValidation.TestHelper
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 3. Add Project References
|
|
93
|
-
|
|
94
|
-
The test project MUST reference the API project (for WebApplicationFactory):
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
cd tests/{SolutionName}.Tests
|
|
98
|
-
dotnet add reference ../../src/{SolutionName}.Api/{SolutionName}.Api.csproj
|
|
99
|
-
dotnet add reference ../../src/{SolutionName}.Application/{SolutionName}.Application.csproj
|
|
100
|
-
dotnet add reference ../../src/{SolutionName}.Domain/{SolutionName}.Domain.csproj
|
|
101
|
-
dotnet add reference ../../src/{SolutionName}.Infrastructure/{SolutionName}.Infrastructure.csproj
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### 4. Ensure Program.cs is Accessible (BLOCKING)
|
|
105
|
-
|
|
106
|
-
The API project's `Program` class must be accessible for `WebApplicationFactory<Program>`.
|
|
107
|
-
|
|
108
|
-
Check if `Program.cs` ends with `public partial class Program { }`. If not, add it:
|
|
109
|
-
|
|
110
|
-
```csharp
|
|
111
|
-
// At the very end of Program.cs
|
|
112
|
-
public partial class Program { }
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Alternatively**, add to the API `.csproj`:
|
|
116
|
-
|
|
117
|
-
```xml
|
|
118
|
-
<ItemGroup>
|
|
119
|
-
<InternalsVisibleTo Include="{SolutionName}.Tests" />
|
|
120
|
-
</ItemGroup>
|
|
121
|
-
```
|
|
50
|
+
See [references/test-prerequisites.md](../references/test-prerequisites.md) for the complete setup:
|
|
51
|
+
1. Verify test project exists (create xunit project if missing)
|
|
52
|
+
2. Install required NuGet packages (xunit, FluentAssertions, Moq, Mvc.Testing, EF Sqlite, etc.)
|
|
53
|
+
3. Add project references (API, Application, Domain, Infrastructure)
|
|
54
|
+
4. Ensure Program.cs is accessible for WebApplicationFactory (BLOCKING)
|
|
122
55
|
|
|
123
56
|
---
|
|
124
57
|
|
|
@@ -343,62 +276,13 @@ dotnet test tests/{SolutionName}.Tests/{SolutionName}.Tests.csproj --no-build --
|
|
|
343
276
|
|
|
344
277
|
## FRONTEND TESTS (React Components)
|
|
345
278
|
|
|
346
|
-
|
|
279
|
+
See [references/test-frontend.md](../references/test-frontend.md) for the complete frontend test setup:
|
|
347
280
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
If NOT found, deploy the test infrastructure:
|
|
356
|
-
|
|
357
|
-
1. **Install packages:**
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
cd {WebProjectPath}
|
|
361
|
-
npm install -D vitest @testing-library/react @testing-library/jest-dom @testing-library/user-event jsdom msw
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
2. **Copy infrastructure files** from SmartStack templates:
|
|
365
|
-
|
|
366
|
-
| Template Source | Destination |
|
|
367
|
-
|----------------|-------------|
|
|
368
|
-
| `templates/project/test-frontend/vitest.config.ts` | `{WebProjectPath}/vitest.config.ts` |
|
|
369
|
-
| `templates/project/test-frontend/setup.ts` | `{WebProjectPath}/src/test/setup.ts` |
|
|
370
|
-
| `templates/project/test-frontend/test-utils.tsx` | `{WebProjectPath}/src/test/test-utils.tsx` |
|
|
371
|
-
| `templates/project/test-frontend/msw/server.ts` | `{WebProjectPath}/src/test/msw/server.ts` |
|
|
372
|
-
| `templates/project/test-frontend/msw/handlers.ts` | `{WebProjectPath}/src/test/msw/handlers.ts` |
|
|
373
|
-
|
|
374
|
-
3. **Add test script** to `package.json` (if missing):
|
|
375
|
-
|
|
376
|
-
```json
|
|
377
|
-
{
|
|
378
|
-
"scripts": {
|
|
379
|
-
"test": "vitest run",
|
|
380
|
-
"test:watch": "vitest",
|
|
381
|
-
"test:coverage": "vitest run --coverage"
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### 8. Generate Frontend Tests
|
|
387
|
-
|
|
388
|
-
```
|
|
389
|
-
Tool: mcp__smartstack__scaffold_frontend_tests
|
|
390
|
-
Args:
|
|
391
|
-
name: "{entity_name}"
|
|
392
|
-
components: ["all"]
|
|
393
|
-
apiRoute: "/api/{entity_code}"
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
This generates:
|
|
397
|
-
- `src/pages/{context}/{application}/__tests__/{EntityName}Page.test.tsx` - Page rendering, loading, error states
|
|
398
|
-
- `src/pages/{context}/{application}/__tests__/{EntityName}ListView.test.tsx` - List display, pagination, view toggle
|
|
399
|
-
- `src/pages/{context}/{application}/__tests__/{EntityName}DetailPage.test.tsx` - Detail view, tabs, back navigation
|
|
400
|
-
- `src/hooks/__tests__/use{EntityName}Preferences.test.ts` - Preference get/set
|
|
401
|
-
- `src/services/api/__tests__/{entityName}Api.test.ts` - API client calls with MSW
|
|
281
|
+
### 7-8. Infrastructure & Test Generation
|
|
282
|
+
- Check Vitest + Testing Library + MSW configuration
|
|
283
|
+
- Install packages if missing (`vitest`, `@testing-library/react`, `msw`, etc.)
|
|
284
|
+
- Copy infrastructure templates (vitest.config.ts, setup.ts, test-utils.tsx, MSW handlers)
|
|
285
|
+
- Generate tests via `mcp__smartstack__scaffold_frontend_tests` (Page, ListView, DetailPage, Hooks, API)
|
|
402
286
|
|
|
403
287
|
### 9. Run Frontend Tests (BLOCKING)
|
|
404
288
|
|
|
@@ -407,11 +291,7 @@ cd {WebProjectPath}
|
|
|
407
291
|
npx vitest run --reporter=default
|
|
408
292
|
```
|
|
409
293
|
|
|
410
|
-
**ALL frontend tests MUST pass.**
|
|
411
|
-
1. Read the failure output carefully
|
|
412
|
-
2. Fix the failing tests or the components they test
|
|
413
|
-
3. Re-run until all tests pass
|
|
414
|
-
4. Do NOT proceed to the next step until all tests are green
|
|
294
|
+
**ALL frontend tests MUST pass.** Fix failures before proceeding.
|
|
415
295
|
|
|
416
296
|
---
|
|
417
297
|
|
|
@@ -35,12 +35,16 @@ The skill auto-detects which use case applies by scanning existing features in `
|
|
|
35
35
|
|
|
36
36
|
<parameters>
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
| Flag | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| (aucun) | Mode standard — analyse complete ou mise a jour |
|
|
41
|
+
| `-review` | Mode review — lit `ba-review.json`, cree une nouvelle version avec les corrections appliquees |
|
|
39
42
|
|
|
40
|
-
Step-00 handles
|
|
43
|
+
Step-00 handles detection automatically:
|
|
41
44
|
- **New vs Update**: scans `docs/business/` for existing applications
|
|
42
45
|
- **Single vs Multi-module**: determined during step-02 decomposition
|
|
43
46
|
- **Language**: detected from config or asked once
|
|
47
|
+
- **Review mode**: if `-review` flag, routes directly to step-06
|
|
44
48
|
|
|
45
49
|
</parameters>
|
|
46
50
|
|
|
@@ -108,6 +112,10 @@ When step-00 detects that the description matches an existing application:
|
|
|
108
112
|
- **Step 00:** Detection, locate existing feature, create version N+1
|
|
109
113
|
- **Step 01:** Cadrage delta: what changes, impact on existing
|
|
110
114
|
- **Step 02-05:** Same flow as new, with existing context loaded
|
|
115
|
+
|
|
116
|
+
**Review workflow (`-review` flag):**
|
|
117
|
+
- **Step 00:** Detection, scan for latest application, locate `ba-review.json`
|
|
118
|
+
- **Step 06:** Apply corrections, create new version, reverse-map data, regenerate all artifacts
|
|
111
119
|
</workflow>
|
|
112
120
|
|
|
113
121
|
<state_variables>
|
|
@@ -149,6 +157,7 @@ When step-00 detects that the description matches an existing application:
|
|
|
149
157
|
| 04 | `steps/step-04-consolidation.md` | Opus | Cross-module validation, E2E flows, permissions coherence |
|
|
150
158
|
| 05a | `steps/step-05a-handoff.md` | Sonnet | Handoff: file mapping (7 categories), BR-to-code mapping, API summary, write handoff |
|
|
151
159
|
| 05b | `steps/step-05b-deploy.md` | Sonnet | Deploy: prd.json, progress.txt, manifest, ba-interactive.html, auto-launch ralph-loop |
|
|
160
|
+
| 06 | `steps/step-06-review.md` | Opus | Apply review corrections, create new version, regenerate all artifacts |
|
|
152
161
|
|
|
153
162
|
</step_files>
|
|
154
163
|
|