flow-cc 0.7.1 → 0.8.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 CHANGED
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.1] - 2026-02-14
9
+
10
+ ### Changed
11
+ - All 8 active skill files compressed in-place — 67.5KB → 46KB total (-31.7%)
12
+ - `flow-spec.md` reduced 49% (17.4KB → 8.9KB) — condensed PRD template, coverage areas, codebase scan table
13
+ - `flow-go.md` reduced 37% (11.2KB → 7.0KB) — merged wave failure blocks, compressed agent prompt template
14
+ - `flow-done.md` reduced 26% (10.1KB → 7.5KB) — tightened STATE template, PR body, review polling
15
+ - `flow-setup.md` reduced 25% (6.4KB → 4.9KB) — compressed templates and question descriptions
16
+ - `flow-task.md` reduced 29% (6.1KB → 4.3KB) — compressed scope guard, verification, session template
17
+ - `flow-status.md` reduced 28% (5.1KB → 3.6KB) — condensed routing decision tree, status block
18
+ - `flow-intro.md` reduced 14% (4.7KB → 4.0KB) — removed GSD compat line, trimmed command descriptions
19
+ - `flow-triage.md` reduced 16% (4.5KB → 3.8KB) — fewer example rows, general tightening
20
+ - Skill boundary warning standardized to 1 line across all files
21
+ - Plan mode + skill boundary merged into single `**Constraints:**` line in flow-spec and flow-go
22
+
23
+ ### Fixed
24
+ - Deleted stray `nul` file (Windows artifact) from repo root
25
+
26
+ ## [0.8.0] - 2026-02-14
27
+
28
+ ### Changed
29
+ - **BREAKING:** Terminology aligned with Linear hierarchy — "Milestone" → "Project", "Phase" → "Milestone" across all skills, templates, and docs
30
+ - `/flow:go` adds Step 2.5: automatically moves Linear issues to "In Progress" when starting a milestone
31
+ - `/flow:go` Step 7: detects final milestone and routes to `/flow:done` for PR creation
32
+ - `/flow:done` adds Step 5.25: auto-creates PR with `Closes MSIG-XX` body when project is complete
33
+ - `/flow:done` Step 5.5: moves completed issues to "In Review" when PR is detected
34
+ - `/flow:spec` creates Linear **milestones** (not issues) for implementation stages, issues for tasks
35
+ - All templates updated: STATE.md uses "Project:", ROADMAP.md uses "Projects" table
36
+ - DESIGN.md and README.md updated to reflect new terminology
37
+
8
38
  ## [0.7.1] - 2026-02-14
9
39
 
10
40
  ### Fixed
package/README.md CHANGED
@@ -28,8 +28,8 @@ Claude Code is powerful but unstructured. Without a system, you lose context bet
28
28
  Flow gives Claude Code a **memory system and execution framework**:
29
29
 
30
30
  - **Spec interviews** extract decisions upfront so agents execute instead of guessing
31
- - **Per-milestone PRDs** in `.planning/prds/` become execution contracts — spec future milestones in parallel
32
- - **Wave-based agent teams** execute phases autonomously with built-in verification
31
+ - **Per-project PRDs** in `.planning/prds/` become execution contracts — spec future projects in parallel
32
+ - **Wave-based agent teams** execute milestones autonomously with built-in verification
33
33
  - **Session handoffs** preserve full context across fresh sessions — no more "where was I?"
34
34
  - **Lessons compound** — mistakes get captured, refined, and promoted into permanent rules
35
35
 
@@ -45,15 +45,15 @@ Flow gives Claude Code a **memory system and execution framework**:
45
45
  ```
46
46
 
47
47
  1. **`/flow:setup`** — Scaffolds your project with planning docs and execution rules
48
- 2. **`/flow:spec`** — Interviews you, then writes an executable PRD with phases, acceptance criteria, and agent-team structure
49
- 3. **`/flow:go`** — Spawns parallel agent teams to build the next phase, verifies, commits
48
+ 2. **`/flow:spec`** — Interviews you, then writes an executable PRD with milestones, acceptance criteria, and agent-team structure
49
+ 3. **`/flow:go`** — Spawns parallel agent teams to build the next milestone, verifies, commits
50
50
  4. **`/flow:done`** — Updates docs, captures lessons, generates a handoff prompt so the next session starts instantly
51
51
 
52
- Run `/flow:go` repeatedly until all phases are done, then `/flow:done` to wrap up. Next session, paste the handoff prompt and keep going.
52
+ Run `/flow:go` repeatedly until all milestones are done, then `/flow:done` to wrap up. Next session, paste the handoff prompt and keep going.
53
53
 
54
54
  ---
55
55
 
56
- ## Multi-PRD: Parallel Milestone Planning
56
+ ## Multi-PRD: Parallel Project Planning
57
57
 
58
58
  <table>
59
59
  <tr>
@@ -64,19 +64,19 @@ Run `/flow:go` repeatedly until all phases are done, then `/flow:done` to wrap u
64
64
  project/
65
65
  └── PRD.md ← one at a time
66
66
  ```
67
- Finish or archive the current milestone before speccing the next. Serial bottleneck on large roadmaps.
67
+ Finish or archive the current project before speccing the next. Serial bottleneck on large roadmaps.
68
68
 
69
69
  </td>
70
70
  <td width="50%">
71
71
 
72
- **Now (per-milestone PRDs)**
72
+ **Now (per-project PRDs)**
73
73
  ```
74
74
  .planning/prds/
75
75
  ├── user-auth.md ← active
76
76
  ├── dashboard.md ← pre-specced
77
77
  └── payments.md ← pre-specced
78
78
  ```
79
- Spec any milestone at any time. Execute the current one while planning ahead.
79
+ Spec any project at any time. Execute the current one while planning ahead.
80
80
 
81
81
  </td>
82
82
  </tr>
@@ -84,8 +84,8 @@ Spec any milestone at any time. Execute the current one while planning ahead.
84
84
 
85
85
  **How it works:**
86
86
 
87
- - `/flow:spec` writes PRDs to `.planning/prds/{slug}.md` — one file per milestone
88
- - `/flow:spec Payments` targets a specific future milestone without changing your current position
87
+ - `/flow:spec` writes PRDs to `.planning/prds/{slug}.md` — one file per project
88
+ - `/flow:spec Payments` targets a specific future project without changing your current position
89
89
  - STATE.md tracks the **Active PRD** field so `/flow:go` always knows which spec to execute
90
90
  - Smart resolution: user argument > STATE.md > slug derivation > legacy fallback
91
91
  - Existing `PRD.md` at root? Still works — legacy files are consumed transparently and migrated on archive
@@ -99,8 +99,8 @@ Spec any milestone at any time. Execute the current one while planning ahead.
99
99
  | Command | When | What it does |
100
100
  |---|---|---|
101
101
  | `/flow:setup` | Once per project | Creates `.planning/`, CLAUDE.md, templates, full roadmap |
102
- | `/flow:spec` | Once per milestone | Interview that produces an executable PRD in `.planning/prds/` |
103
- | `/flow:go` | Once per phase | Executes the next phase with wave-based agent teams |
102
+ | `/flow:spec` | Once per project | Interview that produces an executable PRD in `.planning/prds/` |
103
+ | `/flow:go` | Once per milestone | Executes the next milestone with wave-based agent teams |
104
104
  | `/flow:done` | End of session | Updates docs, captures lessons, generates handoff prompt |
105
105
 
106
106
  ### Standalone
@@ -132,11 +132,11 @@ your-project/
132
132
  │ └── session.md # Per-developer session state (gitignored)
133
133
  ├── .planning/
134
134
  │ ├── STATE.md # Project-level GPS — shared across developers
135
- │ ├── ROADMAP.md # Milestone phases and progress tracking
136
- │ ├── prds/ # Per-milestone PRD specs
137
- │ │ ├── user-auth.md # One file per milestone
138
- │ │ └── dashboard.md # Pre-spec future milestones anytime
139
- │ └── archive/ # Completed milestones and archived PRDs
135
+ │ ├── ROADMAP.md # Project milestones and progress tracking
136
+ │ ├── prds/ # Per-project PRD specs
137
+ │ │ ├── user-auth.md # One file per project
138
+ │ │ └── dashboard.md # Pre-spec future projects anytime
139
+ │ └── archive/ # Completed projects and archived PRDs
140
140
  └── tasks/
141
141
  └── lessons.md # Active lessons (max 10) → promoted to CLAUDE.md
142
142
  ```
@@ -188,7 +188,7 @@ Hard caps prevent context bloat. Total worst-case: ~30 lines of lessons context
188
188
  Flow supports multiple developers on the same repo without conflicts:
189
189
 
190
190
  - **`session.md`** — Per-developer session state, stored in `.claude/memory/session.md` (gitignored). Each developer has their own session GPS that never conflicts.
191
- - **`STATE.md`** — Shared project-level state in `.planning/STATE.md`. Updated at milestone boundaries only (not every session), so conflicts are rare.
191
+ - **`STATE.md`** — Shared project-level state in `.planning/STATE.md`. Updated at project boundaries only (not every session), so conflicts are rare.
192
192
  - **Developer identity** — `/flow:spec` and `/flow:go` track who is working on what. PRDs can be assigned to specific developers (advisory, not blocking).
193
193
  - **Template provided** — `session.md.template` scaffolds the per-developer file on first use.
194
194
 
@@ -198,7 +198,7 @@ Flow supports multiple developers on the same repo without conflicts:
198
198
 
199
199
  Flow optionally integrates with Linear via MCP for issue tracking:
200
200
 
201
- - **`/flow:spec`** can create Linear issues automatically from PRD phases
201
+ - **`/flow:spec`** can create Linear issues automatically from PRD milestones
202
202
  - **`/flow:done`** can post progress comments to Linear issues
203
203
  - **`/flow:triage`** sorts unstructured brain dumps into categorized Linear issues, ROADMAP entries, and lessons
204
204
  - **Branch convention** `feat/msig-{issue#}-desc` auto-links PRs to Linear issues
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.8.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-cc",
3
- "version": "0.7.1",
3
+ "version": "0.8.1",
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",
@@ -1,187 +1,190 @@
1
1
  ---
2
2
  name: flow:done
3
- description: Session-end documentation — updates STATE.md, ROADMAP.md, lessons.md, generates handoff prompt
3
+ description: Session-end documentation — updates STATE.md, ROADMAP.md, lessons.md. Handles project-complete PR creation, automated review, and Linear status management.
4
4
  user_invocable: true
5
5
  ---
6
6
 
7
7
  # /flow:done — Session End + Handoff
8
8
 
9
- You are executing the `/flow:done` skill. This finalizes the current session by updating all planning documents and generating a handoff prompt for the next session.
9
+ You are executing the `/flow:done` skill. This finalizes the current session by updating all planning documents and routing to the next action.
10
10
 
11
11
  **This is the most important skill for sustainability.** Without proper session-end docs, the next session starts blind.
12
12
 
13
- **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.
13
+ **Skill boundary:** Only use `/flow:*` commands. Never invoke or suggest `/lisa:*`, `/gsd:*`, `/superpowers:*` or any non-flow skill.
14
14
 
15
15
  ## Steps
16
16
 
17
17
  ### 1. Gather Context
18
18
 
19
- Read these files (in parallel where possible):
20
- - `.planning/STATE.md` current state
21
- - `.planning/ROADMAP.md` milestone/phase progress
22
- - `tasks/lessons.md` — active lessons (max 10)
23
- - `CLAUDE.md` — project rules
24
- - Active PRD from `.planning/prds/` (resolve via STATE.md "Active PRD" field, or fall back to legacy `PRD.md` at root)
25
- - `.claude/memory/session.md` (if exists) — personal session state
19
+ Read in parallel:
20
+ - `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`, `CLAUDE.md`
21
+ - Active PRD from `.planning/prds/` (resolve via STATE.md "Active PRD" field, or legacy root `PRD.md`)
22
+ - `.claude/memory/session.md` (if exists)
26
23
 
27
- Also gather:
28
- - Run `git log --oneline -20` to see commits this session
29
- - Run `git diff --stat` to check for uncommitted changes
30
- - Run `git config user.name` to get developer identity
31
- - If uncommitted changes exist, warn the user before proceeding
24
+ Also run:
25
+ - `git log --oneline -20` commits this session
26
+ - `git diff --stat` uncommitted changes (warn user if any exist)
27
+ - `git config user.name` developer identity
32
28
 
33
- ### 2. Update STATE.md (Milestone Boundaries Only)
29
+ ### 2. Update STATE.md (Project Boundaries Only)
34
30
 
35
- **Determine if a milestone was completed this session** by checking ROADMAP.md progress and commits.
31
+ Check ROADMAP.md progress and commits to determine if a project completed this session.
36
32
 
37
- **IF milestone completed this session** — REPLACE the entire file (do NOT append). Keep under 80 lines.
33
+ **IF project completed** — REPLACE the entire file (do NOT append). Keep under 80 lines:
38
34
 
39
- Structure:
40
35
  ```
41
36
  # [Project Name] — Project State
42
37
 
43
38
  ## Current Position
44
- - **Milestone:** [name]
45
- - **Phase:** [current phase status]
39
+ - **Project:** [name]
40
+ - **Milestone:** [current milestone status]
46
41
  - **Branch:** [current branch]
47
- - **Active PRD:** [path to active PRD, or "None" if milestone complete]
42
+ - **Active PRD:** [path or "None" if project complete]
48
43
  - **Last Session:** [today's date]
49
44
 
50
45
  ## Milestone Progress
51
-
52
- | Phase | Name | Status |
53
- |-------|------|--------|
46
+ | Milestone | Name | Status |
47
+ |-----------|------|--------|
54
48
  | 1 | [name] | Complete (date) |
55
- | 2 | [name] | Complete (date) |
56
- | 3 | [name] | In Progress |
57
- | 4 | [name] | Pending |
49
+ | 2 | [name] | In Progress |
58
50
 
59
51
  ## What Was Built (This Session)
60
- - [Bullet list of what was accomplished]
61
- - [Include file counts, key components, commit SHAs]
52
+ - [Bullet list file counts, key components, commit SHAs]
62
53
 
63
54
  ## Key Decisions
64
- - [Any architectural or design decisions made]
55
+ - [Architectural or design decisions made]
65
56
 
66
57
  ## Next Actions
67
- 1. [Specific next step — usually "Run /flow:go for Phase N"]
58
+ 1. [Specific next step]
68
59
  ```
69
60
 
70
- **IF normal session (no milestone completed)** — SKIP STATE.md entirely. Print: "Normal session — STATE.md skipped (milestone boundaries only)."
61
+ **IF normal session** — SKIP STATE.md. Print: "Normal session — STATE.md skipped (project boundaries only)."
71
62
 
72
63
  ### 2.5. Write session.md (Every Session)
73
64
 
74
- This step ALWAYS runs, regardless of whether a milestone was completed.
75
-
76
- Create `.claude/memory/` directory if it doesn't exist.
77
-
78
- Write `.claude/memory/session.md` with the following content:
65
+ Always runs. Create `.claude/memory/` if needed. Write `.claude/memory/session.md`:
79
66
 
80
67
  ```
81
68
  # Session State
82
-
83
- **Date:** [today's date]
84
- **Developer:** [git config user.name result]
85
- **Branch:** [current git branch]
86
- **Working On:** [Linear issue ID + description if detectable from branch name, or PRD phase, or "standalone task"]
87
- **Status:** [what was accomplished this session — bullet list of key items]
88
- **Next:** [what to pick up next session]
69
+ **Date:** [today]
70
+ **Developer:** [git config user.name]
71
+ **Branch:** [current branch]
72
+ **Working On:** [Linear issue ID + desc, or PRD milestone, or "standalone task"]
73
+ **Status:** [bullet list of accomplishments]
74
+ **Next:** [what to pick up next]
89
75
  **Blockers:** [any blockers, or "None"]
90
76
  ```
91
77
 
92
- ### 3. Update ROADMAP.md (Milestone Boundaries Only)
78
+ ### 3. Update ROADMAP.md (Project Boundaries Only)
93
79
 
94
- **IF milestone completed this session:**
80
+ **IF project completed:**
81
+ - Mark completed milestones with dates
82
+ - Ensure pending milestones have enough detail for a one-line-prompt start
83
+ - **Archive check** (if project fully complete):
84
+ - Skip if `.planning/` doesn't exist
85
+ - Create `.planning/archive/` if needed (`mkdir -p`)
86
+ - Move milestone details to `.planning/archive/project-{slug}.md`
87
+ - Keep only summary row in ROADMAP table
88
+ - Archive PRD: move `.planning/prds/{slug}.md` (or legacy root `PRD.md`) to `.planning/archive/PRD-{slug}.md`
89
+ - Clear STATE.md "Active PRD" → "None"; mark project "Complete" in ROADMAP
90
+ - **Project transition:** Check for next "Planned" project:
91
+ - If exists: update to "Pending — needs `/flow:spec`", update STATE.md current project
92
+ - If none: no transition needed
95
93
 
96
- - Mark completed phases with completion date
97
- - Ensure pending phases have enough detail that the next session can start with a one-line prompt
98
- - **Archive check:** If the current milestone is fully complete:
99
- - If `.planning/` does not exist, skip archiving entirely — there's nothing to archive
100
- - Create `.planning/archive/` if it doesn't already exist (use `mkdir -p` or equivalent)
101
- - Move milestone phase details to `.planning/archive/milestones-{slug}.md`
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-{slug}.md` instead.
104
- - Clear STATE.md "Active PRD" field (set to "None")
105
- - Mark the milestone as "Complete" in the ROADMAP table
106
- - **Milestone transition:** Check ROADMAP.md for the NEXT milestone with status "Planned":
107
- - **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.
108
- - **If no next milestone exists:** No transition needed — all planned milestones are done.
109
-
110
- **IF normal session (no milestone completed)** — SKIP ROADMAP.md entirely. Print: "Normal session — ROADMAP.md skipped (milestone boundaries only)."
94
+ **IF normal session** SKIP ROADMAP.md. Print: "Normal session — ROADMAP.md skipped (project boundaries only)."
111
95
 
112
96
  ### 4. Update lessons.md
113
97
 
114
- - Review the session for mistakes, corrections, or discovered issues
115
- - Auto-suggest lessons based on errors encountered (if any)
116
- - Ask the user: "Any lessons from this session?" using AskUserQuestion with options:
117
- - "No new lessons"
118
- - "Yes, let me add some" (user types them)
119
- - "Use your suggestions" (if you auto-suggested any)
120
- - Add new lessons as one-liners: `- **[topic]** The rule`
121
- - **Hard cap enforcement (max 10 active):**
122
- - If lessons.md already has 10 items and a new one needs to be added:
123
- 1. Identify the most battle-tested/internalized lesson
124
- 2. Promote it to `CLAUDE.md ## Learned Rules` section
125
- 3. Delete it from lessons.md
126
- 4. Add the new lesson
127
- - If `CLAUDE.md ## Learned Rules` hits 15 items, delete the most obvious/internalized rule to make room
98
+ - Review session for mistakes, corrections, or discovered issues
99
+ - Auto-suggest lessons from errors encountered
100
+ - AskUserQuestion: "Any lessons from this session?" with options: "No new lessons" / "Yes, let me add some" / "Use your suggestions"
101
+ - Format: `- **[topic]** The rule`
102
+ - **Hard cap (max 10):** If at 10, promote the most battle-tested to `CLAUDE.md ## Learned Rules`, delete from lessons.md, then add new. If Learned Rules hits 15, delete the most obvious rule to make room.
128
103
 
129
104
  ### 5. Commit Doc Updates
130
105
 
131
- **Normal session (no milestone completed):**
132
- - Only stage `tasks/lessons.md` if it changed
133
- - Skip STATE.md and ROADMAP.md (they were not modified)
134
- - Do NOT stage `.claude/memory/session.md` (it is gitignored)
135
- - If nothing needs staging (no changes to shared docs), skip the commit. Print: "No shared doc changes to commit."
136
- - Otherwise commit with message: `docs: session-end updates — [brief summary]`
137
-
138
- **Milestone boundary session:**
139
- - Stage STATE.md, ROADMAP.md, lessons.md, and any archived files
140
- - Do NOT stage `.claude/memory/session.md` (it is gitignored)
141
- - Commit with message: `docs: session-end updates — [brief summary]`
142
-
143
- - Do NOT push unless the user asks
144
-
145
- ### 5.5. Linear Progress Comment
146
-
147
- - Check if the current branch name contains a Linear issue identifier pattern (e.g., `msig-45` in `feat/msig-45-rate-modeling`)
148
- - Extract the identifier (the `msig-45` part)
149
- - If found:
150
- - Attempt to call `mcp__linear__list_issues` with `query` matching the identifier
151
- - If Linear MCP is available AND an issue is found: post a progress comment with `mcp__linear__create_comment` summarizing: developer name (from Step 1), what was done, what's next, any blockers
152
- - If Linear MCP is not available OR no issue found: skip silently (no error, no output)
153
- - If no identifier in branch name: skip silently
154
-
155
- ### 6. Generate Handoff Prompt
156
-
157
- Determine the next action and generate a copyable handoff prompt. Include the developer name in the prompt.
158
-
159
- - If next phase exists in PRD:
160
- ```
161
- [Developer Name] Phase [N]: [Name] [short description]. Read STATE.md, ROADMAP.md, and .planning/prds/{slug}.md (US-X).
162
- [One sentence of context]. [One sentence of what NOT to do if relevant].
163
- ```
164
- - If milestone is complete AND a next milestone was transitioned to (from Step 3):
165
- ```
166
- [Developer Name] Milestone [name] complete. Next: [next milestone name]. Run /flow:spec to plan it.
167
- ```
168
- - If milestone is complete AND no next milestone exists:
169
- ```
170
- [Developer Name] All milestones complete! Run /flow:triage to plan what's next, or enjoy the win.
171
- ```
172
-
173
- Print the handoff prompt in a fenced code block so the user can copy it.
106
+ **Normal session:** Only stage `tasks/lessons.md` if changed. Skip STATE.md/ROADMAP.md. Never stage `.claude/memory/session.md` (gitignored). If no shared doc changes, print "No shared doc changes to commit." Otherwise: `docs: session-end updates — [brief summary]`
107
+
108
+ **Project boundary session:** Stage STATE.md, ROADMAP.md, lessons.md, archived files. Never stage session.md. Commit: `docs: session-end updates — [brief summary]`
109
+
110
+ Do NOT push unless user asks.
111
+
112
+ ### 5.25. Auto-Create PR (Project Complete Only)
113
+
114
+ - Check if ALL milestones in PRD are "Complete" in ROADMAP.md
115
+ - If all complete AND no open PR for branch (`gh pr list --head [branch] --state open`):
116
+ - Parse PRD for all Linear issue IDs
117
+ - Push branch: `git push -u origin [branch]`
118
+ - Auto-generate PR body:
119
+ ```
120
+ ## Summary
121
+ [Project name] — [one-line from PRD]
122
+ ## Milestones Completed
123
+ - Milestone 1: [Name] (completed [date])
124
+ ## Linear Issues
125
+ Closes MSIG-34, Closes MSIG-35, ...
126
+ ## Verification
127
+ - `npx tsc --noEmit` passed
128
+ - `npx biome check` passed
129
+ ```
130
+ - `gh pr create --title "[project name]" --body "[body]"`
131
+ - Print: "PR created: [URL]" and "Linear: [N] issues will auto-close on merge"
132
+ - If milestones remain OR PR exists: skip silently
133
+
134
+ ### 5.3. Await Automated Review (Project Complete Only)
135
+
136
+ Runs when 5.25 created a PR (or one already exists for this branch).
137
+
138
+ 1. Get PR number from `gh pr create` output or `gh pr list --head [branch]`
139
+ 2. Parse repo owner/name from `git remote get-url origin`
140
+ 3. Poll every 2 min, up to 10 min (5 checks max):
141
+ - `gh api repos/{owner}/{repo}/pulls/{N}/reviews` non-empty reviews
142
+ - `gh api repos/{owner}/{repo}/pulls/{N}/comments` — bot/review comments
143
+ 4. **Reviews arrive:** Read all, address each, push fixes. Print: "Automated review: [N] comments addressed, fixes pushed."
144
+ 5. **No reviews after 10 min:** Print: "No comments after 10 min. Proceeding." Write "Automated review pending" in session.md Blockers.
145
+ 6. **Pre-existing PR:** Check for unaddressed review comments from prior sessions; address before proceeding.
146
+
147
+ ### 5.5. Linear Status Update + Progress Comment
148
+
149
+ - Check if Linear MCP tools are available; skip silently if not
150
+ - Parse active PRD for `**Linear Project:**` field
151
+ - If found and open PR exists (`gh pr list --head [branch] --state open`):
152
+ - Move all "In Progress" issues to "In Review" via `mcp__linear__update_issue`
153
+ - Print: "Linear: [N] issues → In Review (PR open)"
154
+ - If no PR: issues stay In Progress (normal mid-project session end)
155
+ - Post progress comment on any branch-linked Linear issue
156
+
157
+ ### 6. Route Next Action
158
+
159
+ **Mid-project (milestones remain):**
160
+ ```
161
+ Next steps:
162
+ → /flow:go — execute Milestone [N+1]: [Name]
163
+ → /clear + /flow:go — if context is heavy
164
+ ```
165
+
166
+ **Project complete + next project exists:**
167
+ ```
168
+ Project complete! → Review + merge PR #[N] → /flow:spec — plan [next project]
169
+ ```
170
+
171
+ **Project complete + no next project:**
172
+ ```
173
+ All projects complete! → Review + merge PR #[N] → /flow:triage — plan what's next
174
+ ```
174
175
 
175
176
  ### 7. Print Summary
176
177
 
177
178
  ```
178
179
  Session complete.
179
180
  - STATE.md: [updated | skipped (normal session)]
180
- - ROADMAP.md: [N phases marked complete | skipped (normal session)]
181
+ - ROADMAP.md: [N milestones marked complete | skipped (normal session)]
181
182
  - session.md: updated
182
183
  - lessons.md: [N]/10 active, [N] promoted to CLAUDE.md
183
184
  - Committed: [SHA | nothing to commit]
185
+ - PR: [created #N | skipped (milestones remain)]
186
+ - Review: [N comments addressed | pending | skipped]
187
+ - Linear: [N issues → In Review | skipped]
184
188
 
185
- Handoff prompt:
186
- [the prompt in a code block]
189
+ Next: [routing from Step 6]
187
190
  ```