@zeyue0329/xiaoma-cli 1.11.0 → 1.13.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/.playwright-cli/console-2026-05-13T06-36-26-793Z.log +2 -0
- package/.playwright-cli/page-2026-05-13T06-36-27-725Z.yml +1 -0
- package/CLAUDE.md +25 -7
- package/XiaoMa-CLI-2026H2-/350/277/255/344/273/243/350/247/204/345/210/222.pptx +0 -0
- package/demo/xiaoma-bug-circle-resolve/SKILL.md +6 -0
- package/demo/xiaoma-bug-circle-resolve/workflow.md +254 -0
- package/demo/xiaoma-bug-resolve/SKILL.md +6 -0
- package/demo/xiaoma-bug-resolve/workflow.md +269 -0
- package/demo/xiaoma-prd-saas-zh/README.md +57 -0
- package/demo/xiaoma-prd-saas-zh/domain-research.md +128 -0
- package/demo/xiaoma-prd-saas-zh/epics.md +303 -0
- package/demo/xiaoma-prd-saas-zh/market-research-2026-q1.md +183 -0
- package/demo/xiaoma-prd-saas-zh/prd-bad-examples.md +268 -0
- package/demo/xiaoma-prd-saas-zh/prd.md +409 -0
- package/demo/xiaoma-prd-saas-zh/product-brief.md +97 -0
- package/demo/xiaoma-prd-saas-zh/validation-report.md +279 -0
- package/docs/roadshow/01-/351/241/271/347/233/256/346/246/202/350/247/210/344/270/216/346/236/266/346/236/204.md +189 -0
- package/docs/roadshow/02-/346/231/272/350/203/275/344/275/223/347/263/273/347/273/237/350/257/246/350/247/243.md +464 -0
- package/docs/roadshow/03-/346/231/272/350/203/275/344/275/223/344/272/244/344/272/222/346/265/201/347/250/213/345/233/276.md +334 -0
- package/docs/roadshow/04-/345/267/245/344/275/234/346/265/201/346/211/247/350/241/214/350/257/246/350/247/243.md +1038 -0
- package/docs/roadshow/05-/346/212/200/346/234/257/345/256/236/347/216/260/344/270/216/345/210/233/346/226/260/344/272/256/347/202/271.md +205 -0
- package/docs/roadshow/06-/350/267/257/346/274/224/346/200/273/347/273/223/344/270/216/346/274/224/347/244/272/345/273/272/350/256/256.md +167 -0
- package/media/doc1_fig1.png +0 -0
- package/media/doc1_fig2.png +0 -0
- package/media/doc1_fig3.png +0 -0
- package/media/doc1_fig4.png +0 -0
- package/media/doc2_fig1.png +0 -0
- package/media/doc2_fig2.png +0 -0
- package/media/doc2_fig3.png +0 -0
- package/media/doc2_fig4.png +0 -0
- package/media/doc3_fig1.png +0 -0
- package/media/doc3_fig2.png +0 -0
- package/media/doc3_fig3.png +0 -0
- package/media/doc3_fig4.png +0 -0
- package/media/doc4_fig1.png +0 -0
- package/media/doc4_fig2.png +0 -0
- package/media/doc4_fig3.png +0 -0
- package/media/doc5_fig1.png +0 -0
- package/media/doc5_fig2.png +0 -0
- package/media/doc5_fig3.png +0 -0
- package/package.json +1 -1
- package/patent-disclosure-optimized/SKILL.md +416 -0
- package/patent-disclosure-optimized/references/disclosure-template.md +84 -0
- package/patent-disclosure-optimized/references/docx-format-spec.md +183 -0
- package/patent-disclosure-optimized/references/mining-principles.md +168 -0
- package/patent-disclosure-optimized/scripts/md2docx.js +777 -0
- package/src/core/tasks/xiaoma-create-prd/data/prd-purpose.md +157 -0
- package/src/core/tasks/xiaoma-create-prd/data/upstream-input-contract.md +168 -0
- package/src/core/tasks/xiaoma-create-prd/templates/prd-skeleton-reference.md +428 -0
- package/src/core/tasks/xiaoma-create-prd/templates/prd-template.md +101 -3
- package/src/xmc/agents/sm.agent.yaml +9 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-quality-rubric.csv +14 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-01-init-and-validate.md +10 -13
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md +0 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md +3 -4
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-finalize.md +69 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +9 -14
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/xiaoma-skill-manifest.yaml +1 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline-batch/SKILL.md +6 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline-batch/workflow.md +333 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline-batch/xiaoma-skill-manifest.yaml +3 -0
- package/src/xmc/workflows/5-full-pipeline/auto-full-pipeline/steps/step-01-init-and-validate.md +2 -2
- package/src/xmc/workflows/5-full-pipeline/auto-full-pipeline/steps/step-04-run-story-pipeline.md +30 -41
- package/src/xmc/workflows/5-full-pipeline/auto-full-pipeline/steps/step-05-finalize.md +2 -2
- package/src/xmc/workflows/5-full-pipeline/auto-full-pipeline/workflow.md +7 -9
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/SKILL.md +6 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/checklist.md +43 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-01-init-and-validate.md +155 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-02-create-epics.md +156 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-03-bridge-sprint-planning.md +143 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-04-batch-create-stories.md +309 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-05-finalize.md +311 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/workflow.md +105 -0
- package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/xiaoma-skill-manifest.yaml +3 -0
- 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/347/232/204/345/244/232/351/200/232/351/201/223/344/276/235/350/265/226_20260318.md +483 -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.md +592 -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.md +624 -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.md +628 -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.md +652 -0
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-cycle-check.md +0 -147
package/src/xmc/workflows/5-full-pipeline/auto-full-pipeline/steps/step-04-run-story-pipeline.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "step-04-run-story-pipeline"
|
|
3
|
-
description: "Execute the
|
|
3
|
+
description: "Execute the auto-story-pipeline-batch to develop, review, test, and deliver all stories using Agent subprocess isolation"
|
|
4
4
|
nextStepFile: "./step-05-finalize.md"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Step 4 of 5: Execute Story Development Pipeline
|
|
7
|
+
# Step 4 of 5: Execute Story Development Pipeline (Batch)
|
|
8
8
|
|
|
9
|
-
**Goal:** Delegate to the auto-story-pipeline
|
|
9
|
+
**Goal:** Delegate to the **auto-story-pipeline-batch** to execute the complete story development lifecycle for ALL stories. Each story is processed in an independent Agent subprocess for context isolation.
|
|
10
10
|
|
|
11
|
-
**Role:** Master Pipeline Orchestrator → delegates to auto-story-pipeline
|
|
11
|
+
**Role:** Master Pipeline Orchestrator → delegates to auto-story-pipeline-batch scheduler
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -19,14 +19,15 @@ nextStepFile: "./step-05-finalize.md"
|
|
|
19
19
|
**Output:**
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
|
|
22
|
+
===============================================
|
|
23
23
|
Phase 3 of 3 — Story Development Pipeline
|
|
24
|
-
|
|
24
|
+
===============================================
|
|
25
25
|
|
|
26
26
|
Starting automated story development in BATCH mode...
|
|
27
|
+
Using Agent subprocess isolation — each story processed independently.
|
|
27
28
|
Processing all {backlog_count} backlog stories sequentially.
|
|
28
29
|
|
|
29
|
-
For each story,
|
|
30
|
+
For each story, an independent Agent will:
|
|
30
31
|
1. Create story file from epics
|
|
31
32
|
2. Validate story (PM quality gate)
|
|
32
33
|
3. Develop implementation (TDD)
|
|
@@ -35,37 +36,27 @@ For each story, the pipeline will:
|
|
|
35
36
|
6. Fix-and-retest loop (if needed)
|
|
36
37
|
7. Mark story as done
|
|
37
38
|
|
|
38
|
-
Delegating to auto-story-pipeline...
|
|
39
|
-
|
|
39
|
+
Delegating to auto-story-pipeline-batch...
|
|
40
|
+
-----------------------------------------------
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
### 2. Execute Auto Story Pipeline
|
|
43
|
+
### 2. Execute Auto Story Pipeline Batch
|
|
43
44
|
|
|
44
|
-
Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md`
|
|
45
|
+
Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline-batch/workflow.md`
|
|
45
46
|
|
|
46
47
|
**Critical Full Pipeline Mode Instructions:**
|
|
47
48
|
|
|
48
49
|
- **FULLY AUTOMATED:** Do NOT pause for user input at any point
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- The
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- step-05: Adversarial code review (auto-fix HIGH/MEDIUM issues)
|
|
56
|
-
- step-06: QA functional testing (real data, no mocks)
|
|
57
|
-
- step-07: Fix-and-retest loop (max `{max_fix_iterations}` iterations)
|
|
58
|
-
- step-08: Complete story (mark done, update sprint status)
|
|
59
|
-
- step-09: Cycle check (find next story, loop back to step-02 or finalize)
|
|
60
|
-
- **IMPORTANT:** The story pipeline's step-01 will validate prerequisites including sprint-status.yaml — since we just generated it in step-03 of this pipeline, this check should pass
|
|
61
|
-
- **IMPORTANT:** The story pipeline's step-01 may attempt to auto-generate sprint-status.yaml if it can't find it — this is fine as a safety net, but should not be needed
|
|
62
|
-
- Continue through ALL stories until the story pipeline reaches finalization in step-09 and completes
|
|
63
|
-
- **Do NOT stop after individual story completions** — the batch mode cycle check (step-09) handles continuation automatically
|
|
64
|
-
- **If a story HALTS** (e.g., fix iteration exceeded): The story pipeline's escalation logic handles this. The escalation report will be generated. The full pipeline should note this as a partial completion
|
|
50
|
+
- The batch pipeline will automatically process ALL backlog and ready-for-dev stories
|
|
51
|
+
- Each story is handled by an independent Agent subprocess (isolated context)
|
|
52
|
+
- The batch scheduler stays lightweight — only orchestrating the loop
|
|
53
|
+
- **Do NOT stop after individual story completions** — the batch scheduler handles continuation automatically
|
|
54
|
+
- **If a story Agent fails:** The batch scheduler records the failure and continues to the next story
|
|
55
|
+
- Continue until all stories are processed or the batch pipeline finalizes
|
|
65
56
|
|
|
66
57
|
### 3. Verify Story Pipeline Output
|
|
67
58
|
|
|
68
|
-
After the
|
|
59
|
+
After the batch pipeline completes:
|
|
69
60
|
|
|
70
61
|
1. **Re-read sprint-status.yaml** — Fresh read from disk to get final state
|
|
71
62
|
2. **Count final statuses:**
|
|
@@ -85,24 +76,24 @@ After the story pipeline completes (either all stories done or a HALT condition)
|
|
|
85
76
|
**Output:**
|
|
86
77
|
|
|
87
78
|
```
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
-----------------------------------------------
|
|
80
|
+
Phase 3 Complete — Story Development
|
|
81
|
+
-----------------------------------------------
|
|
91
82
|
|
|
92
83
|
Stories Completed: {done_count}/{total_story_count}
|
|
93
84
|
Stories Remaining: {remaining_count}
|
|
94
85
|
|
|
95
86
|
Sprint Status Breakdown:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
Done: {done_count}
|
|
88
|
+
Backlog: {backlog_count}
|
|
89
|
+
In Progress: {in_progress_count}
|
|
90
|
+
Review: {review_count}
|
|
100
91
|
|
|
101
92
|
Phase 3 Status: {phase_3_status}
|
|
102
93
|
Master Step: 4/5
|
|
103
94
|
|
|
104
95
|
Proceeding to Finalization...
|
|
105
|
-
|
|
96
|
+
-----------------------------------------------
|
|
106
97
|
```
|
|
107
98
|
|
|
108
99
|
**Auto-Proceed:** YES — Do NOT wait for user input. Immediately proceed to step-05.
|
|
@@ -111,15 +102,13 @@ Proceeding to Finalization...
|
|
|
111
102
|
|
|
112
103
|
## SUCCESS METRICS
|
|
113
104
|
|
|
114
|
-
-
|
|
105
|
+
- Batch story pipeline executed with Agent subprocess isolation
|
|
115
106
|
- All stories processed through create → validate → develop → review → test → complete
|
|
116
107
|
- All story statuses updated to "done" in sprint-status.yaml
|
|
117
108
|
- Epic statuses updated where all stories complete
|
|
118
109
|
|
|
119
110
|
## FAILURE MODES
|
|
120
111
|
|
|
121
|
-
-
|
|
122
|
-
- Individual story
|
|
123
|
-
- Story creation fails (malformed epics)
|
|
124
|
-
- Story pipeline unable to find backlog stories
|
|
112
|
+
- Batch pipeline unable to find backlog stories
|
|
113
|
+
- Individual story Agent failures (recorded but non-blocking)
|
|
125
114
|
- Partial completion (some stories done, others stuck)
|
|
@@ -156,7 +156,7 @@ Write to: `{implementation_artifacts}/full-pipeline-status.json`
|
|
|
156
156
|
|
|
157
157
|
🔜 Recommended Next Steps:
|
|
158
158
|
1. Review escalation reports for blocked stories
|
|
159
|
-
2. Run /xiaoma-auto-story-pipeline to resume remaining stories
|
|
159
|
+
2. Run /xiaoma-auto-story-pipeline-batch to resume remaining stories
|
|
160
160
|
3. Use /xiaoma-correct-course (CC) if scope changes are needed
|
|
161
161
|
```
|
|
162
162
|
|
|
@@ -168,7 +168,7 @@ Write to: `{implementation_artifacts}/full-pipeline-status.json`
|
|
|
168
168
|
🔜 Recommended Next Steps:
|
|
169
169
|
1. Check story pipeline logs for error details
|
|
170
170
|
2. Verify epics and architecture are well-formed
|
|
171
|
-
3. Run /xiaoma-auto-story-pipeline manually to diagnose
|
|
171
|
+
3. Run /xiaoma-auto-story-pipeline-batch manually to diagnose
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
### 7. Pipeline Complete
|
|
@@ -13,7 +13,7 @@ description: "Fully automated requirements-to-delivery pipeline: requirements an
|
|
|
13
13
|
- Analyst (xiaofen) → Architect (xiaojia) → PM (xiaochan) → Architect (xiaojia)
|
|
14
14
|
- **Phase 2 — Bridge** (sprint planning)
|
|
15
15
|
- SM (xiaomin) — Generate sprint tracking from epics
|
|
16
|
-
- **Phase 3 — Story Development** (delegates to auto-story-pipeline)
|
|
16
|
+
- **Phase 3 — Story Development** (delegates to auto-story-pipeline-batch)
|
|
17
17
|
- SM (xiaomin) → PM (xiaochan) → Dev (xiaokai) → Reviewer → QA (xiaoce)
|
|
18
18
|
|
|
19
19
|
- Communicate all responses in {communication_language} and generate all documents in {document_output_language}
|
|
@@ -38,7 +38,7 @@ This uses **step-file architecture** with delegation to existing sub-pipelines:
|
|
|
38
38
|
- Step-01: Initialize and validate — unified prerequisite check
|
|
39
39
|
- Step-02: Execute auto-requirements-pipeline — produces PRD, epics, architecture
|
|
40
40
|
- Step-03: Bridge — auto-run sprint-planning to generate sprint-status.yaml
|
|
41
|
-
- Step-04: Execute auto-story-pipeline — develop all stories
|
|
41
|
+
- Step-04: Execute auto-story-pipeline-batch — develop all stories using Agent subprocess isolation
|
|
42
42
|
- Step-05: Finalize — unified completion report across both phases
|
|
43
43
|
|
|
44
44
|
### State Variables
|
|
@@ -59,13 +59,11 @@ This uses **step-file architecture** with delegation to existing sub-pipelines:
|
|
|
59
59
|
- `{steps_completed}` — Requirements pipeline step counter
|
|
60
60
|
- `{validation_iteration}`, `{analysis_iteration}`, `{architecture_iteration}` — Retry counters
|
|
61
61
|
|
|
62
|
-
**Inherited from auto-story-pipeline (Phase 3):**
|
|
62
|
+
**Inherited from auto-story-pipeline-batch (Phase 3):**
|
|
63
63
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- `{
|
|
67
|
-
- `{stories_completed}` — Story completion counter
|
|
68
|
-
- `{backlog_count}`, `{ready_count}`, `{in_progress_count}`, `{review_count}`, `{done_count}` — Status counts
|
|
64
|
+
- Story processing is delegated to independent Agent subprocesses via auto-story-pipeline-batch
|
|
65
|
+
- Each story runs in isolated context — see auto-story-pipeline-batch/workflow.md for details
|
|
66
|
+
- `{backlog_count}`, `{ready_count}`, `{in_progress_count}`, `{review_count}`, `{done_count}` — Status counts (refreshed after batch completion)
|
|
69
67
|
|
|
70
68
|
### Pipeline Flow
|
|
71
69
|
|
|
@@ -96,7 +94,7 @@ Load config from `{project-root}/_xiaoma/xmc/config.yaml` and resolve:
|
|
|
96
94
|
- `installed_path` = `{project-root}/_xiaoma/xmc/workflows/5-full-pipeline/auto-full-pipeline`
|
|
97
95
|
- `requirements_pipeline` = `{project-root}/_xiaoma/xmc/workflows/1-analysis/auto-requirements-pipeline/workflow.md`
|
|
98
96
|
- `sprint_planning_workflow` = `{project-root}/_xiaoma/xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md`
|
|
99
|
-
- `
|
|
97
|
+
- `story_pipeline_batch` = `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline-batch/workflow.md`
|
|
100
98
|
- `validation` = `{installed_path}/checklist.md`
|
|
101
99
|
|
|
102
100
|
### Context
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xiaoma-auto-prd-to-stories
|
|
3
|
+
description: "Automated PRD-to-Stories pipeline (NO development): prd.md → epics → sprint-status → per-story detailed files. Stops before dev/review/QA so business architects can evaluate user-story quality. Use when the user says 'PRD 转故事', 'auto prd to stories', or 'APS'"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the instructions in [workflow.md](workflow.md).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Auto PRD-to-Stories Pipeline Completion Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist to validate the PRD-to-Stories pipeline completed successfully. This pipeline stops BEFORE development, so only planning + sprint-status + per-story files are in scope.
|
|
4
|
+
|
|
5
|
+
## Phase 1 — Epics Creation Validation
|
|
6
|
+
|
|
7
|
+
- [ ] **Input PRD Present** — `{planning_artifacts}/prd.md` exists and was readable at pipeline start
|
|
8
|
+
- [ ] **Epics Created** — `{planning_artifacts}/epics.md` exists with full epic/story breakdown
|
|
9
|
+
- [ ] **PRD Coverage** — Every major functional requirement in `prd.md` is covered by at least one epic
|
|
10
|
+
- [ ] **Story Granularity** — Every epic contains at least one user story
|
|
11
|
+
- [ ] **Acceptance Criteria Present** — Every story has BDD-formatted acceptance criteria (Given/When/Then)
|
|
12
|
+
|
|
13
|
+
## Phase 2 — Sprint Planning Bridge Validation
|
|
14
|
+
|
|
15
|
+
- [ ] **Sprint Status Generated** — `{implementation_artifacts}/sprint-status.yaml` exists with valid YAML
|
|
16
|
+
- [ ] **All Epics Represented** — Every epic from `epics.md` has an `epic-N` entry in sprint status
|
|
17
|
+
- [ ] **All Stories Represented** — Every story from `epics.md` has a `N-N-kebab-name` entry in sprint status
|
|
18
|
+
|
|
19
|
+
## Phase 3 — Per-Story File Generation Validation
|
|
20
|
+
|
|
21
|
+
- [ ] **One File Per Story** — Every story key in sprint-status.yaml has a corresponding `{implementation_artifacts}/{story_key}.md` file (excluding failed keys)
|
|
22
|
+
- [ ] **Top-Level Sections Present** — Every story file contains: `Status`, `Story`, `Acceptance Criteria`, `Tasks / Subtasks`, `Dev Notes`
|
|
23
|
+
- [ ] **Dev Notes Detailed-Design Subsections Present** — Every story file's `Dev Notes` contains these three mandatory subsections (per the step-04 Detailed Design Output Contract):
|
|
24
|
+
- [ ] `Functional Requirements Addressed` — lists FR/feature references from prd.md or epics.md
|
|
25
|
+
- [ ] `Data Model & Database Design` — concrete tables/fields/constraints/indexes OR an explicit `TBD by architect` line with reason
|
|
26
|
+
- [ ] `Implementation Logic` — concrete interface signatures / algorithm / state machine / error handling OR an explicit `TBD by architect` line with reason
|
|
27
|
+
- [ ] **No Silent Omissions** — No story file contains a Dev Notes subsection that is only a heading with no body content
|
|
28
|
+
- [ ] **Story Status Correct** — Every successfully created story file has `Status: ready-for-dev`
|
|
29
|
+
- [ ] **No Stories Beyond ready-for-dev** — No story file shows status `in-progress`, `review`, or `done` (this pipeline never enters those states)
|
|
30
|
+
- [ ] **Failed Stories Documented** — Any story key in `failed_story_keys` has its failure recorded in the final report with an error reason
|
|
31
|
+
|
|
32
|
+
## Cross-Phase Traceability Validation
|
|
33
|
+
|
|
34
|
+
- [ ] **FR Coverage Map Filled** — `epics.md` contains a `### FR Coverage Map` section with concrete `FR-N → Epic X / Story X.Y` mappings (not raw `{{placeholder}}`)
|
|
35
|
+
- [ ] **FR Reverse Traceability** — Every functional requirement extracted from `prd.md` is referenced by at least one story file (verified by step-05's reverse-traceability check). Uncovered FRs are documented in Structural Warnings.
|
|
36
|
+
|
|
37
|
+
## Pipeline-Level Validation
|
|
38
|
+
|
|
39
|
+
- [ ] **All 5 Master Steps Executed** — Steps 1–5 completed without HALT (or HALT properly reported)
|
|
40
|
+
- [ ] **No Dev/Review/Test Side Effects** — No code files modified outside `{planning_artifacts}` and `{implementation_artifacts}`
|
|
41
|
+
- [ ] **Phase Boundary Summaries Output** — End-of-phase state snapshots logged for context-recovery
|
|
42
|
+
- [ ] **Final Report Generated** — step-05 produced a unified completion report listing all artifacts and counts
|
|
43
|
+
- [ ] **Artifact Consistency** — `sprint-status.yaml` story keys match story files on disk one-to-one (allowing for documented failures)
|
package/src/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-01-init-and-validate.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-01-init-and-validate'
|
|
3
|
+
description: 'Validate prd.md and sub-workflow paths, initialize PRD-to-Stories pipeline state variables, and prepare for execution'
|
|
4
|
+
nextStepFile: './step-02-create-epics.md'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 1 of 5: Initialize and Validate Environment
|
|
8
|
+
|
|
9
|
+
**Goal:** Verify the input `prd.md` exists, all delegated sub-workflows are accessible, and initialize master pipeline state variables.
|
|
10
|
+
|
|
11
|
+
**Role:** Pipeline Orchestrator
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## EXECUTION SEQUENCE
|
|
16
|
+
|
|
17
|
+
### 1. Load Configuration
|
|
18
|
+
|
|
19
|
+
Read config from `{project-root}/_xiaoma/xmc/config.yaml` and resolve:
|
|
20
|
+
|
|
21
|
+
- `project_name`, `user_name`
|
|
22
|
+
- `communication_language`, `document_output_language`
|
|
23
|
+
- `user_skill_level`
|
|
24
|
+
- `planning_artifacts`, `implementation_artifacts`
|
|
25
|
+
- `date` as system-generated current datetime
|
|
26
|
+
|
|
27
|
+
**HALT if config not found:** "XiaoMa config not found at `{project-root}/_xiaoma/xmc/config.yaml`. Run `npx @zeyue0329/xiaoma-cli install` first."
|
|
28
|
+
|
|
29
|
+
### 2. Validate Required Input
|
|
30
|
+
|
|
31
|
+
**Input PRD** — `{planning_artifacts}/prd.md` must exist and be readable.
|
|
32
|
+
|
|
33
|
+
- If missing: HALT — "No PRD document found at `{planning_artifacts}/prd.md`. This pipeline requires a pre-existing PRD as input. Either:
|
|
34
|
+
1. Place your PRD at `{planning_artifacts}/prd.md`, OR
|
|
35
|
+
2. Run the full auto-requirements-pipeline (AR) first to generate a PRD from a requirements document."
|
|
36
|
+
|
|
37
|
+
- Read the first 20 lines of `prd.md` to extract document title and confirm it is non-empty. If empty: HALT — "prd.md exists but is empty."
|
|
38
|
+
|
|
39
|
+
### 3. Validate Sub-Workflow Paths
|
|
40
|
+
|
|
41
|
+
Check that all delegated sub-workflows are readable:
|
|
42
|
+
|
|
43
|
+
1. **Create Epics & Stories** — `{project-root}/_xiaoma/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/workflow.md`
|
|
44
|
+
- If missing: HALT — "xiaoma-create-epics-and-stories workflow not found. Verify XiaoMa installation is complete."
|
|
45
|
+
|
|
46
|
+
2. **Sprint Planning** — `{project-root}/_xiaoma/xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md`
|
|
47
|
+
- If missing: HALT — "xiaoma-sprint-planning workflow not found. Verify XiaoMa installation is complete."
|
|
48
|
+
|
|
49
|
+
3. **Create Story** — `{project-root}/_xiaoma/xmc/workflows/4-implementation/xiaoma-create-story/workflow.md`
|
|
50
|
+
- If missing: HALT — "xiaoma-create-story workflow not found. Verify XiaoMa installation is complete."
|
|
51
|
+
|
|
52
|
+
4. **Checklist** — `{installed_path}/checklist.md` must be readable for step-05 self-check.
|
|
53
|
+
- If missing: Output WARNING — "checklist.md not found; final self-check will be skipped."
|
|
54
|
+
|
|
55
|
+
### 4. Check Existing Artifacts (Informational)
|
|
56
|
+
|
|
57
|
+
Scan for pre-existing output artifacts from prior runs:
|
|
58
|
+
|
|
59
|
+
- `{planning_artifacts}/epics.md`
|
|
60
|
+
- `{implementation_artifacts}/sprint-status.yaml`
|
|
61
|
+
- `{implementation_artifacts}/*.md` matching pattern `<digit>-<digit>-*.md` (per-story files)
|
|
62
|
+
|
|
63
|
+
If any exist, log INFO — "Pre-existing artifact found: {filename}. The pipeline is idempotent: `xiaoma-sprint-planning` will smart-detect existing story files and `xiaoma-create-story` skips stories already at `ready-for-dev`."
|
|
64
|
+
|
|
65
|
+
Also informational scan for optional context (NOT required for this pipeline, but if present they enrich story Dev Notes):
|
|
66
|
+
|
|
67
|
+
- `{planning_artifacts}/requirements-analysis.md`
|
|
68
|
+
- `{planning_artifacts}/current-architecture-analysis.md`
|
|
69
|
+
- `{planning_artifacts}/architecture.md`
|
|
70
|
+
- `{planning_artifacts}/*ux*.md`
|
|
71
|
+
|
|
72
|
+
Set pipeline-level flag `{architecture_absent}`:
|
|
73
|
+
|
|
74
|
+
- If NONE of `{planning_artifacts}/architecture.md`, `{planning_artifacts}/current-architecture-analysis.md`, or any `{planning_artifacts}/*architecture*.md` exists: set `{architecture_absent}` = `true`
|
|
75
|
+
- Otherwise: set `{architecture_absent}` = `false`
|
|
76
|
+
|
|
77
|
+
If `{architecture_absent}` == `true`: log INFO — "No architecture documents found. Story Dev Notes will be derived solely from prd.md + epics.md. The Data Model subsection of each story will be flagged 'TBD by architect' wherever no schema clues exist in those sources."
|
|
78
|
+
|
|
79
|
+
This flag is consumed by step-04 — it is passed into every Agent subprocess so each story-creation Agent knows whether to expect architectural context or to default the Data Model subsection to `TBD by architect`.
|
|
80
|
+
|
|
81
|
+
### 5. Initialize Master Pipeline State Variables
|
|
82
|
+
|
|
83
|
+
- `{prd_to_stories_status}` = "initialized"
|
|
84
|
+
- `{steps_completed}` = 1
|
|
85
|
+
- `{phase_1_status}` = "pending"
|
|
86
|
+
- `{phase_2_status}` = "pending"
|
|
87
|
+
- `{phase_3_status}` = "pending"
|
|
88
|
+
- `{stories_created}` = 0
|
|
89
|
+
- `{stories_failed}` = 0
|
|
90
|
+
- `{failed_story_keys}` = []
|
|
91
|
+
- `{story_results}` = []
|
|
92
|
+
- `{architecture_absent}` = set by Section 4's scan above (`true` or `false`)
|
|
93
|
+
- Ensure `{planning_artifacts}/` directory exists
|
|
94
|
+
- Ensure `{implementation_artifacts}/` directory exists
|
|
95
|
+
|
|
96
|
+
### 6. Load Context
|
|
97
|
+
|
|
98
|
+
- Load `project_context` = `**/project-context.md` (if exists)
|
|
99
|
+
|
|
100
|
+
### 7. Output Environment Summary
|
|
101
|
+
|
|
102
|
+
**Output:**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
═══════════════════════════════════════════════════
|
|
106
|
+
Auto PRD-to-Stories Pipeline — INITIALIZED
|
|
107
|
+
═══════════════════════════════════════════════════
|
|
108
|
+
|
|
109
|
+
Project: {project_name}
|
|
110
|
+
User: {user_name}
|
|
111
|
+
Date: {date}
|
|
112
|
+
Language: {communication_language} / {document_output_language}
|
|
113
|
+
|
|
114
|
+
📋 Input PRD: {planning_artifacts}/prd.md
|
|
115
|
+
📂 Planning Artifacts: {planning_artifacts}/
|
|
116
|
+
📂 Implementation Artifacts: {implementation_artifacts}/
|
|
117
|
+
|
|
118
|
+
Pipeline Phases (stops BEFORE development):
|
|
119
|
+
⬜ Phase 1 — Create Epics (PM xiaochan, delegates to xiaoma-create-epics-and-stories)
|
|
120
|
+
⬜ Phase 2 — Sprint Planning Bridge (SM xiaomin, delegates to xiaoma-sprint-planning)
|
|
121
|
+
⬜ Phase 3 — Batch Create Story Files (SM xiaomin, N Agent subprocesses)
|
|
122
|
+
|
|
123
|
+
Finalization: Step 5 — Unified completion report for business-architect review
|
|
124
|
+
|
|
125
|
+
⚠️ This pipeline does NOT enter development, code-review, or testing.
|
|
126
|
+
Output is the input to a manual quality review by business architects.
|
|
127
|
+
|
|
128
|
+
Master Step: 1/5
|
|
129
|
+
═══════════════════════════════════════════════════
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Auto-Proceed:** YES — Do NOT wait for user input. Proceed to step-02.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## NEXT STEP
|
|
137
|
+
|
|
138
|
+
**NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-02-create-epics.md`
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## SUCCESS METRICS
|
|
143
|
+
|
|
144
|
+
- Config loaded and all variables resolved
|
|
145
|
+
- `prd.md` exists and is non-empty
|
|
146
|
+
- All three delegated sub-workflows accessible
|
|
147
|
+
- Master state variables initialized
|
|
148
|
+
- Environment summary output
|
|
149
|
+
|
|
150
|
+
## FAILURE MODES
|
|
151
|
+
|
|
152
|
+
- Missing `prd.md` (cannot proceed without input)
|
|
153
|
+
- Missing XiaoMa config (installation incomplete)
|
|
154
|
+
- Missing sub-workflow files (installation incomplete)
|
|
155
|
+
- Directory creation failures
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-02-create-epics'
|
|
3
|
+
description: 'Phase 1 — PM role creates epics and stories from prd.md by delegating to create-epics-and-stories workflow'
|
|
4
|
+
nextStepFile: './step-03-bridge-sprint-planning.md'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 2 of 5: Create Epics and Stories
|
|
8
|
+
|
|
9
|
+
**Goal:** Break down the input `prd.md` into epics and user stories using the existing `xiaoma-create-epics-and-stories` workflow. Produces `{planning_artifacts}/epics.md`.
|
|
10
|
+
|
|
11
|
+
**Role:** PM (xiaochan) — Product Manager + Requirements Specialist
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## EXECUTION SEQUENCE
|
|
16
|
+
|
|
17
|
+
### 1. Announce Phase Entry
|
|
18
|
+
|
|
19
|
+
**Output:**
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
═══════════════════════════════════════════════════
|
|
23
|
+
Phase 1 of 3 — Create Epics from PRD
|
|
24
|
+
═══════════════════════════════════════════════════
|
|
25
|
+
|
|
26
|
+
Switching role to PM (xiaochan)...
|
|
27
|
+
Delegating to xiaoma-create-epics-and-stories workflow.
|
|
28
|
+
───────────────────────────────────────────────────
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Switch to PM Role
|
|
32
|
+
|
|
33
|
+
Adopt the PM (xiaochan) persona:
|
|
34
|
+
|
|
35
|
+
- You are xiaochan, the Product Manager + Requirements Specialist
|
|
36
|
+
- Your purpose is to break down the input PRD into well-structured epics and user stories
|
|
37
|
+
- Communication style: Precise, structured, stakeholder-aware
|
|
38
|
+
- Focus on complete feature coverage and actionable story granularity
|
|
39
|
+
|
|
40
|
+
### 3. Load Required Context
|
|
41
|
+
|
|
42
|
+
Load these artifacts in order:
|
|
43
|
+
|
|
44
|
+
1. **PRIMARY SOURCE** — Read the FULL file from beginning to end
|
|
45
|
+
- File: `{planning_artifacts}/prd.md` (validated in step-01)
|
|
46
|
+
- Requirement: Complete read, no skipping
|
|
47
|
+
|
|
48
|
+
2. **OPTIONAL SECONDARY SOURCES** — Read each fully IF the file exists; if not present, SKIP silently
|
|
49
|
+
- File: `{planning_artifacts}/requirements-analysis.md` — Optional
|
|
50
|
+
- File: `{planning_artifacts}/current-architecture-analysis.md` — Optional
|
|
51
|
+
- File: `{planning_artifacts}/architecture.md` — Optional
|
|
52
|
+
|
|
53
|
+
**Note:** Unlike the auto-requirements-pipeline's step-06 which treats these as required, this pipeline treats them as opportunistic enrichment. The new workflow's contract is "PRD-only input is sufficient."
|
|
54
|
+
|
|
55
|
+
### 4. Verify Workflow Prerequisites
|
|
56
|
+
|
|
57
|
+
Before delegating, verify the required workflow exists:
|
|
58
|
+
|
|
59
|
+
1. Check that `{project-root}/_xiaoma/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/workflow.md` is readable
|
|
60
|
+
2. If workflow is missing:
|
|
61
|
+
- HALT — "Required workflow not found: `xiaoma-create-epics-and-stories`. Verify XiaoMa installation is complete."
|
|
62
|
+
|
|
63
|
+
### 5. Execute Epic and Story Creation (Delegate)
|
|
64
|
+
|
|
65
|
+
Invoke the `xiaoma-create-epics-and-stories` skill to create the epic breakdown.
|
|
66
|
+
|
|
67
|
+
**CRITICAL PIPELINE MODE INSTRUCTIONS:**
|
|
68
|
+
|
|
69
|
+
- This is running in **automated pipeline mode** — do NOT pause for user input
|
|
70
|
+
- The create-epics-and-stories workflow has 4 step files: validate-prerequisites → design-epics → create-stories → final-validation
|
|
71
|
+
- When ANY step presents a menu with **[C] Continue**, automatically select **C** to proceed to the next step
|
|
72
|
+
- Step 1 (validate-prerequisites) will ask the user to confirm discovered documents and extracted requirements — automatically confirm and continue
|
|
73
|
+
- Step 1 asks "Do these extracted requirements accurately represent what needs to be built?" — auto-confirm YES and select **C**
|
|
74
|
+
- When the workflow asks for user decisions on epic boundaries or story granularity, make reasonable decisions based on the PRD content
|
|
75
|
+
- Ensure every PRD feature is covered by at least one epic
|
|
76
|
+
- Each epic should have well-defined user stories with BDD acceptance criteria (Given/When/Then)
|
|
77
|
+
- Output file MUST be: `{planning_artifacts}/epics.md`
|
|
78
|
+
|
|
79
|
+
### 6. Verify Epic Output
|
|
80
|
+
|
|
81
|
+
After create-epics-and-stories workflow completes:
|
|
82
|
+
|
|
83
|
+
1. Verify `{planning_artifacts}/epics.md` exists and is non-empty
|
|
84
|
+
2. Verify all PRD features are covered by at least one epic (sanity check)
|
|
85
|
+
3. Verify each epic has at least one user story
|
|
86
|
+
4. Verify stories have acceptance criteria (look for "Given"/"When"/"Then" or equivalent)
|
|
87
|
+
5. **FR Coverage Map post-condition (CRITICAL):**
|
|
88
|
+
- Search `epics.md` for a section heading matching `### FR Coverage Map` (or `## FR Coverage Map`)
|
|
89
|
+
- The section MUST exist and MUST contain at least one non-placeholder mapping line (something like `FR-N → Epic X / Story X.Y`, NOT a raw `{{requirements_coverage_map}}` placeholder)
|
|
90
|
+
- **Why:** the underlying create-epics-and-stories template includes this section but the LLM occasionally skips filling it in. Without a populated coverage map, step-05's reverse-traceability check loses its anchor and the architect cannot easily verify "no PRD feature was dropped".
|
|
91
|
+
- If the section is missing OR contains an unfilled `{{...}}` placeholder:
|
|
92
|
+
- **First retry:** Re-invoke the create-epics-and-stories workflow with an explicit instruction: "The previous run left `### FR Coverage Map` empty or as a placeholder. You MUST extract every FR/feature from prd.md and produce concrete `FR-N → Epic X / Story X.Y` mappings."
|
|
93
|
+
- If the second run also fails to populate it: do NOT HALT — instead, log WARNING and continue. step-05 will fall back to grepping FR references inside story files and report any uncovered FRs as Structural Warnings.
|
|
94
|
+
6. Also extract a tally for step-05:
|
|
95
|
+
- `{epics_fr_count}` = number of distinct FR-style references in the FR Coverage Map (e.g., `FR-1`, `FR-2`, … or `PRD §x.y` patterns). Save this for step-05's denominator.
|
|
96
|
+
|
|
97
|
+
If epic creation failed at the file-level (epics.md missing or unreadable):
|
|
98
|
+
|
|
99
|
+
- **Retry once:** Re-invoke the workflow with the same instructions
|
|
100
|
+
- If still fails after retry: HALT — "Epic and story creation failed twice. Check `prd.md` for completeness and structural clarity before re-running."
|
|
101
|
+
|
|
102
|
+
### 7. Output Phase 1 Summary
|
|
103
|
+
|
|
104
|
+
Count epics and stories from generated `epics.md`:
|
|
105
|
+
|
|
106
|
+
- `{epic_count}` = number of "## Epic N:" headings
|
|
107
|
+
- `{story_count}` = number of "### Story N.N:" headings
|
|
108
|
+
|
|
109
|
+
**Output:**
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
───────────────────────────────────────────────────
|
|
113
|
+
✅ Phase 1 Complete — Epics Created
|
|
114
|
+
───────────────────────────────────────────────────
|
|
115
|
+
|
|
116
|
+
Output: {planning_artifacts}/epics.md
|
|
117
|
+
Total Epics: {epic_count}
|
|
118
|
+
Total Stories: {story_count}
|
|
119
|
+
|
|
120
|
+
Phase 1 Status: success
|
|
121
|
+
Master Step: 2/5
|
|
122
|
+
|
|
123
|
+
Proceeding to Phase 2 — Sprint Planning Bridge...
|
|
124
|
+
───────────────────────────────────────────────────
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 8. Pipeline Status Update
|
|
128
|
+
|
|
129
|
+
- `{phase_1_status}` = "success"
|
|
130
|
+
- `{prd_to_stories_status}` = "bridge-phase"
|
|
131
|
+
- `{steps_completed}` = 2
|
|
132
|
+
|
|
133
|
+
**Auto-Proceed:** YES — Do NOT wait for user input. Immediately proceed to step-03.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## NEXT STEP
|
|
138
|
+
|
|
139
|
+
**NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-03-bridge-sprint-planning.md`
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## SUCCESS METRICS
|
|
144
|
+
|
|
145
|
+
- `{planning_artifacts}/epics.md` created with complete epic breakdown
|
|
146
|
+
- All PRD features covered by at least one epic
|
|
147
|
+
- Each epic has user stories with BDD acceptance criteria
|
|
148
|
+
- Story dependencies identified (where applicable)
|
|
149
|
+
|
|
150
|
+
## FAILURE MODES
|
|
151
|
+
|
|
152
|
+
- PRD features not fully covered by epics
|
|
153
|
+
- Stories missing acceptance criteria
|
|
154
|
+
- Epic boundaries too broad or too narrow
|
|
155
|
+
- Workflow not writing output file
|
|
156
|
+
- Two consecutive failures of the delegated workflow
|