@atlashub/smartstack-cli 4.74.0 → 4.76.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 +152 -31
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +14 -3
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +17 -15
- package/templates/agents/ba-writer.md +49 -51
- package/templates/skills/apex/SKILL.md +2 -2
- package/templates/skills/apex/_shared.md +1 -1
- package/templates/skills/apex/references/checks/backend-checks.sh +21 -7
- package/templates/skills/apex/references/checks/frontend-checks.sh +26 -0
- package/templates/skills/apex/references/checks/infrastructure-checks.sh +47 -10
- package/templates/skills/apex/references/checks/seed-checks.sh +47 -7
- package/templates/skills/apex/references/core-seed-data.md +20 -18
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/apex/references/post-checks.md +23 -3
- package/templates/skills/apex/references/smartstack-api.md +4 -4
- package/templates/skills/apex/references/smartstack-frontend.md +54 -8
- package/templates/skills/apex/references/smartstack-layers.md +6 -6
- package/templates/skills/apex/steps/step-00-init.md +75 -1
- package/templates/skills/apex/steps/step-03-execute.md +16 -4
- package/templates/skills/apex/steps/step-03b-layer1-seed.md +65 -6
- package/templates/skills/apex/steps/step-03c-layer2-backend.md +50 -5
- package/templates/skills/apex/steps/step-03d-layer3-frontend.md +226 -4
- package/templates/skills/apex/steps/step-04-examine.md +163 -0
- package/templates/skills/apex-verify/SKILL.md +110 -0
- package/templates/skills/apex-verify/references/audit-rules.md +50 -0
- package/templates/skills/apex-verify/steps/step-00-init.md +119 -0
- package/templates/skills/apex-verify/steps/step-01-nav-audit.md +92 -0
- package/templates/skills/apex-verify/steps/step-02-crud-audit.md +127 -0
- package/templates/skills/apex-verify/steps/step-03-perm-audit.md +119 -0
- package/templates/skills/apex-verify/steps/step-04-route-audit.md +98 -0
- package/templates/skills/apex-verify/steps/step-05-report.md +110 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/application/templates-frontend.md +2 -2
- package/templates/skills/business-analyse/SKILL.md +17 -3
- package/templates/skills/business-analyse/_shared.md +64 -0
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +34 -26
- package/templates/skills/business-analyse/questionnaire/01-context.md +13 -9
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +20 -27
- package/templates/skills/business-analyse/questionnaire.md +86 -9
- package/templates/skills/business-analyse/references/03-json-schemas.md +221 -0
- package/templates/skills/business-analyse/references/03-post-check-validation.md +208 -0
- package/templates/skills/business-analyse/references/03-smartstack-entity-guards.md +32 -0
- package/templates/skills/business-analyse/references/04-cross-module-validation.md +95 -0
- package/templates/skills/business-analyse/references/04-file-allocation.md +162 -0
- package/templates/skills/business-analyse/references/04-naming-audit-checks.md +174 -0
- package/templates/skills/business-analyse/references/04-semantic-validation-matrix.md +118 -0
- package/templates/skills/business-analyse/references/canonical-json-formats.md +7 -3
- package/templates/skills/business-analyse/references/domain-research-playbook.md +234 -0
- package/templates/skills/business-analyse/references/entity-sourcing-presentation.md +166 -0
- package/templates/skills/business-analyse/references/init-resume-logic.md +70 -0
- package/templates/skills/business-analyse/references/module-completeness-challenge.md +174 -0
- package/templates/skills/business-analyse/references/multi-app-detection.md +149 -0
- package/templates/skills/business-analyse/references/portal-classification.md +52 -0
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/validation-checklist.md +35 -6
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +50 -6
- package/templates/skills/business-analyse/steps/step-00-init.md +22 -190
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +365 -269
- package/templates/skills/business-analyse/steps/step-02-structure.md +98 -20
- package/templates/skills/business-analyse/steps/step-03-specify.md +810 -229
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +509 -278
- package/templates/skills/business-analyse-design/SKILL.md +10 -0
- package/templates/skills/business-analyse-design/references/screens-post-check.md +221 -0
- package/templates/skills/business-analyse-design/references/screens-type-mapping.md +138 -0
- package/templates/skills/business-analyse-design/references/smartcomponents-templates.md +225 -0
- package/templates/skills/{business-analyse → business-analyse-design}/references/spec-auto-inference.md +117 -117
- package/templates/skills/business-analyse-design/steps/step-01-screens.md +36 -162
- package/templates/skills/business-analyse-design/steps/step-02-wireframes.md +8 -7
- package/templates/skills/business-analyse-design/steps/step-03-navigation.md +89 -42
- package/templates/skills/business-analyse-develop/references/compact-loop.md +9 -0
- package/templates/skills/business-analyse-develop/references/handoff-quality-gate.md +132 -0
- package/templates/skills/business-analyse-develop/references/prd-v3-transformation.md +326 -0
- package/templates/skills/business-analyse-develop/references/report-reconciliation.md +140 -0
- package/templates/skills/business-analyse-develop/references/report-template.md +142 -0
- package/templates/skills/business-analyse-develop/steps/step-01-task.md +5 -177
- package/templates/skills/business-analyse-develop/steps/step-02-execute.md +17 -4
- package/templates/skills/business-analyse-develop/steps/step-03-commit.md +6 -2
- package/templates/skills/business-analyse-develop/steps/step-04-check.md +6 -0
- package/templates/skills/business-analyse-develop/steps/step-05-report.md +3 -269
- package/templates/skills/business-analyse-handoff/SKILL.md +10 -0
- package/templates/skills/business-analyse-handoff/references/agent-handoff-transform-prompt.md +211 -0
- package/templates/skills/business-analyse-handoff/references/context-isolation-pattern.md +47 -0
- package/templates/skills/business-analyse-handoff/references/handoff-file-inventory.md +49 -0
- package/templates/skills/business-analyse-handoff/references/handoff-global-validation.md +142 -0
- package/templates/skills/business-analyse-handoff/references/prd-validation-checks.md +125 -0
- package/templates/skills/business-analyse-handoff/references/project-index-update.md +98 -0
- package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +9 -160
- package/templates/skills/business-analyse-handoff/steps/step-02-export.md +10 -99
- package/templates/skills/business-analyse-html/SKILL.md +10 -0
- package/templates/skills/business-analyse-html/html/ba-interactive.html +504 -97
- package/templates/skills/business-analyse-html/html/src/scripts/01-data-init.js +79 -2
- package/templates/skills/business-analyse-html/html/src/scripts/02-navigation.js +6 -46
- package/templates/skills/business-analyse-html/html/src/scripts/05-render-specs.js +80 -11
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-consolidation.js +2 -2
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-mockups.js +94 -36
- package/templates/skills/business-analyse-html/html/src/scripts/12-render-diagrams.js +162 -0
- package/templates/skills/business-analyse-html/html/src/styles/10-diagrams.css +73 -0
- package/templates/skills/business-analyse-html/html/src/template.html +2 -0
- package/templates/skills/business-analyse-html/references/02-embedded-artifacts-building.md +144 -0
- package/templates/skills/business-analyse-html/references/02-feature-data-building.md +143 -0
- package/templates/skills/business-analyse-html/references/02-mapping-tables.md +442 -0
- package/templates/skills/business-analyse-html/references/02-normalization-helpers.md +139 -0
- package/templates/skills/business-analyse-html/references/02-screen-format-detection.md +283 -0
- package/templates/skills/business-analyse-html/references/02-self-check-validation.md +199 -0
- package/templates/skills/business-analyse-html/references/data-build.md +24 -1
- package/templates/skills/business-analyse-html/references/data-mapping.md +119 -17
- package/templates/skills/business-analyse-html/steps/step-02-build-data.md +18 -555
- package/templates/skills/business-analyse-html/steps/step-04-verify.md +92 -3
- package/templates/skills/business-analyse-quick/SKILL.md +807 -0
- package/templates/skills/{sketch → business-analyse-quick}/references/domain-heuristics.md +59 -3
- package/templates/skills/business-analyse-quick/references/prd-schema.md +268 -0
- package/templates/skills/business-analyse-review/SKILL.md +10 -0
- package/templates/skills/business-analyse-review/references/review-data-mapping.md +6 -0
- package/templates/skills/business-analyse-status/SKILL.md +8 -0
- package/templates/skills/dev-start/SKILL.md +143 -307
- package/templates/skills/efcore/SKILL.md +13 -0
- package/templates/skills/sketch/SKILL.md +15 -153
- package/templates/skills/ui-components/SKILL.md +1 -1
- package/templates/skills/ui-components/patterns/data-table.md +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-04-route-audit
|
|
3
|
+
description: Verify route alignment between navigation seed data, componentRegistry, and controllers
|
|
4
|
+
next_step: steps/step-05-report.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 4: Route Audit
|
|
8
|
+
|
|
9
|
+
## YOUR TASK:
|
|
10
|
+
Verify that routes are consistent across 3 sources: navigation seed data, componentRegistry (PageRegistry), and backend controllers (NavRoute attributes).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## EXECUTION SEQUENCE:
|
|
15
|
+
|
|
16
|
+
### 1. Extract Seed Data Routes
|
|
17
|
+
|
|
18
|
+
From {seed_files}, extract all section routes:
|
|
19
|
+
```
|
|
20
|
+
{seed_routes} = [
|
|
21
|
+
{ code: "departments", route: "/human-resources/employees/departments", file: "...", line: N },
|
|
22
|
+
{ code: "list", route: "/human-resources/employees", file: "...", line: N },
|
|
23
|
+
...
|
|
24
|
+
]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 2. Extract PageRegistry Keys
|
|
28
|
+
|
|
29
|
+
From {registry_file}, extract all `PageRegistry.register()` calls:
|
|
30
|
+
```typescript
|
|
31
|
+
PageRegistry.register('human-resources.employees.departments', ...)
|
|
32
|
+
PageRegistry.register('human-resources.employees', ...)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Build: `{registry_keys}` = all registered page keys.
|
|
36
|
+
|
|
37
|
+
### 3. Extract Controller NavRoutes
|
|
38
|
+
|
|
39
|
+
From {controller_files}, extract `[NavRoute("...")]` attributes:
|
|
40
|
+
```csharp
|
|
41
|
+
[NavRoute("human-resources.employees")]
|
|
42
|
+
[NavRoute("human-resources.employees.departments")]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Build: `{controller_navroutes}` = all NavRoute values.
|
|
46
|
+
|
|
47
|
+
### 4. Cross-Reference
|
|
48
|
+
|
|
49
|
+
**Check A: Seed Routes → PageRegistry**
|
|
50
|
+
For each seed route (excluding reserved sections and /:id routes):
|
|
51
|
+
- Convert route to PageRegistry key: `/human-resources/employees/departments` → `human-resources.employees.departments`
|
|
52
|
+
- Verify key exists in {registry_keys}
|
|
53
|
+
- If missing → BLOCKING (seed route has no frontend page)
|
|
54
|
+
|
|
55
|
+
**Check B: Controller NavRoutes → Seed Data**
|
|
56
|
+
For each NavRoute:
|
|
57
|
+
- Convert to route path: `human-resources.employees` → `/human-resources/employees`
|
|
58
|
+
- Verify exists in seed data routes
|
|
59
|
+
- If missing → WARNING (controller exists but no navigation entry)
|
|
60
|
+
|
|
61
|
+
**Check C: PageRegistry → Page Files**
|
|
62
|
+
For each registry entry:
|
|
63
|
+
- Verify the imported component file exists on disk
|
|
64
|
+
- If missing → BLOCKING (registry references non-existent page)
|
|
65
|
+
|
|
66
|
+
**Check D: Orphan Pages**
|
|
67
|
+
For each page file in {page_files}:
|
|
68
|
+
- Check if it's registered in componentRegistry
|
|
69
|
+
- If NOT registered → WARNING (page exists but has no route — unreachable)
|
|
70
|
+
|
|
71
|
+
**Check E: DynamicRouter Convention Routes**
|
|
72
|
+
For each section with a list page:
|
|
73
|
+
- Verify these implicit routes are handled (either by registry or DynamicRouter convention):
|
|
74
|
+
- `{section}/:id` → detail page
|
|
75
|
+
- `{section}/create` → create page
|
|
76
|
+
- `{section}/:id/edit` → edit page
|
|
77
|
+
- Note: DynamicRouter may resolve these by convention without explicit registry entries. Only flag if BOTH registry AND convention are missing.
|
|
78
|
+
|
|
79
|
+
### 5. Record Findings
|
|
80
|
+
|
|
81
|
+
| ID | Severity | Rule |
|
|
82
|
+
|----|----------|------|
|
|
83
|
+
| ROUTE-001 | BLOCKING | Seed data route has no matching PageRegistry entry |
|
|
84
|
+
| ROUTE-002 | WARNING | Controller NavRoute has no matching seed data entry |
|
|
85
|
+
| ROUTE-003 | BLOCKING | PageRegistry references non-existent page file |
|
|
86
|
+
| ROUTE-004 | WARNING | Orphan page — exists on disk but not registered (unreachable) |
|
|
87
|
+
| ROUTE-005 | WARNING | Implicit route (detail/create/edit) not resolvable |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## SUCCESS METRICS:
|
|
92
|
+
- All 3 sources extracted completely
|
|
93
|
+
- Cross-reference completed for all combinations
|
|
94
|
+
- Orphan detection completed
|
|
95
|
+
- DynamicRouter conventions accounted for
|
|
96
|
+
|
|
97
|
+
## NEXT STEP:
|
|
98
|
+
Proceed to `./step-05-report.md`
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-05-report
|
|
3
|
+
description: Generate consolidated audit report with all findings
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 5: Consolidated Report
|
|
7
|
+
|
|
8
|
+
## YOUR TASK:
|
|
9
|
+
Compile all findings from previous steps into a structured, actionable report.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## REPORT FORMAT:
|
|
14
|
+
|
|
15
|
+
Display the following report to the user:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
============================================================
|
|
19
|
+
APEX VERIFICATION REPORT
|
|
20
|
+
============================================================
|
|
21
|
+
|
|
22
|
+
Project: {project_name}
|
|
23
|
+
Scope: {scope}
|
|
24
|
+
Date: {current_date}
|
|
25
|
+
|
|
26
|
+
------------------------------------------------------------
|
|
27
|
+
SUMMARY
|
|
28
|
+
------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
| Category | BLOCKING | CRITICAL | WARNING | PASS |
|
|
31
|
+
|-------------|----------|----------|---------|------|
|
|
32
|
+
| Navigation | {count} | {count} | {count} | {Y/N}|
|
|
33
|
+
| CRUD | {count} | {count} | {count} | {Y/N}|
|
|
34
|
+
| Permissions | {count} | {count} | {count} | {Y/N}|
|
|
35
|
+
| Routes | {count} | {count} | {count} | {Y/N}|
|
|
36
|
+
| **TOTAL** | {total} | {total} | {total} | |
|
|
37
|
+
|
|
38
|
+
Result: {PASS / FAIL (N blocking issues)}
|
|
39
|
+
|
|
40
|
+
------------------------------------------------------------
|
|
41
|
+
BLOCKING FINDINGS (must fix)
|
|
42
|
+
------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
[{ID}] {message}
|
|
45
|
+
File: {file_path}:{line}
|
|
46
|
+
Fix: {fix_description}
|
|
47
|
+
|
|
48
|
+
... (repeat for each blocking finding)
|
|
49
|
+
|
|
50
|
+
------------------------------------------------------------
|
|
51
|
+
CRITICAL FINDINGS (should fix)
|
|
52
|
+
------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
[{ID}] {message}
|
|
55
|
+
File: {file_path}:{line}
|
|
56
|
+
Fix: {fix_description}
|
|
57
|
+
|
|
58
|
+
... (repeat for each critical finding)
|
|
59
|
+
|
|
60
|
+
------------------------------------------------------------
|
|
61
|
+
WARNINGS (nice to fix)
|
|
62
|
+
------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
[{ID}] {message}
|
|
65
|
+
File: {file_path}:{line}
|
|
66
|
+
Fix: {fix_description}
|
|
67
|
+
|
|
68
|
+
... (repeat for each warning)
|
|
69
|
+
|
|
70
|
+
============================================================
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## ADDITIONAL SECTIONS (if --fix):
|
|
74
|
+
|
|
75
|
+
When {fix_mode} is true, add a "FIX COMMANDS" section after the findings:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
------------------------------------------------------------
|
|
79
|
+
FIX COMMANDS
|
|
80
|
+
------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
# NAV-001: Remove reserved section 'detail' from menu
|
|
83
|
+
# File: src/.../EmployeesNavigationSeedData.cs
|
|
84
|
+
# Action: Remove the section entry with code "detail" from Sections[] array
|
|
85
|
+
|
|
86
|
+
# CRUD-004: Add Create button to EmployeeListPage
|
|
87
|
+
# File: web/.../EmployeeListPage.tsx
|
|
88
|
+
# Action: Add in the page header:
|
|
89
|
+
# <button onClick={() => navigate('create')} className="...">
|
|
90
|
+
# New Employee
|
|
91
|
+
# </button>
|
|
92
|
+
|
|
93
|
+
... (repeat for each finding with specific fix instructions)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## RULES FOR REPORT GENERATION:
|
|
97
|
+
|
|
98
|
+
1. **Sort by severity**: BLOCKING first, then CRITICAL, then WARNING
|
|
99
|
+
2. **Within same severity**: Sort by category (NAV, CRUD, PERM, ROUTE)
|
|
100
|
+
3. **No false positives**: Only include findings with concrete evidence (file:line)
|
|
101
|
+
4. **No duplicates**: Merge findings that point to the same root cause
|
|
102
|
+
5. **Actionable fixes**: Every finding must have a clear, specific fix instruction
|
|
103
|
+
6. **If no findings in a category**: Display "PASS — No issues found" for that category
|
|
104
|
+
|
|
105
|
+
## SUCCESS CRITERIA:
|
|
106
|
+
- Report is complete and properly formatted
|
|
107
|
+
- All findings from steps 1-4 are included
|
|
108
|
+
- Pass/fail status is correct
|
|
109
|
+
- Fix commands are included if --fix was specified
|
|
110
|
+
- Report is immediately actionable by the developer
|
|
@@ -48,6 +48,9 @@ import './extensions/componentRegistry.generated';
|
|
|
48
48
|
|
|
49
49
|
## For Client SDK Pages
|
|
50
50
|
|
|
51
|
+
> **CRITICAL:** Keys use DOT notation (`rh.employes.list`), NEVER hyphens (`rh-employes-list`).
|
|
52
|
+
> Dots are hierarchy separators matching `NavigationService.ComponentKey` computation at runtime.
|
|
53
|
+
|
|
51
54
|
Clients register their own pages directly:
|
|
52
55
|
|
|
53
56
|
```tsx
|
|
@@ -114,7 +114,7 @@ export function $MODULE_PASCALDetailPage() {
|
|
|
114
114
|
} finally {
|
|
115
115
|
setLoading(false);
|
|
116
116
|
}
|
|
117
|
-
}, [$entityId
|
|
117
|
+
}, [$entityId]);
|
|
118
118
|
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
loadData();
|
|
@@ -239,7 +239,7 @@ export function $MODULE_PASCALEditPage() {
|
|
|
239
239
|
} finally {
|
|
240
240
|
setLoading(false);
|
|
241
241
|
}
|
|
242
|
-
}, [$entityId
|
|
242
|
+
}, [$entityId]);
|
|
243
243
|
|
|
244
244
|
useEffect(() => {
|
|
245
245
|
loadData();
|
|
@@ -38,7 +38,7 @@ Path A — FAST (small module, < 5 min) Path B — FULL (multi-module,
|
|
|
38
38
|
│ │
|
|
39
39
|
▼ ▼
|
|
40
40
|
┌──────────────┐ ┌──────────────────┐
|
|
41
|
-
│ /
|
|
41
|
+
│ /business-analyse-quick│ 0-2 questions │ /business-analyse│ ~40 questions
|
|
42
42
|
│ (2 min) │ Pure inference │ (steps 00-04) │ JSON output
|
|
43
43
|
└──────┬───────┘ └────────┬─────────┘
|
|
44
44
|
│ Natural language prompt │ entities/rules/usecases.json
|
|
@@ -84,7 +84,7 @@ Path A — FAST (small module, < 5 min) Path B — FULL (multi-module,
|
|
|
84
84
|
|
|
85
85
|
| From | To | Data | Format |
|
|
86
86
|
|------|----|------|--------|
|
|
87
|
-
| `/
|
|
87
|
+
| `/business-analyse-quick` | `/apex` | Inferred design (entities, FK, labels, code patterns) | Natural language prompt |
|
|
88
88
|
| `/business-analyse` | `/business-analyse-design` | Entities, use cases, permissions | JSON (`entities.json`, `usecases.json`, `permissions.json`) |
|
|
89
89
|
| `/business-analyse-design` | `/business-analyse-html` | Screen specs, wireframes, navigation | JSON (`screens.json`, `navigation.json`) |
|
|
90
90
|
| `/business-analyse-html` | Client | Interactive review document | HTML (`ba-interactive.html`) |
|
|
@@ -104,7 +104,7 @@ Path A — FAST (small module, < 5 min) Path B — FULL (multi-module,
|
|
|
104
104
|
| Cadrage/scope only | `/business-analyse-html` | Just regenerate HTML |
|
|
105
105
|
| No corrections (approved) | `/business-analyse-handoff` | Proceed to code generation |
|
|
106
106
|
|
|
107
|
-
> **Rule:** Path A (`/
|
|
107
|
+
> **Rule:** Path A (`/business-analyse-quick` → `/apex`) is for quick, single-module additions. Path B (full cycle) is for multi-module projects or when the client needs a formal review process.
|
|
108
108
|
> **PRD generation:** Handoff data and PRD files are generated by the `/business-analyse-handoff` skill.
|
|
109
109
|
|
|
110
110
|
## JSON Architecture — Granular files + Index
|
|
@@ -236,3 +236,17 @@ STEP 04 (consolidate) — FINAL BA STEP
|
|
|
236
236
|
## Entry Point
|
|
237
237
|
|
|
238
238
|
**FIRST ACTION:** Load `steps/step-00-init.md`
|
|
239
|
+
|
|
240
|
+
<success_criteria>
|
|
241
|
+
- Web research performed: >= 2 WebSearch per application + 1 per complex module (Level 1 + Level 2)
|
|
242
|
+
- cadrage.json with domain research findings, business process mapping, competitive analysis
|
|
243
|
+
- Module completeness challenged per application against industry archetypes (module-completeness-challenge.md)
|
|
244
|
+
- ALL CORE modules present or explicitly excluded with documented justification in globalScope.outOfScope
|
|
245
|
+
- Section completeness: workflow modules have >= 5 sections including contextual views (open-requests, rejected, history, etc.)
|
|
246
|
+
- Business rules: >= 2 domain-specific rules per module (not just generic CRUD validation)
|
|
247
|
+
- entities.json, rules.json, usecases.json, permissions.json par module
|
|
248
|
+
- Validation cross-module completee (modele de donnees, coherence permissions, flux E2E)
|
|
249
|
+
- validation.json with qualityAssessment (self-scoring) and processCoverage
|
|
250
|
+
- Quality self-assessment score >= 7/10 (research + modules + sections + rules)
|
|
251
|
+
- Statut feature mis a jour a "consolidated" dans index.json
|
|
252
|
+
</success_criteria>
|
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# Business Analysis — Shared Conventions
|
|
2
2
|
|
|
3
|
+
## Fundamental Analysis Rules
|
|
4
|
+
|
|
5
|
+
1. **NEVER skip web research.** Domain research is MANDATORY and BLOCKING.
|
|
6
|
+
An analysis without research is a 2/10 regardless of structural quality.
|
|
7
|
+
|
|
8
|
+
2. **NEVER accept a thin application.** Every application MUST be challenged
|
|
9
|
+
against industry standard module counts (see `references/module-completeness-challenge.md`).
|
|
10
|
+
A 1-module billing application is ALWAYS wrong — challenge it.
|
|
11
|
+
|
|
12
|
+
3. **ALWAYS propose domain-specific business rules.** Generic CRUD rules
|
|
13
|
+
(date validation, required fields) are the MINIMUM baseline. Domain rules
|
|
14
|
+
(half-day absences, team capacity, carry-over limits, credit note linking,
|
|
15
|
+
sequential invoice numbering) are what make an analysis valuable.
|
|
16
|
+
**Target: >= 2 domain-specific rules per business module (`domainSpecific: true`).**
|
|
17
|
+
Post-check C19 enforces this as a WARNING.
|
|
18
|
+
|
|
19
|
+
4. **ALWAYS propose contextual views.** A workflow module without filtered
|
|
20
|
+
views (open-requests, rejected, history, my-{entity}) is incomplete.
|
|
21
|
+
|
|
22
|
+
5. **ALWAYS process application by application.** Research each app's domain
|
|
23
|
+
before decomposing into modules. Challenge module completeness per app.
|
|
24
|
+
|
|
25
|
+
6. **ACT AS AN EXPERT ANALYST, NOT A NOTE-TAKER.** Challenge, propose,
|
|
26
|
+
question. If the user says "billing with invoices", your job is to say
|
|
27
|
+
"standard billing also includes credit notes, payment tracking, and
|
|
28
|
+
dunning. Would you like to add these?" The user came to you for expertise.
|
|
29
|
+
|
|
30
|
+
7. **NEVER compress or batch module processing in step-03.** Each module MUST be
|
|
31
|
+
processed sequentially in the main context. Sub-agents do NOT have access to the
|
|
32
|
+
JSON schema and WILL produce inconsistent formats. If there are 15+ modules, the
|
|
33
|
+
correct approach is to maintain sequential processing, NOT to "accelerate" by
|
|
34
|
+
batching. The ba-012 audit proved that batching reduced schema conformity from
|
|
35
|
+
95% to 35% — the rework cost exceeded any time saved.
|
|
36
|
+
|
|
37
|
+
8. **ALL generated JSON content values MUST be in `{language}`** (from metadata or config).
|
|
38
|
+
This applies to ALL text values written to JSON files:
|
|
39
|
+
- Entity `description`, attribute `description`, relationship `description`
|
|
40
|
+
- Business rule `name`, `statement`, `examples[].input`, `examples[].expected`
|
|
41
|
+
- Use case `name`, `mainScenario[]` steps, `alternativeScenarios[].steps[]`, `errorScenarios[].steps[]`, `preconditions[]`, `postconditions[]`
|
|
42
|
+
- Permission `description`, role `description`
|
|
43
|
+
- Lifecycle state `displayName`
|
|
44
|
+
- Section and resource labels
|
|
45
|
+
|
|
46
|
+
**Mixed-language content across modules is a BLOCKING quality defect.**
|
|
47
|
+
If `language == "fr"` : write "Créer une absence", NOT "Create an absence".
|
|
48
|
+
If `language == "en"` : write "Create an absence", NOT "Créer une absence".
|
|
49
|
+
Technical identifiers (entity names, field names, enum values, IDs) remain in English/PascalCase.
|
|
50
|
+
|
|
51
|
+
9. **BR `examples[]` are TEST DATA, not documentation.** Each example must be a
|
|
52
|
+
concrete test case with the `{scenario, given, when, then}` format:
|
|
53
|
+
- `given`: object with `Entity.field: concreteValue` pairs (initial state)
|
|
54
|
+
- `when`: string action (`"create"`, `"submit"`, `"calculate_remaining"`)
|
|
55
|
+
- `then`: object with expected outcome (`{result: "success"|"error", Entity.field: value}`)
|
|
56
|
+
|
|
57
|
+
These examples directly feed:
|
|
58
|
+
- Gherkin `Examples:` tables (step-03, F-ter)
|
|
59
|
+
- `brToCodeMapping` in handoff
|
|
60
|
+
- Automated unit/integration tests in `/business-analyse-develop`
|
|
61
|
+
|
|
62
|
+
A rule without test-ready examples = a test gap in development.
|
|
63
|
+
Prose examples like `"code déjà existant"` are INSUFFICIENT — use concrete values.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
3
67
|
## JSON-First Architecture
|
|
4
68
|
|
|
5
69
|
Feature data is stored as granular JSON files, NOT markdown. Each module has an `index.json` referencing thematic files.
|
|
@@ -9,25 +9,35 @@
|
|
|
9
9
|
|
|
10
10
|
## 1. Module Patterns
|
|
11
11
|
|
|
12
|
-
Suggests companion modules based on primary module type:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
30
|
-
| **
|
|
12
|
+
Suggests companion modules based on primary module type. Modules are classified as:
|
|
13
|
+
- **CORE**: Always needed — absence = broken application. In step-02, CORE companions MUST be challenged as BLOCKING.
|
|
14
|
+
- **STANDARD**: Usually needed — absence = incomplete application. Recommended as WARNING.
|
|
15
|
+
- **OPTIONAL**: Nice to have — suggest only if context supports it.
|
|
16
|
+
|
|
17
|
+
> **CRITICAL — step-02 usage:**
|
|
18
|
+
> CORE companions are NOT optional suggestions. They are MANDATORY challenges.
|
|
19
|
+
> In step-02, for each identified module type, check CORE companions.
|
|
20
|
+
> If a CORE companion is absent → BLOCKING AskUserQuestion:
|
|
21
|
+
> "Module {companion} is a CORE component of {module_type} applications.
|
|
22
|
+
> (a) Add as module (b) Add as section (c) Exclude with justification"
|
|
23
|
+
|
|
24
|
+
| Module Type | Keywords | CORE Companions | STANDARD Companions | OPTIONAL Companions | Rationale |
|
|
25
|
+
|-------------|----------|-----------------|---------------------|---------------------|-----------|
|
|
26
|
+
| **Orders/Commandes** | order, commande, purchase, sales order | **Customers, Invoices** | Shipping, Returns | OrderLines | Orders need customer relationships and billing |
|
|
27
|
+
| **Clients/Customers** | client, customer, contact, account, party | **Contacts, Addresses** | Contracts, Documents | CRM | Customers have contacts and addresses at minimum |
|
|
28
|
+
| **Products/Articles** | product, article, item, catalog, sku | **Categories, Pricing** | Inventory, Suppliers | Images | Products need categorization and pricing |
|
|
29
|
+
| **Employees/HR** | employee, staff, personnel, team, workforce | **Leaves, Documents** | Evaluations | TimeTracking, Departments | Employees always need leave mgmt + document storage |
|
|
30
|
+
| **Tickets/Support** | ticket, support, incident, issue, case | **KnowledgeBase, Categories** | SLA, Escalation | Notifications | Support needs KB and categorization at minimum |
|
|
31
|
+
| **Projects** | project, task, milestone, workplan, roadmap | **Tasks, TimeTracking** | Milestones, Resources | Budgets, Timeline | Projects decompose into tasks + need time tracking |
|
|
32
|
+
| **Invoices/Billing** | invoice, billing, payment, receipt, statement | **CreditNotes, Payments** | Dunning, Reporting | Taxes, Subscriptions | Credit notes are legally required; payments are the purpose |
|
|
33
|
+
| **Inventory/Stock** | inventory, stock, warehouse, goods | **StockMovements, Locations** | Transfers, Alerts | AuditLog | Stock needs movement tracking + locations |
|
|
34
|
+
| **Documents** | document, file, attachment, media, archive | **Categories, Versions** | Sharing, Templates | Workflow | Document management needs categorization + versioning |
|
|
35
|
+
| **Contracts** | contract, agreement, legal, terms, service level | **Parties, Milestones** | Obligations, Renewal | Templates | Contracts involve parties + lifecycle milestones |
|
|
36
|
+
| **Permissions/Security** | permission, role, access, authority, rbac | **UserRoles, Policies** | Groups, Audit | Delegation | Permissions need role definitions + policies |
|
|
37
|
+
| **Notifications** | notification, alert, email, message, broadcast | **Templates, Channels** | Scheduling, Preferences | — | Notifications need templates + multi-channel |
|
|
38
|
+
| **Reporting** | report, dashboard, analytics, BI, metrics | **Dashboards, Exports** | Scheduling | AlertRules | Reporting needs visualization + export |
|
|
39
|
+
| **API Management / Integrations** | api, external, integration, webhook, export, data-export, machine-to-machine | **ExternalApps, ApiKeys** | DataExportEndpoints, AuditLogs | ExportAccess | API platforms need app registration + key management |
|
|
40
|
+
| **Client Portal** | portal, external, client, fournisseur, partenaire, tiers | **MyRequests, ClientDashboard** | PortalNotifications | — | External users need self-service views + status tracking |
|
|
31
41
|
|
|
32
42
|
---
|
|
33
43
|
|
|
@@ -241,7 +251,7 @@ When user selects suggestions:
|
|
|
241
251
|
"name": "Email Notifications",
|
|
242
252
|
"source": "Integration Pattern: Email mentioned",
|
|
243
253
|
"accepted": false,
|
|
244
|
-
"rejectionReason": "Out of scope for
|
|
254
|
+
"rejectionReason": "Out of scope for initial delivery"
|
|
245
255
|
}
|
|
246
256
|
]
|
|
247
257
|
}
|
|
@@ -351,19 +361,17 @@ integrationPatterns:
|
|
|
351
361
|
|
|
352
362
|
Skip suggestions if:
|
|
353
363
|
|
|
354
|
-
- **
|
|
364
|
+
- **Perimetre minimal :** L'utilisateur souhaite garder le perimetre au strict necessaire
|
|
355
365
|
- **Refactoring mode:** Skip module suggestions (only affect feature sections)
|
|
356
366
|
- **User explicitly declines:** Respect user's scope boundary
|
|
357
|
-
- **
|
|
367
|
+
- **Perimetre fixe :** L'utilisateur a indique un perimetre ferme
|
|
358
368
|
|
|
359
369
|
```
|
|
360
370
|
Suggested modules: Customers, Shipping, Invoices, Returns
|
|
361
371
|
|
|
362
|
-
But you indicated
|
|
363
|
-
- Timeline: 2 weeks (MVP only)
|
|
364
|
-
- Budget: 1 developer
|
|
372
|
+
But you indicated a minimal scope.
|
|
365
373
|
|
|
366
|
-
Suggestion: Start with Orders + Customers (
|
|
374
|
+
Suggestion: Start with Orders + Customers (essential), defer others.
|
|
367
375
|
|
|
368
376
|
[OK] [Adjust scope] [Ignore suggestions]
|
|
369
377
|
```
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> **Usage :** Questions fondamentales pour comprendre le besoin métier
|
|
4
4
|
> **Quand charger :** TOUJOURS (noyau)
|
|
5
|
-
> **Objectif :** Comprendre le processus métier
|
|
5
|
+
> **Objectif :** Comprendre le processus métier et la vision cible
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## 1.1 Le processus métier
|
|
9
|
+
## 1.1 Le processus métier (OBLIGATOIRE)
|
|
10
10
|
|
|
11
11
|
| # | Question | Type de réponse |
|
|
12
12
|
|---|----------|-----------------|
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## 1.2 Les points de friction
|
|
17
|
+
## 1.2 Les points de friction (CONDITIONNEL)
|
|
18
|
+
|
|
19
|
+
> **Condition :** Poser UNIQUEMENT si `_preAnalysis.problem_type IN ("replace", "automate")`.
|
|
20
|
+
> Pour un système neuf (problem_type = "new_tool" | "centralize"), il n'y a pas de processus existant.
|
|
21
|
+
> Dans ce cas : `cadrage.asIs = "Aucun outil existant — nouveau système"` (auto-rempli).
|
|
18
22
|
|
|
19
23
|
| # | Question | Type de réponse |
|
|
20
24
|
|---|----------|-----------------|
|
|
@@ -22,7 +26,7 @@
|
|
|
22
26
|
|
|
23
27
|
---
|
|
24
28
|
|
|
25
|
-
## 1.3 La vision souhaitée
|
|
29
|
+
## 1.3 La vision souhaitée (OBLIGATOIRE)
|
|
26
30
|
|
|
27
31
|
| # | Question | Type de réponse |
|
|
28
32
|
|---|----------|-----------------|
|
|
@@ -32,8 +36,8 @@
|
|
|
32
36
|
|
|
33
37
|
## Mapping vers le cadrage
|
|
34
38
|
|
|
35
|
-
| Réponse | Alimente |
|
|
36
|
-
|
|
37
|
-
| Q1.1 | `cadrage.problem` |
|
|
38
|
-
| Q1.4 | `cadrage.asIs` |
|
|
39
|
-
| Q1.8 | `cadrage.toBe` |
|
|
39
|
+
| Réponse | Alimente | Remplissage |
|
|
40
|
+
|---------|----------|-------------|
|
|
41
|
+
| Q1.1 | `cadrage.problem` | Reponse directe |
|
|
42
|
+
| Q1.4 | `cadrage.asIs` | Reponse directe OU auto-rempli si systeme neuf |
|
|
43
|
+
| Q1.8 | `cadrage.toBe` | Reponse directe |
|
|
@@ -39,38 +39,33 @@
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
## 2.4
|
|
42
|
+
## 2.4 Limites du périmètre (OBLIGATOIRE)
|
|
43
43
|
|
|
44
|
-
> **But :**
|
|
45
|
-
> **Note :** SmartStack développe TOUS les modules identifiés. La classification vital/important/optionnel sert à doser la profondeur de spécification, PAS à phaser la livraison. Ne PAS présenter cette question comme un choix de "premier lancement" ou "quelle app d'abord".
|
|
44
|
+
> **But :** Borner ce que le système ne doit PAS faire. Essentiel pour eviter le scope creep.
|
|
46
45
|
|
|
47
46
|
| # | Question | Type de réponse |
|
|
48
47
|
|---|----------|-----------------|
|
|
49
|
-
| Q2.12 | Listez toutes les fonctionnalités que vous souhaitez dans ce système. Ne vous censurez pas. | Liste libre de fonctionnalités |
|
|
50
|
-
| Q2.13 | Parmi ces fonctionnalités, classez-les : lesquelles sont VITALES (le système n'a aucun sens sans elles), lesquelles sont IMPORTANTES (forte valeur ajoutée) et lesquelles sont OPTIONNELLES (confort) ? | Classification vital / important / optionnel |
|
|
51
48
|
| Q2.15 | Y a-t-il des choses que le système ne doit explicitement PAS faire ? Des limites claires à poser ? | Liste d'exclusions |
|
|
52
49
|
|
|
53
|
-
**
|
|
54
|
-
>
|
|
55
|
-
>
|
|
50
|
+
> **Note :** La detection des fonctionnalites IN-SCOPE est couverte par la reformulation (phase 2 de step-01).
|
|
51
|
+
> L'IA detecte les modules depuis le brief + domain research et les presente pour validation.
|
|
52
|
+
> Il n'est donc plus necessaire de demander au client de lister ses features (ex-Q2.12) ni de les classifier (ex-Q2.13).
|
|
56
53
|
|
|
57
54
|
---
|
|
58
55
|
|
|
59
|
-
## 2.5
|
|
56
|
+
## 2.5 Parcours principal (DEPLACE vers step-03)
|
|
60
57
|
|
|
61
|
-
> **
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|---|----------|-----------------|
|
|
65
|
-
| Q2.16 | Décrivez le parcours typique d'un utilisateur du début à la fin : il ouvre le système, que fait-il en premier ? | Liste d'étapes ordonnées |
|
|
66
|
-
| Q2.17 | À quels moments l'utilisateur doit-il prendre une décision ? Quelles sont les options possibles ? | Points de décision et options |
|
|
67
|
-
| Q2.18 | Que se passe-t-il quand quelque chose ne se déroule pas comme prévu ? Quels sont les cas particuliers ? | Scénarios alternatifs |
|
|
58
|
+
> **IMPORTANT :** Les questions Q2.16 (parcours), Q2.17 (decisions), Q2.18 (erreurs) ont ete **deplacees vers step-03-specify**.
|
|
59
|
+
> Elles alimentent directement les use cases par module et evitent la duplication cadrage → specification.
|
|
60
|
+
> En step-01, le parcours est capture dans la reformulation : "Le parcours type que j'ai compris est X → Y → Z. Correct ?"
|
|
68
61
|
|
|
69
62
|
---
|
|
70
63
|
|
|
71
|
-
## 2.6 Intégrations et systèmes externes
|
|
64
|
+
## 2.6 Intégrations et systèmes externes (CONDITIONNEL)
|
|
72
65
|
|
|
73
66
|
> **But :** Identifier les échanges de données avec l'extérieur et les migrations initiales.
|
|
67
|
+
> **Condition :** Poser UNIQUEMENT si le brief mentionne un systeme externe, une integration, une migration ou un import de donnees.
|
|
68
|
+
> Si non pertinent : `cadrage.externalIntegrations = []` et `cadrage.dataImport = null` (auto-rempli).
|
|
74
69
|
|
|
75
70
|
| # | Question | Type de réponse |
|
|
76
71
|
|---|----------|-----------------|
|
|
@@ -91,9 +86,7 @@
|
|
|
91
86
|
| Q2.1 (utilisateurs) | Utilisateurs hors entreprise mentionnés (clients, fournisseurs, partenaires) | "Quelles données ces utilisateurs externes doivent-ils consulter ou créer ? Quelles restrictions par rapport aux internes ?" |
|
|
92
87
|
| Q2.5 (tâches) | Tâches génériques | "Quand il arrive le matin et ouvre le système, quelle est sa première action ?" |
|
|
93
88
|
| Q2.9 (restrictions) | Réponse ambiguë | "Un employé voit-il les données salariales ? Un manager voit-il uniquement son équipe ou toute l'entreprise ?" |
|
|
94
|
-
| Q2.13 (indispensable) | Tout est indispensable | "Si vous ne pouviez garder que 3 fonctionnalités pour un premier lancement, lesquelles ?" |
|
|
95
89
|
| Q2.15 (exclusions) | "Je ne vois pas" | "Certains utilisateurs pourraient-ils s'attendre à des fonctionnalités que vous ne souhaitez PAS inclure ?" |
|
|
96
|
-
| Q2.16 (parcours) | Moins de 3 étapes | "Détaillons : l'utilisateur arrive sur l'écran d'accueil. Que voit-il ? Où clique-t-il ?" |
|
|
97
90
|
|
|
98
91
|
### Signaux d'alerte à détecter
|
|
99
92
|
|
|
@@ -101,18 +94,18 @@
|
|
|
101
94
|
|------------------|---------------------|----------------------|
|
|
102
95
|
| "Tous les utilisateurs font la même chose" | Rôles non différenciés | "Qui peut supprimer ? Qui ne fait que consulter ? Qui valide ?" |
|
|
103
96
|
| "Tout le monde doit tout voir" | Restrictions non définies | "Quelles données sont sensibles ? Un manager voit-il les données de toutes les équipes ou seulement la sienne ?" |
|
|
104
|
-
| Tout est vital (> 10 vitaux) | Classification non réfléchie | Appliquer le test de classification : "Si on enlevait X, le système aurait-il encore de la valeur ?" |
|
|
105
97
|
| Aucune exclusion identifiée | Périmètre non borné | "Y a-t-il des aspects qui relèvent d'un autre projet ou d'une version future ?" |
|
|
106
|
-
| Parcours linéaire sans alternative | Seul le cas idéal est décrit | "Que se passe-t-il à l'étape X si la condition Y n'est pas remplie ?" |
|
|
107
98
|
| "Nos clients doivent pouvoir..." ou "Les fournisseurs voient..." | Utilisateurs externes accédant au système | Classifier auto en 4b-bis. Approfondir les RÈGLES MÉTIER : quelles données, quelles actions, quelles restrictions ? |
|
|
108
99
|
|
|
109
100
|
---
|
|
110
101
|
|
|
111
102
|
## Mapping vers le cadrage
|
|
112
103
|
|
|
113
|
-
| Réponse | Alimente |
|
|
114
|
-
|
|
115
|
-
| Q2.1, Q2.5 | `cadrage.stakeholders[]` |
|
|
116
|
-
| Q2.9-Q2.11 | `cadrage.applicationRoles[]` |
|
|
117
|
-
| Q2.
|
|
118
|
-
| Q2.
|
|
104
|
+
| Réponse | Alimente | Remplissage |
|
|
105
|
+
|---------|----------|-------------|
|
|
106
|
+
| Q2.1, Q2.5 | `cadrage.stakeholders[]` | Reponse directe |
|
|
107
|
+
| Q2.9-Q2.11 | `cadrage.applicationRoles[]` | Reponse directe |
|
|
108
|
+
| Q2.15 | `cadrage.globalScope.excluded` | Reponse directe |
|
|
109
|
+
| Q2.19, Q2.20 | `cadrage.externalIntegrations[]`, `cadrage.dataImport` | Reponse directe OU auto-rempli (vide) si non pertinent |
|
|
110
|
+
| (reformulation) | `cadrage.globalScope.inScope` | Auto-deduit depuis brief + domain research, confirme en phase 2 |
|
|
111
|
+
| (step-03) | `cadrage.coverageMatrix` | Construit lors de la specification des use cases |
|