flow-workflows 0.102.0 → 0.102.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.
Files changed (35) hide show
  1. package/adapters/codex/CORE.md +13 -1
  2. package/adapters/codex/skills/flow-bug-start/SKILL.md +2 -2
  3. package/adapters/codex/skills/flow-feat-start/SKILL.md +2 -2
  4. package/adapters/codex/skills/flow-next/SKILL.md +4 -4
  5. package/adapters/codex/skills/flow-work-clean/SKILL.md +1 -1
  6. package/adapters/codex/skills/flow-work-daily/SKILL.md +2 -2
  7. package/adapters/codex/skills/flow-work-resume/SKILL.md +1 -1
  8. package/adapters/codex/skills/flow-work-run/SKILL.md +2 -2
  9. package/adapters/gemini/CORE.md +13 -1
  10. package/adapters/gemini/commands/flow/bug/start.toml +2 -2
  11. package/adapters/gemini/commands/flow/feat/start.toml +2 -2
  12. package/adapters/gemini/commands/flow/next.toml +4 -4
  13. package/adapters/gemini/commands/flow/work/clean.toml +1 -1
  14. package/adapters/gemini/commands/flow/work/daily.toml +2 -2
  15. package/adapters/gemini/commands/flow/work/resume.toml +1 -1
  16. package/adapters/gemini/commands/flow/work/run.toml +2 -2
  17. package/adapters/hermes/CORE.md +13 -1
  18. package/adapters/hermes/skills/flow-bug-start/SKILL.md +2 -2
  19. package/adapters/hermes/skills/flow-feat-start/SKILL.md +2 -2
  20. package/adapters/hermes/skills/flow-next/SKILL.md +4 -4
  21. package/adapters/hermes/skills/flow-work-clean/SKILL.md +1 -1
  22. package/adapters/hermes/skills/flow-work-daily/SKILL.md +2 -2
  23. package/adapters/hermes/skills/flow-work-resume/SKILL.md +1 -1
  24. package/adapters/hermes/skills/flow-work-run/SKILL.md +2 -2
  25. package/adapters/opencode/CORE.md +13 -1
  26. package/adapters/opencode/commands/flow-bug-start.md +2 -2
  27. package/adapters/opencode/commands/flow-feat-start.md +2 -2
  28. package/adapters/opencode/commands/flow-next.md +4 -4
  29. package/adapters/opencode/commands/flow-work-clean.md +1 -1
  30. package/adapters/opencode/commands/flow-work-daily.md +2 -2
  31. package/adapters/opencode/commands/flow-work-resume.md +1 -1
  32. package/adapters/opencode/commands/flow-work-run.md +2 -2
  33. package/package.json +1 -1
  34. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  35. package/plugins/flow/CHANGELOG.md +14 -0
@@ -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.102.1`.** 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
@@ -49,7 +49,7 @@ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, model
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
@@ -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).
@@ -232,7 +232,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
232
232
 
233
233
  ## 6. Write artifacts
234
234
 
235
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
235
+ 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
236
 
237
237
  ### `meta.json`
238
238
  ```json
@@ -28,9 +28,9 @@ 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
35
 
36
36
  ## 2. Route
@@ -39,7 +39,7 @@ runs a phase on its own and never advances `meta.json`.
39
39
  |---|---|---|
40
40
  | 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
41
  | 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 |
42
+ | 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
43
  | 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 |
44
44
  | No works at all | "Nothing in flight." | `$flow-feat-start <TICKET>` (or with no ticket, from the conversation) · `$flow-bug-start <TICKET>` |
45
45
 
@@ -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,8 +42,8 @@ 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.
@@ -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
 
@@ -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.102.1`.** 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
@@ -45,7 +45,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
45
45
 
46
46
  - Verify you are in the correct repo.
47
47
  - **Determine the mode** from `{{args}}` (`--study` already taken out): non-empty → *ticket mode* (identifier = `{{args}}`); empty → *ticket-less mode* (identifier = the slug resolved in §1.5).
48
- - 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`.
48
+ - 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`.
49
49
  - This command **creates** `00-summary.md` (§4); there is nothing to read yet.
50
50
 
51
51
  **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:
@@ -154,7 +154,7 @@ The `Closes #N` in the body (`/flow:bug:ship §1`) is **ignored when the MR/PR t
154
154
 
155
155
  ## 4. Write artifacts
156
156
 
157
- Create the work directory per §0: `.claude/work/<TICKET>-<slug>/` in ticket mode, `.claude/work/<slug>/` in ticket-less local-only mode.
157
+ 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.
158
158
 
159
159
  `<work-dir>/meta.json`:
160
160
  ```json
@@ -52,7 +52,7 @@ its reason file in a `mktemp -d` directory (flow-core §2.1).
52
52
  step's default. This command **creates** `00-summary.md` (§6) instead of reading it (flow-core §5).
53
53
  - No recognizable project structure → warn and stop.
54
54
  - **Determine the mode** (`--study` already taken out): `{{args}}` non-empty → *ticket mode* (identifier = `{{args}}`); empty → *ticket-less* (identifier = the §2.5 slug).
55
- - 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`.
55
+ - 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`.
56
56
 
57
57
  **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:
58
58
  - **ticket mode** → `<TICKET>-<slug>`; `<slug>` = short English kebab-case (≤5 words) from the ticket title, the **same** slug as the branch (§5).
@@ -228,7 +228,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
228
228
 
229
229
  ## 6. Write artifacts
230
230
 
231
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
231
+ 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).
232
232
 
233
233
  ### `meta.json`
234
234
  ```json
@@ -24,9 +24,9 @@ runs a phase on its own and never advances `meta.json`.
24
24
  1. Identify the active harness. Does `FLOW.md`, the context file `FLOW_CONTEXT` selects, or the
25
25
  active `FLOW.<harness>.md` exist (flow-core §0)? An inactive harness's overlay, or a context file
26
26
  no variable selects, does not configure this session.
27
- 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).
28
- 3. `.claude/work/` — how many open works, and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
29
- 3b. `followups[]` across those works **and** `.claude/work/_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
27
+ 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.
28
+ 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).
29
+ 3b. `followups[]` across those works **and** their `_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
30
30
  4. Is the working tree dirty (`git status --porcelain`)?
31
31
 
32
32
  ## 2. Route
@@ -35,7 +35,7 @@ runs a phase on its own and never advances `meta.json`.
35
35
  |---|---|---|
36
36
  | 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` |
37
37
  | 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` |
38
- | 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 |
38
+ | 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 |
39
39
  | 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 |
40
40
  | No works at all | "Nothing in flight." | `/flow:feat:start <TICKET>` (or with no ticket, from the conversation) · `/flow:bug:start <TICKET>` |
41
41
 
@@ -64,7 +64,7 @@ Three lists, gathered in one pass:
64
64
 
65
65
  - **Worktrees** — `git worktree list --porcelain` → path + branch per entry. Skip the first (the main checkout).
66
66
  - **Local branches** — `git for-each-ref --format='%(refname:short)|%(upstream:short)|%(upstream:track)' refs/heads/`.
67
- - **Work folders** — `ls -1 .claude/work/` (ignore `_archive`), reading each `meta.json` for `ticket`, `branch`, `phase`, `worktree`, `mrs[]`.
67
+ - **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[]`.
68
68
 
69
69
  Two strays caught in the same sweep:
70
70
 
@@ -38,8 +38,8 @@ 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.
@@ -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
 
@@ -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.102.1`.** 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
@@ -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
@@ -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).
@@ -232,7 +232,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
232
232
 
233
233
  ## 6. Write artifacts
234
234
 
235
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
235
+ 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
236
 
237
237
  ### `meta.json`
238
238
  ```json
@@ -28,9 +28,9 @@ 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
35
 
36
36
  ## 2. Route
@@ -39,7 +39,7 @@ runs a phase on its own and never advances `meta.json`.
39
39
  |---|---|---|
40
40
  | 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
41
  | 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 |
42
+ | 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
43
  | 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 |
44
44
  | No works at all | "Nothing in flight." | `/flow-feat-start <TICKET>` (or with no ticket, from the conversation) · `/flow-bug-start <TICKET>` |
45
45
 
@@ -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,8 +42,8 @@ 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.
@@ -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
 
@@ -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.102.1`.** 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
@@ -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
@@ -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).
@@ -230,7 +230,7 @@ Best-effort: failure (branch already on remote, permissions, older `gh`) → **w
230
230
 
231
231
  ## 6. Write artifacts
232
232
 
233
- Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode) or `.claude/work/<slug>/` (ticket-less local-only).
233
+ 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
234
 
235
235
  ### `meta.json`
236
236
  ```json
@@ -26,9 +26,9 @@ runs a phase on its own and never advances `meta.json`.
26
26
  1. Identify the active harness. Does `FLOW.md`, the context file `FLOW_CONTEXT` selects, or the
27
27
  active `FLOW.<harness>.md` exist (flow-core §0)? An inactive harness's overlay, or a context file
28
28
  no variable selects, does not configure this session.
29
- 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).
30
- 3. `.claude/work/` — how many open works, and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
31
- 3b. `followups[]` across those works **and** `.claude/work/_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
29
+ 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.
30
+ 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).
31
+ 3b. `followups[]` across those works **and** their `_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
32
32
  4. Is the working tree dirty (`git status --porcelain`)?
33
33
 
34
34
  ## 2. Route
@@ -37,7 +37,7 @@ runs a phase on its own and never advances `meta.json`.
37
37
  |---|---|---|
38
38
  | 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` |
39
39
  | 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` |
40
- | 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 |
40
+ | 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 |
41
41
  | 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 |
42
42
  | No works at all | "Nothing in flight." | `/flow-feat-start <TICKET>` (or with no ticket, from the conversation) · `/flow-bug-start <TICKET>` |
43
43
 
@@ -66,7 +66,7 @@ Three lists, gathered in one pass:
66
66
 
67
67
  - **Worktrees** — `git worktree list --porcelain` → path + branch per entry. Skip the first (the main checkout).
68
68
  - **Local branches** — `git for-each-ref --format='%(refname:short)|%(upstream:short)|%(upstream:track)' refs/heads/`.
69
- - **Work folders** — `ls -1 .claude/work/` (ignore `_archive`), reading each `meta.json` for `ticket`, `branch`, `phase`, `worktree`, `mrs[]`.
69
+ - **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[]`.
70
70
 
71
71
  Two strays caught in the same sweep:
72
72
 
@@ -40,8 +40,8 @@ Every *mine* below — your MRs/PRs, your threads, your tickets — is the **aut
40
40
 
41
41
  ## 1. Local layer (always — the base of the briefing)
42
42
 
43
- - `git branch --show-current` → the **active** work.
44
- - `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.
43
+ - 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".
44
+ - 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.
45
45
  - **"Last session" boundary**: the marker from §7 if present; otherwise the most recent commit date and the newest `updated_at` across works.
46
46
  - Order works by `updated_at` (most recent first); the first is the *"what were we on?"* answer.
47
47
  - Repo pulse: `git log --oneline --since="<last-session boundary>"` (fallback `-10`) and `git status --short` for uncommitted changes.
@@ -29,7 +29,7 @@ reads where the run got to, not how the run continues.
29
29
  ## 1. Detection
30
30
 
31
31
  - `git branch --show-current`.
32
- - Search `.claude/work/` for the `meta.json` whose `branch` matches.
32
+ - Find the work for this branch (flow-core §0: both work-folder locations, `branch`, `mrs[].branch` or `worktree`).
33
33
  - None found → ask the user for the ticket or whether to start a new one.
34
34
  - `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> …`).
35
35
 
@@ -38,8 +38,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
38
38
  orchestrator that cannot say why it launched the run cannot take one either.
39
39
  - 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.
40
40
  It fails or prints no `number` → `blocked` (flow-core §2.1).
41
- - Find the work: the `meta.json` under `.claude/work/` whose `ticket` equals `number` (archive
42
- excluded). None is not an error — it is the "none" of the table below.
41
+ - Find the work: the `meta.json` in the work folders (flow-core §0 — here and in the main
42
+ checkout) whose `ticket` equals `number` (archive excluded). None is not an error — it is the "none" of the table below.
43
43
 
44
44
  ## 2. Route
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-workflows",
3
- "version": "0.102.0",
3
+ "version": "0.102.1",
4
4
  "description": "Guided feat/bug workflows (start→ship), post-deploy monitoring and multi-agent code review, stack-agnostic. Each repo uses a shared FLOW.md plus optional harness overlay.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3,7 +3,7 @@
3
3
  "name": "flow",
4
4
  "displayName": "Flow — guided dev workflows",
5
5
  "description": "Guided feat/bug workflows (start→ship), post-deploy monitoring and multi-agent code review, stack-agnostic. Each repo uses a shared FLOW.md plus optional harness overlay.",
6
- "version": "0.102.0",
6
+ "version": "0.102.1",
7
7
  "author": {
8
8
  "name": "Alberto Vioque",
9
9
  "email": "mashware@gmail.com"
@@ -5,6 +5,20 @@ plugin and is what `/flow:news` reads to show you what changed since your previo
5
5
 
6
6
  The canonical, richest notes live in the [GitHub Releases](https://github.com/mashware/flow-workflows/releases).
7
7
 
8
+ ## v0.102.1 — From a worktree, flow finds the work it is in · 2026-10-29
9
+
10
+ **In short**
11
+ - **`next`, `daily` and `resume` see your works from inside a worktree.** Before, they said
12
+ "nothing in flight" there, because the work folders only exist in the main checkout.
13
+ - **From the main checkout they say which worktree each work lives in**, so "where were we" is
14
+ answered with a `cd`, not with silence.
15
+ - **Every phase finds its work the same way** — by branch, by any MR branch of a train, or by the
16
+ worktree it was created in — the way the session-start header already did.
17
+
18
+ `.claude/work/` is git-ignored in most repos, so `start` writes it in the main checkout and it never
19
+ reaches a linked worktree. The session-start hook looked in both places; the commands looked only
20
+ where they stood. So the session opened with the right header and `next` contradicted it.
21
+
8
22
  ## v0.102.0 — A query that entered after the review still reaches the MR with its plan · 2026-10-28
9
23
 
10
24
  **In short**