flow-cc 0.7.1 → 0.8.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 +12 -0
- package/README.md +20 -20
- package/VERSION +1 -1
- package/package.json +1 -1
- package/skills/flow-done.md +79 -45
- package/skills/flow-go.md +53 -40
- package/skills/flow-intro.md +23 -23
- package/skills/flow-setup.md +35 -35
- package/skills/flow-spec.md +58 -54
- package/skills/flow-status.md +30 -30
- package/skills/flow-task.md +2 -2
- package/skills/flow-triage.md +12 -12
- package/templates/CLAUDE.md.template +34 -34
- package/templates/ROADMAP.md.template +4 -4
- package/templates/STATE.md.template +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.8.0] - 2026-02-14
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **BREAKING:** Terminology aligned with Linear hierarchy — "Milestone" → "Project", "Phase" → "Milestone" across all skills, templates, and docs
|
|
12
|
+
- `/flow:go` adds Step 2.5: automatically moves Linear issues to "In Progress" when starting a milestone
|
|
13
|
+
- `/flow:go` Step 7: detects final milestone and routes to `/flow:done` for PR creation
|
|
14
|
+
- `/flow:done` adds Step 5.25: auto-creates PR with `Closes MSIG-XX` body when project is complete
|
|
15
|
+
- `/flow:done` Step 5.5: moves completed issues to "In Review" when PR is detected
|
|
16
|
+
- `/flow:spec` creates Linear **milestones** (not issues) for implementation stages, issues for tasks
|
|
17
|
+
- All templates updated: STATE.md uses "Project:", ROADMAP.md uses "Projects" table
|
|
18
|
+
- DESIGN.md and README.md updated to reflect new terminology
|
|
19
|
+
|
|
8
20
|
## [0.7.1] - 2026-02-14
|
|
9
21
|
|
|
10
22
|
### Fixed
|
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ Claude Code is powerful but unstructured. Without a system, you lose context bet
|
|
|
28
28
|
Flow gives Claude Code a **memory system and execution framework**:
|
|
29
29
|
|
|
30
30
|
- **Spec interviews** extract decisions upfront so agents execute instead of guessing
|
|
31
|
-
- **Per-
|
|
32
|
-
- **Wave-based agent teams** execute
|
|
31
|
+
- **Per-project PRDs** in `.planning/prds/` become execution contracts — spec future projects in parallel
|
|
32
|
+
- **Wave-based agent teams** execute milestones autonomously with built-in verification
|
|
33
33
|
- **Session handoffs** preserve full context across fresh sessions — no more "where was I?"
|
|
34
34
|
- **Lessons compound** — mistakes get captured, refined, and promoted into permanent rules
|
|
35
35
|
|
|
@@ -45,15 +45,15 @@ Flow gives Claude Code a **memory system and execution framework**:
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
1. **`/flow:setup`** — Scaffolds your project with planning docs and execution rules
|
|
48
|
-
2. **`/flow:spec`** — Interviews you, then writes an executable PRD with
|
|
49
|
-
3. **`/flow:go`** — Spawns parallel agent teams to build the next
|
|
48
|
+
2. **`/flow:spec`** — Interviews you, then writes an executable PRD with milestones, acceptance criteria, and agent-team structure
|
|
49
|
+
3. **`/flow:go`** — Spawns parallel agent teams to build the next milestone, verifies, commits
|
|
50
50
|
4. **`/flow:done`** — Updates docs, captures lessons, generates a handoff prompt so the next session starts instantly
|
|
51
51
|
|
|
52
|
-
Run `/flow:go` repeatedly until all
|
|
52
|
+
Run `/flow:go` repeatedly until all milestones are done, then `/flow:done` to wrap up. Next session, paste the handoff prompt and keep going.
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
## Multi-PRD: Parallel
|
|
56
|
+
## Multi-PRD: Parallel Project Planning
|
|
57
57
|
|
|
58
58
|
<table>
|
|
59
59
|
<tr>
|
|
@@ -64,19 +64,19 @@ Run `/flow:go` repeatedly until all phases are done, then `/flow:done` to wrap u
|
|
|
64
64
|
project/
|
|
65
65
|
└── PRD.md ← one at a time
|
|
66
66
|
```
|
|
67
|
-
Finish or archive the current
|
|
67
|
+
Finish or archive the current project before speccing the next. Serial bottleneck on large roadmaps.
|
|
68
68
|
|
|
69
69
|
</td>
|
|
70
70
|
<td width="50%">
|
|
71
71
|
|
|
72
|
-
**Now (per-
|
|
72
|
+
**Now (per-project PRDs)**
|
|
73
73
|
```
|
|
74
74
|
.planning/prds/
|
|
75
75
|
├── user-auth.md ← active
|
|
76
76
|
├── dashboard.md ← pre-specced
|
|
77
77
|
└── payments.md ← pre-specced
|
|
78
78
|
```
|
|
79
|
-
Spec any
|
|
79
|
+
Spec any project at any time. Execute the current one while planning ahead.
|
|
80
80
|
|
|
81
81
|
</td>
|
|
82
82
|
</tr>
|
|
@@ -84,8 +84,8 @@ Spec any milestone at any time. Execute the current one while planning ahead.
|
|
|
84
84
|
|
|
85
85
|
**How it works:**
|
|
86
86
|
|
|
87
|
-
- `/flow:spec` writes PRDs to `.planning/prds/{slug}.md` — one file per
|
|
88
|
-
- `/flow:spec Payments` targets a specific future
|
|
87
|
+
- `/flow:spec` writes PRDs to `.planning/prds/{slug}.md` — one file per project
|
|
88
|
+
- `/flow:spec Payments` targets a specific future project without changing your current position
|
|
89
89
|
- STATE.md tracks the **Active PRD** field so `/flow:go` always knows which spec to execute
|
|
90
90
|
- Smart resolution: user argument > STATE.md > slug derivation > legacy fallback
|
|
91
91
|
- Existing `PRD.md` at root? Still works — legacy files are consumed transparently and migrated on archive
|
|
@@ -99,8 +99,8 @@ Spec any milestone at any time. Execute the current one while planning ahead.
|
|
|
99
99
|
| Command | When | What it does |
|
|
100
100
|
|---|---|---|
|
|
101
101
|
| `/flow:setup` | Once per project | Creates `.planning/`, CLAUDE.md, templates, full roadmap |
|
|
102
|
-
| `/flow:spec` | Once per
|
|
103
|
-
| `/flow:go` | Once per
|
|
102
|
+
| `/flow:spec` | Once per project | Interview that produces an executable PRD in `.planning/prds/` |
|
|
103
|
+
| `/flow:go` | Once per milestone | Executes the next milestone with wave-based agent teams |
|
|
104
104
|
| `/flow:done` | End of session | Updates docs, captures lessons, generates handoff prompt |
|
|
105
105
|
|
|
106
106
|
### Standalone
|
|
@@ -132,11 +132,11 @@ your-project/
|
|
|
132
132
|
│ └── session.md # Per-developer session state (gitignored)
|
|
133
133
|
├── .planning/
|
|
134
134
|
│ ├── STATE.md # Project-level GPS — shared across developers
|
|
135
|
-
│ ├── ROADMAP.md #
|
|
136
|
-
│ ├── prds/ # Per-
|
|
137
|
-
│ │ ├── user-auth.md # One file per
|
|
138
|
-
│ │ └── dashboard.md # Pre-spec future
|
|
139
|
-
│ └── archive/ # Completed
|
|
135
|
+
│ ├── ROADMAP.md # Project milestones and progress tracking
|
|
136
|
+
│ ├── prds/ # Per-project PRD specs
|
|
137
|
+
│ │ ├── user-auth.md # One file per project
|
|
138
|
+
│ │ └── dashboard.md # Pre-spec future projects anytime
|
|
139
|
+
│ └── archive/ # Completed projects and archived PRDs
|
|
140
140
|
└── tasks/
|
|
141
141
|
└── lessons.md # Active lessons (max 10) → promoted to CLAUDE.md
|
|
142
142
|
```
|
|
@@ -188,7 +188,7 @@ Hard caps prevent context bloat. Total worst-case: ~30 lines of lessons context
|
|
|
188
188
|
Flow supports multiple developers on the same repo without conflicts:
|
|
189
189
|
|
|
190
190
|
- **`session.md`** — Per-developer session state, stored in `.claude/memory/session.md` (gitignored). Each developer has their own session GPS that never conflicts.
|
|
191
|
-
- **`STATE.md`** — Shared project-level state in `.planning/STATE.md`. Updated at
|
|
191
|
+
- **`STATE.md`** — Shared project-level state in `.planning/STATE.md`. Updated at project boundaries only (not every session), so conflicts are rare.
|
|
192
192
|
- **Developer identity** — `/flow:spec` and `/flow:go` track who is working on what. PRDs can be assigned to specific developers (advisory, not blocking).
|
|
193
193
|
- **Template provided** — `session.md.template` scaffolds the per-developer file on first use.
|
|
194
194
|
|
|
@@ -198,7 +198,7 @@ Flow supports multiple developers on the same repo without conflicts:
|
|
|
198
198
|
|
|
199
199
|
Flow optionally integrates with Linear via MCP for issue tracking:
|
|
200
200
|
|
|
201
|
-
- **`/flow:spec`** can create Linear issues automatically from PRD
|
|
201
|
+
- **`/flow:spec`** can create Linear issues automatically from PRD milestones
|
|
202
202
|
- **`/flow:done`** can post progress comments to Linear issues
|
|
203
203
|
- **`/flow:triage`** sorts unstructured brain dumps into categorized Linear issues, ROADMAP entries, and lessons
|
|
204
204
|
- **Branch convention** `feat/msig-{issue#}-desc` auto-links PRs to Linear issues
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.8.0
|
package/package.json
CHANGED
package/skills/flow-done.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow:done
|
|
3
|
-
description: Session-end documentation — updates STATE.md, ROADMAP.md, lessons.md, generates handoff prompt
|
|
3
|
+
description: Session-end documentation — updates STATE.md, ROADMAP.md, lessons.md, generates handoff prompt. Handles project-complete PR creation and Linear status management.
|
|
4
4
|
user_invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ You are executing the `/flow:done` skill. This finalizes the current session by
|
|
|
18
18
|
|
|
19
19
|
Read these files (in parallel where possible):
|
|
20
20
|
- `.planning/STATE.md` — current state
|
|
21
|
-
- `.planning/ROADMAP.md` — milestone
|
|
21
|
+
- `.planning/ROADMAP.md` — project/milestone progress
|
|
22
22
|
- `tasks/lessons.md` — active lessons (max 10)
|
|
23
23
|
- `CLAUDE.md` — project rules
|
|
24
24
|
- Active PRD from `.planning/prds/` (resolve via STATE.md "Active PRD" field, or fall back to legacy `PRD.md` at root)
|
|
@@ -30,27 +30,27 @@ Also gather:
|
|
|
30
30
|
- Run `git config user.name` to get developer identity
|
|
31
31
|
- If uncommitted changes exist, warn the user before proceeding
|
|
32
32
|
|
|
33
|
-
### 2. Update STATE.md (
|
|
33
|
+
### 2. Update STATE.md (Project Boundaries Only)
|
|
34
34
|
|
|
35
|
-
**Determine if a
|
|
35
|
+
**Determine if a project was completed this session** by checking ROADMAP.md progress and commits.
|
|
36
36
|
|
|
37
|
-
**IF
|
|
37
|
+
**IF project completed this session** — REPLACE the entire file (do NOT append). Keep under 80 lines.
|
|
38
38
|
|
|
39
39
|
Structure:
|
|
40
40
|
```
|
|
41
41
|
# [Project Name] — Project State
|
|
42
42
|
|
|
43
43
|
## Current Position
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
44
|
+
- **Project:** [name]
|
|
45
|
+
- **Milestone:** [current milestone status]
|
|
46
46
|
- **Branch:** [current branch]
|
|
47
|
-
- **Active PRD:** [path to active PRD, or "None" if
|
|
47
|
+
- **Active PRD:** [path to active PRD, or "None" if project complete]
|
|
48
48
|
- **Last Session:** [today's date]
|
|
49
49
|
|
|
50
50
|
## Milestone Progress
|
|
51
51
|
|
|
52
|
-
|
|
|
53
|
-
|
|
52
|
+
| Milestone | Name | Status |
|
|
53
|
+
|-----------|------|--------|
|
|
54
54
|
| 1 | [name] | Complete (date) |
|
|
55
55
|
| 2 | [name] | Complete (date) |
|
|
56
56
|
| 3 | [name] | In Progress |
|
|
@@ -64,14 +64,14 @@ Structure:
|
|
|
64
64
|
- [Any architectural or design decisions made]
|
|
65
65
|
|
|
66
66
|
## Next Actions
|
|
67
|
-
1. [Specific next step — usually "Run /flow:go for
|
|
67
|
+
1. [Specific next step — usually "Run /flow:go for Milestone N"]
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
**IF normal session (no
|
|
70
|
+
**IF normal session (no project completed)** — SKIP STATE.md entirely. Print: "Normal session — STATE.md skipped (project boundaries only)."
|
|
71
71
|
|
|
72
72
|
### 2.5. Write session.md (Every Session)
|
|
73
73
|
|
|
74
|
-
This step ALWAYS runs, regardless of whether a
|
|
74
|
+
This step ALWAYS runs, regardless of whether a project was completed.
|
|
75
75
|
|
|
76
76
|
Create `.claude/memory/` directory if it doesn't exist.
|
|
77
77
|
|
|
@@ -83,31 +83,31 @@ Write `.claude/memory/session.md` with the following content:
|
|
|
83
83
|
**Date:** [today's date]
|
|
84
84
|
**Developer:** [git config user.name result]
|
|
85
85
|
**Branch:** [current git branch]
|
|
86
|
-
**Working On:** [Linear issue ID + description if detectable from branch name, or PRD
|
|
86
|
+
**Working On:** [Linear issue ID + description if detectable from branch name, or PRD milestone, or "standalone task"]
|
|
87
87
|
**Status:** [what was accomplished this session — bullet list of key items]
|
|
88
88
|
**Next:** [what to pick up next session]
|
|
89
89
|
**Blockers:** [any blockers, or "None"]
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
### 3. Update ROADMAP.md (
|
|
92
|
+
### 3. Update ROADMAP.md (Project Boundaries Only)
|
|
93
93
|
|
|
94
|
-
**IF
|
|
94
|
+
**IF project completed this session:**
|
|
95
95
|
|
|
96
|
-
- Mark completed
|
|
97
|
-
- Ensure pending
|
|
98
|
-
- **Archive check:** If the current
|
|
96
|
+
- Mark completed milestones with completion date
|
|
97
|
+
- Ensure pending milestones have enough detail that the next session can start with a one-line prompt
|
|
98
|
+
- **Archive check:** If the current project is fully complete:
|
|
99
99
|
- If `.planning/` does not exist, skip archiving entirely — there's nothing to archive
|
|
100
100
|
- Create `.planning/archive/` if it doesn't already exist (use `mkdir -p` or equivalent)
|
|
101
|
-
- Move milestone
|
|
102
|
-
- Keep only the summary row in the ROADMAP
|
|
103
|
-
- Archive the
|
|
101
|
+
- Move project milestone details to `.planning/archive/project-{slug}.md`
|
|
102
|
+
- Keep only the summary row in the ROADMAP project table
|
|
103
|
+
- Archive the project'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-{slug}.md` instead.
|
|
104
104
|
- Clear STATE.md "Active PRD" field (set to "None")
|
|
105
|
-
- Mark the
|
|
106
|
-
- **
|
|
107
|
-
- **If a next
|
|
108
|
-
- **If no next
|
|
105
|
+
- Mark the project as "Complete" in the ROADMAP table
|
|
106
|
+
- **Project transition:** Check ROADMAP.md for the NEXT project with status "Planned":
|
|
107
|
+
- **If a next project exists:** Update its status from "Planned" to "Pending — needs `/flow:spec`". Update STATE.md current project to point to the new project.
|
|
108
|
+
- **If no next project exists:** No transition needed — all planned projects are done.
|
|
109
109
|
|
|
110
|
-
**IF normal session (no
|
|
110
|
+
**IF normal session (no project completed)** — SKIP ROADMAP.md entirely. Print: "Normal session — ROADMAP.md skipped (project boundaries only)."
|
|
111
111
|
|
|
112
112
|
### 4. Update lessons.md
|
|
113
113
|
|
|
@@ -128,46 +128,80 @@ Write `.claude/memory/session.md` with the following content:
|
|
|
128
128
|
|
|
129
129
|
### 5. Commit Doc Updates
|
|
130
130
|
|
|
131
|
-
**Normal session (no
|
|
131
|
+
**Normal session (no project completed):**
|
|
132
132
|
- Only stage `tasks/lessons.md` if it changed
|
|
133
133
|
- Skip STATE.md and ROADMAP.md (they were not modified)
|
|
134
134
|
- Do NOT stage `.claude/memory/session.md` (it is gitignored)
|
|
135
135
|
- If nothing needs staging (no changes to shared docs), skip the commit. Print: "No shared doc changes to commit."
|
|
136
136
|
- Otherwise commit with message: `docs: session-end updates — [brief summary]`
|
|
137
137
|
|
|
138
|
-
**
|
|
138
|
+
**Project boundary session:**
|
|
139
139
|
- Stage STATE.md, ROADMAP.md, lessons.md, and any archived files
|
|
140
140
|
- Do NOT stage `.claude/memory/session.md` (it is gitignored)
|
|
141
141
|
- Commit with message: `docs: session-end updates — [brief summary]`
|
|
142
142
|
|
|
143
143
|
- Do NOT push unless the user asks
|
|
144
144
|
|
|
145
|
-
### 5.
|
|
146
|
-
|
|
147
|
-
- Check if
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
### 5.25. Auto-Create PR (Project Complete Only)
|
|
146
|
+
|
|
147
|
+
- Check if ALL milestones in the PRD are marked "Complete" in ROADMAP.md
|
|
148
|
+
- If all complete AND no PR exists for this branch (`gh pr list --head [branch] --state open` returns empty):
|
|
149
|
+
- Parse the PRD for all Linear issue IDs (e.g., MSIG-34, MSIG-35, ...)
|
|
150
|
+
- Push the branch: `git push -u origin [branch]`
|
|
151
|
+
- Auto-generate PR body:
|
|
152
|
+
```
|
|
153
|
+
## Summary
|
|
154
|
+
[Project name] — [one-line description from PRD overview]
|
|
155
|
+
|
|
156
|
+
## Milestones Completed
|
|
157
|
+
- Milestone 1: [Name] (completed [date])
|
|
158
|
+
- Milestone 2: [Name] (completed [date])
|
|
159
|
+
...
|
|
160
|
+
|
|
161
|
+
## Linear Issues
|
|
162
|
+
Closes MSIG-34, Closes MSIG-35, Closes MSIG-36, ...
|
|
163
|
+
[one "Closes MSIG-XX" per issue found in PRD]
|
|
164
|
+
|
|
165
|
+
## Verification
|
|
166
|
+
- `npx tsc --noEmit` — passed
|
|
167
|
+
- `npx biome check` — passed
|
|
168
|
+
```
|
|
169
|
+
- Create PR: `gh pr create --title "[project name]" --body "[auto-generated body]"`
|
|
170
|
+
- Print: "PR created: [PR URL]"
|
|
171
|
+
- Print: "Linear: [N] issues will auto-close on merge"
|
|
172
|
+
- If milestones remain OR PR already exists: skip silently
|
|
173
|
+
|
|
174
|
+
### 5.5. Linear Status Update + Progress Comment
|
|
175
|
+
|
|
176
|
+
- Check if Linear MCP tools are available
|
|
177
|
+
- If available:
|
|
178
|
+
- Parse the active PRD for `**Linear Project:**` field
|
|
179
|
+
- If found:
|
|
180
|
+
- Check for open PR: `gh pr list --head [branch] --state open`
|
|
181
|
+
- If PR exists:
|
|
182
|
+
- Find all issues in the Linear project that are "In Progress"
|
|
183
|
+
- Move them to "In Review": `mcp__linear__update_issue` with `state: "In Review"`
|
|
184
|
+
- Print: "Linear: [N] issues → In Review (PR open)"
|
|
185
|
+
- If no PR: issues stay In Progress (normal mid-project session end)
|
|
186
|
+
- Post progress comment on any branch-linked Linear issue (existing behavior)
|
|
187
|
+
- If not available: skip silently
|
|
154
188
|
|
|
155
189
|
### 6. Generate Handoff Prompt
|
|
156
190
|
|
|
157
191
|
Determine the next action and generate a copyable handoff prompt. Include the developer name in the prompt.
|
|
158
192
|
|
|
159
|
-
- If next
|
|
193
|
+
- If next milestone exists in PRD:
|
|
160
194
|
```
|
|
161
|
-
[Developer Name] —
|
|
195
|
+
[Developer Name] — Milestone [N]: [Name] — [short description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md (US-X).
|
|
162
196
|
[One sentence of context]. [One sentence of what NOT to do if relevant].
|
|
163
197
|
```
|
|
164
|
-
- If
|
|
198
|
+
- If project is complete AND a next project was transitioned to (from Step 3):
|
|
165
199
|
```
|
|
166
|
-
[Developer Name] —
|
|
200
|
+
[Developer Name] — Project [name] complete. Next: [next project name]. Run /flow:spec to plan it.
|
|
167
201
|
```
|
|
168
|
-
- If
|
|
202
|
+
- If project is complete AND no next project exists:
|
|
169
203
|
```
|
|
170
|
-
[Developer Name] — All
|
|
204
|
+
[Developer Name] — All projects complete! Run /flow:triage to plan what's next, or enjoy the win.
|
|
171
205
|
```
|
|
172
206
|
|
|
173
207
|
Print the handoff prompt in a fenced code block so the user can copy it.
|
|
@@ -177,7 +211,7 @@ Print the handoff prompt in a fenced code block so the user can copy it.
|
|
|
177
211
|
```
|
|
178
212
|
Session complete.
|
|
179
213
|
- STATE.md: [updated | skipped (normal session)]
|
|
180
|
-
- ROADMAP.md: [N
|
|
214
|
+
- ROADMAP.md: [N milestones marked complete | skipped (normal session)]
|
|
181
215
|
- session.md: updated
|
|
182
216
|
- lessons.md: [N]/10 active, [N] promoted to CLAUDE.md
|
|
183
217
|
- Committed: [SHA | nothing to commit]
|
package/skills/flow-go.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow:go
|
|
3
|
-
description: Execute the next
|
|
3
|
+
description: Execute the next milestone from PRD using wave-based agent teams
|
|
4
4
|
user_invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /flow:go — Execute Next
|
|
7
|
+
# /flow:go — Execute Next Milestone
|
|
8
8
|
|
|
9
|
-
You are executing the `/flow:go` skill. This reads the PRD, identifies the next unstarted
|
|
9
|
+
You are executing the `/flow:go` skill. This reads the PRD, identifies the next unstarted milestone, and executes it using wave-based agent teams.
|
|
10
10
|
|
|
11
11
|
**Core principle:** The PRD is the execution contract. You execute what it specifies. Do not freelance.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ You are executing the `/flow:go` skill. This reads the PRD, identifies the next
|
|
|
18
18
|
|
|
19
19
|
Read these files (in parallel):
|
|
20
20
|
- `.planning/STATE.md` — current position
|
|
21
|
-
- `.planning/ROADMAP.md` —
|
|
21
|
+
- `.planning/ROADMAP.md` — milestone progress
|
|
22
22
|
- `tasks/lessons.md` — active lessons (max 10 one-liners)
|
|
23
23
|
- `CLAUDE.md` — execution rules and verification commands
|
|
24
24
|
- `.claude/memory/session.md` (if exists) — personal session state
|
|
@@ -29,50 +29,62 @@ Run `git config user.name` to get developer identity.
|
|
|
29
29
|
|
|
30
30
|
The user must always select which PRD to execute. No silent auto-resolution.
|
|
31
31
|
|
|
32
|
-
1. **If the user passed an argument** (e.g., `/flow:go v3-payments`) — match it against files in `.planning/prds/` by slug or by the `**
|
|
32
|
+
1. **If the user passed an argument** (e.g., `/flow:go v3-payments`) — match it against files in `.planning/prds/` by slug or by the `**Project:**` header field. If an exact match is found, use it directly. If no match, show available PRDs and ask.
|
|
33
33
|
|
|
34
|
-
2. **If no argument** — list all PRD files in `.planning/prds/`. For each PRD, read its `**Status:**` and `**
|
|
34
|
+
2. **If no argument** — list all PRD files in `.planning/prds/`. For each PRD, read its `**Status:**` and `**Project:**` header fields. Use AskUserQuestion to let the user pick which PRD to execute. Pre-select the first PRD with status "Ready for execution" as the first option. Always show the picker, even if only one PRD exists — the user may want to confirm or run `/flow:spec` instead. Also check for legacy `PRD.md` at root (backward compat) and include it in the list if found.
|
|
35
35
|
|
|
36
36
|
3. **No PRDs found** — "No PRDs found in `.planning/prds/`. Run `/flow:spec` first." Stop here.
|
|
37
37
|
|
|
38
|
-
**After selection:** Read the chosen PRD. If its `**
|
|
38
|
+
**After selection:** Read the chosen PRD. If its `**Project:**` doesn't match STATE.md's current project, warn: "PRD project ([PRD project]) doesn't match current project ([STATE project]). Continuing, but verify you're executing the right spec."
|
|
39
39
|
|
|
40
|
-
**Assignment check:** After reading the PRD, check the current
|
|
40
|
+
**Assignment check:** After reading the PRD, check the current milestone section for an `**Assigned To:**` field. If present, compare against the developer identity from `git config user.name`. If assigned to a different developer, print: "⚠ This milestone is assigned to [other dev]. Proceeding anyway — override if intentional." Do NOT block execution — this is advisory only.
|
|
41
41
|
|
|
42
|
-
**Identify the next
|
|
42
|
+
**Identify the next milestone:** Find the first milestone in ROADMAP.md with status "Pending" or the first unstarted milestone in the PRD.
|
|
43
43
|
|
|
44
44
|
## Step 2 — Pre-flight Checks
|
|
45
45
|
|
|
46
46
|
Run these checks before executing. If any fail, stop and tell the user what to do:
|
|
47
47
|
|
|
48
48
|
1. **PRD selected?** If PRD Selection (above) reached step 3 (no PRDs found): stop with the "No PRDs found" message.
|
|
49
|
-
2. **
|
|
49
|
+
2. **Milestone detailed enough?** The milestone section in the PRD must have:
|
|
50
50
|
- Wave structure with agent assignments
|
|
51
51
|
- Explicit file lists per agent
|
|
52
52
|
- Verification commands
|
|
53
|
-
- If missing: "PRD
|
|
53
|
+
- If missing: "PRD milestone section is too vague. Add wave structure + file lists, or run `/flow:spec`."
|
|
54
54
|
3. **Branch check:** Verify you're on the correct feature branch (from PRD header). If not, warn the user.
|
|
55
|
-
4. **All
|
|
55
|
+
4. **All milestones done?** If no pending milestones remain: "All milestones complete! Run `/flow:done` to wrap up."
|
|
56
|
+
|
|
57
|
+
## Step 2.5 — Linear Status: In Progress
|
|
58
|
+
|
|
59
|
+
- Read the PRD header for `**Linear Project:**` field (name or URL)
|
|
60
|
+
- If present and Linear MCP tools are available:
|
|
61
|
+
- Find the Linear project: `mcp__linear__get_project` with query matching project name
|
|
62
|
+
- List milestones: `mcp__linear__list_milestones` for that project
|
|
63
|
+
- Match current milestone name (e.g., "Milestone 2: Infrastructure Fixes") against Linear milestones
|
|
64
|
+
- Find issues assigned to that milestone: `mcp__linear__list_issues` with project + milestone filter
|
|
65
|
+
- For each issue in Backlog or Todo: `mcp__linear__update_issue` with `state: "In Progress"`
|
|
66
|
+
- Print: "Linear: [N] issues → In Progress ([milestone name])"
|
|
67
|
+
- If no Linear Project in PRD header, or MCP not available: skip silently
|
|
56
68
|
|
|
57
69
|
## Step 3 — Staleness Check
|
|
58
70
|
|
|
59
|
-
Compare this
|
|
71
|
+
Compare this milestone's PRD section against the actual codebase:
|
|
60
72
|
- Do the files it references still exist / have the expected structure?
|
|
61
|
-
- Were files created/deleted/significantly changed by prior
|
|
73
|
+
- Were files created/deleted/significantly changed by prior milestones that affect this milestone?
|
|
62
74
|
- If stale references found: fix them in the PRD (update file paths, note structural changes) before proceeding. Print what you corrected.
|
|
63
75
|
|
|
64
|
-
Do NOT rewrite the
|
|
76
|
+
Do NOT rewrite the milestone — just fix stale references so agents get accurate context.
|
|
65
77
|
|
|
66
78
|
## Step 4 — Execute Waves
|
|
67
79
|
|
|
68
|
-
For each wave defined in the PRD
|
|
80
|
+
For each wave defined in the PRD milestone section:
|
|
69
81
|
|
|
70
82
|
### 4a. Prepare Agent Prompts
|
|
71
83
|
|
|
72
84
|
For each agent in the wave, build a prompt containing:
|
|
73
85
|
|
|
74
86
|
```
|
|
75
|
-
You are [agent-name] working on
|
|
87
|
+
You are [agent-name] working on Milestone [N]: [Milestone Name].
|
|
76
88
|
|
|
77
89
|
## Your Task
|
|
78
90
|
[Task description from PRD wave structure]
|
|
@@ -81,7 +93,7 @@ You are [agent-name] working on Phase [N]: [Phase Name].
|
|
|
81
93
|
[Exact file list from PRD — absolute paths]
|
|
82
94
|
|
|
83
95
|
## Acceptance Criteria
|
|
84
|
-
[Relevant criteria from the user stories this
|
|
96
|
+
[Relevant criteria from the user stories this milestone covers]
|
|
85
97
|
|
|
86
98
|
## Existing Code to Reuse
|
|
87
99
|
[Inline the actual code/types/signatures from the "Key Existing Code" PRD section.
|
|
@@ -117,7 +129,7 @@ After a wave completes, check results:
|
|
|
117
129
|
- Use AskUserQuestion: "Wave N failed completely. How to proceed?"
|
|
118
130
|
- "Retry this wave"
|
|
119
131
|
- "Skip to next wave"
|
|
120
|
-
- "Abort
|
|
132
|
+
- "Abort milestone"
|
|
121
133
|
|
|
122
134
|
**If SOME agents failed but others succeeded:**
|
|
123
135
|
- Print: **"Wave N: X/Y agents succeeded, Z failed."**
|
|
@@ -125,7 +137,7 @@ After a wave completes, check results:
|
|
|
125
137
|
- Use AskUserQuestion: "Some agents failed. How to proceed?"
|
|
126
138
|
- "Retry failed agents"
|
|
127
139
|
- "Continue without them"
|
|
128
|
-
- "Abort
|
|
140
|
+
- "Abort milestone"
|
|
129
141
|
|
|
130
142
|
When a wave completes successfully (all agents or user chose to continue), print: **"Wave N complete. Proceeding to Wave N+1."**
|
|
131
143
|
|
|
@@ -141,21 +153,21 @@ After each wave completes (and failure handling is resolved):
|
|
|
141
153
|
|
|
142
154
|
After ALL waves complete:
|
|
143
155
|
1. Run full verification suite
|
|
144
|
-
2. Check all acceptance criteria for this
|
|
156
|
+
2. Check all acceptance criteria for this milestone's user stories
|
|
145
157
|
3. If verification fails, attempt to fix (max **3 attempts**):
|
|
146
158
|
- After attempt 1 fails: Print **"Verification failed. Attempting fix (1/3)..."**
|
|
147
159
|
- After attempt 2 fails: Print **"Verification failed. Attempting fix (2/3)..."**
|
|
148
160
|
- After attempt 3 fails: Print **"Verification failed after 3 attempts. STOP."** Print the errors and use AskUserQuestion:
|
|
149
161
|
- "Skip verification and continue"
|
|
150
162
|
- "Fix manually and retry"
|
|
151
|
-
- "Abort this
|
|
163
|
+
- "Abort this milestone"
|
|
152
164
|
- Do NOT loop further beyond 3 attempts.
|
|
153
165
|
|
|
154
166
|
## Step 5 — Commit
|
|
155
167
|
|
|
156
|
-
Create an atomic commit for this
|
|
157
|
-
- Stage only the files created/modified by this
|
|
158
|
-
- Commit message: `feat: [
|
|
168
|
+
Create an atomic commit for this milestone:
|
|
169
|
+
- Stage only the files created/modified by this milestone's agents
|
|
170
|
+
- Commit message: `feat: [milestone description] (Milestone N)`
|
|
159
171
|
- Do NOT push unless the user asks
|
|
160
172
|
|
|
161
173
|
## Step 6 — Update Docs
|
|
@@ -166,21 +178,21 @@ Create an atomic commit for this phase:
|
|
|
166
178
|
**Date:** [today]
|
|
167
179
|
**Developer:** [git config user.name]
|
|
168
180
|
**Branch:** [current branch]
|
|
169
|
-
**Working On:**
|
|
170
|
-
**Status:**
|
|
171
|
-
**Next:** [
|
|
181
|
+
**Working On:** Milestone [N]: [Name] from [PRD name]
|
|
182
|
+
**Status:** Milestone [N] complete. [brief description of what was built]
|
|
183
|
+
**Next:** [Milestone N+1 name, or "/flow:done to finalize project"]
|
|
172
184
|
**Blockers:** [any, or "None"]
|
|
173
185
|
```
|
|
174
186
|
|
|
175
|
-
**ROADMAP.md (ALWAYS):** Mark this
|
|
187
|
+
**ROADMAP.md (ALWAYS):** Mark this milestone as "Complete ([today's date])"
|
|
176
188
|
|
|
177
|
-
**STATE.md (LAST
|
|
189
|
+
**STATE.md (LAST MILESTONE ONLY):** Update STATE.md only if this was the LAST milestone in the PRD (project complete). Update "What Was Built" section with:
|
|
178
190
|
- Files created/modified (count + key names)
|
|
179
191
|
- Commit SHA
|
|
180
|
-
-
|
|
192
|
+
- Milestone completion note
|
|
181
193
|
- Keep "Active PRD" field pointing to the resolved PRD path
|
|
182
194
|
|
|
183
|
-
For non-final
|
|
195
|
+
For non-final milestones, skip STATE.md updates.
|
|
184
196
|
|
|
185
197
|
## Step 7 — Route Next Action (MANDATORY — FINAL STEP)
|
|
186
198
|
|
|
@@ -190,27 +202,28 @@ For non-final phases, skip STATE.md updates.
|
|
|
190
202
|
- Run additional cleanup or refactoring
|
|
191
203
|
- Do any work beyond printing this summary
|
|
192
204
|
|
|
193
|
-
Any post-
|
|
205
|
+
Any post-milestone work belongs in a SEPARATE `/flow:go` invocation or `/flow:task`.
|
|
194
206
|
|
|
195
207
|
Print this EXACT structure (fill in values):
|
|
196
208
|
|
|
197
209
|
```
|
|
198
|
-
|
|
210
|
+
Milestone [N]: [Name] — Complete ✓
|
|
199
211
|
- [X] files created, [Y] modified
|
|
200
212
|
- Commit: [SHA]
|
|
201
213
|
- Verification: [passed/failed]
|
|
202
214
|
|
|
203
215
|
Next flow command:
|
|
204
|
-
→ /flow:go — execute
|
|
216
|
+
→ /flow:go — execute Milestone [N+1]: [Next Milestone Name]
|
|
205
217
|
→ /flow:done — end session, update docs, generate handoff prompt
|
|
206
218
|
```
|
|
207
219
|
|
|
208
|
-
If this was the
|
|
220
|
+
If this was the LAST milestone in the PRD (no more pending milestones remain), replace the ENTIRE "Next flow command" block with:
|
|
209
221
|
|
|
210
222
|
```
|
|
211
|
-
All
|
|
212
|
-
|
|
213
|
-
→ /flow:done — finalize session (REQUIRED before ending)
|
|
223
|
+
All milestones complete — project done!
|
|
224
|
+
→ /flow:done — finalize project, auto-create PR, move issues to In Review (REQUIRED)
|
|
214
225
|
```
|
|
215
226
|
|
|
216
|
-
|
|
227
|
+
Do NOT suggest `/flow:go` when there are no remaining milestones — there is nothing left to execute.
|
|
228
|
+
|
|
229
|
+
**CRITICAL:** The `→ /flow:done` line MUST appear in EVERY milestone completion output, whether or not more milestones remain. This is non-negotiable. `/flow:done` is how session-end documentation happens.
|