flow-workflows 0.83.1 → 0.84.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 (84) hide show
  1. package/adapters/codex/CORE.md +113 -149
  2. package/adapters/codex/skills/flow-bug-fix/SKILL.md +2 -2
  3. package/adapters/codex/skills/flow-bug-investigate/SKILL.md +3 -3
  4. package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +2 -2
  5. package/adapters/codex/skills/flow-bug-review/SKILL.md +3 -3
  6. package/adapters/codex/skills/flow-bug-ship/SKILL.md +13 -14
  7. package/adapters/codex/skills/flow-bug-start/SKILL.md +16 -10
  8. package/adapters/codex/skills/flow-bug-validate/SKILL.md +3 -3
  9. package/adapters/codex/skills/flow-doctor/SKILL.md +8 -6
  10. package/adapters/codex/skills/flow-feat-build/SKILL.md +5 -5
  11. package/adapters/codex/skills/flow-feat-design/SKILL.md +3 -3
  12. package/adapters/codex/skills/flow-feat-plan/SKILL.md +1 -1
  13. package/adapters/codex/skills/flow-feat-review/SKILL.md +4 -5
  14. package/adapters/codex/skills/flow-feat-ship/SKILL.md +30 -30
  15. package/adapters/codex/skills/flow-feat-start/SKILL.md +19 -14
  16. package/adapters/codex/skills/flow-feat-validate/SKILL.md +3 -3
  17. package/adapters/codex/skills/flow-init/SKILL.md +2 -1
  18. package/adapters/codex/skills/flow-work-README/SKILL.md +1 -0
  19. package/adapters/codex/skills/flow-work-resume/SKILL.md +3 -3
  20. package/adapters/codex/skills/flow-work-run/SKILL.md +68 -0
  21. package/adapters/gemini/CORE.md +113 -149
  22. package/adapters/gemini/commands/flow/bug/fix.toml +2 -2
  23. package/adapters/gemini/commands/flow/bug/investigate.toml +3 -3
  24. package/adapters/gemini/commands/flow/bug/postmortem.toml +2 -2
  25. package/adapters/gemini/commands/flow/bug/review.toml +3 -3
  26. package/adapters/gemini/commands/flow/bug/ship.toml +13 -14
  27. package/adapters/gemini/commands/flow/bug/start.toml +16 -10
  28. package/adapters/gemini/commands/flow/bug/validate.toml +3 -3
  29. package/adapters/gemini/commands/flow/doctor.toml +8 -6
  30. package/adapters/gemini/commands/flow/feat/build.toml +5 -5
  31. package/adapters/gemini/commands/flow/feat/design.toml +3 -3
  32. package/adapters/gemini/commands/flow/feat/plan.toml +1 -1
  33. package/adapters/gemini/commands/flow/feat/review.toml +4 -5
  34. package/adapters/gemini/commands/flow/feat/ship.toml +30 -30
  35. package/adapters/gemini/commands/flow/feat/start.toml +19 -14
  36. package/adapters/gemini/commands/flow/feat/validate.toml +3 -3
  37. package/adapters/gemini/commands/flow/init.toml +2 -1
  38. package/adapters/gemini/commands/flow/work/README.toml +1 -0
  39. package/adapters/gemini/commands/flow/work/resume.toml +3 -3
  40. package/adapters/gemini/commands/flow/work/run.toml +65 -0
  41. package/adapters/hermes/CORE.md +113 -149
  42. package/adapters/hermes/skills/flow-bug-fix/SKILL.md +2 -2
  43. package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +3 -3
  44. package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +2 -2
  45. package/adapters/hermes/skills/flow-bug-review/SKILL.md +3 -3
  46. package/adapters/hermes/skills/flow-bug-ship/SKILL.md +13 -14
  47. package/adapters/hermes/skills/flow-bug-start/SKILL.md +16 -10
  48. package/adapters/hermes/skills/flow-bug-validate/SKILL.md +3 -3
  49. package/adapters/hermes/skills/flow-doctor/SKILL.md +8 -6
  50. package/adapters/hermes/skills/flow-feat-build/SKILL.md +5 -5
  51. package/adapters/hermes/skills/flow-feat-design/SKILL.md +3 -3
  52. package/adapters/hermes/skills/flow-feat-plan/SKILL.md +1 -1
  53. package/adapters/hermes/skills/flow-feat-review/SKILL.md +4 -5
  54. package/adapters/hermes/skills/flow-feat-ship/SKILL.md +30 -30
  55. package/adapters/hermes/skills/flow-feat-start/SKILL.md +19 -14
  56. package/adapters/hermes/skills/flow-feat-validate/SKILL.md +3 -3
  57. package/adapters/hermes/skills/flow-init/SKILL.md +2 -1
  58. package/adapters/hermes/skills/flow-work-README/SKILL.md +1 -0
  59. package/adapters/hermes/skills/flow-work-resume/SKILL.md +3 -3
  60. package/adapters/hermes/skills/flow-work-run/SKILL.md +68 -0
  61. package/adapters/opencode/CORE.md +113 -149
  62. package/adapters/opencode/commands/flow-bug-fix.md +2 -2
  63. package/adapters/opencode/commands/flow-bug-investigate.md +3 -3
  64. package/adapters/opencode/commands/flow-bug-postmortem.md +2 -2
  65. package/adapters/opencode/commands/flow-bug-review.md +3 -3
  66. package/adapters/opencode/commands/flow-bug-ship.md +13 -14
  67. package/adapters/opencode/commands/flow-bug-start.md +16 -10
  68. package/adapters/opencode/commands/flow-bug-validate.md +3 -3
  69. package/adapters/opencode/commands/flow-doctor.md +8 -6
  70. package/adapters/opencode/commands/flow-feat-build.md +5 -5
  71. package/adapters/opencode/commands/flow-feat-design.md +3 -3
  72. package/adapters/opencode/commands/flow-feat-plan.md +1 -1
  73. package/adapters/opencode/commands/flow-feat-review.md +4 -5
  74. package/adapters/opencode/commands/flow-feat-ship.md +30 -30
  75. package/adapters/opencode/commands/flow-feat-start.md +19 -14
  76. package/adapters/opencode/commands/flow-feat-validate.md +3 -3
  77. package/adapters/opencode/commands/flow-init.md +2 -1
  78. package/adapters/opencode/commands/flow-work-README.md +1 -0
  79. package/adapters/opencode/commands/flow-work-resume.md +3 -3
  80. package/adapters/opencode/commands/flow-work-run.md +66 -0
  81. package/package.json +1 -1
  82. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  83. package/plugins/flow/CHANGELOG.md +25 -0
  84. package/plugins/flow/examples/FLOW.template.md +8 -9
@@ -24,7 +24,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
24
24
 
25
25
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
26
26
 
27
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
27
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
28
28
 
29
29
  - Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
30
30
  - Require `fix` in `phases_done`.
@@ -41,8 +41,8 @@ Then:
41
41
  1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
42
42
  2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow; measured in tens of minutes → delegate it as a wait to a supervisor subagent on `models.supervisors`, flow-core §6.5 — it returns the exit code and the failing output, and the reading of them stays here).
43
43
  3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined; in `unattended` it is never run without an answer — a schema difference to apply is question
44
- `migration`, flow-core §2.1; a runner's *Apply it* relaunches this phase, this site takes the answer
45
- the pickup applied and runs it, and `05-validation.md` names that answer beside the migration).
44
+ `migration`, flow-core §2.1; the orchestrator's *Apply it* relaunches this phase, this site takes the
45
+ answer just applied and runs it, and `05-validation.md` names that answer beside the migration).
46
46
  4. Security or authentication touched → launch the `agents.security` agent from FLOW.md in parallel over the fix files (empty → `Agent general-purpose` with a security role).
47
47
 
48
48
  ## 2.5 Reproduce the original symptom against the running app
@@ -168,12 +168,14 @@ base branch resolvable — is §2 below; flag the key here, check the world ther
168
168
  echo the mode and remind that the hard gates stop and ask in `manual`/`guided`/`auto` and that `guided`/`auto`
169
169
  never ask about the flow's own mechanics or anything already decided (both lists: `flow:flow-core`
170
170
  skill §2). Unrecognized value → flag, `manual` assumed. `unattended` → say what it does instead of
171
- the gates (flow-core §2.1): nothing is asked, questions end the run in `.claude/work/stop.json` for a runner, whose answer in `.claude/work/answer.json` lets the relaunched run continue,
172
- and `ship` is a draft only when `autonomy.unattended_ship` is `draft` — echo that value, or that it
173
- is empty and ship will stop on a question. Say which file set it: every session that reads that file
174
- — a person's included, when they share the checkout and the harness — stops asking too, so it
175
- belongs in a FLOW file only the runner's environment has. `unattended_ship` set with any other mode → note it is ignored; a
176
- value other than `draft`/`stop` → flag, `stop` assumed.
171
+ the gates (flow-core §2.1): nothing is asked, and every run ends with one order to the
172
+ orchestrator command — `ask`, `publish`, `blocked` or `done`; flow pushes nothing and opens no
173
+ MR/PR. Echo `autonomy.orchestrator_cmd` and the file it came from, and whether its first word
174
+ resolves on `PATH` (`command -v`) — **empty → flag it as an error**: no phase runs in
175
+ `unattended` without it. Say which file set the mode: every session that reads that file — a
176
+ person's included, when they share the checkout and the harness — stops asking too, so it belongs
177
+ in a FLOW file only the orchestrator's environment has. `orchestrator_cmd` set with any other mode
178
+ → note it is ignored.
177
179
 
178
180
  ## 2. Checks
179
181
 
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Implementation phase. Code is written here.
26
26
 
@@ -31,9 +31,9 @@ Implementation phase. Code is written here.
31
31
  - `size` XS/S: may start without a design — ask the user for a 2-3 line note on what will be done and save it as a minimal `03-design.md`. No MR/PR plan (always 1 MR/PR).
32
32
  - **If `meta.json.mrs` has more than one entry**: pick the **startable** MR/PR — the `pending` one with the **lowest `n` whose `depends_on` are all `merged`**. Dependencies still `pending`/`in_progress` → not startable, even with a low `n`. (No `wave`/`depends_on` — an older plan — → "first pending by `n`".)
33
33
  - **Parallel siblings**: startable `pending` MRs/PRs in the **same `wave`** with no dependency between them can be built in parallel or as a train. `manual`: let the user choose which to take now (default: lowest `n`); `guided`/`auto`: take the lowest `n`, record the choice. Mark the chosen one `in_progress`.
34
- - All `merged` → warn: feature is done, nothing to build (in `unattended`: `done`, `detail` saying so).
35
- - Some `pending` but **none** startable → start nothing: tell the user which MR/PR must merge to unlock the next wave, and stop. In `unattended`: `blocked`, the detail naming it.
36
- - **Train/stacked** (never in `unattended`: there the startable MR/PR gets a **new branch of its own** from `git.default_base`, created as `/flow-feat-start §5.2` (in place) or `§5.4` (worktree) says — `git.worktree: always` → worktree, `off`/empty/`ask` → in place; base `git.default_base`, already decided, so §5.1 asks nothing; `--no-track`, no linked remote branch — and never commits onto a previous MR/PR's branch; flow-core §2.1): this MR/PR needs its own branch stacked on the previous one — do **not** keep committing on the previous MR/PR's branch. `/flow-feat-ship §6.2` creates and links it when it chains here; if you arrived directly and are still on the previous branch, create it now per `/flow-feat-start §5` (explicit base = the previous MR/PR's branch, `--no-track`, worktree per `git.worktree`) and, for `tracker.tool: gh`, the linked-branch step `/flow-feat-start §5.5`. Record `stacked_on` in `meta.json`. The train does **not** wait for the previous MR/PR to merge.
34
+ - All `merged` → warn: feature is done, nothing to build (in `unattended`: `done`, the summary saying so).
35
+ - Some `pending` but **none** startable → start nothing: tell the user which MR/PR must merge to unlock the next wave, and stop. In `unattended`: `blocked`, the reason naming it.
36
+ - **Train/stacked** (never in `unattended`: there the startable MR/PR gets a **new branch of its own** from `meta.json.base` (empty → `git.default_base`) — the base the orchestrator gave the ticket, an umbrella branch once a split task's first part is merged. That branch may exist only on the remote, or locally without the part that just merged: `git fetch origin <base>` when a remote is configured (best-effort — a fetch the container cannot make is not an error), then start from `origin/<base>` when it resolves, the local `<base>` otherwise. Named `<ticket>-<slug>-<n>` and created as `/flow-feat-start §5.2` (in place) or `§5.4` (worktree) says — `git.worktree: always` → worktree, `off`/empty/`ask` → in place; that base is already decided, so §5.1 asks nothing; `--no-track`, no linked remote branch — and never commits onto a previous MR/PR's branch; flow-core §2.1): this MR/PR needs its own branch stacked on the previous one — do **not** keep committing on the previous MR/PR's branch. `/flow-feat-ship §6.2` creates and links it when it chains here; if you arrived directly and are still on the previous branch, create it now per `/flow-feat-start §5` (explicit base = the previous MR/PR's branch, `--no-track`, worktree per `git.worktree`) and, for `tracker.tool: gh`, the linked-branch step `/flow-feat-start §5.5`. Record `stacked_on` in `meta.json`. The train does **not** wait for the previous MR/PR to merge.
37
37
 
38
38
  ## 2. Business brief (before typing)
39
39
 
@@ -67,7 +67,7 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
67
67
  `recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
68
68
  The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
69
69
  **A schema change or migration is still a question** (`migration`): before writing the first line
70
- of one → stop file, end the run. A person continues from there, or a runner's answer re-enters here
70
+ of one → the question stop, end the run. The orchestrator's answer re-enters here
71
71
  (flow-core §2.1): the brief, the contracts and the plan are already written — keep them — and the
72
72
  MR/PR is the one already `in_progress`, not a new pick. *Write it and continue* → the first unticked
73
73
  step, the migration included · *Change the design first* → `blocked`. A plan step marked approved
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Technical design phase. **Still no production code is written.** Opens the option space first (M/L), then designs the approach that was chosen. Output: a plan the next step executes.
26
26
 
@@ -28,8 +28,8 @@ Technical design phase. **Still no production code is written.** Opens the optio
28
28
  `auto` · questions the options surfaced (§1.5.5) or an acceptance criterion that is ambiguous (§9) →
29
29
  question `clarify` · a size that no longer fits (§1.5.5, §7) → record the new size · a `high`
30
30
  challenge with no response (§6) → question `design_challenge`, the findings and their options in the
31
- stop file · the design review (§9) → recorded as accepted, as in `auto`. Each of these stops comes
32
- after `03-design.md` holds what the phase computed, and a runner's answer re-enters where flow-core
31
+ question · the design review (§9) → recorded as accepted, as in `auto`. Each of these stops comes
32
+ after `03-design.md` holds what the phase computed, and the orchestrator's answer re-enters where flow-core
33
33
  §2.1's table says: the approaches are not generated again, the design is not written again — the
34
34
  answer goes into its section, and the phase continues from the choice (§1.5.5), from §9, or from §7
35
35
  after writing each challenge's Response.
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Delivery planning phase. **No code is written.** Splits the feature into MRs/PRs that can each live on the main branch even if the subsequent ones never land.
26
26
 
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Mandatory review phase. **`/flow-feat-ship` cannot run without passing through here and resolving blockers.**
26
26
 
@@ -390,10 +390,9 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
390
390
  - Report findings and next step **following the stop header** (flow-core §3) **when this is a stop**; in `guided`/`auto` with a clean gate the next command runs in this same turn, so this goes to `06-review.md` and the turn opens with the call that chains — the `Cost:` line then travels to the stop the run does reach, added to that phase's own. Include it once. Body: the findings that **survived** verification and what you did with each — a blocker, an applied fix, a rejection with its reason. Corrections to the reviewers' own reports go to `06-review.md`, not here.
391
391
  - **Autonomy handoff.** Only when there are **no blockers and no unresolved high-severity findings** — with any of those, stop in every mode (hard gate; in `unattended`, see below). Clean: in `manual`, propose `/flow-feat-validate` with a single `AskUserQuestion` and invoke it on confirmation; in `guided`/`auto`, **chain into `/flow-feat-validate` automatically** in this same turn. Never chain into `/flow-feat-ship` from here — ship is reached through `validate`.
392
392
  - **In `unattended`** (flow-core §2.1), blockers or unresolved high-severity findings are question
393
- `high_findings`: the surviving findings in `question`, one line each, and the run ends — after
394
- §8 has written them to `06-review.md` and the round's own fixes are committed. A person picks it
395
- up in a session of their own, where they are fixed and reviewed again; or a runner answers
396
- (flow-core §2.1). *Accept and go on* → this command re-enters at this Close: no reader is
393
+ `high_findings`: the surviving findings in the question, one line each, and the run ends — after
394
+ §8 has written them to `06-review.md` and the round's own fixes are committed. The orchestrator brings
395
+ the answer back (flow-core §2.1). *Accept and go on* → this command re-enters at this Close: no reader is
397
396
  launched again, the findings are recorded under "Answered (unattended)" as accepted by that
398
397
  answer, `reviewed_sha` = the candidate, and the phase advances and chains; `ship` lists them in
399
398
  the body. *Fix them* → this command re-enters at this Close too: it writes each finding as an
@@ -20,22 +20,23 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Closes the feature: commit, push, MR/PR (assigned per `git.assignee`, squash per `git.squash`, sections per `git.request_sections`) and an optional offer to consolidate knowledge.
26
26
 
27
- **In `unattended`** (flow-core §2.1) this command asks nothing, and it is the only place that run
28
- pushes. Each place it would ask:
29
-
30
- - **The MR/PR itself (§3–§4)** — `autonomy.unattended_ship: draft` → skip the confirmation and
31
- create it **as draft** with the §2 content (§4.1 says how); never merge it, never mark it ready.
32
- The body gains one line saying an unattended run opened it and nobody confirmed its brief.
33
- Empty or `stop` → nothing is pushed: question `ship`, the §3 preview as the question, and the run
34
- ends; a person ships it from a session of their own. Pre-deploy SQL in the branch → question
35
- `migration`, whatever `unattended_ship` says. A runner's answer (flow-core §2.1) relaunches this
36
- command from its pre-flight, since the draft lives only in context, and the site it was for takes
37
- the answer the pickup applied — *Create it as draft* creates the draft as `draft` would,
38
- *The SQL is complete — ship it* goes on to the MR/PR.
27
+ **In `unattended`** (flow-core §2.1) this command asks nothing, pushes nothing and opens nothing:
28
+ it hands the finished MR/PR to the orchestrator, which pushes the branch and opens the draft. Each
29
+ place it would ask:
30
+
31
+ - **The MR/PR itself (§3–§4)** — no confirmation and no forge. §2's title and description are
32
+ written to `publish-title.md` and `publish-body.md` in the work folder; the body gains one line
33
+ saying an unattended run prepared it and nobody confirmed its brief. §4.0's branch check still
34
+ runs (never the base; the name starts with `<ticket>-`) — and an upstream on the base is unset
35
+ (`git branch --unset-upstream`), with no push after it. §4.1–§4.3 do not: no push, no
36
+ pre-deploy thread, no performance comment — those numbers go in the body. Pre-deploy SQL in the
37
+ branch → question `migration` first; its answer relaunches this command from its pre-flight,
38
+ since the draft lives only in context, and the site takes the answer just applied
39
+ (*The SQL is complete — ship it*) and goes on.
39
40
  - **The §1 tree check** — `reviewed_sha` or `validated_sha` behind `HEAD` with more than tests →
40
41
  re-run what is behind, **once per MR/PR**: the review on the delta, then `validate`. First record
41
42
  `{ "key": "unattended:ship-recheck", "default": "mr <n>", "phase": "ship" }` in
@@ -43,21 +44,27 @@ pushes. Each place it would ask:
43
44
  MR/PR's `n` already there → `blocked`, whatever the sha. Tracked changes this run's own phases left uncommitted → commit them
44
45
  as WIP first (a WIP commit is `auto`'s to make) and check again · **blocking TODO/FIXME (§1)** →
45
46
  continue and list them in the body.
46
- - **Posting anything else** — the performance comment (§4.3), a contract handoff (§6.3) — → not
47
- posted; the numbers go in the body, the handoff stays `pending`.
47
+ - **Posting anything else** — a contract handoff (§6.3) — → not posted; the handoff stays
48
+ `pending`.
48
49
  - **The offers and surveys (§5, §5.1, §5.2, §5.5, §6.4, §6.4bis)** → `Later`; nothing written outside
49
50
  the work folder.
50
- - **"Was it merged?" (§6.1)** → not merged; `meta.json` as §6.1 says for an unmerged MR/PR. **The
51
- parent merged first (§6.2.1)** → blocked, never force-push. **Train continuation (§6.2)** → not
52
- started: one MR/PR per unattended run.
53
- - **At Close** write the stop file with `reason: "done"`, `mr_url`, and — with `mrs` still pending —
54
- `detail` naming the next MR/PR and what it waits on (its `depends_on` merged, then
55
- `/flow-feat-build`). It is the last thing the run does.
51
+ - **"Was it merged?" (§6.1)** → not merged: the entry stays `in_progress` (a work with no `mrs`
52
+ keeps `phase = "ship"`) until `publish` succeeds, below. **The parent merged first (§6.2.1)** → blocked, never
53
+ force-push. **Train continuation (§6.2)** → not started: one MR/PR per unattended run.
54
+ - **At Close**, after `meta.json` and `00-summary.md` are written: commit what is left outside
55
+ `.claude/work/` so the tree is clean, then the run's closing order — `<cmd> publish --title-file
56
+ <work>/publish-title.md --body-file <work>/publish-body.md`, plus `--part <n> --of <N>` when
57
+ `meta.json.mrs` has more than one entry (`n` this MR/PR's, `N` the number of entries). Exit 0 →
58
+ this MR/PR's `mrs[]` entry gets `status: "published"` (a work with no `mrs`: `meta.json.published:
59
+ true`) — what `/flow-work-run` turns into `merged` when the orchestrator relaunches with
60
+ `why = merged` — and nothing else runs. The summary and the panel written before it say the work
61
+ was *handed to the orchestrator*, never that it was published. Exit ≠ 0 → nothing
62
+ is marked; its stderr goes in the stop header (flow-core §2.1).
56
63
 
57
64
  **In every mode**, criteria `07-validation.md` marks `not-verified-unattended` go into the body under
58
65
  `## Not verified — needs a human`, with what to do for each — and so do the tests the suite left red
59
66
  because they also fail on the base (`unattended:validate-red-base`): each name, and the base sha
60
- where it failed too — and the review findings a runner's answer accepted unfixed
67
+ where it failed too — and the review findings an orchestrator's answer accepted unfixed
61
68
  (`06-review.md` "Answered (unattended)"), one line each. The §3 preview shows that section like
62
69
  any other, and the person reading it is the check the run could not do.
63
70
 
@@ -213,14 +220,7 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
213
220
  - Train mode (`stacked_on` ≠ null) → the MR/PR must target that parent branch, not the main base.
214
221
 
215
222
  ### 4.1 Create MR/PR
216
- **A draft (`unattended`, flow-core §2.1) — read this first: it replaces the invocation below.** Do
217
- **not** invoke `commit-push-pr`, and do not use the plain CLI fallback below: both open a normal
218
- MR/PR. Commit, `git push -u origin HEAD`, and create it with the forge CLI and its draft flag
219
- (`gh pr create --draft`, `glab mr create --draft`, the equivalent elsewhere), assignee and squash as
220
- below. The forge refusing a draft → `blocked` with its message; never retried without the flag.
221
- Then record the URL, as the paragraph after the bullets says.
222
-
223
- Otherwise, only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
223
+ Only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
224
224
 
225
225
  - `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
226
226
  - `commit-push-pr` skill unavailable → commit and push manually and create the MR/PR with the `git.cli` CLI from `FLOW.md` — always with the content confirmed in §3.
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  `$ARGUMENTS` is **optional**:
26
26
 
@@ -28,19 +28,23 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
28
28
  - **Empty** — *ticket-less mode*: do **not** stop or demand a ticket. Draft a ticket from the conversation just held (§2.5), as `/flow-feat-ship` builds the MR/PR body from the work log. Ask for a one-liner only if there is no conversation to draft from.
29
29
 
30
30
  **In `unattended`** (flow-core §2.1) this command asks nothing; each place it would ask resolves as
31
- that table says. Here: a ticket is required — empty, or a tracker read that fails, ends the run
32
- `blocked` (there is no conversation to draft from and nobody to paste it) · uncommitted changes or a
33
- branch other than the main one (§5.1) → `blocked`: the runner owns the checkout · cross-repo scope
34
- (§3.5) → only the repos the ticket names · below-XS (§4) → open the work · `git.worktree: ask`
35
- (§5.0) → in place · §5.5's linked branch → skipped, it pushes a branch and nothing is pushed before
36
- `ship` · the tracker transition (§6.5) → as `auto`. **Clarifying questions (§2.1 precedence, §3)
37
- wait until the branch and the work folder exist** — create them (§5, §6) first, write the questions
38
- into `01-context.md` under "Decisions clarified at start" as open, then question `clarify` with all
39
- of them in one stop. Whoever picks the work up is asked them by the next phase, first (flow-core
40
- §2.1). That next phase is the stop's `resume` — the one §4 routes this size to — so a runner's answer
41
- lands there and `start` is never relaunched.
42
- A `blocked` before the folder exists still has the stop file: its path does not depend on the folder
43
- (flow-core §2.1).
31
+ that table says. Here: **the ticket is `<cmd> ticket --json`**, not the tracker — `number` is the
32
+ identifier, `title` and `body` replace §2's tracker read, and its `comments` (already limited to
33
+ authorised authors) are the whole thread of §2.1, read as that section says; `$ARGUMENTS` that
34
+ disagrees with `number` is ignored and named. The order failing or empty → `blocked` (there is no
35
+ conversation to draft from and nobody to paste it) · **the base is the ticket's `base`** (empty →
36
+ `git.default_base`), recorded as `meta.json.base` — the branch of §5.2 starts there, never from
37
+ where the checkout stands, and §5.1 asks nothing · uncommitted changes, or a checkout not on that
38
+ base → `blocked`: the orchestrator owns the checkout · the branch is named `<number>-<slug>`
39
+ whatever `git.branch_pattern` says — the orchestrator recognises the work branch by that prefix ·
40
+ cross-repo scope (§3.5) → only the repos the ticket names · below-XS (§4) → open the work ·
41
+ `git.worktree: ask` (§5.0) → in place · §5.5's linked branch and the tracker transition (§6.5) →
42
+ skipped: nothing outside the checkout is written in this mode. **Clarifying questions (§2.1
43
+ precedence, §3) wait until the branch and the work folder exist** — create them (§5, §6) first,
44
+ write the questions into `01-context.md` under "Decisions clarified at start" as open, then question
45
+ `clarify` with all of them in one stop. Its `resume` is the next phase §4 routes this size to, so
46
+ the answer lands there and `start` is never relaunched. A `blocked` before the folder exists writes
47
+ its reason file in a `mktemp -d` directory (flow-core §2.1).
44
48
 
45
49
  ## 1. Pre-flight
46
50
 
@@ -249,6 +253,7 @@ Create the work directory per §1: `.claude/work/<TICKET>-<slug>/` (ticket mode)
249
253
  ```
250
254
 
251
255
  - Ticket-less (§2.5) → `draft_from_conversation: true`, `tracker_issue` = created issue id/url (or `null` if local-only). Ticket mode → defaults above.
256
+ - `base` — `unattended` only: the ticket's `base` (the branch every MR/PR of this work starts from and targets; `/flow-work-run` refreshes it on `merged`). Omit it in every other mode.
252
257
  - `related_repos` from §3.5 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo; `[]` for a single-repo task.
253
258
  - **This work *is* an accepted follow-up** (the ticket came from another work's `followups[]`, flow-core §7) → set `origin: { "work": "<originating work dir>", "followup": "F<n>" }`, carry that entry's recorded `why` into `01-context.md` verbatim instead of re-deriving it, and set the originating entry to `in_progress` with `work` naming this folder. Not a follow-up → omit `origin` entirely.
254
259
 
@@ -20,7 +20,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
20
20
 
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
- **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the `running` write, the pending question and the runner's answer are all in it, and a phase that reads only part of it skips them.
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
24
 
25
25
  Verify the feature is complete: test coverage, edge cases, performance, regressions.
26
26
 
@@ -164,7 +164,7 @@ If the feature has UI or critical flows:
164
164
  - Payments → test with the test cards or credentials the provider publishes for its sandbox (and the harness skill for that provider, if installed).
165
165
  - Workers/queues → make sure no jobs are stuck in dead-letter. Stuck jobs that are not yours: do not touch them here.
166
166
  - Migrations → run `quality.db_update` from `FLOW.md` (if defined; in `unattended`, never without an answer — a migration to apply is question `migration`, flow-core
167
- §2.1; a runner's *Apply it* relaunches this phase from §1, this site takes the answer the pickup
167
+ §2.1; the orchestrator's *Apply it* relaunches this phase from §1, this site takes the answer just
168
168
  applied and runs it, and §6 names that answer beside the migration under "Edge cases verified"); verify no unexpected schema difference with the comparison command the project uses.
169
169
 
170
170
  ## 6. Output
@@ -226,7 +226,7 @@ Write `.claude/work/<TICKET>/07-validation.md`:
226
226
  - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
227
227
  - **Autonomy handoff — this one stops in every mode, `auto` included.** `ship` pushes and opens the MR/PR: a hard gate in every mode, so do **not** chain into it. Stop here and propose `/flow-feat-ship` with a single `AskUserQuestion` (recommended option by default), invoking it only when the user confirms. This is the deliberate end of a run in `auto`.
228
228
  **In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow-feat-ship`, which
229
- decides from `autonomy.unattended_ship` between a draft MR/PR and a question. It did not advance
229
+ hands the MR/PR to the orchestrator with `publish`. It did not advance
230
230
  (red suite, a criterion `unproven`) → `blocked`, naming what failed; never chain. A red suite
231
231
  advances only under the base exception of flow-core §2.1: run the failing tests on the base, and
232
232
  write each name, its result there and the base sha under "Suite results" in `07-validation.md`.
@@ -99,7 +99,8 @@ review, not a questionnaire. Then, and only then, five questions:
99
99
  `auto` — also resolves the rest with recorded defaults. Explain the hard gates that stop in these
100
100
  three modes and the list of what `guided`/`auto` never ask (both in the `~/.claude/flow/CORE.opencode.md` §2),
101
101
  so `auto` runs without a stop between the brief and `ship`. Do not offer `unattended`: it is for a
102
- runner, written by hand where only the runner reads it. Editable any time. Empty = `manual`.
102
+ run an orchestrator launches, written by hand — with `autonomy.orchestrator_cmd` — where only that
103
+ run reads it. Editable any time. Empty = `manual`.
103
104
  4. **The quality commands as one block** (`quality.test`, `test_one`, `static_analysis`, `style_fix`,
104
105
  `db_update`, `db_diff`) — confirm or edit what §2 found, all in one question, each may stay empty
105
106
  (= auto-discover at the moment it is needed). Several suites chain into `test` with `&&`.
@@ -246,6 +246,7 @@ Two signals arrive on an open MR/PR, each with its own cross-cutting loop (feat
246
246
  resume; otherwise status.
247
247
  - `/flow-work-daily [question]` — the **work assistant** (daily standup), read-only. **Local** (`.claude/work/` + git) + **forge** (open MRs/PRs, reviews awaiting you, red CI, unmergeable, unresolved threads via `git.cli`) + **tracker** (assigned tickets, priority changes via `tracker.tool`); where they cross, concrete commands (`/flow-feat-start`, `/flow-work-green`, `/flow-work-respond`). No argument → *yesterday · today · blockers*; a question → just that. External sources best-effort, never blocking; the only write is a "last seen" marker, like `/flow-news`.
248
248
  - `/flow-work-status` — all works in `.claude/work/`, current phase, divergence with git.
249
+ - `/flow-work-run [ticket]` — the **entry an orchestrator launches** for an `unattended` run: asks it `why` (start · answer · merged), routes to the phase that answers it, and makes no decision of its own. Refuses to run in any other mode.
249
250
  - `/flow-work-resume` — detects the branch, reads `meta.json`, recaps, suggests the next step. **Re-reads the ticket's comment thread** (§2.5), reports only what is new since `01-context.md`, appends it to the artifact; never amends the design on its own.
250
251
  - `/flow-work-try <branch>` / `/flow-work-try --back` — point the main checkout at a branch to test it here, then return; re-syncs per `git.worktree_resync`. Resolves the work behind the branch and, once the environment is up, **prints the manual test plan already written** (the `needs-manual`/`unproven` criteria, or the acceptance criteria when `validate` has not run) and offers to collect Pass/Fail/Blocked into the validation artifact. No work behind the branch → the plain switch, as before.
251
252
  - `/flow-work-clean [--dry-run]` — **periodic sweep** of finished work's residue: worktree, local branch, `.claude/work/` folder (intermediate train MR/PRs never set `phase: done`, so the `ship`/`abandon` prompt never fires). Verdict per branch from **the forge** with local fallbacks, including patch-equivalence for **squash merges** (`git branch --merged` misses them); acts only on `merged`/`empty`. `unknown` never a candidate; dirty and unpushed protected; work folders **archived, never deleted**; remote never touched. **`autonomy.mode` does not authorize deletion**: `auto` confirms the list too. `--purge-archive <N>d`: separate opt-in pass over `_archive/`, only folders already committed to git.
@@ -21,7 +21,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, au
21
21
  **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
22
 
23
23
  Use when returning to a work after a break (next morning, another session) — including a work an
24
- unattended run left waiting on a person (flow-core §2.1).
24
+ unattended run left with a question pending at its orchestrator (flow-core §2.1).
25
25
 
26
26
  **In `unattended`** this command asks nothing: recap, name the next step, end. It is how a person
27
27
  reads where the run got to, not how the run continues.
@@ -47,7 +47,7 @@ Last updated: <updated_at>
47
47
  Notes: <meta.notes>
48
48
  Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
49
49
  Ticket thread: <new since <updated_at>: <n> comment(s) that change the work — detailed below · or "nothing new" · or "not read"> (line only in ticket mode, from §2.5)
50
- Unattended: <from `.claude/work/stop.json` when its `work` is this one: `question` → the gate and the question, verbatim, with its options, its `id` and `resume` — and, when `answer_rejected` is set, which check the runner's answer failed (`answer_rejected`) · `blocked` → the detail · `running` → "a run is working in <phase>, or died there, at <at>" · `done` → the MR/PR · `picked_up` → omit the line> (line only when that file names this work)
50
+ Unattended: <from `meta.json.pending` when it is set: the gate, `resume` and the question file's first line — the orchestrator holds the question and will relaunch with its answer> (line only when `pending` is set)
51
51
  ```
52
52
 
53
53
  - `MR/PRs:` and `Waves:` from `meta.json.mrs` (same format as `/flow-work-status §2`). `∥` = can run in parallel, `→` = waits for the previous wave to merge.
@@ -89,7 +89,7 @@ With what is new (there is already work on disk):
89
89
 
90
90
  ## 4. Next step
91
91
 
92
- - A pending `question` in the `Unattended:` line → say that the next phase will ask it first (flow-core §2.1); the next step itself comes from `phase` as always.
92
+ - An `Unattended:` line → the question is the orchestrator's to bring back: say so, and that answering it here instead means clearing `meta.json.pending` and continuing in this session's mode; the next step itself comes from `phase` as always.
93
93
  - Suggest the concrete command from `phase` and `size`. Interrupted phase (e.g. `build` with an empty artifact) → suggest rerunning it with `/flow-feat-build` or `/flow-bug-fix`.
94
94
  - §2.5 found something new → let it inform the suggestion (a contract that arrived after you left may mean rerunning `design` rather than continuing `build`); say why in one line.
95
95
  - `meta.json.related_repos` entries not `done` → remind that a **sibling repo still has a pending part** (`<repo>: <scope>`, plus `contract not handed over` when its `contract_handoff` is `pending`); suggest `/flow-feat-start <TICKET>` there. flow only reminds; it never scans or touches the other repo.
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: The one entry an orchestrator launches for an unattended run — asks it why it was launched and routes to the phase that answers it
3
+ ---
4
+
5
+ <!-- GENERATED by script/adapter-build.py from plugins/flow/commands/work/run.md — do not edit; change the plugin file and run the script. -->
6
+
7
+ # `/flow-work-run`
8
+
9
+ > **opencode adapter — how the Claude Code primitives named below map here.**
10
+ > - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
11
+ > - `Agent <role>` / `Agent general-purpose` / subagents → `@<name>` declared in `agents/<name>.md` (`mode: subagent`); the name comes from `agents.<role>` in `FLOW.md`, empty → do it in this context.
12
+ > - Parallel fan-out → several `@name` in one prompt, capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
13
+ > - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `opencode run -p "<command>"` with cron.
14
+ > - `TaskCreate` → a markdown checklist in the phase artifact.
15
+ > - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
16
+ > - `/model <value>` → opencode's model picker (`/models`).
17
+ > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared in `opencode.json` (see this adapter's `opencode.json` for the domain-memory example).
18
+
19
+ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
20
+
21
+ **Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
22
+
23
+ **In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
24
+
25
+ The command an orchestrator puts in its launch line, for every run of every ticket. It does no work
26
+ of its own: it asks the orchestrator why this run exists and hands the run to the phase that
27
+ answers it. `$ARGUMENTS` is the ticket, optional — the orchestrator's `ticket` order is the source
28
+ of truth, and an argument that disagrees with it is ignored and named in the log.
29
+
30
+ ## 1. Pre-flight
31
+
32
+ - Effective FLOW configuration per flow-core §0. `autonomy.mode` is not `unattended` → say this
33
+ command only routes unattended runs, name the mode and where it came from, and end: in any
34
+ other mode a person is the router (`/flow-next`).
35
+ - `autonomy.orchestrator_cmd` empty → flow-core §2.1: no phase runs.
36
+ - Run `<cmd> why`. It fails, or prints anything but `start`, `answer`, `review`, `pipeline` or
37
+ `merged` → print what it returned and its stderr in the §3 header and end. No closing order: an
38
+ orchestrator that cannot say why it launched the run cannot take one either.
39
+ - Run `<cmd> ticket --json` and keep `number`, `title`, `base` and `kind` (`kind` absent → `feat`).
40
+ It fails or prints no `number` → `blocked` (flow-core §2.1).
41
+ - Find the work: the `meta.json` under `.claude/work/` whose `ticket` equals `number` (archive
42
+ excluded). None is not an error — it is the "none" of the table below.
43
+
44
+ ## 2. Route
45
+
46
+ | `why` | The work | Run |
47
+ |---|---|---|
48
+ | `start` | none for this ticket | `/flow-feat-start <number>` — `/flow-bug-start <number>` when `kind` is `bug` |
49
+ | `start` | exists, `pending` set | a stop whose `ask` never landed, or a crash after it: send the same question again — `ask` with `<work>/<pending.question_file>`, `<work>/<pending.options_file>`, `--recommended 1` when that options file is not empty, `--free-text` when `pending.free_text`, `--gate pending.gate` — and end. `pending` stays as it is; nothing is recomputed |
50
+ | `start` | exists, an `mrs[]` entry `published`, or `meta.json.published` true (a work with no `mrs`) | `done` — the summary says it is waiting for that merge; the next launch for it is `merged` |
51
+ | `start` | exists, nothing pending | the phase after `meta.json.phase` on this work's route (`/flow-feat-start` §4 for a feature, `/flow-bug-start`'s routing for a bug, by `size`), or `phase` itself when its own Close never ran. A work folder the orchestrator restored from a study made elsewhere enters here, and is never started a second time |
52
+ | `answer` | `pending` set | apply `<cmd> answer` as flow-core §2.1 "The answer comes back" says, then `pending.resume` at `pending.resume_at`. The order fails or prints nothing → `blocked` |
53
+ | `answer` | nothing pending | `blocked` — there is no question for that answer to decide |
54
+ | `merged` | exists, something published | the entry of `meta.json.mrs` whose `status` is `published` (the only one: one MR/PR per run) becomes `merged`; set `meta.json.base` to the `base` just read; the next startable MR/PR → `/flow-feat-build`; none left, or a work with no `mrs` and `published` true (one MR/PR, every bug) → `phase = done` and `done`, the summary naming the ticket as complete |
55
+ | `merged` | none, or nothing published | `blocked` — nothing of this ticket was published from here |
56
+ | `review` · `pipeline` | any | `blocked` — not supported yet in `unattended`; the reason says so |
57
+
58
+ The phase you hand the run to is unattended too: it reads §2.1, chains as `auto` and makes the
59
+ run's one closing order. This command makes none of its own except the re-sent `ask`, the `blocked`
60
+ and the `done` of the table above.
61
+
62
+ ## 3. Close
63
+
64
+ Nothing to write here beyond the routing above — the phase it hands to owns the artifacts, the
65
+ panel and the closing order. When the route ended the run itself (`ask` → `wait`, `blocked` → `block`,
66
+ `done` → `done`), publish the panel with that `attention` (flow-core §4) and print the §3 header.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-workflows",
3
- "version": "0.83.1",
3
+ "version": "0.84.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.83.1",
6
+ "version": "0.84.0",
7
7
  "author": {
8
8
  "name": "Alberto Vioque",
9
9
  "email": "mashware@gmail.com"
@@ -5,6 +5,31 @@ 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.84.0 — An unattended run talks to its orchestrator through one command · 2026-10-01
9
+
10
+ **In short**
11
+ - **Whoever launches an unattended run now names one command, and flow talks to it through that
12
+ command alone.** Set `autonomy.orchestrator_cmd` (for example `orch`): the run asks it why it was
13
+ launched, reads the ticket and the answer from it, and ends with exactly one order — `ask` a
14
+ question, `publish` the finished work, say it is `blocked`, or say it is `done`.
15
+ - **flow no longer pushes or opens MR/PRs in this mode, and needs no forge credentials.** When the
16
+ work is ready it commits on its own branch and hands over a title and a body; the orchestrator
17
+ pushes the branch and opens the draft. A split task says which part it is (`--part 2 --of 3`).
18
+ - **One entry for every run: `/flow:work:run`.** It starts a new feature or bug from the ticket the
19
+ orchestrator serves, continues after an answer exactly where the run stopped, or builds the next
20
+ part once the previous one merged. Review comments and red pipelines end the run as "not
21
+ supported yet" until the next version.
22
+ - **The stop and answer files are gone** — `.claude/work/stop.json`, `.claude/work/answer.json`, the
23
+ `running` mark, the person pickup and `autonomy.unattended_ship`. A pending question is recorded
24
+ in `meta.json.pending`; every free text (question, options, title, body, reason) travels in a
25
+ file, never on a command line, so a backtick in a ticket title cannot reach a shell.
26
+ - **`unattended` without `orchestrator_cmd` runs nothing** and says why; `/flow:doctor` flags it.
27
+ - The Codex/OpenCode smoke runner now judges the call log of a fake orchestrator
28
+ (`script/tests/fixtures/fake-orchestrator.sh`) instead of the stop file.
29
+
30
+ Breaking for anyone running `unattended` on 0.82/0.83: add `orchestrator_cmd` and launch
31
+ `/flow:work:run`. Nothing changes in `manual`, `guided` or `auto`. Tracked in #177; makes #176 moot.
32
+
8
33
  ## v0.83.1 — Every unattended phase reads its stop-file rules whole · 2026-09-30
9
34
 
10
35
  **In short**
@@ -100,11 +100,10 @@ How much the flow advances on its own vs. stopping to ask you.
100
100
  # auto — as guided, plus auto-resolves the remaining decision points with sensible
101
101
  # (recorded) defaults, chaining phases without pausing.
102
102
  # unattended — as auto, for a run nobody watches (script, container, headless CLI):
103
- # never asks; each hard gate is recorded, becomes a draft MR/PR, or ends
104
- # the run with a question in .claude/work/stop.json for a runner to
105
- # post; its answer comes back in .claude/work/answer.json and the run
106
- # continues, or a person picks it up. One MR/PR per run. Only when set explicitly —
107
- # in a FLOW file only the runner's environment reads.
103
+ # never asks; driven by `orchestrator_cmd`. Each hard gate is recorded or
104
+ # ends the run with one order to that command (ask · publish · blocked ·
105
+ # done); flow never pushes or opens an MR/PR. One MR/PR per run. Only when
106
+ # set explicitly — in a FLOW file only the orchestrator's environment reads.
108
107
  # HARD GATES stop and ask in manual/guided/auto, no exceptions: any push or MR/PR (ship),
109
108
  # branch creation with an ambiguous base, DB schema changes/migrations, a review
110
109
  # with high-severity findings, and the business brief confirmed just before the
@@ -113,10 +112,10 @@ How much the flow advances on its own vs. stopping to ask you.
113
112
  # (panels, challengers, how many reviewers), WIP commits, continuing a train when
114
113
  # the train's next MR/PR in `guided`/`auto`, size confirmation, and anything already decided
115
114
  # and recorded — only new contradicting evidence reopens a settled decision.
116
- - `unattended_ship:` # What `ship` does in `unattended`: `draft` | `stop`. Empty = `stop`.
117
- # draft — push the work branch and open the MR/PR as draft; never merge, never ready.
118
- # stop — nothing is pushed; ship ends the run with a question in stop.json.
119
- # Read only when mode is `unattended`.
115
+ - `orchestrator_cmd:` # Required in `unattended`: the command that run talks to, e.g. `orch`.
116
+ # It says why the run was launched, serves the ticket and the answer, and takes
117
+ # the run's one closing order (`ask`, `publish`, `blocked`, `done`). Read only
118
+ # in that mode. The orders: flow-core §2.1.
120
119
 
121
120
  ## quality
122
121
  Repo commands for quality gates, whatever the stack — `make test`, `./gradlew test`, `dotnet test`,