flow-workflows 0.79.0 → 0.81.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 (35) hide show
  1. package/adapters/codex/CORE.md +22 -38
  2. package/adapters/codex/skills/flow-bug-investigate/SKILL.md +1 -6
  3. package/adapters/codex/skills/flow-bug-review/SKILL.md +3 -3
  4. package/adapters/codex/skills/flow-doctor/SKILL.md +0 -3
  5. package/adapters/codex/skills/flow-feat-design/SKILL.md +32 -42
  6. package/adapters/codex/skills/flow-feat-review/SKILL.md +14 -15
  7. package/adapters/codex/skills/flow-work-README/SKILL.md +3 -4
  8. package/adapters/codex/skills/flow-work-resume/SKILL.md +0 -1
  9. package/adapters/gemini/CORE.md +22 -38
  10. package/adapters/gemini/commands/flow/bug/investigate.toml +1 -6
  11. package/adapters/gemini/commands/flow/bug/review.toml +3 -3
  12. package/adapters/gemini/commands/flow/doctor.toml +0 -3
  13. package/adapters/gemini/commands/flow/feat/design.toml +32 -42
  14. package/adapters/gemini/commands/flow/feat/review.toml +14 -15
  15. package/adapters/gemini/commands/flow/work/README.toml +3 -4
  16. package/adapters/gemini/commands/flow/work/resume.toml +0 -1
  17. package/adapters/hermes/CORE.md +22 -38
  18. package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +1 -6
  19. package/adapters/hermes/skills/flow-bug-review/SKILL.md +3 -3
  20. package/adapters/hermes/skills/flow-doctor/SKILL.md +0 -3
  21. package/adapters/hermes/skills/flow-feat-design/SKILL.md +32 -42
  22. package/adapters/hermes/skills/flow-feat-review/SKILL.md +14 -15
  23. package/adapters/hermes/skills/flow-work-README/SKILL.md +3 -4
  24. package/adapters/hermes/skills/flow-work-resume/SKILL.md +0 -1
  25. package/adapters/opencode/CORE.md +22 -38
  26. package/adapters/opencode/commands/flow-bug-investigate.md +1 -6
  27. package/adapters/opencode/commands/flow-bug-review.md +3 -3
  28. package/adapters/opencode/commands/flow-doctor.md +0 -3
  29. package/adapters/opencode/commands/flow-feat-design.md +32 -42
  30. package/adapters/opencode/commands/flow-feat-review.md +14 -15
  31. package/adapters/opencode/commands/flow-work-README.md +3 -4
  32. package/adapters/opencode/commands/flow-work-resume.md +0 -1
  33. package/package.json +1 -1
  34. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  35. package/plugins/flow/CHANGELOG.md +34 -0
@@ -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.79.0`.** Compare it once, at the start of the session, against
19
+ **This file belongs to flow `0.81.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
@@ -29,12 +29,9 @@ a command relies on is simply absent in that session, and nothing else will repo
29
29
  - **Look before you read.** The first thing a phase does about configuration is list what is there:
30
30
  `ls <root>/FLOW*.md` (the root being the one the next bullet resolves). One call, and it is not
31
31
  optional — **an overlay you did not list is an overlay you did not read**, and nothing downstream
32
- will notice. This is not a hypothetical: every command below, and every artifact they write,
33
- refers to the effective configuration as "`FLOW.md`", which is a file that exists, so reading it
34
- and stopping feels finished. Two real sessions in a row read the base in full and never went
35
- looking for the overlay sitting beside it — the models it set were silently the defaults, and
36
- both runs reported the keys as unset with no way to tell that apart from a repo that never set
37
- them. **Name the files this listing found the first time a phase reports any configured value**,
32
+ will notice. Every command and artifact calls the effective configuration "`FLOW.md`", a file that
33
+ exists, so reading it and stopping feels finished — and a missed overlay reports its keys as unset,
34
+ indistinguishable from a repo that never set them. **Name the files this listing found the first time a phase reports any configured value**,
38
35
  so a missed overlay is visible in the artifact rather than invisible everywhere.
39
36
  - Read `FLOW.md` at the repo root as the base, then the optional overlay for the harness running
40
37
  this command: `FLOW.claude.md`, `FLOW.codex.md`, `FLOW.opencode.md`, `FLOW.gemini.md`,
@@ -67,11 +64,8 @@ a command relies on is simply absent in that session, and nothing else will repo
67
64
  - **A fenced block in a FLOW file is an example, and an example is not configuration.** These
68
65
  files are prose with keys in them, and the rule that decides what a key *is* — a `- key:` line
69
66
  under a `## section` — knows nothing about triple backticks. So a block written to be pasted
70
- ("add this to try it once") was read as the configuration it illustrates, for as long as it sat
71
- there. It happened in a real repo: `agents.exec_cmd` came from the fenced example of a file whose
72
- prose argued at length that it was deliberately unset, and every review round took the one-shot
73
- path that prose warned against — with nothing anywhere to say so, because the file and the
74
- configuration disagreed while both looked right. **Skip fenced regions when you read a FLOW
67
+ ("add this to try it once") would be read as the configuration it illustrates, while the prose
68
+ around it says otherwise and nothing reports the disagreement. **Skip fenced regions when you read a FLOW
75
69
  file**; `flow-workflows` does the same, so the two of you resolve the same config.
76
70
  - Merge by section and key. A key present in the active overlay replaces the base value; a key
77
71
  absent there inherits the base. **A present-but-empty overlay key masks the base** and resolves
@@ -92,7 +86,7 @@ a command relies on is simply absent in that session, and nothing else will repo
92
86
  alongside whatever it was already asking. Resolve the destination by the ownership rule below.
93
87
  Never a question of its own, never a key off the list, and at most **one key per work** — the
94
88
  second one waits for the next work or for `/flow:init`.
95
- 3. `guided`/`auto` → take the default and **record** it: one line in the phase artifact as today,
89
+ 3. `guided`/`auto` → take the default and **record** it: one line in the phase artifact,
96
90
  plus an entry in `meta.json.defaults_used[]` — `{ "key": "agents.security", "default":
97
91
  "general-purpose", "phase": "review" }`. Asking here would break the never-a-question contract
98
92
  (§2); recording keeps the decision readable afterwards, and `/flow:doctor` aggregates it.
@@ -119,8 +113,7 @@ a command relies on is simply absent in that session, and nothing else will repo
119
113
  the consolidation appends to `KNOWLEDGE.md` at the repo root. Per-call timeout
120
114
  `knowledge.timeout_s` (empty = 2 s); a failure or timeout → continue without it, silently.
121
115
  **How a consolidation runs** (`ship`, `postmortem`, `abandon`, and the offer in `/flow:work:status`
122
- when `read_staging` has entries). No role set at all → say so in one line and stop; nothing here is
123
- worth a command of its own, which is why there is no longer one:
116
+ when `read_staging` has entries). No role set at all → say so in one line and stop:
124
117
 
125
118
  1. **Read the staging** for this branch with `knowledge.read_staging`; the role empty → the "why"
126
119
  findings already written in this work's artifacts (`03-design.md` ADR-light and challenges,
@@ -270,7 +263,7 @@ right now. **Any progress line you were about to type into the chat is a panel u
270
263
  **Two transports, one document.** When the tools `panel_set` / `panel_patch` / `panel_get` are
271
264
  available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
272
265
  **stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
273
- all. When they are not there, write the file exactly as before (§4.3). No work folder (lightweight
266
+ all. When they are not there, write the file (§4.3). No work folder (lightweight
274
267
  `respond`/`green`) → nothing to publish, either way.
275
268
 
276
269
  **Look for them before you conclude they are missing**, once per session, in pre-flight. A harness
@@ -413,8 +406,7 @@ single largest token cost of a work, so every work carries a short handoff:
413
406
  MR/PR of `04-mr-plan.md`; `review` opens the design's contracts and the implementation log;
414
407
  `ship` opens the brief and the review verdict. A summary that does not answer the question you
415
408
  have is the cue to open the artifact — never a licence to guess.
416
- - Missing summary (a work started before this rule) → read the artifacts as before, write the
417
- summary at your Close.
409
+ - Missing summary → read the artifacts, write the summary at your Close.
418
410
  - **Name the phase, never the command.** An artifact outlives the session that wrote it and may be
419
411
  resumed from a different agent, where the same phase is invoked under another name. Write the
420
412
  phase — `validate`, `review`, `ship #2` — not the invocation. Applies to `00-summary.md`,
@@ -449,7 +441,7 @@ around each of its own findings to work out which changes are its doing, and how
449
441
  looks clean is clean by luck. **The parent thread is a writer too**: applying a round's fixes while
450
442
  its agents are still reading is the same collision, from the side nobody counts.
451
443
 
452
- So a round that contains a writer is not one round. Readers fan out freely, as they always did;
444
+ So a round that contains a writer is not one round. Readers fan out freely;
453
445
  writers go one at a time, each either alone or in a worktree of its own, and the readers sit
454
446
  entirely before them or entirely after them. The parent's own edits wait until the round is
455
447
  consolidated. Ordering costs wall clock and the phase says so in one line — a reading nobody can
@@ -491,8 +483,7 @@ Dropping a silent agent is always allowed, and always reported (`N/M` reported).
491
483
  no deadline is what costs a session.
492
484
 
493
485
  **The budget belongs to the command, not to the round.** `agents.fanout_max` caps *one* parallel
494
- round; nothing capped what a command spends across all of its rounds, and the phases that fan out
495
- compose: a review can run a panel, then area reinforcements, then a coverage sweep that relaunches
486
+ round, and the phases that fan out compose: a review can run a panel, then area reinforcements, then a coverage sweep that relaunches
496
487
  the panel, then one skeptic per finding — each round inside its own cap and the command an order of
497
488
  magnitude over what anyone intended.
498
489
 
@@ -557,15 +548,13 @@ must *react to* mid-wait is not a wait at all: it is the work, and it stays here
557
548
  ### 6.6 — Which agent a role resolves to
558
549
 
559
550
  **The harness already tells you which agents are installed**, each with a line on what it is for,
560
- and choosing the one that fits a piece of work is something you do well without being told. A rule
561
- that answers every empty role with `general-purpose` throws that away: a repo with a frontend
562
- specialist installed and no `agents.frontend` got a generalist told to act like one. So wherever a
551
+ and choosing the one that fits a piece of work is something you do well without being told. Answering every empty role with `general-purpose` throws that away. So wherever a
563
552
  command says *"`agents.<role>`, empty → `Agent general-purpose` with the role"*, it means this:
564
553
 
565
- 1. **`agents.<role>` names an agent** → that agent, as always.
554
+ 1. **`agents.<role>` names an agent** → that agent.
566
555
  2. **Empty** → the installed agent whose description fits the role **and this work's stack** best —
567
556
  read the list your harness gives you, never a guess at a name. None fits clearly →
568
- `general-purpose` with the role in the prompt, as before. An agent that fits the role but not the
557
+ `general-purpose` with the role in the prompt. An agent that fits the role but not the
569
558
  stack (a PHP reviewer on a React diff) does not fit.
570
559
 
571
560
  **`agents.selection`** decides how far your judgement reaches:
@@ -711,11 +700,11 @@ one more thing the user has to decide about.
711
700
  "title": "one line, what would be done",
712
701
  "why": "one line, why it was parked and why it still matters",
713
702
  "source": "design" | "plan" | "build" | "validate" | "fix" | "postmortem",
714
- "status": "proposed" | "accepted" | "declined" | "logged" | "done",
703
+ "status": "proposed" | "accepted" | "in_progress" | "declined" | "logged" | "done",
715
704
  "ticket": null, "work": null, "note": "" }
716
705
  ```
717
706
 
718
- The artifact keeps its human-readable section exactly as before, with the `F<n>` id in front of each
707
+ The artifact keeps its human-readable section, with the `F<n>` id in front of each
719
708
  row so the prose and the record never drift. **The record is the addition, not a replacement**: a
720
709
  reader of `05-implementation.md` still sees the ideas in context.
721
710
 
@@ -750,8 +739,8 @@ at `ship`'s Close, when the work is done and the user can see the whole set.
750
739
 
751
740
  **A skeptic sorts them before the user sees them.** `/flow:*:review` already refuses to hand over an
752
741
  unverified finding: its §6 gives each ambiguous one to a skeptic whose job is to *refute* it, burden
753
- of proof on the finding. Deferred work reached the user through no filter at all, judged only by the
754
- phase that parked it — the one party that cannot judge it, having just found it. So at Close, when
742
+ of proof on the finding. Deferred work needs the same filter: the phase that parked it is the one party that cannot judge
743
+ it, having just found it. So at Close, when
755
744
  **3 or more** entries are still `proposed`, they go to a skeptic first (grouped into at most
756
745
  `agents.fanout_max` briefs, the ceilings of §6 unchanged; **fewer than 3 → no agent**, the command
757
746
  applies the bar itself):
@@ -778,15 +767,10 @@ Then, and only then, the survey:
778
767
  **Not worth it** · **Later**. The `title` and `why` are the entire prompt. **`decision` entries
779
768
  are asked as their product question** — they never go to the skeptic, a question's value not being
780
769
  a thing to refute — and sit outside the ceiling.
781
- - **`tooling` asks nothing.** `logged`, and a count on screen. Asking **Log it** about a lint floor
782
- with slack in it was one question too many.
770
+ - **`tooling` asks nothing.** `logged`, and a count on screen.
783
771
  - **Not worth it** → `declined`, with the reason if given. Never asked again.
784
772
  - **`logged` is a status, not a destination.** The entry stays exactly where it already is — in
785
- `meta.json.followups[]` and in its artifact section — and no file is written anywhere. This used
786
- to append a line to a versioned debt log, one per repo; **that file is gone**. No command read it,
787
- `status` and `daily` excluded it on purpose, and it duplicated a record the work already keeps
788
- forever, so it grew without ever being triaged. A note nobody reads is not a lighter obligation
789
- than a ticket, it is the same obligation with the reader removed. If a gap in the machinery is
773
+ `meta.json.followups[]` and in its artifact section — and no file is written anywhere. If a gap in the machinery is
790
774
  worth someone's time, it is worth a ticket; if it is not, the record in the work is where it ends.
791
775
  - **A `decision` answered** → the answer is written into the artifact that owns it and the entry
792
776
  becomes `done` with the answer in `note`. Deferred again → stays `proposed`.
@@ -878,7 +862,7 @@ largest saving the review has.
878
862
 
879
863
  **What follows from that is a temptation, and it belongs to the diff, not to the plan.** A threshold
880
864
  that buys a lighter review pays whoever lands just under it: twelve lines below 150 is a review at
881
- `medium` with no project panel and no §6 round, twelve above it is the panel. So, in every phase:
865
+ `medium`, twelve above it is one at `high`; at 600 the project panel joins. So, in every phase:
882
866
 
883
867
  **The diff reports the change; the change is never shaped to fit the number.** Never delete a
884
868
  comment, a test, a blank line or a log line, never compress readable code into fewer statements,
@@ -24,9 +24,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
24
24
 
25
25
  - Read `meta.json` and `00-summary.md`; open in full only `01-context.md`. (flow-core §5)
26
26
  - `type` is not `bug` → refuse. `size` is `XS` → suggest `/flow:bug:fix` and stop.
27
- - Require `context` in `phases_done`. A work whose `phase` is the retired `diagnose` (written before
28
- v0.53.0) is treated as having finished §1.5: read its `02-diagnose.md`, carry it into
29
- `03-investigation.md`, and go straight to §3.
27
+ - Require `context` in `phases_done`.
30
28
 
31
29
  ## 1.5 Reproduce — what is failing, before why
32
30
 
@@ -34,9 +32,6 @@ Isolate **what** fails before looking for **why**. On **S** this is the whole of
34
32
  first half and the chain is `start → investigate (reproduce only) → fix → …`; on **M/L** it is the
35
33
  ground §3 stands on. **XS** skips straight to `/flow:bug:fix`.
36
34
 
37
- *(This was the `bug:diagnose` command until v0.53.0. Reproducing and finding the cause were two commands
38
- sharing five headings, and the S-size chain already ran them back to back.)*
39
-
40
35
  1. **Focused knowledge query on the symptom.** `knowledge.search` set → 2-3 parallel queries about
41
36
  the **suspected component** (handler, worker, endpoint, module): the same root cause often
42
37
  returns wearing a different symptom. Dead-letter queue → `"DLX <handler-name>"`, `"retry policy
@@ -33,7 +33,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
33
33
  member runs its own `git diff` and opens the same files pays for that material once per agent, and
34
34
  a reviewer that spends its turns exploring has fewer left to review. **Any non-zero exit is a
35
35
  fallback, not a failure** — no CLI on the machine, a base that does not resolve, a network that
36
- cannot reach it: read the diff from git as before and carry on, once, without retrying variants.
36
+ cannot reach it: read the diff from git and carry on, once, without retrying variants.
37
37
  What is not optional is the `Review path` line of §7: a round that skipped the pack and one that
38
38
  used it are indistinguishable from the artifact otherwise, which is how a phase quietly stops
39
39
  paying for itself.
@@ -68,7 +68,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
68
68
  - **Review base**: the previous `reviewed_sha` when it is non-empty and an ancestor of the candidate, otherwise `git.default_base`, with the reason in one line. `--full` forces the whole branch.
69
69
  - **Then**: `bundle --rev <candidate_sha> --base <review base>`, and every brief names that range rather than the live tree.
70
70
 
71
- A fix is usually small enough that the delta and the branch are the same thing — which is exactly why the freeze matters more here than the scoping: a one-file fix whose round applies its own correction is the case where `reviewed_sha` used to equal `HEAD` while describing a tree nobody read.
71
+ A fix is usually small enough that the delta and the branch are the same thing — which is exactly why the freeze matters more here than the scoping: a one-file fix whose round applies its own correction is the case where recording `HEAD` as reviewed would describe a tree nobody read.
72
72
 
73
73
  ## 2. Run the code reviews
74
74
 
@@ -231,7 +231,7 @@ Cost line: count every subagent this command launched — reviewers = §2.1 buil
231
231
  - **Record *what* you reviewed, and separately what you changed after reading it** — `/flow:feat:review` §9, unchanged: `reviewed_sha` = the **candidate** of §1.5 (the revision the reviewers read, never `git rev-parse HEAD`, which by now holds this round's own fixes), and `fixed_sha` = `git rev-parse HEAD` after those fixes, empty when the round applied none. `phases_done` says a review happened; these two say on which tree and what moved afterwards, and `/flow:bug:ship §0` reads both against what is being pushed. Only when the phase advances: a review that ended in blockers reviewed nothing that stands.
232
232
  - **Record which pass found what** — `/flow:feat:review §9`, unchanged: one `meta.json.review_findings[]` entry per finding **per source** (`{ round, origin, severity, file, discarded_by_skeptic }`, no finding text), written by `flow review --record` when the CLI ran the panel and by this Close when the agentic panel did. `flow cost` reads them back per origin, and the retirement rule is the same: a pass with no exclusive surviving finding across twenty reviews comes out of the command.
233
233
  - **Record what the agents missed** — `/flow:feat:review §9`, unchanged: surviving findings in a category a panel member or named `agents.<role>` owns and did not report → `meta.json.agent_lessons[]` rows (flow-core §6.7), asking nothing. A fix is where this pays most: the defect already reached production once, and the reviewer that owns its category let it.
234
- - **Stage what the review taught** (`knowledge.stage` set; silence by default). Review is where a project teaches the most and, until now, the one phase that never staged — a work with three review rounds and seventeen blockers produced zero knowledge cards because nothing asked for them while they were in context. Candidates are findings about the **domain or the codebase's real behaviour**, not about this diff: a library that does other than its name says, a test disguise that kept the suite green over a live defect, a module rule the reviewers had to cite from its own prose, a measurement. A blocker fixed here is not knowledge; *why it was written wrong* may be. Same evidence rule as `/flow:feat:design` §8 — one line of evidence per finding or it is not staged. One call per finding, one line to the user («Staged N finding(s) for `postmortem`/`ship`»). Never `knowledge.save` here.
234
+ - **Stage what the review taught** (`knowledge.stage` set; silence by default). Review is where a project teaches the most, and this is the only moment its findings are in context. Candidates are findings about the **domain or the codebase's real behaviour**, not about this diff: a library that does other than its name says, a test disguise that kept the suite green over a live defect, a module rule the reviewers had to cite from its own prose, a measurement. A blocker fixed here is not knowledge; *why it was written wrong* may be. Same evidence rule as `/flow:feat:design` §8 — one line of evidence per finding or it is not staged. One call per finding, one line to the user («Staged N finding(s) for `postmortem`/`ship`»). Never `knowledge.save` here.
235
235
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
236
236
  - Stop body (after the flow-core §3 header): the findings that survived and what you did with each, plus the same Cost line as the Summary: "- Cost: <n>/<budget_max> subagents launched (<k> reviewers · <m> reinforcements · <s> skeptics), tier <light|proportional|full>".
237
237
  - **Autonomy handoff.** Only without blockers — with blockers, stop in every mode. **M/L**: `manual` → propose `/flow:bug:postmortem` with a single `AskUserQuestion`; `guided`/`auto` → chain into it in this same turn. **XS/S**: the next step is `ship`, which pushes and opens the MR/PR — a hard gate in **every** mode: stop here and propose `/flow:bug:ship` with a single `AskUserQuestion`, never chaining into it.
@@ -43,9 +43,6 @@ Print this **before** the environment checks: a key nobody set is the commonest
43
43
  below looks broken. Read against `examples/FLOW.template.md` — do not invent keys, and do report
44
44
  documented keys absent from the effective configuration (the "empty → fallback" rows).
45
45
 
46
- **This was the `config` command until v0.53.0.** One question — *what will the flow do in this repo* —
47
- had two commands answering different halves of it.
48
-
49
46
  ### 1.5.1 Effective config, per section
50
47
 
51
48
  For **every** documented key in `examples/FLOW.template.md`, one row:
@@ -23,7 +23,7 @@ Technical design phase. **Still no production code is written.** Opens the optio
23
23
  ## 1. Pre-flight
24
24
 
25
25
  - Load `meta.json` by current branch. Missing → ask the user to start with `/flow:feat:start`.
26
- - Read `meta.json` and `00-summary.md`; open in full only `01-context.md` (ticket, decisions, contracts received), and `02-brainstorm.md` when a work started before v0.53.0 has one — its options are §1.5's output, already done. (flow-core §5)
26
+ - Read `meta.json` and `00-summary.md`; open in full only `01-context.md` (ticket, decisions, contracts received). (flow-core §5)
27
27
  - `size` is `XS` → suggest jumping to `/flow:feat:build` and stop unless the user insists.
28
28
 
29
29
  ## 1.5 Approaches — open the option space first (M/L)
@@ -32,13 +32,10 @@ Design that starts from the first idea is design that never had a second one. **
32
32
  section; XS and S skip it** and go straight to §2 — the cost does not pay on a change whose shape is
33
33
  obvious.
34
34
 
35
- *(This was the `feat:brainstorm` command until v0.53.0: a command whose whole output only this one ever
36
- read.)*
37
-
38
35
  **No code, and no design yet.** The output of this section is a ranked set of options and one chosen
39
36
  approach; §3 onwards designs *that* approach.
40
37
 
41
- ### 1.5.1 Focused knowledge query
38
+ ### 1.5.1 Focused knowledge query, then the inventory
42
39
 
43
40
  `knowledge.search` set → 2-3 parallel queries on the **concept or pattern** the feature covers, not
44
41
  its title (`/flow:feat:start` already queried that): tracking → `"tracking deduplication"`,
@@ -46,6 +43,11 @@ its title (`/flow:feat:start` already queried that): tracking → `"tracking ded
46
43
  `"attachment handler"`, `"tax rules integration"`. Two seconds, then continue regardless. Hits go
47
44
  under "Additional domain context" in §5's template.
48
45
 
46
+ **Then the inventory.** Run §3's prior inventory **now**, before any approach is proposed, and keep
47
+ its result for `03-design.md`'s "## What already exists". An approach proposed without it reinvents
48
+ what the repository already has, and a lens whose only job was to go and look for it spends an
49
+ agent on what one search answers for every advisor at once. §3 is then already done.
50
+
49
51
  ### 1.5.2 Panel or single agent?
50
52
 
51
53
  - **M or L**, in `manual`: offer the **parallel approach panel** with `AskUserQuestion` ("Generate
@@ -54,11 +56,14 @@ under "Additional domain context" in §5's template.
54
56
  panel, note it in one line of `03-design.md`, go to §1.5.3.
55
57
  - Declined, or the user insisted on running this on S → §1.5.4.
56
58
 
57
- ### 1.5.3 Approach panel (parallel fan-out — LLM-council pattern)
59
+ ### 1.5.3 Approach panel (parallel fan-out, one round)
58
60
 
59
- **Launch the advisors as parallel subagents** — one per lens, single round, each blind to the others
60
- (LLM-council: independent advisors, then a chairman synthesises; a **cross-critique** round in
61
- between for **L** only).
61
+ **Launch the advisors as parallel subagents** — one per lens, a single round, each blind to the
62
+ others; then you synthesise. **There is no debate round.** Advisors that share one base model share
63
+ its blind spots: a round in which they read and attack each other tends to converge on the most
64
+ confident answer rather than surface a new one, and it costs as many agents as the first round. The
65
+ diversity is in what each lens is asked to *optimise*, and the adversarial pass is §6's challenger,
66
+ which attacks the design that was actually chosen.
62
67
 
63
68
  **How wide the fan-out goes** — `agents.fanout_max` from `FLOW.md` (empty → **4**): never more than
64
69
  that in one round, and never more than `agents.budget_max` (empty → **12**) across this whole
@@ -66,22 +71,16 @@ command run (flow-core §6); a round that does not fit is truncated and the trun
66
71
  (`3/4`). With `models.workers` and `models.agents` empty, a round of 4 or more inherits this thread's
67
72
  model — say so in one line before launching, naming the key and never a model (flow-core §1).
68
73
 
69
- | Size | Rounds |
70
- |---|---|
71
- | M | Advisors → you synthesise |
72
- | L | Advisors → cross-critique → you synthesise |
73
-
74
- **You are the chairman.** Round 1 (and round 2 on L) are subagents; the synthesis and the ranking are
75
- yours, never a subagent's — you hold the work's context and you write `03-design.md`.
74
+ **You are the chairman.** The advisors are subagents; the synthesis and the ranking are yours, never
75
+ a subagent's — you hold the work's context and you write `03-design.md`.
76
76
 
77
- **Round 1 — advisors (parallel, blind to each other).** One subagent per lens, up to `fanout_max`.
78
- M → the first three lenses; L → add `operations`, and also on a sensitive surface (authentication or
77
+ **Advisors (parallel, blind to each other).** One subagent per lens, up to `fanout_max`. M → the
78
+ first two lenses; L → add `operations`, and also on a sensitive surface (authentication or
79
79
  authorization, payments, personal data, a public contract, a migration):
80
80
 
81
81
  | Lens | Brief |
82
82
  |---|---|
83
- | `minimum` | The **smallest** approach that solves the declared use case, nothing more (strict MVP) |
84
- | `reuse` | The approach that **most reuses** existing pieces in the affected module or its neighbours |
83
+ | `minimum` | The **smallest** approach that solves the declared use case, built on what the inventory found before anything new (strict MVP) |
85
84
  | `reframe` | **Challenge the premise**: what if the problem is solved without building what was asked, or somewhere else? |
86
85
  | `operations` | The most production-solid approach (observability, integration failure, data at scale) |
87
86
 
@@ -89,31 +88,22 @@ Each advisor gets this brief, with its lens substituted:
89
88
 
90
89
  > Propose ONE approach to solve ticket `<TICKET>`, from this lens: `<lens brief>`. Read
91
90
  > `.claude/work/<TICKET>/01-context.md` for context and the effective FLOW configuration (base plus
92
- > active harness overlay) for project conventions. Do not
91
+ > active harness overlay) for project conventions. What already exists in the repository:
92
+ > `<the §1.5.1 inventory>` — propose a new piece only where nothing there fits. Do not
93
93
  > write code. Be specific about real modules and layers of this project. Report: name, what it is
94
94
  > (one sentence), modules/layers affected, main risk, and why it could be a bad idea. Under 250 words.
95
95
  > **Write that same answer to `.claude/work/<TICKET>/approaches/<lens>.md` before you reply** — the
96
96
  > file is the deliverable and the reply is a copy of it.
97
97
 
98
- **Round 2 — cross-critique (L only, parallel).** Each advisor receives the full set and attacks the
99
- *others* from its own lens:
100
-
101
- > You are the "`<lens>`" advisor. The approaches proposed for `<TICKET>` are in
102
- > `.claude/work/<TICKET>/approaches/` — read them all, plus `.claude/work/<TICKET>/01-context.md`.
103
- > From your lens (`<lens brief>`), critique the
104
- > OTHER approaches — not your own. For each one name its single biggest flaw for THIS project, or
105
- > "none". Then say which is strongest and which weakest, and why. Be concrete and grounded in the
106
- > project; do not invent flaws to fill space. **Write your critique to
107
- > `.claude/work/<TICKET>/approaches/critique-<lens>.md` before you reply.**
108
-
109
- **Round 3 — you synthesise.** A reply that arrived is already in your context and its file adds
98
+ **Then you synthesise.** A reply that arrived is already in your context and its file adds
110
99
  nothing — **open only the files of the lenses that did not answer**, and only then. Rank the
111
- approaches best to worst *for this case* (project fit and
112
- simplicity, not generic merit), weighing the fatal flaws the critique surfaced. State explicitly
113
- where the advisors **agreed** and where they **disagreed** — the disagreement is the useful part.
100
+ approaches best to worst *for this case* (project fit and simplicity, not generic merit), weighing
101
+ each one's own "why it could be a bad idea" against the others' — rank on substance, not on which
102
+ advisor wrote best. State explicitly where the advisors **agreed** and where they **disagreed** —
103
+ the disagreement is the useful part.
114
104
 
115
- `agents.fanout_tool` set → run the rounds through that tool instead of plain parallel subagents; the
116
- rounds, the briefs and the ceiling do not change.
105
+ `agents.fanout_tool` set → run the round through that tool instead of plain parallel subagents; the
106
+ lenses, the briefs and the ceiling do not change.
117
107
 
118
108
  **A round that answers nothing is read off disk before it is written off** (flow-core §6). The
119
109
  advisors write their files first and reply second, so `ls .claude/work/<TICKET>/approaches/` settles
@@ -121,15 +111,15 @@ what actually happened: a file there is an answer that got lost in transit, and
121
111
  it without spending a single agent. Only a lens with no file is empty — **it is asked once for its
122
112
  answer and then dropped, never relaunched**, because an empty result is as often a truncated report
123
113
  as an advisor with nothing to say, and a relaunched round is paid for twice out of one
124
- `agents.budget_max`. Synthesise from those that answered and record `N/M`. An empty critique round
125
- → rank from the approaches alone.
114
+ `agents.budget_max`. Synthesise from those that answered and record `N/M`.
126
115
 
127
116
  ### 1.5.4 Single agent (the S case, or a declined panel)
128
117
 
129
118
  Launch a `general-purpose` subagent with this short, self-contained brief:
130
119
 
131
120
  > Generate 3-5 distinct approaches to solve `<title>` following the project conventions (see
132
- > the effective FLOW configuration and `.claude/work/<TICKET>/01-context.md`). For each: a
121
+ > the effective FLOW configuration and `.claude/work/<TICKET>/01-context.md`), building on what
122
+ > already exists: `<the §1.5.1 inventory>`. For each: a
133
123
  > one-sentence description,
134
124
  > modules/layers affected, main risk, and why it could be a bad idea. Do not write code. Report in
135
125
  > markdown, under 400 words.
@@ -162,7 +152,7 @@ A sensitive domain (payments, authentication, tracking) → launch **in parallel
162
152
 
163
153
  ## 3. Prior inventory (reuse before creating)
164
154
 
165
- **Before** launching the design subagents, list what the feature needs that **already exists** in code or DB. Launch an `Agent` with `subagent_type: Explore`:
155
+ **M/L already ran this in §1.5.1** — reuse that result and skip to §4. XS/S: **before** launching the design subagents, list what the feature needs that **already exists** in code or DB. Launch an `Agent` with `subagent_type: Explore`:
166
156
 
167
157
  > For feature `<title>` (see `.claude/work/<TICKET>/01-context.md`), search the repo for related pieces that already exist and could be reused: domain entities, value objects, repositories, services, events, columns or tables, CQRS commands/queries, and similar endpoints. Do not propose design — only list what is found with one line each and its location. If the feature mentions concepts like `<concept1>`, `<concept2>`, search for those specifically.
168
158
 
@@ -36,7 +36,7 @@ Mandatory review phase. **`/flow:feat:ship` cannot run without passing through h
36
36
  member runs its own `git diff` and opens the same files pays for that material once per agent, and
37
37
  a reviewer that spends its turns exploring has fewer left to review. **Any non-zero exit is a
38
38
  fallback, not a failure** — no CLI on the machine, a base that does not resolve, a network that
39
- cannot reach it: read the diff from git as before and carry on, once, without retrying variants.
39
+ cannot reach it: read the diff from git and carry on, once, without retrying variants.
40
40
  What is not optional is the `Review path` line of §8: a round that skipped the pack and one that
41
41
  used it are indistinguishable from the artifact otherwise, which is how a phase quietly stops
42
42
  paying for itself.
@@ -65,7 +65,7 @@ Mandatory review phase. **`/flow:feat:ship` cannot run without passing through h
65
65
 
66
66
  ### 1.5 Freeze what you are about to read, and resolve what to compare it against
67
67
 
68
- Two questions, answered here and nowhere later: **which tree** this round reads, and **against which base**. Both used to be answered implicitly — by the checkout as it happened to stand at each moment, and by `git.default_base` always — and both answers were wrong in a way no artifact could show.
68
+ Two questions, answered here and nowhere later: **which tree** this round reads, and **against which base**. Neither is implicit: the checkout changes while the round runs, and `git.default_base` is not always the right base.
69
69
 
70
70
  **The candidate.** A round applies its own fixes; the README's own first-minute example is *"3 reviewers, one finding — fixed"*. So "the working tree" is a different tree for the reviewer that read it first, for the skeptic that read it last, and for the `git rev-parse HEAD` taken at §9 — which by construction contains code no reviewer ever saw, and which `/flow:feat:ship §1` then compares against `HEAD` and finds equal. Resolve one revision before §2 launches anything:
71
71
 
@@ -75,11 +75,11 @@ Two questions, answered here and nowhere later: **which tree** this round reads,
75
75
  - Anchor it so it cannot be collected: `git update-ref refs/flow/candidate/<TICKET> <sha>`. A `stash create` object is unreferenced, and a candidate the `ship` gate cannot resolve is a gate that reports nothing. The ref is local, never pushed, and `/flow:feat:ship §6.5` deletes it.
76
76
  - Write `candidate_sha` to `meta.json` — work-level and in the current `mrs[]` entry — **in this pre-flight**. A candidate recorded after the reading is not a freeze.
77
77
 
78
- **The review base.** `reviewed_sha` already records the tree the last passing review read, and `ship` trusts it enough to stop a push — yet the review itself never read it, so a second review re-reads every line the first one cleared, and §2.0 resolves the tier on the accumulated total: a 30-line delta on a 900-line branch reviewed as the 900. Resolve:
78
+ **The review base.** `reviewed_sha` records the tree the last passing review read, and `ship` trusts it enough to stop a push. Reading only the delta since it keeps a second review from re-reading every line the first one cleared, and keeps §2.0 from resolving the tier on the accumulated total — a 30-line delta on a 900-line branch is a 30-line review. Resolve:
79
79
 
80
80
  - The current MR/PR's `reviewed_sha` (work-level when there is no train) when it is **non-empty** and **an ancestor of the candidate** (`git merge-base --is-ancestor <sha> <candidate>`) → that is the base.
81
81
  - Otherwise `git.default_base`. A `reviewed_sha` that is not an ancestor means history was rewritten or the branch recut; say so in one line rather than producing a nonsensical delta.
82
- - **A first review has no `reviewed_sha` and reads the whole branch**, exactly as before. The delta path only exists after a review that passed.
82
+ - **A first review has no `reviewed_sha` and reads the whole branch**. The delta path only exists after a review that passed.
83
83
  - `/flow:feat:review --full` ignores `reviewed_sha` and reads the branch on demand.
84
84
  - **Fall back to `git.default_base` and say why** when either holds, because a delta cannot see how it interacts with what was cleared before: the delta touches a file the previous review left a finding on, or it changes an external contract copied under `/flow:feat:build §2.0bis`.
85
85
 
@@ -93,7 +93,7 @@ Scope for every reviewer: **the candidate revision of §1.5, against the review
93
93
 
94
94
  **The CLI resolves it; you obey the output and record any deviation.** `npx flow-workflows@<version> tier --harness gemini --rev <candidate_sha> --base <review base>` prints, from the config it already parses: changed lines over the §1.5 range, diff size, `meta.json.size`, **effective size** (the lower of the two), the built-in `code-review` effort with and without the sensitive-surface bump, whether the panel runs, the resolved `agents.budget_max`/`fanout_max`, whether the measurement landed **within 10% under** a threshold that changed the tier, and which `quality.sensitive_paths` globs the diff matched, with the path that matched each.
95
95
 
96
- Every step of that is arithmetic, and the cost of leaving it here was never mainly the tokens: `06-review.md` recorded the tier *this agent said it derived*, so a round that eyeballed the diff and a round that measured it wrote a byte-identical artifact — on the one number in this command that carries an incentive on it. Same treatment `Review path` and `Cost:` already got, for the same reason.
96
+ Every step of that is arithmetic. A tier this agent derives itself writes the same artifact whether it measured the diff or eyeballed it — on the one number in this command that carries an incentive on it.
97
97
 
98
98
  **Copy the output verbatim** into the `Review tier` and `Effective size` lines of §8, the way `bundle --checks` copies static analysis out. A computed line, not a narrated one.
99
99
 
@@ -103,7 +103,7 @@ Every step of that is arithmetic, and the cost of leaving it here was never main
103
103
  - **Whether a matched path is a sensitive *diff*.** The bump asks what the change *does* there, not where it lives: it applies to **control flow, or the data that reaches a person, a charge or a stored record** — a new guard, a new `catch`, a changed condition, a changed value, a changed contract. It does **not** apply when the diff moves **observability alone**: a log level, a channel, a message's text, a metric, a comment. Mixed diff → not observability-only, so it bumps. **Say which of the two it was in one line**; a diff demoted here is the one place a missed defect is expensive.
104
104
  - **Query changes.** §3.6 duels every query the diff adds or modifies, at every size, whatever this section resolved — routing them through the bump buys a second opinion on prose where §3.6 buys a plan.
105
105
 
106
- **No CLI, or a non-zero exit → the prose fallback**, and `Review path` names it with the reason (the same contract the panel follows). Measure `git diff --shortstat <review base>...<candidate_sha>`; **≤150 → XS · 151-600 → S · 601-1500 → M · >1500 → L**; effective size = the lower of that and `meta.json.size`; `proportional` runs the built-in at **medium/high/high/xhigh** by size and the panel at M and above (at S only on a sensitive surface); the bump raises the effort one tier (medium→high→xhigh→**max**) and always runs the panel; `full` is **xhigh** plus the panel at any size, `light` is the built-in alone at **medium** with no panel, no §3 and no §6 — and a sensitive surface lifts `light` to the proportional tier for that work. The thresholds and the ladder are documented in `docs/CONFIGURATION.md`, where they can be read without being re-taught to a model on every invocation.
106
+ **No CLI, or a non-zero exit → the prose fallback**, and `Review path` names it with the reason (the same contract the panel follows). Measure `git diff --shortstat <review base>...<candidate_sha>`; **≤150 → XS · 151-600 → S · 601-1500 → M · >1500 → L**; effective size = the lower of that and `meta.json.size`; `proportional` runs the built-in at **medium/high/high/xhigh** by size and the panel at M and above (at S only on a sensitive surface); the bump raises the effort one tier (medium→high→xhigh→**max**) and always runs the panel; `full` is **xhigh** plus the panel at any size, `light` is the built-in alone at **medium** with no panel, no §3 and no §6 — and a sensitive surface lifts `light` to the proportional tier for that work.
107
107
 
108
108
  **The diff pointing *higher* than `meta.json.size`** is worth one line in `06-review.md` (the work may be misclassified), never a heavier review. **The sensitive-surface bump is never scaled away** — a 12-line change to an authorization check still gets the panel, on a delta exactly as on a first review.
109
109
 
@@ -152,7 +152,7 @@ Launch the reviewers selected in §2.0 and **consolidate their findings into a s
152
152
 
153
153
  When both run, deduplicate overlapping correctness/simplification findings (count each once). The `review_skill` specialists (offensive/defensive security, silent failures, architecture) are not repeated in later phases.
154
154
 
155
- **Dedup keeps every source, not the first one.** A finding carries its **origin** from here to §8 — `built-in`, a panel role, or the pass that raised it (`§3.5`, `§3.6`, `§5`, `§5.5`) — and a finding more than one source raised lists all of them. Counted once, credited to each. Beyond the built-in and the panel this command runs four specialised passes, roughly 1 800 of its words, every one added after a real defect got through and not one able to show it still earns that cost: a finding only the idiom audit saw and a finding three sources raised say opposite things about that pass, and until now both were written identically. The `Cost:` line stopped being a headcount when `meta.json.cost[]` arrived; this is the same move for the thing those costs are spent on.
155
+ **Dedup keeps every source, not the first one.** A finding carries its **origin** from here to §8 — `built-in`, a panel role, or the pass that raised it (`§3.5`, `§3.6`, `§5`, `§5.5`) — and a finding more than one source raised lists all of them. Counted once, credited to each: a finding only one pass saw and a finding three sources raised say opposite things about that pass, and §9 records the difference.
156
156
 
157
157
  ### 2.2 Design truth vs design rationale (do not inherit rationalizations)
158
158
  `03-design.md` goes to reviewers as context, with unequal authority:
@@ -171,7 +171,7 @@ Only what §2 does **not** already cover; skipped entirely under `light` (§2.0)
171
171
 
172
172
  ## 3.5. Completeness sweep (anti-abandonment, M/L only)
173
173
 
174
- Counters a reviewer abandoning a large diff early. **Only if `meta.json.size` is M or L**, and only
174
+ Counters a reviewer abandoning a large diff early. **Only if the effective size of §2.0 is M or L**, and only
175
175
  if §2.0b's budget still covers it (it is the first phase dropped).
176
176
 
177
177
  **It runs after §2-§3 are consolidated, never in parallel with them.** The whole phase is an audit of
@@ -263,7 +263,7 @@ Findings enter the normal flow: §6, then the output. Blinded for the same reaso
263
263
 
264
264
  A filter against over-reporting, not a second review; narrow gate. Never runs under `light` (§2.0).
265
265
 
266
- **When it runs.** All three conditions:
266
+ **When it runs.** All four conditions:
267
267
 
268
268
  | Condition | Threshold |
269
269
  |---|---|
@@ -272,7 +272,7 @@ A filter against over-reporting, not a second review; narrow gate. Never runs un
272
272
  | Findings | **≥ 4** ambiguous findings across §2-§5 |
273
273
  | Budget | §2.0b's budget still covers a round (§6 is the second phase dropped) |
274
274
 
275
- Read the real diff (`git diff --stat` against the target branch), not the recorded size.
275
+ Read the real diff (`git diff --stat <review base>...<candidate_sha>`, §1.5), not the recorded size.
276
276
 
277
277
  When all three hold: in **`manual`**, offer it with `AskUserQuestion` ("Verify the ambiguous findings with skeptics in parallel? Discards false positives before you go fix them."). In **`guided`/`auto`, do not ask** — flow mechanics: run it and note in `06-review.md` that you did.
278
278
 
@@ -352,7 +352,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
352
352
  ## Discarded by adversarial verification
353
353
  <only if §6 was run; list of refuted findings with reason, or "not applicable">
354
354
  <if the `fanout_max` cap left ambiguous findings unverified, list them here as "unverified (cap)">
355
- <if §6 did not run, one line saying which condition did not hold — size, diff size, or count>
355
+ <if §6 did not run, one line saying which condition did not hold — size, diff size, count, or budget>
356
356
 
357
357
  ## Blockers (must-fix)
358
358
  1. [file:line] · <origin> · description + concrete proposal
@@ -375,12 +375,11 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
375
375
  - Blockers → **do not advance `phase`**. Leave `phase = "build"`; the user resolves them.
376
376
  - No blockers → `phase = "review"`, add to `phases_done`. **In a multi-MR/PR work**, also add `review` to the current `in_progress` MR/PR's own `phases_done` (its `mrs[]` entry) — `/flow:feat:ship §1` gates on it per MR/PR.
377
377
  - **Record *what* you reviewed, and separately what you changed after reading it**, in the same write, work-level and — in a multi-MR/PR work — in this MR/PR's `mrs[]` entry too:
378
- - `reviewed_sha` = **the candidate of §1.5**, the revision the reviewers actually read. Not `git rev-parse HEAD`, which is what it used to be and which by then holds this round's own fixes — code no reviewer saw, recorded as reviewed, and `ship` finding it equal to `HEAD` every time.
379
- - `fixed_sha` = `git rev-parse HEAD` after this round's fixes, or **empty** when the round applied none. Two fields because they are two facts, and collapsing them is what hid the delta.
378
+ - `reviewed_sha` = **the candidate of §1.5**, the revision the reviewers actually read. Not `git rev-parse HEAD`, which by then holds this round's own fixes — code no reviewer saw, recorded as reviewed, and `ship` finding it equal to `HEAD` every time.
379
+ - `fixed_sha` = `git rev-parse HEAD` after this round's fixes, or **empty** when the round applied none. Two fields because they are two facts.
380
380
  - `phases_done` says a review *happened*; these say which tree, and `/flow:feat:ship §1` reads both before pushing. Written whenever the phase advances, never when it does not: a review that ended in blockers reviewed nothing that stands.
381
381
  - **Record which pass found what**, in the same write: `meta.json.review_findings[]`, one entry per finding **per source** — `{ round, origin, severity, file, discarded_by_skeptic }`, and no finding text, which stays in the artifact. `flow review --record` writes these itself when the CLI ran the panel; when the agentic panel ran, write them here from the origins §2.1 carried. `flow cost` reads them back per origin: how many findings each pass contributed, how many only it raised, and how many of those survived §6. That last number is the only evidence a pass is still earning its words.
382
- **The retirement rule, written down before the data arrives** so it cannot be argued backwards later: a pass that contributes **no exclusive surviving finding across twenty reviews** is removed from this command. Zero is zero, and the decision is made against the number rather than against whoever is most attached to the pass.
383
- - **Stage what the review taught** (`knowledge.stage` set; silence by default). Review is where a project teaches the most and, until now, the one phase that never staged — a work with three review rounds and seventeen blockers produced zero knowledge cards because nothing asked for them while they were in context. Candidates are findings about the **domain or the codebase's real behaviour**, not about this diff: a library that does other than its name says, a test disguise that kept the suite green over a live defect, a module rule the reviewers had to cite from its own prose, a measurement. A blocker fixed here is not knowledge; *why it was written wrong* may be. Same evidence rule as `/flow:feat:design` §8 — one line of evidence per finding or it is not staged. One call per finding, one line to the user («Staged N finding(s) for `ship`»). Never `knowledge.save` here.
382
+ - **Stage what the review taught** (`knowledge.stage` set; silence by default). Review is where a project teaches the most, and this is the only moment its findings are in context. Candidates are findings about the **domain or the codebase's real behaviour**, not about this diff: a library that does other than its name says, a test disguise that kept the suite green over a live defect, a module rule the reviewers had to cite from its own prose, a measurement. A blocker fixed here is not knowledge; *why it was written wrong* may be. Same evidence rule as `/flow:feat:design` §8 — one line of evidence per finding or it is not staged. One call per finding, one line to the user («Staged N finding(s) for `ship`»). Never `knowledge.save` here.
384
383
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
385
384
  - **Record what the agents missed** (flow-core §6.7, `agents.learn` not `off`; asking nothing): for each finding that survived, the panel member or named `agents.<role>` whose category it falls in and who did not report it, and the delegated `build` agent whose code it sits in → one `meta.json.agent_lessons[]` row each, only when the lesson passes the §6.7 test. The origins §2.1 carried are what make this possible — a finding with no origin teaches nobody.
386
385
  - **Configuration this phase earned the right to ask about** (flow-core §0, `manual` only, at most one key per work, as an extra option on this same stop — never a question of its own): a `Cost:` line that went over `agents.budget_max` → `quality.review_depth`. In `guided`/`auto` neither is asked: the default is taken and recorded in `meta.json.defaults_used[]`.
@@ -68,7 +68,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
68
68
  - **Code review is mandatory**: `/flow:feat:ship` is not run and `/flow:bug:postmortem` is not closed without passing through `/*:review`.
69
69
  - **Existing sub-agents**: commands delegate to the project's agents and skills; work is never duplicated.
70
70
  - **The subagents' model is the repo's call, never the plugin's (`models` in FLOW.md)**: `agents` (every subagent a command improvises) · `workers` (the fan-out rounds, falling back to `agents`). Empty = **inherit**. There is no key for what the main agent does itself: **an agent cannot switch its own model** (say it, **continue**); **a named agent keeps its own** (`agents.<role>`) — flow-core §1. `/flow:doctor` prints both resolved; `quality.review_skill` owns the review panel.
71
- - **Parallel multi-agent fan-out (optional, only where it pays)**: plain subagents. (1) `/flow:feat:design` §1.5.3: one agent per lens (minimum / reuse / reframe, + operations for L or a sensitive surface), cross-critique for L only. (2) `/flow:bug:investigate` §3.A: one agent per root cause, evidence **for and against**. (3) `/flow:feat:review` §6 and `/flow:bug:review` §5: one skeptic per **ambiguous** finding, refute-by-default. (4) `/flow:feat:build` §2.1bis and `/flow:bug:fix` §2.2: **one** skeptic on a premise the change depends on and nothing verifies — at **any size, XS included**, once per MR/PR, a category and not a depth tier, like the query duel. Other phases **do not** fan out. `manual`: offered with `AskUserQuestion`; `guided`/`auto`: runs, noted in the artifact. **The fan-out has two ceilings, and the synthesis is not a subagent**: `agents.fanout_max` (empty → **4**) per round and `agents.budget_max` (empty → **12**) for everything one command run launches, with what either cap drops **said** and the phase each command gives up first declared in it; both count agents, not findings, so grouping is intended and one-agent-per-finding past the cap is a breach; the review tier scales to the **diff under review**, not the size of the feature, and the verification gate also needs a **diff over 150 changed lines**; delegate the **gathering**, keep the **deciding**. **A heavier orchestrator is opt-in, per repo**: `agents.fanout_tool` (e.g. Claude Code's `Workflow`), rounds and ceiling unchanged; empty is the default and the portable path.
71
+ - **Parallel multi-agent fan-out (optional, only where it pays)**: plain subagents. (1) `/flow:feat:design` §1.5.3: one agent per lens (minimum / reframe, + operations for L or a sensitive surface), one round, no debate. (2) `/flow:bug:investigate` §3.A: one agent per root cause, evidence **for and against**. (3) `/flow:feat:review` §6 and `/flow:bug:review` §5: one skeptic per **ambiguous** finding, refute-by-default. (4) `/flow:feat:build` §2.1bis and `/flow:bug:fix` §2.2: **one** skeptic on a premise the change depends on and nothing verifies — at **any size, XS included**, once per MR/PR, a category and not a depth tier, like the query duel. Other phases **do not** fan out. `manual`: offered with `AskUserQuestion`; `guided`/`auto`: runs, noted in the artifact. **The fan-out has two ceilings, and the synthesis is not a subagent**: `agents.fanout_max` (empty → **4**) per round and `agents.budget_max` (empty → **12**) for everything one command run launches, with what either cap drops **said** and the phase each command gives up first declared in it; both count agents, not findings, so grouping is intended and one-agent-per-finding past the cap is a breach; the review tier scales to the **diff under review**, not the size of the feature, and the verification gate also needs a **diff over 150 changed lines**; delegate the **gathering**, keep the **deciding**. **A heavier orchestrator is opt-in, per repo**: `agents.fanout_tool` (e.g. Claude Code's `Workflow`), rounds and ceiling unchanged; empty is the default and the portable path.
72
72
  - **Knowledge sources (full cycle)**: the `knowledge` section names a tool per **role** — `search`, `stage`, `read_staging`, `save` — any MCP (domain-memory, codegraph…), CLI or skill; a role that is empty degrades (no lookup / finding stays in the artifact / artifacts are the staging / `KNOWLEDGE.md`); `knowledge.timeout_s` (2 s) or any failure → continue silently. **`knowledge.search`**: `/flow:feat:start`, `/flow:bug:start` (ticket keywords), `/flow:feat:design` (approaches, module + integrations), `/flow:bug:investigate` (component in §1.5, cause in §2). **`knowledge.stage`**: closing `/flow:feat:design` and `/flow:bug:investigate`, offer to stage non-obvious domain decisions (silence by default; per-branch). **`knowledge.read_staging`** then **`knowledge.save`** at `/flow:feat:ship` and `/flow:bug:postmortem`: offer to consolidate the "why" only.
73
73
 
74
74
  ## `meta.json` schema
@@ -81,7 +81,6 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
81
81
  "branch": "{PREFIX}XXXXX-slug",
82
82
  "size": "XS" | "S" | "M" | "L",
83
83
  "phase": "context" | "design" | "plan" | "build" | "review" | "validate" | "ship" | "investigate" | "fix" | "postmortem" | "done" | "abandoned",
84
- // retired in v0.53.0 and still read from older works: "brainstorm" → treat as "context", "diagnose" → as "investigate"
85
84
  "phases_done": ["context", ...],
86
85
  "candidate_sha": "40-char sha the current review froze before reading, or ''",
87
86
  "reviewed_sha": "40-char sha the last passing review read, or ''",
@@ -114,11 +113,11 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
114
113
  ],
115
114
  "followups": [
116
115
  { "id": "F1",
117
- "kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug",
116
+ "kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
118
117
  "title": "one line, what would be done",
119
118
  "why": "one line, why it was parked and why it still matters",
120
119
  "source": "design" | "plan" | "build" | "validate" | "fix" | "postmortem",
121
- "status": "proposed" | "accepted" | "in_progress" | "declined" | "done",
120
+ "status": "proposed" | "accepted" | "in_progress" | "declined" | "logged" | "done",
122
121
  "ticket": null, "work": null, "note": "" }
123
122
  ],
124
123
  "defaults_used": [
@@ -25,7 +25,6 @@ Use when returning to a work after a break (next morning, another session).
25
25
  - `git branch --show-current`.
26
26
  - Search `.claude/work/` for the `meta.json` whose `branch` matches.
27
27
  - None found → ask the user for the ticket or whether to start a new one.
28
- - **A `phase` retired in v0.53.0** — `brainstorm` or `diagnose`, from a work started before it — is mapped, never refused: `brainstorm` → `design` (its `02-brainstorm.md` is that command's §1.5 output, already done), `diagnose` → `investigate` (its `02-diagnose.md` is that command's §1.5 output). Say which mapping you applied, in one line, and suggest the mapped command. Do not rewrite `meta.json` for it; the phase advances normally at the next Close.
29
28
  - `meta.json.worktree` non-null and the current directory is not that worktree → tell the user the work lives in a worktree and to `cd <worktree>` before continuing; run the repo-state checks below from there (`git -C <worktree> …`).
30
29
 
31
30
  ## 2. Recap