@atlashub/smartstack-cli 4.17.0 → 4.18.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 +9 -9
- package/templates/agents/ba-writer.md +13 -8
- package/templates/skills/business-analyse/SKILL.md +4 -4
- package/templates/skills/business-analyse/_rules.md +142 -0
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +22 -7
- package/templates/skills/business-analyse/references/acceptance-criteria.md +4 -4
- package/templates/skills/business-analyse/references/agent-module-prompt.md +13 -9
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-data-build.md +3 -2
- package/templates/skills/business-analyse/references/prd-generation.md +15 -10
- package/templates/skills/business-analyse/references/robustness-checks.md +12 -9
- package/templates/skills/business-analyse/references/team-orchestration.md +77 -6
- package/templates/skills/business-analyse/references/validation-checklist.md +7 -4
- package/templates/skills/business-analyse/schemas/shared/common-defs.json +2 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +31 -63
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +97 -7
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +3 -23
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +2 -3
- package/templates/skills/business-analyse/steps/step-03b-ui.md +2 -22
- package/templates/skills/business-analyse/steps/step-03c-compile.md +44 -139
- package/templates/skills/business-analyse/steps/step-03d-validate.md +198 -290
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +117 -20
- package/templates/skills/ralph-loop/SKILL.md +8 -3
- package/templates/skills/ralph-loop/references/category-completeness.md +20 -4
- package/templates/skills/ralph-loop/references/compact-loop.md +80 -48
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +3 -1
- package/templates/skills/ralph-loop/references/parallel-execution.md +27 -27
- package/templates/skills/ralph-loop/steps/step-00-init.md +19 -9
- package/templates/skills/ralph-loop/steps/step-01-task.md +10 -2
- package/templates/skills/ralph-loop/steps/step-02-execute.md +9 -4
- package/templates/skills/ralph-loop/steps/step-03-commit.md +1 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +5 -21
- package/templates/skills/ralph-loop/steps/step-05-report.md +6 -1
|
@@ -576,6 +576,41 @@ Display:
|
|
|
576
576
|
"═══ Progress: {completedModules.length}/{moduleOrder.length} modules ═══"
|
|
577
577
|
```
|
|
578
578
|
|
|
579
|
+
### 4b-bis. Deploy Incremental Interactive HTML (MANDATORY)
|
|
580
|
+
|
|
581
|
+
> **Module agents do NOT generate the HTML** — this responsibility belongs to the team lead.
|
|
582
|
+
> After each layer is approved, the team lead generates/updates the interactive HTML with all completed modules.
|
|
583
|
+
> This gives clients early access to review completed modules while the next layer is being specified.
|
|
584
|
+
|
|
585
|
+
**Execute the incremental HTML deployment:**
|
|
586
|
+
|
|
587
|
+
1. **Read** the HTML template: `html/ba-interactive.html` (relative to skill root `~/.claude/skills/business-analyse/html/`)
|
|
588
|
+
2. **Read** `references/html-data-mapping.md` for the complete FEATURE_DATA and EMBEDDED_ARTIFACTS mapping specification
|
|
589
|
+
3. **Read** the master feature.json (application level)
|
|
590
|
+
4. **Read** EACH completed module's feature.json (all modules in `teamContext.completedModules`)
|
|
591
|
+
5. **Build FEATURE_DATA** following `references/validate-incremental-html.md`:
|
|
592
|
+
- `metadata`, `cadrage`, `modules[]`, `dependencies[]` → from master feature.json
|
|
593
|
+
- `moduleSpecs[moduleCode]` → only for modules with status "specified" (completed so far)
|
|
594
|
+
- `consolidation` → empty `{ interactions: [], e2eFlows: [] }` (not yet consolidated)
|
|
595
|
+
- `handoff` → empty `{}` (not yet handed off)
|
|
596
|
+
- `cadrage.scope` MUST use HTML keys (`vital`/`important`/`optional`/`excluded`), NOT feature.json keys
|
|
597
|
+
6. **Build EMBEDDED_ARTIFACTS** with wireframes for completed modules:
|
|
598
|
+
- Rename fields: `mockupFormat` → `format`, `mockup` → `content`
|
|
599
|
+
- Safety net: check BOTH key names (`uiWireframes` / `wireframes`, `mockup` / `ascii` / `content`)
|
|
600
|
+
- Include dependency graph from master
|
|
601
|
+
7. **Replace placeholders** in template: `{{FEATURE_DATA}}`, `{{EMBEDDED_ARTIFACTS}}`, `{{APPLICATION_NAME}}`, `{{VERSION}}`, etc.
|
|
602
|
+
8. **Write** to `docs/{app}/business-analyse/v{version}/ba-interactive.html`
|
|
603
|
+
|
|
604
|
+
**Display confirmation:**
|
|
605
|
+
```
|
|
606
|
+
✓ Interactive HTML updated (incremental):
|
|
607
|
+
Path: docs/{app}/business-analyse/v{version}/ba-interactive.html
|
|
608
|
+
Modules included: {completedModules.length}/{totalModules} specified
|
|
609
|
+
→ Client can open in browser to review completed modules now.
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
> **Reference:** See [references/validate-incremental-html.md](validate-incremental-html.md) for the complete deployment process and field mapping details.
|
|
613
|
+
|
|
579
614
|
### 4c. Build Updated Context for Next Layer
|
|
580
615
|
|
|
581
616
|
Before spawning the next layer's agents, rebuild the `completedModulesSummary`:
|
|
@@ -768,10 +803,45 @@ Task({
|
|
|
768
803
|
You are a handoff agent for business-analyse ${workflow.mode === "project" ? `project "${projectName}"` : `application "${appName}"`}.
|
|
769
804
|
|
|
770
805
|
## Your Mission
|
|
771
|
-
Execute the handoff sequence (steps 05a + 05b + 05c)
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
806
|
+
Execute the handoff sequence (steps 05a + 05b + 05c). ALL THREE STEPS ARE MANDATORY.
|
|
807
|
+
|
|
808
|
+
### Step 1: Handoff (step-05a-handoff.md)
|
|
809
|
+
Load steps/step-05a-handoff.md and execute:
|
|
810
|
+
- File mapping (7 categories: domain, application, infrastructure, api, frontend, seedData, tests)
|
|
811
|
+
- BR-to-code mapping
|
|
812
|
+
- API endpoint summary
|
|
813
|
+
|
|
814
|
+
### Step 2: Deploy Artifacts (step-05b-deploy.md)
|
|
815
|
+
Load steps/step-05b-deploy.md and execute ALL sections:
|
|
816
|
+
|
|
817
|
+
a. **Generate prd.json** for each module via \`ss derive-prd\` (section 1)
|
|
818
|
+
b. **Initialize progress tracker** (section 2)
|
|
819
|
+
c. **Update BA manifest** docs/index.json (section 3)
|
|
820
|
+
d. **CRITICAL — Deploy ba-interactive.html** (sections 4-8):
|
|
821
|
+
- Read HTML template from \`html/ba-interactive.html\` (relative to skill root \`~/.claude/skills/business-analyse/html/\`)
|
|
822
|
+
- Read \`references/html-data-mapping.md\` for the EXACT FEATURE_DATA and EMBEDDED_ARTIFACTS field mapping
|
|
823
|
+
- Read the master feature.json (application level)
|
|
824
|
+
- Read EACH module feature.json (module level)
|
|
825
|
+
- Build FEATURE_DATA object (metadata, cadrage, modules, moduleSpecs, consolidation, handoff)
|
|
826
|
+
- FEATURE_DATA.moduleSpecs MUST have ONE entry per module (empty = BUG)
|
|
827
|
+
- FEATURE_DATA.cadrage.scope MUST use HTML keys (vital/important/optional/excluded)
|
|
828
|
+
- FEATURE_DATA.metadata.analysisMode MUST be set (always "interactive")
|
|
829
|
+
- Build EMBEDDED_ARTIFACTS object (wireframes with field renames, e2eFlows, dependencyGraph)
|
|
830
|
+
- Rename: mockupFormat → format, mockup → content
|
|
831
|
+
- Replace placeholders: {{FEATURE_DATA}}, {{EMBEDDED_ARTIFACTS}}, {{APPLICATION_NAME}}, {{VERSION}}, etc.
|
|
832
|
+
- Write to docs/{app}/business-analyse/v{version}/ba-interactive.html
|
|
833
|
+
- Run POST-CHECK: file size > 100KB, moduleSpecs non-empty for ALL modules, cadrage.scope uses HTML keys
|
|
834
|
+
|
|
835
|
+
> **WARNING:** The ba-interactive.html is the PRIMARY deliverable of the BA.
|
|
836
|
+
> Generating PRD files WITHOUT generating the HTML is a BLOCKING BUG.
|
|
837
|
+
> The HTML MUST be pre-populated with ALL analysis data (not an empty template).
|
|
838
|
+
|
|
839
|
+
### Step 3: Quality Gate (step-05c-ralph-readiness.md)
|
|
840
|
+
Load steps/step-05c-ralph-readiness.md and execute:
|
|
841
|
+
- ULTRATHINK quality review
|
|
842
|
+
- Validate all handoffs are complete
|
|
843
|
+
- Verify PRD structural integrity
|
|
844
|
+
- Verify ba-interactive.html exists and is > 100KB
|
|
775
845
|
|
|
776
846
|
## Context
|
|
777
847
|
${workflow.mode === "project" ? `
|
|
@@ -788,8 +858,9 @@ ${workflow.mode === "project" ? `
|
|
|
788
858
|
|
|
789
859
|
## Output
|
|
790
860
|
Send HANDOFF_READY with:
|
|
791
|
-
- PRD files generated (list)
|
|
792
|
-
-
|
|
861
|
+
- PRD files generated (list with file paths)
|
|
862
|
+
- ba-interactive.html deployed (path + file size — MUST be > 100KB)
|
|
863
|
+
- BA manifest updated (docs/index.json entry count)
|
|
793
864
|
- Quality gate result (PASS/FAIL with details)
|
|
794
865
|
|
|
795
866
|
## Communication
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Module Specification Checklist
|
|
2
2
|
|
|
3
|
+
> **Authoritative minimums:** See `_rules.md` § "Minimum Counts" for the single source of truth on all minimum thresholds.
|
|
3
4
|
> **CRITICAL:** This checklist MUST be FULLY COMPLETED before marking module status = "specified".
|
|
4
5
|
> **Rationale:** Prevents incomplete modules from reaching handoff, reduces ralph-loop failures.
|
|
5
6
|
|
|
@@ -12,7 +13,7 @@ const checklist = {
|
|
|
12
13
|
// SECTION 1: DATA MODEL (BLOCKING)
|
|
13
14
|
entities: {
|
|
14
15
|
minimum: 2,
|
|
15
|
-
actual:
|
|
16
|
+
actual: analysis.entities.length,
|
|
16
17
|
status: actual >= minimum ? "PASS" : "FAIL",
|
|
17
18
|
blocking: true,
|
|
18
19
|
details: "At least 2 entities required for a meaningful module"
|
|
@@ -34,7 +35,7 @@ const checklist = {
|
|
|
34
35
|
|
|
35
36
|
entitySchemaCompliance: {
|
|
36
37
|
check: "All entities use canonical format: attributes[] (not fields[]), relationships[] array present",
|
|
37
|
-
status:
|
|
38
|
+
status: analysis.entities.every(e =>
|
|
38
39
|
Array.isArray(e.attributes) && e.attributes.length > 0 &&
|
|
39
40
|
!e.fields && !e.tableName && !e.primaryKey
|
|
40
41
|
) ? "PASS" : "FAIL",
|
|
@@ -189,7 +190,7 @@ const checklist = {
|
|
|
189
190
|
// SECTION 6: I18N & MESSAGES (BLOCKING)
|
|
190
191
|
i18nKeys: {
|
|
191
192
|
minimum: 42, // Realistic minimum for a module
|
|
192
|
-
actual: specification.i18nKeys.length,
|
|
193
|
+
actual: Object.keys(specification.i18nKeys || {}).length,
|
|
193
194
|
status: actual >= minimum ? "PASS" : "FAIL",
|
|
194
195
|
blocking: true,
|
|
195
196
|
details: "Keys needed: entities (×2), fields, messages, validation, navigation"
|
|
@@ -212,8 +213,10 @@ const checklist = {
|
|
|
212
213
|
|
|
213
214
|
// SECTION 7: SEED DATA (BLOCKING)
|
|
214
215
|
seedDataCore: {
|
|
215
|
-
check: "All
|
|
216
|
+
check: "All 9 CORE seed data sections present",
|
|
216
217
|
requiredSections: [
|
|
218
|
+
"navigationApplications",
|
|
219
|
+
"applicationRoles",
|
|
217
220
|
"navigationModules",
|
|
218
221
|
"navigationSections",
|
|
219
222
|
"navigationResources",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
"moduleStatus": {
|
|
18
18
|
"type": "string",
|
|
19
|
-
"
|
|
19
|
+
"description": "Status of a module or application through the BA workflow. Module flow: draft → analysed → specified → approved → handed-off. Application flow: draft → framed → decomposed → specified → consolidated → handed-off.",
|
|
20
|
+
"enum": ["draft", "framed", "decomposed", "analysed", "specified", "rejected", "approved", "consolidated", "handed-off"]
|
|
20
21
|
},
|
|
21
22
|
|
|
22
23
|
"priority": {
|
|
@@ -90,24 +90,15 @@ Execute workflow detection algorithm:
|
|
|
90
90
|
3. **Similarity Analysis:** Score user intent against existing apps (>= 80 = strong match)
|
|
91
91
|
4. **Decision Tree:** Prompt user with relevant options
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
const detectionResult = detectWorkflowType(feature_description, existingApps);
|
|
93
|
+
**Decision logic:**
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- Review mode troubleshooting (if review mode failed)
|
|
104
|
-
|
|
105
|
-
→ Resolve ambiguity with user clarification
|
|
106
|
-
|
|
107
|
-
ELSE:
|
|
108
|
-
Workflow detected: {detectionResult.workflow_type} ✓
|
|
109
|
-
→ Continue to application name determination
|
|
110
|
-
```
|
|
95
|
+
1. Run workflow detection: compare `{feature_description}` against `existingApps` using similarity scoring.
|
|
96
|
+
2. **IF detection fails or is ambiguous:**
|
|
97
|
+
- **CONDITIONAL LOAD:** Read `references/detection-strategies.md` for detailed scoring algorithm, decision tree, and error handling.
|
|
98
|
+
- Resolve ambiguity with user clarification.
|
|
99
|
+
3. **IF detection succeeds:**
|
|
100
|
+
- `Workflow detected: {workflow_type} ✓`
|
|
101
|
+
- Continue to application name determination.
|
|
111
102
|
|
|
112
103
|
**Key decision points:**
|
|
113
104
|
1. IF review mode → load ba-review.json, skip to step-06-review.md
|
|
@@ -137,44 +128,30 @@ existing_projects: array of { projectName, projectId, applications[], version }
|
|
|
137
128
|
|
|
138
129
|
**Detection patterns (ANY match = multi-app detected):**
|
|
139
130
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/premier[e]?\s+application.*deuxième\s+application/is,
|
|
146
|
-
/app\s*1\s*[:.].*app\s*2\s*[:.]*/is,
|
|
147
|
-
// English patterns
|
|
148
|
-
/an?\s+application\s+(for\s+)?\w+.*an?\s+application\s+(for\s+)?\w+/is,
|
|
149
|
-
/application\s*#?\d\s*[:.].*application\s*#?\d\s*[:.]*/is,
|
|
150
|
-
/first\s+app.*second\s+app/is,
|
|
151
|
-
];
|
|
131
|
+
French patterns:
|
|
132
|
+
- "une application X ... une application Y" (two occurrences of "une application")
|
|
133
|
+
- "application 1: X ... application 2: Y" (numbered applications)
|
|
134
|
+
- "première application ... deuxième application"
|
|
135
|
+
- "app 1: ... app 2: ..."
|
|
152
136
|
|
|
153
|
-
|
|
154
|
-
|
|
137
|
+
English patterns:
|
|
138
|
+
- "an application (for) X ... an application (for) Y" (two occurrences)
|
|
139
|
+
- "application #1: ... application #2: ..." (numbered)
|
|
140
|
+
- "first app ... second app"
|
|
141
|
+
|
|
142
|
+
If ANY of these patterns is found in `{feature_description}`, set `isMultiApp = true`.
|
|
155
143
|
|
|
156
144
|
**IF multi-app detected:**
|
|
157
145
|
|
|
158
146
|
1. Extract candidate applications from the prompt:
|
|
159
147
|
|
|
160
|
-
|
|
161
|
-
// Parse the prompt to identify application boundaries
|
|
162
|
-
// Each "une application X" / "an application X" block = one candidate
|
|
163
|
-
const candidates = extractApplicationCandidates(feature_description);
|
|
164
|
-
// Result example:
|
|
165
|
-
// [
|
|
166
|
-
// { name: "RH", description: "gestion des employes, conges, temps", modules: ["Employes", "Conges", "Temps"] },
|
|
167
|
-
// { name: "Projet", description: "gestion des projets, saisie du temps", modules: ["Projets", "Temps"] }
|
|
168
|
-
// ]
|
|
169
|
-
```
|
|
148
|
+
**Extraction algorithm (3 steps):**
|
|
170
149
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
// Example: sharedModules = ["Temps"] → appears in both RH and Projet
|
|
177
|
-
```
|
|
150
|
+
1. **Identify boundaries:** Split the prompt at each "une application" / "an application" occurrence. Each block = one candidate.
|
|
151
|
+
2. **Extract per candidate:** For each block, derive `name` (application name), `description` (summary of purpose), and `modules[]` (listed modules/features).
|
|
152
|
+
- Example result: `[{ name: "RH", description: "gestion des employes, conges, temps", modules: ["Employes", "Conges", "Temps"] }, ...]`
|
|
153
|
+
3. **Detect shared modules:** Collect all module names across all candidates. Any module appearing in more than one candidate is a shared module.
|
|
154
|
+
- Example: `sharedModules = ["Temps"]` (appears in both RH and Projet)
|
|
178
155
|
|
|
179
156
|
3. Display detection result and confirm:
|
|
180
157
|
|
|
@@ -346,26 +323,17 @@ See [references/init-schema-deployment.md](../references/init-schema-deployment.
|
|
|
346
323
|
|
|
347
324
|
**Implementation:**
|
|
348
325
|
|
|
349
|
-
|
|
350
|
-
// Pre-load CRITICAL (schemas) and HIGH (questionnaires) priority buckets
|
|
351
|
-
const schemaFiles = glob("docs/{app}/business-analyse/schemas/**/*.json");
|
|
352
|
-
for (const file of schemaFiles) {
|
|
353
|
-
read(file); // Triggers cache
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const questionnaireFiles = glob("~/.claude/skills/business-analyse/questionnaire/*.md");
|
|
357
|
-
for (const file of questionnaireFiles) {
|
|
358
|
-
read(file); // Triggers cache
|
|
359
|
-
}
|
|
326
|
+
**Files to pre-load:**
|
|
360
327
|
|
|
361
|
-
|
|
328
|
+
1. **Schemas (CRITICAL):** All JSON files under `docs/{app}/business-analyse/schemas/**/*.json` (9 files)
|
|
329
|
+
2. **Questionnaires (HIGH):** All `.md` files under `~/.claude/skills/business-analyse/questionnaire/` (16 files)
|
|
330
|
+
3. **Catalog:** `~/.claude/skills/business-analyse/patterns/suggestion-catalog.md` (1 file)
|
|
362
331
|
|
|
363
|
-
|
|
364
|
-
|
|
332
|
+
**After loading, display:**
|
|
333
|
+
```
|
|
365
334
|
✓ Cache warmed: 9 schemas + 16 questionnaires + 1 catalog
|
|
366
335
|
Expected savings: 15-20% session tokens
|
|
367
336
|
Retention: schemas (session-wide), questionnaires (until step-02)
|
|
368
|
-
`);
|
|
369
337
|
```
|
|
370
338
|
|
|
371
339
|
**Bucket Strategy:**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: step-01-cadrage
|
|
3
3
|
description: Application/module framing - listen, reformulate, challenge, anticipate, bound scope
|
|
4
4
|
model: opus
|
|
5
|
-
next_step: steps/step-
|
|
5
|
+
next_step: steps/step-01b-applications.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
> **Context files:** `_shared.md` | `_elicitation.md` | `_architecture.md` | `_suggestions.md`
|
|
@@ -92,16 +92,42 @@ IF mcp_available:
|
|
|
92
92
|
Store findings in {codebase_context}
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
**Phase 2b: Parallel Codebase Agents**
|
|
95
|
+
**Phase 2b: Parallel Codebase + Docs Agents**
|
|
96
96
|
```
|
|
97
|
-
Launch
|
|
97
|
+
Launch 4 agents in parallel:
|
|
98
98
|
Agent 1: Search for existing domain entities (Glob: **/Domain/**/*.cs)
|
|
99
99
|
Agent 2: Search for existing services/integrations (Grep: IService, IRepository)
|
|
100
100
|
Agent 3: Search for existing page patterns (Glob: **/pages/**/*.tsx)
|
|
101
|
+
Agent 4: Scan existing BA documentation (Glob: docs/**/business-analyse/**/feature.json)
|
|
102
|
+
→ For each found file: read metadata.application, metadata.module, status, modules[].code
|
|
103
|
+
→ Also scan: docs/**/*.md (ERD, guides, specs)
|
|
101
104
|
|
|
102
105
|
Merge findings into {codebase_context}
|
|
103
106
|
```
|
|
104
107
|
|
|
108
|
+
**Phase 2c: Existing Documentation Context**
|
|
109
|
+
|
|
110
|
+
> **Load existing BAs and documentation BEFORE engaging the client.**
|
|
111
|
+
> This prevents re-specifying what already exists and surfaces integration constraints early.
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
IF Agent 4 found existing feature.json files:
|
|
115
|
+
For each file found:
|
|
116
|
+
→ Extract: application, modules[], entities[], status, version
|
|
117
|
+
→ Store as {existing_ba_context}: list of existing applications with their modules and key entities
|
|
118
|
+
Display (silent — internal context only, not shown to client):
|
|
119
|
+
"Found {count} existing BA(s): {app names} — {total modules} modules already specified"
|
|
120
|
+
|
|
121
|
+
IF docs/**/*.md files found:
|
|
122
|
+
→ Scan for ERD diagrams, API specs, architecture decisions
|
|
123
|
+
→ Store relevant findings in {codebase_context}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Use in pre-analysis (§2b):**
|
|
127
|
+
- Cross-reference detected modules against `{existing_ba_context}` — flag modules that already exist
|
|
128
|
+
- Pre-identify integration points: new feature may depend on or extend existing modules
|
|
129
|
+
- NEVER re-specify what's already handed-off (status = "handed-off") — reference it instead
|
|
130
|
+
|
|
105
131
|
### 2b. Silent Pre-Analysis (ULTRATHINK — no output to client)
|
|
106
132
|
|
|
107
133
|
> **The AI prepares the conversation before speaking.** This is NOT output — it's internal reasoning.
|
|
@@ -232,6 +258,20 @@ Ask in 1-2 batches. After each batch:
|
|
|
232
258
|
- If no exclusions → probe: "What should this system explicitly NOT do?"
|
|
233
259
|
- If journey is too simple → detail: "What happens when something goes wrong? When someone cancels?"
|
|
234
260
|
|
|
261
|
+
> **MANDATORY Error Path Challenge (run for EVERY project after the main journey is described):**
|
|
262
|
+
>
|
|
263
|
+
> Ask via AskUserQuestion (1 batch, 2-3 questions):
|
|
264
|
+
> - "Si l'action principale échoue (erreur serveur, données invalides, timeout), que doit-il se passer ?"
|
|
265
|
+
> - "Qui est notifié en cas d'erreur ? L'utilisateur ? Un administrateur ? Via quel canal ?"
|
|
266
|
+
> - "L'état doit-il être annulé (rollback) ou conservé partiellement ?"
|
|
267
|
+
>
|
|
268
|
+
> Record answers in `cadrage.errorFlows[]`:
|
|
269
|
+
> ```json
|
|
270
|
+
> { "scenario": "...", "trigger": "...", "notification": "...", "recovery": "rollback|partial|manual" }
|
|
271
|
+
> ```
|
|
272
|
+
>
|
|
273
|
+
> These error flows become **Business Rules** in step-03a2 (BR-WF category: workflow/guard conditions).
|
|
274
|
+
|
|
235
275
|
> **BLOCKING RULE — MoSCoW DISTRIBUTION:**
|
|
236
276
|
> If the client classifies ALL features as "must-have", you MUST challenge this BEFORE proceeding.
|
|
237
277
|
> **Reference:** Load `references/cadrage-challenge-patterns.md` § "MoSCoW Prioritization Template" for the exact question format.
|
|
@@ -439,10 +479,36 @@ Based on brief analysis, load additional categories if relevant:
|
|
|
439
479
|
| External system integration | 05 | `questionnaire/05-integrations.md` |
|
|
440
480
|
| Performance requirements | 08 | `questionnaire/08-performance.md` |
|
|
441
481
|
| Technical constraints | 09 | `questionnaire/09-constraints.md` |
|
|
442
|
-
| Documentation needs | 10 | `questionnaire/10-documentation.md` |
|
|
443
482
|
|
|
444
483
|
> **Categories 04 (data), 07 (UI), 11 (lifecycle), 12 (migration), 13 (cross-module) are per-module and loaded in step-03.**
|
|
445
484
|
|
|
485
|
+
#### 4g. Documentation Needs (ALWAYS — from `questionnaire/10-documentation.md`)
|
|
486
|
+
|
|
487
|
+
> **Every application requires documentation decisions made upfront, not as an afterthought.**
|
|
488
|
+
> Load `questionnaire/10-documentation.md` unconditionally — 7 questions, mandatory minimum 2 (Q10.1 + Q10.2).
|
|
489
|
+
|
|
490
|
+
Ask in 1 batch via AskUserQuestion (max 3 questions):
|
|
491
|
+
- Q10.1: Will users need documentation (guide, FAQ, in-app tooltips)?
|
|
492
|
+
- Q10.2: Is technical documentation required (API docs, ERD, developer guide)?
|
|
493
|
+
- Q10.3: Who is responsible for maintaining documentation after delivery?
|
|
494
|
+
|
|
495
|
+
After the batch:
|
|
496
|
+
- If "Non" to Q10.1 AND Q10.2 → probe: "Pas même les docs API ou un guide d'accueil pour les nouveaux utilisateurs ?"
|
|
497
|
+
- If "Oui" without detail → ask format: "Tooltips intégrés ? Guide PDF ? Wiki ? Portail dédié ?"
|
|
498
|
+
- If "La doc se fera après" → challenge: "La documentation est planifiée maintenant et générée par `/documentation` après `/ralph-loop`. Quel niveau souhaitez-vous ?"
|
|
499
|
+
|
|
500
|
+
**Store in `cadrage.documentation`:**
|
|
501
|
+
```json
|
|
502
|
+
{
|
|
503
|
+
"userDocumentation": { "needed": true, "format": "tooltips|guide|wiki|pdf|portal", "audience": "..." },
|
|
504
|
+
"technicalDocumentation": { "needed": true, "format": "swagger|erd|developer-guide", "generated": true },
|
|
505
|
+
"owner": "who maintains it",
|
|
506
|
+
"skill": "/documentation — runs after /ralph-loop"
|
|
507
|
+
}
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
This feeds directly into handoff step-05a category `documentation` in `filesToCreate`.
|
|
511
|
+
|
|
446
512
|
---
|
|
447
513
|
|
|
448
514
|
## PHASE 4: ANTICIPATION (Suggest Unexpressed Needs)
|
|
@@ -603,11 +669,35 @@ BEFORE transitioning to step-02:
|
|
|
603
669
|
- List anticipated resources (Level 5) for each section
|
|
604
670
|
- List detail page tabs — for entities accessible via click from `list`
|
|
605
671
|
|
|
606
|
-
4. **
|
|
672
|
+
4. **RECONCILIATION CHECK (MANDATORY — BLOCKING):**
|
|
673
|
+
|
|
674
|
+
> **Every explicitly requested item MUST appear in the coverage matrix.**
|
|
675
|
+
> This check prevents silent omissions — if the user asked for 5 modules, all 5 must be tracked.
|
|
676
|
+
|
|
677
|
+
```
|
|
678
|
+
// Extract all explicit requests from the original prompt
|
|
679
|
+
requestedItems = extract_explicit_items({feature_description})
|
|
680
|
+
// Include: modules mentioned by name, features listed, applications named
|
|
681
|
+
|
|
682
|
+
// Verify each requested item has a coverage matrix entry
|
|
683
|
+
uncoveredItems = requestedItems.filter(item =>
|
|
684
|
+
!coverageMatrix.some(entry => fuzzyMatch(entry.feature, item))
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
IF uncoveredItems.length > 0:
|
|
688
|
+
BLOCKING: "The following requested items have no coverage matrix entry:
|
|
689
|
+
{uncoveredItems.map(i => '- ' + i).join('\n')}
|
|
690
|
+
Add them to the coverage matrix before proceeding."
|
|
691
|
+
|
|
692
|
+
ELSE:
|
|
693
|
+
Display: "✓ Coverage reconciliation: all {requestedItems.length} requested items mapped"
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
5. **OUTPUT the matrix as text** (do NOT put it inside AskUserQuestion — it won't render)
|
|
607
697
|
|
|
608
|
-
|
|
698
|
+
6. **THEN** (after the table is displayed) ask via AskUserQuestion for confirmation
|
|
609
699
|
|
|
610
|
-
|
|
700
|
+
7. Iterate until the client confirms
|
|
611
701
|
|
|
612
702
|
**The reference file includes:**
|
|
613
703
|
- Section rule clarification (list, detail, create, edit, dashboard, etc.)
|
|
@@ -5,7 +5,7 @@ model: opus
|
|
|
5
5
|
next_step: steps/step-03a2-analysis.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
> **Context files:** `_shared.md` | `_elicitation.md` | `_architecture.md` | `_module-loop.md`
|
|
8
|
+
> **Context files:** `_shared.md` | `_elicitation.md` | `_architecture.md` | `_module-loop.md` | `_rules.md`
|
|
9
9
|
> **Reference (5-bis):** `references/entity-architecture-decision.md` — Entity scoring, domain coherence, section patterns
|
|
10
10
|
|
|
11
11
|
# Step 3a1: Setup - Module Initialization
|
|
@@ -20,27 +20,7 @@ next_step: steps/step-03a2-analysis.md
|
|
|
20
20
|
- ALL questions via AskUserQuestion tool
|
|
21
21
|
- ALL communication in `{language}`
|
|
22
22
|
- NEVER skip per-module validation
|
|
23
|
-
- **ID
|
|
24
|
-
All IDs MUST include a module prefix to guarantee application-wide uniqueness.
|
|
25
|
-
The prefix is derived from the module code initials (2-4 chars):
|
|
26
|
-
UserManagement → UM | VehicleManagement → VM | PartsInventory → PI
|
|
27
|
-
RepairManagement → RM | MaintenanceSchedule → MS | DataSync → DS
|
|
28
|
-
Notifications → NT | Dashboard → DB | Orders → OR | Customers → CU
|
|
29
|
-
|
|
30
|
-
Patterns:
|
|
31
|
-
UC-{PREFIX}-{NNN} → UC-RM-001, UC-PI-003
|
|
32
|
-
BR-{CAT}-{PREFIX}-{NNN} → BR-VAL-RM-001, BR-CALC-PI-002
|
|
33
|
-
FR-{PREFIX}-{NNN} → FR-RM-001
|
|
34
|
-
OBJ-{PREFIX}-{NNN} → OBJ-RM-001
|
|
35
|
-
AC-{PREFIX}-{NNN} → AC-RM-001
|
|
36
|
-
RISK-{PREFIX}-{NNN} → RISK-RM-001
|
|
37
|
-
|
|
38
|
-
NEVER use bare IDs (UC-001, BR-VAL-001) in multi-module mode.
|
|
39
|
-
- **SCHEMA CONFORMITY RULE:**
|
|
40
|
-
ALL data MUST fit within the defined feature-schema.json structure.
|
|
41
|
-
NEVER create custom top-level fields (KPIDefinitions, ChartConfigurations, etc.)
|
|
42
|
-
Dashboard modules MUST use specification.dashboards[] (it exists in the schema).
|
|
43
|
-
If truly needed, use specification.extensions: {} (additionalProperties: true).
|
|
23
|
+
- **Rules:** See `_rules.md` § "ID Naming Convention" and § "Schema Conformity" (MANDATORY, NO EXCEPTION)
|
|
44
24
|
|
|
45
25
|
## MODE DETECTION
|
|
46
26
|
|
|
@@ -323,7 +303,7 @@ Based on module type, load questionnaires per-module:
|
|
|
323
303
|
|
|
324
304
|
| Condition | Category | Questionnaire |
|
|
325
305
|
|-----------|----------|---------------|
|
|
326
|
-
|
|
|
306
|
+
| featureType != "reporting" | 04 | `questionnaire/04-data.md` |
|
|
327
307
|
| Has UI sections | 07 | `questionnaire/07-ui.md` |
|
|
328
308
|
| Has lifecycle | 11 | `questionnaire/11-data-lifecycle.md` |
|
|
329
309
|
| Has migration needs | 12 | `questionnaire/12-migration.md` |
|
|
@@ -5,7 +5,7 @@ model: opus
|
|
|
5
5
|
next_step: steps/step-03b-ui.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
> **Context files:** `_shared.md` | `_elicitation.md` | `_architecture.md` | `_module-loop.md`
|
|
8
|
+
> **Context files:** `_shared.md` | `_elicitation.md` | `_architecture.md` | `_module-loop.md` | `_rules.md`
|
|
9
9
|
> **Reference (check 7):** `references/entity-architecture-decision.md` — Entity scoring for unresolved relationship targets
|
|
10
10
|
|
|
11
11
|
# Step 3a2: Analysis - Entities & Business Logic
|
|
@@ -14,8 +14,7 @@ next_step: steps/step-03b-ui.md
|
|
|
14
14
|
|
|
15
15
|
- ALWAYS use ULTRATHINK mode
|
|
16
16
|
- This step follows step-03a1-setup.md (module already initialized)
|
|
17
|
-
- **
|
|
18
|
-
- **SCHEMA CONFORMITY RULE:** ALL data MUST fit within feature-schema.json structure
|
|
17
|
+
- **Rules:** See `_rules.md` § "ID Naming Convention" and § "Schema Conformity"
|
|
19
18
|
|
|
20
19
|
## MODE DETECTION (inherited from step-03a1)
|
|
21
20
|
|
|
@@ -5,7 +5,7 @@ model: opus
|
|
|
5
5
|
next_step: steps/step-03c-compile.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
> **Context files:** `_shared.md` | `_module-loop.md`
|
|
8
|
+
> **Context files:** `_shared.md` | `_module-loop.md` | `_rules.md`
|
|
9
9
|
|
|
10
10
|
# Step 3b: Specification - UI & Visualization
|
|
11
11
|
|
|
@@ -26,27 +26,7 @@ next_step: steps/step-03c-compile.md
|
|
|
26
26
|
|
|
27
27
|
**IF you are running in the MAIN CONVERSATION** (classic inline mode):
|
|
28
28
|
→ Normal interactive mode — display wireframes then ask for validation via `AskUserQuestion`
|
|
29
|
-
- **ID
|
|
30
|
-
All IDs MUST include a module prefix to guarantee application-wide uniqueness.
|
|
31
|
-
The prefix is derived from the module code initials (2-4 chars):
|
|
32
|
-
UserManagement → UM | VehicleManagement → VM | PartsInventory → PI
|
|
33
|
-
RepairManagement → RM | MaintenanceSchedule → MS | DataSync → DS
|
|
34
|
-
Notifications → NT | Dashboard → DB | Orders → OR | Customers → CU
|
|
35
|
-
|
|
36
|
-
Patterns:
|
|
37
|
-
UC-{PREFIX}-{NNN} → UC-RM-001, UC-PI-003
|
|
38
|
-
BR-{CAT}-{PREFIX}-{NNN} → BR-VAL-RM-001, BR-CALC-PI-002
|
|
39
|
-
FR-{PREFIX}-{NNN} → FR-RM-001
|
|
40
|
-
OBJ-{PREFIX}-{NNN} → OBJ-RM-001
|
|
41
|
-
AC-{PREFIX}-{NNN} → AC-RM-001
|
|
42
|
-
RISK-{PREFIX}-{NNN} → RISK-RM-001
|
|
43
|
-
|
|
44
|
-
NEVER use bare IDs (UC-001, BR-VAL-001) in multi-module mode.
|
|
45
|
-
- **SCHEMA CONFORMITY RULE:**
|
|
46
|
-
ALL data MUST fit within the defined feature-schema.json structure.
|
|
47
|
-
NEVER create custom top-level fields (KPIDefinitions, ChartConfigurations, etc.)
|
|
48
|
-
Dashboard modules MUST use specification.dashboards[] (it exists in the schema).
|
|
49
|
-
If truly needed, use specification.extensions: {} (additionalProperties: true).
|
|
29
|
+
- **Rules:** See `_rules.md` § "ID Naming Convention" and § "Schema Conformity" (MANDATORY, NO EXCEPTION)
|
|
50
30
|
|
|
51
31
|
## YOUR TASK
|
|
52
32
|
|