jdd-sprint-kit 0.5.1 → 0.5.3

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 CHANGED
@@ -131,6 +131,8 @@ Direct: |←── Auto ───────────
131
131
  | **Guided** | BMad 12-step → `/specs` → `/preview` | Exploration needed — discover and define with AI |
132
132
  | **Direct** | `/specs` → `/preview` | Planning is complete — execute immediately |
133
133
 
134
+ After prototype iteration, `/crystallize feature-name` reconciles all documents to match the finalized prototype (available on all routes).
135
+
134
136
  > For small tasks, use BMad Quick Flow: `/quick-spec` → `/dev-story` → `/code-review`
135
137
 
136
138
  Routes are not fixed. If you have materials but need deep exploration, use Guided with materials as reference input. After completing BMad 12-step, `/specs` auto-detects the artifacts — same as Direct.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jdd-sprint-kit",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Judgment-Driven Development toolkit for BMad Method",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,7 +24,7 @@ export const SPRINT_KIT_FILES = {
24
24
  'validate.md', 'circuit-breaker.md', 'summarize-prd.md',
25
25
  ],
26
26
  rules: [
27
- 'bmad-sprint-guide.md', 'bmad-sprint-protocol.md', 'bmad-mcp-search.md',
27
+ 'jdd-sprint-guide.md', 'jdd-sprint-protocol.md', 'jdd-mcp-search.md',
28
28
  ],
29
29
  hooks: [
30
30
  'sprint-pre-compact.sh', 'sprint-session-recovery.sh',
@@ -557,7 +557,7 @@ When feedback arises from any path (A, P, or F), process with the same mechanism
557
557
  - F: Free-text entered directly by user
558
558
  2. **Impact analysis**: Calculate feedback scope
559
559
  - For apply-fix: list of affected files (upstream planning-artifacts/ + downstream specs/ + deliverables) + estimated time
560
- - For regenerate: restart Phase based on Regeneration Scope Reference Table (`bmad-sprint-protocol.md`) + estimated time
560
+ - For regenerate: restart Phase based on Regeneration Scope Reference Table (`jdd-sprint-protocol.md`) + estimated time
561
561
  3. **Present options**: Offer cost-based choices via AskUserQuestion (in {communication_language})
562
562
  ```
563
563
  Modifications:
@@ -738,11 +738,11 @@ When [S] is selected, execute the Crystallize pipeline as defined in `.claude/co
738
738
 
739
739
  1. Record `[S] Crystallize` selection in decision-diary.md
740
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`
741
+ 3. Execute the full Crystallize pipeline (S0-S6) as defined in crystallize.md, passing `feature_name`
742
742
  4. On Crystallize S6 [C] Continue: proceed to Execute with `specs_root=specs/{feature_name}/reconciled/`
743
743
  5. On Crystallize S6 [X] Exit: return to JP2 menu (reconciled/ is preserved)
744
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.
745
+ **Budget**: Crystallize has its own budget (~85-125 turns) separate from JP2 iteration budget (5 rounds). [S] does not count against the 5-round iteration limit.
746
746
 
747
747
  ## Conductor Roles
748
748
 
@@ -24,7 +24,7 @@ Systematically correct course when VALIDATE failures repeat or critical issues a
24
24
 
25
25
  ## Procedure
26
26
 
27
- Load config per Language Protocol in bmad-sprint-guide.md.
27
+ Load config per Language Protocol in jdd-sprint-guide.md.
28
28
 
29
29
  ### Step 1: Failure Context Summary (Context Compaction)
30
30
  Summarize current work state and append to `specs/{feature}/planning-artifacts/circuit-breaker-log.md`:
@@ -1,19 +1,19 @@
1
1
  ---
2
- description: "Reconcile all artifacts from finalized prototype (Sprint-route only)"
2
+ description: "Reconcile all artifacts from finalized prototype"
3
3
  ---
4
4
 
5
5
  <!-- Quick Map
6
6
  Purpose: Finalized prototype → reconciled/ artifact set
7
7
  Dispatch: Runs directly (orchestrates BMad agents + @deliverable-generator)
8
8
  Inputs: $ARGUMENTS (feature-name)
9
- Key Steps: Precondition → Analyze → Reconcile Planning → Generate Specs → Reconcile Deliverables → Verify → Summary
10
- Route: Sprint-route only (depends on decision-diary.md, sprint-log.md JP Interactions)
9
+ Key Steps: Precondition → Decision Context → Analyze → Reconcile Planning → Generate Specs → Reconcile Deliverables → Verify → Summary
10
+ Route: All routes (Sprint, Guided, Direct)
11
11
  -->
12
12
 
13
13
  # /crystallize — Prototype-First Artifact Reconciliation
14
14
 
15
15
  > **Dispatch**: Runs directly (orchestrates sub-agents sequentially)
16
- > **Route**: Sprint-route only
16
+ > **Route**: All routes (Sprint, Guided, Direct)
17
17
 
18
18
  ## Purpose
19
19
 
@@ -25,9 +25,9 @@ The prototype becomes the source of truth for product behavior. Existing artifac
25
25
 
26
26
  - After iterating on a prototype at JP2 until it matches the desired product
27
27
  - When documents need to accurately reflect the final product for execution (/parallel) and long-term reference (maintenance, handoff)
28
- - Sprint-route only requires Sprint artifacts (decision-diary.md, sprint-log.md with JP Interactions)
28
+ - Available on all routes: Sprint (`[S]` at JP2), Guided (`[S]` at `/preview` Step 3), Direct (`[S]` at `/preview` Step 3), or standalone (`/crystallize feature-name`)
29
29
 
30
- **Note**: Within `/sprint` auto-sprint flow, Crystallize is triggered via [S] Crystallize menu option at JP2. This standalone command is for cases where JP2 was completed with [C] but reconciliation is needed later.
30
+ **Note**: Within `/sprint` auto-sprint flow, Crystallize is triggered via [S] Crystallize menu option at JP2. Within `/preview`, it is triggered via [S] at Step 3. The standalone command is for cases where JP2 was completed with [C] but reconciliation is needed later.
31
31
 
32
32
  ## Inputs
33
33
 
@@ -40,26 +40,64 @@ Before starting the pipeline, verify:
40
40
 
41
41
  1. `specs/{feature}/preview/` exists AND `src/` contains at least one `.tsx` file (Glob: `specs/{feature}/preview/src/**/*.tsx`)
42
42
  2. `specs/{feature}/planning-artifacts/` exists with `prd.md`, `architecture.md`, `epics-and-stories.md` (all 3 required)
43
- 3. `specs/{feature}/sprint-log.md` exists (decision-diary.md is optional)
43
+ 3. Decision records available (optional enriches S0 context when present):
44
+ - `specs/{feature}/decision-diary.md` OR `specs/{feature}/jp2-review-log.md` OR `specs/{feature}/sprint-log.md`
45
+ - If none exist, S0 is skipped and S1 runs without decision context
44
46
  4. If `specs/{feature}/reconciled/` already exists: prompt user — overwrite or abort
45
47
 
46
48
  On validation failure: report missing items (in {communication_language}) and abort.
47
49
 
48
50
  ## Procedure
49
51
 
50
- Load config per Language Protocol in bmad-sprint-guide.md.
52
+ Load config per Language Protocol in jdd-sprint-guide.md.
51
53
 
52
- ### Step S1: Prototype Analysis
54
+ ### Step S0: Decision Context Analysis
53
55
 
54
- Analyze the finalized prototype code and produce a structured analysis document.
56
+ Analyze JP2 decision records to understand the intent and context behind prototype modifications BEFORE analyzing the code. This enables S1 and S2 to distinguish deliberate business decisions from implementation details.
55
57
 
56
- **Progress**: `"[S1/6] Analyzing prototype structure..."`
58
+ **Progress**: `"[S0/7] Analyzing JP2 decision context..."`
57
59
 
58
- 1. Create `specs/{feature}/reconciled/` directory
60
+ 1. Create `specs/{feature}/reconciled/` directory and `reconciled/planning-artifacts/`
59
61
  2. Copy immutable files:
60
62
  - `specs/{feature}/planning-artifacts/brownfield-context.md` → `reconciled/planning-artifacts/brownfield-context.md`
61
- - `specs/{feature}/decision-diary.md` `reconciled/decision-diary.md` (if exists)
62
- 3. Invoke prototype analyzer:
63
+ 3. Copy decision records to reconciled/ (if exists):
64
+ - `specs/{feature}/decision-diary.md` `reconciled/decision-diary.md`
65
+ - OR `specs/{feature}/jp2-review-log.md` → `reconciled/jp2-review-log.md` (fallback, serves equivalent role)
66
+ 4. Read JP2 decision records:
67
+ - Primary: `specs/{feature}/decision-diary.md` (if exists)
68
+ - Fallback: `specs/{feature}/jp2-review-log.md` (if exists, serves equivalent role)
69
+ - Also: `specs/{feature}/sprint-log.md` "JP Interactions" section (if exists)
70
+ 5. Produce decision context summary (Conductor writes directly — lightweight synthesis, not a Task):
71
+
72
+ Write to `specs/{feature}/reconciled/decision-context.md`:
73
+
74
+ ```markdown
75
+ # Decision Context: {feature_name}
76
+
77
+ ## Route
78
+ {sprint / guided / direct} — {rich context / limited context}
79
+
80
+ ## JP2 Modification Intent Summary
81
+ | # | Change | Intent | Business Decision | Affected Area |
82
+ |---|--------|--------|-------------------|---------------|
83
+
84
+ ## Key Business Decisions
85
+ | ID | Decision | Rationale |
86
+ |----|----------|-----------|
87
+
88
+ ## Context for Prototype Analysis
89
+ (Free-text summary: what to look for in the code, which changes are deliberate business decisions vs implementation adjustments)
90
+ ```
91
+
92
+ If no decision records exist, skip this step and proceed to S1 without decision context. When decision records are minimal (Guided/Direct routes), S0 produces a lighter context document — prototype analysis (S1) carries more weight in this case.
93
+
94
+ ### Step S1: Prototype Analysis
95
+
96
+ Analyze the finalized prototype code and produce a structured analysis document.
97
+
98
+ **Progress**: `"[S1/7] Analyzing prototype structure..."`
99
+
100
+ Invoke prototype analyzer:
63
101
 
64
102
  ```
65
103
  Task(subagent_type: "general-purpose", model: "sonnet")
@@ -69,6 +107,15 @@ Task(subagent_type: "general-purpose", model: "sonnet")
69
107
 
70
108
  Read every discovered file and extract a structured analysis.
71
109
 
110
+ IMPORTANT: Write ALL output in {document_output_language}.
111
+
112
+ {if decision-context.md exists}
113
+ Decision context (read this FIRST to understand WHY changes were made):
114
+ specs/{feature}/reconciled/decision-context.md
115
+ Use this context to annotate business rules with their decision origin
116
+ (e.g., 'Business Rule: 용어 변경 → D2 결정에 의한 의도적 선택').
117
+ {end if}
118
+
72
119
  Output format — write to specs/{feature}/reconciled/prototype-analysis.md:
73
120
 
74
121
  # Prototype Analysis: {feature_name}
@@ -97,7 +144,7 @@ Reconcile PRD, Architecture, and Epics using the prototype analysis as primary i
97
144
 
98
145
  **Product Brief is excluded** — it defines the problem space, which the prototype cannot supply.
99
146
 
100
- **Progress**: `"[S2/6] Reconciling PRD..."` → `"...Architecture..."` → `"...Epics..."` → `"...Cross-artifact validation..."`
147
+ **Progress**: `"[S2/7] Reconciling PRD..."` → `"...Architecture..."` → `"...Epics..."` → `"...Cross-artifact validation..."`
101
148
 
102
149
  #### Reconciliation Principles
103
150
 
@@ -121,22 +168,26 @@ Task(subagent_type: "general-purpose", model: "opus")
121
168
  prompt: "You are John, Product Manager. Read your persona at _bmad/bmm/agents/pm.md.
122
169
  Read the PRD format guide at _bmad/docs/prd-format-guide.md.
123
170
 
171
+ IMPORTANT: Write ALL output in {document_output_language}.
172
+
124
173
  MODE: CRYSTALLIZE — reconcile PRD with finalized prototype.
125
174
 
126
175
  Primary input (what the product actually does):
127
176
  specs/{feature}/reconciled/prototype-analysis.md
128
177
 
178
+ Decision context (understand WHY changes were made):
179
+ specs/{feature}/reconciled/decision-context.md (if exists)
180
+
129
181
  Context reference (for content the prototype cannot supply):
130
182
  specs/{feature}/planning-artifacts/prd.md
131
- specs/{feature}/decision-diary.md (if exists)
132
- specs/{feature}/inputs/sprint-input.md (for brief_sentences)
183
+ specs/{feature}/inputs/sprint-input.md (for brief_sentences, if exists)
133
184
 
134
185
  Output: Write to specs/{feature}/reconciled/planning-artifacts/prd.md
135
186
 
136
187
  Reconciliation rules:
137
188
  - Every capability visible in prototype → document as FR with source tag
138
189
  - Map each FR to brief_sentences where possible: (source: PROTO, origin: BRIEF-N)
139
- - Features from JP2 iteration: (source: PROTO, origin: DD-N) referencing decision-diary entry
190
+ - Features from JP2 iteration: (source: PROTO, origin: DD-N) referencing decision-diary/decision-context entry
140
191
  - NFRs, success criteria, constraints → carry forward: (source: carry-forward)
141
192
  - Mark carry-forward items with [carry-forward] tag
142
193
  - User journeys: reconstruct from prototype User Flows section
@@ -150,12 +201,17 @@ Task(subagent_type: "general-purpose", model: "opus")
150
201
  Task(subagent_type: "general-purpose", model: "opus")
151
202
  prompt: "You are Winston, Architect. Read your persona at _bmad/bmm/agents/architect.md.
152
203
 
204
+ IMPORTANT: Write ALL output in {document_output_language}.
205
+
153
206
  MODE: CRYSTALLIZE — reconcile Architecture with finalized prototype.
154
207
 
155
208
  Primary input:
156
209
  specs/{feature}/reconciled/prototype-analysis.md
157
210
  specs/{feature}/reconciled/planning-artifacts/prd.md (just written by S2a)
158
211
 
212
+ Decision context (understand WHY design decisions were made):
213
+ specs/{feature}/reconciled/decision-context.md (if exists)
214
+
159
215
  Context reference:
160
216
  specs/{feature}/planning-artifacts/architecture.md
161
217
  specs/{feature}/planning-artifacts/brownfield-context.md
@@ -178,6 +234,8 @@ Task(subagent_type: "general-purpose", model: "opus")
178
234
  Task(subagent_type: "general-purpose", model: "opus")
179
235
  prompt: "You are John, Product Manager. Read your persona at _bmad/bmm/agents/pm.md.
180
236
 
237
+ IMPORTANT: Write ALL output in {document_output_language}.
238
+
181
239
  MODE: CRYSTALLIZE — reconcile Epics with finalized prototype.
182
240
 
183
241
  Primary input:
@@ -204,6 +262,8 @@ Task(subagent_type: "general-purpose", model: "opus")
204
262
  Task(subagent_type: "general-purpose", model: "sonnet")
205
263
  prompt: "You are @scope-gate. Read your agent definition at .claude/agents/scope-gate.md.
206
264
 
265
+ IMPORTANT: Write ALL output in {document_output_language}.
266
+
207
267
  Validate cross-artifact consistency of 3 reconciled planning artifacts:
208
268
  - specs/{feature}/reconciled/planning-artifacts/prd.md
209
269
  - specs/{feature}/reconciled/planning-artifacts/architecture.md
@@ -224,17 +284,23 @@ Task(subagent_type: "general-purpose", model: "sonnet")
224
284
 
225
285
  Generate Specs 4-file from reconciled planning artifacts.
226
286
 
227
- **Progress**: `"[S3/6] Generating execution specs (requirements + design + tasks)..."`
287
+ **Progress**: `"[S3/7] Generating execution specs (requirements + design + tasks)..."`
228
288
 
229
289
  ```
230
290
  Task(subagent_type: "general-purpose", model: "sonnet")
231
291
  prompt: "You are @deliverable-generator. Read and follow your agent definition at .claude/agents/deliverable-generator.md.
292
+
293
+ IMPORTANT: Write ALL output in {document_output_language}.
294
+
232
295
  Generate specs in specs-only mode.
233
296
  planning_artifacts: specs/{feature}/reconciled/planning-artifacts/
234
297
  prototype_analysis_path: specs/{feature}/reconciled/prototype-analysis.md
235
- feature_name: {feature}
236
- output_base: specs/{feature}/reconciled/
237
- mode: specs-only"
298
+ feature_name: reconciled
299
+ output_base: specs/{feature}/
300
+ mode: specs-only
301
+
302
+ NOTE: output_base is specs/{feature}/ and feature_name is 'reconciled',
303
+ so output files will be written to specs/{feature}/reconciled/ directory."
238
304
  ```
239
305
 
240
306
  **Post-S3: Entropy/File Ownership Re-annotation**
@@ -253,31 +319,46 @@ After specs generation:
253
319
 
254
320
  Verify existing deliverables against prototype. Regenerate where needed.
255
321
 
256
- **Progress**: `"[S4/6] Verifying API spec..."` → `"...Regenerating BDD scenarios..."` → ...
322
+ **Progress**: `"[S4/7] Verifying API spec..."` → `"...Regenerating BDD scenarios..."` → ...
257
323
 
258
- #### Verify Phase
324
+ Invoke deliverable reconciler:
259
325
 
260
- For each verifiable deliverable, compare against prototype:
326
+ ```
327
+ Task(subagent_type: "general-purpose", model: "sonnet")
328
+ prompt: "Reconcile deliverables for specs/{feature}/reconciled/.
329
+
330
+ IMPORTANT: Write ALL output in {document_output_language}.
331
+
332
+ ## Verify Phase
333
+ Compare existing deliverables against prototype and reconciled PRD:
334
+
335
+ 1. api-spec.yaml: Read specs/{feature}/api-spec.yaml. Compare endpoints against
336
+ specs/{feature}/reconciled/prototype-analysis.md 'API Endpoint Inventory'.
337
+ If endpoints match (count + paths): copy to reconciled/.
338
+ If mismatch: regenerate from prototype-analysis + reconciled PRD.
261
339
 
262
- | Deliverable | Verify Against | On Mismatch |
263
- |-------------|---------------|-------------|
264
- | api-spec.yaml | MSW handlers (Glob `preview/src/mocks/**/*.ts`) | Regenerate from prototype-analysis API Inventory |
265
- | schema.dbml | store.ts data model | Regenerate from prototype-analysis Data Model |
266
- | api-sequences.md | api-spec.yaml endpoints | Regenerate |
340
+ 2. schema.dbml: Read specs/{feature}/schema.dbml. Compare against
341
+ prototype-analysis.md 'Data Model'. Copy or regenerate.
267
342
 
268
- - On match: copy to `reconciled/`
269
- - On mismatch: regenerate and write to `reconciled/`
343
+ 3. api-sequences.md: Read specs/{feature}/api-sequences.md. Compare against
344
+ reconciled api-spec. Copy or regenerate.
270
345
 
271
- #### Regenerate Phase
346
+ ## Regenerate Phase (always regenerate — source documents changed)
272
347
 
273
- Always regenerate these (source documents have changed):
348
+ 4. bdd-scenarios/: Regenerate from specs/{feature}/reconciled/planning-artifacts/prd.md
349
+ acceptance criteria. Write to reconciled/bdd-scenarios/.
274
350
 
275
- | Deliverable | Source | Output |
276
- |-------------|--------|--------|
277
- | bdd-scenarios/ | reconciled/prd.md ACs | reconciled/bdd-scenarios/ |
278
- | key-flows.md | prototype User Flows + reconciled/prd.md journeys | reconciled/key-flows.md |
279
- | traceability-matrix.md | Full reconciled/ artifact set | reconciled/traceability-matrix.md |
280
- | decision-log.md | Merge: original ADRs + JP decisions + Crystallize decisions (mark superseded ADRs) | reconciled/decision-log.md |
351
+ 5. key-flows.md: Regenerate from prototype-analysis User Flows +
352
+ reconciled PRD user journeys. Write to reconciled/key-flows.md.
353
+
354
+ 6. traceability-matrix.md: Rebuild FR Design Task BDD API from
355
+ ALL reconciled/ artifacts. Target: 0 gaps. Use canonical task IDs from
356
+ reconciled/tasks.md (T-01, T-02, etc.). Write to reconciled/traceability-matrix.md.
357
+
358
+ 7. decision-log.md: Read specs/{feature}/decision-log.md (original ADRs).
359
+ Merge with JP decisions from reconciled/decision-context.md.
360
+ Mark superseded ADRs. Write to reconciled/decision-log.md."
361
+ ```
281
362
 
282
363
  **Scope Gate**: Invoke @scope-gate with `stage=deliverables` on reconciled/ deliverables.
283
364
 
@@ -285,12 +366,14 @@ Always regenerate these (source documents have changed):
285
366
 
286
367
  Verify mutual consistency across the entire reconciled/ artifact set.
287
368
 
288
- **Progress**: `"[S5/6] Cross-artifact consistency check..."`
369
+ **Progress**: `"[S5/7] Cross-artifact consistency check..."`
289
370
 
290
371
  ```
291
372
  Task(subagent_type: "general-purpose", model: "sonnet")
292
373
  prompt: "Perform cross-artifact consistency verification on specs/{feature}/reconciled/.
293
374
 
375
+ IMPORTANT: Write ALL output in {document_output_language}.
376
+
294
377
  Read ALL files in reconciled/ directory.
295
378
  Also read prototype MSW handlers (Glob: specs/{feature}/preview/src/mocks/**/*.ts).
296
379
 
@@ -313,7 +396,7 @@ Task(subagent_type: "general-purpose", model: "sonnet")
313
396
 
314
397
  Present reconciliation results to user (in {communication_language}).
315
398
 
316
- **Progress**: `"[S6/6] Generating summary..."`
399
+ **Progress**: `"[S6/7] Generating summary..."`
317
400
 
318
401
  **Output format**:
319
402
 
@@ -350,10 +433,11 @@ Select: [C] Continue to /parallel | [R] Review reconciled/ | [X] Exit
350
433
 
351
434
  ## Budget
352
435
 
353
- ~85-120 turns across 9 Task invocations. Separate from JP2 iteration budget.
436
+ ~85-125 turns across 9 Task invocations. Separate from JP2 iteration budget. S0 runs inline (no Task invocation).
354
437
 
355
438
  | Step | Model | Est. Turns |
356
439
  |------|-------|------------|
440
+ | S0 Decision Context | Conductor (inline) | 0 (no Task) |
357
441
  | S1 Prototype Analysis | Sonnet | 5-8 |
358
442
  | S2a PRD | Opus | 15-20 |
359
443
  | S2b Architecture | Opus | 15-20 |
@@ -367,30 +451,30 @@ Select: [C] Continue to /parallel | [R] Review reconciled/ | [X] Exit
367
451
 
368
452
  ```
369
453
  specs/{feature}/reconciled/
370
- ├── prototype-analysis.md
454
+ ├── decision-context.md # S0 (if decision records exist)
455
+ ├── prototype-analysis.md # S1
371
456
  ├── planning-artifacts/
372
457
  │ ├── prd.md
373
458
  │ ├── architecture.md
374
459
  │ ├── epics-and-stories.md
375
460
  │ └── brownfield-context.md
376
- ├── entity-dictionary.md
461
+ ├── entity-dictionary.md # S3
377
462
  ├── requirements.md
378
463
  ├── design.md
379
464
  ├── tasks.md
380
- ├── api-spec.yaml
465
+ ├── api-spec.yaml # S4
381
466
  ├── api-sequences.md
382
467
  ├── schema.dbml
383
468
  ├── bdd-scenarios/
384
469
  ├── key-flows.md
385
470
  ├── traceability-matrix.md
386
471
  ├── decision-log.md
387
- └── decision-diary.md
472
+ └── decision-diary.md # (if exists in parent)
388
473
  ```
389
474
 
390
475
  ## Constraints
391
476
 
392
477
  1. **Prototype is immutable**: preview/ is never modified during Crystallize
393
478
  2. **Original artifacts are immutable**: specs/{feature}/ files (outside reconciled/) are never modified
394
- 3. **Sprint-route only**: Requires Sprint artifacts (decision-diary.md, sprint-log.md JP Interactions). Not available for Guided/Direct routes.
395
- 4. **Product Brief excluded**: Product Brief defines problem space not reconcilable from prototype
396
- 5. **Brownfield not re-scanned**: brownfield-context.md is copied as-is (JP2 iteration changes product design, not existing system landscape)
479
+ 3. **Product Brief excluded**: Product Brief defines problem space not reconcilable from prototype
480
+ 4. **Brownfield not re-scanned**: brownfield-context.md is copied as-is (JP2 iteration changes product design, not existing system landscape)
@@ -31,7 +31,7 @@ Prerequisites:
31
31
 
32
32
  ## Procedure
33
33
 
34
- Load config per Language Protocol in bmad-sprint-guide.md.
34
+ Load config per Language Protocol in jdd-sprint-guide.md.
35
35
 
36
36
  ### Step 1: Interface Contract Creation
37
37
  Create shared types/interfaces first (referenced by all Workers):
@@ -62,7 +62,7 @@ Create Worker agents via Claude Code Native Teams:
62
62
  1. Create team via TeamCreate
63
63
  2. Create each Worker via Task tool (`subagent_type: "worker"`, `model: "sonnet"`)
64
64
  3. Create tasks via TaskCreate, assign via TaskUpdate
65
- 4. Instruct each Worker to reference `specs/{feature}/brownfield-context.md`:
65
+ 4. Instruct each Worker to reference `{specs_root}/brownfield-context.md` (or `{specs_root}/planning-artifacts/brownfield-context.md` for reconciled/):
66
66
  - Follow existing code patterns/conventions (based on configured client-docs MCP)
67
67
  - Maintain compatibility when extending existing APIs (based on configured backend-docs MCP)
68
68
  - Verify alignment with existing customer journey flows (based on configured svc-map MCP)
@@ -26,7 +26,7 @@ Required files (in `specs/{feature}/` directory):
26
26
 
27
27
  ## Procedure
28
28
 
29
- Load config per Language Protocol in bmad-sprint-guide.md.
29
+ Load config per Language Protocol in jdd-sprint-guide.md.
30
30
 
31
31
  ### Step 1: Specs Verification
32
32
 
@@ -62,12 +62,23 @@ This mode reads existing Specs 4-file and executes Stages 3-10:
62
62
 
63
63
  ### Step 3: Output Review
64
64
 
65
+ Initialize `specs/{feature}/decision-diary.md` if it does not exist (with route metadata: `route: guided` or `route: direct`).
66
+
65
67
  Present generated Sprint Output Package to user for review (in {communication_language}):
66
68
 
67
- - **Approve** run `/parallel` (parallel implementation)
68
- - **Feedback (Deliverables)** → re-run Step 2 (Specs preserved)
69
- - **Feedback (design)** re-run `/specs` (modify Planning Artifacts)
70
- - **Abort** exit
69
+ | Option | Label | Description |
70
+ |--------|-------|-------------|
71
+ | **A** | Approve | Proceed to `/parallel` (parallel implementation) |
72
+ | **S** | Crystallize | Reconcile all documents to match prototype, then proceed to execution |
73
+ | **F1** | Feedback (Deliverables) | Re-run Step 2 (Specs preserved) |
74
+ | **F2** | Feedback (design) | Re-run `/specs` (modify Planning Artifacts) |
75
+ | **X** | Abort | Exit (artifacts preserved) |
76
+
77
+ **On feedback (F1/F2)**: Record feedback to `specs/{feature}/decision-diary.md` Decisions table (Type, Content, Processing, Result) before re-running.
78
+
79
+ **On [S] Crystallize**: Record selection in decision-diary.md → invoke `/crystallize {feature}`.
80
+
81
+ **Iteration limit**: F1/F2 selections combined max 5 times. On exceed, warn (in {communication_language}): "5 review/edit rounds complete. Select [A] Approve, [S] Crystallize, or [X] Abort."
71
82
 
72
83
  ## Outputs
73
84
  - `specs/{feature-name}/api-spec.yaml`
@@ -22,7 +22,7 @@ After BMad Phase 3 artifacts are ready and pass Implementation Readiness.
22
22
 
23
23
  ## Procedure
24
24
 
25
- Load config per Language Protocol in bmad-sprint-guide.md.
25
+ Load config per Language Protocol in jdd-sprint-guide.md.
26
26
 
27
27
  ### Step 0: Feature Directory + Artifact Discovery
28
28
 
@@ -33,7 +33,7 @@ Prerequisites:
33
33
 
34
34
  ## Procedure
35
35
 
36
- Load config per Language Protocol in bmad-sprint-guide.md.
36
+ Load config per Language Protocol in jdd-sprint-guide.md.
37
37
 
38
38
  ### Phase 0: Smart Launcher (runs in main session)
39
39
 
@@ -513,18 +513,36 @@ If Step 0d detected GitHub repo URLs and user selected [1] (download):
513
513
 
514
514
  2. **For each repo with status: pending**:
515
515
  a. Progress message (in {communication_language}): "원격 리포지토리 스냅샷 다운로드 중... ({N}/{total}: {owner_repo})"
516
- b. Create temp directory: `mkdir -p /tmp/sprint-{feature}-{name} && chmod 700 /tmp/sprint-{feature}-{name}`
516
+ b. **Extract branch from URL** (if present):
517
+ - URL pattern `https://github.com/{owner}/{repo}/tree/{branch}` → extract `{branch}`
518
+ - URL pattern `https://github.com/{owner}/{repo}` (no `/tree/`) → default `{ref}` = `HEAD`
519
+ - Store `{ref}` for tarball API call and commit query
520
+ c. **Repo size pre-check**: `gh api repos/{owner_repo} --jq '.size'` (returns KB)
521
+ - Size < 1GB (< 1048576 KB): proceed silently
522
+ - Size >= 1GB: warn (in {communication_language}), then proceed without blocking:
523
+ ```
524
+ ⚠ {owner_repo}: approximately {size_mb}MB. Download may take several minutes.
525
+ For partial access (specific directories only), use: git clone + claude --add-dir
526
+ Downloading...
527
+ ```
528
+ d. **Create cache directory**: `mkdir -p ~/docs-cache/{feature}/{name} && chmod 700 ~/docs-cache/{feature}/{name}`
517
529
  - `{name}` = `{owner}-{repo}` (slash replaced with hyphen)
518
- c. Download + extract: `gh api repos/{owner_repo}/tarball/HEAD | tar xz -C /tmp/sprint-{feature}-{name} --strip-components=1`
519
- d. **On success** add to `external_resources.external_repos`:
530
+ e. **Download + extract**: `gh api repos/{owner_repo}/tarball/{ref} | tar xz -C ~/docs-cache/{feature}/{name} --strip-components=1`
531
+ f. **Record snapshot version**: `gh api repos/{owner_repo}/commits/{ref} --jq '.sha + " " + .commit.committer.date'`
532
+ - Parse output: `{snapshot_commit}` = first field (SHA), `{snapshot_at}` = second field (ISO 8601)
533
+ - `{snapshot_branch}` = `{ref}` if explicitly extracted from URL, otherwise `"HEAD"`
534
+ g. **On success** → add to `external_resources.external_repos`:
520
535
  ```yaml
521
536
  - name: "{owner}-{repo}"
522
- path: "/tmp/sprint-{feature}-{name}/"
537
+ path: "~/docs-cache/{feature}/{name}/"
523
538
  access_method: "tarball-snapshot"
524
539
  source_url: "https://github.com/{owner_repo}"
540
+ snapshot_commit: "{snapshot_commit}"
541
+ snapshot_branch: "{snapshot_branch}"
542
+ snapshot_at: "{snapshot_at}"
525
543
  ```
526
544
  Update github_repos status to `configured`
527
- e. **On failure** → classify error and present via AskUserQuestion (in {communication_language}):
545
+ h. **On failure** → classify error and present via AskUserQuestion (in {communication_language}):
528
546
 
529
547
  | Error Pattern | Message |
530
548
  |---------------|---------|
@@ -538,11 +556,13 @@ If Step 0d detected GitHub repo URLs and user selected [1] (download):
538
556
  - [2] 해당 repo 없이 계속
539
557
  - [3] --add-dir로 수동 접근
540
558
 
541
- - [1] selected: retry step 2c (max 1 retry)
559
+ - [1] selected: retry step 2e (max 1 retry)
542
560
  - [2] selected: update github_repos status to `not-configured`, proceed
543
561
  - [3] selected: guide user to clone + --add-dir, update github_repos status to `not-configured`
544
562
 
545
- f. Completion message (in {communication_language}): "다운로드 완료 ({total}/{total}, {elapsed}초)"
563
+ Note: if only the version query (step 2f) fails, proceed with download success — record `snapshot_commit: "unknown"`.
564
+
565
+ i. Completion message (in {communication_language}): "다운로드 완료 ({total}/{total}, {elapsed}초)"
546
566
 
547
567
  3. **Update github_repos status**: `configured` (all succeeded) / `not-configured` (any failed)
548
568
 
@@ -30,7 +30,7 @@ If argument is `help` → **Help Mode**. If last argument is `analyze` → **Ana
30
30
 
31
31
  ## Procedure
32
32
 
33
- Load config per Language Protocol in bmad-sprint-guide.md.
33
+ Load config per Language Protocol in jdd-sprint-guide.md.
34
34
 
35
35
  ### Help Mode
36
36
 
@@ -30,7 +30,7 @@ Prerequisites:
30
30
 
31
31
  ## Procedure
32
32
 
33
- Load config per Language Protocol in bmad-sprint-guide.md.
33
+ Load config per Language Protocol in jdd-sprint-guide.md.
34
34
 
35
35
  ### Phase 1: Automated Verification (all tasks)
36
36
  Applied to all Entropy levels:
@@ -26,12 +26,13 @@ For data sources that cannot be cloned locally (e.g., Figma live design data), c
26
26
 
27
27
  > **Do not use filesystem MCP servers for local clones.** Claude Code's MCP security restricts filesystem MCP servers to the project root directory. Use `--add-dir` instead.
28
28
 
29
- #### Method 3: GitHub Repo Snapshot (원격 repo, clone 없이)
29
+ #### Method 3: GitHub Repo Snapshot (remote repo, no clone)
30
30
 
31
- brief.md의 `## 참고 소스` 섹션에 GitHub repo URL을 선언하거나, inputs/ 파일에 URL을 포함하면 Sprint 시작 자동으로 읽기 전용 스냅샷을 다운로드합니다.
32
- clone 아닙니다 — git history 없이 현재 파일만 다운로드하여 temp 디렉토리에 추출합니다.
33
- Scanner는 추출된 파일에 Glob/Grep/Read로 접근합니다 (--add-dir와 동일한 방식).
34
- GitHub URL만 지원됩니다. GitLab/Bitbucket은 --add-dir를 사용하세요.
31
+ Declare GitHub repo URLs in the `## Reference Sources` section of brief.md, or include them in inputs/ files. Sprint auto-downloads a read-only snapshot at Phase 0 start.
32
+ Not a clone — downloads current files only via `gh api tarball` (no git history) to a persistent cache directory (`~/docs-cache/{feature}/{name}/`).
33
+ Snapshot provenance (commit SHA, branch, timestamp) is recorded in sprint-input.md for traceability.
34
+ Scanner accesses extracted files via Glob/Grep/Read (same as --add-dir).
35
+ GitHub URLs only. For GitLab/Bitbucket, use --add-dir.
35
36
 
36
37
  ### External Data Source Roles
37
38
 
@@ -74,6 +74,7 @@ Build planning artifacts step-by-step through conversation with BMad agents.
74
74
  BMad 12-step (human-AI dialogue):
75
75
  /create-product-brief → /create-prd → /create-architecture → /create-epics
76
76
  → /specs → JP1 → /preview → JP2
77
+ → [S] Crystallize (optional): reconcile all artifacts with finalized prototype → reconciled/
77
78
  → /parallel → /validate
78
79
  ```
79
80
 
@@ -83,6 +84,7 @@ Use when finished PRD + Architecture + Epics already exist.
83
84
 
84
85
  ```
85
86
  /specs → JP1 → /preview → JP2
87
+ → [S] Crystallize (optional): reconcile all artifacts with finalized prototype → reconciled/
86
88
  → /parallel → /validate
87
89
  ```
88
90
 
@@ -170,9 +172,11 @@ Routes are not fixed. Adapt as needed:
170
172
  │ ├── inputs/ # User originals + sprint-input.md
171
173
  │ ├── planning-artifacts/ # BMad artifacts (Sprint/Direct route)
172
174
  │ ├── brownfield-context.md # Frozen snapshot
175
+ │ ├── decision-diary.md # JP decision summary
173
176
  │ ├── requirements.md
174
177
  │ ├── design.md
175
178
  │ ├── tasks.md
176
- └── preview/ # React + MSW prototype
179
+ ├── preview/ # React + MSW prototype
180
+ │ └── reconciled/ # Crystallize output (prototype-reconciled artifacts)
177
181
  └── src/ # Source code
178
182
  ```
@@ -203,19 +203,20 @@ Users see the calculated cost alongside the options.
203
203
 
204
204
  After JP2 prototype iteration, [S] Crystallize reconciles all upstream artifacts with the finalized prototype. Creates `reconciled/` directory with the definitive artifact set.
205
205
 
206
- **Availability**: Sprint-route only. Depends on Sprint artifacts (decision-diary.md, sprint-log.md JP Interactions). Not available for Guided/Direct routes.
206
+ **Availability**: All routes (Sprint, Guided, Direct). Decision records (decision-diary.md, jp2-review-log.md, sprint-log.md JP Interactions) are optional — they enrich S0 Decision Context when present. Without them, S0 is skipped and S1 runs from code analysis alone.
207
207
 
208
208
  ### Crystallize Pipeline
209
209
 
210
210
  ```
211
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)
212
+ S0: Decision Context Analysis → reconciled/decision-context.md (JP2 modification intent)
213
+ S1: Prototype Analysis → reconciled/prototype-analysis.md (informed by S0)
214
+ S2: Reconcile Planning reconciled/planning-artifacts/ (PRD, Architecture, Epics)
215
+ S2-G: Cross-Artifact Gate PASS/FAIL
216
+ S3: Generate Execution Specs reconciled/ (entity-dict, requirements, design, tasks)
217
+ S3-G: Scope Gate (spec) → PASS/FAIL
218
+ S4: Reconcile Deliverables reconciled/ (api-spec, bdd, key-flows, traceability, etc.)
219
+ S5: Cross-Artifact Consistency → PASS/FAIL (gap=0 required; ≤3 auto-fix, >3 user choice)
219
220
  S6: Summary → [C] /parallel with specs_root=reconciled/
220
221
  ```
221
222
 
@@ -163,11 +163,20 @@ data_sources:
163
163
  local-codebase: ok | not-configured | scan-error
164
164
  # External sources — dynamically listed from sprint-input.md external_resources
165
165
  # (source names come from external_resources.external_repos or MCP servers)
166
- {source_name_1}: ok | timeout | error | empty-result | scan-error
167
- {source_name_2}: ok | timeout | error | empty-result | scan-error
166
+ # For tarball-snapshot sources, include provenance from sprint-input.md:
167
+ # snapshot_commit, snapshot_branch, snapshot_at
168
+ {source_name_1}:
169
+ status: ok | timeout | error | empty-result | scan-error
170
+ snapshot_commit: "a1b2c3d" # (tarball-snapshot only) commit SHA at download time
171
+ snapshot_branch: "main" # (tarball-snapshot only) branch or "HEAD"
172
+ snapshot_at: "2026-02-20T14:30:00Z" # (tarball-snapshot only) commit timestamp
173
+ {source_name_2}:
174
+ status: ok | timeout | error | empty-result | scan-error
168
175
  figma: ok | timeout | error | not-configured # only when external_resources.figma exists
169
176
  ```
170
177
 
178
+ When writing `data_sources` for tarball-snapshot repos, read `snapshot_commit`, `snapshot_branch`, and `snapshot_at` from `sprint-input.md` `external_resources.external_repos[]` and include them. For `add-dir` repos, omit snapshot fields (not applicable).
179
+
171
180
  ## Source Types
172
181
 
173
182
  `sources` 배열의 각 항목은 `type`과 `name`으로 구성된다:
@@ -79,9 +79,12 @@ external_resources:
79
79
  status: configured | not-configured | reference-only
80
80
  external_repos:
81
81
  - name: "{repo-name}"
82
- path: "{accessible local path}"
82
+ path: "{accessible local path}" # ~/docs-cache/{feature}/{name}/ for tarball-snapshot
83
83
  access_method: "add-dir" # or "tarball-snapshot"
84
84
  source_url: "" # present when access_method is tarball-snapshot
85
+ snapshot_commit: "" # commit SHA at download time (tarball-snapshot only)
86
+ snapshot_branch: "" # branch name or "HEAD" (tarball-snapshot only)
87
+ snapshot_at: "" # commit timestamp ISO 8601 (tarball-snapshot only)
85
88
  policy_docs:
86
89
  - "matching-policy.md"
87
90
  scan_notes: "매칭 엔진과 예약 플로우 중심으로 탐색"
@@ -124,9 +127,12 @@ flags:
124
127
  | `external_resources.github_repos.status` | (Y if github_repos exists) | `configured` (downloaded) / `not-configured` (download failed) / `reference-only` (URL only) |
125
128
  | `external_resources.external_repos` | N | External repo paths detected via `--add-dir` or tarball snapshot |
126
129
  | `external_resources.external_repos[].name` | (Y if external_repos exists) | Repo identifier (derived from directory name) |
127
- | `external_resources.external_repos[].path` | (Y if external_repos exists) | Accessible local path to the repo |
130
+ | `external_resources.external_repos[].path` | (Y if external_repos exists) | Accessible local path to the repo (`~/docs-cache/{feature}/{name}/` for tarball-snapshot) |
128
131
  | `external_resources.external_repos[].access_method` | (Y if external_repos exists) | How the path was provided (`add-dir` / `tarball-snapshot`) |
129
132
  | `external_resources.external_repos[].source_url` | N | Original URL (for tarball re-download; present when access_method is `tarball-snapshot`) |
133
+ | `external_resources.external_repos[].snapshot_commit` | N | Commit SHA at download time (tarball-snapshot only; `"unknown"` if query failed) |
134
+ | `external_resources.external_repos[].snapshot_branch` | N | Branch name extracted from URL, or `"HEAD"` if default (tarball-snapshot only) |
135
+ | `external_resources.external_repos[].snapshot_at` | N | Commit timestamp ISO 8601 (tarball-snapshot only) |
130
136
  | `external_resources.github_repos[].notes` | N | 탐색 힌트 (brief.md 참고 소스 섹션에서 전달). Scanner가 참조 |
131
137
  | `external_resources.policy_docs` | N | Scanner 우선 탐색 대상 문서명 목록 (brief.md 참고 소스 섹션에서 전달) |
132
138
  | `external_resources.scan_notes` | N | 전체 탐색 자유 형식 메모 (brief.md 참고 소스 섹션에서 전달) |