flow-workflows 0.69.0 → 0.71.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 (116) hide show
  1. package/README.md +4 -2
  2. package/adapters/codex/CORE.md +84 -12
  3. package/adapters/codex/skills/flow-bug-fix/SKILL.md +33 -3
  4. package/adapters/codex/skills/flow-bug-investigate/SKILL.md +1 -1
  5. package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +1 -1
  6. package/adapters/codex/skills/flow-bug-review/SKILL.md +1 -1
  7. package/adapters/codex/skills/flow-bug-ship/SKILL.md +3 -3
  8. package/adapters/codex/skills/flow-bug-start/SKILL.md +2 -2
  9. package/adapters/codex/skills/flow-bug-validate/SKILL.md +1 -1
  10. package/adapters/codex/skills/flow-doctor/SKILL.md +1 -0
  11. package/adapters/codex/skills/flow-feat-build/SKILL.md +38 -6
  12. package/adapters/codex/skills/flow-feat-design/SKILL.md +1 -1
  13. package/adapters/codex/skills/flow-feat-plan/SKILL.md +2 -2
  14. package/adapters/codex/skills/flow-feat-review/SKILL.md +1 -1
  15. package/adapters/codex/skills/flow-feat-ship/SKILL.md +3 -3
  16. package/adapters/codex/skills/flow-feat-start/SKILL.md +4 -4
  17. package/adapters/codex/skills/flow-feat-validate/SKILL.md +1 -1
  18. package/adapters/codex/skills/flow-next/SKILL.md +1 -1
  19. package/adapters/codex/skills/flow-work-README/SKILL.md +9 -7
  20. package/adapters/codex/skills/flow-work-abandon/SKILL.md +2 -2
  21. package/adapters/codex/skills/flow-work-clean/SKILL.md +1 -1
  22. package/adapters/codex/skills/flow-work-daily/SKILL.md +1 -1
  23. package/adapters/codex/skills/flow-work-green/SKILL.md +1 -1
  24. package/adapters/codex/skills/flow-work-query/SKILL.md +1 -1
  25. package/adapters/codex/skills/flow-work-respond/SKILL.md +1 -1
  26. package/adapters/codex/skills/flow-work-resume/SKILL.md +3 -3
  27. package/adapters/codex/skills/flow-work-status/SKILL.md +1 -1
  28. package/adapters/codex/skills/flow-work-try/SKILL.md +1 -1
  29. package/adapters/codex/skills/flow-work-watch/SKILL.md +3 -3
  30. package/adapters/gemini/CORE.md +84 -12
  31. package/adapters/gemini/commands/flow/bug/fix.toml +33 -3
  32. package/adapters/gemini/commands/flow/bug/investigate.toml +1 -1
  33. package/adapters/gemini/commands/flow/bug/postmortem.toml +1 -1
  34. package/adapters/gemini/commands/flow/bug/review.toml +1 -1
  35. package/adapters/gemini/commands/flow/bug/ship.toml +3 -3
  36. package/adapters/gemini/commands/flow/bug/start.toml +2 -2
  37. package/adapters/gemini/commands/flow/bug/validate.toml +1 -1
  38. package/adapters/gemini/commands/flow/doctor.toml +1 -0
  39. package/adapters/gemini/commands/flow/feat/build.toml +38 -6
  40. package/adapters/gemini/commands/flow/feat/design.toml +1 -1
  41. package/adapters/gemini/commands/flow/feat/plan.toml +2 -2
  42. package/adapters/gemini/commands/flow/feat/review.toml +1 -1
  43. package/adapters/gemini/commands/flow/feat/ship.toml +3 -3
  44. package/adapters/gemini/commands/flow/feat/start.toml +4 -4
  45. package/adapters/gemini/commands/flow/feat/validate.toml +1 -1
  46. package/adapters/gemini/commands/flow/next.toml +1 -1
  47. package/adapters/gemini/commands/flow/work/README.toml +9 -7
  48. package/adapters/gemini/commands/flow/work/abandon.toml +2 -2
  49. package/adapters/gemini/commands/flow/work/clean.toml +1 -1
  50. package/adapters/gemini/commands/flow/work/daily.toml +1 -1
  51. package/adapters/gemini/commands/flow/work/green.toml +1 -1
  52. package/adapters/gemini/commands/flow/work/query.toml +1 -1
  53. package/adapters/gemini/commands/flow/work/respond.toml +1 -1
  54. package/adapters/gemini/commands/flow/work/resume.toml +3 -3
  55. package/adapters/gemini/commands/flow/work/status.toml +1 -1
  56. package/adapters/gemini/commands/flow/work/try.toml +1 -1
  57. package/adapters/gemini/commands/flow/work/watch.toml +3 -3
  58. package/adapters/hermes/CORE.md +84 -12
  59. package/adapters/hermes/skills/flow-bug-fix/SKILL.md +33 -3
  60. package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +1 -1
  61. package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +1 -1
  62. package/adapters/hermes/skills/flow-bug-review/SKILL.md +1 -1
  63. package/adapters/hermes/skills/flow-bug-ship/SKILL.md +3 -3
  64. package/adapters/hermes/skills/flow-bug-start/SKILL.md +2 -2
  65. package/adapters/hermes/skills/flow-bug-validate/SKILL.md +1 -1
  66. package/adapters/hermes/skills/flow-doctor/SKILL.md +1 -0
  67. package/adapters/hermes/skills/flow-feat-build/SKILL.md +38 -6
  68. package/adapters/hermes/skills/flow-feat-design/SKILL.md +1 -1
  69. package/adapters/hermes/skills/flow-feat-plan/SKILL.md +2 -2
  70. package/adapters/hermes/skills/flow-feat-review/SKILL.md +1 -1
  71. package/adapters/hermes/skills/flow-feat-ship/SKILL.md +3 -3
  72. package/adapters/hermes/skills/flow-feat-start/SKILL.md +4 -4
  73. package/adapters/hermes/skills/flow-feat-validate/SKILL.md +1 -1
  74. package/adapters/hermes/skills/flow-next/SKILL.md +1 -1
  75. package/adapters/hermes/skills/flow-work-README/SKILL.md +9 -7
  76. package/adapters/hermes/skills/flow-work-abandon/SKILL.md +2 -2
  77. package/adapters/hermes/skills/flow-work-clean/SKILL.md +1 -1
  78. package/adapters/hermes/skills/flow-work-daily/SKILL.md +1 -1
  79. package/adapters/hermes/skills/flow-work-green/SKILL.md +1 -1
  80. package/adapters/hermes/skills/flow-work-query/SKILL.md +1 -1
  81. package/adapters/hermes/skills/flow-work-respond/SKILL.md +1 -1
  82. package/adapters/hermes/skills/flow-work-resume/SKILL.md +3 -3
  83. package/adapters/hermes/skills/flow-work-status/SKILL.md +1 -1
  84. package/adapters/hermes/skills/flow-work-try/SKILL.md +1 -1
  85. package/adapters/hermes/skills/flow-work-watch/SKILL.md +3 -3
  86. package/adapters/opencode/CORE.md +84 -12
  87. package/adapters/opencode/commands/flow-bug-fix.md +33 -3
  88. package/adapters/opencode/commands/flow-bug-investigate.md +1 -1
  89. package/adapters/opencode/commands/flow-bug-postmortem.md +1 -1
  90. package/adapters/opencode/commands/flow-bug-review.md +1 -1
  91. package/adapters/opencode/commands/flow-bug-ship.md +3 -3
  92. package/adapters/opencode/commands/flow-bug-start.md +2 -2
  93. package/adapters/opencode/commands/flow-bug-validate.md +1 -1
  94. package/adapters/opencode/commands/flow-doctor.md +1 -0
  95. package/adapters/opencode/commands/flow-feat-build.md +38 -6
  96. package/adapters/opencode/commands/flow-feat-design.md +1 -1
  97. package/adapters/opencode/commands/flow-feat-plan.md +2 -2
  98. package/adapters/opencode/commands/flow-feat-review.md +1 -1
  99. package/adapters/opencode/commands/flow-feat-ship.md +3 -3
  100. package/adapters/opencode/commands/flow-feat-start.md +4 -4
  101. package/adapters/opencode/commands/flow-feat-validate.md +1 -1
  102. package/adapters/opencode/commands/flow-next.md +1 -1
  103. package/adapters/opencode/commands/flow-work-README.md +9 -7
  104. package/adapters/opencode/commands/flow-work-abandon.md +2 -2
  105. package/adapters/opencode/commands/flow-work-clean.md +1 -1
  106. package/adapters/opencode/commands/flow-work-daily.md +1 -1
  107. package/adapters/opencode/commands/flow-work-green.md +1 -1
  108. package/adapters/opencode/commands/flow-work-query.md +1 -1
  109. package/adapters/opencode/commands/flow-work-respond.md +1 -1
  110. package/adapters/opencode/commands/flow-work-resume.md +3 -3
  111. package/adapters/opencode/commands/flow-work-status.md +1 -1
  112. package/adapters/opencode/commands/flow-work-try.md +1 -1
  113. package/adapters/opencode/commands/flow-work-watch.md +3 -3
  114. package/package.json +1 -1
  115. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  116. package/plugins/flow/CHANGELOG.md +60 -0
@@ -37,9 +37,9 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
37
37
  ## Principles
38
38
 
39
39
  - **Shared rules live in the `flow-core` skill** (`skills/flow-core/SKILL.md`): configuration merge,
40
- `models`, autonomy and hard gates, never-a-question list, stop header, `panel.json`,
40
+ `models`, autonomy and hard gates, never-a-question list, stop header, the live panel,
41
41
  `00-summary.md`. Every command loads it once per session.
42
- - **One folder per ticket**: `.claude/work/{TICKET}/` holds `meta.json`, `00-summary.md`, `panel.json` and the numbered markdown artifacts.
42
+ - **One folder per ticket**: `.claude/work/{TICKET}/` holds `meta.json`, `00-summary.md`, the numbered markdown artifacts and — where the terminal offers no panel tools — `panel.json`.
43
43
  - **Numbered artifacts**: each phase writes a `NN-phase.md` that the next step reads.
44
44
  - **`evidence/`**: what `$flow-*-validate` actually observed when it drove the running app — a screenshot, a response body, a log excerpt, one file per criterion, with a **before** where the change alters something already visible. `$flow-*-ship` attaches it to the MR/PR description. `quality.evidence: off` disables both halves.
45
45
  - **`meta.json` is the source of truth** for state (current phase, size, branch). Without it, commands refuse to continue.
@@ -64,7 +64,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
64
64
  - **Commits follow the autonomy mode** (`$flow-feat-build` §2.2, `$flow-bug-fix` §2.1): changes **always reported before anything is recorded**. `manual`: **no `git commit` on its own**. `guided`: asks **once**. `auto`: WIP commit per step, cut by step (§2.3) — **`autonomy.mode: auto` plus typing the command is the explicit authorization**. WIP commits on the work branch **only**; push and MR/PR creation stay hard gates in every mode.
65
65
  - **A named next command is not a handoff**: each `## Close` carries the **autonomy handoff** — `manual` proposes the next command with one `AskUserQuestion`; `guided`/`auto` **chain in the same turn**. Never chained: `ship` (hard gate in every mode) and anything downstream of a red gate.
66
66
  - **Every stop opens with where you are** (flow-core §3): stop header, then ≤ ~10 product-altitude lines. Own process → the artifact; subagent notifications never earn a turn.
67
- - **The stop is also written to disk**: `.claude/work/<work>/panel.json` ([schema below](#paneljson-schema), flow-core §4), **overwritten whole, never patched**, written **before** a long stretch with an honest `updated_at`.
67
+ - **The stop is also published to the live panel** ([document below](#the-panel-document), flow-core §4): through the terminal's `panel_set` / `panel_patch` tools where they exist, and `.claude/work/<work>/panel.json` **overwritten whole, never patched** where they do not. Published **before** a long stretch, never after, with an honest `updated_at`.
68
68
  - **What is never a question is as binding as what always is**: hard gates stop in **every** mode; in `guided`/`auto` flow mechanics, WIP commits, the train's next MR/PR, size confirmation and anything already decided are never asked (flow-core §2). Only new evidence reopens a decision.
69
69
  - **A correction is a convention, and a convention is written down**: when the user overrides something a phase proposed and the same correction would apply to an unrelated ticket in this repo, it becomes a `meta.json.conventions_candidates[]` row and a `## Conventions learned` line in the phase artifact, asking nothing (flow-core §8). `review`'s idiom audit reads them in the same work; `ship` offers them to `FLOW.md` once, at Close, in every mode. What is about *this* ticket stays in the artifact and goes no further.
70
70
  - **Work you decide not to do is recorded, not narrated**: every "idea for a separate ticket", out-of-scope piece, unmitigated risk, unchecked edge case and prevention action becomes a `meta.json.followups[]` entry (flow-core §7) alongside its artifact section. Written without asking, and only when it clears the bar of §7 (a named subject, a path someone has actually seen, waiting costing more than doing it). Triaged **once** at `ship`'s Close, behind a skeptic: 3 or more candidates go to an agent whose job is to refute that each deserves a ticket, and only the strongest `tracker.followup_ask_max` (empty → **2**) become questions (**Do it** / **Not worth it** / **Later**). The rest are logged. Published in the MR/PR description while still open, and surfaced by `status`/`daily`/`next` — from `_archive/` too — until decided. Creating the tracker issue for an accepted one is outward-facing: **asks in every mode**. Two kinds are not deferred work: a **`decision`** the diff depends on is asked when it surfaces (in every mode) and only a deferred one is recorded; a **`tooling`** gap is recorded with no question at all and never goes to the tracker.
@@ -157,9 +157,9 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
157
157
 
158
158
  **`00-summary.md`** (flow-core §5): **≤ 15 lines, overwritten whole at every `## Close`**, read first by every phase (with `meta.json`) before any full artifact. Contents: what the work is (one line), size and current MR/PR, standing decisions (one line each), contracts declared or received (names and where the literal shape lives), what is pending, what the next phase must open in full. Missing (older work) → read the artifacts, write it at Close.
159
159
 
160
- ## `panel.json` schema
160
+ ## The panel document
161
161
 
162
- `meta.json` is the *state machine*; `panel.json` is the *view* a reader outside the chat polls. Optional: a work that never writes it still resolves from `meta.json` alone. Writer rules (order, when, ceiling): flow-core §4.
162
+ `meta.json` is the *state machine*; the panel is the *view* a reader outside the chat watches. Optional: a work that never publishes it still resolves from `meta.json` alone. Writer rules (order, when, ceiling) and the two transports — the terminal's `panel_set` / `panel_patch` / `panel_get` tools, or `.claude/work/<work>/panel.json` — are flow-core §4. The document below is the same either way.
163
163
 
164
164
  ```json
165
165
  {
@@ -190,11 +190,13 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
190
190
  - **`style`** — `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`; semantic names, the reader owns the palette.
191
191
  - **`header`** — `true` (default): the reader draws ticket, type, phase and age, which never belong in `lines`. `false` hands every line to the writer.
192
192
  - **`phase`** — the phase running **right now** (`meta.json.phase` advances only at close); the reader prefers it.
193
- - **`updated_at`** — local ISO-8601 with offset from the real clock, never carried over; lets the reader flag a stale snapshot.
193
+ - **`updated_at`** — local ISO-8601 with offset from the real clock, never carried over; lets the reader flag a stale snapshot. Over the tools the app stamps each delivery itself.
194
+ - **`attention`** *(tools only)* — `wait` · `block` · `done`, beside `phase`, absent while simply working: the pane's claim on the user's attention, which the app never deduces from a line's `mark`. A tab's card shows the strongest claim among its panes, so an uncleared `wait` flags that tab for ever.
195
+ - **`key`** *(tools only)* — a unique, never-painted name on any line a later `panel_patch` may replace or delete (`title`, `mr-1`, `now`, `next`, `decision`, `block-1`).
194
196
 
195
197
  **No headings over the train.** A shipped MR/PR is *open, waiting to merge*; `mark` says it per entry — `wait` shipped, `current` being worked, `done` only merged.
196
198
 
197
- **Who writes it.** The 18 phase commands (flow-core §4); `$flow-feat-ship` and `$flow-bug-ship` the instant an MR/PR URL exists; `$flow-feat-plan` when the train is populated; `$flow-work-resume` (§5); `$flow-work-watch` every cycle; `$flow-work-abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never write it; `$flow-work-clean` archives the folder with the panel inside.
199
+ **Who publishes it.** The 18 phase commands (flow-core §4); `$flow-feat-ship` and `$flow-bug-ship` the instant an MR/PR URL exists; `$flow-feat-plan` when the train is populated — a new train is a new shape, so a full republish; `$flow-work-resume` (§5), after reading what is on screen; `$flow-work-watch` every cycle; `$flow-work-abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never publish; `$flow-work-clean` archives the folder with any panel file inside.
198
200
 
199
201
  ## Shortcuts by size
200
202
 
@@ -18,7 +18,7 @@ description: "Close a work without shipping (discarded feature, non-issue, etc.)
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  Clean closure for works that will not reach the base branch: a feature discarded after `design`, a bug that is not one (expected behavior, external problem, user misconfiguration), a work absorbed by another ticket.
24
24
 
@@ -91,7 +91,7 @@ Ask the user what to do with the branch — do not decide alone:
91
91
  - Update `meta.json`: `phase = "abandoned"`; `phases_done` not touched (it reflects what was actually done); `notes` += abandonment reason; `updated_at` updated.
92
92
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
93
93
  - **Tracker: move to won't-do** (never "done" — this work did not ship). Only if `tracker.tool` is not `none`/empty, `tracker.abandon_cmd` is set, and `meta.json.ticket` is a **real tracker id** (skip for local-only slugs). Run `tracker.abandon_cmd` substituting `{TICKET}` = `meta.json.ticket`. Same contract as `$flow-feat-start §6.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-in-state ticket → warn and continue, never block. `tracker.abandon_cmd` empty → do nothing (the user closes the ticket by hand if they want).
94
- - `panel.json` present (`$flow-work-README`) → overwrite with a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line.
94
+ - Panel published for this work (flow-core §4) → publish a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line, and `attention` cleared where the panel tools carry it — nothing is waiting on anyone any more.
95
95
  - Move the folder to `.claude/work/_archive/` **keeping its directory name** (`_archive/<work-dir>/`, the folder located in §1 — e.g. `<TICKET>-<slug>`) so `$flow-work-status` no longer lists it.
96
96
  - Report to the user: ticket abandoned, reason, what was done with the branch.
97
97
 
@@ -18,7 +18,7 @@ description: "Sweep what finished work left behind — merged worktrees, dead br
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  The forge (`git.cli`) is **best-effort**: CLI missing, unauthenticated, or over ~5s → fall back to the local evidence in §4 and say so in one line; never block.
24
24
 
@@ -18,7 +18,7 @@ description: "Your work assistant — a Scrum-style daily standup across all you
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  External sources (tracker, forge, `knowledge`) are all **best-effort**: a CLI missing/unauthenticated, an MCP failing, or a call over ~3s → continue without that source and note it in a single line; **never block**.
24
24
 
@@ -32,7 +32,7 @@ Usage: `$flow-work-green [mr-iid-or-url]` — optional; default is the MR/PR of
32
32
 
33
33
  Extract from `git`: `host`, `cli` (empty → the default for that host), `default_base`. The term MR/PR follows `host`. From `tracker`: `tool`, `prefix`. From `quality`: `test`, `test_one`, `static_analysis`, `style_fix` (local reproduce/verify commands, §5; empty → auto-discover from Makefile / npm / composer scripts), `review_skill` (§5, non-trivial fixes). `agents`: expert sub-agents to delegate fixes to. `knowledge.search` set → `knowledge.search` in §3.
34
34
 
35
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
35
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
36
36
 
37
37
  **Autonomy.** Modes as in flow-core §2; `guided`/`auto` record their choices in `09-ci.md` (e.g. a pure formatter auto-fix). **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
38
38
  1. **Any push** (§6).
@@ -18,7 +18,7 @@ description: "Put a data-access query on trial — schema, indexes, execution pl
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
22
22
 
23
23
  **A query is approved by its plan, not by prose.** Fact sheet → challenger attacks → each point settled with a **plan or a number**. **Cross-cutting** (feat or bug), **repeatable**, does **not** advance `meta.json.phase`; runs with or without a work folder.
24
24
 
@@ -28,7 +28,7 @@ Cross-cutting (`feat` or `bug` MR/PR alike), repeatable (one invocation per revi
28
28
 
29
29
  Extract from `git`: `host`, `cli` (empty → the default for that host), `assignee`. The term MR/PR follows `host`. From `tracker`: `tool` and `prefix`. From `quality`: `review_skill` (§6, non-trivial rounds). If `knowledge.search` is set, `knowledge.search` runs in §3.
30
30
 
31
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
31
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
32
32
 
33
33
  **Autonomy.** Modes as in flow-core §2 (`autonomy.mode`: `manual` | `guided` | `auto`; empty = `manual`); `guided`/`auto` record their choices in `08-feedback.md`. **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
34
34
  1. **Posting any comment/reply** to the MR/PR (§7).
@@ -18,7 +18,7 @@ description: "Resume the work associated with the current branch and suggest the
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  Use when returning to a work after a break (next morning, another session).
24
24
 
@@ -92,7 +92,7 @@ With what is new (there is already work on disk):
92
92
 
93
93
  ## 5. Rebuild the live panel
94
94
 
95
- After a break `.claude/work/<work>/panel.json` is most likely stale. Overwrite it **whole** from the state just rebuilt (`meta.json`, git, the ticket) — rules in flow-core §4:
95
+ After a break the panel is most likely stale, and a resumed session is exactly where flow-core §4 asks for `panel_get` **before** publishing: read what is on screen, then publish the whole document from the state just rebuilt (`meta.json`, git, the ticket) — `panel_set` where the terminal offers the panel tools, `.claude/work/<work>/panel.json` overwritten whole where it does not:
96
96
 
97
97
  ```json
98
98
  {
@@ -120,4 +120,4 @@ After a break `.claude/work/<work>/panel.json` is most likely stale. Overwrite i
120
120
  - `Decision` marked `wait` is always set after a resume — nothing is running, the next move is the user's.
121
121
  - `block` lines for the blockers §4 surfaced (`contract_handoff` `pending` in a sibling repo, a red pipeline, an unmerged dependency).
122
122
  - Train: one entry per `meta.json.mrs[]`, not-started collapsed into one `#a–#z` line; omit without `mrs`.
123
- - `updated_at` from `date -Iseconds`; every fact from `meta.json` and the artifacts; language of the work's artifacts.
123
+ - `updated_at` from `date -Iseconds` when the panel goes to the file; every fact from `meta.json` and the artifacts; language of the work's artifacts.
@@ -18,7 +18,7 @@ description: "Summary of all open works in .claude/work/"
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  Overview of works in progress; detects divergences between artifacts and actual git state.
24
24
 
@@ -18,7 +18,7 @@ description: "Point the main checkout at a branch to test it (then return), re-s
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session.
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
22
22
 
23
23
  Temporarily point the **main checkout** at another branch to test it against this checkout's live environment (running stack, DB, containers), then return — a generic `make wt-try`/`wt-back` pair. The git switch is built in; the project-specific re-sync (e.g. migrations) comes from `git.worktree_resync` in `FLOW.md`. Operates **in place**; never creates or touches worktrees.
24
24
 
@@ -18,7 +18,7 @@ description: "Monitor the observability platform after a deploy and alert on err
18
18
  > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
19
19
  > - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
20
20
 
21
- Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with; the wait it delegates takes `models.supervisors`.**
21
+ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with; the wait it delegates takes `models.supervisors`.**
22
22
 
23
23
  **Autopiloted post-deploy monitoring**: signals **scoped to the change** over a window (default 30 min), against a baseline; alert on errors or performance regressions from the deploy.
24
24
 
@@ -129,7 +129,7 @@ Over `[last cycle, now]`, scoped to the surface. **Default thresholds** (tunable
129
129
 
130
130
  After each cycle: update `monitor.md` (accumulated state — no repeated alerts, feeds the final summary) and **reschedule with `ScheduleWakeup`** (~270-300s, or the chosen interval) passing the same `$flow-work-watch {PREFIX}XXXXX` until `T_end`. Platform fails or slow → retry next cycle, never break.
131
131
 
132
- **Refresh the live panel every cycle** (only with a `<work-dir>` from §1). Overwrite `.claude/work/<work>/panel.json` **whole**:
132
+ **Refresh the live panel every cycle** (only with a `<work-dir>` from §1), by the transport flow-core §4 selects — the panel tools where the terminal has them, `.claude/work/<work>/panel.json` overwritten **whole** where it does not:
133
133
 
134
134
  ```json
135
135
  {
@@ -170,7 +170,7 @@ Write the summary to `<work-dir>/monitor.md` (§1) and present it:
170
170
  - **Evidence strength**: low traffic (§4) → say it ("green, but the flow barely executed during the window: weak evidence"). Never sell a zero-traffic green as a guarantee.
171
171
  - **Honest limits**: no slow leaks, no regressions needing input not exercised in the window. A first-hour safety net.
172
172
 
173
- Final verdict to `panel.json` too — `mark: "info"` plus `style: ok|warn|error` for 🟢/🟡/🔴 — and a `Now` line reading `nothing — the watch window is over`. On 🔴, a `Decision` line marked `wait` pointing at `$flow-bug-start`.
173
+ Final verdict to the panel too — `mark: "info"` plus `style: ok|warn|error` for 🟢/🟡/🔴 — and a `Now` line reading `nothing — the watch window is over`. On 🔴, a `Decision` line marked `wait` pointing at `$flow-bug-start`.
174
174
 
175
175
  `knowledge.stage` is set → `knowledge.stage` relevant findings (measured baselines, low-traffic signals, error patterns) for this branch's staging.
176
176
 
@@ -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.69.0`.** Compare it once, at the start of the session, against
19
+ **This file belongs to flow `0.71.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
@@ -235,7 +235,7 @@ terminal by construction, the turn is over before you notice.
235
235
  - **The continuing call goes first.** When a step closes and the next one runs anyway
236
236
  (`guided`/`auto` chaining, §2), the turn opens with the call that starts it, not with prose about
237
237
  the one that ended. **A report is never the last thing in a turn you meant to continue.**
238
- - **Progress belongs to the panel, not to a turn.** Someone watching reads `panel.json` (§4):
238
+ - **Progress belongs to the panel, not to a turn.** Someone watching reads the live panel (§4):
239
239
  `Now`, `Next`. Writing it costs no turn and no stop; saying it in chat costs both.
240
240
  - **Stopping? Then say so.** `I need:` names the decision or the action you are waiting on. It
241
241
  never announces that you are continuing — if you were, you would not be writing this header.
@@ -259,11 +259,19 @@ I need: <one line — the decision or action you are waiting on>
259
259
  - **Zero-context rule.** First mention of an identifier carries 4–6 words of what it is. Never cite a section number without naming what it is. No jargon the user has not used first.
260
260
  - **If it is a question, it is `AskUserQuestion`.** Never end a message with a question in prose. If it does not deserve the menu, it is a decision you take and record.
261
261
 
262
- ## 4. Live panel — `panel.json`
262
+ ## 4. Live panel — over the terminal's MCP, or `panel.json`
263
263
 
264
- Whenever the state a panel would show changes, overwrite `.claude/work/<work>/panel.json`
265
- **whole** (never patch) from `meta.json` plus what you know right now. **Any progress line you were
266
- about to type into the chat is a panel write instead** (§3):
264
+ Whenever the state a panel would show changes, publish the panel from `meta.json` plus what you know
265
+ right now. **Any progress line you were about to type into the chat is a panel update instead**
266
+ (§3).
267
+
268
+ **Two transports, one document.** When the tools `panel_set` / `panel_patch` / `panel_get` are
269
+ available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
270
+ **stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
271
+ all. When the tools are not there, write the file exactly as before (§4.3). No work folder
272
+ (lightweight `respond`/`green`) → nothing to publish, either way.
273
+
274
+ ### 4.1 The document — the same whichever transport carries it
267
275
 
268
276
  ```json
269
277
  {
@@ -289,11 +297,75 @@ about to type into the chat is a panel write instead** (§3):
289
297
  - **`mark` says what a line is**; the reader draws it. `done` · `current` (at most one) · `pending` · `wait` (waiting on someone else: an open MR/PR, a user decision) · `block` · `info`. Marked lines form an aligned column: symbol, `ref`, text, link pinned right. Do not set `style` on a marked line — except `mark: "info"` + `style: ok|warn|error` when the colour *is* the information (a monitoring verdict).
290
298
  - **`ref` need not be a number**: `#1`, `#3–#6`, `Now`, `Next`, `Decision`. Column width is per block; blocks are separated by blank lines — use them so the MR/PR train and the labels below do not drag each other wide.
291
299
  - **`link` is a field, never a URL inside `text`.**
292
- - **Order:** (1) work title (`style: title`, no mark); (2) the MR/PR train, one entry per `meta.json.mrs[]` with `ref` `#n`, short title, real-state `mark`, `link` when there is a URL — not-started entries collapse into one `#a–#z` `pending` line; omit the block without `mrs`; (3) `Now` — what is running, the one fact `meta.json` cannot hold; (4) `Next`; (5) `Decision`, `mark: wait`, **only** when parked on the user; (6) blockers, `mark: block` (a sibling repo with `contract_handoff: pending`, a red pipeline, an unmerged dependency).
293
- - **When:** (a) in pre-flight, as soon as `meta.json` is loaded; (b) immediately **before** every stop header; (c) **before** any long stretch (fan-out, full suite, CI poll) — never after, so a step that dies halfway is not shown as finished. When the stretch will outlast the ~30 min staleness warning, set `stale_after_minutes` to what it will really take; (d) wherever `## Close` updates `meta.json`.
294
- - **Rules:** `phase` is the phase you are **running now** (not `meta.json.phase`, which advances only at Close). `header: true` means ticket, type, phase and age are drawn by the reader — do not repeat them in `lines`. Keep it under ~14 lines. Every fact from `meta.json` and the artifacts — an invented MR/PR state is worse than a blank panel. `updated_at` from the real clock (`date -Iseconds`), never carried over. Write in the language of the work's artifacts. No work folder (lightweight `respond`/`green`) → nothing to write.
300
+ - **Order:** (1) work title (`style: title`, no mark); (2) the MR/PR train, one entry per `meta.json.mrs[]` with `ref` `#n`, short title, real-state `mark`, `link` when there is a URL — not-started entries collapse into one `#a–#z` `pending` line; omit the block without `mrs`; (3) `Now` — what is running, the one fact `meta.json` cannot hold; (4) `Next`; (5) `Decision`, `mark: wait`, **only** when parked on the user — over the tools it travels with `attention: "wait"` (§4.2), and both are cleared together; (6) blockers, `mark: block` (a sibling repo with `contract_handoff: pending`, a red pipeline, an unmerged dependency).
301
+ - **Rules:** `phase` is the phase you are **running now** (not `meta.json.phase`, which advances only at Close). `header: true` means ticket, type, phase and age are drawn by the reader — do not repeat them in `lines`. Keep it under ~14 lines. Every fact from `meta.json` and the artifacts — an invented MR/PR state is worse than a blank panel. Write in the language of the work's artifacts.
302
+
303
+ ### 4.2 Over the terminal's MCP — `panel_set` once, `panel_patch` from then on
304
+
305
+ **The first publication of the session — `panel_set`.** `source: "flow"`. It claims the pane for as
306
+ long as this session lives, and a second producer is refused by name. The document is the one §4.1
307
+ specifies, plus two additions:
308
+
309
+ - **`attention`, at the top level**, beside `phase`: `wait` when parked on the user, `block` when
310
+ stuck on somebody else (red pipeline, sibling repo's contract), `done` when the cycle closed and
311
+ nobody has looked. Absent while simply working. The app never deduces it: a `mark: "wait"` inside
312
+ `lines` is body text and claims nothing. The tab's card shows the strongest claim among its panes,
313
+ so a `wait` you forget to clear flags that tab for ever — clear it with
314
+ `{"op": "set", "field": "attention", "value": null}`.
315
+ - **A `key` on every line you may want to change later** — `title`, `mr-1`, `now`, `next`,
316
+ `decision`, `block-1`. It is never painted, and it must be unique: a key that names two lines
317
+ refuses every patch addressing it.
318
+
319
+ **Everything after that is `panel_patch`:**
320
+
321
+ ```json
322
+ {"ops": [
323
+ {"op": "replace", "key": "now",
324
+ "line": {"key": "now", "ref": "Now", "text": "unit suite over #2", "mark": "info"}},
325
+ {"op": "set", "field": "phase", "value": "validate"},
326
+ {"op": "set", "field": "attention", "value": "wait"}]}
327
+ ```
328
+
329
+ - Ops: `replace`, `before`, `after`, `delete` (by `key`), `first`, `last`, and `set` for `phase`,
330
+ `attention`, `header` or `stale_after_minutes`. They see each other, in the order written.
331
+ - **Either the whole list applies or none of it does**, so a patch is safe to send without reading
332
+ first: the worst case is that nothing happened and you were told why.
333
+ - **A patch whose answer never arrived may have been applied — send it again.** The resend is
334
+ refused rather than doubling the line.
335
+ - At most 64 ops per call. `actions` are not patchable: change buttons with a whole `panel_set`.
336
+ - Republish with `panel_set` only when the *shape* changes (a new MR/PR train, a different body).
337
+
338
+ **Refusals are information, not noise.** `no line of this panel carries the key "…"` → your keys and
339
+ the panel disagree: `panel_get` and republish. `publish with panel_set before patching` → this pane
340
+ is still on its file. `this panel is held by "…"` → another producer owns it; do not fight it, say
341
+ so at the next stop.
342
+
343
+ **After a compaction, a restart or a resumed work**, call `panel_get` **before publishing**. It
344
+ returns the document on screen — yours or one that arrived by file — and publishing it back leaves
345
+ the panel exactly as it is. What comes back is the document as the app understood it: unknown fields
346
+ are gone and defaults come back absent.
347
+
348
+ **Optional — buttons at a stop.** At a stop parked on the user, `actions` (up to 8) paint a button
349
+ whose command is shown literally and is written into this pane's program on one click — which here
350
+ is this very session's prompt. So `{"label": "Approve the design", "send": "approve"}` answers you
351
+ without the user typing. Plain text, no line breaks, never a credential: it is painted on screen and
352
+ lands in the shell history.
353
+
354
+ ### 4.3 Without those tools — `.claude/work/<work>/panel.json`
355
+
356
+ Overwrite the file **whole** (never patch) with the §4.1 document. `updated_at` from the real clock
357
+ (`date -Iseconds`), never carried over — it is how the reader flags a stale snapshot. `attention`
358
+ and `key` buy nothing here: the file panel is drawn from `mark` and `ref` alone.
359
+
360
+ ### 4.4 When to publish — whichever transport is in play
361
+
362
+ (a) In pre-flight, as soon as `meta.json` is loaded; (b) immediately **before** every stop header;
363
+ (c) **before** any long stretch (fan-out, full suite, CI poll) — never after, so a step that dies
364
+ halfway is not shown as finished. When the stretch will outlast the ~30 min staleness warning, set
365
+ `stale_after_minutes` to what it will really take; (d) wherever `## Close` updates `meta.json`. A
366
+ held panel still goes stale: the app stamps each delivery's arrival.
295
367
 
296
- ### `meta.json.cost[]` — what a phase measured, when it could
368
+ ### 4.5 `meta.json.cost[]` — what a phase measured, when it could
297
369
 
298
370
  A phase that can measure what it spent appends one entry: `{ "phase": "review", "at": "<ISO>",
299
371
  "reviewers": 8, "usd": 0.0124, "source": "harness" }`. `flow review --record` writes it; `flow cost`
@@ -321,7 +393,7 @@ single largest token cost of a work, so every work carries a short handoff:
321
393
  - **Name the phase, never the command.** An artifact outlives the session that wrote it and may be
322
394
  resumed from a different agent, where the same phase is invoked under another name. Write the
323
395
  phase — `validate`, `review`, `ship #2` — not the invocation. Applies to `00-summary.md`,
324
- `panel.json`'s `Next` line and every numbered artifact; the prose you *say* at a stop is exempt.
396
+ the panel's `Next` line and every numbered artifact; the prose you *say* at a stop is exempt.
325
397
 
326
398
  ## 6. Delegating — what every brief owes the parent
327
399
 
@@ -444,7 +516,7 @@ and the evidence; the verdict stays here.
444
516
  bills and saves nothing. What wakes you is whatever the harness offers — a background task that
445
517
  re-invokes you when it finishes, a scheduled wake-up, a message back to this thread; where it offers
446
518
  none, the supervisor's evidence file is read at your next stop, and **you say that** rather than
447
- implying something is being watched. Refresh `panel.json` before you go (§4): the line carries
519
+ implying something is being watched. Refresh the panel before you go (§4): the line carries
448
520
  `mark: "wait"` and `stale_after_minutes` set to the deadline you gave, because a thread that goes
449
521
  quiet with `current` on screen reads as a session that died.
450
522
 
@@ -18,7 +18,7 @@ Apply the fix. **Minimum viable**: no refactor of adjacent areas. Note other pro
18
18
 
19
19
  ## 1. Pre-flight
20
20
 
21
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
21
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
22
22
 
23
23
  - Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (root cause, constraints for the fix) (minimal reproduction, root cause, constraints for the fix). (flow-core §5)
24
24
  - `size` `XS`: may start without `investigate`, but require a 2-3 line description of the fix.
@@ -44,7 +44,7 @@ What is NOT touched:
44
44
 
45
45
  **Ask with `AskUserQuestion`** whether this reflects the expected fix — a hard gate, **in every mode, `auto` included**: widening the fix is the main source of collateral regressions, and this is the last point to settle scope before there is a diff.
46
46
 
47
- In `guided`/`auto` this is one of the only two stops of the whole flow (this one and `ship`): open with the **full stop header** (flow-core §3), then the brief. Options:
47
+ In `auto` this is one of the only two stops of the whole flow (this one and `ship`; `guided` adds the plan of §2.0bis on a fix of more than two steps): open with the **full stop header** (flow-core §3), then the brief. Options:
48
48
  - **Yes, go ahead** → apply the fix.
49
49
  - **No, something is missing or wrong** → adjust the brief, ask again. No code until confirmed.
50
50
 
@@ -56,11 +56,38 @@ blockers lived in the half a third option let in.
56
56
 
57
57
  Save the brief at the top of `04-fix.md`. Any "also fix X while we're at it" during implementation → §2.3.
58
58
 
59
+ ## 2.0bis Plan the fix (more than 2 steps)
60
+
61
+ A fix of one or two steps is its own plan, and a planning round on it is pure friction. Past that the steps stop fitting in the brief — which says what stops happening, never in which file — and the fix starts being discovered while it is typed. **Trigger: more than 2 fix steps.** Two or fewer → skip, record one line in `04-fix.md` (`plan: skipped — 2 steps`) and go to §2.1.
62
+
63
+ The steps come from the root cause in `03-investigation.md`, not from the repo you are about to open: a step that cause never implied is either the investigation being wrong (§4.1) or scope that belongs in §2.3. **No code yet.** Under 200 words:
64
+
65
+ ```markdown
66
+ ## Plan
67
+ 1. <step> — `<file or path>` — <the test that proves it, or "covered by step M">
68
+ 2. …
69
+
70
+ - **Point of no return**: <the migration, contract or published event after which rollback stops being a revert — or "none">.
71
+ - **Out of this plan**: <the adjacent thing that will be tempting once these files are open>.
72
+ ```
73
+
74
+ Rules, and the first one is the bug flow's own:
75
+ - **The regression test is a step, and it comes first when it can fail before the fix.** `/flow:bug:validate` is what proves the fix, and `/flow:bug:review` refuses to run without it on size ≥ S (`/flow:bug:start §2`). A plan that leaves the test until last has the one step that can still say "the cause was not this" arriving after everything is already built on the answer.
76
+ - **A step is a thing on disk**, not a phase of thought: "add the idempotency key on the retry path", not "look at the retry logic".
77
+ - **A step that widens the blast radius is not part of the minimal fix** (§2.1) — it goes to §2.3 before it is written down here, not after it is built.
78
+ - A fix whose plan needs more than about five steps is usually two tickets or a feature in disguise: check §4.2 before planning further.
79
+
80
+ **Present it, then behave by mode:**
81
+ - `manual` / `guided` → **stop**: full stop header (flow-core §3), the plan, one `AskUserQuestion` — **Approve and fix** · **Change the order or the steps**. On a bug the order is the decision: it is what settles whether the proof comes before the repair.
82
+ - `auto` → **do not stop**. Print the numbered steps and the point of no return, record the plan as accepted, and open the same message with the call that starts §2.1 (flow-core §3: a report is never the last thing in a turn you meant to continue).
83
+
84
+ Save it in `04-fix.md` under `## Plan`, right after the brief. **A fix that was going to be one step and turns into a third**: come back here and write it then — the trigger is the shape of the work, not the moment it was first guessed.
85
+
59
86
  ## 2.1 Work
60
87
 
61
88
  - Apply the minimal fix targeting the finding of `03-investigation.md` (or the diagnosis if investigate was skipped).
62
89
  - Sensitive area (authentication, payments, sensitive data) → consult the `agents.architecture` agent from FLOW.md to confirm the correct layer; empty → check against `conventions` in FLOW.md.
63
- - More than 2 fix steps → task list (`TaskCreate` where the harness offers one; otherwise a numbered list ticked off in `04-fix.md`).
90
+ - More than 2 fix steps → the §2.0bis plan is already written: track its numbered steps with `TaskCreate` where the harness offers one, otherwise tick them off in `04-fix.md` where they stand. One task per step, same order, marked `in_progress` and `completed` as they go — not batched.
64
91
  - **Comment discipline**: comment only a *why* the code cannot say (a non-obvious constraint, the reason for a workaround, a subtle invariant); match the surrounding file's comment density. **Never write the ticket ID or "fix for #N" into a code comment** — that lives in the commit/branch/MR-PR.
65
92
  - Keep the log updated while editing.
66
93
 
@@ -114,6 +141,9 @@ A **product decision** the fix turns out to need is neither of these — not sco
114
141
  **What is NOT touched**:
115
142
  - <adjacent areas out of scope>
116
143
 
144
+ ## Plan
145
+ <the numbered steps of §2.0bis, its point of no return and its "out of this plan" line — or one line saying the step was skipped and why (`plan: skipped — 2 steps`). What §2.1 tracks with `TaskCreate`. Steps are annotated as they are reworked, never deleted: a plan edited to match what happened records nothing.>
146
+
117
147
  ## Fix description
118
148
  <one sentence: "The fix consists of …">
119
149
 
@@ -18,7 +18,7 @@ Investigation phase: reproduce the failure, then find **why it happened** — no
18
18
 
19
19
  ## 1. Pre-flight
20
20
 
21
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
21
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
22
22
 
23
23
  - Read `meta.json` and `00-summary.md`; open in full only `01-context.md`. (flow-core §5)
24
24
  - `type` is not `bug` → refuse. `size` is `XS` → suggest `/flow:bug:fix` and stop.
@@ -20,7 +20,7 @@ Goal: capture lessons that prevent recurrence — not to blame anyone.
20
20
 
21
21
  ## 1. Pre-flight
22
22
 
23
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
23
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
24
24
 
25
25
  - Read `meta.json` and `00-summary.md`; open in full every previous artifact (`01-context.md` … `06-review.md`) — §2 needs the whole history. (flow-core §5)
26
26
  - Require `review` in `phases_done`.
@@ -18,7 +18,7 @@ Mandatory code review of the fix.
18
18
 
19
19
  ## 1. Pre-flight
20
20
 
21
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
21
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
22
22
 
23
23
  - Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` and `04-fix.md` (reviewer context, §2.1) and `05-validation.md` (regression test). (flow-core §5)
24
24
  - **A premise left open by `fix` §2.2 is an input to this review, not a note.** Every row of "Premises the fix depends on" whose verdict is `unsettled` enters §5 as an **ambiguous finding** and is named in §7 whether or not that gate opened — in a bug it is usually the claim that the root cause was the whole cause, which is exactly what the regression test cannot prove.
@@ -21,7 +21,7 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow:feat:ship`, wi
21
21
 
22
22
  ## 0. Pre-flight
23
23
 
24
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with; the wait it delegates takes `models.supervisors`.**
24
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with; the wait it delegates takes `models.supervisors`.**
25
25
 
26
26
  - Read `meta.json` and `00-summary.md`; open in full only `04-fix.md` (the Brief), `06-review.md` (the verdict), `05-validation.md`, the §"Root cause identified" of `03-investigation.md`, and `99-postmortem.md` if it exists. (flow-core §5)
27
27
  - Require `review` in `phases_done`; also `validate` if `size` ≥ S, and `postmortem` if `size` is M or L (the same sizes `/flow:bug:review §8` routes to postmortem — one rule). Missing → refuse and redirect to the missing step.
@@ -154,7 +154,7 @@ Only here — with the content approved in §2 — invoke `Skill commit-commands
154
154
 
155
155
  Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.squash`.
156
156
 
157
- **Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh `panel.json` (flow-core §4) right here, before §3.2 and before anything else can fail.
157
+ **Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh the panel (flow-core §4) right here, before §3.2 and before anything else can fail.
158
158
 
159
159
  **The pipeline the push starts is not watched from this thread — `/flow:feat:ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `/flow:work:green`'s to triage, never this command's.
160
160
 
@@ -173,7 +173,7 @@ nothing was measured. A slowness bug is the case where this comment *is* the pro
173
173
 
174
174
  - **A worktree does not own the tree its tools wrote into — `/flow:feat:ship` §5.5, in full and unchanged.** First, before anything below: `meta.json.worktree` not null → read the main checkout's `git status --porcelain`, name any paths it holds in one line as what they are (in the main checkout, not in the branch just pushed, and not necessarily put there by this run), and offer once to carry them over. A fix consolidates its knowledge one phase earlier, in `/flow:bug:postmortem` §4, so by the time this runs those writes have already happened and the branch has already been pushed — which is exactly the window this check exists to close.
175
175
  - Update `meta.json`: add `ship` to `phases_done`, update `updated_at`. **`phase` becomes `done` only once the MR/PR is confirmed merged** — creating it is not finishing it. Right after §3.1 it is open, so ask once with `AskUserQuestion` whether it has already been merged: **no** (the normal answer) → leave `phase = "ship"`; **yes** → `phase = "done"`. `/flow:work:green` and `/flow:work:respond` work on the open MR/PR; `/flow:work:clean` only sweeps what merged.
176
- - Refresh `panel.json`: while the MR/PR is open its line is `wait` with the `link`; once merged it is `done`, and only then say there is nothing left here (`mark: "info"`, `style: "ok"`). Drop the `Decision` line either way.
176
+ - Refresh the panel: while the MR/PR is open its line is `wait` with the `link`; once merged it is `done`, and only then say there is nothing left here (`mark: "info"`, `style: "ok"`). Drop the `Decision` line either way.
177
177
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
178
178
  - **Tracker: move to done.** **Only when this ship set `phase = "done"`** (merge confirmed just above) and `tracker.tool` is not `none`/empty, `tracker.done_cmd` is set, and `meta.json.ticket` is a **real tracker id**: run `tracker.done_cmd` with `{TICKET}` = `meta.json.ticket`. Never on an open MR/PR. If the answer was "not merged", skip silently — the transition belongs to whoever confirms the merge (`/flow:work:clean` reports the branch as merged, and re-running this close is legitimate). Same contract as `/flow:bug:start §4.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-done ticket → warn and continue, never block. **Leave `tracker.done_cmd` empty on GitHub/GitLab** — `Closes #N` already auto-closes on merge; this is for Jira/Linear-style trackers.
179
179
  - Summarize: ticket, MR/PR URL, regression test added.
@@ -21,7 +21,7 @@ Start a bug. `{{args}}` is **optional**:
21
21
 
22
22
  ## 0. Pre-flight
23
23
 
24
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
24
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
25
25
 
26
26
  - Verify you are in the correct repo.
27
27
  - **Determine the mode** from `{{args}}`: non-empty → *ticket mode* (identifier = `{{args}}`); empty → *ticket-less mode* (identifier = the slug resolved in §1.5).
@@ -158,7 +158,7 @@ Create the work directory per §0: `.claude/work/<TICKET>-<slug>/` in ticket mod
158
158
  }
159
159
  ```
160
160
 
161
- `<work-dir>/panel.json`: write it now (flow-core §4). A bug has no MR/PR train, so it is short: the title (the symptom, `style: title`), a `Now` line for what is starting, a `Next` line for the phase this size routes to, and any sibling repo from §1.6 as a `block` line. Every later phase overwrites it whole.
161
+ **Live panel**: publish it now (flow-core §4 — the panel tools, or `<work-dir>/panel.json`). A bug has no MR/PR train, so it is short: the title (the symptom, `style: title`), a `Now` line for what is starting, a `Next` line for the phase this size routes to, and any sibling repo from §1.6 as a `block` line. Every later phase updates it.
162
162
 
163
163
  Populate `related_repos` from §1.6 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo the fix touches; `[]` for a single-repo fix. `pending` only when the fix **changes a surface that sibling consumes** (a payload key, an error code, a route, an event shape); otherwise `none`.
164
164
 
@@ -18,7 +18,7 @@ Validate that the fix works and that the bug does not return.
18
18
 
19
19
  ## 1. Pre-flight
20
20
 
21
- Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
21
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
22
22
 
23
23
  - Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
24
24
  - Require `fix` in `phases_done`.
@@ -195,6 +195,7 @@ refuse) · **degraded** (it runs, quietly worse than the config promises), plus
195
195
  `.agents/agents`, or a plugin. Report each missing name and that it falls back to `general-purpose`
196
196
  (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
197
197
  - Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
198
+ - **Where the live panel will go this session** (flow-core §4): `panel_set` / `panel_patch` exposed → the terminal draws the panel and no `panel.json` is written; absent → the panel is that file, as before. Neither is a fault — one line saying which one this session gets.
198
199
 
199
200
  ### 2.3 Knowledge sources
200
201