flow-cc 0.2.0 → 0.4.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 +35 -0
- package/README.md +39 -25
- package/VERSION +1 -1
- package/bin/install.js +9 -8
- package/package.json +1 -1
- package/skills/flow-done.md +10 -2
- package/skills/flow-go.md +38 -6
- package/skills/flow-intro.md +19 -10
- package/skills/flow-milestone.md +78 -0
- package/skills/{flow-init.md → flow-setup.md} +43 -62
- package/skills/flow-spec.md +16 -1
- package/skills/flow-status.md +8 -4
- package/skills/flow-task.md +1 -1
- package/templates/ROADMAP.md.template +3 -0
- package/templates/STATE.md.template +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ 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.4.0] - 2026-02-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Multi-milestone roadmap input in `/flow:setup` — capture your full roadmap upfront (paste a list or build one at a time)
|
|
12
|
+
- Auto-transition between milestones in `/flow:done` — when a milestone completes and the next is planned, it transitions automatically
|
|
13
|
+
- Two-path milestone input (paste/describe or guided) in both `/flow:setup` and `/flow:milestone`
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- `/flow:milestone` purpose shifted from "archive + start next" to "add new milestones to the roadmap" — archive logic moved to `/flow:done`
|
|
17
|
+
- `/flow:done` handoff prompt now has three cases: next phase, next milestone (auto-transitioned), or all milestones complete
|
|
18
|
+
- `/flow:status` routing updated — recommends `/flow:done` (not `/flow:milestone`) when next milestone exists, since transition is automatic
|
|
19
|
+
- `/flow:setup` Question 4 changed from "first milestone" to full roadmap input
|
|
20
|
+
- ROADMAP.md template supports multiple milestones with `{{ADDITIONAL_MILESTONES_TABLE}}` and `{{ADDITIONAL_MILESTONES_SECTIONS}}` placeholders
|
|
21
|
+
- Updated lifecycle diagrams in README and `/flow:intro` to show pre-planned milestone flow
|
|
22
|
+
- Updated command descriptions across intro, README, and install.js
|
|
23
|
+
|
|
24
|
+
## [0.3.0] - 2026-02-11
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- `/flow:setup` command — replaces `/flow:init` for project scaffolding only. Adds overwrite protection (stops if project already initialized).
|
|
28
|
+
- `/flow:milestone` command — extracted from `/flow:init` for milestone transitions. Adds guard for pending phases before archiving.
|
|
29
|
+
- Codebase scan exclusions in `/flow:spec` — explicitly excludes `node_modules/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/`, `*.min.js`, `*.map`, `*.lock`. Uses targeted glob patterns instead of bare `**/*`.
|
|
30
|
+
- Minimum viable PRD check in `/flow:spec` — validates at least 3 user stories, 1 phase, and 1 verification command before finalizing.
|
|
31
|
+
- Agent timeout + progress indicators in `/flow:go` — prints wave spawn/completion status, checks stuck agents after 10 minutes.
|
|
32
|
+
- Max retry limit (3 attempts) for verification in `/flow:go` — stops after 3 failures with user options instead of looping forever.
|
|
33
|
+
- Wave failure handling in `/flow:go` — detects all-failed vs partial-failed waves, asks user how to proceed.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
- `/flow:init` split into `/flow:setup` (project scaffolding) and `/flow:milestone` (milestone transitions)
|
|
37
|
+
- Skill count: 9 skills (was 8 — setup replaces init, milestone is new)
|
|
38
|
+
- All cross-references updated: intro, done, status, go, task, README, install.js, DESIGN.md, templates
|
|
39
|
+
|
|
40
|
+
### Removed
|
|
41
|
+
- `/flow:init` command — replaced by `/flow:setup` and `/flow:milestone`
|
|
42
|
+
|
|
8
43
|
## [0.2.0] - 2026-02-11
|
|
9
44
|
|
|
10
45
|
### Added
|
package/README.md
CHANGED
|
@@ -30,43 +30,57 @@ Flow fixes this by giving Claude Code a **memory system and execution framework*
|
|
|
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
|
|
|
33
|
+
## How It Works
|
|
34
|
+
|
|
35
|
+
**One-time setup**, then a repeating build cycle:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/flow:setup → /flow:spec → /flow:go → /flow:done
|
|
39
|
+
(once, (once per (once per (end of session,
|
|
40
|
+
captures milestone) phase) auto-transitions
|
|
41
|
+
full roadmap) between milestones)
|
|
42
|
+
```
|
|
43
|
+
|
|
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
|
|
46
|
+
3. **`/flow:go`** — Spawns parallel agent teams to build the next phase, verifies, commits
|
|
47
|
+
4. **`/flow:done`** — Updates docs, captures lessons, generates a handoff prompt so the next session starts instantly
|
|
48
|
+
|
|
49
|
+
Run `/flow:go` repeatedly until all phases are done, then `/flow:done` to wrap up. Next session, paste the handoff prompt and keep going.
|
|
50
|
+
|
|
33
51
|
## Commands
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|---|---|
|
|
37
|
-
| `/flow:intro` | Walkthrough of the system — **start here** |
|
|
38
|
-
| `/flow:init` | Initialize a project with `.planning/` scaffolding, CLAUDE.md, templates |
|
|
39
|
-
| `/flow:spec` | Spec interview that produces an executable PRD with phased execution plan |
|
|
40
|
-
| `/flow:go` | Execute the next phase from the PRD using wave-based agent teams |
|
|
41
|
-
| `/flow:task` | Bug fixes, cleanup, small features — no PRD needed |
|
|
42
|
-
| `/flow:done` | Session-end documentation, lessons refinement, handoff prompt |
|
|
43
|
-
| `/flow:status` | Quick orientation — current milestone, phase progress, next actions |
|
|
44
|
-
| `/flow:update` | Update Flow to the latest version |
|
|
53
|
+
**The build cycle:**
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
| Command | When to use |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `/flow:setup` | Once per project — creates `.planning/`, CLAUDE.md, templates |
|
|
58
|
+
| `/flow:spec` | Once per milestone — interview that produces the PRD |
|
|
59
|
+
| `/flow:go` | Once per phase — executes the next phase with agent teams |
|
|
60
|
+
| `/flow:done` | End of session — updates docs, generates handoff prompt |
|
|
47
61
|
|
|
48
|
-
|
|
49
|
-
/flow:init → /flow:spec → /flow:go (repeat per phase) → /flow:done
|
|
50
|
-
↓
|
|
51
|
-
handoff prompt for next session
|
|
62
|
+
**Standalone:**
|
|
52
63
|
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
| Command | When to use |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `/flow:task` | Anytime — bug fixes, cleanup, small features (no PRD needed) |
|
|
67
|
+
| `/flow:milestone` | Anytime — add new milestones to the roadmap |
|
|
55
68
|
|
|
56
|
-
**
|
|
69
|
+
**Utility:**
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
| Command | When to use |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `/flow:intro` | First time — walkthrough of the system |
|
|
74
|
+
| `/flow:status` | Anytime — where am I? What's next? |
|
|
75
|
+
| `/flow:update` | Anytime — update Flow to the latest version |
|
|
63
76
|
|
|
64
77
|
## What Gets Installed
|
|
65
78
|
|
|
66
79
|
```
|
|
67
80
|
~/.claude/
|
|
68
81
|
├── commands/flow/
|
|
69
|
-
│ ├── flow-
|
|
82
|
+
│ ├── flow-setup.md # 9 skill files
|
|
83
|
+
│ ├── flow-milestone.md
|
|
70
84
|
│ ├── flow-spec.md
|
|
71
85
|
│ ├── flow-go.md
|
|
72
86
|
│ ├── flow-task.md
|
|
@@ -88,7 +102,7 @@ Flow fixes this by giving Claude Code a **memory system and execution framework*
|
|
|
88
102
|
|
|
89
103
|
## Project Structure
|
|
90
104
|
|
|
91
|
-
Every Flow project gets this structure via `/flow:
|
|
105
|
+
Every Flow project gets this structure via `/flow:setup`:
|
|
92
106
|
|
|
93
107
|
```
|
|
94
108
|
your-project/
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.4.0
|
package/bin/install.js
CHANGED
|
@@ -321,14 +321,15 @@ try {
|
|
|
321
321
|
Flow v${version} installed successfully!
|
|
322
322
|
|
|
323
323
|
Commands available:
|
|
324
|
-
/flow:intro
|
|
325
|
-
/flow:
|
|
326
|
-
/flow:
|
|
327
|
-
/flow:
|
|
328
|
-
/flow:
|
|
329
|
-
/flow:
|
|
330
|
-
/flow:
|
|
331
|
-
/flow:
|
|
324
|
+
/flow:intro \u2014 Learn the Flow workflow
|
|
325
|
+
/flow:setup \u2014 Set up a new project with full roadmap
|
|
326
|
+
/flow:milestone \u2014 Add new milestones to the roadmap
|
|
327
|
+
/flow:spec \u2014 Spec interview \u2192 executable PRD
|
|
328
|
+
/flow:go \u2014 Execute next phase with agent teams
|
|
329
|
+
/flow:done \u2014 Session-end documentation
|
|
330
|
+
/flow:status \u2014 Quick orientation
|
|
331
|
+
/flow:task \u2014 Lightweight task execution
|
|
332
|
+
/flow:update \u2014 Update Flow to latest version
|
|
332
333
|
|
|
333
334
|
Get started: run /flow:intro in any Claude Code session.
|
|
334
335
|
`);
|
package/package.json
CHANGED
package/skills/flow-done.md
CHANGED
|
@@ -70,6 +70,10 @@ Structure:
|
|
|
70
70
|
- Move milestone phase details to `.planning/archive/milestones-vX.md`
|
|
71
71
|
- Keep only the summary row in the ROADMAP milestone table
|
|
72
72
|
- Move `PRD.md` to `.planning/archive/PRD-vX.md`
|
|
73
|
+
- Mark the milestone as "Complete" in the ROADMAP table
|
|
74
|
+
- **Milestone transition:** Check ROADMAP.md for the NEXT milestone with status "Planned":
|
|
75
|
+
- **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.
|
|
76
|
+
- **If no next milestone exists:** No transition needed — all planned milestones are done.
|
|
73
77
|
|
|
74
78
|
### 4. Update lessons.md
|
|
75
79
|
|
|
@@ -98,9 +102,13 @@ Determine the next action and generate a copyable handoff prompt:
|
|
|
98
102
|
Phase [N]: [Name] — [short description]. Read STATE.md, ROADMAP.md, and PRD.md (US-X).
|
|
99
103
|
[One sentence of context]. [One sentence of what NOT to do if relevant].
|
|
100
104
|
```
|
|
101
|
-
- If milestone is complete:
|
|
105
|
+
- If milestone is complete AND a next milestone was transitioned to (from Step 3):
|
|
102
106
|
```
|
|
103
|
-
Milestone [name] complete. Run /flow:
|
|
107
|
+
Milestone [name] complete. Next: v[X] [next milestone name]. Run /flow:spec to plan it.
|
|
108
|
+
```
|
|
109
|
+
- If milestone is complete AND no next milestone exists:
|
|
110
|
+
```
|
|
111
|
+
All milestones complete! Run /flow:milestone to plan what's next, or enjoy the win.
|
|
104
112
|
```
|
|
105
113
|
|
|
106
114
|
Print the handoff prompt in a fenced code block so the user can copy it.
|
package/skills/flow-go.md
CHANGED
|
@@ -32,7 +32,7 @@ Run these checks before executing. If any fail, stop and tell the user what to d
|
|
|
32
32
|
- Verification commands
|
|
33
33
|
- If missing: "PRD phase section is too vague. Add wave structure + file lists, or run `/flow:spec`."
|
|
34
34
|
3. **Branch check:** Verify you're on the correct feature branch (from PRD header). If not, warn the user.
|
|
35
|
-
4. **All phases done?** If no pending phases remain: "All phases complete! Run `/flow:done` to wrap up, or `/flow:
|
|
35
|
+
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."
|
|
36
36
|
|
|
37
37
|
## Step 3 — Staleness Check
|
|
38
38
|
|
|
@@ -82,22 +82,54 @@ so agents have it in their context without needing to search.]
|
|
|
82
82
|
|
|
83
83
|
- Use TeamCreate or Task tool to spawn all agents in the wave simultaneously
|
|
84
84
|
- Each agent runs with `mode: "bypassPermissions"` for autonomous execution
|
|
85
|
-
-
|
|
85
|
+
- Print: **"Wave N: Spawned X agents — [agent-1-task], [agent-2-task], ..."**
|
|
86
|
+
- As each agent completes, print: **"Wave N: agent-name completed (X/Y)"**
|
|
87
|
+
- 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.
|
|
88
|
+
- Wait for all agents in the wave to complete (or timeout) before moving to the next wave
|
|
86
89
|
|
|
87
|
-
### 4c.
|
|
90
|
+
### 4c. Wave Failure Handling
|
|
88
91
|
|
|
89
|
-
After
|
|
92
|
+
After a wave completes, check results:
|
|
93
|
+
|
|
94
|
+
**If ALL agents in a wave failed:**
|
|
95
|
+
- Print: **"Wave N failed — all X agents errored."**
|
|
96
|
+
- Show error summaries from each agent
|
|
97
|
+
- Use AskUserQuestion: "Wave N failed completely. How to proceed?"
|
|
98
|
+
- "Retry this wave"
|
|
99
|
+
- "Skip to next wave"
|
|
100
|
+
- "Abort phase"
|
|
101
|
+
|
|
102
|
+
**If SOME agents failed but others succeeded:**
|
|
103
|
+
- Print: **"Wave N: X/Y agents succeeded, Z failed."**
|
|
104
|
+
- Show failed agent error summaries
|
|
105
|
+
- Use AskUserQuestion: "Some agents failed. How to proceed?"
|
|
106
|
+
- "Retry failed agents"
|
|
107
|
+
- "Continue without them"
|
|
108
|
+
- "Abort phase"
|
|
109
|
+
|
|
110
|
+
When a wave completes successfully (all agents or user chose to continue), print: **"Wave N complete. Proceeding to Wave N+1."**
|
|
111
|
+
|
|
112
|
+
### 4d. Between Waves
|
|
113
|
+
|
|
114
|
+
After each wave completes (and failure handling is resolved):
|
|
90
115
|
1. Run verification commands from CLAUDE.md (e.g., `npx tsc --noEmit`, `npx biome check`)
|
|
91
116
|
2. Check for integration issues between agents' output
|
|
92
117
|
3. Fix any issues before proceeding to the next wave
|
|
93
118
|
4. If verification fails and you can fix it quickly (< 2 minutes of work), fix it. Otherwise, stop and report.
|
|
94
119
|
|
|
95
|
-
###
|
|
120
|
+
### 4e. Final Verification
|
|
96
121
|
|
|
97
122
|
After ALL waves complete:
|
|
98
123
|
1. Run full verification suite
|
|
99
124
|
2. Check all acceptance criteria for this phase's user stories
|
|
100
|
-
3. If
|
|
125
|
+
3. If verification fails, attempt to fix (max **3 attempts**):
|
|
126
|
+
- After attempt 1 fails: Print **"Verification failed. Attempting fix (1/3)..."**
|
|
127
|
+
- After attempt 2 fails: Print **"Verification failed. Attempting fix (2/3)..."**
|
|
128
|
+
- After attempt 3 fails: Print **"Verification failed after 3 attempts. STOP."** Print the errors and use AskUserQuestion:
|
|
129
|
+
- "Skip verification and continue"
|
|
130
|
+
- "Fix manually and retry"
|
|
131
|
+
- "Abort this phase"
|
|
132
|
+
- Do NOT loop further beyond 3 attempts.
|
|
101
133
|
|
|
102
134
|
## Step 5 — Commit
|
|
103
135
|
|
package/skills/flow-intro.md
CHANGED
|
@@ -14,28 +14,36 @@ Print this:
|
|
|
14
14
|
|
|
15
15
|
## Flow — Your Workflow System
|
|
16
16
|
|
|
17
|
-
Flow is
|
|
17
|
+
Flow is 6 commands that turn your specs into shipped code through agent teams. Each command feeds the next.
|
|
18
18
|
|
|
19
19
|
### The Lifecycle
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
/flow:
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/flow:setup → /flow:spec → /flow:go (repeat) → /flow:done
|
|
23
|
+
(captures ↑ |
|
|
24
|
+
full roadmap) | auto-transitions to |
|
|
25
|
+
+---- next planned milestone ------+
|
|
25
26
|
|
|
26
|
-
/flow:
|
|
27
|
+
/flow:milestone ← add milestones to roadmap anytime
|
|
28
|
+
/flow:task ← standalone path for bug fixes, cleanup, small features (no PRD needed)
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
### Command by Command
|
|
30
32
|
|
|
31
|
-
**`/flow:
|
|
32
|
-
-
|
|
33
|
+
**`/flow:setup`** — Run once per project
|
|
34
|
+
- Asks you 4-5 questions (what is it, tech stack, verify commands, roadmap/milestones)
|
|
35
|
+
- Captures your full roadmap upfront (paste a list or build one milestone at a time)
|
|
33
36
|
- Creates the scaffolding: `CLAUDE.md`, `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`
|
|
34
|
-
-
|
|
37
|
+
- If project already set up, tells you to use `/flow:milestone` or `/flow:spec` instead
|
|
38
|
+
|
|
39
|
+
**`/flow:milestone`** — Add milestones to the roadmap
|
|
40
|
+
- Adds new milestones to the project roadmap (paste a list or one at a time)
|
|
41
|
+
- Shows current roadmap status before adding
|
|
42
|
+
- If no milestone is active, activates the first new one
|
|
35
43
|
|
|
36
44
|
**`/flow:task`** — Run anytime for small work
|
|
37
45
|
- Bug fixes, cleanup, one-off features — anything that doesn't need a full PRD
|
|
38
|
-
- Works standalone without `/flow:
|
|
46
|
+
- Works standalone without `/flow:setup` — lowest friction entry to Flow
|
|
39
47
|
- Executes, verifies, commits, and logs to STATE.md (if it exists)
|
|
40
48
|
- Scope guard recommends `/flow:spec` if the task grows beyond 5 files or 3 layers
|
|
41
49
|
|
|
@@ -55,6 +63,7 @@ Flow is 5 commands that turn your specs into shipped code through agent teams. E
|
|
|
55
63
|
**`/flow:done`** — Run at end of every session
|
|
56
64
|
- Replaces STATE.md with current status
|
|
57
65
|
- Updates ROADMAP.md with phase completions
|
|
66
|
+
- Auto-transitions to the next planned milestone when the current one completes
|
|
58
67
|
- Asks about lessons, refines existing ones
|
|
59
68
|
- Commits doc updates
|
|
60
69
|
- Generates a handoff prompt you copy-paste to start the next session
|
|
@@ -80,7 +89,7 @@ Flow is 5 commands that turn your specs into shipped code through agent teams. E
|
|
|
80
89
|
### Starting a Brand New Project
|
|
81
90
|
|
|
82
91
|
```
|
|
83
|
-
1. /flow:
|
|
92
|
+
1. /flow:setup ← scaffolds everything
|
|
84
93
|
2. /flow:spec ← interview → PRD
|
|
85
94
|
3. /flow:go ← phase 1
|
|
86
95
|
4. /flow:done ← wrap up
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow:milestone
|
|
3
|
+
description: Add new milestones to the roadmap
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow:milestone — Add New Milestones
|
|
8
|
+
|
|
9
|
+
You are executing the `/flow:milestone` skill. This adds new milestones to the project roadmap.
|
|
10
|
+
|
|
11
|
+
## Guard: Project Must Exist
|
|
12
|
+
|
|
13
|
+
Check if `.planning/STATE.md` exists:
|
|
14
|
+
- **If it does NOT exist** → Print: "No project found. Run `/flow:setup` first." and **STOP.**
|
|
15
|
+
- **If it exists** → Continue.
|
|
16
|
+
|
|
17
|
+
## Step 1: Read Context
|
|
18
|
+
|
|
19
|
+
Read `.planning/STATE.md` and `.planning/ROADMAP.md` to understand:
|
|
20
|
+
- Current milestone status (what's active, what's complete, what's planned)
|
|
21
|
+
- What version numbers are already used
|
|
22
|
+
|
|
23
|
+
## Step 2: Show Current Status
|
|
24
|
+
|
|
25
|
+
Print a summary of the roadmap:
|
|
26
|
+
- List all milestones with their status (Complete, Pending, Planned, In Progress)
|
|
27
|
+
- Highlight the currently active milestone (if any)
|
|
28
|
+
|
|
29
|
+
## Step 3: Check for Active Work
|
|
30
|
+
|
|
31
|
+
If there is a milestone with status "Pending" or with incomplete phases (In Progress):
|
|
32
|
+
- Print: "Note: [milestone name] is currently active. New milestones will be added after existing planned milestones."
|
|
33
|
+
|
|
34
|
+
## Step 4: Gather New Milestones
|
|
35
|
+
|
|
36
|
+
Use AskUserQuestion:
|
|
37
|
+
- "How would you like to add milestones?" with options:
|
|
38
|
+
- "I'll paste or describe them"
|
|
39
|
+
- "One at a time (guided)"
|
|
40
|
+
|
|
41
|
+
**If paste/describe:**
|
|
42
|
+
- Accept free text (bullet list, paragraph, pasted doc — any format)
|
|
43
|
+
- Parse into milestones, each with a name + brief goal
|
|
44
|
+
- Print back: "Here's what I got:" followed by the parsed list
|
|
45
|
+
- Use AskUserQuestion to confirm: "Does this look right?" with options:
|
|
46
|
+
- "Yes — looks good"
|
|
47
|
+
- "Let me adjust" (user re-enters)
|
|
48
|
+
|
|
49
|
+
**If guided:**
|
|
50
|
+
- Ask: "What's this milestone called?" (name) and "What's the goal?" (one-sentence description)
|
|
51
|
+
- Then: "Add another milestone?" with options:
|
|
52
|
+
- "Yes — add another"
|
|
53
|
+
- "That's all"
|
|
54
|
+
- Repeat until user says that's all
|
|
55
|
+
|
|
56
|
+
## Step 5: Update Planning Docs
|
|
57
|
+
|
|
58
|
+
**ROADMAP.md:**
|
|
59
|
+
- Determine the next available version number (after existing milestones)
|
|
60
|
+
- Add new milestone rows to the table with status "Planned"
|
|
61
|
+
- Add new milestone sections with goals and "Run `/flow:spec` when this milestone is active."
|
|
62
|
+
|
|
63
|
+
**If no active milestone** (all existing milestones are "Complete" or there are none):
|
|
64
|
+
- Set the first new milestone's status to "Pending — needs `/flow:spec`"
|
|
65
|
+
- Update STATE.md to point to the new milestone as current
|
|
66
|
+
|
|
67
|
+
## Step 6: Print Completion Message
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Added [N] milestone(s) to the roadmap:
|
|
71
|
+
[list of added milestones with version numbers]
|
|
72
|
+
|
|
73
|
+
[If a milestone was activated:]
|
|
74
|
+
v[X] [name] is now active. Run /flow:spec to plan it.
|
|
75
|
+
|
|
76
|
+
[If milestones were just queued:]
|
|
77
|
+
These will activate in order as you complete current milestones.
|
|
78
|
+
```
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: flow:
|
|
3
|
-
description:
|
|
2
|
+
name: flow:setup
|
|
3
|
+
description: Set up a new project with Flow planning scaffolding
|
|
4
4
|
user_invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /flow:
|
|
7
|
+
# /flow:setup — Set Up New Project
|
|
8
8
|
|
|
9
|
-
You are executing the `/flow:
|
|
9
|
+
You are executing the `/flow:setup` skill. This sets up the planning scaffolding for a new project.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Guard: Already Initialized
|
|
12
12
|
|
|
13
|
-
Check if `.planning/STATE.md` exists:
|
|
14
|
-
- **If it
|
|
15
|
-
- **If it
|
|
13
|
+
Check if `.planning/STATE.md` already exists:
|
|
14
|
+
- **If it exists** → Print: "This project is already set up. Run `/flow:milestone` to start a new milestone, or `/flow:spec` to spec the current one." and **STOP. Do not overwrite.**
|
|
15
|
+
- **If it does NOT exist** → Continue with setup below.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
### Step 1: Ask Setup Questions
|
|
19
|
+
## Step 1: Ask Setup Questions
|
|
22
20
|
|
|
23
21
|
Use AskUserQuestion to gather project info. Ask these questions (you may combine into 2-3 AskUserQuestion calls):
|
|
24
22
|
|
|
@@ -39,15 +37,31 @@ Use AskUserQuestion to gather project info. Ask these questions (you may combine
|
|
|
39
37
|
- "cargo build && cargo test"
|
|
40
38
|
- (Other — user types custom)
|
|
41
39
|
|
|
42
|
-
**Question 4 —
|
|
43
|
-
- "
|
|
40
|
+
**Question 4 — Roadmap:**
|
|
41
|
+
- "Do you already have a roadmap or list of milestones?" with options:
|
|
42
|
+
- "Yes — I'll paste or describe them"
|
|
43
|
+
- "No — let's figure it out together"
|
|
44
|
+
|
|
45
|
+
**If user selects "Yes":**
|
|
46
|
+
- Accept free text (bullet list, paragraph, pasted doc — any format)
|
|
47
|
+
- Parse into milestones, each with a name + brief goal
|
|
48
|
+
- Print back: "Here's what I got:" followed by the parsed list (e.g., "v1: Auth — user registration and login", "v2: Dashboard — analytics and settings")
|
|
49
|
+
- Use AskUserQuestion to confirm: "Does this look right?" with options:
|
|
50
|
+
- "Yes — looks good"
|
|
51
|
+
- "Let me adjust" (user re-enters)
|
|
52
|
+
|
|
53
|
+
**If user selects "No" (guided):**
|
|
54
|
+
- Ask: "What's the first milestone?" (name + one-sentence goal)
|
|
55
|
+
- Then: "Any more milestones you can see right now? List them, or skip to add them later with `/flow:milestone`." with options:
|
|
56
|
+
- "I have more to add" (user enters additional milestones)
|
|
57
|
+
- "That's it for now"
|
|
44
58
|
|
|
45
59
|
**Question 5 — Brownfield scan:**
|
|
46
60
|
- "Is this an existing codebase I should scan?" with options:
|
|
47
61
|
- "Yes — scan and catalog existing code"
|
|
48
62
|
- "No — greenfield project"
|
|
49
63
|
|
|
50
|
-
|
|
64
|
+
## Step 2: Brownfield Scan (if requested)
|
|
51
65
|
|
|
52
66
|
If the user said yes to scanning:
|
|
53
67
|
1. Use Glob to find key directories: `src/`, `app/`, `lib/`, `components/`, `api/`, `pages/`, `utils/`, `types/`
|
|
@@ -55,7 +69,7 @@ If the user said yes to scanning:
|
|
|
55
69
|
3. Build a brief catalog of what exists (key components, patterns, data layer)
|
|
56
70
|
4. Include this in the CLAUDE.md Quick Context section
|
|
57
71
|
|
|
58
|
-
|
|
72
|
+
## Step 3: Create Project Files
|
|
59
73
|
|
|
60
74
|
Create these 5 files (create directories as needed):
|
|
61
75
|
|
|
@@ -76,7 +90,7 @@ Create these 5 files (create directories as needed):
|
|
|
76
90
|
| — | Run `/flow:spec` to define phases | — |
|
|
77
91
|
|
|
78
92
|
## What Was Built (This Session)
|
|
79
|
-
- Project initialized with `/flow:
|
|
93
|
+
- Project initialized with `/flow:setup`
|
|
80
94
|
- Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
|
|
81
95
|
|
|
82
96
|
## Key Decisions
|
|
@@ -95,6 +109,8 @@ Create these 5 files (create directories as needed):
|
|
|
95
109
|
| Version | Milestone | Status | Phases |
|
|
96
110
|
|---------|-----------|--------|--------|
|
|
97
111
|
| v1 | [first milestone] | Pending — needs `/flow:spec` | TBD |
|
|
112
|
+
[For each additional milestone:]
|
|
113
|
+
| v[N] | [milestone name] | Planned | TBD |
|
|
98
114
|
|
|
99
115
|
---
|
|
100
116
|
|
|
@@ -103,8 +119,18 @@ Create these 5 files (create directories as needed):
|
|
|
103
119
|
**Goal:** [milestone goal from user]
|
|
104
120
|
|
|
105
121
|
**Phases:** Run `/flow:spec` to define implementation phases.
|
|
122
|
+
|
|
123
|
+
[For each additional milestone:]
|
|
124
|
+
|
|
125
|
+
## v[N]: [milestone name]
|
|
126
|
+
|
|
127
|
+
**Goal:** [milestone goal]
|
|
128
|
+
|
|
129
|
+
**Phases:** Run `/flow:spec` when this milestone is active.
|
|
106
130
|
```
|
|
107
131
|
|
|
132
|
+
Note: The first milestone gets status "Pending — needs `/flow:spec`". All subsequent milestones get status "Planned". Each milestone gets its own section with its goal.
|
|
133
|
+
|
|
108
134
|
**`CLAUDE.md`:**
|
|
109
135
|
```
|
|
110
136
|
# [Project Name] — Claude Code Instructions
|
|
@@ -159,7 +185,7 @@ Format: PATTERN → CAUSE → FIX → RULE
|
|
|
159
185
|
|
|
160
186
|
**`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
|
|
161
187
|
|
|
162
|
-
|
|
188
|
+
## Step 4: Print Completion Message
|
|
163
189
|
|
|
164
190
|
```
|
|
165
191
|
Project initialized:
|
|
@@ -171,48 +197,3 @@ Project initialized:
|
|
|
171
197
|
|
|
172
198
|
Run `/flow:spec` to plan your first milestone.
|
|
173
199
|
```
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## New Milestone Mode
|
|
178
|
-
|
|
179
|
-
### Step 1: Read Context
|
|
180
|
-
|
|
181
|
-
Read `.planning/STATE.md` and `.planning/ROADMAP.md` to understand:
|
|
182
|
-
- What milestone just completed (or is completing)
|
|
183
|
-
- What version number to use next
|
|
184
|
-
- Current state of the project
|
|
185
|
-
|
|
186
|
-
### Step 2: Ask Milestone Question
|
|
187
|
-
|
|
188
|
-
Use AskUserQuestion:
|
|
189
|
-
- "What's the goal of this new milestone?" (free text)
|
|
190
|
-
- "What should it be called?" (free text, or suggest a name based on context)
|
|
191
|
-
|
|
192
|
-
### Step 3: Archive Completed Milestone
|
|
193
|
-
|
|
194
|
-
1. Read current ROADMAP.md phase details for the completed milestone
|
|
195
|
-
2. Write them to `.planning/archive/milestones-vX.md` (where X is the completed version)
|
|
196
|
-
3. If `PRD.md` exists, move it to `.planning/archive/PRD-vX.md` (read it, write to archive, delete original)
|
|
197
|
-
4. In ROADMAP.md, replace the completed milestone's phase details with just the summary row (mark as "Complete")
|
|
198
|
-
|
|
199
|
-
### Step 4: Update Planning Docs
|
|
200
|
-
|
|
201
|
-
**ROADMAP.md:**
|
|
202
|
-
- Add new milestone row to the table
|
|
203
|
-
- Add new milestone section with goal and "Run `/flow:spec` to define phases"
|
|
204
|
-
|
|
205
|
-
**STATE.md:**
|
|
206
|
-
- Replace with fresh state for the new milestone
|
|
207
|
-
- Reset phase progress table
|
|
208
|
-
- Note the milestone transition in "What Was Built"
|
|
209
|
-
|
|
210
|
-
### Step 5: Print Completion Message
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
Milestone [name] (v[X]) initialized.
|
|
214
|
-
- Archived: previous milestone details + PRD
|
|
215
|
-
- Updated: ROADMAP.md, STATE.md
|
|
216
|
-
|
|
217
|
-
Run `/flow:spec` to build the PRD for this milestone.
|
|
218
|
-
```
|
package/skills/flow-spec.md
CHANGED
|
@@ -16,7 +16,8 @@ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow
|
|
|
16
16
|
2. Read `CLAUDE.md` — understand project rules and tech stack
|
|
17
17
|
3. Read `PRD.md` if it exists — check for existing spec to build on
|
|
18
18
|
4. **Codebase scan** (brownfield projects):
|
|
19
|
-
- **
|
|
19
|
+
- **Exclusions:** NEVER scan these directories/files: `node_modules/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/`, `*.min.js`, `*.map`, `*.lock`. Use Glob with patterns like `src/**/*`, `app/**/*`, `lib/**/*` — never use bare `**/*` which includes generated files.
|
|
20
|
+
- **Size check first:** Use Glob with `src/**/*`, `app/**/*`, `lib/**/*`, `components/**/*` (excluding the above) to estimate relevant file count. If > 500 files, switch to focused mode (see below).
|
|
20
21
|
- **Standard mode (≤ 500 files):** Use Glob to find components, pages/routes, API endpoints, types, utilities, config files, database models. Use Grep for export patterns, route definitions, key function signatures. **Cap at 50 files sampled** — prioritize entry points, config, and type definitions.
|
|
21
22
|
- **Focused mode (> 500 files):** Scan ONLY: package.json/config files, entry points (index.ts, main.ts, app.ts), route definitions, database schema/models, and type definition files. Skip component trees, test files, and generated code entirely.
|
|
22
23
|
- Build internal summary: "Here's what exists that we can reuse"
|
|
@@ -114,6 +115,20 @@ Cover these areas thoroughly. There are no "rounds" — move fluidly between are
|
|
|
114
115
|
|
|
115
116
|
## Phase 3 — PRD Generation
|
|
116
117
|
|
|
118
|
+
### Minimum Viable PRD Check
|
|
119
|
+
|
|
120
|
+
Before generating the final PRD, validate:
|
|
121
|
+
- At least **3 user stories** with acceptance criteria have been discussed
|
|
122
|
+
- At least **1 implementation phase** has been defined
|
|
123
|
+
- At least **1 verification command** has been specified
|
|
124
|
+
|
|
125
|
+
If any check fails, print what's missing and use AskUserQuestion:
|
|
126
|
+
- "The PRD is thin — [missing items]. Want to continue the interview to flesh it out, or finalize as-is?"
|
|
127
|
+
- "Continue interview" — return to Phase 2 and probe the missing areas
|
|
128
|
+
- "Finalize as-is" — proceed with what we have
|
|
129
|
+
|
|
130
|
+
### Write PRD
|
|
131
|
+
|
|
117
132
|
Write `PRD.md` to the project root with this EXACT structure:
|
|
118
133
|
|
|
119
134
|
```markdown
|
package/skills/flow-status.md
CHANGED
|
@@ -17,7 +17,7 @@ Read ALL of the following in parallel:
|
|
|
17
17
|
- Count lessons in `tasks/lessons.md` (if exists)
|
|
18
18
|
|
|
19
19
|
IF both STATE.md AND ROADMAP.md are missing:
|
|
20
|
-
- Print: "No flow project found. Run `/flow:
|
|
20
|
+
- Print: "No flow project found. Run `/flow:setup` to set up, or `/flow:task` for a quick standalone fix."
|
|
21
21
|
- STOP here.
|
|
22
22
|
|
|
23
23
|
IF only one file exists, continue with what's available.
|
|
@@ -45,9 +45,13 @@ Use this explicit decision tree:
|
|
|
45
45
|
→ Primary: `/flow:spec` to create the execution plan
|
|
46
46
|
→ Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
|
|
47
47
|
|
|
48
|
-
**IF all phases are complete:**
|
|
48
|
+
**IF all phases are complete AND a next milestone with status "Planned" exists in ROADMAP.md:**
|
|
49
|
+
→ Primary: `/flow:done` to finalize this milestone (will auto-transition to next milestone)
|
|
50
|
+
→ Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
|
|
51
|
+
|
|
52
|
+
**IF all phases are complete AND no next milestone exists:**
|
|
49
53
|
→ Primary: `/flow:done` to finalize this milestone
|
|
50
|
-
→ Then: `/flow:
|
|
54
|
+
→ Then: `/flow:milestone` to add the next milestone
|
|
51
55
|
→ Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
|
|
52
56
|
|
|
53
57
|
**IF no phases exist in ROADMAP (milestone defined but not planned):**
|
|
@@ -65,7 +69,7 @@ Lessons: [N] rules
|
|
|
65
69
|
[routing recommendations from Step 3]
|
|
66
70
|
```
|
|
67
71
|
|
|
68
|
-
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:
|
|
72
|
+
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."
|
|
69
73
|
|
|
70
74
|
## Step 5 — No File Writes
|
|
71
75
|
|
package/skills/flow-task.md
CHANGED
|
@@ -11,7 +11,7 @@ You are executing the `/flow:task` skill. This is for small, focused work — bu
|
|
|
11
11
|
RULES:
|
|
12
12
|
- NO AGENT TEAMS. NO PRD. Single execution context.
|
|
13
13
|
- Exception: ONE Task agent for an isolated subtask to prevent context bloat.
|
|
14
|
-
- This skill MUST work without `/flow:
|
|
14
|
+
- This skill MUST work without `/flow:setup`. Missing planning files are fine.
|
|
15
15
|
|
|
16
16
|
## Step 1 — Context Load
|
|
17
17
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| Version | Milestone | Status | Phases |
|
|
6
6
|
|---------|-----------|--------|--------|
|
|
7
7
|
| v1 | {{FIRST_MILESTONE}} | Pending — needs `/flow:spec` | TBD |
|
|
8
|
+
{{ADDITIONAL_MILESTONES_TABLE}}
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -13,3 +14,5 @@
|
|
|
13
14
|
**Goal:** {{MILESTONE_GOAL}}
|
|
14
15
|
|
|
15
16
|
**Phases:** Run `/flow:spec` to define implementation phases.
|
|
17
|
+
|
|
18
|
+
{{ADDITIONAL_MILESTONES_SECTIONS}}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| — | Run `/flow:spec` to define phases | — |
|
|
14
14
|
|
|
15
15
|
## What Was Built (This Session)
|
|
16
|
-
- Project initialized with `/flow:
|
|
16
|
+
- Project initialized with `/flow:setup`
|
|
17
17
|
- Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
|
|
18
18
|
|
|
19
19
|
## Key Decisions
|