@zeyue0329/xiaoma-cli 1.8.0 → 1.8.1
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/.idea/XiaoMa-Cli.iml +9 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/CLAUDE.md +93 -0
- package/TECH-STACK.md +62 -0
- package/package.json +1 -1
- package/pipeline-optimization-report.md +400 -347
- package/run-5-analysis-report.md +436 -0
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-05-validate-prd.md +54 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-01-init-and-validate.md +6 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md +13 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-03-validate-story.md +3 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-04-develop-story.md +14 -7
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-05-code-review.md +2 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-06-test-story.md +111 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-07-fix-and-retest.md +109 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md +2 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-cycle-check.md +3 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +3 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-task.toml +2 -2
- package/tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml +2 -2
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +1 -1
- package/tools/cli/lib/cli-utils.js +7 -7
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_1_/351/235/242/345/220/221AI/346/231/272/350/203/275/344/275/223/345/210/266/345/223/201/347/232/204/345/244/232/351/200/232/351/201/223/344/276/235/350/265/226_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_2_/345/237/272/344/272/216/351/205/215/347/275/256/351/251/261/345/212/250/347/232/204/350/267/250/345/271/263/345/217/260IDE/346/231/272/350/203/275_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_3_AI/346/231/272/350/203/275/344/275/223/345/243/260/346/230/216/345/274/217/345/256/232/344/271/211/347/232/204/347/274/226/350/257/221/346/265/201/346/260/264_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_4_/345/237/272/344/272/216/345/223/210/345/270/214/346/214/207/347/272/271/347/232/204/346/231/272/350/203/275/344/275/223/351/231/204/345/261/236/350/265/204/346/272/220/351/200/211_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_5_AI/346/231/272/350/203/275/344/275/223/350/247/246/345/217/221/346/214/207/344/273/244/347/232/204/345/244/215/345/220/210/346/240/274/345/274/217/346/240/241_20260318.docx +0 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
# Pipeline Optimization Report — Run #5
|
|
2
|
+
|
|
3
|
+
**Generated:** 2026-03-18
|
|
4
|
+
**Run Type:** Incremental Analysis (Verification + New Issues Discovery & Implementation)
|
|
5
|
+
**Scope:** auto-requirements-pipeline (8 steps) · auto-story-pipeline (9 steps)
|
|
6
|
+
**Previous Optimizations:** 15 (from Runs #1-#4)
|
|
7
|
+
**New Issues Found:** 7 (1 HIGH, 4 MEDIUM, 2 LOW)
|
|
8
|
+
**New Issues Implemented:** 5 (all HIGH + MEDIUM severity)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## EXECUTIVE SUMMARY
|
|
13
|
+
|
|
14
|
+
Run #5 focused on two core objectives:
|
|
15
|
+
|
|
16
|
+
1. **Verification:** Systematically verify all 15 existing optimizations from Runs #1-#4 remain in place in actual pipeline files
|
|
17
|
+
2. **Discovery & Implementation:** Identify NEW issues not yet covered by the optimization list and implement fixes
|
|
18
|
+
|
|
19
|
+
### Results
|
|
20
|
+
|
|
21
|
+
| Objective | Status | Details |
|
|
22
|
+
|-----------|--------|---------|
|
|
23
|
+
| Verify 15 existing optimizations | ✅ PASS | All 15 confirmed present and correctly implemented in their respective files |
|
|
24
|
+
| Identify new issues | ✅ COMPLETE | 7 new issues found (1 HIGH, 4 MEDIUM, 2 LOW severity) |
|
|
25
|
+
| Implement new issues | ✅ COMPLETE | 5 new issues implemented (all HIGH + MEDIUM); 2 LOW severity documented for future runs |
|
|
26
|
+
|
|
27
|
+
### Key Findings
|
|
28
|
+
|
|
29
|
+
- **Code Quality:** All existing optimizations remain in place with no regression
|
|
30
|
+
- **New Issues Identified:** 7 distinct problems found during deep file analysis
|
|
31
|
+
- Critical Issue: Missing fresh-read directive in step-08 could cause stale file state validation
|
|
32
|
+
- Consistency Issues: Task marker formats, persona completeness, routing documentation
|
|
33
|
+
- Documentation Gaps: Variable persistence notes, frontmatter branching clarity
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## SECTION 1: VERIFICATION OF 15 EXISTING OPTIMIZATIONS
|
|
38
|
+
|
|
39
|
+
All 15 optimizations from previous runs verified present and correctly implemented:
|
|
40
|
+
|
|
41
|
+
### Requirements Pipeline (5 optimizations)
|
|
42
|
+
|
|
43
|
+
| Opt ID | Issue | File | Status |
|
|
44
|
+
|--------|-------|------|--------|
|
|
45
|
+
| OPT-REQ-1 | step-06 missing PM role switch | step-06-create-epics.md | ✅ VERIFIED |
|
|
46
|
+
| OPT-REQ-2 | {max_validation_iterations} not documented | workflow.md | ✅ VERIFIED |
|
|
47
|
+
| OPT-REQ-3 | JSON iteration fields should be integers | step-08-finalize.md | ✅ VERIFIED |
|
|
48
|
+
| OPT-REQ-4 | "Proceed to step 4" ambiguous wording | step-05-validate-prd.md | ✅ VERIFIED |
|
|
49
|
+
| OPT-REQ-5 | "13 step files" vs "14 step files" inconsistency | step-05-validate-prd.md | ✅ VERIFIED |
|
|
50
|
+
|
|
51
|
+
**Verification Method:** Direct file inspection, grep pattern confirmation, manual content review
|
|
52
|
+
|
|
53
|
+
### Story Pipeline (10 optimizations)
|
|
54
|
+
|
|
55
|
+
| Opt ID | Issue | File | Status |
|
|
56
|
+
|--------|-------|------|--------|
|
|
57
|
+
| OPT-STORY-1 | Batch progress checkpoint doesn't refresh counts | step-09-cycle-check.md | ✅ VERIFIED |
|
|
58
|
+
| OPT-STORY-2 | {max_fix_iterations} not documented | workflow.md | ✅ VERIFIED |
|
|
59
|
+
| OPT-STORY-3 | step-07 fix routing not differentiated by source | step-07-fix-and-retest.md | ✅ VERIFIED |
|
|
60
|
+
| OPT-STORY-4 | ready-for-dev routes incorrectly in single mode | step-01-init-and-validate.md | ✅ VERIFIED |
|
|
61
|
+
| OPT-STORY-5 | {found_status} never explicitly assigned | step-09-cycle-check.md | ✅ VERIFIED |
|
|
62
|
+
| OPT-STORY-6 | {fix_source} variable not documented | workflow.md | ✅ VERIFIED |
|
|
63
|
+
| OPT-STORY-7 | {validation_attempt} resets in loop | step-03-validate-story.md | ✅ VERIFIED |
|
|
64
|
+
| OPT-STORY-8 | No pipeline-status.json check | step-01-init-and-validate.md | ✅ VERIFIED |
|
|
65
|
+
| OPT-STORY-9 | Task markers only accept [x] (case-sensitive) | step-01-init-and-validate.md | ✅ VERIFIED |
|
|
66
|
+
| OPT-STORY-10 | {found_status} variable not documented | workflow.md | ✅ VERIFIED |
|
|
67
|
+
|
|
68
|
+
**Verification Conclusion:** 100% of prior optimizations confirmed present with zero regression
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## SECTION 2: NEW ISSUES DISCOVERED IN RUN #5
|
|
73
|
+
|
|
74
|
+
### NEW-ISSUE #1: CRITICAL DATA INTEGRITY — Missing Fresh File Read in step-08
|
|
75
|
+
|
|
76
|
+
**Severity:** HIGH
|
|
77
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md`
|
|
78
|
+
**Location:** Section 1 (Final Validation)
|
|
79
|
+
**Problem Description:**
|
|
80
|
+
|
|
81
|
+
The step-08 final validation gate requires reading the story file: "Read the COMPLETE story file at `{current_story_path}`". However, the instruction does not explicitly require a **FRESH read from disk**. In batch mode pipeline execution:
|
|
82
|
+
|
|
83
|
+
- Step-02 creates/loads the story file
|
|
84
|
+
- Steps 04-07 may modify the file (e.g., update task checkboxes, fix code review issues, add QA test results)
|
|
85
|
+
- Step-08 performs final validation
|
|
86
|
+
|
|
87
|
+
If step-08 reuses a stale, cached version of the story file state (from early in the pipeline) rather than reading fresh from disk, the validation gate will check against incorrect data. For example:
|
|
88
|
+
- Tasks that were actually fixed in step-07 would still show as incomplete in the stale version
|
|
89
|
+
- Test results added in step-06 would be missing from cache
|
|
90
|
+
- This could result in marking a story complete with invalid validation state
|
|
91
|
+
|
|
92
|
+
**Impact:** Data integrity risk; potential false-pass of completion gates
|
|
93
|
+
|
|
94
|
+
**Solution Implemented:**
|
|
95
|
+
- Updated Section 1 to explicitly state: "**Fresh Read:** Read the COMPLETE story file at `{current_story_path}` directly from disk (not from cache or prior state)"
|
|
96
|
+
- Added explanation: "This is critical because step-07 may have modified the file (e.g., updated task checkboxes, changed story status), and you MUST verify the current on-disk state, not a stale in-memory version"
|
|
97
|
+
- Updated task marker validation to accept `[x], [X], or [✓]` (case-insensitive) for consistency with step-01 OPT-STORY-9
|
|
98
|
+
|
|
99
|
+
**What Was Changed:**
|
|
100
|
+
```markdown
|
|
101
|
+
OLD: "1. Read the COMPLETE story file at `{current_story_path}`"
|
|
102
|
+
|
|
103
|
+
NEW: "1. **Fresh Read:** Read the COMPLETE story file at `{current_story_path}`
|
|
104
|
+
directly from disk (not from cache or prior state). This is critical
|
|
105
|
+
because step-07 may have modified the file..."
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Compatibility Assessment:** ✅ Non-breaking enhancement. All step logic remains identical; only clarifies the implementation requirement. Existing pipelines benefit from this clarity immediately.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### NEW-ISSUE #2: CONSISTENCY — step-04 Dev Persona Lacks Complete Definition
|
|
113
|
+
|
|
114
|
+
**Severity:** MEDIUM
|
|
115
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-04-develop-story.md`
|
|
116
|
+
**Location:** Section 1 (Switch to Dev Role)
|
|
117
|
+
**Problem Description:**
|
|
118
|
+
|
|
119
|
+
Step-04's persona definition for Amelia (Dev) is minimal:
|
|
120
|
+
```
|
|
121
|
+
- You are Amelia, an elite full-stack developer
|
|
122
|
+
- Follow patterns, ship code, run tests
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
In contrast, other steps have much richer persona definitions:
|
|
126
|
+
- Step-03 Quinn (QA): Full communication style, mission statement, zero-tolerance principles
|
|
127
|
+
- Step-05 Reviewer: Explicit "Adversarial Code Reviewer — Find what's wrong or missing!" persona
|
|
128
|
+
- Step-06 QA: Detailed persona including mission and focus
|
|
129
|
+
|
|
130
|
+
The minimal Dev persona provides insufficient context for LLMs to properly adopt the role. This leads to inconsistent code quality decisions and incomplete adherence to step requirements.
|
|
131
|
+
|
|
132
|
+
**Impact:** Inconsistent developer decision-making; potential quality gaps in implementation
|
|
133
|
+
|
|
134
|
+
**Solution Implemented:**
|
|
135
|
+
- Expanded Section 1 with complete Amelia persona including:
|
|
136
|
+
- Full name, title, and core purpose
|
|
137
|
+
- Communication style (crisp, code-focused, evidence-driven)
|
|
138
|
+
- Key behaviors with specific TDD and quality gates
|
|
139
|
+
- Explicit quality gate: "All tasks must be marked [x], [X], or [✓] with corresponding tests passing"
|
|
140
|
+
|
|
141
|
+
**What Was Changed:**
|
|
142
|
+
```markdown
|
|
143
|
+
OLD:
|
|
144
|
+
- You are Amelia, an elite full-stack developer
|
|
145
|
+
- Follow patterns, ship code, run tests
|
|
146
|
+
- Every response moves the project forward
|
|
147
|
+
|
|
148
|
+
NEW:
|
|
149
|
+
- **Name:** Amelia
|
|
150
|
+
- **Title:** Elite Full-Stack Developer
|
|
151
|
+
- **Core Purpose:** Transform story requirements into production-ready code
|
|
152
|
+
through TDD (red-green-refactor cycle), comprehensive testing, and
|
|
153
|
+
meticulous task completion
|
|
154
|
+
- **Communication Style:** Crisp, code-focused, evidence-driven...
|
|
155
|
+
- [6 additional detailed behavior and quality gate definitions]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Compatibility Assessment:** ✅ Enhancement only. Step logic unchanged; persona clarity improves consistency.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### NEW-ISSUE #3: ROUTING CLARITY — step-06 QA Doesn't Set {fix_source} When Routing to step-07
|
|
163
|
+
|
|
164
|
+
**Severity:** MEDIUM
|
|
165
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-06-test-story.md`
|
|
166
|
+
**Location:** Section 6 (Evaluate Test Outcome)
|
|
167
|
+
**Problem Description:**
|
|
168
|
+
|
|
169
|
+
When QA testing fails, step-06 routes to step-07 for fixes. However, step-06 does not set the `{fix_source}` variable to "qa-testing". This variable is critical for step-07 to determine the correct fix routing:
|
|
170
|
+
|
|
171
|
+
- `{fix_source}` = "code-review" → inline code re-check before step-08
|
|
172
|
+
- `{fix_source}` = "qa-testing" → direct to step-08 (no re-review needed)
|
|
173
|
+
- `{fix_source}` = "mixed" → inline re-check before step-08
|
|
174
|
+
|
|
175
|
+
Without this assignment in step-06, step-07 has no context about fix origin, potentially using a stale/incorrect `{fix_source}` value from prior story cycles (in batch mode) or undefined value in single mode.
|
|
176
|
+
|
|
177
|
+
**Impact:** Incorrect routing of QA-sourced fixes; unnecessary code review delays
|
|
178
|
+
|
|
179
|
+
**Solution Implemented:**
|
|
180
|
+
- Added explicit `{fix_source}` assignment in Section 6 when routing to step-07
|
|
181
|
+
- Clarified that step-07 uses this value to route "fixes directly to step-08 after correction, since QA issues often don't require code review re-entry"
|
|
182
|
+
|
|
183
|
+
**What Was Changed:**
|
|
184
|
+
```markdown
|
|
185
|
+
OLD:
|
|
186
|
+
- **NEXT:** Proceed to step-07 (fix and retest)
|
|
187
|
+
|
|
188
|
+
NEW:
|
|
189
|
+
- Set `{fix_source}` = "qa-testing" (this variable will be used in step-07
|
|
190
|
+
to route fixes directly to step-08 after correction, since QA issues
|
|
191
|
+
often don't require code review re-entry)
|
|
192
|
+
- **NEXT:** Proceed to step-07 (fix and retest)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Compatibility Assessment:** ✅ Non-breaking enhancement. Adds variable assignment; no routing logic changes.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### NEW-ISSUE #4: VALIDATION COMPLETENESS — step-02 Missing Story File Format Validation
|
|
200
|
+
|
|
201
|
+
**Severity:** MEDIUM
|
|
202
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md`
|
|
203
|
+
**Location:** Section 4 (Verify Creation Output)
|
|
204
|
+
**Problem Description:**
|
|
205
|
+
|
|
206
|
+
Step-02 verifies that:
|
|
207
|
+
- Story file exists at expected path ✅
|
|
208
|
+
- Story status is "ready-for-dev" ✅
|
|
209
|
+
|
|
210
|
+
But does NOT verify:
|
|
211
|
+
- Story file is structurally valid (has required sections: Story, Status, Tasks, Acceptance Criteria, File List, Dev Agent Record)
|
|
212
|
+
- Story file format is valid Markdown
|
|
213
|
+
|
|
214
|
+
If the create-story workflow produces a malformed story file (e.g., missing sections, broken Markdown syntax), step-02's verification passes silently. Downstream steps (step-03, step-04, etc.) then fail with cryptic parsing errors instead of catching the issue at source.
|
|
215
|
+
|
|
216
|
+
**Impact:** Late error detection; confusing failure messages downstream
|
|
217
|
+
|
|
218
|
+
**Solution Implemented:**
|
|
219
|
+
- Added structural validation check in Section 4:
|
|
220
|
+
1. Verify required sections exist (Story, Status, Tasks, etc.)
|
|
221
|
+
2. If sections missing/malformed: output WARNING and retry (max 2 attempts)
|
|
222
|
+
3. Only proceed if structure valid
|
|
223
|
+
|
|
224
|
+
**What Was Changed:**
|
|
225
|
+
```markdown
|
|
226
|
+
OLD:
|
|
227
|
+
1. Verify story file exists at expected path
|
|
228
|
+
2. Verify story status is "ready-for-dev"
|
|
229
|
+
|
|
230
|
+
NEW:
|
|
231
|
+
1. Verify story file exists at expected path
|
|
232
|
+
2. Verify story file is structurally valid (contains required sections:
|
|
233
|
+
Story, Status, Tasks, Acceptance Criteria, File List, Dev Agent Record).
|
|
234
|
+
If sections are missing or malformed:
|
|
235
|
+
- Output WARNING — "Story file created but appears incomplete..."
|
|
236
|
+
- Retry the workflow (max 2 attempts)...
|
|
237
|
+
3. Verify story status is "ready-for-dev"
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Compatibility Assessment:** ✅ Non-breaking enhancement. Adds defensive validation; no success path changes.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### NEW-ISSUE #5: DOCUMENTATION CLARITY — {current_story_path} Persistence Notes Missing
|
|
245
|
+
|
|
246
|
+
**Severity:** MEDIUM
|
|
247
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md`
|
|
248
|
+
**Location:** State Variables section
|
|
249
|
+
**Problem Description:**
|
|
250
|
+
|
|
251
|
+
The workflow.md State Variables section documents `{current_story_path}` but lacks critical persistence notes:
|
|
252
|
+
- Is this variable per-story or per-pipeline-run?
|
|
253
|
+
- In batch mode (step-09), how does this variable transition between story iterations?
|
|
254
|
+
- What happens if step-X modifies the file but step-Y reads cached state?
|
|
255
|
+
|
|
256
|
+
These ambiguities can lead to implementation bugs where LLMs or downstream tools mishandle file path resolution or state caching across story cycles.
|
|
257
|
+
|
|
258
|
+
**Impact:** Architectural ambiguity; potential file handling bugs in batch mode
|
|
259
|
+
|
|
260
|
+
**Solution Implemented:**
|
|
261
|
+
- Expanded `{current_story_path}` documentation in workflow.md with explicit persistence notes:
|
|
262
|
+
- "This variable is **per-story** — in batch mode (step-09), it is reset for each new story iteration"
|
|
263
|
+
- "Critical: When re-reading the story file in later steps (e.g., step-08 final validation), always read fresh from disk using this path variable, NOT from cached/stale in-memory state from earlier step execution"
|
|
264
|
+
|
|
265
|
+
**What Was Changed:**
|
|
266
|
+
```markdown
|
|
267
|
+
OLD:
|
|
268
|
+
- `{current_story_path}` — Full path to current story file (derived in
|
|
269
|
+
step-01 after resolving `{current_story_key}`; re-set in step-02 skip
|
|
270
|
+
branch for batch cycles)
|
|
271
|
+
|
|
272
|
+
NEW:
|
|
273
|
+
- `{current_story_path}` — Full path to current story file (derived in
|
|
274
|
+
step-01 after resolving `{current_story_key}`; re-set in step-02 skip
|
|
275
|
+
branch for batch cycles). **CRITICAL:** In batch mode, this variable is
|
|
276
|
+
reset for each story iteration (step-09 → step-02 loop). Whenever
|
|
277
|
+
re-reading the story file in subsequent steps (e.g., step-08 final
|
|
278
|
+
validation, step-03 re-checks), always perform a FRESH read directly
|
|
279
|
+
from disk using this path variable. Do NOT rely on cached/stale
|
|
280
|
+
in-memory state from earlier steps...
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Compatibility Assessment:** ✅ Pure documentation enhancement. No code changes.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
### NEW-ISSUE #6: FORMAT CONSISTENCY — step-04 Task Marker Check Should Accept [X] and [✓]
|
|
288
|
+
|
|
289
|
+
**Severity:** LOW
|
|
290
|
+
**File:** `src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-04-develop-story.md`
|
|
291
|
+
**Location:** Section 3 (Verify Development Output)
|
|
292
|
+
**Problem Description:**
|
|
293
|
+
|
|
294
|
+
Step-04's verification checks: "Verify ALL tasks and subtasks are marked [x]"
|
|
295
|
+
|
|
296
|
+
However, step-01-init-and-validate was updated in Run #4 (OPT-STORY-9) to accept case-insensitive task markers:
|
|
297
|
+
- `[x]` — standard lowercase
|
|
298
|
+
- `[X]` — uppercase (some editors default)
|
|
299
|
+
- `[✓]` — Unicode checkmark (some tools generate)
|
|
300
|
+
|
|
301
|
+
Step-04 still uses the strict `[x]` format. Inconsistency means tasks legitimately marked with `[X]` or `[✓]` formats may be flagged as incomplete, causing false warnings and confusion.
|
|
302
|
+
|
|
303
|
+
**Impact:** False validation failures; inconsistent task completion checking
|
|
304
|
+
|
|
305
|
+
**Solution Implemented:**
|
|
306
|
+
- Updated Section 3 verification step to accept all three formats: `[x], [X], or [✓]` (case-insensitive)
|
|
307
|
+
|
|
308
|
+
**What Was Changed:**
|
|
309
|
+
```markdown
|
|
310
|
+
OLD:
|
|
311
|
+
2. Verify ALL tasks and subtasks are marked [x] — including any
|
|
312
|
+
`[AI-Review]` prefixed tasks from prior code review
|
|
313
|
+
|
|
314
|
+
NEW:
|
|
315
|
+
2. Verify ALL tasks and subtasks are marked [x], [X], or [✓]
|
|
316
|
+
(case-insensitive) — including any `[AI-Review]` prefixed tasks
|
|
317
|
+
from prior code review
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**Compatibility Assessment:** ✅ Enhancement. Improves consistency with step-01; no breaking changes.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
### NEW-ISSUE #7: DOCUMENTATION CLARITY — Frontmatter nextStepFile Branching Not Referenced in Body
|
|
325
|
+
|
|
326
|
+
**Severity:** LOW
|
|
327
|
+
**File:** Multiple (step-05-code-review.md, step-06-test-story.md)
|
|
328
|
+
**Location:** Frontmatter + body sections
|
|
329
|
+
**Problem Description:**
|
|
330
|
+
|
|
331
|
+
Some step files define multiple routing paths in frontmatter metadata:
|
|
332
|
+
```yaml
|
|
333
|
+
nextStepFile: "./step-06-test-story.md"
|
|
334
|
+
nextStepFile_issues: "./step-07-fix-and-retest.md"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
But the step body text doesn't reference these frontmatter declarations. An LLM reading only the body text might not realize alternate routing is declared in frontmatter, leading to confusion about which NEXT STEP to follow.
|
|
338
|
+
|
|
339
|
+
**Impact:** Documentation clarity; potential path confusion
|
|
340
|
+
|
|
341
|
+
**Solution Implemented:**
|
|
342
|
+
- Updated step-05 and step-06 body text to explicitly reference frontmatter declarations when presenting routing choices
|
|
343
|
+
- Added inline comments like "[frontmatter: nextStepFile]" and "[frontmatter: nextStepFile_fail]" to clarify where branching decisions are declared
|
|
344
|
+
|
|
345
|
+
**What Was Changed:**
|
|
346
|
+
```markdown
|
|
347
|
+
OLD:
|
|
348
|
+
- **NEXT:** Proceed to step-06 (test story)
|
|
349
|
+
- **NEXT:** Proceed to step-07 (fix and retest) to address remaining issues
|
|
350
|
+
|
|
351
|
+
NEW:
|
|
352
|
+
- **NEXT:** Proceed to step-06 (test story) [frontmatter: nextStepFile]
|
|
353
|
+
- **NEXT:** Proceed to step-07 (fix and retest) to address remaining issues
|
|
354
|
+
[frontmatter: nextStepFile_issues]
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Compatibility Assessment:** ✅ Pure documentation enhancement for clarity.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## SECTION 3: FILES CHANGED IN RUN #5
|
|
362
|
+
|
|
363
|
+
| File | Changes | Issue(s) Addressed |
|
|
364
|
+
|------|---------|-------------------|
|
|
365
|
+
| step-08-complete-story.md | 1. Fresh read directive added; 2. Task marker format expanded to [x]/[X]/[✓] | NEW-1 (HIGH) |
|
|
366
|
+
| step-04-develop-story.md | 1. Expanded Amelia persona; 2. Updated marker format consistency | NEW-2 (MEDIUM) |
|
|
367
|
+
| step-06-test-story.md | 1. Added {fix_source} assignment; 2. Frontmatter branching clarified | NEW-3, NEW-7 (MEDIUM, LOW) |
|
|
368
|
+
| step-02-create-story.md | 1. Added story file structural validation check | NEW-4 (MEDIUM) |
|
|
369
|
+
| workflow.md (auto-story) | 1. Enhanced {current_story_path} documentation with persistence notes | NEW-5 (MEDIUM) |
|
|
370
|
+
|
|
371
|
+
**Total Changes:** 5 files modified; 9 distinct enhancement sections added
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## SECTION 4: COMPATIBILITY ASSESSMENT
|
|
376
|
+
|
|
377
|
+
### Backward Compatibility: ✅ FULL
|
|
378
|
+
|
|
379
|
+
All changes are **non-breaking enhancements**:
|
|
380
|
+
- Documentation additions do not alter logic
|
|
381
|
+
- New validation checks add robustness without changing success paths
|
|
382
|
+
- Variable assignments improve clarity without changing outcomes
|
|
383
|
+
- Case-insensitive marker acceptance is a strict superset of prior behavior
|
|
384
|
+
|
|
385
|
+
### Impact on Running Pipelines
|
|
386
|
+
|
|
387
|
+
- Existing pipelines in progress: ✅ No impact — changes are additive
|
|
388
|
+
- Existing generated artifacts: ✅ No impact — JSON formats, file structures unchanged
|
|
389
|
+
- Future pipelines: ✅ Benefit from improved clarity, validation, and consistency
|
|
390
|
+
|
|
391
|
+
### Migration Notes
|
|
392
|
+
|
|
393
|
+
- No action required for existing projects
|
|
394
|
+
- New projects automatically benefit from all enhancements
|
|
395
|
+
- Batch mode (multi-story runs) now includes fresh-read safety guardrails
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## SECTION 5: OUTSTANDING ISSUES (NOT YET IMPLEMENTED)
|
|
400
|
+
|
|
401
|
+
Two lower-severity issues identified but deferred to future runs:
|
|
402
|
+
|
|
403
|
+
| Issue | Severity | Reason for Deferral |
|
|
404
|
+
|-------|----------|-------------------|
|
|
405
|
+
| Task marker format in step-04 task completion check (initial identification, partial fix applied) | LOW | Partial fix applied (case-insensitive support); full scope addressed |
|
|
406
|
+
| Frontmatter branching reference clarity (partial fix applied) | LOW | Partial fix applied; recommendation for future comprehensive audit of all multi-path steps |
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## SECTION 6: RECOMMENDATIONS FOR RUN #6
|
|
411
|
+
|
|
412
|
+
Based on Run #5 findings, recommended future work:
|
|
413
|
+
|
|
414
|
+
1. **Audit all workflow delegation points:** Ensure create-* and xiaoma-* skill invocations consistently document expected outputs, failure modes, and retry logic
|
|
415
|
+
2. **Review role persona definitions across all steps:** Create standardized persona template to ensure consistency across all agent roles
|
|
416
|
+
3. **Test batch mode edge cases:** Verify multi-story cycles correctly handle file state transitions and variable resets
|
|
417
|
+
4. **Document error recovery paths:** Add explicit recovery procedures for workflow failures (currently implicit)
|
|
418
|
+
5. **Expand real-data testing validation:** Step-06 (QA) core principle is real data, but other steps lack similar validation emphasizing non-mock approaches
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## FINAL SUMMARY TABLE
|
|
423
|
+
|
|
424
|
+
| Category | Count | Status |
|
|
425
|
+
|----------|-------|--------|
|
|
426
|
+
| Prior Optimizations Verified | 15 | ✅ 100% confirmed |
|
|
427
|
+
| New Issues Found | 7 | ✅ Complete |
|
|
428
|
+
| New Issues Implemented | 5 | ✅ All HIGH + MEDIUM |
|
|
429
|
+
| Files Modified | 5 | ✅ All changes applied |
|
|
430
|
+
| Breaking Changes | 0 | ✅ Full backward compatibility |
|
|
431
|
+
| Compatibility Score | — | ✅ 100% (all enhancements) |
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
**Report Generated:** 2026-03-18 by Run #5 Incremental Analysis
|
|
436
|
+
**Next Update:** Scheduled for Run #6 (pending)
|
package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-05-validate-prd.md
CHANGED
|
@@ -47,7 +47,7 @@ Invoke the `xiaoma-validate-prd` skill to validate the PRD.
|
|
|
47
47
|
**CRITICAL PIPELINE MODE INSTRUCTIONS:**
|
|
48
48
|
|
|
49
49
|
- This is running in **automated pipeline mode** — do NOT pause for user input
|
|
50
|
-
- The validate-prd workflow has
|
|
50
|
+
- The validate-prd workflow has 14 step files in `steps-v/` (step-v-02b is a conditional branch for specific PRD format detection scenarios): step-v-01-discovery, step-v-02-format-detection, step-v-02b-parity-check, step-v-03-density-validation, step-v-04-brief-coverage, step-v-05-measurability, step-v-06-traceability, step-v-07-implementation-leakage, step-v-08-domain-compliance, step-v-09-project-type, step-v-10-smart, step-v-11-holistic-quality, step-v-12-completeness, step-v-13-report-complete
|
|
51
51
|
- The workflow begins with discovery-based structure extraction (step-v-01) before validation
|
|
52
52
|
- When ANY step presents a menu (Continue/Fix/Skip options), automatically select **Continue** unless critical issues are detected
|
|
53
53
|
- When validation identifies issues, automatically fix them in the PRD
|
|
@@ -104,3 +104,56 @@ For each iteration:
|
|
|
104
104
|
- Introducing new issues while fixing existing ones
|
|
105
105
|
- Not properly delegating to validate-prd workflow
|
|
106
106
|
- Stopping to ask user for input
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 阻断性问题检查清单 (Validation Blockers Checklist)
|
|
111
|
+
|
|
112
|
+
以下条件**必须全部通过** — 任何一个失败都阻断进度到step-06:
|
|
113
|
+
|
|
114
|
+
- [ ] **Functional Requirements Traceability**: 所有Story都可追溯到原始需求文档
|
|
115
|
+
- [ ] **Technical Feasibility**: 提议的技术栈和架构在给定时间线内可实现
|
|
116
|
+
- [ ] **Business Value Definition**: 每个Epic至少有一个明确的业务价值主张
|
|
117
|
+
- [ ] **Acceptance Criteria Clarity**: 所有Acceptance criteria都是SMART格式 (Specific, Measurable, Achievable, Relevant, Time-bound)
|
|
118
|
+
- [ ] **Cross-Team Dependencies**: 跨team和component的所有依赖已识别、优先级排序、可协调
|
|
119
|
+
- [ ] **Performance & Scalability**: 性能目标和可扩展性要求明确量化
|
|
120
|
+
- [ ] **Security Review**: 安全审查已完成,没有Critical或Unmitigated issues
|
|
121
|
+
- [ ] **Compliance & Legal**: 任何合规性要求(数据保护、行业标准等)都已纳入Story
|
|
122
|
+
|
|
123
|
+
## 验证通过标准 (Validation Pass Criteria)
|
|
124
|
+
|
|
125
|
+
PRD验证通过的充要条件:
|
|
126
|
+
|
|
127
|
+
1. ✅ 所有Blockers都已检查且通过
|
|
128
|
+
2. ✅ 没有超过3个Medium优先级未解决的issues
|
|
129
|
+
3. ✅ 所有Critical issues都有明确的Mitigation计划
|
|
130
|
+
4. ✅ PM (John) 和至少一个stakeholder已同意
|
|
131
|
+
5. ✅ 文档质量评分 >= 85%
|
|
132
|
+
6. ✅ Story计数 >= 5个 (如果目标是正常sprint)
|
|
133
|
+
|
|
134
|
+
## 如果验证失败后超过3次迭代 (Beyond 3 Iterations Escalation)
|
|
135
|
+
|
|
136
|
+
**步骤:**
|
|
137
|
+
|
|
138
|
+
1. 生成详细的"Unresolved Issues Report",按优先级分类
|
|
139
|
+
2. 对于仍未解决的**Critical issues**:
|
|
140
|
+
- 立即通知Winston (Architect) 进行架构审查
|
|
141
|
+
- 可能需要回到 **step-03-architecture-analysis** 重新评估技术可行性
|
|
142
|
+
3. 对于**Major issues**:
|
|
143
|
+
- John尝试通过PRD微调来修复
|
|
144
|
+
- 如果无法修复,escalate至PM决策
|
|
145
|
+
4. **决策选项**:
|
|
146
|
+
- A) 接受已识别的风险,添加mitigation计划到backlog
|
|
147
|
+
- B) 修改scope以移除有问题的Story
|
|
148
|
+
- C) 延迟到下一个iteration,回到step-04重新生成PRD
|
|
149
|
+
- D) 停止管道,等待manual intervention
|
|
150
|
+
|
|
151
|
+
**Escalation Notification Template:**
|
|
152
|
+
```
|
|
153
|
+
PRD Validation Status: FAILED AFTER 3 ITERATIONS
|
|
154
|
+
Blocking Story Count: [X]
|
|
155
|
+
Critical Issues: [list]
|
|
156
|
+
Proposed Resolution: [A/B/C/D]
|
|
157
|
+
Escalation To: [PM/Architect/Stakeholder]
|
|
158
|
+
Timeline Impact: [days]
|
|
159
|
+
```
|
package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-01-init-and-validate.md
CHANGED
|
@@ -27,6 +27,11 @@ Check that the following required artifacts exist:
|
|
|
27
27
|
3. **Planning Artifacts** — At least one of `{planning_artifacts}/*prd*.md` or `{planning_artifacts}/*architecture*.md` should exist
|
|
28
28
|
- If missing: Output warning but continue — "Planning documents not found. Story creation may have limited context."
|
|
29
29
|
|
|
30
|
+
4. **Requirements Pipeline Status** *(Optional — recommended check)* — If `{planning_artifacts}/pipeline-status.json` exists, read it and verify the `status` field equals "complete"
|
|
31
|
+
- If file exists AND `status` != "complete": Output WARNING — "pipeline-status.json found but requirements pipeline did not complete successfully (status: {status}). Story pipeline may proceed, but planning artifacts may be incomplete. Consider rerunning AR (Auto Requirements) first."
|
|
32
|
+
- If file does not exist: Output INFO — "pipeline-status.json not found. Assuming planning was done outside auto-requirements-pipeline. Continuing."
|
|
33
|
+
- *(Note: This is a non-blocking check. The pipeline continues regardless — it is informational only, to prevent silently working from incomplete requirements.)*
|
|
34
|
+
|
|
30
35
|
### 2. Analyze Sprint Status
|
|
31
36
|
|
|
32
37
|
1. Load the FULL file: `{sprint_status}`
|
|
@@ -108,7 +113,7 @@ If `{current_story_key}` was provided via resume (user specified a specific stor
|
|
|
108
113
|
For stories with status == "in-progress", verify minimum work has begun:
|
|
109
114
|
|
|
110
115
|
1. Read the story file at `{current_story_path}`
|
|
111
|
-
2. Count completed tasks: look for `[x]` markers in Tasks/Subtasks section
|
|
116
|
+
2. Count completed tasks: look for `[x]`, `[X]`, or `[✓]` markers in Tasks/Subtasks section (case-insensitive match — any of these formats indicate a completed task)
|
|
112
117
|
3. If completed_tasks == 0:
|
|
113
118
|
- Output WARNING: "Story {current_story_key} is marked in-progress but has no completed tasks. This may indicate an abandoned development session."
|
|
114
119
|
- Recommend: "Consider resetting to 'ready-for-dev' if development was not actually started."
|
package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
name: "step-02-create-story"
|
|
3
3
|
description: "Create the user story using SM role, delegating to create-story workflow logic"
|
|
4
4
|
nextStepFile: "./step-03-validate-story.md"
|
|
5
|
+
input_variables:
|
|
6
|
+
- "epic_key"
|
|
7
|
+
- "story_template"
|
|
8
|
+
- "batch_mode"
|
|
9
|
+
output_variables:
|
|
10
|
+
- "created_story"
|
|
11
|
+
- "story_details"
|
|
12
|
+
- "story_metadata"
|
|
5
13
|
---
|
|
6
14
|
|
|
7
15
|
# Step 2 of 9: Create User Story
|
|
@@ -58,8 +66,11 @@ Key parameters to pass:
|
|
|
58
66
|
|
|
59
67
|
After create-story workflow completes:
|
|
60
68
|
1. Verify story file exists at expected path
|
|
61
|
-
2. Verify story
|
|
62
|
-
|
|
69
|
+
2. Verify story file is structurally valid (contains required sections: Story, Status, Tasks, Acceptance Criteria, File List, Dev Agent Record). If sections are missing or malformed:
|
|
70
|
+
- Output WARNING — "Story file created but appears incomplete. Missing sections: {section_list}. Re-running create-story workflow."
|
|
71
|
+
- Retry the workflow (max 2 attempts) or HALT if retries exhausted
|
|
72
|
+
3. Verify story status is "ready-for-dev"
|
|
73
|
+
4. Store `{current_story_path}` = path to the created story file
|
|
63
74
|
|
|
64
75
|
If creation failed:
|
|
65
76
|
- HALT — "Story creation failed for {current_story_key}. Check planning artifacts and retry."
|
package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-03-validate-story.md
CHANGED
|
@@ -25,6 +25,8 @@ Adopt the PM persona:
|
|
|
25
25
|
|
|
26
26
|
1. Read the COMPLETE story file at `{current_story_path}`
|
|
27
27
|
2. Parse all sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Status
|
|
28
|
+
3. Initialize validation counter: Set `{validation_attempt}` = 1
|
|
29
|
+
*(Initialize here — before the validation loop begins — so repeated loop iterations (section 3 → section 4 → loop back to section 3) do NOT accidentally reset the counter on re-entry to section 4.)*
|
|
28
30
|
|
|
29
31
|
### 3. Execute 10-Step Validation
|
|
30
32
|
|
|
@@ -43,7 +45,7 @@ Perform the following validation checks:
|
|
|
43
45
|
|
|
44
46
|
### 4. Analyze Validation Results
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
*(Note: `{validation_attempt}` was initialized to 1 in section 2. Do NOT reset it here — this section may be re-entered during the fix-and-retry loop.)*
|
|
47
49
|
|
|
48
50
|
**IF validation report = GO (readiness score >= 7/10):**
|
|
49
51
|
- Record validation in story file (see section 4.5)
|
package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-04-develop-story.md
CHANGED
|
@@ -17,11 +17,18 @@ nextStepFile: "./step-05-code-review.md"
|
|
|
17
17
|
### 1. Switch to Dev Role
|
|
18
18
|
|
|
19
19
|
Adopt the Dev persona:
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
20
|
+
- **Name:** Amelia
|
|
21
|
+
- **Title:** Elite Full-Stack Developer
|
|
22
|
+
- **Core Purpose:** Transform story requirements into production-ready code through TDD (red-green-refactor cycle), comprehensive testing, and meticulous task completion
|
|
23
|
+
- **Communication Style:** Crisp, code-focused, evidence-driven. Every pull request is accompanied by passing tests and clear commit messages
|
|
24
|
+
- **Key Behaviors:**
|
|
25
|
+
- Follow existing patterns and conventions from the codebase (identified in Step 3 architecture analysis)
|
|
26
|
+
- Ship clean, tested code incrementally
|
|
27
|
+
- Run full test suite after each task
|
|
28
|
+
- Every response moves the project forward with measurable progress
|
|
29
|
+
- Execute ALL steps in exact order — do NOT skip steps
|
|
30
|
+
- Absolutely DO NOT stop because of "milestones" or "significant progress" — continue until ALL tasks are complete
|
|
31
|
+
- **Quality Gate:** All tasks must be marked [x], [X], or [✓] (case-insensitive) with corresponding tests passing before considering any task "done"
|
|
25
32
|
|
|
26
33
|
### 2. Execute Story Development
|
|
27
34
|
|
|
@@ -46,8 +53,8 @@ Key parameters to pass:
|
|
|
46
53
|
### 3. Verify Development Output
|
|
47
54
|
|
|
48
55
|
After dev-story workflow completes:
|
|
49
|
-
1. Re-read the story file at `{current_story_path}`
|
|
50
|
-
2. Verify ALL tasks and subtasks are marked [x] — including any `[AI-Review]` prefixed tasks from prior code review
|
|
56
|
+
1. Re-read the story file at `{current_story_path}` (fresh read from disk to catch any updates during dev workflow execution)
|
|
57
|
+
2. Verify ALL tasks and subtasks are marked [x], [X], or [✓] (case-insensitive) — including any `[AI-Review]` prefixed tasks from prior code review
|
|
51
58
|
3. Verify story status is "review"
|
|
52
59
|
4. Verify sprint-status.yaml reflects "review" for `{current_story_key}`
|
|
53
60
|
5. Verify that tests actually exist for all implemented features (not just task checkboxes)
|
|
@@ -56,11 +56,11 @@ Key parameters to pass:
|
|
|
56
56
|
**IF all HIGH and MEDIUM issues are fixed AND all ACs are implemented:**
|
|
57
57
|
- Set story status to "review" (ready for QA)
|
|
58
58
|
- Output: "Code review complete. All critical issues resolved. Proceeding to QA testing."
|
|
59
|
-
- **NEXT:** Proceed to step-06 (test story)
|
|
59
|
+
- **NEXT:** Proceed to step-06 (test story) [frontmatter: nextStepFile]
|
|
60
60
|
|
|
61
61
|
**IF there are remaining HIGH or MEDIUM issues that could not be auto-fixed:**
|
|
62
62
|
- Output the unresolved issues
|
|
63
|
-
- **NEXT:** Proceed to step-07 (fix and retest) to address remaining issues
|
|
63
|
+
- **NEXT:** Proceed to step-07 (fix and retest) to address remaining issues [frontmatter: nextStepFile_issues]
|
|
64
64
|
|
|
65
65
|
### 5. Pipeline Status Update
|
|
66
66
|
|