flow-workflows 0.116.0 → 0.117.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.
@@ -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.116.0`.** Compare it once, at the start of the session, against
20
+ **This file belongs to flow `0.117.0`.** Compare it once, at the start of the session, against
21
21
  `version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
22
22
  is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
23
23
  — which is exactly what happens when a branch or a release candidate is loaded over an installed
@@ -399,7 +399,7 @@ Each place a command would have asked resolves one of these ways:
399
399
  add `{ "key": "unattended:<site>", "default": "<resolution>", "phase": "<phase>" }` to
400
400
  `meta.json.defaults_used[]` (the prefix says it is not a FLOW key), and continue.
401
401
  - **question** — a decision only a person can take: the question stop below, `ask --gate <site>`,
402
- the panel's `attention` set to `wait`, end of the run.
402
+ the question as the panel's `decision` (it raises `wait`), end of the run.
403
403
  - **blocked** — something the run cannot get past (the environment, a tool, a check that keeps
404
404
  failing): `blocked --reason-file` with one line saying what a person or the orchestrator must
405
405
  fix, `attention: block`, end of the run.
@@ -680,7 +680,7 @@ language. So a publication is two moves:
680
680
 
681
681
  ```json
682
682
  {"phase": "build", "now": "unit suite over #2", "next": "review #2",
683
- "decision": "confirm the MR/PR body before I create it", "attention": "wait",
683
+ "decision": "confirm the MR/PR body before I create it",
684
684
  "blocks": [{"text": "sibling-repo still needs the endpoint contract", "link": "https://…"}],
685
685
  "stale_after_minutes": 45,
686
686
  "labels": {"now": "Ahora", "next": "Siguiente", "decision": "Decisión", "open": "Abierto",
@@ -691,7 +691,9 @@ language. So a publication is two moves:
691
691
  Every field is optional. `phase` is the phase **running now**. `now` is what is running — never
692
692
  the train restated (*"MR/PR open, waiting for review"* is what the train line already says).
693
693
  `next` is the next phase or MR/PR — never housekeeping (*archive the work*, *remove the
694
- worktree*). `decision` only while parked on the user; it sets `attention: wait` by itself.
694
+ worktree*). `decision` only while parked on the user; it is the only thing that raises `attention: wait`.
695
+ `attention` itself is written only for `block` with no `blocks` line, or `done`: a written
696
+ `wait` with no `decision` claims nobody.
695
697
  `blocks` are what stops the work on somebody else — a sibling repo with `contract_handoff:
696
698
  pending`, a red pipeline, an unmerged dependency — each with its `link` when it names an MR/PR.
697
699
  `labels` carry the fixed words in **the language of the work's artifacts** — also `mrs` (the
@@ -709,7 +711,12 @@ language. So a publication is two moves:
709
711
  **Where the plugin's hooks run — Claude Code and Codex — the render also happens on its own**: a
710
712
  `PostToolUse` hook renders the panel again whenever `meta.json`, the plan, or `panel-input.json` is
711
713
  newer than `panel.json` and than that branch's last attempt — a render that wrote nothing is not
712
- retried until one of them changes again. Ticking a step in the plan *is* publishing it there. The hook cannot reach
714
+ retried until one of them changes again. Ticking a step in the plan *is* publishing it there. **An answered question is too**: when the
715
+ user answers the harness's question tool (`AskUserQuestion`, Codex's `request_user_input`) and the
716
+ input holds a `decision`, the hook copies the input aside as answered (`panel-answered.json`) and
717
+ renders: while the input is still that copy, its `decision` and `wait` claim nobody. Your input is
718
+ never rewritten — the next one you write is newer than the answer and asks again. A question left
719
+ unanswered, rejected or timed out changes nothing. The hook cannot reach
713
720
  the terminal's MCP tools, which is what `panel.publish_cmd` is for (§4.2).
714
721
 
715
722
  **The CLI unavailable** — no network for npx, a sandbox that blocks it, a non-zero exit with no
@@ -818,7 +825,9 @@ halfway is not shown as finished. When the stretch will outlast the ~30 min stal
818
825
  `stale_after_minutes` in the input to what it will really take; (d) wherever `## Close` updates
819
826
  `meta.json`; (e) **the moment a question is answered or a gate is cleared** — before you resume the
820
827
  work: drop `decision` from the input, move `now` on, render. A panel still asking what the user
821
- already answered is worse than one that never asked; (f) **each plan step that lands** — tick it in
828
+ already answered is worse than one that never asked. Where the hook runs, an answer
829
+ given through the question tool already did it; a question asked in prose, or a gate cleared
830
+ another way, did not; (f) **each plan step that lands** — tick it in
822
831
  the phase artifact, move `now` on, render without `--forge`. Where the plugin's hook runs, the tick
823
832
  and the input change already rendered it; publish over the tools anyway when they are there.
824
833
 
@@ -231,7 +231,7 @@ If `knowledge.stage` is set and the root cause reveals a **non-obvious "why"** a
231
231
  ## 8. Close
232
232
 
233
233
  - Update `meta.json`: `phase = "investigate"`, add to `phases_done`.
234
- - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or carries the number of exactly one reviewed MR/PR; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
234
+ - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or names exactly one reviewed MR/PR — itself, or through the merge that carried it in; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
235
235
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
236
236
  - Suggest `$flow-bug-fix` — `meta.json.handoff` set and not `unattended` → `$flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
237
237
  - **Autonomy handoff** (`autonomy.mode`, flow-core §2): `manual` → propose `$flow-bug-fix` with a single `AskUserQuestion`, invoke it only on confirmation; `guided`/`auto` → chain into it in this same turn. Either way: `meta.json.handoff` set and not `unattended` → `$flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
@@ -164,7 +164,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
164
164
 
165
165
  - **`candidate_sha` / `reviewed_sha` / `fixed_sha` / `validated_sha`**: which code each verdict is about. `candidate_sha` is written by `review` in its **pre-flight** (§1.5) — the revision it froze before reading anything, `git rev-parse HEAD` over a clean tree and `git stash create` over a dirty one, anchored at `refs/flow/candidate/<TICKET>` so nothing collects it. The other three are written at `## Close`, **only when the phase actually advances**, work-level and in the current `mrs[]` entry: `reviewed_sha` is the candidate that was actually read, `fixed_sha` is `HEAD` after that round's own fixes (empty when it applied none), `validated_sha` is where the suite went green.
166
166
  - **`review_findings[]`**: one row per finding, after the review's dedup — `{ round, mr?, sources, severity, file, outcome }`, no finding text (that stays in `06-review.md`). `sources` lists every origin that raised it, from a closed list (`built-in` · `panel:<role>` · `reinforcement:<area>` · `sweep` · `query-duel` · `yagni` · `contract` · `idiom`); `outcome` is `fixed` · `open` · `rejected` · `discarded` · `deferred`. The same round writes one `cost[]` entry with `round`, `tier`, `effective_size` and `agents` — every pass it launched, findings or not. Only `flow record-review --file` writes them — once per round, the CLI panel's roles included — and it refuses any value outside those lists, or a source that is not among the round's `agents`: six weeks of hand-written origins had produced ~65 spellings. Rows from before that, `{ round, origin, severity, file, discarded_by_skeptic }` one per source, stay as they are. It exists so a pass can be retired on evidence: `flow yield [<repo-path>…]` reads every work those repos hold — live and `_archive/`, here and in the main checkout — and reports per origin and per size how many rounds each ran, how many findings it contributed, how many **only** it raised, and how many of those were acted on (for the older rows: not refuted by a skeptic) — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no unique accepted finding across twenty rounds at a size (XS and S pooled) and the pass comes out of the command at that size.
167
- - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or carries the number of exactly one reviewed MR/PR (squash). `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
167
+ - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or names exactly one reviewed MR/PR (squash) — in its own message, or in the GitLab merge that carried it in. `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
168
168
  Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
169
169
  - **`respond_rounds`**: rounds of `$flow-work-respond` on an MR/PR. `$flow-work-respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
170
170
  - **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `$flow-feat-start §3.7`, marked in progress / done by `$flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume` — which also flag an item the code delivered but the file still does not mark. `null` with no roadmap, no link, or a bug. With the project plan on (flow-core §10.1) it may also carry `milestone` and `deliverable` — the plan's ids for the deliverable whose ticket cell names this work's ticket — which the panel copies so the board hangs this console from it; absent when the ticket is in no row.
@@ -162,5 +162,6 @@ and the `done` of the table above.
162
162
  ## 3. Close
163
163
 
164
164
  Nothing to write here beyond the routing above — the phase it hands to owns the artifacts, the
165
- panel and the closing order. When the route ended the run itself (`ask` → `wait`, `blocked` → `block`,
166
- `done` → `done`), publish the panel with that `attention` (flow-core §4) and print the §3 header.
165
+ panel and the closing order. When the route ended the run itself, publish the panel (flow-core §4) —
166
+ `ask` → the question as `decision`, which raises `wait`; `blocked` → `attention: block`; `done` →
167
+ `attention: done` — and print the §3 header.
@@ -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.116.0`.** Compare it once, at the start of the session, against
19
+ **This file belongs to flow `0.117.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
@@ -398,7 +398,7 @@ Each place a command would have asked resolves one of these ways:
398
398
  add `{ "key": "unattended:<site>", "default": "<resolution>", "phase": "<phase>" }` to
399
399
  `meta.json.defaults_used[]` (the prefix says it is not a FLOW key), and continue.
400
400
  - **question** — a decision only a person can take: the question stop below, `ask --gate <site>`,
401
- the panel's `attention` set to `wait`, end of the run.
401
+ the question as the panel's `decision` (it raises `wait`), end of the run.
402
402
  - **blocked** — something the run cannot get past (the environment, a tool, a check that keeps
403
403
  failing): `blocked --reason-file` with one line saying what a person or the orchestrator must
404
404
  fix, `attention: block`, end of the run.
@@ -679,7 +679,7 @@ language. So a publication is two moves:
679
679
 
680
680
  ```json
681
681
  {"phase": "build", "now": "unit suite over #2", "next": "review #2",
682
- "decision": "confirm the MR/PR body before I create it", "attention": "wait",
682
+ "decision": "confirm the MR/PR body before I create it",
683
683
  "blocks": [{"text": "sibling-repo still needs the endpoint contract", "link": "https://…"}],
684
684
  "stale_after_minutes": 45,
685
685
  "labels": {"now": "Ahora", "next": "Siguiente", "decision": "Decisión", "open": "Abierto",
@@ -690,7 +690,9 @@ language. So a publication is two moves:
690
690
  Every field is optional. `phase` is the phase **running now**. `now` is what is running — never
691
691
  the train restated (*"MR/PR open, waiting for review"* is what the train line already says).
692
692
  `next` is the next phase or MR/PR — never housekeeping (*archive the work*, *remove the
693
- worktree*). `decision` only while parked on the user; it sets `attention: wait` by itself.
693
+ worktree*). `decision` only while parked on the user; it is the only thing that raises `attention: wait`.
694
+ `attention` itself is written only for `block` with no `blocks` line, or `done`: a written
695
+ `wait` with no `decision` claims nobody.
694
696
  `blocks` are what stops the work on somebody else — a sibling repo with `contract_handoff:
695
697
  pending`, a red pipeline, an unmerged dependency — each with its `link` when it names an MR/PR.
696
698
  `labels` carry the fixed words in **the language of the work's artifacts** — also `mrs` (the
@@ -708,7 +710,12 @@ language. So a publication is two moves:
708
710
  **Where the plugin's hooks run — Claude Code and Codex — the render also happens on its own**: a
709
711
  `PostToolUse` hook renders the panel again whenever `meta.json`, the plan, or `panel-input.json` is
710
712
  newer than `panel.json` and than that branch's last attempt — a render that wrote nothing is not
711
- retried until one of them changes again. Ticking a step in the plan *is* publishing it there. The hook cannot reach
713
+ retried until one of them changes again. Ticking a step in the plan *is* publishing it there. **An answered question is too**: when the
714
+ user answers the harness's question tool (`AskUserQuestion`, Codex's `request_user_input`) and the
715
+ input holds a `decision`, the hook copies the input aside as answered (`panel-answered.json`) and
716
+ renders: while the input is still that copy, its `decision` and `wait` claim nobody. Your input is
717
+ never rewritten — the next one you write is newer than the answer and asks again. A question left
718
+ unanswered, rejected or timed out changes nothing. The hook cannot reach
712
719
  the terminal's MCP tools, which is what `panel.publish_cmd` is for (§4.2).
713
720
 
714
721
  **The CLI unavailable** — no network for npx, a sandbox that blocks it, a non-zero exit with no
@@ -817,7 +824,9 @@ halfway is not shown as finished. When the stretch will outlast the ~30 min stal
817
824
  `stale_after_minutes` in the input to what it will really take; (d) wherever `## Close` updates
818
825
  `meta.json`; (e) **the moment a question is answered or a gate is cleared** — before you resume the
819
826
  work: drop `decision` from the input, move `now` on, render. A panel still asking what the user
820
- already answered is worse than one that never asked; (f) **each plan step that lands** — tick it in
827
+ already answered is worse than one that never asked. Where the hook runs, an answer
828
+ given through the question tool already did it; a question asked in prose, or a gate cleared
829
+ another way, did not; (f) **each plan step that lands** — tick it in
821
830
  the phase artifact, move `now` on, render without `--forge`. Where the plugin's hook runs, the tick
822
831
  and the input change already rendered it; publish over the tools anyway when they are there.
823
832
 
@@ -227,7 +227,7 @@ If `knowledge.stage` is set and the root cause reveals a **non-obvious "why"** a
227
227
  ## 8. Close
228
228
 
229
229
  - Update `meta.json`: `phase = "investigate"`, add to `phases_done`.
230
- - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or carries the number of exactly one reviewed MR/PR; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
230
+ - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or names exactly one reviewed MR/PR — itself, or through the merge that carried it in; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
231
231
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
232
232
  - Suggest `/flow:bug:fix` — `meta.json.handoff` set and not `unattended` → `/flow:work:handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
233
233
  - **Autonomy handoff** (`autonomy.mode`, flow-core §2): `manual` → propose `/flow:bug:fix` with a single `AskUserQuestion`, invoke it only on confirmation; `guided`/`auto` → chain into it in this same turn. Either way: `meta.json.handoff` set and not `unattended` → `/flow:work:handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
@@ -160,7 +160,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
160
160
 
161
161
  - **`candidate_sha` / `reviewed_sha` / `fixed_sha` / `validated_sha`**: which code each verdict is about. `candidate_sha` is written by `review` in its **pre-flight** (§1.5) — the revision it froze before reading anything, `git rev-parse HEAD` over a clean tree and `git stash create` over a dirty one, anchored at `refs/flow/candidate/<TICKET>` so nothing collects it. The other three are written at `## Close`, **only when the phase actually advances**, work-level and in the current `mrs[]` entry: `reviewed_sha` is the candidate that was actually read, `fixed_sha` is `HEAD` after that round's own fixes (empty when it applied none), `validated_sha` is where the suite went green.
162
162
  - **`review_findings[]`**: one row per finding, after the review's dedup — `{ round, mr?, sources, severity, file, outcome }`, no finding text (that stays in `06-review.md`). `sources` lists every origin that raised it, from a closed list (`built-in` · `panel:<role>` · `reinforcement:<area>` · `sweep` · `query-duel` · `yagni` · `contract` · `idiom`); `outcome` is `fixed` · `open` · `rejected` · `discarded` · `deferred`. The same round writes one `cost[]` entry with `round`, `tier`, `effective_size` and `agents` — every pass it launched, findings or not. Only `flow record-review --file` writes them — once per round, the CLI panel's roles included — and it refuses any value outside those lists, or a source that is not among the round's `agents`: six weeks of hand-written origins had produced ~65 spellings. Rows from before that, `{ round, origin, severity, file, discarded_by_skeptic }` one per source, stay as they are. It exists so a pass can be retired on evidence: `flow yield [<repo-path>…]` reads every work those repos hold — live and `_archive/`, here and in the main checkout — and reports per origin and per size how many rounds each ran, how many findings it contributed, how many **only** it raised, and how many of those were acted on (for the older rows: not refuted by a skeptic) — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no unique accepted finding across twenty rounds at a size (XS and S pooled) and the pass comes out of the command at that size.
163
- - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or carries the number of exactly one reviewed MR/PR (squash). `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
163
+ - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or names exactly one reviewed MR/PR (squash) — in its own message, or in the GitLab merge that carried it in. `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
164
164
  Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
165
165
  - **`respond_rounds`**: rounds of `/flow:work:respond` on an MR/PR. `/flow:work:respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
166
166
  - **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow:feat:start §3.7`, marked in progress / done by `/flow:feat:ship` inside the MR/PR, shown by `next`/`daily`/`resume` — which also flag an item the code delivered but the file still does not mark. `null` with no roadmap, no link, or a bug. With the project plan on (flow-core §10.1) it may also carry `milestone` and `deliverable` — the plan's ids for the deliverable whose ticket cell names this work's ticket — which the panel copies so the board hangs this console from it; absent when the ticket is in no row.
@@ -158,6 +158,7 @@ and the `done` of the table above.
158
158
  ## 3. Close
159
159
 
160
160
  Nothing to write here beyond the routing above — the phase it hands to owns the artifacts, the
161
- panel and the closing order. When the route ended the run itself (`ask` → `wait`, `blocked` → `block`,
162
- `done` → `done`), publish the panel with that `attention` (flow-core §4) and print the §3 header.
161
+ panel and the closing order. When the route ended the run itself, publish the panel (flow-core §4) —
162
+ `ask` → the question as `decision`, which raises `wait`; `blocked` → `attention: block`; `done` →
163
+ `attention: done` — and print the §3 header.
163
164
  """
@@ -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.116.0`.** Compare it once, at the start of the session, against
20
+ **This file belongs to flow `0.117.0`.** Compare it once, at the start of the session, against
21
21
  `version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
22
22
  is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
23
23
  — which is exactly what happens when a branch or a release candidate is loaded over an installed
@@ -399,7 +399,7 @@ Each place a command would have asked resolves one of these ways:
399
399
  add `{ "key": "unattended:<site>", "default": "<resolution>", "phase": "<phase>" }` to
400
400
  `meta.json.defaults_used[]` (the prefix says it is not a FLOW key), and continue.
401
401
  - **question** — a decision only a person can take: the question stop below, `ask --gate <site>`,
402
- the panel's `attention` set to `wait`, end of the run.
402
+ the question as the panel's `decision` (it raises `wait`), end of the run.
403
403
  - **blocked** — something the run cannot get past (the environment, a tool, a check that keeps
404
404
  failing): `blocked --reason-file` with one line saying what a person or the orchestrator must
405
405
  fix, `attention: block`, end of the run.
@@ -680,7 +680,7 @@ language. So a publication is two moves:
680
680
 
681
681
  ```json
682
682
  {"phase": "build", "now": "unit suite over #2", "next": "review #2",
683
- "decision": "confirm the MR/PR body before I create it", "attention": "wait",
683
+ "decision": "confirm the MR/PR body before I create it",
684
684
  "blocks": [{"text": "sibling-repo still needs the endpoint contract", "link": "https://…"}],
685
685
  "stale_after_minutes": 45,
686
686
  "labels": {"now": "Ahora", "next": "Siguiente", "decision": "Decisión", "open": "Abierto",
@@ -691,7 +691,9 @@ language. So a publication is two moves:
691
691
  Every field is optional. `phase` is the phase **running now**. `now` is what is running — never
692
692
  the train restated (*"MR/PR open, waiting for review"* is what the train line already says).
693
693
  `next` is the next phase or MR/PR — never housekeeping (*archive the work*, *remove the
694
- worktree*). `decision` only while parked on the user; it sets `attention: wait` by itself.
694
+ worktree*). `decision` only while parked on the user; it is the only thing that raises `attention: wait`.
695
+ `attention` itself is written only for `block` with no `blocks` line, or `done`: a written
696
+ `wait` with no `decision` claims nobody.
695
697
  `blocks` are what stops the work on somebody else — a sibling repo with `contract_handoff:
696
698
  pending`, a red pipeline, an unmerged dependency — each with its `link` when it names an MR/PR.
697
699
  `labels` carry the fixed words in **the language of the work's artifacts** — also `mrs` (the
@@ -709,7 +711,12 @@ language. So a publication is two moves:
709
711
  **Where the plugin's hooks run — Claude Code and Codex — the render also happens on its own**: a
710
712
  `PostToolUse` hook renders the panel again whenever `meta.json`, the plan, or `panel-input.json` is
711
713
  newer than `panel.json` and than that branch's last attempt — a render that wrote nothing is not
712
- retried until one of them changes again. Ticking a step in the plan *is* publishing it there. The hook cannot reach
714
+ retried until one of them changes again. Ticking a step in the plan *is* publishing it there. **An answered question is too**: when the
715
+ user answers the harness's question tool (`AskUserQuestion`, Codex's `request_user_input`) and the
716
+ input holds a `decision`, the hook copies the input aside as answered (`panel-answered.json`) and
717
+ renders: while the input is still that copy, its `decision` and `wait` claim nobody. Your input is
718
+ never rewritten — the next one you write is newer than the answer and asks again. A question left
719
+ unanswered, rejected or timed out changes nothing. The hook cannot reach
713
720
  the terminal's MCP tools, which is what `panel.publish_cmd` is for (§4.2).
714
721
 
715
722
  **The CLI unavailable** — no network for npx, a sandbox that blocks it, a non-zero exit with no
@@ -818,7 +825,9 @@ halfway is not shown as finished. When the stretch will outlast the ~30 min stal
818
825
  `stale_after_minutes` in the input to what it will really take; (d) wherever `## Close` updates
819
826
  `meta.json`; (e) **the moment a question is answered or a gate is cleared** — before you resume the
820
827
  work: drop `decision` from the input, move `now` on, render. A panel still asking what the user
821
- already answered is worse than one that never asked; (f) **each plan step that lands** — tick it in
828
+ already answered is worse than one that never asked. Where the hook runs, an answer
829
+ given through the question tool already did it; a question asked in prose, or a gate cleared
830
+ another way, did not; (f) **each plan step that lands** — tick it in
822
831
  the phase artifact, move `now` on, render without `--forge`. Where the plugin's hook runs, the tick
823
832
  and the input change already rendered it; publish over the tools anyway when they are there.
824
833
 
@@ -231,7 +231,7 @@ If `knowledge.stage` is set and the root cause reveals a **non-obvious "why"** a
231
231
  ## 8. Close
232
232
 
233
233
  - Update `meta.json`: `phase = "investigate"`, add to `phases_done`.
234
- - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or carries the number of exactly one reviewed MR/PR; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
234
+ - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or names exactly one reviewed MR/PR — itself, or through the merge that carried it in; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
235
235
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
236
236
  - Suggest `/flow-bug-fix` — `meta.json.handoff` set and not `unattended` → `/flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
237
237
  - **Autonomy handoff** (`autonomy.mode`, flow-core §2): `manual` → propose `/flow-bug-fix` with a single `AskUserQuestion`, invoke it only on confirmation; `guided`/`auto` → chain into it in this same turn. Either way: `meta.json.handoff` set and not `unattended` → `/flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
@@ -164,7 +164,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
164
164
 
165
165
  - **`candidate_sha` / `reviewed_sha` / `fixed_sha` / `validated_sha`**: which code each verdict is about. `candidate_sha` is written by `review` in its **pre-flight** (§1.5) — the revision it froze before reading anything, `git rev-parse HEAD` over a clean tree and `git stash create` over a dirty one, anchored at `refs/flow/candidate/<TICKET>` so nothing collects it. The other three are written at `## Close`, **only when the phase actually advances**, work-level and in the current `mrs[]` entry: `reviewed_sha` is the candidate that was actually read, `fixed_sha` is `HEAD` after that round's own fixes (empty when it applied none), `validated_sha` is where the suite went green.
166
166
  - **`review_findings[]`**: one row per finding, after the review's dedup — `{ round, mr?, sources, severity, file, outcome }`, no finding text (that stays in `06-review.md`). `sources` lists every origin that raised it, from a closed list (`built-in` · `panel:<role>` · `reinforcement:<area>` · `sweep` · `query-duel` · `yagni` · `contract` · `idiom`); `outcome` is `fixed` · `open` · `rejected` · `discarded` · `deferred`. The same round writes one `cost[]` entry with `round`, `tier`, `effective_size` and `agents` — every pass it launched, findings or not. Only `flow record-review --file` writes them — once per round, the CLI panel's roles included — and it refuses any value outside those lists, or a source that is not among the round's `agents`: six weeks of hand-written origins had produced ~65 spellings. Rows from before that, `{ round, origin, severity, file, discarded_by_skeptic }` one per source, stay as they are. It exists so a pass can be retired on evidence: `flow yield [<repo-path>…]` reads every work those repos hold — live and `_archive/`, here and in the main checkout — and reports per origin and per size how many rounds each ran, how many findings it contributed, how many **only** it raised, and how many of those were acted on (for the older rows: not refuted by a skeptic) — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no unique accepted finding across twenty rounds at a size (XS and S pooled) and the pass comes out of the command at that size.
167
- - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or carries the number of exactly one reviewed MR/PR (squash). `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
167
+ - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or names exactly one reviewed MR/PR (squash) — in its own message, or in the GitLab merge that carried it in. `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
168
168
  Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
169
169
  - **`respond_rounds`**: rounds of `/flow-work-respond` on an MR/PR. `/flow-work-respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
170
170
  - **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow-feat-start §3.7`, marked in progress / done by `/flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume` — which also flag an item the code delivered but the file still does not mark. `null` with no roadmap, no link, or a bug. With the project plan on (flow-core §10.1) it may also carry `milestone` and `deliverable` — the plan's ids for the deliverable whose ticket cell names this work's ticket — which the panel copies so the board hangs this console from it; absent when the ticket is in no row.
@@ -162,5 +162,6 @@ and the `done` of the table above.
162
162
  ## 3. Close
163
163
 
164
164
  Nothing to write here beyond the routing above — the phase it hands to owns the artifacts, the
165
- panel and the closing order. When the route ended the run itself (`ask` → `wait`, `blocked` → `block`,
166
- `done` → `done`), publish the panel with that `attention` (flow-core §4) and print the §3 header.
165
+ panel and the closing order. When the route ended the run itself, publish the panel (flow-core §4) —
166
+ `ask` → the question as `decision`, which raises `wait`; `blocked` → `attention: block`; `done` →
167
+ `attention: done` — and print the §3 header.
@@ -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.116.0`.** Compare it once, at the start of the session, against
19
+ **This file belongs to flow `0.117.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
@@ -398,7 +398,7 @@ Each place a command would have asked resolves one of these ways:
398
398
  add `{ "key": "unattended:<site>", "default": "<resolution>", "phase": "<phase>" }` to
399
399
  `meta.json.defaults_used[]` (the prefix says it is not a FLOW key), and continue.
400
400
  - **question** — a decision only a person can take: the question stop below, `ask --gate <site>`,
401
- the panel's `attention` set to `wait`, end of the run.
401
+ the question as the panel's `decision` (it raises `wait`), end of the run.
402
402
  - **blocked** — something the run cannot get past (the environment, a tool, a check that keeps
403
403
  failing): `blocked --reason-file` with one line saying what a person or the orchestrator must
404
404
  fix, `attention: block`, end of the run.
@@ -679,7 +679,7 @@ language. So a publication is two moves:
679
679
 
680
680
  ```json
681
681
  {"phase": "build", "now": "unit suite over #2", "next": "review #2",
682
- "decision": "confirm the MR/PR body before I create it", "attention": "wait",
682
+ "decision": "confirm the MR/PR body before I create it",
683
683
  "blocks": [{"text": "sibling-repo still needs the endpoint contract", "link": "https://…"}],
684
684
  "stale_after_minutes": 45,
685
685
  "labels": {"now": "Ahora", "next": "Siguiente", "decision": "Decisión", "open": "Abierto",
@@ -690,7 +690,9 @@ language. So a publication is two moves:
690
690
  Every field is optional. `phase` is the phase **running now**. `now` is what is running — never
691
691
  the train restated (*"MR/PR open, waiting for review"* is what the train line already says).
692
692
  `next` is the next phase or MR/PR — never housekeeping (*archive the work*, *remove the
693
- worktree*). `decision` only while parked on the user; it sets `attention: wait` by itself.
693
+ worktree*). `decision` only while parked on the user; it is the only thing that raises `attention: wait`.
694
+ `attention` itself is written only for `block` with no `blocks` line, or `done`: a written
695
+ `wait` with no `decision` claims nobody.
694
696
  `blocks` are what stops the work on somebody else — a sibling repo with `contract_handoff:
695
697
  pending`, a red pipeline, an unmerged dependency — each with its `link` when it names an MR/PR.
696
698
  `labels` carry the fixed words in **the language of the work's artifacts** — also `mrs` (the
@@ -708,7 +710,12 @@ language. So a publication is two moves:
708
710
  **Where the plugin's hooks run — Claude Code and Codex — the render also happens on its own**: a
709
711
  `PostToolUse` hook renders the panel again whenever `meta.json`, the plan, or `panel-input.json` is
710
712
  newer than `panel.json` and than that branch's last attempt — a render that wrote nothing is not
711
- retried until one of them changes again. Ticking a step in the plan *is* publishing it there. The hook cannot reach
713
+ retried until one of them changes again. Ticking a step in the plan *is* publishing it there. **An answered question is too**: when the
714
+ user answers the harness's question tool (`AskUserQuestion`, Codex's `request_user_input`) and the
715
+ input holds a `decision`, the hook copies the input aside as answered (`panel-answered.json`) and
716
+ renders: while the input is still that copy, its `decision` and `wait` claim nobody. Your input is
717
+ never rewritten — the next one you write is newer than the answer and asks again. A question left
718
+ unanswered, rejected or timed out changes nothing. The hook cannot reach
712
719
  the terminal's MCP tools, which is what `panel.publish_cmd` is for (§4.2).
713
720
 
714
721
  **The CLI unavailable** — no network for npx, a sandbox that blocks it, a non-zero exit with no
@@ -817,7 +824,9 @@ halfway is not shown as finished. When the stretch will outlast the ~30 min stal
817
824
  `stale_after_minutes` in the input to what it will really take; (d) wherever `## Close` updates
818
825
  `meta.json`; (e) **the moment a question is answered or a gate is cleared** — before you resume the
819
826
  work: drop `decision` from the input, move `now` on, render. A panel still asking what the user
820
- already answered is worse than one that never asked; (f) **each plan step that lands** — tick it in
827
+ already answered is worse than one that never asked. Where the hook runs, an answer
828
+ given through the question tool already did it; a question asked in prose, or a gate cleared
829
+ another way, did not; (f) **each plan step that lands** — tick it in
821
830
  the phase artifact, move `now` on, render without `--forge`. Where the plugin's hook runs, the tick
822
831
  and the input change already rendered it; publish over the tools anyway when they are there.
823
832
 
@@ -229,7 +229,7 @@ If `knowledge.stage` is set and the root cause reveals a **non-obvious "why"** a
229
229
  ## 8. Close
230
230
 
231
231
  - Update `meta.json`: `phase = "investigate"`, add to `phases_done`.
232
- - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or carries the number of exactly one reviewed MR/PR; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
232
+ - **Did a flow review let it through?** With a suspected commit named under "Evidence", run `npx flow-workflows@<version> escape <commit> --file <the file the root cause is in>` from the work's checkout (`<version>` = this plugin's own, from `~/.claude/flow/.claude-plugin/plugin.json`). It records `meta.json.escape` only when the commit sits inside exactly one work's reviewed range, or names exactly one reviewed MR/PR — itself, or through the merge that carried it in; anything less it says and records nowhere. Copy its line under "Why tests/CI did not catch it". No suspected commit, or the CLI unavailable → say so there in one line; never write `escape` by hand. Asks nothing: it is a reading, and `flow yield` is what counts it.
233
233
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
234
234
  - Suggest `/flow-bug-fix` — `meta.json.handoff` set and not `unattended` → `/flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
235
235
  - **Autonomy handoff** (`autonomy.mode`, flow-core §2): `manual` → propose `/flow-bug-fix` with a single `AskUserQuestion`, invoke it only on confirmation; `guided`/`auto` → chain into it in this same turn. Either way: `meta.json.handoff` set and not `unattended` → `/flow-work-handoff` in its place, **Hand off the study** recommended and **Build here** second where it asks (flow-core §2, a study made for handoff).
@@ -162,7 +162,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
162
162
 
163
163
  - **`candidate_sha` / `reviewed_sha` / `fixed_sha` / `validated_sha`**: which code each verdict is about. `candidate_sha` is written by `review` in its **pre-flight** (§1.5) — the revision it froze before reading anything, `git rev-parse HEAD` over a clean tree and `git stash create` over a dirty one, anchored at `refs/flow/candidate/<TICKET>` so nothing collects it. The other three are written at `## Close`, **only when the phase actually advances**, work-level and in the current `mrs[]` entry: `reviewed_sha` is the candidate that was actually read, `fixed_sha` is `HEAD` after that round's own fixes (empty when it applied none), `validated_sha` is where the suite went green.
164
164
  - **`review_findings[]`**: one row per finding, after the review's dedup — `{ round, mr?, sources, severity, file, outcome }`, no finding text (that stays in `06-review.md`). `sources` lists every origin that raised it, from a closed list (`built-in` · `panel:<role>` · `reinforcement:<area>` · `sweep` · `query-duel` · `yagni` · `contract` · `idiom`); `outcome` is `fixed` · `open` · `rejected` · `discarded` · `deferred`. The same round writes one `cost[]` entry with `round`, `tier`, `effective_size` and `agents` — every pass it launched, findings or not. Only `flow record-review --file` writes them — once per round, the CLI panel's roles included — and it refuses any value outside those lists, or a source that is not among the round's `agents`: six weeks of hand-written origins had produced ~65 spellings. Rows from before that, `{ round, origin, severity, file, discarded_by_skeptic }` one per source, stay as they are. It exists so a pass can be retired on evidence: `flow yield [<repo-path>…]` reads every work those repos hold — live and `_archive/`, here and in the main checkout — and reports per origin and per size how many rounds each ran, how many findings it contributed, how many **only** it raised, and how many of those were acted on (for the older rows: not refuted by a skeptic) — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no unique accepted finding across twenty rounds at a size (XS and S pooled) and the pass comes out of the command at that size.
165
- - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or carries the number of exactly one reviewed MR/PR (squash). `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
165
+ - **`escape`** (bug works only): `{ work, ticket, commit, file, size }` — the reviewed work the root-cause commit belongs to, written by `flow escape` at `bug:investigate`'s Close, and only when the commit sits inside exactly one work's reviewed range (merge history) or names exactly one reviewed MR/PR (squash) — in its own message, or in the GitLab merge that carried it in. `flow yield` prints `escapes: <n>` under the table of that work's size: what a lighter review at that size has already let through.
166
166
  Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
167
167
  - **`respond_rounds`**: rounds of `/flow-work-respond` on an MR/PR. `/flow-work-respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
168
168
  - **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow-feat-start §3.7`, marked in progress / done by `/flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume` — which also flag an item the code delivered but the file still does not mark. `null` with no roadmap, no link, or a bug. With the project plan on (flow-core §10.1) it may also carry `milestone` and `deliverable` — the plan's ids for the deliverable whose ticket cell names this work's ticket — which the panel copies so the board hangs this console from it; absent when the ticket is in no row.
@@ -160,5 +160,6 @@ and the `done` of the table above.
160
160
  ## 3. Close
161
161
 
162
162
  Nothing to write here beyond the routing above — the phase it hands to owns the artifacts, the
163
- panel and the closing order. When the route ended the run itself (`ask` → `wait`, `blocked` → `block`,
164
- `done` → `done`), publish the panel with that `attention` (flow-core §4) and print the §3 header.
163
+ panel and the closing order. When the route ended the run itself, publish the panel (flow-core §4) —
164
+ `ask` → the question as `decision`, which raises `wait`; `blocked` → `attention: block`; `done` →
165
+ `attention: done` — and print the §3 header.
package/bin/cli.mjs CHANGED
@@ -1105,7 +1105,8 @@ async function review(argv) {
1105
1105
  // --- escape ----------------------------------------------------------------------------
1106
1106
  // A bug whose cause is a commit a flow review read is the one number that says what trimming
1107
1107
  // the review would cost. It is charged only on evidence: the commit inside exactly one
1108
- // reviewed range, or carrying the number of exactly one reviewed MR/PR. "An ancestor of what
1108
+ // reviewed range, or naming exactly one reviewed MR/PR — itself, or through the merge that
1109
+ // carried it in. "An ancestor of what
1109
1110
  // was reviewed" is not evidence — the whole history of the base is an ancestor of every
1110
1111
  // reviewed sha — and a ticket number is not either, since one ticket spans several MRs/PRs.
1111
1112
 
@@ -1130,16 +1131,40 @@ function escapeOf(argv) {
1130
1131
 
1131
1132
  const cfg = flowConfig(repo, null, null)
1132
1133
  // The MR/PR a squash commit came from, and nothing else: GitHub appends `(#N)` to the end of
1133
- // the subject, GitLab writes `See merge request <path>!N` in the body. A `(#7)` quoted
1134
- // mid-subject — a revert, a cherry-pick — names another MR/PR and charges nobody.
1134
+ // the subject, GitLab writes `See merge request <path>!N` in the body — of the squash commit
1135
+ // when it fast-forwards, of the merge carrying it when it keeps a merge commit. A `(#7)`
1136
+ // quoted mid-subject — a revert, a cherry-pick — names another MR/PR and charges nobody.
1137
+ const isAncestor = (a, b) => {
1138
+ try { execFileSync('git', ['merge-base', '--is-ancestor', a, b], { cwd: repo, stdio: 'ignore' }); return true } catch { return false }
1139
+ }
1135
1140
  const subject = git(['log', '-1', '--format=%s', commit], repo).trim()
1136
- const body = git(['log', '-1', '--format=%b', commit], repo)
1137
1141
  // A GitLab reference carries its project path, and an MR of another project with the same
1138
1142
  // number is not this one: the unit's url has to name that path too.
1143
+ const gitlabRefs = (sha) => [...git(['log', '-1', '--format=%b', sha], repo).matchAll(/See merge request (\S*)!(\d+)/g)]
1144
+ .map((m) => ({ n: m[2], path: m[1] || null }))
1139
1145
  const refs = [
1140
1146
  ...(subject.match(/\(#(\d+)\)\s*$/) ? [{ n: subject.match(/\(#(\d+)\)\s*$/)[1], path: null }] : []),
1141
- ...[...body.matchAll(/See merge request (\S*)!(\d+)/g)].map((m) => ({ n: m[2], path: m[1] || null })),
1147
+ ...gitlabRefs(commit),
1142
1148
  ]
1149
+ // GitLab squashing with a merge commit writes the reference on the merge, not on the squash
1150
+ // commit it carries. The innermost merge that brought the commit in — it reaches it through
1151
+ // its second side and not its first — and names an MR is the MR whose diff held it; a merge
1152
+ // naming none (a local merge, a back-merge) is passed over for the next one out.
1153
+ // Two processes whatever the history: a merge-commit repo, whose merges name nothing, walks
1154
+ // every merge after the commit.
1155
+ if (!refs.length) {
1156
+ const after = new Set(git(['rev-list', '--ancestry-path', `${commit}..HEAD`], repo).trim().split('\n').filter(Boolean))
1157
+ const holds = (c) => c === commit || after.has(c)
1158
+ const merges = git(['log', '--ancestry-path', '--merges', '--topo-order', '--reverse', '--format=%H %P%x00%b%x1e', `${commit}..HEAD`], repo)
1159
+ .split('\x1e').map((e) => e.trim()).filter(Boolean)
1160
+ for (const entry of merges) {
1161
+ const [head, body = ''] = entry.split('\x00')
1162
+ const [, first] = head.split(' ')
1163
+ if (holds(first)) continue
1164
+ const named = [...body.matchAll(/See merge request (\S*)!(\d+)/g)].map((m) => ({ n: m[2], path: m[1] || null }))
1165
+ if (named.length) { refs.push(...named); break }
1166
+ }
1167
+ }
1143
1168
  // `(#N)` is a GitHub pull request; on GitLab `#N` is an issue, and only `!N` is an MR.
1144
1169
  const namedBy = (url) => {
1145
1170
  const u = String(url ?? '')
@@ -1148,9 +1173,6 @@ function escapeOf(argv) {
1148
1173
  return refs.some((r) => (r.path === null && r.n === pull)
1149
1174
  || (r.path !== null && r.n === mr && u.includes(`/${r.path}/-/merge_requests/${mr}`)))
1150
1175
  }
1151
- const isAncestor = (a, b) => {
1152
- try { execFileSync('git', ['merge-base', '--is-ancestor', a, b], { cwd: repo, stdio: 'ignore' }); return true } catch { return false }
1153
- }
1154
1176
  const resolves = (ref) => Boolean(ref) && Boolean(git(['rev-parse', '--verify', '--quiet', `${ref}^{commit}`], repo).trim())
1155
1177
 
1156
1178
  // Where the reviewed branch left the base. Once merged, the base contains the reviewed sha
@@ -1421,25 +1443,40 @@ const LEGACY_SEVERITY = {
1421
1443
  nit: 'nit',
1422
1444
  }
1423
1445
 
1424
- // A panel role is whatever the repo named it; only the spelling noise is folded: a prefix
1425
- // saying which path ran it, case and spaces, and the suffixes an agent's file name adds.
1446
+ // The role an agent's own name stands for. Left unfolded, one role split across the names of
1447
+ // the agents that filled it never reaches twenty rounds under any of them.
1448
+ const ROLE_OF_AGENT = {
1449
+ testing: 'tests', 'pr-test-analyzer': 'tests',
1450
+ redteam: 'red-team', 'red-team-security': 'red-team', 'red-team-web-security': 'red-team',
1451
+ 'code-simplifier': 'simplify', simplification: 'simplify',
1452
+ 'comment-analyzer': 'comments',
1453
+ 'type-design-analyzer': 'types',
1454
+ }
1455
+ // Not a reviewer: a later round re-reading the fixes of an earlier one.
1456
+ const RE_REVIEW = /^(.*-)?(re-?review|delta|delta-review|round\d+)$/
1457
+
1458
+ // A panel role is whatever the repo named it, with the spelling noise folded — a prefix
1459
+ // saying which path ran it, case and spaces, the suffixes an agent's file name adds — and an
1460
+ // agent's own name read as the role it filled.
1426
1461
  function panelRole(raw) {
1427
1462
  let r = raw.toLowerCase().trim().replace(/\s+/g, '-')
1428
1463
  r = r.replace(/-(reviewer|hunter|verifier|audit)$/, '').replace(/-round\d+$/, '')
1429
- if (r === 'testing') r = 'tests'
1430
- if (r === 'redteam') r = 'red-team'
1431
1464
  if (/^silent(-failures?)?$/.test(r)) r = 'silent-failure'
1432
- if (r === 'code-simplifier') r = 'simplify'
1433
- return `panel:${r}`
1465
+ if (RE_REVIEW.test(r)) r = 're-review'
1466
+ return `panel:${ROLE_OF_AGENT[r] ?? r}`
1434
1467
  }
1435
1468
 
1436
1469
  function canonicalOrigin(raw) {
1437
1470
  const o = String(raw ?? '').trim()
1438
1471
  if (!o) return 'unknown'
1439
1472
  if (o.startsWith('reinforcement:')) return o.toLowerCase()
1440
- const bare = o.replace(/^(§panel:|cli-panel:|cli:|panel:)/, '')
1473
+ // `<plugin>:<agent>` is the agent, whichever plugin shipped it.
1474
+ const bare = o.replace(/^(§panel:|cli-panel:|cli:|panel:)/, '').split(':').pop()
1441
1475
  if (BUILT_IN.has(bare)) return 'built-in'
1442
1476
  if (SECTION_ORIGINS[bare]) return SECTION_ORIGINS[bare]
1477
+ // A pass written as its section with a word after it: `§5.5 idiom`, `3.5 targeted`.
1478
+ const section = bare.match(/^§?(\d+(?:\.\d+)?)[\s-]/)?.[1]
1479
+ if (section && SECTION_ORIGINS[`§${section}`]) return SECTION_ORIGINS[`§${section}`]
1443
1480
  return panelRole(bare)
1444
1481
  }
1445
1482
 
@@ -1780,14 +1817,26 @@ function stepLines(steps) {
1780
1817
  function readPanelInput(work, warn) {
1781
1818
  const p = join(work, 'panel-input.json')
1782
1819
  if (!existsSync(p)) return { input: {} }
1783
- let input
1784
- try { input = JSON.parse(readFileSync(p, 'utf8')) } catch (e) { return { error: `\`${p}\` is not readable JSON (${e.message})` } }
1820
+ let raw, input
1821
+ try { raw = readFileSync(p, 'utf8'); input = JSON.parse(raw) } catch (e) { return { error: `\`${p}\` is not readable JSON (${e.message})` } }
1785
1822
  if (!input || typeof input !== 'object' || Array.isArray(input)) return { error: `\`${p}\` must hold one JSON object` }
1823
+ // The hook copies the input aside when the user answers a question. While the input is still
1824
+ // that copy, its decision has been answered: neither it nor its `wait` claims anyone. The
1825
+ // agent's file is never rewritten — the next one it writes is simply newer than the answer.
1826
+ let answered = false
1827
+ try { answered = readFileSync(join(work, 'panel-answered.json'), 'utf8') === raw } catch {}
1828
+ if (answered) { delete input.decision; if (input.attention === 'wait') delete input.attention }
1786
1829
  for (const k of Object.keys(input)) if (!PANEL_INPUT_KEYS.includes(k)) { warn(`panel-input.json: \`${k}\` is not a field — ignored (fields: ${PANEL_INPUT_KEYS.join(', ')})`); delete input[k] }
1787
1830
  if (input.attention != null && !PANEL_ATTENTION.includes(input.attention)) {
1788
1831
  warn(`panel-input.json: attention \`${input.attention}\` ignored — one of ${PANEL_ATTENTION.join(' · ')}, or null`)
1789
1832
  delete input.attention
1790
1833
  }
1834
+ // `wait` says the user is being asked, and `decision` is what asks: a written `wait` with no
1835
+ // decision behind it is a question already answered that nobody took back.
1836
+ if (input.attention === 'wait' && !input.decision) {
1837
+ warn('panel-input.json: attention `wait` ignored — only a `decision` claims the user')
1838
+ delete input.attention
1839
+ }
1791
1840
  if (input.blocks != null && !Array.isArray(input.blocks)) { warn('panel-input.json: `blocks` must be a list — ignored'); delete input.blocks }
1792
1841
  if (input.labels != null) {
1793
1842
  if (typeof input.labels !== 'object' || Array.isArray(input.labels)) { warn('panel-input.json: `labels` must be an object — ignored'); delete input.labels }
@@ -2249,8 +2298,9 @@ Claude Code, Codex CLI and zcode have their own marketplaces:
2249
2298
  answers in forge-state.json for the renders that follow it. meta.json is never written.
2250
2299
 
2251
2300
  "escape" tells whether the commit a bug investigation blamed went through a flow review:
2252
- it must sit inside exactly one work's reviewed range (merge history), or carry the number
2253
- of exactly one reviewed MR/PR in its subject (squash). Then it is recorded in this branch's
2301
+ it must sit inside exactly one work's reviewed range (merge history), or name exactly one
2302
+ reviewed MR/PR (squash) — in its own message, or in the GitLab merge that carried it in.
2303
+ Then it is recorded in this branch's
2254
2304
  work and "yield" counts it; anything less is said and recorded nowhere.
2255
2305
 
2256
2306
  "yield" reads every work of the repos named (default: this one) — live and archived,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-workflows",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
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.116.0",
6
+ "version": "0.117.0",
7
7
  "author": {
8
8
  "name": "Alberto Vioque",
9
9
  "email": "mashware@gmail.com"
@@ -5,6 +5,49 @@ 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.117.0 — The review count reads one name per reviewer, and GitLab squash merges count their escapes · 2026-11-17
9
+
10
+ **In short**
11
+ - **`flow yield` counts each reviewer once, whatever its agent was called.** Over four real repos the same role
12
+ showed up under three or four names (`comment-analyzer`, `pr-review-toolkit:comment-analyzer`, `comments`…),
13
+ so its rounds were split and almost no role ever reached the twenty needed to judge it. Now they add up: the
14
+ same 192 works judge three roles at XS+S where before they judged two, and `comments` sits at 19 rounds with
15
+ 23 findings only it raised.
16
+ - **A bug whose commit went through a GitLab MR merged with "squash + merge commit" is now charged to that
17
+ review.** GitLab writes `See merge request …!N` on the merge, not on the squash commit, so `flow escape` found
18
+ nothing — one real bug in a real repo came back "inside no reviewed range" although two reviews had read it.
19
+ A bug already investigated keeps no escape until `escape` is run again from its branch.
20
+
21
+ `yield` folds, on read, a plugin namespace (`<plugin>:<agent>` is the agent), an agent's own name into the role
22
+ it filled (`pr-test-analyzer` → `tests`, `type-design-analyzer` → `types`, `red-team-web-security` → `red-team`…),
23
+ a section number followed by a word (`§5.5 idiom`, `3.5 targeted`) into its pass, and every re-review round
24
+ (`rereview`, `delta-reviewer`, `built-in-rereview`…) into `panel:re-review`, which is no reviewer. Every
25
+ spelling it folds is still listed under "Spellings read as". When the suspected commit names no MR/PR itself,
26
+ `escape` reads the innermost merge that brought it in through its second side and names a GitLab MR; a merge
27
+ naming none — a local merge, a back-merge of the base — is passed over, so a base commit back-merged into a
28
+ branch is never charged to that branch's MR.
29
+
30
+ ## v0.116.1 — An answered question stops claiming you on the panel · 2026-11-12
31
+
32
+ **In short**
33
+ - **Answering the agent's question clears it from the live panel, the board and the control-room card at once.**
34
+ Before, the panel kept saying "waiting for you" until the agent remembered to rewrite its notes — in one real
35
+ session, 18 minutes after the answer, while the agent worked on.
36
+ - **Only a real answer does it.** A question dismissed, rejected or left unanswered (the 60-second timeout)
37
+ leaves the panel as it was; the rest of what the panel said — what is running, what is next, the blockers —
38
+ stays.
39
+ - **The panel claims you only while a decision is on it.** A `wait` written by hand with no decision behind it
40
+ no longer raises the flag.
41
+
42
+ The plugin's hook, which already repainted the panel when the work's files changed, now also watches the
43
+ question tool: when Claude Code's `AskUserQuestion` (or Codex's `request_user_input`) comes back with a real
44
+ answer — read from the tool's response alone — and the panel input holds a `decision`, it copies the input aside
45
+ as `panel-answered.json` and renders, through `panel.publish_cmd` too. While the input is still that copy,
46
+ `flow-workflows panel` leaves its `decision` and `wait` out; the agent's own file is never rewritten, so the next
47
+ one it writes asks again. Any other tool call costs what it did. The CLI no longer honours `attention: "wait"`
48
+ without a `decision` (it says so on stderr), and flow-core stops suggesting the agent write `attention` at all:
49
+ `block` and `done` are the only values it writes by hand.
50
+
8
51
  ## v0.116.0 — The board shows the roadmap, and each console hangs from its deliverable · 2026-11-12
9
52
 
10
53
  **In short**