flow-cc 0.1.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.
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: flow:init
3
+ description: Initialize a new project or start a new milestone with planning scaffolding
4
+ user_invocable: true
5
+ ---
6
+
7
+ # /flow:init — Initialize Project or Milestone
8
+
9
+ You are executing the `/flow:init` skill. This sets up the planning scaffolding for a new project or a new milestone within an existing project.
10
+
11
+ ## Mode Detection
12
+
13
+ Check if `.planning/STATE.md` exists:
14
+ - **If it does NOT exist** → New Project Mode
15
+ - **If it exists** → New Milestone Mode
16
+
17
+ ---
18
+
19
+ ## New Project Mode
20
+
21
+ ### Step 1: Ask Setup Questions
22
+
23
+ Use AskUserQuestion to gather project info. Ask these questions (you may combine into 2-3 AskUserQuestion calls):
24
+
25
+ **Question 1 — Project basics:**
26
+ - "What is this project?" (one sentence description)
27
+
28
+ **Question 2 — Tech stack:**
29
+ - "What's the tech stack?" with options like:
30
+ - "Next.js + TypeScript + PostgreSQL"
31
+ - "Python + FastAPI + PostgreSQL"
32
+ - "React + Node.js + MongoDB"
33
+ - (Other — user types custom)
34
+
35
+ **Question 3 — Verification commands:**
36
+ - "What commands verify the build?" with options like:
37
+ - "npx tsc --noEmit && npx biome check"
38
+ - "pytest && mypy ."
39
+ - "cargo build && cargo test"
40
+ - (Other — user types custom)
41
+
42
+ **Question 4 — First milestone:**
43
+ - "What's the first milestone?" (name + one-sentence goal)
44
+
45
+ **Question 5 — Brownfield scan:**
46
+ - "Is this an existing codebase I should scan?" with options:
47
+ - "Yes — scan and catalog existing code"
48
+ - "No — greenfield project"
49
+
50
+ ### Step 2: Brownfield Scan (if requested)
51
+
52
+ If the user said yes to scanning:
53
+ 1. Use Glob to find key directories: `src/`, `app/`, `lib/`, `components/`, `api/`, `pages/`, `utils/`, `types/`
54
+ 2. Use Grep to find patterns: exports, route definitions, database models, config files
55
+ 3. Build a brief catalog of what exists (key components, patterns, data layer)
56
+ 4. Include this in the CLAUDE.md Quick Context section
57
+
58
+ ### Step 3: Create Project Files
59
+
60
+ Create these 5 files (create directories as needed):
61
+
62
+ **`.planning/STATE.md`:**
63
+ ```
64
+ # [Project Name] — Project State
65
+
66
+ ## Current Position
67
+ - **Milestone:** [first milestone name] (v1)
68
+ - **Phase:** Not started — run `/flow:spec` to build PRD
69
+ - **Branch:** main
70
+ - **Last Session:** [today's date]
71
+
72
+ ## Milestone Progress
73
+
74
+ | Phase | Name | Status |
75
+ |-------|------|--------|
76
+ | — | Run `/flow:spec` to define phases | — |
77
+
78
+ ## What Was Built (This Session)
79
+ - Project initialized with `/flow:init`
80
+ - Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
81
+
82
+ ## Key Decisions
83
+ - (none yet)
84
+
85
+ ## Next Actions
86
+ 1. Run `/flow:spec` to interview and generate PRD for [first milestone]
87
+ ```
88
+
89
+ **`.planning/ROADMAP.md`:**
90
+ ```
91
+ # [Project Name] — Roadmap
92
+
93
+ ## Milestones
94
+
95
+ | Version | Milestone | Status | Phases |
96
+ |---------|-----------|--------|--------|
97
+ | v1 | [first milestone] | Pending — needs `/flow:spec` | TBD |
98
+
99
+ ---
100
+
101
+ ## v1: [first milestone]
102
+
103
+ **Goal:** [milestone goal from user]
104
+
105
+ **Phases:** Run `/flow:spec` to define implementation phases.
106
+ ```
107
+
108
+ **`CLAUDE.md`:**
109
+ ```
110
+ # [Project Name] — Claude Code Instructions
111
+
112
+ ## Quick Context
113
+ [Project description from user]
114
+
115
+ **Tech Stack:** [tech stack from user]
116
+ [If brownfield: brief catalog of existing code]
117
+
118
+ ### START (Every Session)
119
+ 1. Read this file (CLAUDE.md)
120
+ 2. Read `.planning/STATE.md` for current status
121
+ 3. Read `.planning/ROADMAP.md` for milestone progress
122
+ 4. Read `PRD.md` for current execution spec (if one exists)
123
+
124
+ ## Execution Rules
125
+ - **Plan before building.** For non-trivial work, read the PRD phase section before touching anything.
126
+ - **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
127
+ - **Verify everything.** Run [verification commands from user] after agent work lands. Nothing is done until proven.
128
+
129
+ ## Git Workflow
130
+ - All changes via PR. Never commit directly to main.
131
+ - Branch naming: `fix/short-description` or `feat/short-description`
132
+
133
+ ## Session-End Docs (MANDATORY)
134
+ 1. `.planning/STATE.md` — replace session notes (don't append), keep <80 lines
135
+ 2. `.planning/ROADMAP.md` — update phase progress
136
+ 3. `tasks/lessons.md` — add new lessons, refine existing ones
137
+ 4. Commit doc updates to feature branch
138
+
139
+ ## Critical Rules
140
+ - No assumptions — ask if requirements unclear
141
+ - Fight entropy — leave code better than you found it
142
+ ```
143
+
144
+ **`tasks/lessons.md`:**
145
+ ```
146
+ # [Project Name] — Lessons Learned
147
+
148
+ Format: PATTERN → CAUSE → FIX → RULE
149
+
150
+ ## Execution Patterns
151
+ <!-- Lessons about workflow, delegation, verification -->
152
+
153
+ ## Domain Knowledge
154
+ <!-- Lessons about business logic, data models, user behavior -->
155
+
156
+ ## Technical Patterns
157
+ <!-- Lessons about the tech stack, libraries, deployment -->
158
+ ```
159
+
160
+ **`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
161
+
162
+ ### Step 4: Print Completion Message
163
+
164
+ ```
165
+ Project initialized:
166
+ - CLAUDE.md — project execution rules
167
+ - .planning/STATE.md — session GPS
168
+ - .planning/ROADMAP.md — milestone tracker
169
+ - tasks/lessons.md — anti-pattern catalog
170
+ - .planning/archive/ — for completed milestones
171
+
172
+ Run `/flow:spec` to plan your first milestone.
173
+ ```
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
+ ```
@@ -0,0 +1,92 @@
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 5 commands that turn your specs into shipped code through agent teams. Each command feeds the next.
18
+
19
+ ### The Lifecycle
20
+
21
+ ```
22
+ /flow:init → /flow:spec → /flow:go (repeat) → /flow:done
23
+
24
+ handoff prompt for next session
25
+
26
+ /flow:task ← standalone path for bug fixes, cleanup, small features (no PRD needed)
27
+ ```
28
+
29
+ ### Command by Command
30
+
31
+ **`/flow:init`** — Run once per project (or once per new milestone)
32
+ - New project: asks you 4-5 questions (what is it, tech stack, verify commands, first milestone)
33
+ - Creates the scaffolding: `CLAUDE.md`, `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`
34
+ - Existing project: archives the old milestone + PRD, sets up the next one
35
+
36
+ **`/flow:task`** — Run anytime for small work
37
+ - Bug fixes, cleanup, one-off features — anything that doesn't need a full PRD
38
+ - Works standalone without `/flow:init` — lowest friction entry to Flow
39
+ - Executes, verifies, commits, and logs to STATE.md (if it exists)
40
+ - Scope guard recommends `/flow:spec` if the task grows beyond 5 files or 3 layers
41
+
42
+ **`/flow:spec`** — Run once per milestone
43
+ - Interviews you about scope, user stories, technical design, trade-offs, and phasing
44
+ - You can say "done" or "that's enough" anytime to cut the interview short
45
+ - Produces `PRD.md` — the execution contract with wave-based phases, file lists, and acceptance criteria
46
+ - Updates ROADMAP and STATE to reflect the plan
47
+
48
+ **`/flow:go`** — Run once per phase (this is where the work happens)
49
+ - Reads the PRD, finds the next pending phase
50
+ - Checks for staleness (did prior phases change things this phase references?)
51
+ - Spawns agent teams per the wave structure in the PRD
52
+ - Verifies after each wave, commits when done
53
+ - Updates docs and prints "run `/flow:go` again for the next phase"
54
+
55
+ **`/flow:done`** — Run at end of every session
56
+ - Replaces STATE.md with current status
57
+ - Updates ROADMAP.md with phase completions
58
+ - Asks about lessons, refines existing ones
59
+ - Commits doc updates
60
+ - Generates a handoff prompt you copy-paste to start the next session
61
+
62
+ **`/flow:status`** — Run anytime, read-only
63
+ - Quick "where am I?" — milestone, phase progress, next step, lesson count
64
+
65
+ **`/flow:update`** — Run anytime to update Flow
66
+ - Pulls latest changes from the flow-plugin repo and re-installs all skills
67
+ - No need to remember where you cloned the repo — it finds it automatically
68
+
69
+ ### Typical Session
70
+
71
+ ```
72
+ 1. Paste the handoff prompt from last session (or /flow:status to orient)
73
+ 2. /flow:go ← executes the next phase
74
+ 3. /flow:go ← executes the phase after that (if time permits)
75
+ 4. /flow:done ← wraps up, gives you the handoff prompt for tomorrow
76
+ ```
77
+
78
+ **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`.
79
+
80
+ ### Starting a Brand New Project
81
+
82
+ ```
83
+ 1. /flow:init ← scaffolds everything
84
+ 2. /flow:spec ← interview → PRD
85
+ 3. /flow:go ← phase 1
86
+ 4. /flow:done ← wrap up
87
+ ```
88
+
89
+ ### Learn More
90
+
91
+ - Full design doc: see `DESIGN.md` in the flow-plugin repo
92
+ - Compatible with GSD: `/gsd:debug` and `/gsd:map-codebase` still work alongside Flow
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: flow:spec
3
+ description: Spec interview that produces an executable PRD with wave-based phases and testable acceptance criteria
4
+ user_invocable: true
5
+ ---
6
+
7
+ # /flow:spec — Spec Interview → Executable PRD
8
+
9
+ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow system. You will interview the user about their milestone, then produce a detailed PRD that agents can execute without ambiguity.
10
+
11
+ **Interview mode:** Always thorough by default. The user can say "done", "finalize", "that's enough", or "move on" at ANY time to wrap up early. Respect their signal and finalize with whatever depth has been achieved.
12
+
13
+ ## Phase 1 — Context Gathering (automatic, no user input needed)
14
+
15
+ 1. Read `.planning/STATE.md` and `.planning/ROADMAP.md` — understand current milestone and what's done
16
+ 2. Read `CLAUDE.md` — understand project rules and tech stack
17
+ 3. Read `PRD.md` if it exists — check for existing spec to build on
18
+ 4. **Codebase scan** (brownfield projects):
19
+ - Use Glob to find: components, pages/routes, API endpoints, types, utilities, config files, database models
20
+ - Use Grep for: export patterns, route definitions, key function signatures
21
+ - Build internal summary: "Here's what exists that we can reuse"
22
+ 5. Print a brief context summary to the user: "Here's what I found in the codebase: [key components, patterns, data layer]. Starting the spec interview."
23
+
24
+ ## Phase 2 — Adaptive Interview
25
+
26
+ ### CRITICAL RULES (follow these exactly)
27
+
28
+ 1. **USE AskUserQuestion FOR ALL QUESTIONS.** Never just print questions as text. Always use the AskUserQuestion tool so the user gets structured prompts with selectable options. Provide 2-4 concrete options per question based on what you learned in Phase 1.
29
+
30
+ 2. **ASK NON-OBVIOUS QUESTIONS.** Don't just ask "what features do you want?" — you already read the codebase. Ask questions that PROBE deeper:
31
+ - "I see you have [existing pattern]. Should we extend that or build a new approach?"
32
+ - "What happens when [edge case] occurs?"
33
+ - "You mentioned [X] — does that mean [Y] is also needed, or is that separate?"
34
+ - "What's the failure mode here? What does the user see when things go wrong?"
35
+ - "Who else touches this data/workflow? Any downstream effects?"
36
+ - "What's the minimum version of this that would be useful?"
37
+
38
+ 3. **CONTINUE UNTIL THE USER SAYS STOP.** Do NOT stop after covering all 7 areas once. After each answer, immediately ask the next question. Keep going deeper until the user says "done", "finalize", "that's enough", "ship it", or similar. A thorough interview is 15-30 questions, not 5.
39
+
40
+ 4. **MAINTAIN A RUNNING DRAFT.** Every 2-3 questions, update PRD.md with what you've learned so far. Print: "Updated PRD draft — added [brief summary]." The user should see the spec taking shape in real-time, not all at the end.
41
+
42
+ 5. **BE ADAPTIVE.** Base your next question on the previous answer. If the user reveals something surprising, probe deeper on THAT — don't robotically move to the next category. The best specs come from following interesting threads.
43
+
44
+ ### First-Principles Mode (optional)
45
+
46
+ If the user says "challenge this", "first principles", or "push back" — start with 3-5 challenge questions before detailed spec gathering:
47
+ - "Why build this at all? What's the cost of NOT building it?"
48
+ - "Is there a simpler way to achieve 80% of this value?"
49
+ - "What assumptions are we making that might be wrong?"
50
+ - "Who is this really for, and have they asked for it?"
51
+ - "What would you cut if you had half the time?"
52
+
53
+ Then proceed to the coverage areas below.
54
+
55
+ ### Coverage Areas
56
+
57
+ Cover these areas thoroughly. There are no "rounds" — move fluidly between areas based on the conversation. Circle back to earlier areas when later answers reveal new information.
58
+
59
+ **1. Scope Definition**
60
+ - What features are IN scope for this milestone? What's the MVP vs. the full vision?
61
+ - What is explicitly OUT of scope / deferred to a future milestone?
62
+ - Is there any code that is sacred (must NOT be touched)? Why?
63
+ - What existing code/features should we ignore entirely (not break, not improve, not touch)?
64
+
65
+ **2. User Stories (CRITICAL — spend the most time here)**
66
+ - What does the user actually DO? Walk through the key workflows step by step.
67
+ - What should they see at each step? What feedback do they get?
68
+ - Frame as: "As [role], I want [action], so that [outcome]"
69
+ - **Story-splitting:** If a story has more than 3-4 acceptance criteria, split it into smaller stories. Each story should be independently deliverable.
70
+ - **Anti-vagueness enforcement:**
71
+ - BAD acceptance criteria: "Works correctly", "Is fast", "Handles errors well", "Looks good"
72
+ - GOOD acceptance criteria: "Returns 200 with JSON body for valid input", "Shows error toast with message for invalid email format", "Page renders in < 200ms on 3G", "Matches Figma comp within 4px"
73
+ - If the user gives vague criteria, push back: "How would you specifically test that? What would you check?"
74
+ - **Verification per story:** Each story must have at least one concrete verification step (a command to run, a page to visit, a state to check)
75
+
76
+ **3. Technical Design**
77
+ - What database changes are needed? (new tables, columns, indexes, migrations)
78
+ - What API endpoints? (method, path, request/response shape, auth requirements)
79
+ - What new files need to be created? What existing files get modified?
80
+ - What existing utilities/components/DAL queries should be reused (not rebuilt)?
81
+ - What's the data flow? Where does data originate, transform, and render?
82
+ - Any wave-parallelization opportunities? (independent agents building separate files)
83
+
84
+ **4. User Experience**
85
+ - What are the key user flows? Walk through click-by-click.
86
+ - What edge cases exist? (empty states, error states, loading states, partial data)
87
+ - Accessibility requirements? (keyboard navigation, screen readers, ARIA labels)
88
+ - Mobile/responsive behavior? (breakpoints, touch targets, layout shifts)
89
+ - What does the user see while waiting? (loading spinners, skeletons, optimistic updates)
90
+
91
+ **5. Trade-offs & Constraints**
92
+ - Performance vs. simplicity? What's good enough for v1?
93
+ - Any security considerations? (auth, data access, input validation)
94
+ - Any third-party dependencies or integrations?
95
+ - What technical debt is acceptable for now vs. must be done right?
96
+ - Any browser/device support requirements?
97
+
98
+ **6. Implementation Phases**
99
+ - How should this break into sequential phases?
100
+ - What can be parallelized within each phase? (wave-based agent structure)
101
+ - What's the critical path — what must be built first?
102
+ - What's the minimum viable first phase? (what gives us something testable fastest?)
103
+ - Any phases that could be cut if time runs short?
104
+
105
+ **7. Verification & Feedback Loops**
106
+ - What commands verify the build works? (`tsc`, `biome`, test suite)
107
+ - What does "done" look like for each phase? How do we know it worked?
108
+ - Are there integration points that need end-to-end testing?
109
+ - What should we check after each phase before moving to the next?
110
+ - Any monitoring or logging needed to confirm production behavior?
111
+
112
+ **User signals done:** If the user says "done", "finalize", "that's enough", "ship it", or similar — immediately stop interviewing and go to Phase 3. Finalize the PRD with whatever depth has been achieved.
113
+
114
+ ## Phase 3 — PRD Generation
115
+
116
+ Write `PRD.md` to the project root with this EXACT structure:
117
+
118
+ ```markdown
119
+ # [Milestone Name] — Specification
120
+
121
+ **Status:** Ready for execution
122
+ **Branch:** feat/[milestone-slug]
123
+ **Created:** [today's date]
124
+
125
+ ## Overview
126
+ [One paragraph summary of the milestone]
127
+
128
+ ## Problem Statement
129
+ [Why this work exists — what problem does it solve?]
130
+
131
+ ## Scope
132
+
133
+ ### In Scope
134
+ - [Bullet list of what ships in this milestone]
135
+
136
+ ### Out of Scope
137
+ - [Explicitly deferred items]
138
+
139
+ ### Sacred / Do NOT Touch
140
+ - [Code paths that must not be modified, with reasons]
141
+
142
+ ## User Stories
143
+
144
+ ### US-1: [Feature Name]
145
+ **Description:** As [role], I want [action], so that [outcome].
146
+ **Acceptance Criteria:**
147
+ - [ ] Specific, testable requirement (names actual functions/components)
148
+ - [ ] Another requirement
149
+ - [ ] [Verification command] passes
150
+
151
+ ### US-2: [Feature Name]
152
+ ...
153
+
154
+ ## Technical Design
155
+
156
+ ### New Database Tables
157
+ [SQL DDL or schema description, with indexes]
158
+
159
+ ### New API Endpoints
160
+ [Method + path + request/response shape for each]
161
+
162
+ ### New Files to Create
163
+ [Grouped by phase. Absolute paths with one-line descriptions]
164
+
165
+ ### Existing Files to Modify
166
+ [Paths + what changes in each]
167
+
168
+ ### Key Existing Code (DO NOT recreate — use as-is)
169
+ [Functions, utilities, DAL queries, components that agents should import/reuse]
170
+
171
+ ## Implementation Phases
172
+
173
+ ### Phase 1: [Name]
174
+ **Goal:** [One sentence]
175
+
176
+ **Wave 1 — [Theme] (N agents parallel):**
177
+ 1. agent-name: Creates file1.ts, file2.ts — [what it does]
178
+ 2. agent-name: Modifies file3.ts — [what changes]
179
+
180
+ **Wave 2 — [Theme] (N agents parallel):**
181
+ 3. agent-name: Creates file4.ts — [what it does]
182
+ 4. agent-name: Wires component into page — [specifics]
183
+
184
+ **Wave 3 — Integration:**
185
+ 5. Integration check, responsive verification, cleanup
186
+
187
+ **Verification:** [Exact commands to run]
188
+ **Acceptance:** US-1 criteria [list which], US-2 criteria [list which]
189
+
190
+ ### Phase 2: [Name]
191
+ ...
192
+
193
+ ## Execution Rules
194
+ 1. DELEGATE EVERYTHING. Lead context is sacred — do not read implementation files into it.
195
+ 2. Verify after every phase: [verification commands from CLAUDE.md]
196
+ 3. Atomic commits after each agent's work lands
197
+ 4. Never `git add .` — stage specific files only
198
+ 5. Read `tasks/lessons.md` before spawning agents — inject relevant anti-patterns
199
+
200
+ ## Definition of Done
201
+ - [ ] All user story acceptance criteria pass
202
+ - [ ] All phases verified with [verification commands]
203
+ - [ ] Branch pushed and PR opened
204
+ - [ ] STATE.md and ROADMAP.md updated
205
+ ```
206
+
207
+ ## Phase 4 — Post-PRD Updates
208
+
209
+ After writing PRD.md:
210
+
211
+ 1. **Update ROADMAP.md:** Add phase breakdown under the current milestone section. Each phase gets a row in the progress table with status "Pending".
212
+
213
+ 2. **Update STATE.md:** Set current phase to "Phase 1 — ready for `/flow:go`". Update "Next Actions" to reference the first phase.
214
+
215
+ 3. **Generate Phase 1 handoff prompt:**
216
+ ```
217
+ Phase 1: [Name] — [short description]. Read STATE.md, ROADMAP.md, and PRD.md.
218
+ [One sentence of context about what Phase 1 builds].
219
+ ```
220
+
221
+ 4. Print the handoff prompt in a fenced code block.
222
+
223
+ 5. Print: "PRD ready. Run `/flow:go` to execute Phase 1, or review PRD.md first."
224
+
225
+ ## Quality Gates
226
+
227
+ Before finalizing, self-check the PRD:
228
+ - [ ] Every phase has wave-based agent assignments with explicit file lists
229
+ - [ ] Every user story has checkbox acceptance criteria that are testable
230
+ - [ ] Every phase has verification commands
231
+ - [ ] "Key Existing Code" section references actual files/functions found in the codebase scan
232
+ - [ ] No phase has more than 5 agents in a single wave (too many = coordination overhead)
233
+ - [ ] Sacred code section is populated (even if empty with "None identified")
234
+
235
+ If any gate fails, fix the PRD before presenting it.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: flow:status
3
+ description: Quick orientation — shows current milestone, phase progress, and next actions
4
+ user_invocable: true
5
+ ---
6
+
7
+ # /flow:status — Quick Orientation
8
+
9
+ You are executing the `/flow:status` skill. This is a READ-ONLY operation. Do NOT modify any files.
10
+
11
+ ## Step 1 — Read Context Files
12
+
13
+ Read ALL of the following in parallel:
14
+ - `.planning/STATE.md`
15
+ - `.planning/ROADMAP.md`
16
+ - `PRD.md` (if exists)
17
+ - Count lessons in `tasks/lessons.md` (if exists)
18
+
19
+ IF both STATE.md AND ROADMAP.md are missing:
20
+ - Print: "No flow project found. Run `/flow:init` to set up, or `/flow:task` for a quick standalone fix."
21
+ - STOP here.
22
+
23
+ IF only one file exists, continue with what's available.
24
+
25
+ ## Step 2 — Analyze Phase Status
26
+
27
+ Parse ROADMAP.md to determine phase progress:
28
+ - Count total phases
29
+ - Count phases marked "Complete", "Done", or containing a completion date (e.g., `✓`, `[x]`, `completed`)
30
+ - Count phases marked "Pending", "In Progress", or not yet started
31
+ - Identify the FIRST phase that is NOT complete — this is the **next phase**
32
+
33
+ RULE: Determine the next action from ROADMAP.md phase statuses, NOT from STATE.md "Next Actions" text. STATE.md may be stale from a previous session. ROADMAP.md is the source of truth for phase progress.
34
+
35
+ ## Step 3 — Determine Routing
36
+
37
+ Use this explicit decision tree:
38
+
39
+ **IF pending phases exist in ROADMAP AND PRD.md exists:**
40
+ → Primary: `/flow:go` to execute Phase [N]: [name]
41
+ → Alt: `/flow:done` if wrapping up the session
42
+ → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
43
+
44
+ **IF pending phases exist in ROADMAP BUT PRD.md is missing:**
45
+ → Primary: `/flow:spec` to create the execution plan
46
+ → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
47
+
48
+ **IF all phases are complete:**
49
+ → Primary: `/flow:done` to finalize this milestone
50
+ → Then: `/flow:init` to start the next milestone
51
+ → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
52
+
53
+ **IF no phases exist in ROADMAP (milestone defined but not planned):**
54
+ → Primary: `/flow:spec` to plan this milestone
55
+ → Alt: `/flow:task` for quick fixes or cleanup (no PRD needed)
56
+
57
+ ## Step 4 — Print Status Block
58
+
59
+ ```
60
+ Milestone: [name] ([X/Y] phases complete)
61
+ Last session: [date] — [what was built]
62
+ Next: Phase [N] — [name] ([short description])
63
+ Lessons: [N] rules
64
+
65
+ [routing recommendations from Step 3]
66
+ ```
67
+
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:init to set up tracking."
69
+
70
+ ## Step 5 — No File Writes
71
+
72
+ This is purely informational. Do not modify any files.