@zeyue0329/xiaoma-cli 1.12.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 +1 -0
- 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 +1 -1
- package/demo/xiaoma-bug-circle-resolve/workflow.md +72 -30
- 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/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 +135 -17
- package/patent-disclosure-optimized/references/docx-format-spec.md +183 -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 +4 -0
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-quality-rubric.csv +14 -0
- 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/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
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-03-bridge-sprint-planning'
|
|
3
|
+
description: 'Phase 2 bridge: auto-run sprint planning to generate sprint-status.yaml from epics, connecting epics output to per-story creation input'
|
|
4
|
+
nextStepFile: './step-04-batch-create-stories.md'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 3 of 5: Bridge — Sprint Planning
|
|
8
|
+
|
|
9
|
+
**Goal:** Generate `sprint-status.yaml` from the epics produced in Phase 1. This bridges the epic breakdown to the per-story file generation in Phase 3. Without this step, Phase 3 cannot determine which stories to process.
|
|
10
|
+
|
|
11
|
+
**Role:** SM (xiaomin) — Scrum Master generating sprint tracking
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## EXECUTION SEQUENCE
|
|
16
|
+
|
|
17
|
+
### 1. Announce Phase Entry
|
|
18
|
+
|
|
19
|
+
**Output:**
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
═══════════════════════════════════════════════════
|
|
23
|
+
Phase 2 of 3 — Sprint Planning Bridge
|
|
24
|
+
═══════════════════════════════════════════════════
|
|
25
|
+
|
|
26
|
+
Switching role to SM (xiaomin)...
|
|
27
|
+
Generating sprint-status.yaml from epics...
|
|
28
|
+
This bridges epics → per-story file generation.
|
|
29
|
+
───────────────────────────────────────────────────
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. Verify Epics Input
|
|
33
|
+
|
|
34
|
+
Confirm `{planning_artifacts}/epics.md` exists and is readable (should always pass since Phase 1 verified this, but re-check for fresh context loading):
|
|
35
|
+
|
|
36
|
+
- If missing: HALT — "epics.md not found. Phase 1 may have failed. Cannot generate sprint status."
|
|
37
|
+
|
|
38
|
+
Also check for sharded epics format (safety net only — Phase 1 produces a single `epics.md` file, not a sharded format):
|
|
39
|
+
|
|
40
|
+
- If `{planning_artifacts}/epics.md` not found, check for `{planning_artifacts}/epics/index.md`
|
|
41
|
+
- If sharded version found, proceed — the sprint planning workflow handles both formats
|
|
42
|
+
- If neither format found: HALT — "No epics found in any format. Phase 1 may have failed."
|
|
43
|
+
|
|
44
|
+
### 3. Switch to SM Role
|
|
45
|
+
|
|
46
|
+
Adopt the SM (xiaomin) persona:
|
|
47
|
+
|
|
48
|
+
- You are xiaomin, the Technical Scrum Master + Story Preparation Specialist
|
|
49
|
+
- Your purpose is to translate the epic breakdown into a sprint-status tracking file
|
|
50
|
+
- Communication style: Crisp and checklist-driven
|
|
51
|
+
|
|
52
|
+
### 4. Execute Sprint Planning Workflow
|
|
53
|
+
|
|
54
|
+
Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md`
|
|
55
|
+
|
|
56
|
+
**Critical Pipeline Mode Instructions:**
|
|
57
|
+
|
|
58
|
+
- **FULLY AUTOMATED:** Do NOT pause for user input
|
|
59
|
+
- The sprint planning workflow is a **single-file workflow** (`workflow.md`) containing 5 inline `<step>` blocks (not separate step files):
|
|
60
|
+
1. Parse epic files and extract all work items
|
|
61
|
+
2. Build sprint status structure (epic-N, story keys, retrospective entries)
|
|
62
|
+
3. Apply intelligent status detection (check for existing story files)
|
|
63
|
+
4. Generate `{implementation_artifacts}/sprint-status.yaml`
|
|
64
|
+
5. Validate and report totals
|
|
65
|
+
- Execute ALL 5 inline steps sequentially within the single workflow file
|
|
66
|
+
- For fresh runs (no pre-existing story files), all stories should default to `backlog` status
|
|
67
|
+
- For re-runs (pre-existing story files detected by step 3 of sprint-planning), stories with files on disk will be promoted to `ready-for-dev` — this is the intended idempotency behavior
|
|
68
|
+
- When the workflow outputs "Next Steps" guidance at the end, **ignore it** — the next steps are handled by THIS pipeline automatically
|
|
69
|
+
- **Complete ALL steps without stopping**
|
|
70
|
+
|
|
71
|
+
### 5. Verify Sprint Status Output
|
|
72
|
+
|
|
73
|
+
After sprint planning completes, verify:
|
|
74
|
+
|
|
75
|
+
1. **Sprint Status File** — `{implementation_artifacts}/sprint-status.yaml` must exist
|
|
76
|
+
- If missing: HALT — "Sprint planning failed to generate sprint-status.yaml. Check epics format and retry."
|
|
77
|
+
|
|
78
|
+
2. **Content Validation** — Read the generated file and verify:
|
|
79
|
+
- Contains `development_status:` section
|
|
80
|
+
- Contains at least one story entry (key matches `<digit>-<digit>-*` pattern, not just epic entries)
|
|
81
|
+
- Valid YAML syntax
|
|
82
|
+
|
|
83
|
+
3. **Count Stories** — Parse and count:
|
|
84
|
+
- `{epic_count}` — Number of `epic-N` entries
|
|
85
|
+
- `{story_count}` — Total story keys matching `<digit>-<digit>-*`
|
|
86
|
+
- `{backlog_count}` — Stories with status `backlog`
|
|
87
|
+
- `{ready_count}` — Stories with status `ready-for-dev` (pre-existing files)
|
|
88
|
+
|
|
89
|
+
If `{backlog_count}` == 0 AND `{ready_count}` == 0:
|
|
90
|
+
|
|
91
|
+
- HALT — "No processable stories found in sprint-status.yaml. Both backlog and ready-for-dev queues are empty."
|
|
92
|
+
|
|
93
|
+
### 6. Update Master Pipeline State
|
|
94
|
+
|
|
95
|
+
- `{phase_2_status}` = "success"
|
|
96
|
+
- `{prd_to_stories_status}` = "stories-phase"
|
|
97
|
+
- `{steps_completed}` = 3
|
|
98
|
+
|
|
99
|
+
### 7. Output Phase 2 Summary
|
|
100
|
+
|
|
101
|
+
**Output:**
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
───────────────────────────────────────────────────
|
|
105
|
+
✅ Phase 2 Complete — Sprint Planning Bridge
|
|
106
|
+
───────────────────────────────────────────────────
|
|
107
|
+
|
|
108
|
+
Sprint Status: {implementation_artifacts}/sprint-status.yaml
|
|
109
|
+
Total Epics: {epic_count}
|
|
110
|
+
Total Stories: {story_count}
|
|
111
|
+
Stories in Backlog: {backlog_count}
|
|
112
|
+
Stories already Ready-for-Dev (pre-existing files): {ready_count}
|
|
113
|
+
|
|
114
|
+
Phase 2 Status: {phase_2_status}
|
|
115
|
+
Master Step: 3/5
|
|
116
|
+
|
|
117
|
+
Proceeding to Phase 3 — Batch Story File Generation...
|
|
118
|
+
───────────────────────────────────────────────────
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Auto-Proceed:** YES — Do NOT wait for user input. Immediately proceed to step-04.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## NEXT STEP
|
|
126
|
+
|
|
127
|
+
**NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/5-full-pipeline/auto-prd-to-stories/steps/step-04-batch-create-stories.md`
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## SUCCESS METRICS
|
|
132
|
+
|
|
133
|
+
- sprint-status.yaml generated with valid YAML
|
|
134
|
+
- All epics and stories from epics.md represented
|
|
135
|
+
- Story counts tallied for Phase 3 batch loop
|
|
136
|
+
- Phase 2 status set to "success"
|
|
137
|
+
|
|
138
|
+
## FAILURE MODES
|
|
139
|
+
|
|
140
|
+
- Epics file missing or unreadable
|
|
141
|
+
- Sprint planning workflow fails
|
|
142
|
+
- Generated sprint-status.yaml is malformed or empty
|
|
143
|
+
- No story entries found in sprint status
|