flow-cc 0.5.8 → 0.6.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.
- package/CHANGELOG.md +150 -131
- package/VERSION +1 -1
- package/package.json +40 -40
- package/skills/flow-done.md +187 -136
- package/skills/flow-go.md +216 -197
- package/skills/flow-spec.md +305 -290
- package/skills/flow-status.md +104 -95
- package/skills/flow-task.md +150 -128
- package/skills/flow-triage.md +99 -0
- package/templates/session.md.template +9 -0
package/skills/flow-go.md
CHANGED
|
@@ -1,197 +1,216 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow:go
|
|
3
|
-
description: Execute the next phase from PRD using wave-based agent teams
|
|
4
|
-
user_invocable: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /flow:go — Execute Next Phase
|
|
8
|
-
|
|
9
|
-
You are executing the `/flow:go` skill. This reads the PRD, identifies the next unstarted phase, and executes it using wave-based agent teams.
|
|
10
|
-
|
|
11
|
-
**Core principle:** The PRD is the execution contract. You execute what it specifies. Do not freelance.
|
|
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.
|
|
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.
|
|
16
|
-
|
|
17
|
-
## Step 1 — Orient
|
|
18
|
-
|
|
19
|
-
Read these files (in parallel):
|
|
20
|
-
- `.planning/STATE.md` — current position
|
|
21
|
-
- `.planning/ROADMAP.md` — phase progress
|
|
22
|
-
- `tasks/lessons.md` — active lessons (max 10 one-liners)
|
|
23
|
-
- `CLAUDE.md` — execution rules and verification commands
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
##
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
1
|
+
---
|
|
2
|
+
name: flow:go
|
|
3
|
+
description: Execute the next phase from PRD using wave-based agent teams
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow:go — Execute Next Phase
|
|
8
|
+
|
|
9
|
+
You are executing the `/flow:go` skill. This reads the PRD, identifies the next unstarted phase, and executes it using wave-based agent teams.
|
|
10
|
+
|
|
11
|
+
**Core principle:** The PRD is the execution contract. You execute what it specifies. Do not freelance.
|
|
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.
|
|
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.
|
|
16
|
+
|
|
17
|
+
## Step 1 — Orient
|
|
18
|
+
|
|
19
|
+
Read these files (in parallel):
|
|
20
|
+
- `.planning/STATE.md` — current position
|
|
21
|
+
- `.planning/ROADMAP.md` — phase progress
|
|
22
|
+
- `tasks/lessons.md` — active lessons (max 10 one-liners)
|
|
23
|
+
- `CLAUDE.md` — execution rules and verification commands
|
|
24
|
+
- `.claude/memory/session.md` (if exists) — personal session state
|
|
25
|
+
|
|
26
|
+
Run `git config user.name` to get developer identity.
|
|
27
|
+
|
|
28
|
+
### PRD Selection
|
|
29
|
+
|
|
30
|
+
The user must always select which PRD to execute. No silent auto-resolution.
|
|
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 `**Milestone:**` header field. If an exact match is found, use it directly. If no match, show available PRDs and ask.
|
|
33
|
+
|
|
34
|
+
2. **If no argument** — list all PRD files in `.planning/prds/`. For each PRD, read its `**Status:**` and `**Milestone:**` 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
|
+
|
|
36
|
+
3. **No PRDs found** — "No PRDs found in `.planning/prds/`. Run `/flow:spec` first." Stop here.
|
|
37
|
+
|
|
38
|
+
**After selection:** Read the chosen PRD. If its `**Milestone:**` 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."
|
|
39
|
+
|
|
40
|
+
**Assignment check:** After reading the PRD, check the current phase 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 phase is assigned to [other dev]. Proceeding anyway — override if intentional." Do NOT block execution — this is advisory only.
|
|
41
|
+
|
|
42
|
+
**Identify the next phase:** Find the first phase in ROADMAP.md with status "Pending" or the first unstarted phase in the PRD.
|
|
43
|
+
|
|
44
|
+
## Step 2 — Pre-flight Checks
|
|
45
|
+
|
|
46
|
+
Run these checks before executing. If any fail, stop and tell the user what to do:
|
|
47
|
+
|
|
48
|
+
1. **PRD selected?** If PRD Selection (above) reached step 3 (no PRDs found): stop with the "No PRDs found" message.
|
|
49
|
+
2. **Phase detailed enough?** The phase section in the PRD must have:
|
|
50
|
+
- Wave structure with agent assignments
|
|
51
|
+
- Explicit file lists per agent
|
|
52
|
+
- Verification commands
|
|
53
|
+
- If missing: "PRD phase section is too vague. Add wave structure + file lists, or run `/flow:spec`."
|
|
54
|
+
3. **Branch check:** Verify you're on the correct feature branch (from PRD header). If not, warn the user.
|
|
55
|
+
4. **All phases done?** If no pending phases remain: "All phases complete! Run `/flow:done` to wrap up, or `/flow:milestone` for the next milestone."
|
|
56
|
+
|
|
57
|
+
## Step 3 — Staleness Check
|
|
58
|
+
|
|
59
|
+
Compare this phase's PRD section against the actual codebase:
|
|
60
|
+
- Do the files it references still exist / have the expected structure?
|
|
61
|
+
- Were files created/deleted/significantly changed by prior phases that affect this phase?
|
|
62
|
+
- If stale references found: fix them in the PRD (update file paths, note structural changes) before proceeding. Print what you corrected.
|
|
63
|
+
|
|
64
|
+
Do NOT rewrite the phase — just fix stale references so agents get accurate context.
|
|
65
|
+
|
|
66
|
+
## Step 4 — Execute Waves
|
|
67
|
+
|
|
68
|
+
For each wave defined in the PRD phase section:
|
|
69
|
+
|
|
70
|
+
### 4a. Prepare Agent Prompts
|
|
71
|
+
|
|
72
|
+
For each agent in the wave, build a prompt containing:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
You are [agent-name] working on Phase [N]: [Phase Name].
|
|
76
|
+
|
|
77
|
+
## Your Task
|
|
78
|
+
[Task description from PRD wave structure]
|
|
79
|
+
|
|
80
|
+
## Files to Create/Modify
|
|
81
|
+
[Exact file list from PRD — absolute paths]
|
|
82
|
+
|
|
83
|
+
## Acceptance Criteria
|
|
84
|
+
[Relevant criteria from the user stories this phase covers]
|
|
85
|
+
|
|
86
|
+
## Existing Code to Reuse
|
|
87
|
+
[Inline the actual code/types/signatures from the "Key Existing Code" PRD section.
|
|
88
|
+
Do NOT just reference file paths — READ the files and INLINE the relevant code
|
|
89
|
+
so agents have it in their context without needing to search.]
|
|
90
|
+
|
|
91
|
+
## Rules
|
|
92
|
+
- Only modify files in your list. Do not touch anything else.
|
|
93
|
+
- Run verification after your work: [commands from CLAUDE.md]
|
|
94
|
+
- Stage only your files when committing (never `git add .` or `git add -A`)
|
|
95
|
+
- If you need output from another agent that isn't available yet, create a temporary stub and continue. Delete the stub before your final commit.
|
|
96
|
+
|
|
97
|
+
## Lessons (Rules to Follow)
|
|
98
|
+
[Relevant lessons from tasks/lessons.md — filter to lessons that apply to this agent's work]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 4b. Spawn Wave
|
|
102
|
+
|
|
103
|
+
- Use TeamCreate or Task tool to spawn all agents in the wave simultaneously
|
|
104
|
+
- Each agent runs with `mode: "bypassPermissions"` for autonomous execution
|
|
105
|
+
- Print: **"Wave N: Spawned X agents — [agent-1-task], [agent-2-task], ..."**
|
|
106
|
+
- As each agent completes, print: **"Wave N: agent-name completed (X/Y)"**
|
|
107
|
+
- Set a reasonable timeout for each agent. If an agent hasn't completed after 10 minutes, check on it. If it's stuck, stop it and note the failure.
|
|
108
|
+
- Wait for all agents in the wave to complete (or timeout) before moving to the next wave
|
|
109
|
+
|
|
110
|
+
### 4c. Wave Failure Handling
|
|
111
|
+
|
|
112
|
+
After a wave completes, check results:
|
|
113
|
+
|
|
114
|
+
**If ALL agents in a wave failed:**
|
|
115
|
+
- Print: **"Wave N failed — all X agents errored."**
|
|
116
|
+
- Show error summaries from each agent
|
|
117
|
+
- Use AskUserQuestion: "Wave N failed completely. How to proceed?"
|
|
118
|
+
- "Retry this wave"
|
|
119
|
+
- "Skip to next wave"
|
|
120
|
+
- "Abort phase"
|
|
121
|
+
|
|
122
|
+
**If SOME agents failed but others succeeded:**
|
|
123
|
+
- Print: **"Wave N: X/Y agents succeeded, Z failed."**
|
|
124
|
+
- Show failed agent error summaries
|
|
125
|
+
- Use AskUserQuestion: "Some agents failed. How to proceed?"
|
|
126
|
+
- "Retry failed agents"
|
|
127
|
+
- "Continue without them"
|
|
128
|
+
- "Abort phase"
|
|
129
|
+
|
|
130
|
+
When a wave completes successfully (all agents or user chose to continue), print: **"Wave N complete. Proceeding to Wave N+1."**
|
|
131
|
+
|
|
132
|
+
### 4d. Between Waves
|
|
133
|
+
|
|
134
|
+
After each wave completes (and failure handling is resolved):
|
|
135
|
+
1. Run verification commands from CLAUDE.md (e.g., `npx tsc --noEmit`, `npx biome check`)
|
|
136
|
+
2. Check for integration issues between agents' output
|
|
137
|
+
3. Fix any issues before proceeding to the next wave
|
|
138
|
+
4. If verification fails and you can fix it quickly (< 2 minutes of work), fix it. Otherwise, stop and report.
|
|
139
|
+
|
|
140
|
+
### 4e. Final Verification
|
|
141
|
+
|
|
142
|
+
After ALL waves complete:
|
|
143
|
+
1. Run full verification suite
|
|
144
|
+
2. Check all acceptance criteria for this phase's user stories
|
|
145
|
+
3. If verification fails, attempt to fix (max **3 attempts**):
|
|
146
|
+
- After attempt 1 fails: Print **"Verification failed. Attempting fix (1/3)..."**
|
|
147
|
+
- After attempt 2 fails: Print **"Verification failed. Attempting fix (2/3)..."**
|
|
148
|
+
- After attempt 3 fails: Print **"Verification failed after 3 attempts. STOP."** Print the errors and use AskUserQuestion:
|
|
149
|
+
- "Skip verification and continue"
|
|
150
|
+
- "Fix manually and retry"
|
|
151
|
+
- "Abort this phase"
|
|
152
|
+
- Do NOT loop further beyond 3 attempts.
|
|
153
|
+
|
|
154
|
+
## Step 5 — Commit
|
|
155
|
+
|
|
156
|
+
Create an atomic commit for this phase:
|
|
157
|
+
- Stage only the files created/modified by this phase's agents
|
|
158
|
+
- Commit message: `feat: [phase description] (Phase N)`
|
|
159
|
+
- Do NOT push unless the user asks
|
|
160
|
+
|
|
161
|
+
## Step 6 — Update Docs
|
|
162
|
+
|
|
163
|
+
**Session state (ALWAYS):** Write `.claude/memory/session.md` (create `.claude/memory/` directory if needed):
|
|
164
|
+
```
|
|
165
|
+
# Session State
|
|
166
|
+
**Date:** [today]
|
|
167
|
+
**Developer:** [git config user.name]
|
|
168
|
+
**Branch:** [current branch]
|
|
169
|
+
**Working On:** Phase [N]: [Name] from [PRD name]
|
|
170
|
+
**Status:** Phase [N] complete. [brief description of what was built]
|
|
171
|
+
**Next:** [Phase N+1 name, or "/flow:done to finalize milestone"]
|
|
172
|
+
**Blockers:** [any, or "None"]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**ROADMAP.md (ALWAYS):** Mark this phase as "Complete ([today's date])"
|
|
176
|
+
|
|
177
|
+
**STATE.md (LAST PHASE ONLY):** Update STATE.md only if this was the LAST phase in the PRD (milestone complete). Update "What Was Built" section with:
|
|
178
|
+
- Files created/modified (count + key names)
|
|
179
|
+
- Commit SHA
|
|
180
|
+
- Phase completion note
|
|
181
|
+
- Keep "Active PRD" field pointing to the resolved PRD path
|
|
182
|
+
|
|
183
|
+
For non-final phases, skip STATE.md updates.
|
|
184
|
+
|
|
185
|
+
## Step 7 — Route Next Action (MANDATORY — FINAL STEP)
|
|
186
|
+
|
|
187
|
+
**STOP RULE:** This is the LAST thing you do. After printing the output below, STOP IMMEDIATELY. Do NOT:
|
|
188
|
+
- Review or resolve code review comments
|
|
189
|
+
- Create or update pull requests
|
|
190
|
+
- Run additional cleanup or refactoring
|
|
191
|
+
- Do any work beyond printing this summary
|
|
192
|
+
|
|
193
|
+
Any post-phase work belongs in a SEPARATE `/flow:go` invocation or `/flow:task`.
|
|
194
|
+
|
|
195
|
+
Print this EXACT structure (fill in values):
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Phase [N]: [Name] — Complete ✓
|
|
199
|
+
- [X] files created, [Y] modified
|
|
200
|
+
- Commit: [SHA]
|
|
201
|
+
- Verification: [passed/failed]
|
|
202
|
+
|
|
203
|
+
Next flow command:
|
|
204
|
+
→ /flow:go — execute Phase [N+1]: [Next Phase Name]
|
|
205
|
+
→ /flow:done — end session, update docs, generate handoff prompt
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
If this was the last phase, replace the flow commands block with:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
All phases complete — milestone done!
|
|
212
|
+
|
|
213
|
+
→ /flow:done — finalize session (REQUIRED before ending)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**CRITICAL:** The `→ /flow:done` line MUST appear in EVERY phase completion output, whether or not more phases remain. This is non-negotiable. `/flow:done` is how session-end documentation happens.
|