flow-workflows 0.102.0 → 0.103.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.
Files changed (48) hide show
  1. package/adapters/codex/CORE.md +70 -1
  2. package/adapters/codex/skills/flow-bug-start/SKILL.md +2 -2
  3. package/adapters/codex/skills/flow-feat-ship/SKILL.md +6 -0
  4. package/adapters/codex/skills/flow-feat-start/SKILL.md +8 -2
  5. package/adapters/codex/skills/flow-init/SKILL.md +2 -0
  6. package/adapters/codex/skills/flow-next/SKILL.md +7 -4
  7. package/adapters/codex/skills/flow-work-README/SKILL.md +2 -0
  8. package/adapters/codex/skills/flow-work-clean/SKILL.md +1 -1
  9. package/adapters/codex/skills/flow-work-daily/SKILL.md +7 -2
  10. package/adapters/codex/skills/flow-work-resume/SKILL.md +2 -1
  11. package/adapters/codex/skills/flow-work-run/SKILL.md +2 -2
  12. package/adapters/gemini/CORE.md +70 -1
  13. package/adapters/gemini/commands/flow/bug/start.toml +2 -2
  14. package/adapters/gemini/commands/flow/feat/ship.toml +6 -0
  15. package/adapters/gemini/commands/flow/feat/start.toml +8 -2
  16. package/adapters/gemini/commands/flow/init.toml +2 -0
  17. package/adapters/gemini/commands/flow/next.toml +7 -4
  18. package/adapters/gemini/commands/flow/work/README.toml +2 -0
  19. package/adapters/gemini/commands/flow/work/clean.toml +1 -1
  20. package/adapters/gemini/commands/flow/work/daily.toml +7 -2
  21. package/adapters/gemini/commands/flow/work/resume.toml +2 -1
  22. package/adapters/gemini/commands/flow/work/run.toml +2 -2
  23. package/adapters/hermes/CORE.md +70 -1
  24. package/adapters/hermes/skills/flow-bug-start/SKILL.md +2 -2
  25. package/adapters/hermes/skills/flow-feat-ship/SKILL.md +6 -0
  26. package/adapters/hermes/skills/flow-feat-start/SKILL.md +8 -2
  27. package/adapters/hermes/skills/flow-init/SKILL.md +2 -0
  28. package/adapters/hermes/skills/flow-next/SKILL.md +7 -4
  29. package/adapters/hermes/skills/flow-work-README/SKILL.md +2 -0
  30. package/adapters/hermes/skills/flow-work-clean/SKILL.md +1 -1
  31. package/adapters/hermes/skills/flow-work-daily/SKILL.md +7 -2
  32. package/adapters/hermes/skills/flow-work-resume/SKILL.md +2 -1
  33. package/adapters/hermes/skills/flow-work-run/SKILL.md +2 -2
  34. package/adapters/opencode/CORE.md +70 -1
  35. package/adapters/opencode/commands/flow-bug-start.md +2 -2
  36. package/adapters/opencode/commands/flow-feat-ship.md +6 -0
  37. package/adapters/opencode/commands/flow-feat-start.md +8 -2
  38. package/adapters/opencode/commands/flow-init.md +2 -0
  39. package/adapters/opencode/commands/flow-next.md +7 -4
  40. package/adapters/opencode/commands/flow-work-README.md +2 -0
  41. package/adapters/opencode/commands/flow-work-clean.md +1 -1
  42. package/adapters/opencode/commands/flow-work-daily.md +7 -2
  43. package/adapters/opencode/commands/flow-work-resume.md +2 -1
  44. package/adapters/opencode/commands/flow-work-run.md +2 -2
  45. package/package.json +1 -1
  46. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  47. package/plugins/flow/CHANGELOG.md +33 -0
  48. package/plugins/flow/examples/FLOW.template.md +8 -0
@@ -38,13 +38,14 @@ Every *mine* below — your MRs/PRs, your threads, your tickets — is the **aut
38
38
 
39
39
  ## 1. Local layer (always — the base of the briefing)
40
40
 
41
- - `git branch --show-current` → the **active** work.
42
- - `ls -1 .claude/work/` (ignore `_archive`); read each `meta.json` (folders are `<TICKET>-<slug>`, `<slug>` for ticket-less works, or just `<TICKET>` for older ones — identify each by `meta.json.ticket`, not the folder name). Read `00-summary.md` per work when it exists and take the recap from it (`Next:` line, what is pending) instead of every artifact (flow-core §5); missing → the most recent artifact(s) (`NN-*.md`) and `meta.notes`, not re-derived from code.
41
+ - The work for this branch (flow-core §0) → the **active** work. From the main checkout on the base branch there is none — that is not "nothing in flight".
42
+ - Every work folder in both locations of flow-core §0, here and the main checkout (ignore `_archive`); read each `meta.json`. Name the worktree a work is checked out in (`git worktree list`) next to it, so the user knows where to `cd` (folders are `<TICKET>-<slug>`, `<slug>` for ticket-less works, or just `<TICKET>` for older ones — identify each by `meta.json.ticket`, not the folder name). Read `00-summary.md` per work when it exists and take the recap from it (`Next:` line, what is pending) instead of every artifact (flow-core §5); missing → the most recent artifact(s) (`NN-*.md`) and `meta.notes`, not re-derived from code.
43
43
  - **"Last session" boundary**: the marker from §7 if present; otherwise the most recent commit date and the newest `updated_at` across works.
44
44
  - Order works by `updated_at` (most recent first); the first is the *"what were we on?"* answer.
45
45
  - Repo pulse: `git log --oneline --since="<last-session boundary>"` (fallback `-10`) and `git status --short` for uncommitted changes.
46
46
  - Per work: `phase`, `phases_done`, MRs and their `status` (from `meta.json.mrs`), and what was **left pending**.
47
47
  - **Cross-repo parts**: `meta.json.related_repos` entries not `done` → a *sibling repo* still needs work. Surface only what is recorded — never scan or open the other repo.
48
+ - **Roadmap** (flow-core §10): where the project stands, and which open work delivers which item. An unchecked item no open work links, ahead of the in-progress ones, is what to pick up next.
48
49
  - **Open follow-ups**: `followups[]` entries not `declined`/`logged`/`done`, from the live works **and** from `_archive/*/meta.json` (flow-core §7). The archive is read for this and nothing else — a finished work is exactly when its deferred items stop being visible.
49
50
  - **Measured cost**: `meta.json.cost[]` entries (flow-core §4) — sum the `usd` there, count the phases behind them, count apart the entries whose `source` is `not reported`. No entries → no figure at all: absence is not zero. The figures are the harness's client-side estimates, not a bill; `flow cost` prints them phase by phase.
50
51
 
@@ -117,6 +118,7 @@ The briefing's reference section: every open work, compact, most recently update
117
118
  Cross-repo: <repo>: <scope> — contract not handed over (only if any)
118
119
  Follow-ups: 2 awaiting a decision · 1 accepted, not started (only if any)
119
120
  Cost: $0.71 measured over 2 phases · 1 phase not reported (only if any)
121
+ Roadmap: <phase › item it delivers> (only if linked)
120
122
  Next: <the concrete next command>
121
123
  ```
122
124
 
@@ -137,6 +139,9 @@ Yesterday / last session
137
139
  Today
138
140
  <what to resume + what the forge/tracker asks of you, ordered by urgency>
139
141
 
142
+ Roadmap (only with one)
143
+ <phase › milestone — done/total · in progress: item (work) · next: item>
144
+
140
145
  Blockers / attention
141
146
  <CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · divergences · raised priorities — or "none">
142
147
 
@@ -27,7 +27,7 @@ reads where the run got to, not how the run continues.
27
27
  ## 1. Detection
28
28
 
29
29
  - `git branch --show-current`.
30
- - Search `.claude/work/` for the `meta.json` whose `branch` matches.
30
+ - Find the work for this branch (flow-core §0: both work-folder locations, `branch`, `mrs[].branch` or `worktree`).
31
31
  - None found → ask the user for the ticket or whether to start a new one.
32
32
  - `meta.json.worktree` non-null and the current directory is not that worktree → tell the user the work lives in a worktree and to `cd <worktree>` before continuing; run the repo-state checks below from there (`git -C <worktree> …`).
33
33
 
@@ -44,6 +44,7 @@ Waves: Wave 1: #1 ∥ #2 → Wave 2: #3 → Wave 3: #4 ∥ #5 (lin
44
44
  Last updated: <updated_at>
45
45
  Notes: <meta.notes>
46
46
  Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
47
+ Roadmap: <meta.roadmap: "under › item" — and the project's one line, flow-core §10> (line only with a roadmap)
47
48
  Ticket thread: <new since <updated_at>: <n> comment(s) that change the work — detailed below · or "nothing new" · or "not read"> (line only in ticket mode, from §2.5)
48
49
  Unattended: <from `meta.json.pending` when it is set: the gate, `resume` and the question file's first line — the orchestrator holds the question and will relaunch with its answer> (line only when `pending` is set)
49
50
  ```
@@ -36,8 +36,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
36
36
  orchestrator that cannot say why it launched the run cannot take one either.
37
37
  - Run `<cmd> ticket --json` and keep `number`, `title`, `base` and `kind` (`kind` absent or `null` → `feat`: the tracker could not tell, so flow decides). `kind` is re-read on every run; only a run that starts the work uses it — once the work exists, its folder says feat or bug.
38
38
  It fails or prints no `number` → `blocked` (flow-core §2.1).
39
- - Find the work: the `meta.json` under `.claude/work/` whose `ticket` equals `number` (archive
40
- excluded). None is not an error — it is the "none" of the table below.
39
+ - Find the work: the `meta.json` in the work folders (flow-core §0 — here and in the main
40
+ checkout) whose `ticket` equals `number` (archive excluded). None is not an error — it is the "none" of the table below.
41
41
 
42
42
  ## 2. Route
43
43
 
@@ -17,7 +17,7 @@ Every `/flow-*` command assumes these rules. They are stated once, here, so a co
17
17
  carries what is specific to its phase. Read this once per session; a command that says "load
18
18
  `flow-core`" means this file.
19
19
 
20
- **This file belongs to flow `0.102.0`.** Compare it once, at the start of the session, against
20
+ **This file belongs to flow `0.103.0`.** Compare it once, at the start of the session, against
21
21
  `version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
22
22
  is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
23
23
  — which is exactly what happens when a branch or a release candidate is loaded over an installed
@@ -89,6 +89,18 @@ a command relies on is simply absent in that session, and nothing else will repo
89
89
  base branch — and goes out in no MR/PR at all. So a phase writing a tracked file writes it
90
90
  **here**, in the directory it is running in, and `/flow-feat-ship §5.5` is what catches the
91
91
  tools that could not be told.
92
+ - **`.claude/work/` lives where the config does, and every command looks in both places.** It is
93
+ git-ignored in most repos, so it exists only in the main checkout: `start` writes it there, and
94
+ from a linked worktree a bare `.claude/work/` finds no works at all — `next` says "nothing in
95
+ flight" about a work that is in flight, and a phase reports the work missing. So **the work
96
+ folders are the union of `.claude/work/` here and in the main checkout** (located as above,
97
+ deduplicated when they are the same directory); a listing reads both, and a work is read and
98
+ written in the folder where it was found. A new work folder goes in the main checkout, unless
99
+ that checkout tracks `.claude/work/` — then it belongs to the branch and goes here.
100
+ **"The work for this branch"** — what every "load `meta.json` by current branch" means — is the
101
+ `meta.json` in those folders (`_archive/` excluded) whose `branch` or any `mrs[].branch` equals
102
+ `git branch --show-current`, or whose `worktree` equals `git rev-parse --show-toplevel`. The
103
+ SessionStart hook matches the same way.
92
104
  - **A fenced block in a FLOW file is an example, and an example is not configuration.** These
93
105
  files are prose with keys in them, and the rule that decides what a key *is* — a `- key:` line
94
106
  under a `## section` — knows nothing about triple backticks. So a block written to be pasted
@@ -1275,3 +1287,60 @@ estimate meeting a good change.
1275
1287
  **It travels into every brief.** A subagent handed a size or a `lines_est` is handed a thermometer,
1276
1288
  never a budget, and the brief says so (§6). An agent optimising for a number nobody told it was
1277
1289
  advisory is the one that returns tidier, shorter, worse code — and it returns it looking finished.
1290
+
1291
+ ## 10. Roadmap — the phases and milestones above the ticket
1292
+
1293
+ A ticket is the largest thing a work knows about: it splits into MRs/PRs (`04-mr-plan.md`), and
1294
+ nothing sits above it. A project that is being built in phases usually keeps that plan in a markdown
1295
+ file — phases, milestones, sub-milestones, tasks with checkboxes — and without this section no
1296
+ command reads it unless told to, `next` cannot say where the project stands, and nobody ticks off
1297
+ what an MR/PR delivered.
1298
+
1299
+ **The file.** `roadmap.path` in `FLOW.md`; `none` turns the whole section off. Empty → `ROADMAP.md`
1300
+ at the repo root, then `docs/ROADMAP.md`, and either counts only if it holds at least one checkbox
1301
+ line (`- [ ]` / `- [x]`). Nothing found → there is no roadmap, and every command below behaves as
1302
+ before, silently. A tracked file is read **here** (it is this branch's version); a git-ignored one
1303
+ from the main checkout, by §0's rule.
1304
+
1305
+ **Its shape is the author's, not flow's.** Headings are phases and milestones, at whatever depth the
1306
+ file uses; a checkbox line is a task; a checkbox line with checkbox children is a milestone made of
1307
+ those children. flow never rewrites the structure, renumbers, reorders or adds headings — it touches
1308
+ exactly two things: a checkbox, and a short annotation at the end of the line it ticks.
1309
+
1310
+ **Where the project stands** — computed the same way by `next`, `daily` and `resume`:
1311
+ - **Current phase**: the first heading, in file order, that still holds an unchecked item.
1312
+ - **In progress**: unchecked items an open work links (below), or that carry flow's in-progress
1313
+ annotation.
1314
+ - **Next**: the first unchecked item of the current phase that is neither — a leaf, not a milestone
1315
+ whose children are listed.
1316
+ - Said in one line: `Roadmap: <phase> › <milestone> — <done>/<total> · in progress: <item> (<work>) ·
1317
+ next: <item>`. Counts are the checkboxes under the current phase. All done → `Roadmap: complete`.
1318
+
1319
+ **The link.** A work records the item it delivers in `meta.json.roadmap`:
1320
+ `{ "path": "<file>", "item": "<the line's text, without checkbox or annotation>", "under": "<heading › heading>" }`
1321
+ — or `null`. `/flow-feat-start` sets it: an item the ticket clearly names (its id, or its title
1322
+ matching the item's text) is taken in every mode; otherwise `manual` asks once, offering the next
1323
+ unchecked items and *none*, and `guided`/`auto`/`unattended` record `null` and say so in one line. A
1324
+ work is linked to one item, at any depth: linking a milestone means the work delivers all its
1325
+ children.
1326
+
1327
+ **The mark — in the MR/PR, so the roadmap moves with the code and is reviewed with it.** `/flow-feat-ship`
1328
+ edits the file in the same commit as the change, and the preview shows the line it will become:
1329
+ - **First MR/PR of the work, more to come** → the item stays unchecked and gains
1330
+ ` — in progress (<TICKET>)`.
1331
+ - **Last MR/PR of the work** (the one that `Closes` the ticket, or a single one) → `- [x]` and the
1332
+ annotation becomes ` — done (<TICKET>)`. Every child of a linked milestone is ticked with it;
1333
+ a parent checkbox whose children are now all ticked is ticked too, without annotation.
1334
+ - **Intermediate MRs/PRs of a train** touch nothing: the first one marked the item and the last one
1335
+ closes it, so stacked branches never edit the same line twice.
1336
+ - Write the annotation's words in the file's language. flow recognises its own annotation as a
1337
+ trailing ` — <words> (<ticket>)` and replaces it rather than stacking a second one. The ticket,
1338
+ not the MR/PR url: the edit is committed before the MR/PR exists, and the ticket already leads to
1339
+ it. A ticket-less work writes its slug.
1340
+ - **The item cannot be found** (renamed, moved, deleted since `start`) → do not guess a near match:
1341
+ leave the file alone and say so in the ship's stop. **The file is git-ignored** → there is no MR/PR
1342
+ to carry it: edit it in place in the main checkout at the same moment, and say so.
1343
+ - `roadmap.mark: never` keeps the roadmap read-only — a team document flow only reads.
1344
+
1345
+ Bugs do not link: a bug repairs something already delivered, and the roadmap tracks what is still to
1346
+ deliver. A bug that *is* a roadmap item is started as a feature.
@@ -49,7 +49,7 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
49
49
 
50
50
  - Verify you are in the correct repo.
51
51
  - **Determine the mode** from `$ARGUMENTS` (`--study` already taken out): non-empty → *ticket mode* (identifier = `$ARGUMENTS`); empty → *ticket-less mode* (identifier = the slug resolved in §1.5).
52
- - Once the identifier is known, check whether the work already exists: ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after §1.5.2 decides the slug. If one exists, suggest `/flow-work-resume`.
52
+ - Once the identifier is known, check whether the work already exists: in both work-folder locations (flow-core §0); ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after §1.5.2 decides the slug. If one exists, suggest `/flow-work-resume`.
53
53
  - This command **creates** `00-summary.md` (§4); there is nothing to read yet.
54
54
 
55
55
  **Work directory naming.** The work lives in `.claude/work/<work-dir>/`. `meta.json.ticket` stays the **pure identifier** (the real ticket id, or the slug in ticket-less local-only) — it feeds the tracker view, the issue link and `{TICKET}` in the branch. The directory name adds a slug:
@@ -158,7 +158,7 @@ The `Closes #N` in the body (`/flow-bug-ship §1`) is **ignored when the MR/PR t
158
158
 
159
159
  ## 4. Write artifacts
160
160
 
161
- Create the work directory per §0: `.claude/work/<TICKET>-<slug>/` in ticket mode, `.claude/work/<slug>/` in ticket-less local-only mode.
161
+ Create the work directory where flow-core §0 puts a new one (the main checkout, unless it tracks `.claude/work/`) per §0: `.claude/work/<TICKET>-<slug>/` in ticket mode, `.claude/work/<slug>/` in ticket-less local-only mode.
162
162
 
163
163
  `<work-dir>/meta.json`:
164
164
  ```json
@@ -118,6 +118,10 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
118
118
  - **`linear`**: `Closes <TICKET>` (Linear id, e.g. `ENG-123`) on the completing MR/PR; nothing on intermediates.
119
119
  - **`none` / empty**: nothing to link.
120
120
 
121
+ ### Roadmap mark (only with a linked item)
122
+
123
+ `meta.json.roadmap` set and `roadmap.mark` not `never` → decide the edit by flow-core §10, with the same *completes / intermediate* answer as the issue link above: the work's first MR/PR with more to come marks the item in progress, the completing one ticks it (with its children, and any parent left with every child ticked), an intermediate one touches nothing. Find the line by its `item` text with flow's annotation stripped; not found → no edit, and the stop says so. Decide it here, show it in the §3 preview, write it in §4.1 — never before approval.
124
+
121
125
  ### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
122
126
 
123
127
  When the body mentions **another MR/PR of the delivery plan**, **never write `#<n>`** with `<n>` the plan order from `meta.json.mrs` — GitHub/GitLab auto-link it to whatever issue/PR carries that number (`#5 (closed)`).
@@ -199,6 +203,7 @@ Squash on merge: <git.squash from FLOW.md>
199
203
  Target branch: <git.default_base from FLOW.md, or the parent branch in train mode>
200
204
  Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "Part of #123 (intermediate train PR)" / "none — Jira links by title prefix">
201
205
  Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
206
+ Roadmap: <"<line now>" → "<line after>" / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item)
202
207
 
203
208
  Description:
204
209
  <full description rendered exactly as it will appear in the MR/PR>
@@ -231,6 +236,7 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
231
236
  Only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
232
237
 
233
238
  - `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
239
+ - **Roadmap mark approved in §3** → write it into the roadmap file **before** the commit, here in the worktree (a tracked file belongs to the branch, flow-core §0), so it ships in the same commit as the change. A git-ignored roadmap is edited in place in the main checkout instead, and the stop says it travelled in no MR/PR.
234
240
  - `commit-push-pr` skill unavailable → commit and push manually and create the MR/PR with the `git.cli` CLI from `FLOW.md` — always with the content confirmed in §3.
235
241
 
236
242
  **Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh the panel (flow-core §4) right here, before §4.2 and before anything else can fail.
@@ -56,7 +56,7 @@ its reason file in a `mktemp -d` directory (flow-core §2.1).
56
56
  step's default. This command **creates** `00-summary.md` (§6) instead of reading it (flow-core §5).
57
57
  - No recognizable project structure → warn and stop.
58
58
  - **Determine the mode** (`--study` already taken out): `$ARGUMENTS` non-empty → *ticket mode* (identifier = `$ARGUMENTS`); empty → *ticket-less* (identifier = the §2.5 slug).
59
- - Once the identifier is known, check the work does not exist: ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after the slug is decided in §2.5. Exists → do not overwrite; warn and suggest `/flow-work-resume`.
59
+ - Once the identifier is known, check the work does not exist: in both work-folder locations (flow-core §0); ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after the slug is decided in §2.5. Exists → do not overwrite; warn and suggest `/flow-work-resume`.
60
60
 
61
61
  **Work directory naming.** Work lives in `.claude/work/<work-dir>/`. `meta.json.ticket` stays the **pure identifier** (real ticket id, or the slug in ticket-less local-only) — it feeds the tracker view, the issue link and `{TICKET}`. The directory adds a slug:
62
62
  - **ticket mode** → `<TICKET>-<slug>`; `<slug>` = short English kebab-case (≤5 words) from the ticket title, the **same** slug as the branch (§5).
@@ -155,6 +155,10 @@ While reading the ticket (§2), look for a **published contract block** (what `/
155
155
 
156
156
  Another repo referenced but **no** contract → say so in one line — *"the `<repo>` side is referenced but no contract was published; the literal shapes will have to be confirmed with that side, not assumed"* — and record it in `01-context.md` under the same heading. **Silent by default**: no cross-repo signal → skip this section, no note.
157
157
 
158
+ ## 3.7 Roadmap item
159
+
160
+ Only when the repo has a roadmap (flow-core §10) and `roadmap.path` is not `none`: link this work to the item it delivers, by §10's rule. A clear match — the item names this ticket's id, or its text is this ticket's title (a ticket-less start drafted from a roadmap item is one) — is taken in every mode, with no question. Otherwise `manual` asks once (header "Roadmap"): the next two or three unchecked items of the current phase, **none** as the last option; `guided`/`auto`/`unattended` record `null` and say in one line that the work is not linked. Never create, rename or reorder an item here: start reads the roadmap, `ship` is the only command that writes it.
161
+
158
162
  ## 4. Classify size
159
163
 
160
164
  Propose a size. **`manual`** → confirm with one `AskUserQuestion`. **`guided`/`auto` → do not ask**: record your estimate in `01-context.md` with a one-line reason and continue — the size is a route, not a commitment; `/flow-feat-design §1.5.5`, `§7` and `/flow-feat-plan §5` reclassify.
@@ -232,7 +236,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
232
236
 
233
237
  ## 6. Write artifacts
234
238
 
235
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
239
+ Create the work directory where flow-core §0 puts a new one (the main checkout, unless it tracks `.claude/work/`) per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
236
240
 
237
241
  ### `meta.json`
238
242
  ```json
@@ -250,6 +254,7 @@ Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode)
250
254
  "draft_from_conversation": false,
251
255
  "tracker_issue": null,
252
256
  "related_repos": [],
257
+ "roadmap": null,
253
258
  "started_at": "<ISO8601 now>",
254
259
  "updated_at": "<ISO8601 now>",
255
260
  "notes": ""
@@ -259,6 +264,7 @@ Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode)
259
264
  - `handoff` — `true` only when `--study` was given and `git.handoff_branch` is set; omit it otherwise.
260
265
  - Ticket-less (§2.5) → `draft_from_conversation: true`, `tracker_issue` = created issue id/url (or `null` if local-only). Ticket mode → defaults above.
261
266
  - `base` — `unattended` only: the ticket's `base`, or `git.default_base` when it is empty — never empty (the branch every MR/PR of this work starts from and targets; `/flow-work-run` refreshes it on `merged`). Omit it in every other mode.
267
+ - `roadmap` from §3.7 — `{ "path", "item", "under" }` (flow-core §10), or `null` with no roadmap or no link.
262
268
  - `related_repos` from §3.5 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo; `[]` for a single-repo task.
263
269
  - **This work *is* an accepted follow-up** (the ticket came from another work's `followups[]`, flow-core §7) → set `origin: { "work": "<originating work dir>", "followup": "F<n>" }`, carry that entry's recorded `why` into `01-context.md` verbatim instead of re-deriving it, and set the originating entry to `in_progress` with `work` naming this folder. Not a follow-up → omit `origin` entirely.
264
270
 
@@ -81,6 +81,8 @@ Run, deduce, show what was found for confirmation or correction:
81
81
 
82
82
  <!-- stack-detection:end -->
83
83
 
84
+ - **Roadmap** (`roadmap.path`, flow-core §10) — a markdown file at the root or under `docs/` with headings and checkbox lines whose name or title says plan, roadmap, phases or milestones, in any language. `ROADMAP.md` or `docs/ROADMAP.md` → nothing to write, it is found by default. Any other → propose its path. Several → ask which one is the project's plan. None → leave the section out.
85
+
84
86
  ## 3. Ask five things
85
87
 
86
88
  Everything §2 detected is shown **in one screen** for confirmation or correction — host, base
@@ -28,10 +28,11 @@ runs a phase on its own and never advances `meta.json`.
28
28
  1. Identify the active harness. Does `FLOW.md`, the context file `FLOW_CONTEXT` selects, or the
29
29
  active `FLOW.<harness>.md` exist (flow-core §0)? An inactive harness's overlay, or a context file
30
30
  no variable selects, does not configure this session.
31
- 2. `git branch --show-current`, and whether `.claude/work/*/meta.json` has a `branch` equal to it (also check `worktree` entries, and `.claude/work/_archive/` is ignored).
32
- 3. `.claude/work/` — how many open works, and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
33
- 3b. `followups[]` across those works **and** `.claude/work/_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
31
+ 2. The work for this branch (flow-core §0): the work folders here **and** in the main checkout, matched by `branch`, `mrs[].branch` or `worktree`. From a linked worktree the folders are usually only in the main checkout — reading `.claude/work/` here alone finds nothing.
32
+ 3. Those work folders — how many open works, in which worktree each is checked out (`git worktree list`), and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
33
+ 3b. `followups[]` across those works **and** their `_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
34
34
  4. Is the working tree dirty (`git status --porcelain`)?
35
+ 5. The roadmap, if the repo has one (flow-core §10): where the project stands — current phase, what is in progress, the next unstarted item.
35
36
 
36
37
  ## 2. Route
37
38
 
@@ -39,11 +40,13 @@ runs a phase on its own and never advances `meta.json`.
39
40
  |---|---|---|
40
41
  | No FLOW layer present | "This repo is not configured for flow on this harness yet." One line on what the FLOW config is (personal config, auto-detected). | `/flow-init` |
41
42
  | A work matches the current branch | Its stop header (flow-core §3: ticket · size · phase · MR #n of N) and the next phase for its size. | `/flow-work-resume` |
42
- | No match, but open works exist | Count, and the two most recently updated with their phase. | `/flow-work-daily`, or `/flow-feat-start` / `/flow-bug-start` if the user said what they want to do |
43
+ | No match, but open works exist | Count, and the two most recently updated with their phase — and the worktree each lives in, so the answer to "where were we" is a `cd`. | `/flow-work-daily`, or `/flow-feat-start` / `/flow-bug-start` if the user said what they want to do |
43
44
  | No works at all, but an accepted follow-up is waiting | "Nothing in flight — but `<TICKET>` F1 was accepted and never started: `<title>`." | `/flow-feat-start <ticket>` (or `/flow-bug-start`) for that follow-up · `/flow-feat-start` for something else |
45
+ | No works at all, but the roadmap has a next item | "Nothing in flight. Roadmap: `<phase> › <milestone>` — next: `<item>`." | `/flow-feat-start <id>` when the item names a ticket, else `/flow-feat-start` with the item as the draft · `/flow-feat-start` for something else |
44
46
  | No works at all | "Nothing in flight." | `/flow-feat-start <TICKET>` (or with no ticket, from the conversation) · `/flow-bug-start <TICKET>` |
45
47
 
46
48
  - The SessionStart hook (`hooks/session-start.sh`) has already printed the first two rows of this table's second case — the header and what the last session was doing — off disk, without reading a ticket or an artifact. Say them again anyway: `next` is where the user asked, and a line they scrolled past is not an answer.
49
+ - A roadmap exists → its one line (flow-core §10) goes under the situation in every row but the first: the work in front of you is one step of it, and that line is what "where are we" means for the project.
47
50
  - An `accepted` follow-up exists **and** other works are open → do not reroute; add one line naming it after the options. It is a standing commitment, not an interruption.
48
51
  - Dirty tree and no matching work → mention it in one line ("uncommitted changes on `<branch>`, no work is tracking them") before the options; `start` will warn again.
49
52
  - A FLOW layer is present but `/flow-doctor` has never been run in this session and the
@@ -121,6 +121,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
121
121
  "related_repos": [
122
122
  { "repo": "sibling-project", "scope": "what's needed there", "status": "pending" | "in_progress" | "done", "contract_handoff": "none" | "pending" | "published → <location>" }
123
123
  ],
124
+ "roadmap": { "path": "ROADMAP.md", "item": "the checkbox line's text", "under": "Phase 2 › Milestone 2.3" } | null,
124
125
  "followups": [
125
126
  { "id": "F1",
126
127
  "kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
@@ -165,6 +166,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
165
166
  - **`review_findings[]`**: one entry per finding **per source** — `{ round, origin, severity, file, discarded_by_skeptic }`, no finding text (that stays in `06-review.md`). Written at `review`'s Close, and by `flow review --record` when the CLI ran the panel. `origin` is `built-in`, a panel role, or the pass that raised it. It exists so a pass can be retired on evidence: `flow cost` reports per origin how many findings each contributed, how many **only** it raised, and how many of those survived §6 — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no exclusive surviving finding across twenty reviews and the pass comes out of the command.
166
167
  Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
167
168
  - **`respond_rounds`**: rounds of `/flow-work-respond` on an MR/PR. `/flow-work-respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
169
+ - **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow-feat-start §3.7`, marked in progress / ticked by `/flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume`. `null` with no roadmap, no link, or a bug.
168
170
  - **`related_repos`**: the **other repos a task touches**. Captured at `/flow-feat-start` / `/flow-bug-start` §cross-repo, refined at `design`/`plan`, reminded at `ship`, shown by `daily`/`resume`/`status`. flow only notes and reminds — never touches the other repo. `[]` for single-repo.
169
171
  - **`ticket_deps`**: the **other tickets this study cannot be built without** — something the design needs that is not on the base branch and that another ticket brings (`/flow-feat-design` §5.1, `/flow-bug-investigate` §4.1). Read at the two exits of a study: `/flow-work-handoff` §5 writes a `Depends on <ticket>` line per entry into the ticket body, and an unattended study run passes `--depends-on N` per entry on its `done` (flow-core §2.1). Not `mrs[].depends_on`, which orders this work's own MRs/PRs. Written whole each time `design` (or `investigate`) runs, and removed when an unattended study is rewound. `[]` or absent when the study depends on nothing.
170
172
  - **`contract_handoff`**: whether the sibling knows **what shape to build against** (`scope` is prose; distinct from `status`). `none` — consumes no contract declared here. `pending` — consumes one, not handed over yet. `published → <location>` — published where that side reads it (normally the tracker ticket; `/flow-feat-ship` §6.3), picked up by the sibling's `/flow-feat-start` §3.6.
@@ -68,7 +68,7 @@ Three lists, gathered in one pass:
68
68
 
69
69
  - **Worktrees** — `git worktree list --porcelain` → path + branch per entry. Skip the first (the main checkout).
70
70
  - **Local branches** — `git for-each-ref --format='%(refname:short)|%(upstream:short)|%(upstream:track)' refs/heads/`.
71
- - **Work folders** — `ls -1 .claude/work/` (ignore `_archive`), reading each `meta.json` for `ticket`, `branch`, `phase`, `worktree`, `mrs[]`.
71
+ - **Work folders** — both locations of flow-core §0 (here and the main checkout; ignore `_archive`), reading each `meta.json` for `ticket`, `branch`, `phase`, `worktree`, `mrs[]`.
72
72
 
73
73
  Two strays caught in the same sweep:
74
74
 
@@ -42,13 +42,14 @@ Every *mine* below — your MRs/PRs, your threads, your tickets — is the **aut
42
42
 
43
43
  ## 1. Local layer (always — the base of the briefing)
44
44
 
45
- - `git branch --show-current` → the **active** work.
46
- - `ls -1 .claude/work/` (ignore `_archive`); read each `meta.json` (folders are `<TICKET>-<slug>`, `<slug>` for ticket-less works, or just `<TICKET>` for older ones — identify each by `meta.json.ticket`, not the folder name). Read `00-summary.md` per work when it exists and take the recap from it (`Next:` line, what is pending) instead of every artifact (flow-core §5); missing → the most recent artifact(s) (`NN-*.md`) and `meta.notes`, not re-derived from code.
45
+ - The work for this branch (flow-core §0) → the **active** work. From the main checkout on the base branch there is none — that is not "nothing in flight".
46
+ - Every work folder in both locations of flow-core §0, here and the main checkout (ignore `_archive`); read each `meta.json`. Name the worktree a work is checked out in (`git worktree list`) next to it, so the user knows where to `cd` (folders are `<TICKET>-<slug>`, `<slug>` for ticket-less works, or just `<TICKET>` for older ones — identify each by `meta.json.ticket`, not the folder name). Read `00-summary.md` per work when it exists and take the recap from it (`Next:` line, what is pending) instead of every artifact (flow-core §5); missing → the most recent artifact(s) (`NN-*.md`) and `meta.notes`, not re-derived from code.
47
47
  - **"Last session" boundary**: the marker from §7 if present; otherwise the most recent commit date and the newest `updated_at` across works.
48
48
  - Order works by `updated_at` (most recent first); the first is the *"what were we on?"* answer.
49
49
  - Repo pulse: `git log --oneline --since="<last-session boundary>"` (fallback `-10`) and `git status --short` for uncommitted changes.
50
50
  - Per work: `phase`, `phases_done`, MRs and their `status` (from `meta.json.mrs`), and what was **left pending**.
51
51
  - **Cross-repo parts**: `meta.json.related_repos` entries not `done` → a *sibling repo* still needs work. Surface only what is recorded — never scan or open the other repo.
52
+ - **Roadmap** (flow-core §10): where the project stands, and which open work delivers which item. An unchecked item no open work links, ahead of the in-progress ones, is what to pick up next.
52
53
  - **Open follow-ups**: `followups[]` entries not `declined`/`logged`/`done`, from the live works **and** from `_archive/*/meta.json` (flow-core §7). The archive is read for this and nothing else — a finished work is exactly when its deferred items stop being visible.
53
54
  - **Measured cost**: `meta.json.cost[]` entries (flow-core §4) — sum the `usd` there, count the phases behind them, count apart the entries whose `source` is `not reported`. No entries → no figure at all: absence is not zero. The figures are the harness's client-side estimates, not a bill; `flow cost` prints them phase by phase.
54
55
 
@@ -121,6 +122,7 @@ The briefing's reference section: every open work, compact, most recently update
121
122
  Cross-repo: <repo>: <scope> — contract not handed over (only if any)
122
123
  Follow-ups: 2 awaiting a decision · 1 accepted, not started (only if any)
123
124
  Cost: $0.71 measured over 2 phases · 1 phase not reported (only if any)
125
+ Roadmap: <phase › item it delivers> (only if linked)
124
126
  Next: <the concrete next command>
125
127
  ```
126
128
 
@@ -141,6 +143,9 @@ Yesterday / last session
141
143
  Today
142
144
  <what to resume + what the forge/tracker asks of you, ordered by urgency>
143
145
 
146
+ Roadmap (only with one)
147
+ <phase › milestone — done/total · in progress: item (work) · next: item>
148
+
144
149
  Blockers / attention
145
150
  <CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · divergences · raised priorities — or "none">
146
151
 
@@ -31,7 +31,7 @@ reads where the run got to, not how the run continues.
31
31
  ## 1. Detection
32
32
 
33
33
  - `git branch --show-current`.
34
- - Search `.claude/work/` for the `meta.json` whose `branch` matches.
34
+ - Find the work for this branch (flow-core §0: both work-folder locations, `branch`, `mrs[].branch` or `worktree`).
35
35
  - None found → ask the user for the ticket or whether to start a new one.
36
36
  - `meta.json.worktree` non-null and the current directory is not that worktree → tell the user the work lives in a worktree and to `cd <worktree>` before continuing; run the repo-state checks below from there (`git -C <worktree> …`).
37
37
 
@@ -48,6 +48,7 @@ Waves: Wave 1: #1 ∥ #2 → Wave 2: #3 → Wave 3: #4 ∥ #5 (lin
48
48
  Last updated: <updated_at>
49
49
  Notes: <meta.notes>
50
50
  Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
51
+ Roadmap: <meta.roadmap: "under › item" — and the project's one line, flow-core §10> (line only with a roadmap)
51
52
  Ticket thread: <new since <updated_at>: <n> comment(s) that change the work — detailed below · or "nothing new" · or "not read"> (line only in ticket mode, from §2.5)
52
53
  Unattended: <from `meta.json.pending` when it is set: the gate, `resume` and the question file's first line — the orchestrator holds the question and will relaunch with its answer> (line only when `pending` is set)
53
54
  ```
@@ -40,8 +40,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
40
40
  orchestrator that cannot say why it launched the run cannot take one either.
41
41
  - Run `<cmd> ticket --json` and keep `number`, `title`, `base` and `kind` (`kind` absent or `null` → `feat`: the tracker could not tell, so flow decides). `kind` is re-read on every run; only a run that starts the work uses it — once the work exists, its folder says feat or bug.
42
42
  It fails or prints no `number` → `blocked` (flow-core §2.1).
43
- - Find the work: the `meta.json` under `.claude/work/` whose `ticket` equals `number` (archive
44
- excluded). None is not an error — it is the "none" of the table below.
43
+ - Find the work: the `meta.json` in the work folders (flow-core §0 — here and in the main
44
+ checkout) whose `ticket` equals `number` (archive excluded). None is not an error — it is the "none" of the table below.
45
45
 
46
46
  ## 2. Route
47
47
 
@@ -16,7 +16,7 @@ Every `/flow-*` command assumes these rules. They are stated once, here, so a co
16
16
  carries what is specific to its phase. Read this once per session; a command that says "load
17
17
  `flow-core`" means this file.
18
18
 
19
- **This file belongs to flow `0.102.0`.** Compare it once, at the start of the session, against
19
+ **This file belongs to flow `0.103.0`.** Compare it once, at the start of the session, against
20
20
  `version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
21
21
  is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
22
22
  — which is exactly what happens when a branch or a release candidate is loaded over an installed
@@ -88,6 +88,18 @@ a command relies on is simply absent in that session, and nothing else will repo
88
88
  base branch — and goes out in no MR/PR at all. So a phase writing a tracked file writes it
89
89
  **here**, in the directory it is running in, and `/flow-feat-ship §5.5` is what catches the
90
90
  tools that could not be told.
91
+ - **`.claude/work/` lives where the config does, and every command looks in both places.** It is
92
+ git-ignored in most repos, so it exists only in the main checkout: `start` writes it there, and
93
+ from a linked worktree a bare `.claude/work/` finds no works at all — `next` says "nothing in
94
+ flight" about a work that is in flight, and a phase reports the work missing. So **the work
95
+ folders are the union of `.claude/work/` here and in the main checkout** (located as above,
96
+ deduplicated when they are the same directory); a listing reads both, and a work is read and
97
+ written in the folder where it was found. A new work folder goes in the main checkout, unless
98
+ that checkout tracks `.claude/work/` — then it belongs to the branch and goes here.
99
+ **"The work for this branch"** — what every "load `meta.json` by current branch" means — is the
100
+ `meta.json` in those folders (`_archive/` excluded) whose `branch` or any `mrs[].branch` equals
101
+ `git branch --show-current`, or whose `worktree` equals `git rev-parse --show-toplevel`. The
102
+ SessionStart hook matches the same way.
91
103
  - **A fenced block in a FLOW file is an example, and an example is not configuration.** These
92
104
  files are prose with keys in them, and the rule that decides what a key *is* — a `- key:` line
93
105
  under a `## section` — knows nothing about triple backticks. So a block written to be pasted
@@ -1274,3 +1286,60 @@ estimate meeting a good change.
1274
1286
  **It travels into every brief.** A subagent handed a size or a `lines_est` is handed a thermometer,
1275
1287
  never a budget, and the brief says so (§6). An agent optimising for a number nobody told it was
1276
1288
  advisory is the one that returns tidier, shorter, worse code — and it returns it looking finished.
1289
+
1290
+ ## 10. Roadmap — the phases and milestones above the ticket
1291
+
1292
+ A ticket is the largest thing a work knows about: it splits into MRs/PRs (`04-mr-plan.md`), and
1293
+ nothing sits above it. A project that is being built in phases usually keeps that plan in a markdown
1294
+ file — phases, milestones, sub-milestones, tasks with checkboxes — and without this section no
1295
+ command reads it unless told to, `next` cannot say where the project stands, and nobody ticks off
1296
+ what an MR/PR delivered.
1297
+
1298
+ **The file.** `roadmap.path` in `FLOW.md`; `none` turns the whole section off. Empty → `ROADMAP.md`
1299
+ at the repo root, then `docs/ROADMAP.md`, and either counts only if it holds at least one checkbox
1300
+ line (`- [ ]` / `- [x]`). Nothing found → there is no roadmap, and every command below behaves as
1301
+ before, silently. A tracked file is read **here** (it is this branch's version); a git-ignored one
1302
+ from the main checkout, by §0's rule.
1303
+
1304
+ **Its shape is the author's, not flow's.** Headings are phases and milestones, at whatever depth the
1305
+ file uses; a checkbox line is a task; a checkbox line with checkbox children is a milestone made of
1306
+ those children. flow never rewrites the structure, renumbers, reorders or adds headings — it touches
1307
+ exactly two things: a checkbox, and a short annotation at the end of the line it ticks.
1308
+
1309
+ **Where the project stands** — computed the same way by `next`, `daily` and `resume`:
1310
+ - **Current phase**: the first heading, in file order, that still holds an unchecked item.
1311
+ - **In progress**: unchecked items an open work links (below), or that carry flow's in-progress
1312
+ annotation.
1313
+ - **Next**: the first unchecked item of the current phase that is neither — a leaf, not a milestone
1314
+ whose children are listed.
1315
+ - Said in one line: `Roadmap: <phase> › <milestone> — <done>/<total> · in progress: <item> (<work>) ·
1316
+ next: <item>`. Counts are the checkboxes under the current phase. All done → `Roadmap: complete`.
1317
+
1318
+ **The link.** A work records the item it delivers in `meta.json.roadmap`:
1319
+ `{ "path": "<file>", "item": "<the line's text, without checkbox or annotation>", "under": "<heading › heading>" }`
1320
+ — or `null`. `/flow-feat-start` sets it: an item the ticket clearly names (its id, or its title
1321
+ matching the item's text) is taken in every mode; otherwise `manual` asks once, offering the next
1322
+ unchecked items and *none*, and `guided`/`auto`/`unattended` record `null` and say so in one line. A
1323
+ work is linked to one item, at any depth: linking a milestone means the work delivers all its
1324
+ children.
1325
+
1326
+ **The mark — in the MR/PR, so the roadmap moves with the code and is reviewed with it.** `/flow-feat-ship`
1327
+ edits the file in the same commit as the change, and the preview shows the line it will become:
1328
+ - **First MR/PR of the work, more to come** → the item stays unchecked and gains
1329
+ ` — in progress (<TICKET>)`.
1330
+ - **Last MR/PR of the work** (the one that `Closes` the ticket, or a single one) → `- [x]` and the
1331
+ annotation becomes ` — done (<TICKET>)`. Every child of a linked milestone is ticked with it;
1332
+ a parent checkbox whose children are now all ticked is ticked too, without annotation.
1333
+ - **Intermediate MRs/PRs of a train** touch nothing: the first one marked the item and the last one
1334
+ closes it, so stacked branches never edit the same line twice.
1335
+ - Write the annotation's words in the file's language. flow recognises its own annotation as a
1336
+ trailing ` — <words> (<ticket>)` and replaces it rather than stacking a second one. The ticket,
1337
+ not the MR/PR url: the edit is committed before the MR/PR exists, and the ticket already leads to
1338
+ it. A ticket-less work writes its slug.
1339
+ - **The item cannot be found** (renamed, moved, deleted since `start`) → do not guess a near match:
1340
+ leave the file alone and say so in the ship's stop. **The file is git-ignored** → there is no MR/PR
1341
+ to carry it: edit it in place in the main checkout at the same moment, and say so.
1342
+ - `roadmap.mark: never` keeps the roadmap read-only — a team document flow only reads.
1343
+
1344
+ Bugs do not link: a bug repairs something already delivered, and the roadmap tracks what is still to
1345
+ deliver. A bug that *is* a roadmap item is started as a feature.
@@ -47,7 +47,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
47
47
 
48
48
  - Verify you are in the correct repo.
49
49
  - **Determine the mode** from `$ARGUMENTS` (`--study` already taken out): non-empty → *ticket mode* (identifier = `$ARGUMENTS`); empty → *ticket-less mode* (identifier = the slug resolved in §1.5).
50
- - Once the identifier is known, check whether the work already exists: ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after §1.5.2 decides the slug. If one exists, suggest `/flow-work-resume`.
50
+ - Once the identifier is known, check whether the work already exists: in both work-folder locations (flow-core §0); ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after §1.5.2 decides the slug. If one exists, suggest `/flow-work-resume`.
51
51
  - This command **creates** `00-summary.md` (§4); there is nothing to read yet.
52
52
 
53
53
  **Work directory naming.** The work lives in `.claude/work/<work-dir>/`. `meta.json.ticket` stays the **pure identifier** (the real ticket id, or the slug in ticket-less local-only) — it feeds the tracker view, the issue link and `{TICKET}` in the branch. The directory name adds a slug:
@@ -156,7 +156,7 @@ The `Closes #N` in the body (`/flow-bug-ship §1`) is **ignored when the MR/PR t
156
156
 
157
157
  ## 4. Write artifacts
158
158
 
159
- Create the work directory per §0: `.claude/work/<TICKET>-<slug>/` in ticket mode, `.claude/work/<slug>/` in ticket-less local-only mode.
159
+ Create the work directory where flow-core §0 puts a new one (the main checkout, unless it tracks `.claude/work/`) per §0: `.claude/work/<TICKET>-<slug>/` in ticket mode, `.claude/work/<slug>/` in ticket-less local-only mode.
160
160
 
161
161
  `<work-dir>/meta.json`:
162
162
  ```json
@@ -116,6 +116,10 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
116
116
  - **`linear`**: `Closes <TICKET>` (Linear id, e.g. `ENG-123`) on the completing MR/PR; nothing on intermediates.
117
117
  - **`none` / empty**: nothing to link.
118
118
 
119
+ ### Roadmap mark (only with a linked item)
120
+
121
+ `meta.json.roadmap` set and `roadmap.mark` not `never` → decide the edit by flow-core §10, with the same *completes / intermediate* answer as the issue link above: the work's first MR/PR with more to come marks the item in progress, the completing one ticks it (with its children, and any parent left with every child ticked), an intermediate one touches nothing. Find the line by its `item` text with flow's annotation stripped; not found → no edit, and the stop says so. Decide it here, show it in the §3 preview, write it in §4.1 — never before approval.
122
+
119
123
  ### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
120
124
 
121
125
  When the body mentions **another MR/PR of the delivery plan**, **never write `#<n>`** with `<n>` the plan order from `meta.json.mrs` — GitHub/GitLab auto-link it to whatever issue/PR carries that number (`#5 (closed)`).
@@ -197,6 +201,7 @@ Squash on merge: <git.squash from FLOW.md>
197
201
  Target branch: <git.default_base from FLOW.md, or the parent branch in train mode>
198
202
  Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "Part of #123 (intermediate train PR)" / "none — Jira links by title prefix">
199
203
  Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
204
+ Roadmap: <"<line now>" → "<line after>" / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item)
200
205
 
201
206
  Description:
202
207
  <full description rendered exactly as it will appear in the MR/PR>
@@ -229,6 +234,7 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
229
234
  Only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
230
235
 
231
236
  - `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
237
+ - **Roadmap mark approved in §3** → write it into the roadmap file **before** the commit, here in the worktree (a tracked file belongs to the branch, flow-core §0), so it ships in the same commit as the change. A git-ignored roadmap is edited in place in the main checkout instead, and the stop says it travelled in no MR/PR.
232
238
  - `commit-push-pr` skill unavailable → commit and push manually and create the MR/PR with the `git.cli` CLI from `FLOW.md` — always with the content confirmed in §3.
233
239
 
234
240
  **Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh the panel (flow-core §4) right here, before §4.2 and before anything else can fail.
@@ -54,7 +54,7 @@ its reason file in a `mktemp -d` directory (flow-core §2.1).
54
54
  step's default. This command **creates** `00-summary.md` (§6) instead of reading it (flow-core §5).
55
55
  - No recognizable project structure → warn and stop.
56
56
  - **Determine the mode** (`--study` already taken out): `$ARGUMENTS` non-empty → *ticket mode* (identifier = `$ARGUMENTS`); empty → *ticket-less* (identifier = the §2.5 slug).
57
- - Once the identifier is known, check the work does not exist: ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after the slug is decided in §2.5. Exists → do not overwrite; warn and suggest `/flow-work-resume`.
57
+ - Once the identifier is known, check the work does not exist: in both work-folder locations (flow-core §0); ticket mode → glob `.claude/work/<TICKET>/` and `.claude/work/<TICKET>-*/` for a `meta.json` whose `ticket` equals `<TICKET>`; ticket-less → `.claude/work/<slug>/meta.json`, right after the slug is decided in §2.5. Exists → do not overwrite; warn and suggest `/flow-work-resume`.
58
58
 
59
59
  **Work directory naming.** Work lives in `.claude/work/<work-dir>/`. `meta.json.ticket` stays the **pure identifier** (real ticket id, or the slug in ticket-less local-only) — it feeds the tracker view, the issue link and `{TICKET}`. The directory adds a slug:
60
60
  - **ticket mode** → `<TICKET>-<slug>`; `<slug>` = short English kebab-case (≤5 words) from the ticket title, the **same** slug as the branch (§5).
@@ -153,6 +153,10 @@ While reading the ticket (§2), look for a **published contract block** (what `/
153
153
 
154
154
  Another repo referenced but **no** contract → say so in one line — *"the `<repo>` side is referenced but no contract was published; the literal shapes will have to be confirmed with that side, not assumed"* — and record it in `01-context.md` under the same heading. **Silent by default**: no cross-repo signal → skip this section, no note.
155
155
 
156
+ ## 3.7 Roadmap item
157
+
158
+ Only when the repo has a roadmap (flow-core §10) and `roadmap.path` is not `none`: link this work to the item it delivers, by §10's rule. A clear match — the item names this ticket's id, or its text is this ticket's title (a ticket-less start drafted from a roadmap item is one) — is taken in every mode, with no question. Otherwise `manual` asks once (header "Roadmap"): the next two or three unchecked items of the current phase, **none** as the last option; `guided`/`auto`/`unattended` record `null` and say in one line that the work is not linked. Never create, rename or reorder an item here: start reads the roadmap, `ship` is the only command that writes it.
159
+
156
160
  ## 4. Classify size
157
161
 
158
162
  Propose a size. **`manual`** → confirm with one `AskUserQuestion`. **`guided`/`auto` → do not ask**: record your estimate in `01-context.md` with a one-line reason and continue — the size is a route, not a commitment; `/flow-feat-design §1.5.5`, `§7` and `/flow-feat-plan §5` reclassify.
@@ -230,7 +234,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
230
234
 
231
235
  ## 6. Write artifacts
232
236
 
233
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
237
+ Create the work directory where flow-core §0 puts a new one (the main checkout, unless it tracks `.claude/work/`) per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
234
238
 
235
239
  ### `meta.json`
236
240
  ```json
@@ -248,6 +252,7 @@ Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode)
248
252
  "draft_from_conversation": false,
249
253
  "tracker_issue": null,
250
254
  "related_repos": [],
255
+ "roadmap": null,
251
256
  "started_at": "<ISO8601 now>",
252
257
  "updated_at": "<ISO8601 now>",
253
258
  "notes": ""
@@ -257,6 +262,7 @@ Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode)
257
262
  - `handoff` — `true` only when `--study` was given and `git.handoff_branch` is set; omit it otherwise.
258
263
  - Ticket-less (§2.5) → `draft_from_conversation: true`, `tracker_issue` = created issue id/url (or `null` if local-only). Ticket mode → defaults above.
259
264
  - `base` — `unattended` only: the ticket's `base`, or `git.default_base` when it is empty — never empty (the branch every MR/PR of this work starts from and targets; `/flow-work-run` refreshes it on `merged`). Omit it in every other mode.
265
+ - `roadmap` from §3.7 — `{ "path", "item", "under" }` (flow-core §10), or `null` with no roadmap or no link.
260
266
  - `related_repos` from §3.5 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo; `[]` for a single-repo task.
261
267
  - **This work *is* an accepted follow-up** (the ticket came from another work's `followups[]`, flow-core §7) → set `origin: { "work": "<originating work dir>", "followup": "F<n>" }`, carry that entry's recorded `why` into `01-context.md` verbatim instead of re-deriving it, and set the originating entry to `in_progress` with `work` naming this folder. Not a follow-up → omit `origin` entirely.
262
268
 
@@ -79,6 +79,8 @@ Run, deduce, show what was found for confirmation or correction:
79
79
 
80
80
  <!-- stack-detection:end -->
81
81
 
82
+ - **Roadmap** (`roadmap.path`, flow-core §10) — a markdown file at the root or under `docs/` with headings and checkbox lines whose name or title says plan, roadmap, phases or milestones, in any language. `ROADMAP.md` or `docs/ROADMAP.md` → nothing to write, it is found by default. Any other → propose its path. Several → ask which one is the project's plan. None → leave the section out.
83
+
82
84
  ## 3. Ask five things
83
85
 
84
86
  Everything §2 detected is shown **in one screen** for confirmation or correction — host, base