jdd-sprint-kit 0.4.0 → 0.5.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/README.md +59 -32
- package/package.json +1 -1
- package/templates/.claude/agents/auto-sprint.md +28 -11
- package/templates/.claude/agents/deliverable-generator.md +1 -0
- package/templates/.claude/commands/parallel.md +7 -2
- package/templates/.claude/commands/sprint.md +16 -11
- package/templates/.claude/commands/validate.md +7 -2
- package/templates/.claude/rules/bmad-sprint-guide.md +2 -0
- package/templates/.claude/rules/bmad-sprint-protocol.md +117 -3
package/README.md
CHANGED
|
@@ -12,28 +12,31 @@ User inputs (meeting notes, references, existing system context) raise AI's firs
|
|
|
12
12
|
## Overall Flow
|
|
13
13
|
|
|
14
14
|
```mermaid
|
|
15
|
-
flowchart
|
|
16
|
-
A["1. Brief
|
|
17
|
-
B --> C["3.
|
|
18
|
-
C --> D["4. Specs
|
|
15
|
+
flowchart TD
|
|
16
|
+
A["1. Provide Brief & Materials"] --> B["2. Analyze Existing System\n(Brownfield Scan)"]
|
|
17
|
+
B --> C["3. AI Generates PRD & Design\n(Auto-Pipeline)"]
|
|
18
|
+
C --> D["4. Generate Specs"]
|
|
19
19
|
D --> JP1{{"JP1\nIs this the right\nproduct?"}}
|
|
20
|
-
JP1 -->|Approve| E["5.
|
|
20
|
+
JP1 -->|Approve| E["5. Generate Prototype\n(Deliverables)"]
|
|
21
21
|
JP1 -->|Revise| C
|
|
22
22
|
E --> JP2{{"JP2\nIs this the right\nexperience?"}}
|
|
23
|
-
JP2 -->|Approve| F["6.
|
|
23
|
+
JP2 -->|Approve| F["6. Build\n(Parallel Implementation)"]
|
|
24
|
+
JP2 -->|Crystallize| CR["6b. Reconcile Documents\n(Crystallize)"]
|
|
24
25
|
JP2 -->|Revise| E
|
|
25
26
|
JP2 -.->|Re-examine requirements| JP1
|
|
26
|
-
|
|
27
|
+
CR --> F
|
|
28
|
+
F --> G["7. Quality Check\n(Validate)"]
|
|
27
29
|
G -->|Pass| H["Done"]
|
|
28
30
|
G -->|Repeated failure| CB["Course Correction\n(Circuit Breaker)"]
|
|
29
31
|
CB --> C
|
|
30
32
|
|
|
31
33
|
style JP1 fill:#FFD700,stroke:#333
|
|
32
34
|
style JP2 fill:#FFD700,stroke:#333
|
|
35
|
+
style CR fill:#87CEEB,stroke:#333
|
|
33
36
|
style CB fill:#FF6B6B,stroke:#333
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
Human involvement happens at exactly **2 points** (JP1, JP2) — everything else runs autonomously. If JP2 reveals issues with the requirements themselves, it loops back to JP1 — this is not a failure, but a normal discovery prompted by concrete deliverables.
|
|
39
|
+
Human involvement happens at exactly **2 points** (JP1, JP2) — everything else runs autonomously. If JP2 reveals issues with the requirements themselves, it loops back to JP1 — this is not a failure, but a normal discovery prompted by concrete deliverables. After multiple JP2 revisions, **Crystallize** optionally reconciles all documents to match the finalized prototype before implementation begins.
|
|
37
40
|
|
|
38
41
|
---
|
|
39
42
|
|
|
@@ -66,23 +69,37 @@ npx jdd-sprint-kit init
|
|
|
66
69
|
|
|
67
70
|
An interactive wizard detects your environment and installs Sprint Kit files.
|
|
68
71
|
|
|
69
|
-
### (Optional)
|
|
72
|
+
### (Optional) Connect Existing Service Data
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
Sprint Kit can analyze your existing service code to avoid duplicate APIs and breaking changes. Three access methods exist, from simplest to most flexible:
|
|
72
75
|
|
|
76
|
+
**Method 1: GitHub URL in brief.md** (simplest — no setup needed)
|
|
77
|
+
Declare GitHub repo URLs in the `## Reference Sources` section of brief.md. Sprint auto-downloads a read-only snapshot via `gh api tarball/HEAD`.
|
|
78
|
+
|
|
79
|
+
**Method 2: `--add-dir`** (for local clones)
|
|
80
|
+
Add local repo directories when launching Claude Code:
|
|
73
81
|
```bash
|
|
74
|
-
|
|
75
|
-
# Edit .mcp.json: update local paths for your environment
|
|
82
|
+
claude --add-dir /path/to/backend-repo --add-dir /path/to/client-repo
|
|
76
83
|
```
|
|
77
84
|
|
|
85
|
+
**Method 3: Figma MCP** (for live design data)
|
|
86
|
+
```bash
|
|
87
|
+
claude mcp add --transport http figma https://mcp.figma.com/mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> Methods 1 and 2 were introduced in v0.4.0, replacing MCP filesystem servers which were restricted by Claude Code's MCP security to the project root directory only. Figma remains MCP because its data exists only on Figma's servers and cannot be downloaded as files.
|
|
91
|
+
|
|
78
92
|
### First Sprint Run
|
|
79
93
|
|
|
80
94
|
```bash
|
|
81
|
-
# In Claude Code
|
|
95
|
+
# In Claude Code — start a new feature (creates template if folder doesn't exist)
|
|
96
|
+
/sprint my-feature-name
|
|
97
|
+
|
|
98
|
+
# Or start immediately with an inline Brief
|
|
82
99
|
/sprint "Describe the feature you want to build"
|
|
83
100
|
```
|
|
84
101
|
|
|
85
|
-
### Tutorial
|
|
102
|
+
### Tutorial
|
|
86
103
|
|
|
87
104
|
To experience the full Sprint Kit pipeline, use the included example project:
|
|
88
105
|
|
|
@@ -91,7 +108,7 @@ To experience the full Sprint Kit pipeline, use the included example project:
|
|
|
91
108
|
/sprint test-tutor-excl
|
|
92
109
|
```
|
|
93
110
|
|
|
94
|
-
This is a scenario for adding a "tutor exclusion" feature to a fictional EduTalk service. 4 meeting notes are prepared in `specs/test-tutor-excl/inputs/`, and `brownfield-context.md`
|
|
111
|
+
This is a scenario for adding a "tutor exclusion" feature to a fictional EduTalk service. 4 meeting notes are prepared in `specs/test-tutor-excl/inputs/`, and `brownfield-context.md` is pre-written to substitute for external data source scan results. No external data setup required.
|
|
95
112
|
|
|
96
113
|
---
|
|
97
114
|
|
|
@@ -101,6 +118,7 @@ This is a scenario for adding a "tutor exclusion" feature to a fictional EduTalk
|
|
|
101
118
|
|
|
102
119
|
```
|
|
103
120
|
[Input + Brownfield + BMad] → [Specs] → JP1 → [Deliverables] → JP2 → [Execute]
|
|
121
|
+
↳ [Crystallize] (optional)
|
|
104
122
|
|
|
105
123
|
Sprint: |←──────────────── Fully Auto ───────────────────────→|
|
|
106
124
|
Guided: |←── BMad Dialog ──→|←────────── Auto ───────────────→|
|
|
@@ -123,11 +141,12 @@ Routes are not fixed. If you have materials but need deep exploration, use Guide
|
|
|
123
141
|
|
|
124
142
|
## Brownfield — Existing System Integration
|
|
125
143
|
|
|
126
|
-
AI must understand the existing service structure to avoid creating duplicate APIs or breaking existing screen flows. Brownfield data is cumulatively collected from **
|
|
144
|
+
AI must understand the existing service structure to avoid creating duplicate APIs or breaking existing screen flows. Brownfield data is cumulatively collected from **4 sources**:
|
|
127
145
|
|
|
128
|
-
1. **document-project
|
|
129
|
-
2. **
|
|
130
|
-
3. **
|
|
146
|
+
1. **document-project** — Structured docs generated by BMad `/document-project` workflow scanning the existing codebase
|
|
147
|
+
2. **External repos** — Existing service code accessed via `--add-dir` (local clones) or tarball snapshot (GitHub URLs)
|
|
148
|
+
3. **Figma** — Live design data accessed via MCP (OAuth)
|
|
149
|
+
4. **Local codebase** — Direct scan of source code in the current project
|
|
131
150
|
|
|
132
151
|
### Brownfield Context Generation
|
|
133
152
|
|
|
@@ -135,7 +154,7 @@ AI must understand the existing service structure to avoid creating duplicate AP
|
|
|
135
154
|
|
|
136
155
|
`/sprint` automatically generates brownfield-context.md:
|
|
137
156
|
|
|
138
|
-
1. **Phase 0** — Topology detection: detect document-project presence,
|
|
157
|
+
1. **Phase 0** — Topology detection: detect document-project presence, external data sources (`--add-dir` paths, GitHub repo URLs, Figma MCP), build tools → determine project type (`standalone` / `co-located` / `msa` / `monorepo`)
|
|
139
158
|
2. **Pass 1 (Broad Scan)** — Collect domain concepts (L1) and behavior patterns (L2) based on Brief keywords
|
|
140
159
|
3. **Pass 2 (Targeted Scan)** — After Architecture/Epics, collect integration points (L3) and code-level details (L4)
|
|
141
160
|
|
|
@@ -150,22 +169,29 @@ Running BMad `/document-project` before Sprint improves scan quality:
|
|
|
150
169
|
/document-project
|
|
151
170
|
```
|
|
152
171
|
|
|
153
|
-
This analyzes the existing codebase and generates structured docs under `_bmad-output/` (`project-overview.md`, `api-contracts.md`, `data-models.md`, etc.). Sprint's Brownfield Scanner uses these as seed data to narrow
|
|
172
|
+
This analyzes the existing codebase and generates structured docs under `_bmad-output/` (`project-overview.md`, `api-contracts.md`, `data-models.md`, etc.). Sprint's Brownfield Scanner uses these as seed data to narrow scan scope.
|
|
173
|
+
|
|
174
|
+
#### External Data Sources
|
|
175
|
+
|
|
176
|
+
External service data can be provided through 3 methods (see Quick Start for setup):
|
|
154
177
|
|
|
155
|
-
|
|
178
|
+
| Source Type | Access Method | When to Use |
|
|
179
|
+
|-------------|---------------|-------------|
|
|
180
|
+
| **External repos** (backend, client, service-map) | `--add-dir` (local clone) or tarball snapshot (GitHub URL in brief.md) | When existing service code needs analysis |
|
|
181
|
+
| **Figma** | MCP (OAuth) | When live design data needs analysis |
|
|
156
182
|
|
|
157
|
-
|
|
183
|
+
The 4 roles external data can fill:
|
|
158
184
|
|
|
159
|
-
|
|
|
160
|
-
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
185
|
+
| Role | Provided Information |
|
|
186
|
+
|------|---------------------|
|
|
187
|
+
| **backend-docs** | API specs, domain policies, business rules, data models |
|
|
188
|
+
| **client-docs** | Component structure, state management patterns, screen flows |
|
|
189
|
+
| **svc-map** | Customer journeys, screen screenshots, flow graphs |
|
|
190
|
+
| **figma** | Wireframes, design tokens, component specs |
|
|
165
191
|
|
|
166
|
-
#### Manual Preparation (Without
|
|
192
|
+
#### Manual Preparation (Without External Sources)
|
|
167
193
|
|
|
168
|
-
You can manually write brownfield-context.md and provide it to Sprint without
|
|
194
|
+
You can manually write brownfield-context.md and provide it to Sprint without any external data:
|
|
169
195
|
|
|
170
196
|
```bash
|
|
171
197
|
# Place directly in the feature directory
|
|
@@ -210,7 +236,8 @@ For Greenfield projects with no existing system, Sprint works normally without B
|
|
|
210
236
|
│ ├── api-spec.yaml # OpenAPI 3.1
|
|
211
237
|
│ ├── schema.dbml # DB schema
|
|
212
238
|
│ ├── bdd-scenarios/ # Gherkin acceptance tests
|
|
213
|
-
│
|
|
239
|
+
│ ├── preview/ # React + MSW prototype
|
|
240
|
+
│ └── reconciled/ # Crystallize output (prototype-reconciled artifacts)
|
|
214
241
|
└── docs/ # Framework documentation
|
|
215
242
|
```
|
|
216
243
|
|
package/package.json
CHANGED
|
@@ -68,7 +68,8 @@ Specify `model: "sonnet"` parameter on Task invocation. When unspecified, parent
|
|
|
68
68
|
2. Set budget: simple=20, medium=40, complex=60 max_turns per sub-agent
|
|
69
69
|
3. Ensure `specs/{feature_name}/planning-artifacts/` directory exists
|
|
70
70
|
4. If `force_jp1_review` flag → show Grade C Brief warning banner at JP1
|
|
71
|
-
5. Initialize Sprint Log: Create `specs/{feature_name}/sprint-log.md` with Timeline table header + Decisions Made + Issues Encountered sections
|
|
71
|
+
5. Initialize Sprint Log: Create `specs/{feature_name}/sprint-log.md` with Timeline table header + JP Interactions + Decisions Made + Issues Encountered sections
|
|
72
|
+
6. Initialize Decision Diary: Create `specs/{feature_name}/decision-diary.md` with Sprint Context (complexity, topology, goals) + Decisions table header
|
|
72
73
|
6. Record Sprint start time for adaptive time estimation
|
|
73
74
|
7. Display initial progress with complexity-based time estimate from sprint-input.md
|
|
74
75
|
|
|
@@ -578,8 +579,10 @@ When feedback arises from any path (A, P, or F), process with the same mechanism
|
|
|
578
579
|
- **[M] Apply fix + propagate**: Edit all dependent files bidirectionally (upstream + downstream) per feedback item → Scope Gate verification → on PASS return to JP, on FAIL show missing items + offer additional fix or switch to regenerate
|
|
579
580
|
- At JP1: Scope Gate `stage=spec`
|
|
580
581
|
- At JP2: Scope Gate `stage=spec` + `stage=deliverables` (run both)
|
|
581
|
-
- **[R] Regenerate**: Record feedback
|
|
582
|
-
5. **Record
|
|
582
|
+
- **[R] Regenerate**: Record feedback → re-run pipeline from affected Phase (includes Scope Gate)
|
|
583
|
+
5. **Record interaction**: Regardless of processing method:
|
|
584
|
+
- Append full exchange to sprint-log.md **JP Interactions** section (Visual Summary presented, user input, impact analysis, processing choice, result)
|
|
585
|
+
- Append structured row to decision-diary.md **Decisions** table (JP, Type, Content, Processing, Result)
|
|
583
586
|
|
|
584
587
|
### Step 5: Deliverables Generation
|
|
585
588
|
|
|
@@ -703,15 +706,16 @@ npm install && npm run dev
|
|
|
703
706
|
|
|
704
707
|
> To provide feedback, select [F] Comment. Apply-fix/regenerate options will be presented with cost.
|
|
705
708
|
|
|
706
|
-
#### Step 6b: A/P/C Menu
|
|
709
|
+
#### Step 6b: A/P/S/C Menu
|
|
707
710
|
|
|
708
|
-
Present
|
|
711
|
+
Present 6 options via AskUserQuestion (in {communication_language}):
|
|
709
712
|
|
|
710
713
|
| Option | Label | Description |
|
|
711
714
|
|--------|-------|-------------|
|
|
712
715
|
| **A** | Advanced Elicitation | Deep exploration of Deliverables (API Spec, BDD, Prototype focus) |
|
|
713
716
|
| **P** | Party Mode | Multi-perspective review by full BMad agent panel |
|
|
714
|
-
| **
|
|
717
|
+
| **S** | Crystallize | Finalize all documents to match prototype, then proceed to execution |
|
|
718
|
+
| **C** | Continue | Approve JP2 → proceed to Execute with current documents |
|
|
715
719
|
| **F** | Comment | Enter feedback → impact analysis → apply-fix/regenerate choice |
|
|
716
720
|
| **X** | Exit | Abort Sprint |
|
|
717
721
|
|
|
@@ -721,11 +725,24 @@ Present 5 options via AskUserQuestion (same structure as JP1, in {communication_
|
|
|
721
725
|
|-----------|--------|
|
|
722
726
|
| **A** | Ask user for exploration target (api-spec/bdd/prototype/schema) → read full file → present 3~5 questions from Advanced Elicitation Protocol JP2 set → on feedback: execute **Comment handling flow** → regenerate Visual Summary → return to menu |
|
|
723
727
|
| **P** | Invoke Party Mode workflow (`Skill("bmad:core:workflows:party-mode")`, pass JP2 artifact paths) → discussion summary → ask user to accept/reject → on accept: execute **Comment handling flow** → regenerate Visual Summary → return to menu |
|
|
724
|
-
| **
|
|
728
|
+
| **S** | Execute **Crystallize pipeline** (see below) → on completion proceed to Execute with `specs_root=reconciled/` |
|
|
729
|
+
| **C** | Proceed to Execute (parallel implementation) with `specs_root=specs/{feature_name}/` |
|
|
725
730
|
| **F** | Execute **Comment handling flow** (see Step 4c) → regenerate Visual Summary → return to menu |
|
|
726
731
|
| **X** | Abort Sprint, inform that artifacts are preserved (`specs/{feature_name}/` is retained) |
|
|
727
732
|
|
|
728
|
-
**Iteration limit**: A/P/F selections combined max 5 times. On exceed, warn (in {communication_language}): "5 review/edit rounds complete. Select [C] Continue or [X] Exit."
|
|
733
|
+
**Iteration limit**: A/P/F selections combined max 5 times. On exceed, warn (in {communication_language}): "5 review/edit rounds complete. Select [S] Crystallize, [C] Continue, or [X] Exit."
|
|
734
|
+
|
|
735
|
+
#### [S] Crystallize Pipeline
|
|
736
|
+
|
|
737
|
+
When [S] is selected, execute the Crystallize pipeline as defined in `.claude/commands/crystallize.md`.
|
|
738
|
+
|
|
739
|
+
1. Record `[S] Crystallize` selection in decision-diary.md
|
|
740
|
+
2. Append to sprint-log.md JP Interactions: `**[User] Selection: [S] Crystallize**`
|
|
741
|
+
3. Execute the full Crystallize pipeline (S1-S6) as defined in crystallize.md, passing `feature_name`
|
|
742
|
+
4. On Crystallize S6 [C] Continue: proceed to Execute with `specs_root=specs/{feature_name}/reconciled/`
|
|
743
|
+
5. On Crystallize S6 [X] Exit: return to JP2 menu (reconciled/ is preserved)
|
|
744
|
+
|
|
745
|
+
**Budget**: Crystallize has its own budget (~85-120 turns) separate from JP2 iteration budget (5 rounds). [S] does not count against the 5-round iteration limit.
|
|
729
746
|
|
|
730
747
|
## Conductor Roles
|
|
731
748
|
|
|
@@ -765,7 +782,7 @@ When drift is detected (Scope Gate FAIL or goal drift):
|
|
|
765
782
|
5. **3 consecutive FAILs on optional stages** → skip stage + include warning in final output
|
|
766
783
|
|
|
767
784
|
**B. Upstream Issue** (`failure_source: upstream:{stage}`):
|
|
768
|
-
1. Record Scope Gate's `suggested_fix` in `
|
|
785
|
+
1. Record Scope Gate's `suggested_fix` in `decision-diary.md`
|
|
769
786
|
2. Re-invoke cause stage (`{stage}`) agent — include feedback in prompt:
|
|
770
787
|
"Previous artifact received the following feedback:
|
|
771
788
|
<feedback>{suggested_fix content}</feedback>
|
|
@@ -798,7 +815,7 @@ When Comment handling flow executes at a JP, process according to user's selecte
|
|
|
798
815
|
|
|
799
816
|
When user selects [M] Apply fix + propagate:
|
|
800
817
|
|
|
801
|
-
1. Record feedback items in `specs/{feature_name}/
|
|
818
|
+
1. Record feedback items in `specs/{feature_name}/decision-diary.md`
|
|
802
819
|
2. For each feedback item, traverse affected files bidirectionally and edit:
|
|
803
820
|
- **upstream** (specs → planning-artifacts): edit planning-artifacts files where the concept is expressed
|
|
804
821
|
- **downstream** (planning-artifacts → specs → deliverables): edit specs/deliverables files where the concept is expressed
|
|
@@ -813,7 +830,7 @@ When user selects [M] Apply fix + propagate:
|
|
|
813
830
|
|
|
814
831
|
When user selects [R] Regenerate:
|
|
815
832
|
|
|
816
|
-
1. Record feedback text in `specs/{feature_name}/
|
|
833
|
+
1. Record feedback text in `specs/{feature_name}/decision-diary.md`
|
|
817
834
|
2. Back up existing artifacts then overwrite (preserve previous versions)
|
|
818
835
|
3. Include feedback in prompt when invoking restart stage agent:
|
|
819
836
|
```
|
|
@@ -23,6 +23,7 @@ Progress-oriented. Reports each pipeline stage completion with counts (e.g., "Op
|
|
|
23
23
|
- **full**: Run the complete 10-Stage pipeline
|
|
24
24
|
- **specs-only**: Run Stage 1-2 only (invoked by /specs — generates Entity Dictionary + Specs 4-file only)
|
|
25
25
|
- **deliverables-only**: Run Stage 3-10 only (invoked by /preview or Auto Sprint after JP1 approval — requires pre-existing Specs 4-file)
|
|
26
|
+
- `prototype_analysis_path` (optional): Path to prototype-analysis.md — used as cross-reference during specs-only mode when invoked by /crystallize. When present, use the prototype analysis to validate entity naming, verify API endpoint coverage, and cross-check user flows against PRD FRs. When absent, behavior is unchanged (backward compatible).
|
|
26
27
|
|
|
27
28
|
## Execution Protocol — 10-Stage Pipeline
|
|
28
29
|
|
|
@@ -18,12 +18,17 @@ After Specs + Deliverables generation is complete. Run after JP2 approval.
|
|
|
18
18
|
|
|
19
19
|
`$ARGUMENTS`: not used
|
|
20
20
|
|
|
21
|
+
Parameters (when invoked from auto-sprint):
|
|
22
|
+
- `specs_root`: Base directory for specs files. Default: `specs/{feature}/`. After Crystallize: `specs/{feature}/reconciled/`.
|
|
23
|
+
|
|
21
24
|
Prerequisites:
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
25
|
+
- `{specs_root}/tasks.md` exists
|
|
26
|
+
- `{specs_root}/brownfield-context.md` exists (or `{specs_root}/planning-artifacts/brownfield-context.md` for reconciled/)
|
|
24
27
|
- File Ownership assignment complete
|
|
25
28
|
- Interface contracts (shared types) defined
|
|
26
29
|
|
|
30
|
+
**Path resolution**: All specs file references in this command use `{specs_root}` as base path. When `specs_root` is not provided, default to `specs/{feature}/`.
|
|
31
|
+
|
|
27
32
|
## Procedure
|
|
28
33
|
|
|
29
34
|
Load config per Language Protocol in bmad-sprint-guide.md.
|
|
@@ -78,7 +78,12 @@ Parse `$ARGUMENTS` — 2 entry points, 1 pipeline:
|
|
|
78
78
|
3. **Verify specs/{feature_name}/ exists**:
|
|
79
79
|
If missing → auto-create + guide:
|
|
80
80
|
a. Create `specs/{feature_name}/inputs/`
|
|
81
|
-
b. Generate `specs/{feature_name}/inputs/brief.md` template:
|
|
81
|
+
b. Generate `specs/{feature_name}/inputs/brief.md` template (in {document_output_language}):
|
|
82
|
+
Section headings and placeholder text must be written in {document_output_language}.
|
|
83
|
+
HTML comments (guidance for the user) are written in {communication_language}.
|
|
84
|
+
The `## Reference Sources` section heading and sub-section headings are always in English (machine-parseable).
|
|
85
|
+
|
|
86
|
+
Example (when document_output_language=Korean, communication_language=Korean):
|
|
82
87
|
```markdown
|
|
83
88
|
# {feature_name}
|
|
84
89
|
|
|
@@ -88,7 +93,7 @@ Parse `$ARGUMENTS` — 2 entry points, 1 pipeline:
|
|
|
88
93
|
## 만들어야 할 기능
|
|
89
94
|
(구체적인 기능을 설명하세요)
|
|
90
95
|
|
|
91
|
-
##
|
|
96
|
+
## Reference Sources
|
|
92
97
|
|
|
93
98
|
### GitHub
|
|
94
99
|
<!-- 기존 서비스 코드가 있으면 URL과 탐색 힌트를 작성하세요 -->
|
|
@@ -99,11 +104,11 @@ Parse `$ARGUMENTS` — 2 entry points, 1 pipeline:
|
|
|
99
104
|
<!-- Figma 디자인 URL이 있으면 작성하세요 -->
|
|
100
105
|
<!-- - https://figma.com/design/{fileKey}/... -->
|
|
101
106
|
|
|
102
|
-
###
|
|
107
|
+
### Policy Docs
|
|
103
108
|
<!-- Scanner가 우선 탐색할 정책/도메인 문서명 -->
|
|
104
109
|
<!-- - document-name.md -->
|
|
105
110
|
|
|
106
|
-
###
|
|
111
|
+
### Scan Notes
|
|
107
112
|
<!-- Brownfield 탐색 시 참고할 자유 형식 메모 -->
|
|
108
113
|
```
|
|
109
114
|
c. Message (in {communication_language}):
|
|
@@ -281,16 +286,16 @@ See `_bmad/docs/sprint-input-format.md` for reference analysis format.
|
|
|
281
286
|
- 5 or fewer: include all (default: included in Sprint scope)
|
|
282
287
|
- Over 5: include top 3, rest as "next Sprint candidates"
|
|
283
288
|
4. **Contradiction detection**: Record contradictions between Brief and references in Detected Contradictions (no auto-resolution)
|
|
284
|
-
5. **Parse
|
|
285
|
-
- Detect heading: `##
|
|
286
|
-
- Parse sub-sections:
|
|
287
|
-
- `### GitHub`: extract URLs + per-URL notes (indented text below URL)
|
|
289
|
+
5. **Parse Reference Sources section from brief.md** (if exists):
|
|
290
|
+
- Detect heading (canonical → fallback): `## Reference Sources` / `## 참고 소스` / `## References`
|
|
291
|
+
- Parse sub-sections (canonical → fallback):
|
|
292
|
+
- `### GitHub` / `### GitHub`: extract URLs + per-URL notes (indented text below URL)
|
|
288
293
|
- URL pattern: `https://github.com/{owner}/{repo}` (`.git` suffix auto-strip)
|
|
289
294
|
- Notes: non-URL indented lines below each URL
|
|
290
|
-
- `### Figma`: extract URLs + notes
|
|
295
|
+
- `### Figma` / `### Figma`: extract URLs + notes
|
|
291
296
|
- URL pattern: `https://figma.com/design/{fileKey}/...` or `.../file/{fileKey}/...`
|
|
292
|
-
- `###
|
|
293
|
-
- `###
|
|
297
|
+
- `### Policy Docs` / `### 정책 문서`: collect document names (line items)
|
|
298
|
+
- `### Scan Notes` / `### 탐색 메모`: collect as free-text
|
|
294
299
|
- 참고 소스 섹션의 GitHub repos는 사용자 명시 의도 → AskUserQuestion 없이 다운로드 대상 확정
|
|
295
300
|
- 섹션이 없거나 비어있으면 → skip (기존 auto-detect만 사용)
|
|
296
301
|
- HTML 주석으로 감싸인 라인 (`<!-- ... -->`)은 skip (템플릿 상태 그대로)
|
|
@@ -18,11 +18,16 @@ After Worker implementation is complete. Run after PARALLEL completion + merge.
|
|
|
18
18
|
|
|
19
19
|
`$ARGUMENTS`: not used
|
|
20
20
|
|
|
21
|
+
Parameters (when invoked from auto-sprint):
|
|
22
|
+
- `specs_root`: Base directory for specs files. Default: `specs/{feature}/`. After Crystallize: `specs/{feature}/reconciled/`.
|
|
23
|
+
|
|
21
24
|
Prerequisites:
|
|
22
25
|
- PARALLEL complete: all Worker tasks done
|
|
23
26
|
- Code merged into main branch
|
|
24
27
|
- Build succeeds
|
|
25
28
|
|
|
29
|
+
**Path resolution**: All specs file references in this command use `{specs_root}` as base path. When `specs_root` is not provided, default to `specs/{feature}/`. This ensures Judges verify against reconciled artifacts when Crystallize was used.
|
|
30
|
+
|
|
26
31
|
## Procedure
|
|
27
32
|
|
|
28
33
|
Load config per Language Protocol in bmad-sprint-guide.md.
|
|
@@ -42,8 +47,8 @@ Phase 1 failure → request fix from file's owning Worker → re-run Phase 1 aft
|
|
|
42
47
|
### Phase 2: AI Judge Verification (Medium + Low Entropy)
|
|
43
48
|
Run Judge agents in parallel. Pass each Judge:
|
|
44
49
|
- `changed_files`: result of `git diff --name-only {base_branch}...HEAD`
|
|
45
|
-
- `feature_dir`: `specs/{feature}/`
|
|
46
|
-
- `brownfield_path`: `
|
|
50
|
+
- `feature_dir`: `{specs_root}` (default: `specs/{feature}/`)
|
|
51
|
+
- `brownfield_path`: `{specs_root}/brownfield-context.md` (or `{specs_root}/planning-artifacts/brownfield-context.md` for reconciled/)
|
|
47
52
|
|
|
48
53
|
1. **Code Quality Judge** (`judge-quality`):
|
|
49
54
|
- Code structure, patterns, duplication
|
|
@@ -61,6 +61,7 @@ Place materials in specs/{feature}/inputs/ → /sprint {feature-name}
|
|
|
61
61
|
→ JP1: "Is this the right product for the customer?" (requirements judgment)
|
|
62
62
|
Phase 2: Deliverables (OpenAPI + DBML + BDD + Prototype)
|
|
63
63
|
→ JP2: "Is this the experience the customer wants?" (prototype judgment)
|
|
64
|
+
→ [S] Crystallize (optional): reconcile all artifacts with finalized prototype → reconciled/
|
|
64
65
|
→ On approval: /parallel → /validate
|
|
65
66
|
```
|
|
66
67
|
|
|
@@ -140,6 +141,7 @@ Routes are not fixed. Adapt as needed:
|
|
|
140
141
|
- `/sprint` — **Sprint route**: Brief/materials → auto Specs + Deliverables + Prototype (2 JPs)
|
|
141
142
|
- `/specs` — **Specs generation**: Planning Artifacts → Specs 4-file
|
|
142
143
|
- `/preview` — **Deliverables generation**: Specs → OpenAPI + DBML + BDD + Prototype
|
|
144
|
+
- `/crystallize` — **Prototype reconciliation**: Finalized prototype → reconciled/ artifact set (Sprint-route only)
|
|
143
145
|
- `/parallel` — Multi-agent parallel execution
|
|
144
146
|
- `/validate` — 3-Phase verification pipeline
|
|
145
147
|
- `/circuit-breaker` — Course correction
|
|
@@ -17,6 +17,7 @@ Brownfield data is used at every Sprint phase. Sources are cumulatively collecte
|
|
|
17
17
|
| **Specs generation** (`/specs`) | Copy frozen snapshot (@deliverable-generator Stage 2) |
|
|
18
18
|
| **Parallel** (`/parallel`) | Workers read frozen snapshot |
|
|
19
19
|
| **Validate** (`/validate`) | Judges verify against brownfield-context.md |
|
|
20
|
+
| **Crystallize** (`/crystallize`) | Copy brownfield-context.md to reconciled/planning-artifacts/ (unchanged) |
|
|
20
21
|
|
|
21
22
|
## Causal Chain Propagation Flow (Optional)
|
|
22
23
|
|
|
@@ -70,7 +71,8 @@ specs/{feature}/
|
|
|
70
71
|
│ ├── epics-and-stories.md # Epics & Stories
|
|
71
72
|
│ └── brownfield-context.md # L1~L4 raw collection (appended during work)
|
|
72
73
|
│
|
|
73
|
-
├── sprint-log.md # Sprint execution log (timeline + decisions + issues)
|
|
74
|
+
├── sprint-log.md # Sprint execution log (timeline + decisions + issues + JP Interactions)
|
|
75
|
+
├── decision-diary.md # JP decision summary table (replaces feedback-log.md)
|
|
74
76
|
├── brownfield-context.md # Frozen snapshot (L1~L4, for Workers)
|
|
75
77
|
├── entity-dictionary.md # Entity Dictionary
|
|
76
78
|
├── requirements.md # PRD → requirements
|
|
@@ -86,7 +88,27 @@ specs/{feature}/
|
|
|
86
88
|
├── traceability-matrix.md # FR → Design → Task → BDD → API mapping
|
|
87
89
|
├── key-flows.md # Key user flows step-by-step (for JP2 verification)
|
|
88
90
|
├── readiness.md # JP1/JP2 Readiness data (for Layer 0 auto-approval)
|
|
89
|
-
|
|
91
|
+
├── preview/ # React + MSW prototype (npm run dev)
|
|
92
|
+
│
|
|
93
|
+
└── reconciled/ # Crystallize output (prototype-reconciled artifact set)
|
|
94
|
+
├── prototype-analysis.md # Prototype structure analysis
|
|
95
|
+
├── planning-artifacts/ # Reconciled planning artifacts
|
|
96
|
+
│ ├── prd.md # PRD final (reconciled with prototype)
|
|
97
|
+
│ ├── architecture.md # Architecture final (reconciled)
|
|
98
|
+
│ ├── epics-and-stories.md # Epics final (reconciled)
|
|
99
|
+
│ └── brownfield-context.md # Copy (unchanged)
|
|
100
|
+
├── entity-dictionary.md # Reconciled entity dictionary
|
|
101
|
+
├── requirements.md # Reconciled requirements
|
|
102
|
+
├── design.md # Reconciled design
|
|
103
|
+
├── tasks.md # Reconciled tasks (with Entropy + File Ownership)
|
|
104
|
+
├── api-spec.yaml # Verified/regenerated API contract
|
|
105
|
+
├── api-sequences.md # Verified/regenerated sequence diagrams
|
|
106
|
+
├── schema.dbml # Verified/regenerated DB schema
|
|
107
|
+
├── bdd-scenarios/ # Regenerated acceptance tests
|
|
108
|
+
├── key-flows.md # Regenerated key flows
|
|
109
|
+
├── traceability-matrix.md # Rebuilt traceability
|
|
110
|
+
├── decision-log.md # Merged decision history
|
|
111
|
+
└── decision-diary.md # Copy of JP decision summary
|
|
90
112
|
```
|
|
91
113
|
|
|
92
114
|
## Handoff Rules
|
|
@@ -142,7 +164,7 @@ See `docs/judgment-driven-development.md` Customer-Lens Judgment Points.
|
|
|
142
164
|
|
|
143
165
|
- **Judgment target**: prototype, screen flows, interactions
|
|
144
166
|
- **Presentation format**: working prototype + key scenario walkthrough guide
|
|
145
|
-
- **Response**: Confirm / Comment
|
|
167
|
+
- **Response**: Confirm / Crystallize (Sprint-route only) / Comment
|
|
146
168
|
|
|
147
169
|
### Comment Handling Flow
|
|
148
170
|
|
|
@@ -176,3 +198,95 @@ Guide for determining regeneration start point based on feedback magnitude:
|
|
|
176
198
|
|
|
177
199
|
This table is a reference for the system when calculating regeneration scope during impact analysis.
|
|
178
200
|
Users see the calculated cost alongside the options.
|
|
201
|
+
|
|
202
|
+
## Crystallize Flow (Sprint-route only)
|
|
203
|
+
|
|
204
|
+
After JP2 prototype iteration, [S] Crystallize reconciles all upstream artifacts with the finalized prototype. Creates `reconciled/` directory with the definitive artifact set.
|
|
205
|
+
|
|
206
|
+
**Availability**: Sprint-route only. Depends on Sprint artifacts (decision-diary.md, sprint-log.md JP Interactions). Not available for Guided/Direct routes.
|
|
207
|
+
|
|
208
|
+
### Crystallize Pipeline
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
[S] Crystallize at JP2
|
|
212
|
+
S1: Prototype Analysis → reconciled/prototype-analysis.md
|
|
213
|
+
S2: Reconcile Planning → reconciled/planning-artifacts/ (PRD, Architecture, Epics)
|
|
214
|
+
S2-G: Cross-Artifact Gate → PASS/FAIL
|
|
215
|
+
S3: Generate Execution Specs → reconciled/ (entity-dict, requirements, design, tasks)
|
|
216
|
+
S3-G: Scope Gate (spec) → PASS/FAIL
|
|
217
|
+
S4: Reconcile Deliverables → reconciled/ (api-spec, bdd, key-flows, traceability, etc.)
|
|
218
|
+
S5: Cross-Artifact Consistency → PASS/FAIL (gap=0 required)
|
|
219
|
+
S6: Summary → [C] /parallel with specs_root=reconciled/
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Reconciliation Principles
|
|
223
|
+
|
|
224
|
+
- **From prototype**: screens, features, API endpoints, data model, user flows
|
|
225
|
+
- **Carry-forward from existing docs**: NFRs, security, deployment, scaling, monitoring, ADRs
|
|
226
|
+
- **Product Brief excluded**: defines problem space, not derivable from prototype
|
|
227
|
+
|
|
228
|
+
### Source Attribution Tags (Crystallize)
|
|
229
|
+
|
|
230
|
+
| Tag | Meaning |
|
|
231
|
+
|-----|---------|
|
|
232
|
+
| `(source: PROTO, origin: BRIEF-N)` | Confirmed in prototype, originally from brief sentence N |
|
|
233
|
+
| `(source: PROTO, origin: DD-N)` | Confirmed in prototype, originated from decision-diary entry N |
|
|
234
|
+
| `(source: carry-forward, origin: BRIEF-N)` | Not in prototype, carried from original doc, originally from brief |
|
|
235
|
+
| `(source: carry-forward)` | Not in prototype, carried from original doc (NFR, security, etc.) |
|
|
236
|
+
|
|
237
|
+
Items carried forward from existing documents are marked with `[carry-forward]` inline tag in the reconciled artifact text.
|
|
238
|
+
|
|
239
|
+
### Downstream Integration
|
|
240
|
+
|
|
241
|
+
After Crystallize, `/parallel` and `/validate` use `specs_root` parameter to read from `reconciled/` instead of the base `specs/{feature}/` directory. Original artifacts remain untouched.
|
|
242
|
+
|
|
243
|
+
## Sprint Log Extension: JP Interactions
|
|
244
|
+
|
|
245
|
+
sprint-log.md is extended with a **JP Interactions** section that records the full text of each JP exchange.
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
## JP Interactions
|
|
249
|
+
|
|
250
|
+
### JP1 Round 1
|
|
251
|
+
**[System] Visual Summary**
|
|
252
|
+
{Visual Summary full text}
|
|
253
|
+
|
|
254
|
+
**[User] Selection: [F] Comment**
|
|
255
|
+
{user feedback text}
|
|
256
|
+
|
|
257
|
+
**[System] Impact Analysis**
|
|
258
|
+
{analysis result}
|
|
259
|
+
|
|
260
|
+
**[User] Choice: [M] Apply fix**
|
|
261
|
+
|
|
262
|
+
**[System] Result**
|
|
263
|
+
Files modified: {list}
|
|
264
|
+
Scope Gate: PASS
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Recording points**: After each AskUserQuestion response at JP1 (Step 4b/4c) and JP2 (Step 6b/6c), append the exchange to sprint-log.md JP Interactions section.
|
|
268
|
+
|
|
269
|
+
## Decision Diary
|
|
270
|
+
|
|
271
|
+
decision-diary.md is a structured table of JP decisions and feedback. Replaces feedback-log.md.
|
|
272
|
+
|
|
273
|
+
**Role differentiation**:
|
|
274
|
+
- **sprint-log.md**: execution timeline + JP interaction full text (for AI context and audit)
|
|
275
|
+
- **decision-diary.md**: structured decision summary (for product expert quick reference)
|
|
276
|
+
|
|
277
|
+
**Format**:
|
|
278
|
+
```markdown
|
|
279
|
+
# Decision Diary: {feature_name}
|
|
280
|
+
|
|
281
|
+
## Sprint Context
|
|
282
|
+
- Complexity: {simple/medium/complex}
|
|
283
|
+
- Topology: {co-located/msa/monorepo/standalone}
|
|
284
|
+
- Goals: {goals list}
|
|
285
|
+
- Crystallize: {Yes/No}
|
|
286
|
+
|
|
287
|
+
## Decisions
|
|
288
|
+
| # | JP | Type | Content | Processing | Result |
|
|
289
|
+
|---|-----|------|---------|------------|--------|
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Recording point**: After each Comment Handling Flow completion, append a row to the Decisions table.
|