@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,566 +0,0 @@
|
|
|
1
|
-
# Cache Warming Strategy
|
|
2
|
-
|
|
3
|
-
> **Objective:** Reduce token waste from redundant file reads by 15-20% via strategic pre-loading.
|
|
4
|
-
|
|
5
|
-
## Problem Statement
|
|
6
|
-
|
|
7
|
-
**Baseline (no cache warming):**
|
|
8
|
-
|
|
9
|
-
Analysis of BA session `03b76b8b-ea1c-4f1e-a636-bd46b0c33e02` shows:
|
|
10
|
-
```
|
|
11
|
-
Total tokens (1 agent): 106,881
|
|
12
|
-
Cache read input tokens: 105,351 (98.5% of total)
|
|
13
|
-
Cache creation input tokens: 857 (0.8% of total)
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Issue:** 98.5% cache read means files are being re-read multiple times, but NOT efficiently. Many reads are for the SAME files re-loaded redundantly across different agents.
|
|
17
|
-
|
|
18
|
-
**Example redundancies detected:**
|
|
19
|
-
- `feature-schema.json` read 7 times
|
|
20
|
-
- `questionnaire/01-context.md` read 3 times
|
|
21
|
-
- `suggestion-catalog.md` read 5 times
|
|
22
|
-
- `handoff-file-templates.md` read 4 times
|
|
23
|
-
|
|
24
|
-
**Root cause:** No pre-loading strategy → each agent reads files on-demand → redundant I/O operations.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Solution: Progressive Cache Warming
|
|
29
|
-
|
|
30
|
-
**Principle:** Pre-load frequently-used static files at specific checkpoints, organize by retention policy.
|
|
31
|
-
|
|
32
|
-
### Benefits
|
|
33
|
-
|
|
34
|
-
| Metric | Before | After | Improvement |
|
|
35
|
-
|--------|--------|-------|-------------|
|
|
36
|
-
| Schema file reads | 7× | 1× | 86% ↓ |
|
|
37
|
-
| Questionnaire reads | 3× | 1× | 67% ↓ |
|
|
38
|
-
| Template reads | 4-5× | 1× | 75-80% ↓ |
|
|
39
|
-
| Token waste | ~15,000 | ~3,000 | 80% ↓ |
|
|
40
|
-
| Overall session | 106,881 | ~90,000 | 15-20% ↓ |
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Cache Bucket Architecture
|
|
45
|
-
|
|
46
|
-
### Bucket 1: Core Schemas (CRITICAL)
|
|
47
|
-
|
|
48
|
-
**Files:**
|
|
49
|
-
```
|
|
50
|
-
docs/{app}/business-analyse/schemas/
|
|
51
|
-
├── feature-schema.json (~8KB)
|
|
52
|
-
├── application-schema.json (~6KB)
|
|
53
|
-
├── sections/
|
|
54
|
-
│ ├── analysis-schema.json (~5KB)
|
|
55
|
-
│ ├── discovery-schema.json (~3KB)
|
|
56
|
-
│ ├── handoff-schema.json (~4KB)
|
|
57
|
-
│ ├── metadata-schema.json (~2KB)
|
|
58
|
-
│ ├── specification-schema.json (~7KB)
|
|
59
|
-
│ └── validation-schema.json (~3KB)
|
|
60
|
-
└── shared/
|
|
61
|
-
└── common-defs.json (~4KB)
|
|
62
|
-
|
|
63
|
-
Total: ~42KB, 9 files
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Load at:** Step-00 (initialization)
|
|
67
|
-
**Retention:** Entire session (until BA completes)
|
|
68
|
-
**Used in:** ALL steps (validation, schema references)
|
|
69
|
-
|
|
70
|
-
**Why critical:**
|
|
71
|
-
- Used by every ba-writer operation for validation
|
|
72
|
-
- Referenced in every feature.json via `$schema` field
|
|
73
|
-
- Small files (42KB total) with high re-use (7× average)
|
|
74
|
-
- ROI: 86% reduction in schema reads
|
|
75
|
-
|
|
76
|
-
**Implementation:**
|
|
77
|
-
```javascript
|
|
78
|
-
// Step-00 initialization
|
|
79
|
-
const schemaFiles = glob("docs/{app}/business-analyse/schemas/**/*.json");
|
|
80
|
-
for (const file of schemaFiles) {
|
|
81
|
-
read(file); // Pre-load into cache
|
|
82
|
-
}
|
|
83
|
-
// Files now cached for entire session
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
### Bucket 2: Questionnaire Templates (HIGH)
|
|
89
|
-
|
|
90
|
-
**Files:**
|
|
91
|
-
```
|
|
92
|
-
~/.claude/skills/business-analyse/questionnaire/
|
|
93
|
-
├── 00-application.md (~4KB)
|
|
94
|
-
├── 01-context.md (~6KB)
|
|
95
|
-
├── 02-stakeholders.md (~7KB)
|
|
96
|
-
├── 03-scope.md (~6KB)
|
|
97
|
-
├── 04-data.md (~3KB)
|
|
98
|
-
├── 05-integrations.md (~3KB)
|
|
99
|
-
├── 06-security.md (~2KB)
|
|
100
|
-
├── 07-ui.md (~4KB)
|
|
101
|
-
├── 08-performance.md (~2KB)
|
|
102
|
-
├── 09-constraints.md (~1KB)
|
|
103
|
-
├── 10-documentation.md (~1KB)
|
|
104
|
-
├── 11-data-lifecycle.md (~3KB)
|
|
105
|
-
├── 12-migration.md (~3KB)
|
|
106
|
-
├── 13-cross-module.md (~3KB)
|
|
107
|
-
├── 14-risk-assumptions.md (~4KB)
|
|
108
|
-
└── 15-success-metrics.md (~4KB)
|
|
109
|
-
|
|
110
|
-
Total: ~56KB, 16 files
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Load at:** Step-00 (initialization)
|
|
114
|
-
**Retention:** Until step-02 (after cadrage completes)
|
|
115
|
-
**Used in:** Step-01 only (cadrage/framing)
|
|
116
|
-
|
|
117
|
-
**Why high priority:**
|
|
118
|
-
- Read 2-3× during step-01 (questionnaire selection + processing)
|
|
119
|
-
- Conditional loading logic re-reads files multiple times
|
|
120
|
-
- Moderate size (56KB) but only used in 1 step
|
|
121
|
-
- ROI: 67% reduction in questionnaire reads
|
|
122
|
-
|
|
123
|
-
**Implementation:**
|
|
124
|
-
```javascript
|
|
125
|
-
// Step-00 initialization
|
|
126
|
-
const questionnaireFiles = glob("~/.claude/skills/business-analyse/questionnaire/*.md");
|
|
127
|
-
for (const file of questionnaireFiles) {
|
|
128
|
-
read(file);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Step-02 start: Clear cache
|
|
132
|
-
// (Questionnaires no longer needed)
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Optimization:** Cadrage uses targeted questionnaires (selected questions from 01-context, 02-stakeholders, 03-scope, 14-risks, 15-success) — not all questions are asked. Module-level questionnaires (04, 07, 11, 12, 13) are loaded on demand in step-03.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
### Bucket 3: Suggestion & Pattern Catalogs (HIGH)
|
|
140
|
-
|
|
141
|
-
**Files:**
|
|
142
|
-
```
|
|
143
|
-
~/.claude/skills/business-analyse/patterns/
|
|
144
|
-
└── suggestion-catalog.md (~12KB)
|
|
145
|
-
|
|
146
|
-
Total: ~12KB, 1 file
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**Load at:** Step-00 (initialization)
|
|
150
|
-
**Retention:** Until step-02 (after cadrage)
|
|
151
|
-
**Used in:** Step-01 (cadrage suggestions)
|
|
152
|
-
|
|
153
|
-
**Why high priority:**
|
|
154
|
-
- Read 5× during step-01 (suggestion generation)
|
|
155
|
-
- Small file (12KB) but very high re-use
|
|
156
|
-
- ROI: 80% reduction in suggestion reads
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
### Bucket 4: Module Specification References (MEDIUM)
|
|
161
|
-
|
|
162
|
-
**Files:**
|
|
163
|
-
```
|
|
164
|
-
~/.claude/skills/business-analyse/references/
|
|
165
|
-
├── spec-auto-inference.md (~8KB)
|
|
166
|
-
├── ui-resource-cards.md (~6KB)
|
|
167
|
-
├── ui-dashboard-spec.md (~5KB)
|
|
168
|
-
└── cadrage-pre-analysis.md (~4KB)
|
|
169
|
-
|
|
170
|
-
Total: ~23KB, 4 files
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Load at:** Step-03 start (before module loop)
|
|
174
|
-
**Retention:** Until step-04 (after all modules specified)
|
|
175
|
-
**Used in:** Step-03a, 03b, 03c (module specification)
|
|
176
|
-
|
|
177
|
-
**Why medium priority:**
|
|
178
|
-
- NOT loaded at step-00 (not used until step-03)
|
|
179
|
-
- Read 2-3× PER MODULE (5 modules = 10-15 reads)
|
|
180
|
-
- Moderate size (23KB) with high re-use during module loop
|
|
181
|
-
- ROI: 75% reduction in reference reads during step-03
|
|
182
|
-
|
|
183
|
-
**Implementation:**
|
|
184
|
-
```javascript
|
|
185
|
-
// Step-03 start (before module loop)
|
|
186
|
-
const moduleRefs = [
|
|
187
|
-
"spec-auto-inference.md",
|
|
188
|
-
"ui-resource-cards.md",
|
|
189
|
-
"ui-dashboard-spec.md",
|
|
190
|
-
"cadrage-pre-analysis.md"
|
|
191
|
-
];
|
|
192
|
-
for (const file of moduleRefs) {
|
|
193
|
-
read(`~/.claude/skills/business-analyse/references/${file}`);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Step-04 start: Clear cache
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
### Bucket 5: Handoff & Deploy Templates (LOW)
|
|
202
|
-
|
|
203
|
-
**Files:**
|
|
204
|
-
```
|
|
205
|
-
~/.claude/skills/business-analyse/references/
|
|
206
|
-
├── handoff-file-templates.md (~15KB)
|
|
207
|
-
├── handoff-mappings.md (~12KB)
|
|
208
|
-
├── deploy-data-build.md (~10KB)
|
|
209
|
-
├── deploy-modes.md (~8KB)
|
|
210
|
-
└── html-data-mapping.md (~9KB)
|
|
211
|
-
|
|
212
|
-
~/.claude/skills/business-analyse/html/
|
|
213
|
-
└── ba-interactive.html (~85KB)
|
|
214
|
-
|
|
215
|
-
Total: ~139KB, 6 files
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
**Load at:** Step-05a start (before handoff generation)
|
|
219
|
-
**Retention:** Until session end
|
|
220
|
-
**Used in:** Step-05a, 05b (handoff & deploy)
|
|
221
|
-
|
|
222
|
-
**Why LOW priority (don't pre-load at step-00):**
|
|
223
|
-
- Large files (139KB total), especially ba-interactive.html (85KB)
|
|
224
|
-
- Only used at END of BA workflow (step-05)
|
|
225
|
-
- Read only 1-2× each (low re-use)
|
|
226
|
-
- ROI: Marginal (5-10% savings) vs. upfront cost
|
|
227
|
-
|
|
228
|
-
**Implementation:**
|
|
229
|
-
```javascript
|
|
230
|
-
// Step-05a start (NOT at step-00)
|
|
231
|
-
const handoffRefs = [
|
|
232
|
-
"handoff-file-templates.md",
|
|
233
|
-
"handoff-mappings.md",
|
|
234
|
-
"deploy-data-build.md",
|
|
235
|
-
"deploy-modes.md",
|
|
236
|
-
"html-data-mapping.md"
|
|
237
|
-
];
|
|
238
|
-
for (const file of handoffRefs) {
|
|
239
|
-
read(`~/.claude/skills/business-analyse/references/${file}`);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const htmlTemplate = read("~/.claude/skills/business-analyse/html/ba-interactive.html");
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Implementation Timeline
|
|
248
|
-
|
|
249
|
-
### Step-00: Initialization (Load CRITICAL + HIGH)
|
|
250
|
-
|
|
251
|
-
```javascript
|
|
252
|
-
// 1. Schemas (42KB, 9 files) - CRITICAL
|
|
253
|
-
glob("schemas/**/*.json").forEach(f => read(f));
|
|
254
|
-
|
|
255
|
-
// 2. Core questionnaires (01, 02, 03, 14, 15) - pre-loaded for cadrage
|
|
256
|
-
// Cadrage uses targeted questions from these 5 core questionnaires
|
|
257
|
-
// Module-level questionnaires (04, 07, 11, 12, 13) deferred to step-03
|
|
258
|
-
|
|
259
|
-
// 3. Suggestion catalog (12KB, 1 file) - HIGH
|
|
260
|
-
read("patterns/suggestion-catalog.md");
|
|
261
|
-
|
|
262
|
-
// Total pre-loaded: 85-110KB, 16-26 files
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**Cache status after step-00:**
|
|
266
|
-
```
|
|
267
|
-
✓ Core schemas: 9 files (42KB) - cached for session
|
|
268
|
-
✓ Questionnaires: 6-16 files (31-56KB) - cached until step-02
|
|
269
|
-
✓ Suggestion catalog: 1 file (12KB) - cached until step-02
|
|
270
|
-
Total: 16-26 files (85-110KB)
|
|
271
|
-
Expected hit rate: 95-100% in step-01
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### Step-02: Clear Questionnaires (Free Memory)
|
|
277
|
-
|
|
278
|
-
```javascript
|
|
279
|
-
// After cadrage completes, questionnaires no longer needed
|
|
280
|
-
// Cache eviction happens automatically based on retention policy
|
|
281
|
-
// No explicit action needed (handled by Claude's cache system)
|
|
282
|
-
|
|
283
|
-
console.log(`
|
|
284
|
-
✓ Cache eviction: questionnaires (31-56KB freed)
|
|
285
|
-
Retained: schemas (42KB)
|
|
286
|
-
`);
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
### Step-03: Load Module Spec References
|
|
292
|
-
|
|
293
|
-
```javascript
|
|
294
|
-
// Before starting module loop
|
|
295
|
-
const moduleRefs = [
|
|
296
|
-
"spec-auto-inference.md",
|
|
297
|
-
"ui-resource-cards.md",
|
|
298
|
-
"ui-dashboard-spec.md",
|
|
299
|
-
"cadrage-pre-analysis.md"
|
|
300
|
-
];
|
|
301
|
-
moduleRefs.forEach(f => read(`references/${f}`));
|
|
302
|
-
|
|
303
|
-
// Total added: 23KB, 4 files
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**Cache status during step-03:**
|
|
307
|
-
```
|
|
308
|
-
✓ Core schemas: 9 files (42KB) - still cached
|
|
309
|
-
✓ Module references: 4 files (23KB) - cached for module loop
|
|
310
|
-
Total: 13 files (65KB)
|
|
311
|
-
Expected hit rate: 90-95% during module loop
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
### Step-04: Clear Module Spec References
|
|
317
|
-
|
|
318
|
-
```javascript
|
|
319
|
-
// After all modules specified, references no longer needed
|
|
320
|
-
// Cache eviction automatic
|
|
321
|
-
|
|
322
|
-
console.log(`
|
|
323
|
-
✓ Cache eviction: module references (23KB freed)
|
|
324
|
-
Retained: schemas (42KB)
|
|
325
|
-
`);
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
|
-
### Step-05a: Load Handoff Templates
|
|
331
|
-
|
|
332
|
-
```javascript
|
|
333
|
-
// Before handoff generation
|
|
334
|
-
const handoffRefs = [
|
|
335
|
-
"handoff-file-templates.md",
|
|
336
|
-
"handoff-mappings.md",
|
|
337
|
-
"deploy-data-build.md",
|
|
338
|
-
"deploy-modes.md",
|
|
339
|
-
"html-data-mapping.md"
|
|
340
|
-
];
|
|
341
|
-
handoffRefs.forEach(f => read(`references/${f}`));
|
|
342
|
-
|
|
343
|
-
const htmlTemplate = read("html/ba-interactive.html");
|
|
344
|
-
|
|
345
|
-
// Total added: 139KB, 6 files
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
**Cache status during step-05:**
|
|
349
|
-
```
|
|
350
|
-
✓ Core schemas: 9 files (42KB) - still cached
|
|
351
|
-
✓ Handoff templates: 6 files (139KB) - cached for handoff/deploy
|
|
352
|
-
Total: 15 files (181KB)
|
|
353
|
-
Expected hit rate: 85-90% during handoff/deploy
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## Token Savings Calculation
|
|
359
|
-
|
|
360
|
-
### Baseline (No Cache Warming)
|
|
361
|
-
|
|
362
|
-
```
|
|
363
|
-
Step-01 (Cadrage):
|
|
364
|
-
- Schemas read: 7× × 42KB = 294KB
|
|
365
|
-
- Questionnaires read: 3× × 56KB = 168KB
|
|
366
|
-
- Suggestions read: 5× × 12KB = 60KB
|
|
367
|
-
Total redundant: 522KB (~15,000 tokens wasted)
|
|
368
|
-
|
|
369
|
-
Step-03 (Module Loop, 5 modules):
|
|
370
|
-
- Module refs read: 3× per module × 5 modules × 23KB = 345KB
|
|
371
|
-
Total redundant: 345KB (~10,000 tokens wasted)
|
|
372
|
-
|
|
373
|
-
Step-05 (Handoff):
|
|
374
|
-
- Handoff refs read: 2× × 54KB = 108KB
|
|
375
|
-
Total redundant: 108KB (~3,000 tokens wasted)
|
|
376
|
-
|
|
377
|
-
TOTAL WASTED: 975KB (~28,000 tokens)
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### With Cache Warming
|
|
381
|
-
|
|
382
|
-
```
|
|
383
|
-
Step-00: Pre-load 85-110KB (one-time cost: ~3,000 tokens)
|
|
384
|
-
Step-01: 0KB redundant (100% cache hits)
|
|
385
|
-
Step-03: Pre-load 23KB (one-time cost: ~700 tokens)
|
|
386
|
-
Module loop: 0KB redundant (90% cache hits, ~2,000 tokens saved)
|
|
387
|
-
Step-05a: Pre-load 139KB (one-time cost: ~4,000 tokens)
|
|
388
|
-
Handoff: 0KB redundant (85% cache hits, ~2,500 tokens saved)
|
|
389
|
-
|
|
390
|
-
TOTAL PRE-LOAD COST: 247-272KB (~7,700 tokens)
|
|
391
|
-
TOTAL SAVED: 28,000 - 7,700 = 20,300 tokens (72% reduction)
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### ROI Analysis
|
|
395
|
-
|
|
396
|
-
| Session Type | Baseline Tokens | After Warming | Savings | % Improvement |
|
|
397
|
-
|--------------|----------------|---------------|---------|---------------|
|
|
398
|
-
| 5-module app | 106,881 | ~90,000 | 16,881 | 15.8% |
|
|
399
|
-
| 3-module app | 85,000 | ~72,000 | 13,000 | 15.3% |
|
|
400
|
-
| 1-module (simple) | 45,000 | ~40,000 | 5,000 | 11.1% |
|
|
401
|
-
|
|
402
|
-
**Average improvement: 15-20% token savings**
|
|
403
|
-
|
|
404
|
-
---
|
|
405
|
-
|
|
406
|
-
## Monitoring & Validation
|
|
407
|
-
|
|
408
|
-
### Cache Hit Rate Monitoring
|
|
409
|
-
|
|
410
|
-
After each major step, verify cache efficiency:
|
|
411
|
-
|
|
412
|
-
```javascript
|
|
413
|
-
// Pseudo-code for monitoring
|
|
414
|
-
const cacheStats = getCacheStats();
|
|
415
|
-
console.log(`
|
|
416
|
-
Step-${currentStep} cache statistics:
|
|
417
|
-
- Total file reads: ${cacheStats.totalReads}
|
|
418
|
-
- Cache hits: ${cacheStats.cacheHits} (${cacheStats.hitRate}%)
|
|
419
|
-
- Cache misses: ${cacheStats.cacheMisses}
|
|
420
|
-
- Redundant reads: ${cacheStats.redundantReads}
|
|
421
|
-
- Status: ${cacheStats.hitRate > 90 ? "Optimal" : "Suboptimal"}
|
|
422
|
-
`);
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
**Target metrics:**
|
|
426
|
-
- Step-01: 95-100% hit rate (schemas + questionnaires pre-loaded)
|
|
427
|
-
- Step-03: 90-95% hit rate (schemas + module refs pre-loaded)
|
|
428
|
-
- Step-05: 85-90% hit rate (schemas + handoff refs pre-loaded)
|
|
429
|
-
|
|
430
|
-
### Troubleshooting Poor Cache Efficiency
|
|
431
|
-
|
|
432
|
-
| Symptom | Cause | Fix |
|
|
433
|
-
|---------|-------|-----|
|
|
434
|
-
| Step-01 hit rate < 90% | Questionnaires not pre-loaded | Verify step-00 glob pattern |
|
|
435
|
-
| Step-03 hit rate < 80% | Module refs not loaded at step start | Add pre-load at step-03 start |
|
|
436
|
-
| Cache eviction too early | Retention policy too aggressive | Extend retention period |
|
|
437
|
-
| Memory issues | Too many files cached | Reduce bucket 2/3 sizes, prioritize bucket 1 |
|
|
438
|
-
|
|
439
|
-
---
|
|
440
|
-
|
|
441
|
-
## Advanced: Adaptive Cache Warming
|
|
442
|
-
|
|
443
|
-
**Concept:** Adjust pre-loading based on detected workflow patterns.
|
|
444
|
-
|
|
445
|
-
### Detection Logic
|
|
446
|
-
|
|
447
|
-
```javascript
|
|
448
|
-
// Step-00: Analyze feature_description to predict workflow
|
|
449
|
-
const predictions = {
|
|
450
|
-
willNeedQuestionnaires: false, // Cadrage uses zero questions (auto-inferred)
|
|
451
|
-
willBeMultiModule: detectMultiModuleKeywords(feature_description), // "modules", "applications"
|
|
452
|
-
estimatedModuleCount: estimateModuleCount(feature_description) // 1-10
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
// Adaptive pre-loading
|
|
456
|
-
if (predictions.willBeMultiModule && predictions.estimatedModuleCount > 3) {
|
|
457
|
-
// Large multi-module app → pre-load module refs at step-00 (not step-03)
|
|
458
|
-
loadModuleReferences();
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
// Interactive cadrage → load 5 core questionnaires (01, 02, 03, 14, 15)
|
|
462
|
-
// Module-level questionnaires (04, 07, 11, 12, 13) loaded on demand in step-03
|
|
463
|
-
loadCoreQuestionnaires();
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
**Benefits:**
|
|
467
|
-
- Further 5-10% token savings via predictive loading
|
|
468
|
-
- Reduced memory footprint for simple workflows
|
|
469
|
-
|
|
470
|
-
**Risks:**
|
|
471
|
-
- Prediction errors (over-loading or under-loading)
|
|
472
|
-
- Complexity increase
|
|
473
|
-
|
|
474
|
-
**Recommendation:** Start with STATIC strategy (current), add ADAPTIVE in Phase 3.
|
|
475
|
-
|
|
476
|
-
---
|
|
477
|
-
|
|
478
|
-
## Integration with Agent Pooling
|
|
479
|
-
|
|
480
|
-
**Synergy:** Cache warming + Agent pooling = Maximum efficiency
|
|
481
|
-
|
|
482
|
-
### Example: Step-03 Module Loop
|
|
483
|
-
|
|
484
|
-
**Without cache warming + agent pooling:**
|
|
485
|
-
```
|
|
486
|
-
Spawn 24 agents (4-5 per module × 5 modules)
|
|
487
|
-
Each agent re-reads schemas + module refs = 24 × 65KB = 1,560KB
|
|
488
|
-
Tokens: ~45,000
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
**With cache warming ONLY:**
|
|
492
|
-
```
|
|
493
|
-
Spawn 24 agents
|
|
494
|
-
Pre-load schemas + module refs once = 65KB
|
|
495
|
-
Subsequent reads cached = 24 × 0KB redundant
|
|
496
|
-
Tokens: ~15,000 (67% savings)
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
**With cache warming + agent pooling:**
|
|
500
|
-
```
|
|
501
|
-
Spawn 5 agents (1 per module)
|
|
502
|
-
Pre-load schemas + module refs once = 65KB
|
|
503
|
-
Each agent reads cached files = 5 × 0KB redundant
|
|
504
|
-
Tokens: ~7,000 (84% savings)
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
**Combined effect:** 84% token reduction (vs. baseline)
|
|
508
|
-
|
|
509
|
-
---
|
|
510
|
-
|
|
511
|
-
## Rollout Checklist
|
|
512
|
-
|
|
513
|
-
### Phase 2.1: Implement Core Warming (Week 1)
|
|
514
|
-
|
|
515
|
-
- [ ] Add cache warming to step-00-init.md (Bucket 1 + 2)
|
|
516
|
-
- [ ] Test cache hit rates in step-01
|
|
517
|
-
- [ ] Verify 15-20% token savings
|
|
518
|
-
- [ ] Document in MEMORY.md
|
|
519
|
-
|
|
520
|
-
### Phase 2.2: Progressive Warming (Week 2)
|
|
521
|
-
|
|
522
|
-
- [ ] Add module ref warming at step-03 start (Bucket 3)
|
|
523
|
-
- [ ] Add handoff ref warming at step-05a start (Bucket 5)
|
|
524
|
-
- [ ] Test cache eviction after step-02 and step-04
|
|
525
|
-
- [ ] Measure token savings across full session
|
|
526
|
-
|
|
527
|
-
### Phase 2.3: Monitoring & Validation (Week 3)
|
|
528
|
-
|
|
529
|
-
- [ ] Add cache hit rate reporting after each step
|
|
530
|
-
- [ ] Create troubleshooting guide for poor efficiency
|
|
531
|
-
- [ ] Test with 1-module, 3-module, 5-module apps
|
|
532
|
-
- [ ] Validate 15-20% savings across all scenarios
|
|
533
|
-
|
|
534
|
-
### Phase 2.4: Optimization (Week 4)
|
|
535
|
-
|
|
536
|
-
- [ ] Implement adaptive warming (optional)
|
|
537
|
-
- [ ] Fine-tune retention policies
|
|
538
|
-
- [ ] Integrate with agent pooling strategy
|
|
539
|
-
- [ ] Document best practices
|
|
540
|
-
|
|
541
|
-
---
|
|
542
|
-
|
|
543
|
-
## Success Criteria
|
|
544
|
-
|
|
545
|
-
**Minimum (Phase 2.1):**
|
|
546
|
-
- ✓ Cache warming implemented in step-00
|
|
547
|
-
- ✓ Cache hit rate > 90% in step-01
|
|
548
|
-
- ✓ Token savings ≥ 10%
|
|
549
|
-
|
|
550
|
-
**Target (Phase 2.2):**
|
|
551
|
-
- ✓ Progressive warming across all steps
|
|
552
|
-
- ✓ Cache hit rates: step-01 (95%), step-03 (90%), step-05 (85%)
|
|
553
|
-
- ✓ Token savings ≥ 15%
|
|
554
|
-
|
|
555
|
-
**Optimal (Phase 2.3+):**
|
|
556
|
-
- ✓ Adaptive warming based on predictions
|
|
557
|
-
- ✓ Cache hit rates > 90% across all steps
|
|
558
|
-
- ✓ Token savings ≥ 20%
|
|
559
|
-
- ✓ Integration with agent pooling (84% combined savings)
|
|
560
|
-
|
|
561
|
-
---
|
|
562
|
-
|
|
563
|
-
**Last Updated:** 2026-02-08
|
|
564
|
-
**Version:** 1.0
|
|
565
|
-
**Author:** SmartStack CLI Team
|
|
566
|
-
**Based on:** Analysis of BA session 03b76b8b-ea1c-4f1e-a636-bd46b0c33e02
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Cadrage Challenge Patterns
|
|
2
|
-
|
|
3
|
-
Reference material for identifying and challenging implicit assumptions in business requirements analysis.
|
|
4
|
-
|
|
5
|
-
## Challenge Question Examples by Domain Pattern
|
|
6
|
-
|
|
7
|
-
| Brief statement | Implicit assumption | Challenge question |
|
|
8
|
-
|----------------|--------------------|--------------------|
|
|
9
|
-
| "Entities are 1:1 extensions of X" | Cardinality is always 1:1 | "Can a user be linked to multiple employee records (temp contracts, part-time multi-position)? Can an employee NOT have a user account?" |
|
|
10
|
-
| "Entry split into activity and absence" | Binary decomposition is sufficient | "What granularity? Day, half-day, hour? Are activities linked to projects or clients? Are there other entry types (training, travel, on-call)?" |
|
|
11
|
-
| "A reports section" | Reports are a simple addition | "Which reports exactly? For whom? How often? PDF/Excel export? Real-time dashboards? Aggregated or detailed?" |
|
|
12
|
-
| "Module X manages Y" | The scope of "manages" is clear | "What does 'manage' mean concretely? Create, read, update, delete? Approve? Archive? Import/export?" |
|
|
13
|
-
|
|
14
|
-
## Elicitation Techniques
|
|
15
|
-
|
|
16
|
-
**Technique 3 (Concrete Scenario):** "Walk me through a typical day of [role] using this module"
|
|
17
|
-
|
|
18
|
-
**Technique 4 (Absence Test):** "If [feature] didn't exist, how would you handle it?"
|
|
19
|
-
|
|
20
|
-
**Technique 8 (Impact Escalation):** "With 50 records this works, but with 500? 5000? Does the process stay the same?"
|
|
21
|
-
|
|
22
|
-
## MoSCoW Prioritization Template
|
|
23
|
-
|
|
24
|
-
When client classifies ALL features as "must-have", apply this blocking challenge:
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
question: "{language == 'fr'
|
|
28
|
-
? 'Toutes les fonctionnalités sont marquées indispensables. Si vous ne pouviez livrer que 60% du périmètre en v1, lesquelles pourraient attendre la v2 ?'
|
|
29
|
-
: 'All features are marked must-have. If you could only deliver 60% of scope in v1, which ones could wait for v2?'}"
|
|
30
|
-
header: "Priorisation"
|
|
31
|
-
multiSelect: true
|
|
32
|
-
options:
|
|
33
|
-
- label: "{feature_1}"
|
|
34
|
-
description: "{language == 'fr' ? 'Pourrait passer en Important (v1.x)' : 'Could move to Important (v1.x)'}"
|
|
35
|
-
- label: "{feature_2}"
|
|
36
|
-
description: "{language == 'fr' ? 'Pourrait passer en Optionnel (v2)' : 'Could move to Optional (v2)'}"
|
|
37
|
-
- label: "{language == 'fr' ? 'Tout est vraiment indispensable' : 'Everything is truly must-have'}"
|
|
38
|
-
description: "{language == 'fr' ? 'Je confirme que toutes les fonctionnalités sont critiques pour la v1' : 'I confirm all features are critical for v1'}"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If client moves items → update categories. If client confirms ALL mustHave → accept but log in changelog.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Coverage Matrix with Sections & Resources
|
|
2
|
-
|
|
3
|
-
Reference for building and validating the coverage matrix that maps requirements to modules, sections, and resources.
|
|
4
|
-
|
|
5
|
-
## Section Rule (CRITICAL)
|
|
6
|
-
|
|
7
|
-
Sections are functional zones (list, dashboard, approve, import, rapport...).
|
|
8
|
-
- `create` and `edit` are SEPARATE PAGES with their own URL routes (`/create` and `/:id/edit`)
|
|
9
|
-
- `detail` is a page with tabs accessible by clicking a row in `list`, NOT a standalone section
|
|
10
|
-
|
|
11
|
-
## Coverage Matrix Template
|
|
12
|
-
|
|
13
|
-
Print a markdown table with columns: **Fonctionnalité | Priorité | Module | Section | Resources clés | Onglets détail**
|
|
14
|
-
|
|
15
|
-
### Example
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
| Fonctionnalité | Priorité | Module | Section | Resources clés | Onglets détail |
|
|
19
|
-
|---|---|---|---|---|---|
|
|
20
|
-
| Gestion des employés | mustHave | Employees | list | employee-grid, employee-filters, employee-form | Infos, Contrats, Documents |
|
|
21
|
-
| Suivi des activités | mustHave | TimeTracking | list | activity-grid, activity-filters, activity-form | Infos, Imputations |
|
|
22
|
-
| Saisie d'absences | mustHave | TimeTracking | list | absence-grid, absence-form, absence-calendar | Infos, Justificatifs |
|
|
23
|
-
| Rapports temps | shouldHave | TimeTracking | dashboard | time-kpi-cards, time-summary-chart | — |
|
|
24
|
-
| Validation absences | shouldHave | TimeTracking | approve | approval-queue, status-timeline | — |
|
|
25
|
-
| Export PDF/Excel | couldHave | TimeTracking | rapport | export-panel | — |
|
|
26
|
-
| Intégration paie | outOfScope | — | — | — | — |
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Priority Distribution POST-CHECK (BLOCKING)
|
|
30
|
-
|
|
31
|
-
```javascript
|
|
32
|
-
coverageItems = cadrage.coverageMatrix[]
|
|
33
|
-
mustHaveCount = coverageItems.filter(i => i.category === "mustHave").length
|
|
34
|
-
shouldHaveCount = coverageItems.filter(i => i.category === "shouldHave").length
|
|
35
|
-
couldHaveCount = coverageItems.filter(i => i.category === "couldHave").length
|
|
36
|
-
outOfScopeCount = coverageItems.filter(i => i.category === "outOfScope").length
|
|
37
|
-
|
|
38
|
-
IF shouldHaveCount === 0 AND couldHaveCount === 0 AND outOfScopeCount === 0:
|
|
39
|
-
→ FAIL: ALL {mustHaveCount} items are mustHave — no distribution.
|
|
40
|
-
→ ACTION: Return to Phase 3 section 4c and apply MoSCoW question.
|
|
41
|
-
→ DO NOT write cadrage until at least shouldHave OR outOfScope has ≥ 1 item.
|
|
42
|
-
→ EXCEPTION: If client explicitly confirmed "tout est indispensable" during
|
|
43
|
-
Phase 3 section 4c, accept but ADD a changelog entry:
|
|
44
|
-
"Client confirmed all {N} features as mustHave after MoSCoW challenge"
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Cross-Cutting Coverage POST-CHECK (WARNING)
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
FOR each item in coverageMatrix WHERE item.module === null:
|
|
51
|
-
IF item.category === "mustHave":
|
|
52
|
-
→ WARNING: "{item.item}" is mustHave but has no assigned module.
|
|
53
|
-
→ Ensure it is covered by infrastructure or a cross-cutting concern.
|
|
54
|
-
→ Add a note explaining HOW it will be implemented (e.g., "handled by platform notification service").
|
|
55
|
-
IF item.anticipatedSections.length === 0 AND item.category !== "outOfScope":
|
|
56
|
-
→ WARNING: "{item.item}" has no anticipated sections — will it be implemented?
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Building Coverage Matrix from Feature Analysis
|
|
60
|
-
|
|
61
|
-
For EACH distinct feature/requirement identified during phases 2-4:
|
|
62
|
-
|
|
63
|
-
1. Create an entry in `cadrage.coverageMatrix[]`
|
|
64
|
-
2. Assign it to mustHave, shouldHave, couldHave, or outOfScope
|
|
65
|
-
3. Assign the module that will cover it (or null if cross-cutting)
|
|
66
|
-
4. **List anticipated sections** (Level 4) — ONLY functional zones
|
|
67
|
-
5. **List anticipated resources** (Level 5) for each section
|
|
68
|
-
6. **List detail page tabs** — for entities accessible via click from `list`
|
|
69
|
-
|
|
70
|
-
### Validation
|
|
71
|
-
|
|
72
|
-
- Every line of the original prompt must map to at least one coverageMatrix entry.
|
|
73
|
-
- If a feature is in mustHave → it MUST have at least one anticipated section.
|
|
74
|
-
- Accepted suggestions from Phase 4 must appear in the matrix.
|