flow-cc 0.7.1 → 0.8.1

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.
@@ -1,198 +1,116 @@
1
1
  ---
2
2
  name: flow:spec
3
- description: Spec interview that produces an executable PRD with wave-based phases and testable acceptance criteria
3
+ description: Spec interview that produces an executable PRD with wave-based milestones and testable acceptance criteria
4
4
  user_invocable: true
5
5
  ---
6
6
 
7
7
  # /flow:spec — Spec Interview → Executable PRD
8
8
 
9
- You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow system. You will interview the user about their milestone, then produce a detailed PRD that agents can execute without ambiguity.
9
+ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow system. You will interview the user about their project, then produce a detailed PRD that agents can execute without ambiguity.
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 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
-
15
- **Skill boundary:** You are inside the `/flow:*` workflow. NEVER invoke, suggest, or reference skills from other workflow systems (`/lisa:*`, `/gsd:*`, `/superpowers:*`, etc.). Only suggest `/flow:*` commands as next steps. Do NOT use the Skill tool to call any non-flow skill. If the user needs a different workflow, they will invoke it themselves.
13
+ **Constraints:** Do NOT use with plan mode (prevents file writes). Only use `/flow:*` commandsnever invoke `/lisa:*`, `/gsd:*`, `/superpowers:*` or other skills.
16
14
 
17
15
  ## Phase 1 — Context Gathering
18
16
 
19
- 1. Read `.planning/STATE.md` and `.planning/ROADMAP.md` — understand current milestone and what's done
20
- 2. Read `CLAUDE.md` understand project rules and tech stack
21
- 3. Check for existing PRD:
22
- - List `.planning/prds/` directory (if it exists) for existing PRD files
23
- - Also check for legacy `PRD.md` at project root (backward compat)
24
- - If a PRD exists for the target milestone, note it for resume/extend flow
25
- 4. **Milestone Targeting** — determine which milestone this PRD targets before scanning the codebase:
26
-
27
- 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.
17
+ 1. Read `.planning/STATE.md`, `.planning/ROADMAP.md`, `CLAUDE.md`
18
+ 2. Check for existing PRD in `.planning/prds/` (or legacy root `PRD.md`)
19
+ 3. **Project Targeting:**
28
20
 
29
- 2. **If no argument** — read ROADMAP.md and list all incomplete milestones. Use AskUserQuestion to let the user pick which milestone to spec. Pre-select the next unspecced milestone as the first option. Always show the picker, even if only one milestone is listed — the user may want to confirm or choose "Other" to define a new milestone first.
21
+ 1. **If argument provided** (e.g., `/flow:spec v3: Payments`) match against ROADMAP.md projects. If no match, print available projects and ask.
30
22
 
31
- 3. **Derive the PRD slug:** Take the milestone name (e.g., "Dashboard Analytics"), lowercase it, replace spaces and special characters with hyphens, collapse consecutive hyphens. Result: `dashboard-analytics`. The PRD path is `.planning/prds/{slug}.md`.
23
+ 2. **If no argument** list incomplete projects from ROADMAP.md. Use AskUserQuestion to let the user pick. Pre-select the next unspecced project. Always show the picker.
32
24
 
33
- 4. **Check for existing PRD at that path:**
34
- - **If PRD exists** → Use AskUserQuestion: "A PRD already exists for this milestone at `.planning/prds/{slug}.md`. What would you like to do?"
35
- - "Resume editing" — load the existing PRD and continue the interview from where it left off
36
- - "Start fresh" — delete the existing PRD and start a new interview
37
- - "Pick a different milestone" — show available milestones
38
- - **If no PRD exists** → Proceed with a fresh interview
25
+ 3. **Derive PRD slug:** Lowercase project name, replace spaces/special chars with hyphens, collapse consecutive hyphens. PRD path: `.planning/prds/{slug}.md`.
39
26
 
40
- 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."
27
+ 4. **If PRD exists at that path** AskUserQuestion: "A PRD already exists at `.planning/prds/{slug}.md`. What would you like to do?" Options: "Resume editing", "Start fresh", "Pick a different project".
28
+ **If no PRD** → fresh interview.
41
29
 
42
- 5. **Codebase scan** (brownfield projects) spawn **3 parallel Explore subagents** via the Task tool to scan the codebase without consuming main context:
30
+ 5. **Future project detection:** If target project != STATE.md current project, note it STATE.md won't be updated. Print: "Speccing future project [name]. STATE.md will not be updated."
43
31
 
44
- | Agent | Focus | Looks For |
45
- |-------|-------|-----------|
46
- | **Structure & Config** | Project skeleton, build tooling | `package.json`, `tsconfig`, config files, entry points, CI/CD, env setup |
47
- | **UI, Pages & Routes** | Components, pages, routing | `components/`, `pages/`, `app/`, route definitions, layouts, navigation |
48
- | **Data Layer & APIs** | Database, APIs, types | `api/`, `models/`, `types/`, `schemas/`, ORM definitions, query functions |
32
+ 4. **Codebase scan** (brownfield) spawn **3 parallel Explore subagents** via Task tool:
33
+ - **Structure & Config** — project skeleton, build tooling, entry points, CI/CD
34
+ - **UI, Pages & Routes** components, pages, routing, layouts, navigation
35
+ - **Data Layer & APIs** database, APIs, types, schemas, ORM, queries
49
36
 
50
- **Each subagent prompt MUST include:**
51
- - **Exclusions:** NEVER scan `node_modules/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/`, `*.min.js`, `*.map`, `*.lock`
52
- - **Size-adaptive scanning:** If the agent's domain has >200 files, switch to focused mode (entry points, config, and type definitions only)
53
- - **20-file sample cap per agent** (60 total across all 3)
54
- - **15-line summary max** — structured as: key files found, patterns observed, reusable code/components, notes
55
- - **Explicit instruction:** Do NOT return raw file contents — return only structured summaries
37
+ All agents: exclude `node_modules/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/`, `*.min.js`, `*.map`, `*.lock`. If domain has >200 files, switch to focused mode (entry points, config, types only). 20-file cap per agent. Return 15-line structured summary only — no raw file contents.
56
38
 
57
- 6. **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."
39
+ 5. **Assemble summaries:** Collect 3 agent summaries (~45 lines total). Print: "Here's what I found in the codebase: [key components, patterns, data layer]. Starting the spec interview."
58
40
 
59
41
  ## Phase 2 — Adaptive Interview
60
42
 
61
- ### CRITICAL RULES (follow these exactly)
43
+ ### Critical Rules
44
+
45
+ 1. **USE AskUserQuestion FOR ALL QUESTIONS.** Provide 2-4 concrete options per question based on Phase 1 context.
46
+ 2. **ASK NON-OBVIOUS QUESTIONS.** Probe deeper — edge cases, failure modes, downstream effects, minimum viable versions. Don't ask what you can infer from the codebase.
47
+ 3. **CONTINUE UNTIL THE USER SAYS STOP.** A thorough interview is 15-30 questions. After each answer, immediately ask the next question.
48
+ 4. **MAINTAIN A RUNNING DRAFT.** Every 2-3 questions, update `.planning/prds/{slug}.md` with what you've learned (create dir if needed). Print: "Updated PRD draft — added [brief summary]."
49
+ 5. **BE ADAPTIVE.** Base next question on previous answer. Follow interesting threads rather than robotically moving through categories.
50
+
51
+ ### First-Principles Mode (optional)
62
52
 
63
- 1. **USE AskUserQuestion FOR ALL QUESTIONS.** Never just print questions as text. Always use the AskUserQuestion tool so the user gets structured prompts with selectable options. Provide 2-4 concrete options per question based on what you learned in Phase 1.
53
+ Trigger: user says "challenge this", "first principles", or "push back". Ask 3-5 challenges first: Why build this? Simpler 80% alternative? What assumptions might be wrong? Then proceed to coverage areas.
64
54
 
65
- 2. **ASK NON-OBVIOUS QUESTIONS.** Don't just ask "what features do you want?" — you already read the codebase. Ask questions that PROBE deeper:
66
- - "I see you have [existing pattern]. Should we extend that or build a new approach?"
67
- - "What happens when [edge case] occurs?"
68
- - "You mentioned [X] — does that mean [Y] is also needed, or is that separate?"
69
- - "What's the failure mode here? What does the user see when things go wrong?"
70
- - "Who else touches this data/workflow? Any downstream effects?"
71
- - "What's the minimum version of this that would be useful?"
55
+ ### Coverage Areas
72
56
 
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.
57
+ Cover these fluidly no rigid rounds. Circle back when later answers reveal new info.
74
58
 
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.
59
+ **1. Scope Definition** What's in/out of scope? MVP vs full vision? Sacred code?
76
60
 
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.
61
+ **2. User Stories (CRITICAL most time here)**Walk through key workflows step by step.
62
+ - **Story-splitting:** If a story has >3-4 acceptance criteria, split it. Each story independently deliverable.
63
+ - **Anti-vagueness:** BAD: "Works correctly", "Is fast". GOOD: "Returns 200 with JSON body", "Page renders in <200ms on 3G". Push back on vague criteria: "How would you specifically test that?"
64
+ - **Verification per story:** Each must have at least one concrete verification step.
78
65
 
79
- ### First-Principles Mode (optional)
66
+ **3. Technical Design** — DB changes, API endpoints, new/modified files, reusable code, data flow, parallelization opportunities.
80
67
 
81
- If the user says "challenge this", "first principles", or "push back" start with 3-5 challenge questions before detailed spec gathering:
82
- - "Why build this at all? What's the cost of NOT building it?"
83
- - "Is there a simpler way to achieve 80% of this value?"
84
- - "What assumptions are we making that might be wrong?"
85
- - "Who is this really for, and have they asked for it?"
86
- - "What would you cut if you had half the time?"
68
+ **4. User Experience** Key flows, edge cases (empty/error/loading states), accessibility, responsive behavior.
87
69
 
88
- Then proceed to the coverage areas below.
70
+ **5. Trade-offs & Constraints** Performance vs simplicity, security, third-party deps, acceptable tech debt.
89
71
 
90
- ### Coverage Areas
72
+ **6. Implementation Milestones** — Sequential breakdown, parallelization within milestones, critical path, cuttable milestones.
73
+ - **Assignability check:** Probe which milestones could go to a second developer. Evaluate dependency chains, domain independence, context requirements. Add assignability notes per milestone.
91
74
 
92
- Cover these areas thoroughly. There are no "rounds"move fluidly between areas based on the conversation. Circle back to earlier areas when later answers reveal new information.
93
-
94
- **1. Scope Definition**
95
- - What features are IN scope for this milestone? What's the MVP vs. the full vision?
96
- - What is explicitly OUT of scope / deferred to a future milestone?
97
- - Is there any code that is sacred (must NOT be touched)? Why?
98
- - What existing code/features should we ignore entirely (not break, not improve, not touch)?
99
-
100
- **2. User Stories (CRITICAL — spend the most time here)**
101
- - What does the user actually DO? Walk through the key workflows step by step.
102
- - What should they see at each step? What feedback do they get?
103
- - Frame as: "As [role], I want [action], so that [outcome]"
104
- - **Story-splitting:** If a story has more than 3-4 acceptance criteria, split it into smaller stories. Each story should be independently deliverable.
105
- - **Anti-vagueness enforcement:**
106
- - BAD acceptance criteria: "Works correctly", "Is fast", "Handles errors well", "Looks good"
107
- - GOOD acceptance criteria: "Returns 200 with JSON body for valid input", "Shows error toast with message for invalid email format", "Page renders in < 200ms on 3G", "Matches Figma comp within 4px"
108
- - If the user gives vague criteria, push back: "How would you specifically test that? What would you check?"
109
- - **Verification per story:** Each story must have at least one concrete verification step (a command to run, a page to visit, a state to check)
110
-
111
- **3. Technical Design**
112
- - What database changes are needed? (new tables, columns, indexes, migrations)
113
- - What API endpoints? (method, path, request/response shape, auth requirements)
114
- - What new files need to be created? What existing files get modified?
115
- - What existing utilities/components/DAL queries should be reused (not rebuilt)?
116
- - What's the data flow? Where does data originate, transform, and render?
117
- - Any wave-parallelization opportunities? (independent agents building separate files)
118
-
119
- **4. User Experience**
120
- - What are the key user flows? Walk through click-by-click.
121
- - What edge cases exist? (empty states, error states, loading states, partial data)
122
- - Accessibility requirements? (keyboard navigation, screen readers, ARIA labels)
123
- - Mobile/responsive behavior? (breakpoints, touch targets, layout shifts)
124
- - What does the user see while waiting? (loading spinners, skeletons, optimistic updates)
125
-
126
- **5. Trade-offs & Constraints**
127
- - Performance vs. simplicity? What's good enough for v1?
128
- - Any security considerations? (auth, data access, input validation)
129
- - Any third-party dependencies or integrations?
130
- - What technical debt is acceptable for now vs. must be done right?
131
- - Any browser/device support requirements?
132
-
133
- **6. Implementation Phases**
134
- - How should this break into sequential phases?
135
- - What can be parallelized within each phase? (wave-based agent structure)
136
- - What's the critical path — what must be built first?
137
- - What's the minimum viable first phase? (what gives us something testable fastest?)
138
- - Any phases that could be cut if time runs short?
139
- - **Assignability check:** After defining phases, probe which are independent enough for a different developer:
140
- - "Which of these phases could a second developer work on independently?"
141
- - Evaluate each phase for: dependency chains (does it need output from another phase?), domain independence (is it a separate concern?), context requirements (does it need deep codebase familiarity?), onboarding suitability (could a newer dev handle it?)
142
- - Add assignability notes to each phase, e.g., "Phase 3 is independent — good for either dev" or "Phase 2 depends on Phase 1 — same dev"
143
-
144
- **7. Verification & Feedback Loops**
145
- - What commands verify the build works? (`tsc`, `biome`, test suite)
146
- - What does "done" look like for each phase? How do we know it worked?
147
- - Are there integration points that need end-to-end testing?
148
- - What should we check after each phase before moving to the next?
149
- - Any monitoring or logging needed to confirm production behavior?
150
-
151
- **User signals done:** If the user says "done", "finalize", "that's enough", "ship it", or similar — immediately stop interviewing and go to Phase 3. Finalize the PRD with whatever depth has been achieved.
75
+ **7. Verification & Feedback Loops**Build verification commands, per-milestone "done" criteria, integration testing, monitoring.
76
+
77
+ **User signals done:** If user says "done"/"finalize"/"ship it" — immediately go to Phase 3.
152
78
 
153
79
  ## Phase 3 — PRD Generation
154
80
 
155
81
  ### Minimum Viable PRD Check
156
82
 
157
- Before generating the final PRD, validate:
158
- - At least **3 user stories** with acceptance criteria have been discussed
159
- - At least **1 implementation phase** has been defined
160
- - At least **1 verification command** has been specified
161
-
162
- If any check fails, print what's missing and use AskUserQuestion:
163
- - "The PRD is thin — [missing items]. Want to continue the interview to flesh it out, or finalize as-is?"
164
- - "Continue interview" — return to Phase 2 and probe the missing areas
165
- - "Finalize as-is" — proceed with what we have
83
+ Validate: at least **3 user stories** with acceptance criteria, **1 milestone**, **1 verification command**. If missing, AskUserQuestion: "Continue interview" or "Finalize as-is".
166
84
 
167
85
  ### Write PRD
168
86
 
169
- Write the PRD to `.planning/prds/{slug}.md` (create `.planning/prds/` directory first if it doesn't exist) with this EXACT structure:
87
+ Write to `.planning/prds/{slug}.md` (create dir if needed) with this structure:
170
88
 
171
89
  ```markdown
172
- # [Milestone Name] — Specification
90
+ # [Project Name] — Specification
173
91
 
174
- **Milestone:** [full milestone name, e.g., "Dashboard Analytics"]
92
+ **Project:** [name]
175
93
  **Status:** Ready for execution
176
- **Branch:** feat/{milestone-slug}
177
- **Created:** [today's date]
178
- **Assigned To:** [developer name or "unassigned"]
94
+ **Branch:** feat/{project-slug}
95
+ **Created:** [date]
96
+ **Assigned To:** [developer or "unassigned"]
179
97
 
180
98
  ## Overview
181
- [One paragraph summary of the milestone]
99
+ [One paragraph summary]
182
100
 
183
101
  ## Problem Statement
184
- [Why this work exists — what problem does it solve?]
102
+ [Why this work exists]
185
103
 
186
104
  ## Scope
187
105
 
188
106
  ### In Scope
189
- - [Bullet list of what ships in this milestone]
107
+ - [items]
190
108
 
191
109
  ### Out of Scope
192
- - [Explicitly deferred items]
110
+ - [deferred items]
193
111
 
194
112
  ### Sacred / Do NOT Touch
195
- - [Code paths that must not be modified, with reasons]
113
+ - [protected code paths with reasons]
196
114
 
197
115
  ## User Stories
198
116
 
@@ -200,106 +118,67 @@ Write the PRD to `.planning/prds/{slug}.md` (create `.planning/prds/` directory
200
118
  **Description:** As [role], I want [action], so that [outcome].
201
119
  **Acceptance Criteria:**
202
120
  - [ ] Specific, testable requirement (names actual functions/components)
203
- - [ ] Another requirement
204
121
  - [ ] [Verification command] passes
205
122
 
206
- ### US-2: [Feature Name]
207
- ...
123
+ (Continue US-2, US-3, etc.)
208
124
 
209
125
  ## Technical Design
210
126
 
211
- ### New Database Tables
212
- [SQL DDL or schema description, with indexes]
127
+ Subsections: New Database Tables, New API Endpoints, New Files to Create (grouped by milestone), Existing Files to Modify, Key Existing Code (DO NOT recreate — use as-is).
213
128
 
214
- ### New API Endpoints
215
- [Method + path + request/response shape for each]
129
+ ## Implementation Milestones
216
130
 
217
- ### New Files to Create
218
- [Grouped by phase. Absolute paths with one-line descriptions]
219
-
220
- ### Existing Files to Modify
221
- [Paths + what changes in each]
131
+ ### Milestone 1: [Name]
132
+ **Assigned To:** [developer or "unassigned"]
133
+ **Goal:** [One sentence]
222
134
 
223
- ### Key Existing Code (DO NOT recreate — use as-is)
224
- [Functions, utilities, DAL queries, components that agents should import/reuse]
135
+ **Wave 1 [Theme] (N agents parallel):**
136
+ 1. agent-name: Creates/modifies files [what it does]
137
+ 2. agent-name: Creates/modifies files — [what changes]
225
138
 
226
- ## Implementation Phases
139
+ (Continue waves as needed)
227
140
 
228
- ### Phase 1: [Name]
229
- **Assigned To:** [developer name or "unassigned"]
230
- **Goal:** [One sentence]
141
+ **Verification:** [Exact commands]
142
+ **Acceptance:** [Which US criteria this covers]
231
143
 
232
- **Wave 1 [Theme] (N agents parallel):**
233
- 1. agent-name: Creates file1.ts, file2.ts — [what it does]
234
- 2. agent-name: Modifies file3.ts — [what changes]
235
-
236
- **Wave 2 — [Theme] (N agents parallel):**
237
- 3. agent-name: Creates file4.ts — [what it does]
238
- 4. agent-name: Wires component into page — [specifics]
239
-
240
- **Wave 3 — Integration:**
241
- 5. Integration check, responsive verification, cleanup
242
-
243
- **Verification:** [Exact commands to run]
244
- **Acceptance:** US-1 criteria [list which], US-2 criteria [list which]
245
-
246
- ### Phase 2: [Name]
247
- **Assigned To:** [developer name or "unassigned"]
248
- ...
249
-
250
- ## Execution Rules
251
- 1. DELEGATE EVERYTHING. Lead context is sacred — do not read implementation files into it.
252
- 2. Verify after every phase: [verification commands from CLAUDE.md]
253
- 3. Atomic commits after each agent's work lands
254
- 4. Never `git add .` — stage specific files only
255
- 5. Read `tasks/lessons.md` before spawning agents — inject relevant lessons into agent prompts
256
-
257
- ## Definition of Done
258
- - [ ] All user story acceptance criteria pass
259
- - [ ] All phases verified with [verification commands]
260
- - [ ] Branch pushed and PR opened
261
- - [ ] STATE.md and ROADMAP.md updated
144
+ (Continue Milestone 2, etc.)
262
145
  ```
263
146
 
264
147
  ## Phase 4 — Post-PRD Updates
265
148
 
266
- After writing the PRD to `.planning/prds/{slug}.md`:
149
+ After writing the PRD:
267
150
 
268
- 1. **Update ROADMAP.md:** Add phase breakdown under the current milestone section. Each phase gets a row in the progress table with status "Pending".
151
+ 1. **Update ROADMAP.md:** Add milestone breakdown under the project section. Each milestone gets status "Pending".
269
152
 
270
- 2. **Update STATE.md** (current milestone only):
271
- - Set current phase to "Phase 1 — ready for `/flow:go`"
272
- - Set "Active PRD" to `.planning/prds/{slug}.md`
273
- - Update "Next Actions" to reference the first phase
274
- - **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)."
153
+ 2. **Update STATE.md** (current project only): Set milestone to "Milestone 1 — ready for `/flow:go`", set "Active PRD" path, update "Next Actions". **Skip if speccing a future project** — print: "PRD written. STATE.md not updated (future project)."
275
154
 
276
- 3. **Generate Phase 1 handoff prompt:**
155
+ 3. **Generate Milestone 1 handoff prompt:**
277
156
  ```
278
- Phase 1: [Name] — [short description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md.
279
- [One sentence of context about what Phase 1 builds].
157
+ Milestone 1: [Name] — [description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md.
158
+ [One sentence of context].
280
159
  ```
281
160
 
282
- 4. **Linear Issue Creation (optional):**
283
- - Check if Linear MCP tools are available (try `mcp__linear__list_teams`)
284
- - If available: search for a Linear project matching the milestone name (`mcp__linear__list_projects` with query)
285
- - If found: create one Linear issue per phase under that project using `mcp__linear__create_issue`, with title "Phase N: [Name]" and description from PRD phase section. Set team to "Monument Square".
286
- - If not found: use AskUserQuestion to ask user to pick a project or skip Linear integration
287
- - If Linear MCP not available: skip silently (no error message)
288
- - Print count: "[N] Linear issues created under project [name]" (or "Linear integration skipped" if not available)
161
+ 4. **Linear Integration (optional):**
162
+ - Check if Linear MCP tools are available (`mcp__linear__list_teams`)
163
+ - If available: search for matching Linear project (`mcp__linear__list_projects`)
164
+ - Found: create one **Linear milestone** per implementation milestone, one **Linear issue** per user story/task (not per milestone)
165
+ - Not found: AskUserQuestion to pick project or skip
166
+ - If MCP unavailable: skip silently
167
+ - Print: "[N] milestones + [M] issues created under project [name]"
289
168
 
290
- 5. Print the handoff prompt in a fenced code block.
169
+ 5. Print handoff prompt in a fenced code block.
291
170
 
292
- 6. Print: "PRD ready at `.planning/prds/{slug}.md`. Run `/flow:go` to execute Phase 1, or review the PRD first."
171
+ 6. Print: "PRD ready at `.planning/prds/{slug}.md`. Run `/flow:go` to execute Milestone 1, or review the PRD first."
293
172
 
294
173
  ## Quality Gates
295
174
 
296
- Before finalizing, self-check the PRD:
297
- - [ ] Every phase has wave-based agent assignments with explicit file lists
175
+ Before finalizing, self-check:
176
+ - [ ] Every milestone has wave-based agent assignments with explicit file lists
298
177
  - [ ] Every user story has checkbox acceptance criteria that are testable
299
- - [ ] Every phase has verification commands
300
- - [ ] "Key Existing Code" section references actual files/functions found in the codebase scan
301
- - [ ] PRD is written to `.planning/prds/{slug}.md`, NOT to root `PRD.md`
302
- - [ ] No phase has more than 5 agents in a single wave (too many = coordination overhead)
303
- - [ ] Sacred code section is populated (even if empty with "None identified")
178
+ - [ ] Every milestone has verification commands
179
+ - [ ] "Key Existing Code" references actual files/functions from the codebase scan
180
+ - [ ] PRD written to `.planning/prds/{slug}.md`, NOT root `PRD.md`
181
+ - [ ] No milestone has >5 agents in a single wave
182
+ - [ ] Sacred code section is populated (even if "None identified")
304
183
 
305
184
  If any gate fails, fix the PRD before presenting it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: flow:status
3
- description: Quick orientation — shows current milestone, phase progress, and next actions
3
+ description: Quick orientation — shows current project, milestone progress, and next actions
4
4
  user_invocable: true
5
5
  ---
6
6
 
@@ -8,19 +8,18 @@ user_invocable: true
8
8
 
9
9
  You are executing the `/flow:status` skill. This is a READ-ONLY operation. Do NOT modify any files.
10
10
 
11
- **Skill boundary:** You are inside the `/flow:*` workflow. NEVER invoke, suggest, or reference skills from other workflow systems (`/lisa:*`, `/gsd:*`, `/superpowers:*`, etc.). Only suggest `/flow:*` commands as next steps. Do NOT use the Skill tool to call any non-flow skill.
11
+ **Skill boundary:** Only use `/flow:*` commands. Never invoke or suggest `/lisa:*`, `/gsd:*`, `/superpowers:*` or any non-flow skill.
12
12
 
13
13
  ## Step 1 — Read Context Files
14
14
 
15
- Read ALL of the following in parallel:
15
+ Read ALL in parallel:
16
16
  - `.planning/STATE.md`
17
17
  - `.planning/ROADMAP.md`
18
- - List `.planning/prds/` directory for all PRD files (if directory exists)
19
- - Also check for legacy `PRD.md` at project root (backward compat)
20
- - Read the active PRD (from STATE.md "Active PRD" field) to get phase details
18
+ - List `.planning/prds/` for all PRD files (or legacy root `PRD.md`)
19
+ - Read the active PRD (from STATE.md "Active PRD" field) for milestone details
21
20
  - Count lessons in `tasks/lessons.md` (if exists)
22
- - `.claude/memory/session.md` (if exists) — personal session state
23
- - Run `git config user.name` to get developer identity
21
+ - `.claude/memory/session.md` (if exists)
22
+ - Run `git config user.name` for developer identity
24
23
 
25
24
  IF both STATE.md AND ROADMAP.md are missing:
26
25
  - Print: "No flow project found. Run `/flow:setup` to set up, or `/flow:task` for a quick standalone fix."
@@ -28,76 +27,61 @@ IF both STATE.md AND ROADMAP.md are missing:
28
27
 
29
28
  IF only one file exists, continue with what's available.
30
29
 
31
- ## Step 2 — Analyze Phase Status
30
+ ## Step 2 — Analyze Milestone Status
32
31
 
33
- Parse ROADMAP.md to determine phase progress:
34
- - Count total phases
35
- - Count phases marked "Complete", "Done", or containing a completion date (e.g., `✓`, `[x]`, `completed`)
36
- - Count phases marked "Pending", "In Progress", or not yet started
37
- - Identify the FIRST phase that is NOT complete — this is the **next phase**
32
+ Parse ROADMAP.md to determine milestone progress:
33
+ - Count total, complete (`Done`/`Complete`/`[x]`/`✓`), and pending/in-progress milestones
34
+ - Identify the FIRST incomplete milestone this is the **next milestone**
38
35
 
39
- RULE: Determine the next action from ROADMAP.md phase statuses, NOT from STATE.md "Next Actions" text. STATE.md may be stale from a previous session. ROADMAP.md is the source of truth for phase progress.
36
+ RULE: Determine next action from ROADMAP.md milestone statuses, NOT from STATE.md "Next Actions" text. STATE.md may be stale. ROADMAP.md is the source of truth.
40
37
 
41
38
  ## Step 3 — Determine Routing
42
39
 
43
- Use this explicit decision tree:
40
+ **IF pending milestones exist AND a PRD exists (in `.planning/prds/` or legacy root):**
41
+ → Primary: `/flow:go` to execute Milestone [N]: [name]
42
+ → Alt: `/flow:done` if wrapping up
43
+ → Alt: `/flow:task` for quick fixes (no PRD needed)
44
44
 
45
- **IF pending phases exist in ROADMAP AND a PRD exists for the current milestone (in `.planning/prds/` or legacy root):**
46
- Primary: `/flow:go` to execute Phase [N]: [name]
47
- Alt: `/flow:done` if wrapping up the session
48
- → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
45
+ **IF pending milestones exist BUT no PRD exists:**
46
+ → `/flow:spec` select a project and build its execution plan
47
+ → `/flow:task` for quick fixes (no PRD needed)
49
48
 
50
- **IF pending phases exist in ROADMAP BUT no PRD exists for the current milestone:**
51
- → `/flow:spec` select a milestone and build its execution plan
52
- → `/flow:task` for quick fixes or cleanup (no PRD needed)
49
+ **IF all milestones complete AND a "Planned" project exists in ROADMAP.md:**
50
+ Primary: `/flow:done` to finalize (will auto-transition to next project)
51
+ Alt: `/flow:task` for quick fixes (no PRD needed)
53
52
 
54
- **IF all phases are complete AND a next milestone with status "Planned" exists in ROADMAP.md:**
55
- → Primary: `/flow:done` to finalize this milestone (will auto-transition to next milestone)
56
- Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
53
+ **IF all milestones complete AND no next project:**
54
+ → Primary: `/flow:done` to finalize
55
+ Then: `/flow:triage` to add the next project
56
+ → Alt: `/flow:task` for quick fixes (no PRD needed)
57
57
 
58
- **IF all phases are complete AND no next milestone exists:**
59
- Primary: `/flow:done` to finalize this milestone
60
- Then: `/flow:triage` to add the next milestone
61
- → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
58
+ **IF no milestones exist in ROADMAP (project defined but not planned):**
59
+ → `/flow:spec` select a project and build its execution plan
60
+ → `/flow:task` for quick fixes (no PRD needed)
62
61
 
63
- **IF no phases exist in ROADMAP (milestone defined but not planned):**
64
- → `/flow:spec` — select a milestone and build its execution plan
65
- → `/flow:task` — for quick fixes or cleanup (no PRD needed)
66
-
67
- **CRITICAL — `/flow:spec` suggestion format:** When printing routing recommendations, output EXACTLY this text for /flow:spec suggestions:
68
- ```
69
- → /flow:spec — select a milestone and build its execution plan
70
- ```
71
- Do NOT append a milestone name, do NOT say "for v16" or "to plan v16" or any variation. The milestone picker inside /flow:spec handles selection. Adding a name here confuses users who may have multiple milestones in flight across terminals. Print the line EXACTLY as shown above — no modifications.
62
+ When suggesting /flow:spec, do NOT append a project name the project picker inside /flow:spec handles selection.
72
63
 
73
64
  ## Step 4 — Print Status Block
74
65
 
75
66
  ```
76
- Milestone: [name] ([X/Y] phases complete)
67
+ Project: [name] ([X/Y] milestones complete)
77
68
  Developer: [git config user.name]
78
- Session: [session.md "Working On" field if session.md exists, or "No active session"]
69
+ Session: [session.md "Working On" field if exists, or "No active session"]
79
70
  Last session: [date] — [what was built]
80
- Next: Phase [N] — [name] ([short description])
71
+ Next: Milestone [N] — [name] ([short description])
81
72
  Lessons: [N]/10 active
82
73
 
83
74
  PRDs:
84
- * {slug}.md (active — current milestone)
85
- [For each additional PRD in .planning/prds/:]
86
- * {slug}.md (ready — future milestone)
87
- [If legacy PRD.md at root:]
75
+ * {slug}.md (active — current project)
76
+ * {slug}.md (ready future project)
88
77
  * PRD.md (legacy — at project root)
89
78
 
90
79
  [routing recommendations from Step 3]
91
80
  ```
92
81
 
93
- 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.
94
-
95
- When listing PRDs, if a PRD has `**Assigned To:**` fields in its phase sections, show assignment status in the PRD listing, e.g.:
96
- ```
97
- * {slug}.md (active — Phase 3 assigned to Matt, Phase 4 unassigned)
98
- ```
82
+ The PRDs section shows all PRD files found. Mark the one matching STATE.md "Active PRD" as "(active — current project)". Mark others as "(ready — future project)". Legacy root `PRD.md` shows as "(legacy — at project root)". Omit PRDs section if no PRD files exist.
99
83
 
100
- 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."
84
+ Adapt the block based on available information. If STATE.md is missing, omit "Last session". If ROADMAP.md is missing, omit milestone counts and say "Run /flow:setup to set up tracking."
101
85
 
102
86
  ## Step 5 — No File Writes
103
87