flow-cc 0.4.3 → 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/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] - 2026-02-13
9
+
10
+ ### Added
11
+ - Multi-PRD support — PRDs now live at `.planning/prds/{version-slug}.md` instead of a single root `PRD.md`
12
+ - 5-step PRD resolution logic across all skills: user argument → STATE.md Active PRD → slug derivation → legacy fallback → not found
13
+ - `**Milestone:**` header field in PRDs for ROADMAP correlation
14
+ - `Active PRD` field in STATE.md tracking the current milestone's PRD path
15
+ - Milestone Targeting in `/flow:spec` — pass a milestone name to pre-spec future milestones in parallel
16
+ - PRD inventory display in `/flow:status` showing active/ready tags per PRD file
17
+ - `/flow:setup` now creates `.planning/prds/` directory during project scaffolding
18
+
19
+ ### Changed
20
+ - `/flow:spec` writes PRDs to `.planning/prds/{version-slug}.md` (was root `PRD.md`)
21
+ - `/flow:go` resolves PRDs via 5-step resolution instead of hardcoded `PRD.md`
22
+ - `/flow:done` archives PRDs from `.planning/prds/` to `.planning/archive/PRD-{slug}.md`
23
+ - `/flow:status` lists all PRDs in `.planning/prds/` with active/ready status
24
+ - `/flow:task` reads active PRD from `.planning/prds/` via STATE.md
25
+ - All templates and docs updated to reflect new PRD paths
26
+ - Legacy root `PRD.md` still consumed transparently — migration happens organically
27
+
8
28
  ## [0.4.3] - 2026-02-12
9
29
 
10
30
  ### Changed
package/README.md CHANGED
@@ -26,7 +26,7 @@ Claude Code is powerful but unstructured. Without a system, you lose context bet
26
26
  Flow fixes this by giving Claude Code a **memory system and execution framework**:
27
27
 
28
28
  - **Spec interviews** extract decisions upfront so agents execute instead of guessing
29
- - **PRDs become execution contracts** that agent teams follow phase-by-phase
29
+ - **PRDs become per-milestone execution contracts** in `.planning/prds/` spec future milestones in parallel
30
30
  - **Session handoffs** preserve context across fresh sessions — no more "where was I?"
31
31
  - **Lessons compound** — mistakes get captured, refined, and promoted into permanent rules
32
32
 
@@ -42,7 +42,7 @@ Flow fixes this by giving Claude Code a **memory system and execution framework*
42
42
  ```
43
43
 
44
44
  1. **`/flow:setup`** — Scaffolds your project with planning docs and execution rules
45
- 2. **`/flow:spec`** — Interviews you, then writes an executable PRD with phases, acceptance criteria, and agent-team structure
45
+ 2. **`/flow:spec`** — Interviews you, then writes an executable PRD to `.planning/prds/` with phases, acceptance criteria, and agent-team structure. Can pre-spec future milestones.
46
46
  3. **`/flow:go`** — Spawns parallel agent teams to build the next phase, verifies, commits
47
47
  4. **`/flow:done`** — Updates docs, captures lessons, generates a handoff prompt so the next session starts instantly
48
48
 
@@ -55,7 +55,7 @@ Run `/flow:go` repeatedly until all phases are done, then `/flow:done` to wrap u
55
55
  | Command | When to use |
56
56
  |---|---|
57
57
  | `/flow:setup` | Once per project — creates `.planning/`, CLAUDE.md, templates |
58
- | `/flow:spec` | Once per milestone — interview that produces the PRD |
58
+ | `/flow:spec` | Once per milestone — interview that produces the PRD. Can pre-spec future milestones |
59
59
  | `/flow:go` | Once per phase — executes the next phase with agent teams |
60
60
  | `/flow:done` | End of session — updates docs, generates handoff prompt |
61
61
 
@@ -107,10 +107,10 @@ Every Flow project gets this structure via `/flow:setup`:
107
107
  ```
108
108
  your-project/
109
109
  ├── CLAUDE.md # Project-specific execution rules
110
- ├── PRD.md # Current milestone spec (created by /flow:spec)
111
110
  ├── .planning/
112
111
  │ ├── STATE.md # Session GPS — current status, next actions
113
112
  │ ├── ROADMAP.md # Milestone phases and progress
113
+ │ ├── prds/ # Per-milestone PRD specs (one file per milestone)
114
114
  │ └── archive/ # Completed milestones and old PRDs
115
115
  └── tasks/
116
116
  └── lessons.md # Active lessons (max 10 one-liners) → promoted to CLAUDE.md
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.5.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-cc",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "Structured workflow system for Claude Code — spec interviews, agent-team execution, session handoffs, compounding knowledge",
5
5
  "author": "Troy Hoffman",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@ Read these files (in parallel where possible):
19
19
  - `.planning/ROADMAP.md` — milestone/phase progress
20
20
  - `tasks/lessons.md` — active lessons (max 10)
21
21
  - `CLAUDE.md` — project rules
22
- - `PRD.md` current spec (if exists)
22
+ - Active PRD from `.planning/prds/` (resolve via STATE.md "Active PRD" field, or fall back to legacy `PRD.md` at root)
23
23
 
24
24
  Also gather:
25
25
  - Run `git log --oneline -20` to see commits this session
@@ -38,6 +38,7 @@ Structure:
38
38
  - **Milestone:** [name] (vX)
39
39
  - **Phase:** [current phase status]
40
40
  - **Branch:** [current branch]
41
+ - **Active PRD:** [path to active PRD, or "None" if milestone complete]
41
42
  - **Last Session:** [today's date]
42
43
 
43
44
  ## Milestone Progress
@@ -69,7 +70,8 @@ Structure:
69
70
  - Create `.planning/archive/` if it doesn't already exist (use `mkdir -p` or equivalent)
70
71
  - Move milestone phase details to `.planning/archive/milestones-vX.md`
71
72
  - Keep only the summary row in the ROADMAP milestone table
72
- - Move `PRD.md` to `.planning/archive/PRD-vX.md`
73
+ - Archive the milestone's PRD: move `.planning/prds/{slug}.md` to `.planning/archive/PRD-{slug}.md`. If using legacy root `PRD.md`, move it to `.planning/archive/PRD-vX.md` instead.
74
+ - Clear STATE.md "Active PRD" field (set to "None")
73
75
  - Mark the milestone as "Complete" in the ROADMAP table
74
76
  - **Milestone transition:** Check ROADMAP.md for the NEXT milestone with status "Planned":
75
77
  - **If a next milestone exists:** Update its status from "Planned" to "Pending — needs `/flow:spec`". Update STATE.md current milestone to point to the new milestone.
@@ -104,7 +106,7 @@ Determine the next action and generate a copyable handoff prompt:
104
106
 
105
107
  - If next phase exists in PRD:
106
108
  ```
107
- Phase [N]: [Name] — [short description]. Read STATE.md, ROADMAP.md, and PRD.md (US-X).
109
+ Phase [N]: [Name] — [short description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md (US-X).
108
110
  [One sentence of context]. [One sentence of what NOT to do if relevant].
109
111
  ```
110
112
  - If milestone is complete AND a next milestone was transitioned to (from Step 3):
package/skills/flow-go.md CHANGED
@@ -10,24 +10,36 @@ You are executing the `/flow:go` skill. This reads the PRD, identifies the next
10
10
 
11
11
  **Core principle:** The PRD is the execution contract. You execute what it specifies. Do not freelance.
12
12
 
13
- **Plan mode warning:** Do NOT use this skill with plan mode enabled. `/flow:go` is execution — plan mode's read-only constraint prevents it from creating files, running agents, and committing work. The PRD IS your plan; run `/flow:go` in normal mode.
13
+ **Plan mode warning:** Do NOT use this skill with plan mode enabled. `/flow:go` is execution — plan mode's read-only constraint prevents it from creating files, running agents, and committing work. The PRD is your plan; run `/flow:go` in normal mode.
14
14
 
15
15
  ## Step 1 — Orient
16
16
 
17
17
  Read these files (in parallel):
18
18
  - `.planning/STATE.md` — current position
19
19
  - `.planning/ROADMAP.md` — phase progress
20
- - `PRD.md` the execution spec
20
+ - The active PRD (see PRD Resolution below)
21
21
  - `tasks/lessons.md` — active lessons (max 10 one-liners)
22
22
  - `CLAUDE.md` — execution rules and verification commands
23
23
 
24
+ ### PRD Resolution
25
+
26
+ Resolve the PRD file to use, in this order:
27
+
28
+ 1. **User argument:** If the user passed an argument to `/flow:go` (e.g., `/flow:go v3-payments`), match it against files in `.planning/prds/` (by slug or milestone name from the `**Milestone:**` header field).
29
+ 2. **STATE.md Active PRD:** Read the "Active PRD" field from STATE.md's Current Position section. If it points to a valid file, use it.
30
+ 3. **Slug derivation:** Derive a slug from STATE.md's current milestone name — version-prefix + lowercase name, spaces/special chars → hyphens, collapse consecutive hyphens (e.g., "v2: Dashboard Analytics" → `v2-dashboard-analytics`). Check `.planning/prds/{slug}.md`.
31
+ 4. **Legacy fallback:** If `.planning/prds/` is empty or missing but `PRD.md` exists at the project root, use it. Print: "Using legacy PRD.md at project root. Future specs will use `.planning/prds/`."
32
+ 5. **Not found:** "No PRD found for [current milestone name]. Available PRDs: [list files in `.planning/prds/`]. Run `/flow:spec` first."
33
+
34
+ **Milestone match check:** After resolving the PRD, read its `**Milestone:**` header field. If it doesn't match STATE.md's current milestone, warn: "PRD milestone ([PRD milestone]) doesn't match current milestone ([STATE milestone]). Continuing, but verify you're executing the right spec."
35
+
24
36
  **Identify the next phase:** Find the first phase in ROADMAP.md with status "Pending" or the first unstarted phase in the PRD.
25
37
 
26
38
  ## Step 2 — Pre-flight Checks
27
39
 
28
40
  Run these checks before executing. If any fail, stop and tell the user what to do:
29
41
 
30
- 1. **PRD exists?** If `PRD.md` is missing: "No PRD found. Run `/flow:spec` first."
42
+ 1. **PRD resolved?** If PRD Resolution (above) reached step 5 (not found): stop with the "No PRD found" message and available PRD list.
31
43
  2. **Phase detailed enough?** The phase section in the PRD must have:
32
44
  - Wave structure with agent assignments
33
45
  - Explicit file lists per agent
@@ -146,6 +158,7 @@ Create an atomic commit for this phase:
146
158
  - Files created/modified (count + key names)
147
159
  - Commit SHA
148
160
  - Phase completion note
161
+ - Keep "Active PRD" field pointing to the resolved PRD path
149
162
 
150
163
  **ROADMAP.md:** Mark this phase as "Complete ([today's date])"
151
164
 
@@ -24,6 +24,8 @@ Flow is 6 commands that turn your specs into shipped code through agent teams. E
24
24
  full roadmap) | auto-transitions to |
25
25
  +---- next planned milestone ------+
26
26
 
27
+ /flow:spec ← can pre-spec future milestones (each gets its own PRD in .planning/prds/)
28
+
27
29
  /flow:milestone ← add milestones to roadmap anytime
28
30
  /flow:task ← standalone path for bug fixes, cleanup, small features (no PRD needed)
29
31
  ```
@@ -50,8 +52,9 @@ Flow is 6 commands that turn your specs into shipped code through agent teams. E
50
52
  **`/flow:spec`** — Run once per milestone
51
53
  - Interviews you about scope, user stories, technical design, trade-offs, and phasing
52
54
  - You can say "done" or "that's enough" anytime to cut the interview short
53
- - Produces `PRD.md` — the execution contract with wave-based phases, file lists, and acceptance criteria
54
- - Updates ROADMAP and STATE to reflect the plan
55
+ - Produces `.planning/prds/{milestone}.md` — the execution contract with wave-based phases, file lists, and acceptance criteria
56
+ - Can pre-spec future milestones in parallel terminal windows (each milestone gets its own PRD file)
57
+ - Updates ROADMAP and STATE to reflect the plan (for the current milestone; future milestone specs skip STATE updates)
55
58
 
56
59
  **`/flow:go`** — Run once per phase (this is where the work happens)
57
60
  - Reads the PRD, finds the next pending phase
@@ -81,6 +81,7 @@ Create these 5 files (create directories as needed):
81
81
  - **Milestone:** [first milestone name] (v1)
82
82
  - **Phase:** Not started — run `/flow:spec` to build PRD
83
83
  - **Branch:** main
84
+ - **Active PRD:** None — run `/flow:spec` to create
84
85
  - **Last Session:** [today's date]
85
86
 
86
87
  ## Milestone Progress
@@ -145,10 +146,10 @@ Note: The first milestone gets status "Pending — needs `/flow:spec`". All subs
145
146
  1. Read this file (CLAUDE.md)
146
147
  2. Read `.planning/STATE.md` for current status
147
148
  3. Read `.planning/ROADMAP.md` for milestone progress
148
- 4. Read `PRD.md` for current execution spec (if one exists)
149
+ 4. Read active PRD from `.planning/prds/` for current milestone (if one exists)
149
150
 
150
151
  ## Execution Rules
151
- - **Plan before building.** For non-trivial work, read the PRD phase section before touching anything.
152
+ - **Plan before building.** For non-trivial work, read the milestone's PRD in `.planning/prds/` before touching anything.
152
153
  - **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
153
154
  - **Verify everything.** Run [verification commands from user] after agent work lands. Nothing is done until proven.
154
155
 
@@ -176,6 +177,8 @@ One-liner format: `- **[topic]** The rule`
176
177
  <!-- EXAMPLE: - **[agent context]** Always tell agents exactly which functions/lines to read — never "read file.ts", say "read file.ts lines 50-120" -->
177
178
  ```
178
179
 
180
+ **`.planning/prds/`** — Create this empty directory (use `mkdir -p` via Bash). PRDs are stored here per-milestone.
181
+
179
182
  **`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
180
183
 
181
184
  ## Step 4: Print Completion Message
@@ -186,6 +189,7 @@ Project initialized:
186
189
  - .planning/STATE.md — session GPS
187
190
  - .planning/ROADMAP.md — milestone tracker
188
191
  - tasks/lessons.md — active lessons (max 10)
192
+ - .planning/prds/ — per-milestone PRD specs
189
193
  - .planning/archive/ — for completed milestones
190
194
 
191
195
  Run `/flow:spec` to plan your first milestone.
@@ -10,13 +10,16 @@ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow
10
10
 
11
11
  **Interview mode:** Always thorough by default. The user can say "done", "finalize", "that's enough", or "move on" at ANY time to wrap up early. Respect their signal and finalize with whatever depth has been achieved.
12
12
 
13
- **Plan mode warning:** Do NOT use this skill with plan mode enabled. Plan mode's read-only constraint prevents PRD.md from being written during the interview. `/flow:spec` IS the planning phase — plan mode on top of it is redundant and breaks the workflow.
13
+ **Plan mode warning:** Do NOT use this skill with plan mode enabled. Plan mode's read-only constraint prevents the PRD from being written during the interview. `/flow:spec` IS the planning phase — plan mode on top of it is redundant and breaks the workflow.
14
14
 
15
15
  ## Phase 1 — Context Gathering (automatic, no user input needed)
16
16
 
17
17
  1. Read `.planning/STATE.md` and `.planning/ROADMAP.md` — understand current milestone and what's done
18
18
  2. Read `CLAUDE.md` — understand project rules and tech stack
19
- 3. Read `PRD.md` if it exists — check for existing spec to build on
19
+ 3. Check for existing PRD:
20
+ - List `.planning/prds/` directory (if it exists) for existing PRD files
21
+ - Also check for legacy `PRD.md` at project root (backward compat)
22
+ - If a PRD exists for the target milestone, note it for resume/extend flow
20
23
  4. **Codebase scan** (brownfield projects) — spawn **3 parallel Explore subagents** via the Task tool to scan the codebase without consuming main context:
21
24
 
22
25
  | Agent | Focus | Looks For |
@@ -34,6 +37,25 @@ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow
34
37
 
35
38
  5. **Assemble summaries:** Collect the 3 agent summaries into a brief context block (~45 lines total). Print to user: "Here's what I found in the codebase: [key components, patterns, data layer]. Starting the spec interview."
36
39
 
40
+ ## Milestone Targeting
41
+
42
+ Before starting the interview, determine which milestone this PRD targets:
43
+
44
+ 1. **If the user passed an argument** (e.g., `/flow:spec v3: Payments`) — match against ROADMAP.md milestones. If no match, print available milestones and ask which one.
45
+
46
+ 2. **If no argument** — default to the current milestone from STATE.md "Milestone" field.
47
+
48
+ 3. **Derive the PRD slug:** Take the milestone's version prefix and name (e.g., "v3: Dashboard Analytics"), lowercase it, replace spaces and special characters with hyphens, collapse consecutive hyphens. Result: `v3-dashboard-analytics`. The PRD path is `.planning/prds/{slug}.md`.
49
+
50
+ 4. **Check for existing PRD at that path:**
51
+ - **If PRD exists** → Use AskUserQuestion: "A PRD already exists for this milestone at `.planning/prds/{slug}.md`. What would you like to do?"
52
+ - "Resume editing" — load the existing PRD and continue the interview from where it left off
53
+ - "Start fresh" — delete the existing PRD and start a new interview
54
+ - "Pick a different milestone" — show available milestones
55
+ - **If no PRD exists** → Proceed with a fresh interview
56
+
57
+ 5. **Future milestone detection:** If the target milestone is NOT the current milestone in STATE.md, note this — the PRD will be written but STATE.md's "Active PRD" field will NOT be updated (it stays pointing at the current milestone's PRD). Print: "Speccing future milestone [name]. STATE.md will not be updated — this PRD will be available when you reach this milestone."
58
+
37
59
  ## Phase 2 — Adaptive Interview
38
60
 
39
61
  ### CRITICAL RULES (follow these exactly)
@@ -50,7 +72,7 @@ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow
50
72
 
51
73
  3. **CONTINUE UNTIL THE USER SAYS STOP.** Do NOT stop after covering all 7 areas once. After each answer, immediately ask the next question. Keep going deeper until the user says "done", "finalize", "that's enough", "ship it", or similar. A thorough interview is 15-30 questions, not 5.
52
74
 
53
- 4. **MAINTAIN A RUNNING DRAFT.** Every 2-3 questions, update PRD.md with what you've learned so far. Print: "Updated PRD draft — added [brief summary]." The user should see the spec taking shape in real-time, not all at the end.
75
+ 4. **MAINTAIN A RUNNING DRAFT.** Every 2-3 questions, update `.planning/prds/{slug}.md` with what you've learned so far (create `.planning/prds/` directory if it doesn't exist). Print: "Updated PRD draft — added [brief summary]." The user should see the spec taking shape in real-time, not all at the end.
54
76
 
55
77
  5. **BE ADAPTIVE.** Base your next question on the previous answer. If the user reveals something surprising, probe deeper on THAT — don't robotically move to the next category. The best specs come from following interesting threads.
56
78
 
@@ -140,11 +162,12 @@ If any check fails, print what's missing and use AskUserQuestion:
140
162
 
141
163
  ### Write PRD
142
164
 
143
- Write `PRD.md` to the project root with this EXACT structure:
165
+ Write the PRD to `.planning/prds/{slug}.md` (create `.planning/prds/` directory first if it doesn't exist) with this EXACT structure:
144
166
 
145
167
  ```markdown
146
168
  # [Milestone Name] — Specification
147
169
 
170
+ **Milestone:** [full milestone name, e.g., "v3: Dashboard Analytics"]
148
171
  **Status:** Ready for execution
149
172
  **Branch:** feat/[milestone-slug]
150
173
  **Created:** [today's date]
@@ -233,21 +256,25 @@ Write `PRD.md` to the project root with this EXACT structure:
233
256
 
234
257
  ## Phase 4 — Post-PRD Updates
235
258
 
236
- After writing PRD.md:
259
+ After writing the PRD to `.planning/prds/{slug}.md`:
237
260
 
238
261
  1. **Update ROADMAP.md:** Add phase breakdown under the current milestone section. Each phase gets a row in the progress table with status "Pending".
239
262
 
240
- 2. **Update STATE.md:** Set current phase to "Phase 1 — ready for `/flow:go`". Update "Next Actions" to reference the first phase.
263
+ 2. **Update STATE.md** (current milestone only):
264
+ - Set current phase to "Phase 1 — ready for `/flow:go`"
265
+ - Set "Active PRD" to `.planning/prds/{slug}.md`
266
+ - Update "Next Actions" to reference the first phase
267
+ - **Skip this step if speccing a future milestone** — STATE.md stays pointing at the current milestone. Print: "PRD written to `.planning/prds/{slug}.md`. STATE.md not updated (future milestone)."
241
268
 
242
269
  3. **Generate Phase 1 handoff prompt:**
243
270
  ```
244
- Phase 1: [Name] — [short description]. Read STATE.md, ROADMAP.md, and PRD.md.
271
+ Phase 1: [Name] — [short description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md.
245
272
  [One sentence of context about what Phase 1 builds].
246
273
  ```
247
274
 
248
275
  4. Print the handoff prompt in a fenced code block.
249
276
 
250
- 5. Print: "PRD ready. Run `/flow:go` to execute Phase 1, or review PRD.md first."
277
+ 5. Print: "PRD ready at `.planning/prds/{slug}.md`. Run `/flow:go` to execute Phase 1, or review the PRD first."
251
278
 
252
279
  ## Quality Gates
253
280
 
@@ -256,6 +283,7 @@ Before finalizing, self-check the PRD:
256
283
  - [ ] Every user story has checkbox acceptance criteria that are testable
257
284
  - [ ] Every phase has verification commands
258
285
  - [ ] "Key Existing Code" section references actual files/functions found in the codebase scan
286
+ - [ ] PRD is written to `.planning/prds/{slug}.md`, NOT to root `PRD.md`
259
287
  - [ ] No phase has more than 5 agents in a single wave (too many = coordination overhead)
260
288
  - [ ] Sacred code section is populated (even if empty with "None identified")
261
289
 
@@ -13,7 +13,9 @@ You are executing the `/flow:status` skill. This is a READ-ONLY operation. Do NO
13
13
  Read ALL of the following in parallel:
14
14
  - `.planning/STATE.md`
15
15
  - `.planning/ROADMAP.md`
16
- - `PRD.md` (if exists)
16
+ - List `.planning/prds/` directory for all PRD files (if directory exists)
17
+ - Also check for legacy `PRD.md` at project root (backward compat)
18
+ - Read the active PRD (from STATE.md "Active PRD" field) to get phase details
17
19
  - Count lessons in `tasks/lessons.md` (if exists)
18
20
 
19
21
  IF both STATE.md AND ROADMAP.md are missing:
@@ -36,12 +38,12 @@ RULE: Determine the next action from ROADMAP.md phase statuses, NOT from STATE.m
36
38
 
37
39
  Use this explicit decision tree:
38
40
 
39
- **IF pending phases exist in ROADMAP AND PRD.md exists:**
41
+ **IF pending phases exist in ROADMAP AND a PRD exists for the current milestone (in `.planning/prds/` or legacy root):**
40
42
  → Primary: `/flow:go` to execute Phase [N]: [name]
41
43
  → Alt: `/flow:done` if wrapping up the session
42
44
  → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
43
45
 
44
- **IF pending phases exist in ROADMAP BUT PRD.md is missing:**
46
+ **IF pending phases exist in ROADMAP BUT no PRD exists for the current milestone:**
45
47
  → Primary: `/flow:spec` to create the execution plan
46
48
  → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
47
49
 
@@ -66,9 +68,18 @@ Last session: [date] — [what was built]
66
68
  Next: Phase [N] — [name] ([short description])
67
69
  Lessons: [N]/10 active
68
70
 
71
+ PRDs:
72
+ * {slug}.md (active — current milestone)
73
+ [For each additional PRD in .planning/prds/:]
74
+ * {slug}.md (ready — future milestone)
75
+ [If legacy PRD.md at root:]
76
+ * PRD.md (legacy — at project root)
77
+
69
78
  [routing recommendations from Step 3]
70
79
  ```
71
80
 
81
+ The PRDs section shows all PRD files found. Mark the one matching STATE.md's "Active PRD" as "(active — current milestone)". Mark others as "(ready — future milestone)". If a legacy root `PRD.md` exists, show it as "(legacy — at project root)". Omit the PRDs section entirely if no PRD files exist anywhere.
82
+
72
83
  Adapt the block based on available information. If STATE.md is missing, omit "Last session". If ROADMAP.md is missing, omit phase counts and say "Run /flow:setup to set up tracking."
73
84
 
74
85
  ## Step 5 — No File Writes
@@ -20,7 +20,7 @@ Read ALL of the following in parallel. If any file is missing, skip it gracefull
20
20
  - `.planning/ROADMAP.md`
21
21
  - `CLAUDE.md`
22
22
  - `tasks/lessons.md`
23
- - `PRD.md`
23
+ - Active PRD from `.planning/prds/` (if STATE.md "Active PRD" field exists, use that path; else check for legacy `PRD.md` at root)
24
24
 
25
25
  If no `.planning/` directory exists, print:
26
26
  > No `.planning/` directory found — running standalone. Task will still be executed, verified, and committed.
@@ -98,7 +98,7 @@ IF `.planning/STATE.md` exists:
98
98
 
99
99
  RULES:
100
100
  - DO NOT update ROADMAP.md — tasks are not milestone phases.
101
- - DO NOT update PRD.md — tasks are not part of the spec.
101
+ - DO NOT update any PRD files in `.planning/prds/` — tasks are not part of the spec.
102
102
  - DO NOT create `.planning/` if it doesn't exist.
103
103
 
104
104
  Quick lessons prompt via AskUserQuestion:
@@ -9,10 +9,10 @@
9
9
  1. Read this file (CLAUDE.md)
10
10
  2. Read `.planning/STATE.md` for current status
11
11
  3. Read `.planning/ROADMAP.md` for milestone progress
12
- 4. Read `PRD.md` for current execution spec (if one exists)
12
+ 4. Read active PRD from `.planning/prds/` for current milestone (if one exists)
13
13
 
14
14
  ## Execution Rules
15
- - **Plan before building.** For non-trivial work, read the PRD phase section before touching anything.
15
+ - **Plan before building.** For non-trivial work, read the milestone's PRD in `.planning/prds/` before touching anything.
16
16
  - **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
17
17
  - **Verify everything.** Run {{VERIFY_COMMANDS}} after agent work lands. Nothing is done until proven.
18
18
 
@@ -4,6 +4,7 @@
4
4
  - **Milestone:** {{FIRST_MILESTONE}} (v1)
5
5
  - **Phase:** Not started — run `/flow:spec` to build PRD
6
6
  - **Branch:** main
7
+ - **Active PRD:** None — run `/flow:spec` to create
7
8
  - **Last Session:** {{DATE}}
8
9
 
9
10
  ## Milestone Progress