@atlashub/smartstack-cli 4.18.0 → 4.19.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/package.json +1 -1
- package/templates/agents/ba-reader.md +86 -80
- package/templates/agents/ba-writer.md +318 -415
- package/templates/agents/docs-context-reader.md +3 -3
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +126 -0
- package/templates/skills/apex/SKILL.md +29 -16
- package/templates/skills/apex/_shared.md +62 -9
- package/templates/skills/apex/references/analysis-methods.md +8 -6
- package/templates/skills/apex/references/challenge-questions.md +5 -5
- package/templates/skills/apex/references/core-seed-data.md +68 -45
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +26 -21
- package/templates/skills/apex/references/parallel-execution.md +156 -0
- package/templates/skills/apex/references/person-extension-pattern.md +12 -12
- package/templates/skills/apex/references/post-checks.md +1748 -1726
- package/templates/skills/apex/references/smartstack-api.md +63 -57
- package/templates/skills/apex/references/smartstack-frontend-compliance.md +594 -0
- package/templates/skills/apex/references/smartstack-frontend.md +1246 -1842
- package/templates/skills/apex/references/smartstack-layers.md +98 -145
- package/templates/skills/apex/steps/step-00-init.md +30 -6
- package/templates/skills/apex/steps/step-01-analyze.md +27 -23
- package/templates/skills/apex/steps/step-02-plan.md +12 -12
- package/templates/skills/apex/steps/step-03-execute.md +198 -143
- package/templates/skills/apex/steps/step-04-examine.md +24 -93
- package/templates/skills/apex/steps/step-05-deep-review.md +16 -16
- package/templates/skills/apex/steps/step-06-resolve.md +9 -9
- package/templates/skills/apex/steps/step-07-tests.md +3 -1
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -1
- package/templates/skills/business-analyse/SKILL.md +182 -301
- package/templates/skills/business-analyse/_shared.md +119 -336
- package/templates/skills/business-analyse/html/ba-interactive.html +703 -82
- package/templates/skills/business-analyse/html/build-html.js +41 -3
- package/templates/skills/business-analyse/html/src/partials/cadrage-context.html +34 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-risks.html +48 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-scope.html +49 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-stakeholders.html +55 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-success.html +34 -0
- package/templates/skills/business-analyse/html/src/partials/consol-datamodel.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/consol-flows.html +29 -0
- package/templates/skills/business-analyse/html/src/partials/consol-interactions.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/consol-permissions.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/decomp-dependencies.html +38 -0
- package/templates/skills/business-analyse/html/src/partials/decomp-modules.html +51 -0
- package/templates/skills/business-analyse/html/src/partials/handoff-summary.html +24 -0
- package/templates/skills/business-analyse/html/src/partials/module-spec-container.html +4 -0
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +17 -1
- package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +31 -5
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +100 -63
- package/templates/skills/business-analyse/html/src/scripts/06-render-mockups.js +372 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +41 -13
- package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +142 -0
- package/templates/skills/business-analyse/questionnaire/03-data-ui.md +94 -0
- package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +150 -0
- package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
- package/templates/skills/business-analyse/questionnaire.md +23 -280
- package/templates/skills/business-analyse/react/application-viewer.md +2 -2
- package/templates/skills/business-analyse/react/components.md +4 -4
- package/templates/skills/business-analyse/react/i18n-template.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +14 -14
- package/templates/skills/business-analyse/references/acceptance-criteria.md +21 -21
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +3 -3
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +5 -5
- package/templates/skills/business-analyse/references/deploy-data-build.md +12 -11
- package/templates/skills/business-analyse/references/deploy-modes.md +10 -10
- package/templates/skills/business-analyse/references/detection-strategies.md +6 -6
- package/templates/skills/business-analyse/references/html-data-mapping.md +15 -15
- package/templates/skills/business-analyse/references/naming-conventions.md +4 -4
- package/templates/skills/business-analyse/references/review-data-mapping.md +29 -29
- package/templates/skills/business-analyse/references/robustness-checks.md +36 -36
- package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +1 -1
- package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
- package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +8 -8
- package/templates/skills/business-analyse/schemas/feature-schema.json +3 -3
- package/templates/skills/business-analyse/schemas/index-schema.json +47 -0
- package/templates/skills/business-analyse/schemas/project-schema.json +6 -6
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +5 -3
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +4 -4
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/shared/common-defs.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +68 -77
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +54 -180
- package/templates/skills/business-analyse/steps/step-02-structure.md +175 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +198 -0
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +478 -0
- package/templates/skills/business-analyse/steps/step-05-deploy.md +220 -0
- package/templates/skills/business-analyse/steps/step-06-review.md +51 -69
- package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-handoff.md +20 -17
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +2 -2
- package/templates/skills/business-analyse/templates-react.md +2 -2
- package/templates/skills/derive-prd/SKILL.md +92 -0
- package/templates/skills/derive-prd/references/acceptance-criteria.md +169 -0
- package/templates/skills/derive-prd/references/entity-domain-mapping.md +115 -0
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-file-templates.md +131 -120
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-mappings.md +95 -95
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-seeddata-generation.md +312 -312
- package/templates/skills/{business-analyse → derive-prd}/references/prd-generation.md +262 -263
- package/templates/skills/derive-prd/references/readiness-scoring.md +104 -0
- package/templates/skills/derive-prd/schemas/handoff-schema.json +95 -0
- package/templates/skills/derive-prd/steps/step-00-validate.md +130 -0
- package/templates/skills/derive-prd/steps/step-01-transform.md +206 -0
- package/templates/skills/derive-prd/steps/step-02-export.md +181 -0
- package/templates/skills/{business-analyse → derive-prd}/templates/tpl-progress.md +172 -172
- package/templates/skills/ralph-loop/SKILL.md +2 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
- package/templates/skills/ralph-loop/steps/step-01-task.md +2 -2
- package/templates/skills/apex/references/agent-teams-protocol.md +0 -203
- package/templates/skills/business-analyse/_architecture.md +0 -124
- package/templates/skills/business-analyse/_elicitation.md +0 -206
- package/templates/skills/business-analyse/_module-loop.md +0 -115
- package/templates/skills/business-analyse/_rules.md +0 -142
- package/templates/skills/business-analyse/_suggestions.md +0 -34
- package/templates/skills/business-analyse/questionnaire/00-application.md +0 -160
- package/templates/skills/business-analyse/questionnaire/00b-project.md +0 -85
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +0 -189
- package/templates/skills/business-analyse/questionnaire/03-scope.md +0 -164
- package/templates/skills/business-analyse/questionnaire/04-data.md +0 -88
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +0 -58
- package/templates/skills/business-analyse/questionnaire/06-security.md +0 -68
- package/templates/skills/business-analyse/questionnaire/07-ui.md +0 -76
- package/templates/skills/business-analyse/questionnaire/08-performance.md +0 -42
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -45
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -58
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +0 -59
- package/templates/skills/business-analyse/questionnaire/12-migration.md +0 -58
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +0 -69
- package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +0 -135
- package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +0 -136
- package/templates/skills/business-analyse/references/agent-module-prompt.md +0 -366
- package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +0 -557
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +0 -566
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +0 -41
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +0 -74
- package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +0 -115
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +0 -68
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +0 -85
- package/templates/skills/business-analyse/references/team-orchestration.md +0 -1093
- package/templates/skills/business-analyse/references/validate-incremental-html.md +0 -121
- package/templates/skills/business-analyse/steps/step-01b-applications.md +0 -419
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +0 -387
- package/templates/skills/business-analyse/steps/step-03a-data.md +0 -16
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +0 -486
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -300
- package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -405
- package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -516
- package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -691
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +0 -17
- package/templates/skills/business-analyse/steps/step-04a-collect.md +0 -415
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +0 -163
- package/templates/skills/business-analyse/steps/step-04c-decide.md +0 -186
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +0 -937
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -522
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +0 -703
|
@@ -1,327 +1,208 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: business-analyse
|
|
3
|
-
description: Iterative multi-module business analysis with progressive context loading, JSON-first architecture, and interactive HTML deliverables.
|
|
4
|
-
|
|
3
|
+
description: "Iterative multi-module business analysis with progressive context loading, JSON-first architecture, and interactive HTML deliverables."
|
|
4
|
+
model: opus
|
|
5
|
+
user_invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
Execute business analysis workflows. This skill produces feature.json files progressively enriched at each step, published to docs/ for web app rendering.
|
|
8
|
+
# /business-analyse — v2
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
1. **New application** — full analysis workflow for a new business need (single or multi-application)
|
|
12
|
-
2. **Update** — delta changes on an existing application or module
|
|
13
|
-
3. **Multi-application project** — when a project spans multiple independent applications (e.g., HR Management + Employee Self-Service)
|
|
10
|
+
## Architecture
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
**2 phases, 7 steps** — "Macro vers Specification"
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
- Conditional context loading: each step loads only the shared files it needs (~54% context reduction)
|
|
19
|
-
- 12 granular steps (1-2 responsibilities each, 200-500 lines) for maximum LLM attention quality
|
|
20
|
-
- Self-verification at every step transition, POST-CHECKs on critical outputs
|
|
21
|
-
- Templates and references extracted to separate files, loaded on demand
|
|
22
|
-
</objective>
|
|
14
|
+
### Phase 1 — Macro (Identification + Challenge)
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
| Step | File | Model | Role |
|
|
17
|
+
|------|------|-------|------|
|
|
18
|
+
| 00 | `step-00-init.md` | Sonnet | Detection new/update, scan existing, create index.json structure |
|
|
19
|
+
| 01 | `step-01-cadrage.md` | Opus | Context, stakeholders, scope, risks. ~40 core questions |
|
|
20
|
+
| 02 | `step-02-structure.md` | Opus | Identify App > Module > Section > Resource hierarchy, CHALLENGE each element |
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
# New application analysis
|
|
28
|
-
/business-analyse Complete sales management system
|
|
22
|
+
### Phase 2 — Specification (Deep dive + Client enrichment)
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
| Step | File | Model | Role |
|
|
25
|
+
|------|------|-------|------|
|
|
26
|
+
| 03 | `step-03-specify.md` | Opus | Deep dive per module: entities, BRs, UCs, permissions, screens. Sequential internal loop |
|
|
27
|
+
| 04 | `step-04-consolidate.md` | Opus | Cross-module validation: data model, permission coherence, E2E flows |
|
|
28
|
+
| 05 | `step-05-deploy.md` | Sonnet | Deploy interactive HTML document |
|
|
29
|
+
| 06 | `step-06-review.md` | Opus | Apply client corrections from ba-review.json exported from HTML |
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
### IA + Client Loop
|
|
32
|
+
```
|
|
33
|
+
Phase 1 (steps 00-02) → Phase 2 (steps 03-05) → Client reviews HTML
|
|
34
|
+
↓
|
|
35
|
+
Client comments/enriches
|
|
36
|
+
↓
|
|
37
|
+
Export ba-review.json
|
|
38
|
+
↓
|
|
39
|
+
Step 06 → re-deploy HTML
|
|
40
|
+
↓
|
|
41
|
+
/derive-prd → /ralph-loop
|
|
42
|
+
```
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
> **PRD generation:** Handoff data and PRD files are generated by the `/derive-prd` skill, not by step-05.
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|------|-------------|
|
|
41
|
-
| (aucun) | Mode standard — analyse complete ou mise a jour |
|
|
42
|
-
| `-review` | Mode review — lit `ba-review.json`, cree une nouvelle version avec les corrections appliquees |
|
|
46
|
+
## JSON Architecture — Granular files + Index
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
- **New vs Update**: scans `docs/` for existing applications
|
|
46
|
-
- **Single vs Multi-app**: multi-app detection in step-01, application identity confirmed in step-01b (always)
|
|
47
|
-
- **Single vs Multi-module**: determined during step-02 decomposition
|
|
48
|
-
- **Language**: detected from config or asked once
|
|
49
|
-
- **Review mode**: if `-review` flag, routes directly to step-06
|
|
48
|
+
Each module is split into thematic JSON files with an `index.json` that references them:
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
```
|
|
51
|
+
docs/{app}/{module}/business-analyse/v1.0/
|
|
52
|
+
index.json ← Index with metadata + file references
|
|
53
|
+
cadrage.json ← Context, stakeholders, scope, risks (if app-level)
|
|
54
|
+
entities.json ← Entities, attributes, relations
|
|
55
|
+
rules.json ← Business rules (BRs)
|
|
56
|
+
usecases.json ← Use cases (UCs)
|
|
57
|
+
permissions.json ← Permissions, roles, access matrix
|
|
58
|
+
screens.json ← Interface specs (sections, resources, mockups)
|
|
59
|
+
validation.json ← Validation results, checks
|
|
60
|
+
handoff.json ← File mapping, APIs, handoff data
|
|
61
|
+
```
|
|
52
62
|
|
|
53
|
-
|
|
54
|
-
**All outputs saved to PROJECT directory:**
|
|
63
|
+
### File hierarchy
|
|
55
64
|
|
|
56
65
|
```
|
|
57
66
|
docs/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
business-analyse/v1.0/
|
|
68
|
+
index.json ← Project index (multi-app)
|
|
69
|
+
cadrage.json ← Project-level framing
|
|
70
|
+
{app}/
|
|
71
|
+
business-analyse/v1.0/
|
|
72
|
+
index.json ← Application index
|
|
73
|
+
cadrage.json ← Application framing
|
|
74
|
+
{module}/
|
|
75
|
+
business-analyse/v1.0/
|
|
76
|
+
index.json ← Module index
|
|
77
|
+
entities.json, rules.json, usecases.json, ...
|
|
78
|
+
ba-interactive.html ← Single unified HTML
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Partial loading
|
|
82
|
+
|
|
83
|
+
Each step loads only the files it needs via `index.json`:
|
|
84
|
+
- Step 03 (specify): loads `index.json` + `entities.json` for current module only
|
|
85
|
+
- Step 04 (consolidate): loads all `index.json` files for summary counts
|
|
86
|
+
- Step 05 (deploy): assembles all files into unified FEATURE_DATA for HTML
|
|
87
|
+
|
|
88
|
+
## Workflow Modes
|
|
89
|
+
|
|
90
|
+
| Mode | Condition | Behavior |
|
|
91
|
+
|------|-----------|----------|
|
|
92
|
+
| `new` | No existing index.json | Full analysis from step 00 |
|
|
93
|
+
| `update` | Existing index.json found | Delta analysis, skip completed sections |
|
|
94
|
+
| `review` | ba-review.json provided | Apply corrections (step 06 only) |
|
|
95
|
+
|
|
96
|
+
## Context Loading Rules
|
|
97
|
+
|
|
98
|
+
Each step loads ONLY what it needs:
|
|
99
|
+
|
|
100
|
+
| Step | Always loaded | Conditionally loaded |
|
|
101
|
+
|------|---------------|---------------------|
|
|
102
|
+
| 00 | `_shared.md` | — |
|
|
103
|
+
| 01 | `_shared.md`, `step-01-cadrage.md` | questionnaires |
|
|
104
|
+
| 02 | `_shared.md`, `step-02-structure.md` | cadrage.json from step 01 |
|
|
105
|
+
| 03 | `_shared.md`, `step-03-specify.md` | current module's index.json + relevant files |
|
|
106
|
+
| 04 | `_shared.md`, `step-04-consolidate.md` | all module index.json files |
|
|
107
|
+
| 05 | `_shared.md`, `step-05-deploy.md` | all JSON files for HTML assembly |
|
|
108
|
+
| 06 | `_shared.md`, `step-06-review.md` | ba-review.json + current feature files |
|
|
109
|
+
|
|
110
|
+
## Agents
|
|
111
|
+
|
|
112
|
+
| Agent | Role | Operations |
|
|
113
|
+
|-------|------|------------|
|
|
114
|
+
| `ba-writer` | Write granular JSON files | create, enrichSection, updateIndex, createVersion, applyReview |
|
|
115
|
+
| `ba-reader` | Read via index.json | findFeature, readSection, getModuleStatus, getSummaryForSkill |
|
|
116
|
+
|
|
117
|
+
## HTML Output
|
|
118
|
+
|
|
119
|
+
**Single unified HTML** document (`ba-interactive.html`) with:
|
|
120
|
+
- Multi-app navigation (4 levels: App > Module > Section > Resource)
|
|
121
|
+
- Inline editing (UC, BR, entities, sections/resources)
|
|
122
|
+
- HTML mockups from `screens[]` specs (SmartTable, SmartForm, SmartCard, SmartKanban, SmartDashboard)
|
|
123
|
+
- Wireframe fallback from EMBEDDED_ARTIFACTS
|
|
124
|
+
- Comment system with review panel
|
|
125
|
+
- Export: ba-review.json for step 06 loop
|
|
126
|
+
|
|
127
|
+
### FEATURE_DATA structure
|
|
128
|
+
|
|
129
|
+
```javascript
|
|
130
|
+
{
|
|
131
|
+
metadata: { projectName, version, ... },
|
|
132
|
+
applications: [{ code, name, icon, route, modules: [...] }],
|
|
133
|
+
cadrage: { context, scope, stakeholders, risks, criteria },
|
|
134
|
+
modules: [{ code, applicationCode, name, ... }],
|
|
135
|
+
moduleSpecs: { [code]: { useCases, businessRules, entities, permissions, screens, sections, resources } },
|
|
136
|
+
consolidation: { interactions, e2eFlows },
|
|
137
|
+
comments: []
|
|
138
|
+
}
|
|
67
139
|
```
|
|
68
|
-
> In standalone mode (single app), the project-level file is NOT created.
|
|
69
140
|
|
|
70
|
-
|
|
141
|
+
## Step Execution
|
|
142
|
+
|
|
71
143
|
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
144
|
+
STEP 00 (init)
|
|
145
|
+
→ Load: _shared.md
|
|
146
|
+
→ Execute: step-00-init.md
|
|
147
|
+
→ Output: index.json structure, workflow mode detected
|
|
148
|
+
|
|
149
|
+
STEP 01 (cadrage)
|
|
150
|
+
→ Load: _shared.md, step-01-cadrage.md, questionnaires
|
|
151
|
+
→ Execute: Interactive Q&A with client (~40 questions)
|
|
152
|
+
→ Output: cadrage.json (context, stakeholders, scope, risks, criteria)
|
|
153
|
+
|
|
154
|
+
STEP 02 (structure)
|
|
155
|
+
→ Load: _shared.md, step-02-structure.md, cadrage.json
|
|
156
|
+
→ Execute: Identify App > Module > Section > Resource hierarchy
|
|
157
|
+
→ Challenge: Question each element's necessity
|
|
158
|
+
→ Output: modules[], applications[], anticipatedSections per module
|
|
159
|
+
|
|
160
|
+
STEP 03 (specify) — SEQUENTIAL MODULE LOOP
|
|
161
|
+
→ For each module (in dependency order):
|
|
162
|
+
→ Load: _shared.md, step-03-specify.md, module index.json
|
|
163
|
+
→ Execute: entities, BRs, UCs, permissions, screens
|
|
164
|
+
→ Output: entities.json, rules.json, usecases.json, permissions.json, screens.json
|
|
165
|
+
→ No team mode — sequential ensures 100% context per module
|
|
166
|
+
|
|
167
|
+
STEP 04 (consolidate)
|
|
168
|
+
→ Load: _shared.md, step-04-consolidate.md, all index.json
|
|
169
|
+
→ Execute: Data model validation, permission coherence, E2E flows
|
|
170
|
+
→ Output: validation.json, consolidated data
|
|
171
|
+
|
|
172
|
+
STEP 05 (deploy)
|
|
173
|
+
→ Load: _shared.md, step-05-deploy.md, all JSON files
|
|
174
|
+
→ Execute: Assemble FEATURE_DATA, generate HTML
|
|
175
|
+
→ Output: ba-interactive.html (single file)
|
|
176
|
+
|
|
177
|
+
STEP 06 (review) — CLIENT LOOP ENTRY
|
|
178
|
+
→ Load: _shared.md, step-06-review.md, ba-review.json
|
|
179
|
+
→ Execute: Apply corrections, create new version
|
|
180
|
+
→ Output: Updated JSON files, regenerated HTML
|
|
75
181
|
```
|
|
76
182
|
|
|
77
|
-
|
|
78
|
-
- Application view: `/docs/{app}` (module overview, dependency graph, roles)
|
|
79
|
-
- Module view: `/docs/{app}/{module}` (full specification, mockups)
|
|
80
|
-
|
|
81
|
-
**No intermediate markdown files - all state in feature.json**
|
|
82
|
-
</output_structure>
|
|
83
|
-
|
|
84
|
-
<navigation_hierarchy>
|
|
85
|
-
**SmartStack uses a 4-level navigation structure mapped to database tables:**
|
|
86
|
-
|
|
87
|
-
| Level | Entity | Table DB | Created in Step | Description |
|
|
88
|
-
|-------|--------|----------|-----------------|-------------|
|
|
89
|
-
| 1 | Application | `core.nav_Applications` | 00-01 | Top-level application (e.g., "HumanResources") |
|
|
90
|
-
| 2 | Module | `core.nav_Modules` | 02 | Functional module (e.g., "Employees", "TimeManagement") |
|
|
91
|
-
| 3 | **Section** | **`core.nav_Sections`** | **03a-03c** | **Page within module (e.g., "list", "detail", "dashboard")** |
|
|
92
|
-
| 4 | **Resource** | **`core.nav_Resources`** | **03b-03c** | **React component (SmartTable, SmartForm, Chart, KpiCard, etc.)** |
|
|
93
|
-
|
|
94
|
-
**Hierarchical relationship:**
|
|
95
|
-
- Application → Module → **Section** → **Resource**
|
|
96
|
-
- Each Section MUST have ≥1 Resource
|
|
97
|
-
- Each Section corresponds to 1 React page route
|
|
98
|
-
- Each Resource corresponds to 1 SmartStack UI component
|
|
99
|
-
|
|
100
|
-
**SeedData generation (step-03c):**
|
|
101
|
-
|
|
102
|
-
The `specification.seedDataCore` contains **9 mandatory arrays** for database seeding:
|
|
103
|
-
|
|
104
|
-
| Array | Table | Source | Description |
|
|
105
|
-
|-------|-------|--------|-------------|
|
|
106
|
-
| `navigationApplications` | `core.nav_Applications` | Manual (step-03c) | Application entry (Level 1) — created ONCE per application |
|
|
107
|
-
| `applicationRoles` | `core.auth_Roles` | Manual (step-03c) | Application-scoped roles (admin, manager, contributor, viewer) |
|
|
108
|
-
| `navigationModules` | `core.nav_Modules` | Manual (step-03c) | Module entry (Level 2) |
|
|
109
|
-
| **`navigationSections`** | **`core.nav_Sections`** | **Derived from `specification.sections[]`** | **Section entries (Level 3)** |
|
|
110
|
-
| **`navigationResources`** | **`core.nav_Resources`** | **Derived from `specification.sections[].resources[]`** | **Resource entries (Level 4)** |
|
|
111
|
-
| `navigationTranslations` | `core.nav_Translations` | Manual (i18n) | Multi-language labels |
|
|
112
|
-
| `permissions` | `core.Permissions` | Manual (step-03c) | Permission definitions ({path, action, description}) |
|
|
113
|
-
| `rolePermissions` | `core.RolePermissions` | Manual (step-03c) | Role-permission mappings |
|
|
114
|
-
| `permissionConstants` | `PermissionConstants.cs` | Manual (step-03c) | C# permission constants |
|
|
115
|
-
|
|
116
|
-
**Transform algorithm (step-03c section 8f-bis):**
|
|
117
|
-
- `navigationSections` = transform `specification.sections[]` → flatten to { code, label, icon, route, parentCode, permission, sort }
|
|
118
|
-
- `navigationResources` = transform `specification.sections[].resources[]` → flatten to { code, type, entity, parentCode, permission }
|
|
119
|
-
|
|
120
|
-
**Example:**
|
|
121
|
-
- Module: `Employees` (Level 2)
|
|
122
|
-
- Section: `list` (Level 3) → contains resources:
|
|
123
|
-
- Resource: `employees-grid` (SmartTable) (Level 4)
|
|
124
|
-
- Resource: `status-filter` (FilterBar) (Level 4)
|
|
125
|
-
- Section: `detail` (Level 3) → contains resources:
|
|
126
|
-
- Resource: `employee-card` (DetailCard) (Level 4)
|
|
127
|
-
- Resource: `contract-history` (SmartTable) (Level 4)
|
|
128
|
-
|
|
129
|
-
</navigation_hierarchy>
|
|
130
|
-
|
|
131
|
-
<resume_workflow>
|
|
132
|
-
**Update mode (auto-detected):**
|
|
133
|
-
|
|
134
|
-
When step-00 detects that the description matches an existing application:
|
|
135
|
-
|
|
136
|
-
1. Propose to user: "New application" or "Update {appName}"
|
|
137
|
-
2. If update: locate existing feature.json, create new version (v1.1, etc.)
|
|
138
|
-
3. Load existing feature context
|
|
139
|
-
4. Continue through steps 01-05 with delta focus
|
|
140
|
-
</resume_workflow>
|
|
141
|
-
|
|
142
|
-
<workflow>
|
|
143
|
-
**Step-00 routing (auto-detection):**
|
|
144
|
-
|
|
145
|
-
1. Read `{feature_description}`
|
|
146
|
-
2. Scan `docs/` for existing applications
|
|
147
|
-
3. If match found → ask user: "New application" or "Update {app}" ?
|
|
148
|
-
4. If no match → new application
|
|
149
|
-
5. Create master feature.json and proceed to step-01
|
|
150
|
-
|
|
151
|
-
**New application workflow (single or multi-app):**
|
|
152
|
-
- **Step 00:** Detection, scan existing, create master feature.json (draft)
|
|
153
|
-
- **Step 01:** Cadrage: context, stakeholders, scope, application roles (framed)
|
|
154
|
-
- **Step 01b:** Application identity (always): confirm code, route, icon, seed data (lightweight single-app / full decomposition multi-app)
|
|
155
|
-
- **Step 02:** Decomposition: modules, dependencies, client checkpoint (decomposed) — per application in multi-app mode
|
|
156
|
-
- **Step 03a:** Per-module data: sections, entities, business rules, questionnaires
|
|
157
|
-
- **Step 03b:** Per-module UI: state machines, wireframes, layouts, dashboards
|
|
158
|
-
- **Step 03c:** Per-module compile: actors, UCs, FRs, permissions, navigation, seed data, i18n
|
|
159
|
-
- **Step 03d:** Per-module validate: completeness checks, write feature.json, incremental HTML, loop
|
|
160
|
-
- Loop: 03a → 03b → 03c → 03d → 03a (next module) until all specified (specified)
|
|
161
|
-
- **Step 04a:** Collect: module summaries, cross-module interactions (FK, events, shared data)
|
|
162
|
-
- **Step 04b:** Analyze: permission coherence, semantic validation, E2E flows, global risks
|
|
163
|
-
- **Step 04c:** Decide: final approval, write consolidation section, proceed to handoff (consolidated)
|
|
164
|
-
- **Step 05a:** Handoff: file mapping (7 categories), BR-to-code mapping, API summary, write to feature.json
|
|
165
|
-
- **Step 05b:** Deploy: prd.json, progress.txt, manifest, ba-interactive.html pre-populated (handed-off)
|
|
166
|
-
- **Step 05c:** Ralph Readiness Check: validation gate before /ralph-loop (optional but recommended)
|
|
167
|
-
|
|
168
|
-
**Update workflow (same phases, delta focus):**
|
|
169
|
-
- **Step 00:** Detection, locate existing feature, create version N+1
|
|
170
|
-
- **Step 01:** Cadrage delta: what changes, impact on existing
|
|
171
|
-
- **Step 02-05:** Same flow as new, with existing context loaded
|
|
172
|
-
|
|
173
|
-
**Review workflow (`-review` flag):**
|
|
174
|
-
- **Step 00:** Detection, scan for latest application, locate `ba-review.json`
|
|
175
|
-
- **Step 06:** Apply corrections, create new version, reverse-map data, regenerate all artifacts
|
|
176
|
-
</workflow>
|
|
177
|
-
|
|
178
|
-
<state_variables>
|
|
179
|
-
**Persist throughout all steps via feature.json:**
|
|
180
|
-
|
|
181
|
-
| Variable | Type | Description |
|
|
182
|
-
| ----------------------- | ------- | ------------------------------------------------------ |
|
|
183
|
-
| `{feature_id}` | string | Unique identifier (e.g., `FEAT-001`) |
|
|
184
|
-
| `{feature_description}` | string | What to analyze |
|
|
185
|
-
| `{workflow_type}` | string | `"new"` or `"update"` |
|
|
186
|
-
| `{version}` | string | SemVer (1.0, 1.1, 2.0, etc.) |
|
|
187
|
-
| `{application_name}` | string | Target application name |
|
|
188
|
-
| `{module_name}` | string | Target module name |
|
|
189
|
-
| `{project_id}` | string | Project identifier (e.g., `PROJ-001`) — only in multi-app mode |
|
|
190
|
-
| `{workflow_mode}` | string | "project" (multi-app), "application" (single-app multi-module), or "module" (single) |
|
|
191
|
-
| `{analysisMode}` | string | Always "interactive" — analysis phase is always interactive with the user |
|
|
192
|
-
| `{docs_dir}` | string | `docs/{app}/{module}/business-analyse/v{X.Y}/` |
|
|
193
|
-
|
|
194
|
-
</state_variables>
|
|
195
|
-
|
|
196
|
-
<entry_point>
|
|
183
|
+
## References
|
|
197
184
|
|
|
198
|
-
|
|
185
|
+
| File | Content |
|
|
186
|
+
|------|---------|
|
|
187
|
+
| `references/html-data-mapping.md` | FEATURE_DATA mapping for HTML generation |
|
|
188
|
+
| `references/naming-conventions.md` | SmartStack naming rules |
|
|
189
|
+
| `references/wireframe-svg-style-guide.md` | SVG wireframe rendering guide |
|
|
190
|
+
| `references/validation-checklist.md` | Validation criteria checklist |
|
|
191
|
+
| `references/deploy-modes.md` | Deployment configuration |
|
|
192
|
+
| `references/acceptance-criteria.md` | Acceptance criteria patterns |
|
|
193
|
+
|
|
194
|
+
> **Cross-reference:** Handoff data, PRD generation, file templates, and BR-to-code mappings are in the `/derive-prd` skill.
|
|
195
|
+
|
|
196
|
+
## Questionnaires
|
|
199
197
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
| 03a1 | `steps/step-03a1-setup.md` | Opus | Per-module: setup, sections, questionnaires, cross-refs |
|
|
212
|
-
| 03a2 | `steps/step-03a2-analysis.md` | Opus | Per-module: objectives, entities, BRs, process flow |
|
|
213
|
-
| 03b | `steps/step-03b-ui.md` | Opus | Per-module: state machines, wireframes, layouts, dashboards |
|
|
214
|
-
| 03c | `steps/step-03c-compile.md` | Opus | Per-module: actors, UCs, FRs, permissions, navigation, seedDataCore (9 arrays), i18n |
|
|
215
|
-
| 03d | `steps/step-03d-validate.md` | Sonnet | Per-module: validation, write, incremental HTML, loop decision |
|
|
216
|
-
| 04a | `steps/step-04a-collect.md` | Opus | Collect module summaries & cross-module interactions |
|
|
217
|
-
| 04b | `steps/step-04b-analyze.md` | Opus | Analyze permission coherence, semantic validation, E2E flows |
|
|
218
|
-
| 04c | `steps/step-04c-decide.md` | Opus | Final approval, write consolidation, proceed to handoff |
|
|
219
|
-
| 05a | `steps/step-05a-handoff.md` | Sonnet | Handoff: file mapping (7 categories), BR-to-code mapping, API summary, write handoff |
|
|
220
|
-
| 05b | `steps/step-05b-deploy.md` | Sonnet | Deploy: prd.json, progress.txt, manifest, ba-interactive.html |
|
|
221
|
-
| 05c | `steps/step-05c-ralph-readiness.md` | Opus | ULTRATHINK quality review + ralph readiness gate (MANDATORY) |
|
|
222
|
-
| 06 | `steps/step-06-review.md` | Opus | Apply review corrections, create new version, regenerate all artifacts |
|
|
223
|
-
|
|
224
|
-
</step_files>
|
|
225
|
-
|
|
226
|
-
<questionnaire_files>
|
|
227
|
-
**Progressive questionnaire loading (step-01 only):**
|
|
228
|
-
|
|
229
|
-
Load ONLY relevant categories based on feature type:
|
|
230
|
-
|
|
231
|
-
| Categorie | Fichier | Questions | Quand charger |
|
|
232
|
-
| --------- | ------------------------------------- | --------- | ------------- |
|
|
233
|
-
| 00b | `questionnaire/00b-project.md` | 5 | Si workflow_mode = "project" (multi-app) |
|
|
234
|
-
| 00 | `questionnaire/00-application.md` | 18 | Si workflow_mode = "application" ou "project" |
|
|
235
|
-
| 01 | `questionnaire/01-context.md` | 32 | Toujours |
|
|
236
|
-
| 02 | `questionnaire/02-stakeholders.md` | 33 | Toujours |
|
|
237
|
-
| 03 | `questionnaire/03-scope.md` | 32 | Toujours |
|
|
238
|
-
| 04 | `questionnaire/04-data.md` | 15 | Si module oriente donnees |
|
|
239
|
-
| 05 | `questionnaire/05-integrations.md` | 14 | Si integrations |
|
|
240
|
-
| 06 | `questionnaire/06-security.md` | 13 | Si securite mentionnee |
|
|
241
|
-
| 07 | `questionnaire/07-ui.md` | 19 | Si module oriente interface |
|
|
242
|
-
| 08 | `questionnaire/08-performance.md` | 8 | Si performance critique |
|
|
243
|
-
| 09 | `questionnaire/09-constraints.md` | 6 | Si contraintes |
|
|
244
|
-
| 10 | `questionnaire/10-documentation.md` | 7 | Toujours |
|
|
245
|
-
| 11 | `questionnaire/11-data-lifecycle.md` | 14 | Si lifecycle requis (retention, archivage, RGPD) |
|
|
246
|
-
| 12 | `questionnaire/12-migration.md` | 14 | Si nouveau module (migration donnees existantes) |
|
|
247
|
-
| 13 | `questionnaire/13-cross-module.md` | 14 | Si nouveau module OU references autres modules |
|
|
248
|
-
| 14 | `questionnaire/14-risk-assumptions.md`| 16 | Toujours |
|
|
249
|
-
| 15 | `questionnaire/15-success-metrics.md` | 17 | Toujours |
|
|
250
|
-
|
|
251
|
-
**Total noyau (toujours chargés) : 137 questions** (contexte, acteurs, périmètre, risques, métriques, documentation)
|
|
252
|
-
**Total avec application : 155 questions** (+ identité application si mode multi-module)
|
|
253
|
-
**Total conditionnel : 117 questions** (data, intégrations, sécurité, UI, performance, contraintes, lifecycle, migration, cross-module)
|
|
254
|
-
**Total maximum possible : 272 questions** (noyau + application + tous conditionnels chargés)
|
|
255
|
-
|
|
256
|
-
</questionnaire_files>
|
|
257
|
-
|
|
258
|
-
<template_files>
|
|
259
|
-
**Progressive template loading:**
|
|
260
|
-
|
|
261
|
-
| Template | File | Used in step |
|
|
262
|
-
| -------- | ----------------------------------- | ------------ |
|
|
263
|
-
| schema | `schemas/feature-schema.json` | All steps |
|
|
264
|
-
| spec | `templates/tpl-frd.md` | 02 |
|
|
265
|
-
| handoff | `templates/tpl-handoff.md` | 05a |
|
|
266
|
-
| suggestions | `patterns/suggestion-catalog.md` | 01 |
|
|
267
|
-
| interactive | `html/ba-interactive.html` | 03d (incremental), 05b (final deploy) |
|
|
268
|
-
| mapping | `references/html-data-mapping.md` | 03d, 05b (FEATURE_DATA + EMBEDDED_ARTIFACTS mapping) |
|
|
269
|
-
|
|
270
|
-
</template_files>
|
|
271
|
-
|
|
272
|
-
<execution_rules>
|
|
273
|
-
|
|
274
|
-
- **Load one step at a time** - Only load the current step file
|
|
275
|
-
- **Load shared files conditionally** - Each step loads only the _shared files it needs (see step headers)
|
|
276
|
-
- **Reference files on demand** - Templates and mappings in references/ and templates/ are loaded only when needed
|
|
277
|
-
- **ULTRATHINK** for steps 01, 02, 03a-03c, 04 (critical thinking)
|
|
278
|
-
- **State persisted in feature.json** (NOT markdown files)
|
|
279
|
-
- **Use ba-writer agent** for all JSON writes
|
|
280
|
-
- **Use ba-reader agent** for all JSON reads
|
|
281
|
-
- **Follow next_step directive** at end of each step
|
|
282
|
-
- **Use parallel agents** for codebase exploration
|
|
283
|
-
- **Team mode** (2+ modules): After step-02, load `references/team-orchestration.md` and follow team protocol
|
|
284
|
-
- **Inline mode** (1 module): Classic sequential execution, no team
|
|
285
|
-
- **Project mode** (2+ applications): Application loop wraps module loop — see `_module-loop.md`
|
|
286
|
-
</execution_rules>
|
|
287
|
-
|
|
288
|
-
<team_mode>
|
|
289
|
-
**Automatic team activation for multi-module applications:**
|
|
290
|
-
|
|
291
|
-
| Condition | Mode |
|
|
292
|
-
|-----------|------|
|
|
293
|
-
| 1 module | Inline (classic, no team) |
|
|
294
|
-
| 2+ modules | Team mode (Propose & Review) |
|
|
295
|
-
|
|
296
|
-
**Team mode workflow (Parallel Propose & Review):**
|
|
297
|
-
1. Steps 00-02 execute inline in the main conversation (interactive with user)
|
|
298
|
-
2. After step-02 decomposition: clean up old team data (§1a), then `TeamCreate({ team_name: "ba-{appName}" })` — **CRITICAL: capture the RETURNED team name** (may differ from requested)
|
|
299
|
-
3. For each dependency layer: pre-analyze cross-module touchpoints, then spawn autonomous agents **IN PARALLEL** (all modules in the same layer run simultaneously). Team lead pre-injects coordination notes into each agent's prompt, handles runtime cross-module queries between agents, then presents cross-module interaction analysis + individual module reviews to user.
|
|
300
|
-
4. Between layers: shutdown all layer agents, rebuild completedModulesSummary, spawn next layer
|
|
301
|
-
5. After all modules specified: spawn consolidation agent (steps 04a + 04b), present report for user approval (04c)
|
|
302
|
-
6. After consolidation approved: spawn handoff agent (steps 05a + 05b + 05c)
|
|
303
|
-
7. `TeamDelete()` cleanup
|
|
304
|
-
|
|
305
|
-
**Why team mode:**
|
|
306
|
-
- Each module agent gets a **fresh context window** (zero accumulation)
|
|
307
|
-
- The team lead stays lightweight (< 30% context even with 10+ modules)
|
|
308
|
-
- Module agents work **autonomously** (no AskUserQuestion — they PROPOSE, user REVIEWS)
|
|
309
|
-
- **Parallel execution**: modules in the same dependency layer run simultaneously (~50-66% wall-clock reduction)
|
|
310
|
-
- **Cross-module coordination**: team lead pre-injects known touchpoints + relays runtime queries between parallel agents
|
|
311
|
-
- Error recovery: if an agent crashes, other agents in the layer continue; crashed module retried independently
|
|
312
|
-
|
|
313
|
-
**Reference:** `references/team-orchestration.md` (loaded by step-02 after decomposition)
|
|
314
|
-
**Agent prompt template:** `references/agent-module-prompt.md`
|
|
315
|
-
</team_mode>
|
|
316
|
-
|
|
317
|
-
<success_criteria>
|
|
318
|
-
|
|
319
|
-
- Master feature.json created and enriched progressively through all steps
|
|
320
|
-
- Module decomposition validated by client (step-02 checkpoint)
|
|
321
|
-
- Each module specified iteratively with client validation
|
|
322
|
-
- ASCII/SVG mockups proposed for each module's sections
|
|
323
|
-
- Cross-module consolidation passed (step-04)
|
|
324
|
-
- Development handoff ready for `/ralph-loop`
|
|
325
|
-
- Ralph Loop prd.json generated (per module or consolidated)
|
|
326
|
-
- All outputs renderable by SmartStack app viewer at `/docs/{app}/`
|
|
327
|
-
</success_criteria>
|
|
198
|
+
| File | Questions | Focus |
|
|
199
|
+
|------|-----------|-------|
|
|
200
|
+
| `questionnaire/01-context.md` | ~20 | Problem, current state, vision, triggers |
|
|
201
|
+
| `questionnaire/02-stakeholders-scope.md` | ~25 | User profiles, priorities, scope boundaries |
|
|
202
|
+
| `questionnaire/03-data-ui.md` | ~20 | Data entities, UI expectations, integrations |
|
|
203
|
+
| `questionnaire/04-risks-metrics.md` | ~15 | Risks, success criteria, constraints |
|
|
204
|
+
| `questionnaire/05-cross-module.md` | ~10 | Cross-module dependencies, shared data |
|
|
205
|
+
|
|
206
|
+
## Entry Point
|
|
207
|
+
|
|
208
|
+
**FIRST ACTION:** Load `steps/step-00-init.md`
|