flow-cc 0.6.0 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-cc",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Structured workflow system for Claude Code — spec interviews, agent-team execution, session handoffs, compounding knowledge",
5
5
  "author": "Troy Hoffman",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@ Structure:
41
41
  # [Project Name] — Project State
42
42
 
43
43
  ## Current Position
44
- - **Milestone:** [name] (vX)
44
+ - **Milestone:** [name]
45
45
  - **Phase:** [current phase status]
46
46
  - **Branch:** [current branch]
47
47
  - **Active PRD:** [path to active PRD, or "None" if milestone complete]
@@ -98,9 +98,9 @@ Write `.claude/memory/session.md` with the following content:
98
98
  - **Archive check:** If the current milestone 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 phase details to `.planning/archive/milestones-vX.md`
101
+ - Move milestone phase details to `.planning/archive/milestones-{slug}.md`
102
102
  - Keep only the summary row in the ROADMAP milestone table
103
- - Archive the milestone's PRD: move `.planning/prds/{slug}.md` to `.planning/archive/PRD-{slug}.md`. If using legacy root `PRD.md`, move it to `.planning/archive/PRD-vX.md` instead.
103
+ - Archive the milestone's PRD: move `.planning/prds/{slug}.md` to `.planning/archive/PRD-{slug}.md`. If using legacy root `PRD.md`, move it to `.planning/archive/PRD-{slug}.md` instead.
104
104
  - Clear STATE.md "Active PRD" field (set to "None")
105
105
  - Mark the milestone as "Complete" in the ROADMAP table
106
106
  - **Milestone transition:** Check ROADMAP.md for the NEXT milestone with status "Planned":
@@ -163,11 +163,11 @@ Determine the next action and generate a copyable handoff prompt. Include the de
163
163
  ```
164
164
  - If milestone is complete AND a next milestone was transitioned to (from Step 3):
165
165
  ```
166
- [Developer Name] — Milestone [name] complete. Next: v[X] [next milestone name]. Run /flow:spec to plan it.
166
+ [Developer Name] — Milestone [name] complete. Next: [next milestone name]. Run /flow:spec to plan it.
167
167
  ```
168
168
  - If milestone is complete AND no next milestone exists:
169
169
  ```
170
- [Developer Name] — All milestones complete! Run /flow:milestone to plan what's next, or enjoy the win.
170
+ [Developer Name] — All milestones complete! Run /flow:triage to plan what's next, or enjoy the win.
171
171
  ```
172
172
 
173
173
  Print the handoff prompt in a fenced code block so the user can copy it.
@@ -1,104 +1,106 @@
1
- ---
2
- name: flow:intro
3
- description: Introduction to the Flow workflow system — shows all commands and how to use them
4
- user_invocable: true
5
- ---
6
-
7
- # /flow:intro — Welcome to Flow
8
-
9
- You are executing the `/flow:intro` skill. Print the following guide EXACTLY as written. Do NOT modify any files. This is purely informational.
10
-
11
- Print this:
12
-
13
- ---
14
-
15
- ## Flow — Your Workflow System
16
-
17
- Flow is 6 commands that turn your specs into shipped code through agent teams. Each command feeds the next.
18
-
19
- ### The Lifecycle
20
-
21
- ```
22
- /flow:setup → /flow:spec → /flow:go (repeat) → /flow:done
23
- (captures ↑ |
24
- full roadmap) | auto-transitions to |
25
- +---- next planned milestone ------+
26
-
27
- /flow:spec ← can pre-spec future milestones (each gets its own PRD in .planning/prds/)
28
-
29
- /flow:milestone ← add milestones to roadmap anytime
30
- /flow:task ← standalone path for bug fixes, cleanup, small features (no PRD needed)
31
- ```
32
-
33
- ### Command by Command
34
-
35
- **`/flow:setup`** — Run once per project
36
- - Asks you 4-5 questions (what is it, tech stack, verify commands, roadmap/milestones)
37
- - Captures your full roadmap upfront (paste a list or build one milestone at a time)
38
- - Creates the scaffolding: `CLAUDE.md`, `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`
39
- - If project already set up, tells you to use `/flow:milestone` or `/flow:spec` instead
40
-
41
- **`/flow:milestone`** — Add milestones to the roadmap
42
- - Adds new milestones to the project roadmap (paste a list or one at a time)
43
- - Shows current roadmap status before adding
44
- - If no milestone is active, activates the first new one
45
-
46
- **`/flow:task`**Run anytime for small work
47
- - Bug fixes, cleanup, one-off features — anything that doesn't need a full PRD
48
- - Works standalone without `/flow:setup`lowest friction entry to Flow
49
- - Executes, verifies, commits, and logs to STATE.md (if it exists)
50
- - Scope guard recommends `/flow:spec` if the task grows beyond 5 files or 3 layers
51
-
52
- **`/flow:spec`** Run once per milestone
53
- - Interviews you about scope, user stories, technical design, trade-offs, and phasing
54
- - You can say "done" or "that's enough" anytime to cut the interview short
55
- - Produces `.planning/prds/{milestone}.md` the execution contract with wave-based phases, file lists, and acceptance criteria
56
- - Can pre-spec future milestones in parallel terminal windows (each milestone gets its own PRD file)
57
- - Updates ROADMAP and STATE to reflect the plan (for the current milestone; future milestone specs skip STATE updates)
58
-
59
- **`/flow:go`** Run once per phase (this is where the work happens)
60
- - Reads the PRD, finds the next pending phase
61
- - Checks for staleness (did prior phases change things this phase references?)
62
- - Spawns agent teams per the wave structure in the PRD
63
- - Verifies after each wave, commits when done
64
- - Updates docs and prints "run `/flow:go` again for the next phase"
65
-
66
- **`/flow:done`** Run at end of every session
67
- - Replaces STATE.md with current status
68
- - Updates ROADMAP.md with phase completions
69
- - Auto-transitions to the next planned milestone when the current one completes
70
- - Captures lessons as one-liners, enforces 10-item cap (promotes to CLAUDE.md when full)
71
- - Commits doc updates
72
- - Generates a handoff prompt you copy-paste to start the next session
73
-
74
- **`/flow:status`** Run anytime, read-only
75
- - Quick "where am I?" — milestone, phase progress, next step, lesson count
76
-
77
- **`/flow:update`**Run anytime to update Flow
78
- - Pulls latest changes from the flow-plugin repo and re-installs all skills
79
- - No need to remember where you cloned the repo — it finds it automatically
80
-
81
- ### Typical Session
82
-
83
- ```
84
- 1. Paste the handoff prompt from last session (or /flow:status to orient)
85
- 2. /flow:go ← executes the next phase
86
- 3. /flow:go ← executes the phase after that (if time permits)
87
- 4. /flow:done wraps up, gives you the handoff prompt for tomorrow
88
- ```
89
-
90
- **Quick fix mid-session?** Run `/flow:task fix the broken test` — no PRD, no ceremony. It executes, verifies, commits, and you're back to `/flow:go`.
91
-
92
- ### Starting a Brand New Project
93
-
94
- ```
95
- 1. /flow:setup ← scaffolds everything
96
- 2. /flow:spec ← interview → PRD
97
- 3. /flow:go phase 1
98
- 4. /flow:donewrap up
99
- ```
100
-
101
- ### Learn More
102
-
103
- - Full design doc: see `DESIGN.md` in the flow-plugin repo
104
- - Compatible with GSD: `/gsd:debug` and `/gsd:map-codebase` still work alongside Flow
1
+ ---
2
+ name: flow:intro
3
+ description: Introduction to the Flow workflow system — shows all commands and how to use them
4
+ user_invocable: true
5
+ ---
6
+
7
+ # /flow:intro — Welcome to Flow
8
+
9
+ You are executing the `/flow:intro` skill. Print the following guide EXACTLY as written. Do NOT modify any files. This is purely informational.
10
+
11
+ Print this:
12
+
13
+ ---
14
+
15
+ ## Flow — Your Workflow System
16
+
17
+ Flow is a structured workflow for Claude Code. Four core commands that turn your specs into shipped code through agent teams.
18
+
19
+ ### The Lifecycle
20
+
21
+ ```
22
+ /flow:triage → /flow:spec → /flow:go (repeat) → /flow:done
23
+ (intake) (plan) (build) (wrap)
24
+ |
25
+ | auto-transitions to |
26
+ +---- next planned milestone ------+
27
+
28
+ /flow:spec ← can pre-spec future milestones (each gets its own PRD in .planning/prds/)
29
+
30
+ /flow:task ← standalone path for bug fixes, cleanup, small features (no PRD needed)
31
+ ```
32
+
33
+ ### Command by Command
34
+
35
+ **`/flow:setup`** — Run once per project
36
+ - Asks you 4-5 questions (what is it, tech stack, verify commands, roadmap/milestones)
37
+ - Captures your full roadmap upfront (paste a list or build one milestone at a time)
38
+ - Creates the scaffolding: `CLAUDE.md`, `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`
39
+ - If project already set up, tells you to use `/flow:triage` or `/flow:spec` instead
40
+
41
+ **`/flow:triage`** — Sort a brain dump into action
42
+ - Takes unstructured text (bullets, stream of consciousness, whatever)
43
+ - Categorizes each item: Linear Issue, ROADMAP Entry, Milestone, Lesson, or Discard
44
+ - Milestones get added to ROADMAP.md with status "Planned"
45
+ - Linear issues created automatically (if Linear MCP available)
46
+ - This is the single intake command use it to add milestones, capture ideas, or file bugs
47
+
48
+ **`/flow:task`**Run anytime for small work
49
+ - Bug fixes, cleanup, one-off features anything that doesn't need a full PRD
50
+ - Works standalone without `/flow:setup` lowest friction entry to Flow
51
+ - Executes, verifies, commits, and logs to STATE.md (if it exists)
52
+ - Scope guard recommends `/flow:spec` if the task grows beyond 5 files or 3 layers
53
+
54
+ **`/flow:spec`** Run once per milestone
55
+ - Interviews you about scope, user stories, technical design, trade-offs, and phasing
56
+ - You can say "done" or "that's enough" anytime to cut the interview short
57
+ - Produces `.planning/prds/{milestone}.md` the execution contract with wave-based phases, file lists, and acceptance criteria
58
+ - Can pre-spec future milestones in parallel terminal windows (each milestone gets its own PRD file)
59
+ - Updates ROADMAP and STATE to reflect the plan (for the current milestone; future milestone specs skip STATE updates)
60
+
61
+ **`/flow:go`** Run once per phase (this is where the work happens)
62
+ - Reads the PRD, finds the next pending phase
63
+ - Checks for staleness (did prior phases change things this phase references?)
64
+ - Spawns agent teams per the wave structure in the PRD
65
+ - Verifies after each wave, commits when done
66
+ - Updates docs and prints "run `/flow:go` again for the next phase"
67
+
68
+ **`/flow:done`** Run at end of every session
69
+ - Replaces STATE.md with current status
70
+ - Updates ROADMAP.md with phase completions
71
+ - Auto-transitions to the next planned milestone when the current one completes
72
+ - Captures lessons as one-liners, enforces 10-item cap (promotes to CLAUDE.md when full)
73
+ - Commits doc updates
74
+ - Generates a handoff prompt you copy-paste to start the next session
75
+
76
+ **`/flow:status`** — Run anytime, read-only
77
+ - Quick "where am I?" milestone, phase progress, next step, lesson count
78
+
79
+ **`/flow:update`** Run anytime to update Flow
80
+ - Pulls latest changes from the flow-plugin repo and re-installs all skills
81
+ - No need to remember where you cloned the repo — it finds it automatically
82
+
83
+ ### Typical Session
84
+
85
+ ```
86
+ 1. Paste the handoff prompt from last session (or /flow:status to orient)
87
+ 2. /flow:go executes the next phase
88
+ 3. /flow:go ← executes the phase after that (if time permits)
89
+ 4. /flow:done ← wraps up, gives you the handoff prompt for tomorrow
90
+ ```
91
+
92
+ **Quick fix mid-session?** Run `/flow:task fix the broken test` — no PRD, no ceremony. It executes, verifies, commits, and you're back to `/flow:go`.
93
+
94
+ ### Starting a Brand New Project
95
+
96
+ ```
97
+ 1. /flow:setup scaffolds everything
98
+ 2. /flow:specinterview → PRD
99
+ 3. /flow:go ← phase 1
100
+ 4. /flow:done ← wrap up
101
+ ```
102
+
103
+ ### Learn More
104
+
105
+ - Full design doc: see `DESIGN.md` in the flow-plugin repo
106
+ - Compatible with GSD: `/gsd:debug` and `/gsd:map-codebase` still work alongside Flow
@@ -1,196 +1,196 @@
1
- ---
2
- name: flow:setup
3
- description: Set up a new project with Flow planning scaffolding
4
- user_invocable: true
5
- ---
6
-
7
- # /flow:setup — Set Up New Project
8
-
9
- You are executing the `/flow:setup` skill. This sets up the planning scaffolding for a new project.
10
-
11
- ## Guard: Already Initialized
12
-
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
-
17
- ---
18
-
19
- ## Step 1: Ask Setup Questions
20
-
21
- Use AskUserQuestion to gather project info. Ask these questions (you may combine into 2-3 AskUserQuestion calls):
22
-
23
- **Question 1 — Project basics:**
24
- - "What is this project?" (one sentence description)
25
-
26
- **Question 2 — Tech stack:**
27
- - "What's the tech stack?" with options like:
28
- - "Next.js + TypeScript + PostgreSQL"
29
- - "Python + FastAPI + PostgreSQL"
30
- - "React + Node.js + MongoDB"
31
- - (Other — user types custom)
32
-
33
- **Question 3 — Verification commands:**
34
- - "What commands verify the build?" with options like:
35
- - "npx tsc --noEmit && npx biome check"
36
- - "pytest && mypy ."
37
- - "cargo build && cargo test"
38
- - (Other — user types custom)
39
-
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"
58
-
59
- **Question 5 — Brownfield scan:**
60
- - "Is this an existing codebase I should scan?" with options:
61
- - "Yes — scan and catalog existing code"
62
- - "No — greenfield project"
63
-
64
- ## Step 2: Brownfield Scan (if requested)
65
-
66
- If the user said yes to scanning:
67
- 1. Use Glob to find key directories: `src/`, `app/`, `lib/`, `components/`, `api/`, `pages/`, `utils/`, `types/`
68
- 2. Use Grep to find patterns: exports, route definitions, database models, config files
69
- 3. Build a brief catalog of what exists (key components, patterns, data layer)
70
- 4. Include this in the CLAUDE.md Quick Context section
71
-
72
- ## Step 3: Create Project Files
73
-
74
- Create these 5 files (create directories as needed):
75
-
76
- **`.planning/STATE.md`:**
77
- ```
78
- # [Project Name] — Project State
79
-
80
- ## Current Position
81
- - **Milestone:** [first milestone name] (v1)
82
- - **Phase:** Not started — run `/flow:spec` to build PRD
83
- - **Branch:** main
84
- - **Active PRD:** None — run `/flow:spec` to create
85
- - **Last Session:** [today's date]
86
-
87
- ## Milestone Progress
88
-
89
- | Phase | Name | Status |
90
- |-------|------|--------|
91
- | — | Run `/flow:spec` to define phases | — |
92
-
93
- ## What Was Built (This Session)
94
- - Project initialized with `/flow:setup`
95
- - Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
96
-
97
- ## Key Decisions
98
- - (none yet)
99
-
100
- ## Next Actions
101
- 1. Run `/flow:spec` to interview and generate PRD for [first milestone]
102
- ```
103
-
104
- **`.planning/ROADMAP.md`:**
105
- ```
106
- # [Project Name] — Roadmap
107
-
108
- ## Milestones
109
-
110
- | Version | Milestone | Status | Phases |
111
- |---------|-----------|--------|--------|
112
- | v1 | [first milestone] | Pending — needs `/flow:spec` | TBD |
113
- [For each additional milestone:]
114
- | v[N] | [milestone name] | Planned | TBD |
115
-
116
- ---
117
-
118
- ## v1: [first milestone]
119
-
120
- **Goal:** [milestone goal from user]
121
-
122
- **Phases:** Run `/flow:spec` to define implementation phases.
123
-
124
- [For each additional milestone:]
125
-
126
- ## v[N]: [milestone name]
127
-
128
- **Goal:** [milestone goal]
129
-
130
- **Phases:** Run `/flow:spec` when this milestone is active.
131
- ```
132
-
133
- 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.
134
-
135
- **`CLAUDE.md`:**
136
- ```
137
- # [Project Name] — Claude Code Instructions
138
-
139
- ## Quick Context
140
- [Project description from user]
141
-
142
- **Tech Stack:** [tech stack from user]
143
- [If brownfield: brief catalog of existing code]
144
-
145
- ### START (Every Session)
146
- 1. Read this file (CLAUDE.md)
147
- 2. Read `.planning/STATE.md` for current status
148
- 3. Read `.planning/ROADMAP.md` for milestone progress
149
- 4. Read active PRD from `.planning/prds/` for current milestone (if one exists)
150
-
151
- ## Execution Rules
152
- - **Plan before building.** For non-trivial work, read the milestone's PRD in `.planning/prds/` before touching anything.
153
- - **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
154
- - **Verify everything.** Run [verification commands from user] after agent work lands. Nothing is done until proven.
155
-
156
- ## Git Workflow
157
- - All changes via PR. Never commit directly to main.
158
- - Branch naming: `fix/short-description` or `feat/short-description`
159
-
160
- ## Session-End Docs (MANDATORY)
161
- 1. `.planning/STATE.md` — replace session notes (don't append), keep <80 lines
162
- 2. `.planning/ROADMAP.md` — update phase progress
163
- 3. `tasks/lessons.md` — add new lessons, refine existing ones
164
- 4. Commit doc updates to feature branch
165
-
166
- ## Critical Rules
167
- - No assumptions — ask if requirements unclear
168
- - Fight entropy — leave code better than you found it
169
- ```
170
-
171
- **`tasks/lessons.md`:**
172
- ```
173
- # [Project Name] — Lessons (max 10 active)
174
-
175
- One-liner format: `- **[topic]** The rule`
176
-
177
- <!-- EXAMPLE: - **[agent context]** Always tell agents exactly which functions/lines to read — never "read file.ts", say "read file.ts lines 50-120" -->
178
- ```
179
-
180
- **`.planning/prds/`** — Create this empty directory (use `mkdir -p` via Bash). PRDs are stored here per-milestone.
181
-
182
- **`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
183
-
184
- ## Step 4: Print Completion Message
185
-
186
- ```
187
- Project initialized:
188
- - CLAUDE.md — project execution rules
189
- - .planning/STATE.md — session GPS
190
- - .planning/ROADMAP.md — milestone tracker
191
- - tasks/lessons.md — active lessons (max 10)
192
- - .planning/prds/ — per-milestone PRD specs
193
- - .planning/archive/ — for completed milestones
194
-
195
- Run `/flow:spec` to plan your first milestone.
196
- ```
1
+ ---
2
+ name: flow:setup
3
+ description: Set up a new project with Flow planning scaffolding
4
+ user_invocable: true
5
+ ---
6
+
7
+ # /flow:setup — Set Up New Project
8
+
9
+ You are executing the `/flow:setup` skill. This sets up the planning scaffolding for a new project.
10
+
11
+ ## Guard: Already Initialized
12
+
13
+ Check if `.planning/STATE.md` already exists:
14
+ - **If it exists** → Print: "This project is already set up. Run `/flow:triage` to add milestones, or `/flow:spec` to spec the current one." and **STOP. Do not overwrite.**
15
+ - **If it does NOT exist** → Continue with setup below.
16
+
17
+ ---
18
+
19
+ ## Step 1: Ask Setup Questions
20
+
21
+ Use AskUserQuestion to gather project info. Ask these questions (you may combine into 2-3 AskUserQuestion calls):
22
+
23
+ **Question 1 — Project basics:**
24
+ - "What is this project?" (one sentence description)
25
+
26
+ **Question 2 — Tech stack:**
27
+ - "What's the tech stack?" with options like:
28
+ - "Next.js + TypeScript + PostgreSQL"
29
+ - "Python + FastAPI + PostgreSQL"
30
+ - "React + Node.js + MongoDB"
31
+ - (Other — user types custom)
32
+
33
+ **Question 3 — Verification commands:**
34
+ - "What commands verify the build?" with options like:
35
+ - "npx tsc --noEmit && npx biome check"
36
+ - "pytest && mypy ."
37
+ - "cargo build && cargo test"
38
+ - (Other — user types custom)
39
+
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., "Auth — user registration and login", "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:triage`." with options:
56
+ - "I have more to add" (user enters additional milestones)
57
+ - "That's it for now"
58
+
59
+ **Question 5 — Brownfield scan:**
60
+ - "Is this an existing codebase I should scan?" with options:
61
+ - "Yes — scan and catalog existing code"
62
+ - "No — greenfield project"
63
+
64
+ ## Step 2: Brownfield Scan (if requested)
65
+
66
+ If the user said yes to scanning:
67
+ 1. Use Glob to find key directories: `src/`, `app/`, `lib/`, `components/`, `api/`, `pages/`, `utils/`, `types/`
68
+ 2. Use Grep to find patterns: exports, route definitions, database models, config files
69
+ 3. Build a brief catalog of what exists (key components, patterns, data layer)
70
+ 4. Include this in the CLAUDE.md Quick Context section
71
+
72
+ ## Step 3: Create Project Files
73
+
74
+ Create these 5 files (create directories as needed):
75
+
76
+ **`.planning/STATE.md`:**
77
+ ```
78
+ # [Project Name] — Project State
79
+
80
+ ## Current Position
81
+ - **Milestone:** [first milestone name]
82
+ - **Phase:** Not started — run `/flow:spec` to build PRD
83
+ - **Branch:** main
84
+ - **Active PRD:** None — run `/flow:spec` to create
85
+ - **Last Session:** [today's date]
86
+
87
+ ## Milestone Progress
88
+
89
+ | Phase | Name | Status |
90
+ |-------|------|--------|
91
+ | — | Run `/flow:spec` to define phases | — |
92
+
93
+ ## What Was Built (This Session)
94
+ - Project initialized with `/flow:setup`
95
+ - Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
96
+
97
+ ## Key Decisions
98
+ - (none yet)
99
+
100
+ ## Next Actions
101
+ 1. Run `/flow:spec` to interview and generate PRD for [first milestone]
102
+ ```
103
+
104
+ **`.planning/ROADMAP.md`:**
105
+ ```
106
+ # [Project Name] — Roadmap
107
+
108
+ ## Milestones
109
+
110
+ | Milestone | Status | Phases |
111
+ |-----------|--------|--------|
112
+ | [first milestone] | Pending — needs `/flow:spec` | TBD |
113
+ [For each additional milestone:]
114
+ | [milestone name] | Planned | TBD |
115
+
116
+ ---
117
+
118
+ ## [first milestone]
119
+
120
+ **Goal:** [milestone goal from user]
121
+
122
+ **Phases:** Run `/flow:spec` to define implementation phases.
123
+
124
+ [For each additional milestone:]
125
+
126
+ ## [milestone name]
127
+
128
+ **Goal:** [milestone goal]
129
+
130
+ **Phases:** Run `/flow:spec` when this milestone is active.
131
+ ```
132
+
133
+ 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.
134
+
135
+ **`CLAUDE.md`:**
136
+ ```
137
+ # [Project Name] — Claude Code Instructions
138
+
139
+ ## Quick Context
140
+ [Project description from user]
141
+
142
+ **Tech Stack:** [tech stack from user]
143
+ [If brownfield: brief catalog of existing code]
144
+
145
+ ### START (Every Session)
146
+ 1. Read this file (CLAUDE.md)
147
+ 2. Read `.planning/STATE.md` for current status
148
+ 3. Read `.planning/ROADMAP.md` for milestone progress
149
+ 4. Read active PRD from `.planning/prds/` for current milestone (if one exists)
150
+
151
+ ## Execution Rules
152
+ - **Plan before building.** For non-trivial work, read the milestone's PRD in `.planning/prds/` before touching anything.
153
+ - **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
154
+ - **Verify everything.** Run [verification commands from user] after agent work lands. Nothing is done until proven.
155
+
156
+ ## Git Workflow
157
+ - All changes via PR. Never commit directly to main.
158
+ - Branch naming: `fix/short-description` or `feat/short-description`
159
+
160
+ ## Session-End Docs (MANDATORY)
161
+ 1. `.planning/STATE.md` — replace session notes (don't append), keep <80 lines
162
+ 2. `.planning/ROADMAP.md` — update phase progress
163
+ 3. `tasks/lessons.md` — add new lessons, refine existing ones
164
+ 4. Commit doc updates to feature branch
165
+
166
+ ## Critical Rules
167
+ - No assumptions — ask if requirements unclear
168
+ - Fight entropy — leave code better than you found it
169
+ ```
170
+
171
+ **`tasks/lessons.md`:**
172
+ ```
173
+ # [Project Name] — Lessons (max 10 active)
174
+
175
+ One-liner format: `- **[topic]** The rule`
176
+
177
+ <!-- EXAMPLE: - **[agent context]** Always tell agents exactly which functions/lines to read — never "read file.ts", say "read file.ts lines 50-120" -->
178
+ ```
179
+
180
+ **`.planning/prds/`** — Create this empty directory (use `mkdir -p` via Bash). PRDs are stored here per-milestone.
181
+
182
+ **`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
183
+
184
+ ## Step 4: Print Completion Message
185
+
186
+ ```
187
+ Project initialized:
188
+ - CLAUDE.md — project execution rules
189
+ - .planning/STATE.md — session GPS
190
+ - .planning/ROADMAP.md — milestone tracker
191
+ - tasks/lessons.md — active lessons (max 10)
192
+ - .planning/prds/ — per-milestone PRD specs
193
+ - .planning/archive/ — for completed milestones
194
+
195
+ Run `/flow:spec` to plan your first milestone.
196
+ ```