flow-cc 0.8.2 → 0.9.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 +22 -0
- package/README.md +5 -5
- package/VERSION +1 -1
- package/package.json +1 -1
- package/skills/flow-done.md +18 -14
- package/skills/flow-go.md +7 -4
- package/skills/flow-spec.md +9 -3
- package/skills/flow-status.md +11 -4
- package/skills/flow-task.md +3 -3
- package/templates/session.md.template +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ 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.9.0] - 2026-02-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Session files are now branch-scoped: `.claude/memory/session-{branch}.md` — multiple terminals no longer overwrite each other
|
|
12
|
+
- PRD resolution now matches current git branch against PRD `**Branch:**` headers (STATE.md "Active PRD" is fallback)
|
|
13
|
+
- `/flow:status` shows all active sessions across branches when multiple exist
|
|
14
|
+
- Removed STATE.md project mismatch warning from `/flow:go` — PRD picker is authoritative
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Two terminals on different branches no longer corrupt each other's session state
|
|
18
|
+
- PRD resolution no longer depends on STATE.md singleton — correct PRD found per-branch
|
|
19
|
+
- `/flow:go` no longer warns falsely when STATE.md was updated by another terminal
|
|
20
|
+
|
|
21
|
+
## [0.8.3] - 2026-02-15
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- `/flow:spec` now writes `**Linear Project:**` field to PRD header — downstream skills (`flow:go`, `flow:done`) depend on it
|
|
25
|
+
- `/flow:spec` now sets `projectMilestoneId` on every Linear issue — fixes milestone progress showing 0% despite issues existing
|
|
26
|
+
- `/flow:spec` PRD template includes `**Linear Project:**` field (was missing, causing silent Linear skips)
|
|
27
|
+
- `/flow:go` Step 6 now moves completed milestone issues to "Done" in Linear (were stuck at "In Progress" forever)
|
|
28
|
+
- `/flow:done` Step 5.5 now handles interim milestone completion — moves completed milestone issues to "Done" before checking PR/project status
|
|
29
|
+
|
|
8
30
|
## [0.8.2] - 2026-02-14
|
|
9
31
|
|
|
10
32
|
### Fixed
|
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ Spec any project at any time. Execute the current one while planning ahead.
|
|
|
86
86
|
|
|
87
87
|
- `/flow:spec` writes PRDs to `.planning/prds/{slug}.md` — one file per project
|
|
88
88
|
- `/flow:spec Payments` targets a specific future project without changing your current position
|
|
89
|
-
-
|
|
89
|
+
- PRD resolution matches the current git branch against each PRD's `**Branch:**` header — STATE.md "Active PRD" is fallback
|
|
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
|
|
92
92
|
|
|
@@ -129,7 +129,7 @@ your-project/
|
|
|
129
129
|
├── CLAUDE.md # Execution rules + learned rules
|
|
130
130
|
├── .claude/
|
|
131
131
|
│ └── memory/
|
|
132
|
-
│ └── session.md
|
|
132
|
+
│ └── session-{branch}.md # Per-branch session state (gitignored)
|
|
133
133
|
├── .planning/
|
|
134
134
|
│ ├── STATE.md # Project-level GPS — shared across developers
|
|
135
135
|
│ ├── ROADMAP.md # Project milestones and progress tracking
|
|
@@ -187,10 +187,10 @@ Hard caps prevent context bloat. Total worst-case: ~30 lines of lessons context
|
|
|
187
187
|
|
|
188
188
|
Flow supports multiple developers on the same repo without conflicts:
|
|
189
189
|
|
|
190
|
-
-
|
|
190
|
+
- **Branch-scoped sessions** — Each branch gets its own session file at `.claude/memory/session-{branch-slug}.md` (gitignored). Multiple terminals on different branches never conflict. Same-branch conflicts are prevented by Linear assignment (one dev per issue/branch).
|
|
191
|
+
- **Branch-based PRD resolution** — Skills match the current git branch against each PRD's `**Branch:**` header to find the active PRD. STATE.md "Active PRD" is fallback.
|
|
192
|
+
- **Cross-developer awareness** — `/flow:status` shows all active sessions across branches. `/flow:go` warns if another developer was recently active on the same branch.
|
|
191
193
|
- **`STATE.md`** — Shared project-level state in `.planning/STATE.md`. Updated at project boundaries only (not every session), so conflicts are rare.
|
|
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
|
-
- **Template provided** — `session.md.template` scaffolds the per-developer file on first use.
|
|
194
194
|
|
|
195
195
|
---
|
|
196
196
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.9.0
|
package/package.json
CHANGED
package/skills/flow-done.md
CHANGED
|
@@ -18,8 +18,8 @@ You are executing the `/flow:done` skill. This finalizes the current session by
|
|
|
18
18
|
|
|
19
19
|
Read in parallel:
|
|
20
20
|
- `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`, `CLAUDE.md`
|
|
21
|
-
- Active PRD
|
|
22
|
-
- `.claude/memory/session.md` (if exists)
|
|
21
|
+
- Active PRD: (1) `git branch --show-current` (2) read first 10 lines of each `.planning/prds/*.md` for `**Branch:**` header (3) match current branch → active PRD (4) no match: fall back to STATE.md "Active PRD" (5) still none: check legacy root `PRD.md` (6) nothing: no active PRD
|
|
22
|
+
- `.claude/memory/session-{branch-slug}.md` (if exists). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
23
23
|
|
|
24
24
|
Also run:
|
|
25
25
|
- `git log --oneline -20` — commits this session
|
|
@@ -62,7 +62,7 @@ Check ROADMAP.md progress and commits to determine if a project completed this s
|
|
|
62
62
|
|
|
63
63
|
### 2.5. Write session.md (Every Session)
|
|
64
64
|
|
|
65
|
-
Always runs. Create `.claude/memory/` if needed. Write `.claude/memory/session.md`:
|
|
65
|
+
Always runs. Create `.claude/memory/` if needed. Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`. Write `.claude/memory/session-{branch-slug}.md`:
|
|
66
66
|
|
|
67
67
|
```
|
|
68
68
|
# Session State
|
|
@@ -103,9 +103,9 @@ Always runs. Create `.claude/memory/` if needed. Write `.claude/memory/session.m
|
|
|
103
103
|
|
|
104
104
|
### 5. Commit Doc Updates
|
|
105
105
|
|
|
106
|
-
**Normal session:** Only stage `tasks/lessons.md` if changed. Skip STATE.md/ROADMAP.md. Never stage `.claude/memory
|
|
106
|
+
**Normal session:** Only stage `tasks/lessons.md` if changed. Skip STATE.md/ROADMAP.md. Never stage files in `.claude/memory/` (all gitignored). If no shared doc changes, print "No shared doc changes to commit." Otherwise: `docs: session-end updates — [brief summary]`
|
|
107
107
|
|
|
108
|
-
**Project boundary session:** Stage STATE.md, ROADMAP.md, lessons.md, archived files. Never stage
|
|
108
|
+
**Project boundary session:** Stage STATE.md, ROADMAP.md, lessons.md, archived files. Never stage files in `.claude/memory/` (all gitignored). Commit: `docs: session-end updates — [brief summary]`
|
|
109
109
|
|
|
110
110
|
Do NOT push unless user asks.
|
|
111
111
|
|
|
@@ -148,14 +148,18 @@ Runs when 5.25 created a PR (or one already exists for this branch).
|
|
|
148
148
|
|
|
149
149
|
- Check if Linear MCP tools are available; skip silently if not
|
|
150
150
|
- Parse active PRD for `**Linear Project:**` field
|
|
151
|
-
- If found
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
- If found:
|
|
152
|
+
- Find project, list milestones via `mcp__linear__list_milestones`
|
|
153
|
+
- Cross-reference ROADMAP.md: for each milestone marked "Complete", find matching Linear milestone
|
|
154
|
+
- For each completed milestone: list its issues, move non-Done issues to "Done" via `mcp__linear__update_issue`
|
|
155
|
+
- Print: "Linear: [N] issues → Done ([milestone name])" per milestone; if 0 issues: "Linear: [milestone name] — no issues to update"
|
|
156
|
+
- If open PR exists (`gh pr list --head [branch] --state open`):
|
|
157
|
+
- Move remaining "In Progress" issues to "In Review" via `mcp__linear__update_issue`
|
|
158
|
+
- Print: "Linear: [N] issues → In Review (PR open)"
|
|
159
|
+
- If no PR: remaining in-progress issues stay (normal mid-project session end)
|
|
160
|
+
- **If project complete** (all milestones done):
|
|
161
|
+
- Move project to Completed: `mcp__linear__update_project` with `state: "Completed"`
|
|
162
|
+
- Print: "Linear: project → Completed"
|
|
159
163
|
- Post progress comment on any branch-linked Linear issue
|
|
160
164
|
|
|
161
165
|
### 6. Route Next Action
|
|
@@ -188,7 +192,7 @@ Session complete.
|
|
|
188
192
|
- Committed: [SHA | nothing to commit]
|
|
189
193
|
- PR: [created #N | skipped (milestones remain)]
|
|
190
194
|
- Review: [N comments addressed | pending | skipped]
|
|
191
|
-
- Linear: [N issues →
|
|
195
|
+
- Linear: [N issues → Done (milestone) | N → In Review (PR) | project → Completed | skipped]
|
|
192
196
|
|
|
193
197
|
Next: [routing from Step 6]
|
|
194
198
|
```
|
package/skills/flow-go.md
CHANGED
|
@@ -14,7 +14,7 @@ You are executing the `/flow:go` skill. This reads the PRD, identifies the next
|
|
|
14
14
|
|
|
15
15
|
## Step 1 — Orient
|
|
16
16
|
|
|
17
|
-
Read in parallel: `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`, `CLAUDE.md`, `.claude/memory/session.md` (if exists).
|
|
17
|
+
Read in parallel: `.planning/STATE.md`, `.planning/ROADMAP.md`, `tasks/lessons.md`, `CLAUDE.md`, `.claude/memory/session-{branch-slug}.md` (if exists). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
18
18
|
|
|
19
19
|
Run `git config user.name` to get developer identity.
|
|
20
20
|
|
|
@@ -28,7 +28,7 @@ The user must always select which PRD to execute.
|
|
|
28
28
|
|
|
29
29
|
3. **No PRDs found** — "No PRDs found in `.planning/prds/`. Run `/flow:spec` first." Stop.
|
|
30
30
|
|
|
31
|
-
**After selection:** Read chosen PRD
|
|
31
|
+
**After selection:** Read the chosen PRD fully.
|
|
32
32
|
|
|
33
33
|
**Assignment check:** Check milestone's `**Assigned To:**` against `git config user.name`. If different, print advisory warning. Do NOT block execution.
|
|
34
34
|
|
|
@@ -41,7 +41,8 @@ If any fail, stop and tell the user:
|
|
|
41
41
|
1. **PRD selected?** If no PRDs found, stop.
|
|
42
42
|
2. **Milestone detailed enough?** Must have wave structure, file lists, verification commands. If missing: "PRD milestone too vague. Add wave structure + file lists, or run `/flow:spec`."
|
|
43
43
|
3. **Branch check:** Verify correct feature branch (from PRD header). Warn if wrong.
|
|
44
|
-
4. **
|
|
44
|
+
4. **Session overlap check:** If `session-{branch-slug}.md` exists, read its `**Developer:**` field. If it names a different developer than `git config user.name`, print advisory: "[Developer] was last active on this branch ([date]). Check Linear assignment before proceeding." Non-blocking — do not stop execution.
|
|
45
|
+
5. **All done?** If no pending milestones: "All milestones complete! Run `/flow:done` to wrap up."
|
|
45
46
|
|
|
46
47
|
## Step 2.5 — Linear Status: In Progress
|
|
47
48
|
|
|
@@ -132,11 +133,13 @@ Atomic commit for this milestone. Stage only files from this milestone's agents.
|
|
|
132
133
|
|
|
133
134
|
## Step 6 — Update Docs
|
|
134
135
|
|
|
135
|
-
**Session state (ALWAYS):** Write `.claude/memory/session.md` (create dir if needed):
|
|
136
|
+
**Session state (ALWAYS):** Write `.claude/memory/session-{branch-slug}.md` (create dir if needed). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
136
137
|
`Date | Developer | Branch | Working On: Milestone N: [Name] from [PRD] | Status: complete — [what was built] | Next: [Milestone N+1 or /flow:done] | Blockers: [any or None]`
|
|
137
138
|
|
|
138
139
|
**ROADMAP.md (ALWAYS):** Mark milestone as "Complete ([date])"
|
|
139
140
|
|
|
141
|
+
**Linear milestone (ALWAYS):** If `**Linear Project:**` in PRD and Linear MCP available: find completed milestone in Linear via `mcp__linear__list_milestones`, list its issues, move non-Done issues to "Done" via `mcp__linear__update_issue`. Print: "Linear: [N] issues → Done ([milestone name])". If 0 issues: print "Linear: [milestone name] — no issues to update". Skip silently if no Linear Project or MCP unavailable.
|
|
142
|
+
|
|
140
143
|
**STATE.md (LAST MILESTONE ONLY):** Update only if this was the LAST milestone (project complete): files created/modified count, commit SHA, milestone completion note. Keep "Active PRD" pointing to resolved path. Skip STATE.md for non-final milestones.
|
|
141
144
|
|
|
142
145
|
## Step 7 — Route Next Action (MANDATORY — FINAL STEP)
|
package/skills/flow-spec.md
CHANGED
|
@@ -94,6 +94,7 @@ Write to `.planning/prds/{slug}.md` (create dir if needed) with this structure:
|
|
|
94
94
|
**Branch:** feat/{project-slug}
|
|
95
95
|
**Created:** [date]
|
|
96
96
|
**Assigned To:** [developer or "unassigned"]
|
|
97
|
+
**Linear Project:** [Linear project name if linked, or blank]
|
|
97
98
|
|
|
98
99
|
## Overview
|
|
99
100
|
[One paragraph summary]
|
|
@@ -144,6 +145,8 @@ Subsections: New Database Tables, New API Endpoints, New Files to Create (groupe
|
|
|
144
145
|
(Continue Milestone 2, etc.)
|
|
145
146
|
```
|
|
146
147
|
|
|
148
|
+
> The `**Branch:**` field is the primary key for PRD resolution. Downstream skills match the current git branch against this field to find the active PRD.
|
|
149
|
+
|
|
147
150
|
## Phase 4 — Post-PRD Updates
|
|
148
151
|
|
|
149
152
|
After writing the PRD:
|
|
@@ -161,10 +164,13 @@ After writing the PRD:
|
|
|
161
164
|
4. **Linear Integration (optional):**
|
|
162
165
|
- Check if Linear MCP tools are available (`mcp__linear__list_teams`)
|
|
163
166
|
- If available: search for matching Linear project (`mcp__linear__list_projects`)
|
|
164
|
-
- Found:
|
|
165
|
-
|
|
167
|
+
- Found: use it. Not found: AskUserQuestion to pick existing project or skip Linear
|
|
168
|
+
- Add `**Linear Project:** [project name]` to the PRD header (after `**Assigned To:**`)
|
|
169
|
+
- For each implementation milestone: create a **Linear milestone** (`mcp__linear__create_milestone`) under the project
|
|
170
|
+
- For each user story: create a **Linear issue** (`mcp__linear__create_issue`) with BOTH `projectId` AND `projectMilestoneId` set — assign to the milestone whose `**Acceptance:**` field references that story. Title: "US-N: [story name]"
|
|
171
|
+
- **Critical:** Every issue MUST have `projectMilestoneId` set. Issues without milestone assignment break downstream status tracking.
|
|
166
172
|
- If MCP unavailable: skip silently
|
|
167
|
-
- Print: "[N] milestones + [M] issues created under project
|
|
173
|
+
- Print: "[N] milestones + [M] issues created under [project name]"
|
|
168
174
|
|
|
169
175
|
5. Print handoff prompt in a fenced code block.
|
|
170
176
|
|
package/skills/flow-status.md
CHANGED
|
@@ -16,10 +16,11 @@ Read ALL in parallel:
|
|
|
16
16
|
- `.planning/STATE.md`
|
|
17
17
|
- `.planning/ROADMAP.md`
|
|
18
18
|
- List `.planning/prds/` for all PRD files (or legacy root `PRD.md`)
|
|
19
|
-
-
|
|
19
|
+
- Active PRD: (1) `git branch --show-current` (2) read first 10 lines of each `.planning/prds/*.md` for `**Branch:**` header (3) match current branch → active PRD (4) no match: fall back to STATE.md "Active PRD" (5) still none: check legacy root `PRD.md` (6) nothing: no active PRD
|
|
20
20
|
- Count lessons in `tasks/lessons.md` (if exists)
|
|
21
|
-
- `.claude/memory/session.md` (if exists)
|
|
21
|
+
- `.claude/memory/session-{branch-slug}.md` (if exists). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
22
22
|
- Run `git config user.name` for developer identity
|
|
23
|
+
- List all `session-*.md` files in `.claude/memory/`. For each, read `**Date:**`, `**Developer:**`, `**Branch:**`, and `**Working On:**` fields.
|
|
23
24
|
|
|
24
25
|
IF both STATE.md AND ROADMAP.md are missing:
|
|
25
26
|
- Print: "No flow project found. Run `/flow:setup` to set up, or `/flow:task` for a quick standalone fix."
|
|
@@ -66,7 +67,7 @@ When suggesting /flow:spec, do NOT append a project name — the project picker
|
|
|
66
67
|
```
|
|
67
68
|
Project: [name] ([X/Y] milestones complete)
|
|
68
69
|
Developer: [git config user.name]
|
|
69
|
-
Session: [session.md "Working On" field if exists, or "No active session"]
|
|
70
|
+
Session: [session-{branch-slug}.md "Working On" field if exists, or "No active session"]
|
|
70
71
|
Last session: [date] — [what was built]
|
|
71
72
|
Next: Milestone [N] — [name] ([short description])
|
|
72
73
|
Lessons: [N]/10 active
|
|
@@ -76,10 +77,16 @@ PRDs:
|
|
|
76
77
|
* {slug}.md (ready — future project)
|
|
77
78
|
* PRD.md (legacy — at project root)
|
|
78
79
|
|
|
80
|
+
Sessions:
|
|
81
|
+
{branch} — {Developer}: {Working On} ({date})
|
|
82
|
+
{branch} — {Developer}: {Working On} ({date}, stale — branch deleted)
|
|
83
|
+
|
|
79
84
|
[routing recommendations from Step 3]
|
|
80
85
|
```
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
Show Sessions section only if 2+ session files exist. Mark sessions as `stale` if their branch no longer exists locally (`git branch --list`).
|
|
88
|
+
|
|
89
|
+
The PRDs section shows all PRD files found. Mark the one whose `**Branch:**` header matches the current git branch as "(active — current project)". If no branch match, fall back to STATE.md "Active PRD". Mark others as "(ready — future project)". Legacy root `PRD.md` shows as "(legacy — at project root)". Omit PRDs section if no PRD files exist.
|
|
83
90
|
|
|
84
91
|
Adapt the block based on available information. If STATE.md is missing, omit "Last session". If ROADMAP.md is missing, omit milestone counts and say "Run /flow:setup to set up tracking."
|
|
85
92
|
|
package/skills/flow-task.md
CHANGED
|
@@ -19,8 +19,8 @@ RULES:
|
|
|
19
19
|
|
|
20
20
|
Read ALL in parallel (skip missing files gracefully):
|
|
21
21
|
- `.planning/STATE.md`, `.planning/ROADMAP.md`, `CLAUDE.md`, `tasks/lessons.md`
|
|
22
|
-
- Active PRD
|
|
23
|
-
- `.claude/memory/session.md` (if exists)
|
|
22
|
+
- Active PRD: (1) `git branch --show-current` (2) read first 10 lines of each `.planning/prds/*.md` for `**Branch:**` header (3) match current branch → active PRD (4) no match: fall back to STATE.md "Active PRD" (5) still none: check legacy root `PRD.md` (6) nothing: no active PRD
|
|
23
|
+
- `.claude/memory/session-{branch-slug}.md` (if exists). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
24
24
|
|
|
25
25
|
Run `git config user.name` for developer identity.
|
|
26
26
|
|
|
@@ -83,7 +83,7 @@ IF `.planning/STATE.md` exists, append to "What Was Built":
|
|
|
83
83
|
|
|
84
84
|
RULES: Do NOT update ROADMAP.md, PRDs, or create `.planning/` if missing.
|
|
85
85
|
|
|
86
|
-
**Session state:** Write `.claude/memory/session.md` (create dir if needed):
|
|
86
|
+
**Session state:** Write `.claude/memory/session-{branch-slug}.md` (create dir if needed). Branch slug: `git branch --show-current`, replace `/` with `-`, lowercase. Detached HEAD fallback: `session.md`.
|
|
87
87
|
`# Session State` with Date, Developer, Branch, Working On (`/flow:task — [desc]`), Status, Next, Blockers fields.
|
|
88
88
|
|
|
89
89
|
Lessons prompt via AskUserQuestion: "Any lessons worth capturing?" — "No" / "Yes, let me describe it" → capture to `tasks/lessons.md` as one-liner. Skip if lessons.md doesn't exist. If at 10, promote most battle-tested to `CLAUDE.md ## Learned Rules` first.
|