flow-workflows 0.80.0 → 0.82.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.
- package/adapters/codex/CORE.md +141 -43
- package/adapters/codex/skills/flow-bug-fix/SKILL.md +8 -2
- package/adapters/codex/skills/flow-bug-investigate/SKILL.md +6 -6
- package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/codex/skills/flow-bug-review/SKILL.md +4 -4
- package/adapters/codex/skills/flow-bug-ship/SKILL.md +15 -2
- package/adapters/codex/skills/flow-bug-start/SKILL.md +9 -0
- package/adapters/codex/skills/flow-bug-validate/SKILL.md +2 -2
- package/adapters/codex/skills/flow-doctor/SKILL.md +11 -6
- package/adapters/codex/skills/flow-feat-build/SKILL.md +12 -6
- package/adapters/codex/skills/flow-feat-design/SKILL.md +7 -4
- package/adapters/codex/skills/flow-feat-review/SKILL.md +18 -16
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +41 -3
- package/adapters/codex/skills/flow-feat-start/SKILL.md +14 -0
- package/adapters/codex/skills/flow-feat-validate/SKILL.md +12 -4
- package/adapters/codex/skills/flow-init/SKILL.md +4 -3
- package/adapters/codex/skills/flow-work-README/SKILL.md +2 -3
- package/adapters/codex/skills/flow-work-query/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-resume/SKILL.md +7 -2
- package/adapters/gemini/CORE.md +141 -43
- package/adapters/gemini/commands/flow/bug/fix.toml +8 -2
- package/adapters/gemini/commands/flow/bug/investigate.toml +6 -6
- package/adapters/gemini/commands/flow/bug/postmortem.toml +1 -1
- package/adapters/gemini/commands/flow/bug/review.toml +4 -4
- package/adapters/gemini/commands/flow/bug/ship.toml +15 -2
- package/adapters/gemini/commands/flow/bug/start.toml +9 -0
- package/adapters/gemini/commands/flow/bug/validate.toml +2 -2
- package/adapters/gemini/commands/flow/doctor.toml +11 -6
- package/adapters/gemini/commands/flow/feat/build.toml +12 -6
- package/adapters/gemini/commands/flow/feat/design.toml +7 -4
- package/adapters/gemini/commands/flow/feat/review.toml +18 -16
- package/adapters/gemini/commands/flow/feat/ship.toml +41 -3
- package/adapters/gemini/commands/flow/feat/start.toml +14 -0
- package/adapters/gemini/commands/flow/feat/validate.toml +12 -4
- package/adapters/gemini/commands/flow/init.toml +4 -3
- package/adapters/gemini/commands/flow/work/README.toml +2 -3
- package/adapters/gemini/commands/flow/work/query.toml +1 -1
- package/adapters/gemini/commands/flow/work/resume.toml +7 -2
- package/adapters/hermes/CORE.md +141 -43
- package/adapters/hermes/skills/flow-bug-fix/SKILL.md +8 -2
- package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +6 -6
- package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-bug-review/SKILL.md +4 -4
- package/adapters/hermes/skills/flow-bug-ship/SKILL.md +15 -2
- package/adapters/hermes/skills/flow-bug-start/SKILL.md +9 -0
- package/adapters/hermes/skills/flow-bug-validate/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-doctor/SKILL.md +11 -6
- package/adapters/hermes/skills/flow-feat-build/SKILL.md +12 -6
- package/adapters/hermes/skills/flow-feat-design/SKILL.md +7 -4
- package/adapters/hermes/skills/flow-feat-review/SKILL.md +18 -16
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +41 -3
- package/adapters/hermes/skills/flow-feat-start/SKILL.md +14 -0
- package/adapters/hermes/skills/flow-feat-validate/SKILL.md +12 -4
- package/adapters/hermes/skills/flow-init/SKILL.md +4 -3
- package/adapters/hermes/skills/flow-work-README/SKILL.md +2 -3
- package/adapters/hermes/skills/flow-work-query/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-resume/SKILL.md +7 -2
- package/adapters/opencode/CORE.md +141 -43
- package/adapters/opencode/commands/flow-bug-fix.md +8 -2
- package/adapters/opencode/commands/flow-bug-investigate.md +6 -6
- package/adapters/opencode/commands/flow-bug-postmortem.md +1 -1
- package/adapters/opencode/commands/flow-bug-review.md +4 -4
- package/adapters/opencode/commands/flow-bug-ship.md +15 -2
- package/adapters/opencode/commands/flow-bug-start.md +9 -0
- package/adapters/opencode/commands/flow-bug-validate.md +2 -2
- package/adapters/opencode/commands/flow-doctor.md +11 -6
- package/adapters/opencode/commands/flow-feat-build.md +12 -6
- package/adapters/opencode/commands/flow-feat-design.md +7 -4
- package/adapters/opencode/commands/flow-feat-review.md +18 -16
- package/adapters/opencode/commands/flow-feat-ship.md +41 -3
- package/adapters/opencode/commands/flow-feat-start.md +14 -0
- package/adapters/opencode/commands/flow-feat-validate.md +12 -4
- package/adapters/opencode/commands/flow-init.md +4 -3
- package/adapters/opencode/commands/flow-work-README.md +2 -3
- package/adapters/opencode/commands/flow-work-query.md +1 -1
- package/adapters/opencode/commands/flow-work-resume.md +7 -2
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +39 -0
- package/plugins/flow/examples/FLOW.template.md +12 -3
|
@@ -29,9 +29,9 @@ Implementation phase. Code is written here.
|
|
|
29
29
|
- `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).
|
|
30
30
|
- **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`".)
|
|
31
31
|
- **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`.
|
|
32
|
-
- All `merged` → warn: feature is done, nothing to build.
|
|
33
|
-
- Some `pending` but **none** startable → start nothing: tell the user which MR/PR must merge to unlock the next wave, and stop.
|
|
34
|
-
- **Train/stacked
|
|
32
|
+
- All `merged` → warn: feature is done, nothing to build (in `unattended`: `done`, `detail` saying so).
|
|
33
|
+
- 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.
|
|
34
|
+
- **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.
|
|
35
35
|
|
|
36
36
|
## 2. Business brief (before typing)
|
|
37
37
|
|
|
@@ -61,6 +61,12 @@ Rules for writing it:
|
|
|
61
61
|
|
|
62
62
|
In `auto` this is one of the only two stops per MR/PR (`guided` adds the plan of §2.0ter on a big one), so it carries the **full stop header** (flow-core §3) — ticket, size, phase, `MR #<n> of <N>`, plan state — followed by the brief.
|
|
63
63
|
|
|
64
|
+
In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, mark it
|
|
65
|
+
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
|
|
66
|
+
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
67
|
+
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
68
|
+
of one → stop file, end the run. A person continues from there.
|
|
69
|
+
|
|
64
70
|
**The brief travels inside the question** (flow-core §3): the user reads it in the prompt they are answering, never by opening `05-implementation.md`. Write the file, run whatever you need, and *then* open the gate — **nothing runs between the brief and the question**, because a tool call after it is what lets a terminal fold the brief into one collapsed line, and the gate is answered blind. Options:
|
|
65
71
|
- **Yes, proceed** → start building.
|
|
66
72
|
- **No, something is extra or missing** → the user clarifies, adjust the brief, ask again. **Do not touch code** until the brief is confirmed.
|
|
@@ -184,7 +190,7 @@ said in one line, never silently skipped. `manual` → offer it with `AskUserQue
|
|
|
184
190
|
premise that X before building on it?"). `guided`/`auto` → run it and record it; it is flow
|
|
185
191
|
machinery, not a decision.
|
|
186
192
|
|
|
187
|
-
**The verdict, and the rule that makes it worth running
|
|
193
|
+
**The verdict, and the rule that makes it worth running** (in `unattended`, *Refuted* ends the run as `blocked`, flow-core §2.1). **Refuted** → the brief or the design is
|
|
188
194
|
wrong, not the code: stop, say what fell, and go back (§2.4 for a brief, `/flow-feat-design` for a
|
|
189
195
|
contract) rather than patching around it. **Holds** → one row in §3 with what was read. **Unsettled
|
|
190
196
|
stays unsettled** — the same rule as the query duel's *no number, no win*: it is recorded as an open
|
|
@@ -254,7 +260,7 @@ Warning thresholds:
|
|
|
254
260
|
- **Real lines > `lines_est * 1.5`**, or
|
|
255
261
|
- **Real files > `files_est + 2`**.
|
|
256
262
|
|
|
257
|
-
If either is exceeded, **pause** and ask the user with `AskUserQuestion` (options, in this order):
|
|
263
|
+
If either is exceeded, **pause** and ask the user with `AskUserQuestion` (options, in this order — in `unattended`, take option 2 and record it):
|
|
258
264
|
|
|
259
265
|
1. **Cut here (recommended if the current piece is coherent)**. What is built so far stays as this MR/PR; what remains — the §2.0ter steps still pending, or what is left of `04-mr-plan.md` where that step was skipped — goes into a new one inserted in `meta.json.mrs` right after. Zero code wasted.
|
|
260
266
|
2. **Continue and record the overrun**. When the cut would be artificial. Note the deviation in `05-implementation.md` to calibrate `/flow-feat-plan` on future tickets.
|
|
@@ -281,7 +287,7 @@ slip under a threshold buys itself the review a smaller change had earned.
|
|
|
281
287
|
|
|
282
288
|
### 2.4 Does something fall outside the brief?
|
|
283
289
|
|
|
284
|
-
If during the build the temptation arises to add something **not in the §2 brief** ("while I'm here…", "this test would also cover X…", "this rename would improve Y…"), **pause before doing it** and ask the user with `AskUserQuestion`:
|
|
290
|
+
If during the build the temptation arises to add something **not in the §2 brief** ("while I'm here…", "this test would also cover X…", "this rename would improve Y…"), **pause before doing it** and ask the user with `AskUserQuestion` (in `unattended`: *No, leave it out*, recorded):
|
|
285
291
|
- **Yes, add it to the brief** — update the brief in `05-implementation.md` and continue. (If the addition is large, consider §2.3: it could trigger a MR/PR cut.)
|
|
286
292
|
- **No, leave it out** — note it in the "Ideas for separate tickets" section of `05-implementation.md` **and append it to `meta.json.followups[]`** as `kind: "out-of-scope"`, `source: "build"` (flow-core §7): the section keeps it in context, the record is what survives the archive. **Only when it clears the bar of flow-core §7** — a named subject, a path that has actually been seen, and waiting costing more than doing it now; short of that the artifact section keeps it and `followups[]` never sees it. Continue with the original brief.
|
|
287
293
|
|
|
@@ -22,10 +22,16 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
22
22
|
|
|
23
23
|
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.
|
|
24
24
|
|
|
25
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing. Panel and approach choice run as in
|
|
26
|
+
`auto` · questions the options surfaced (§1.5.5) or an acceptance criterion that is ambiguous (§9) →
|
|
27
|
+
question `clarify` · a size that no longer fits (§1.5.5, §7) → record the new size · a `high`
|
|
28
|
+
challenge with no response (§6) → question `design_challenge`, the findings and their options in the
|
|
29
|
+
stop file · the design review (§9) → recorded as accepted, as in `auto`.
|
|
30
|
+
|
|
25
31
|
## 1. Pre-flight
|
|
26
32
|
|
|
27
33
|
- Load `meta.json` by current branch. Missing → ask the user to start with `/flow-feat-start`.
|
|
28
|
-
- Read `meta.json` and `00-summary.md`; open in full only `01-context.md` (ticket, decisions, contracts received)
|
|
34
|
+
- Read `meta.json` and `00-summary.md`; open in full only `01-context.md` (ticket, decisions, contracts received). (flow-core §5)
|
|
29
35
|
- `size` is `XS` → suggest jumping to `/flow-feat-build` and stop unless the user insists.
|
|
30
36
|
|
|
31
37
|
## 1.5 Approaches — open the option space first (M/L)
|
|
@@ -34,9 +40,6 @@ Design that starts from the first idea is design that never had a second one. **
|
|
|
34
40
|
section; XS and S skip it** and go straight to §2 — the cost does not pay on a change whose shape is
|
|
35
41
|
obvious.
|
|
36
42
|
|
|
37
|
-
*(This was the `feat:brainstorm` command until v0.53.0: a command whose whole output only this one ever
|
|
38
|
-
read.)*
|
|
39
|
-
|
|
40
43
|
**No code, and no design yet.** The output of this section is a ranked set of options and one chosen
|
|
41
44
|
approach; §3 onwards designs *that* approach.
|
|
42
45
|
|
|
@@ -38,7 +38,7 @@ Mandatory review phase. **`/flow-feat-ship` cannot run without passing through h
|
|
|
38
38
|
member runs its own `git diff` and opens the same files pays for that material once per agent, and
|
|
39
39
|
a reviewer that spends its turns exploring has fewer left to review. **Any non-zero exit is a
|
|
40
40
|
fallback, not a failure** — no CLI on the machine, a base that does not resolve, a network that
|
|
41
|
-
cannot reach it: read the diff from git
|
|
41
|
+
cannot reach it: read the diff from git and carry on, once, without retrying variants.
|
|
42
42
|
What is not optional is the `Review path` line of §8: a round that skipped the pack and one that
|
|
43
43
|
used it are indistinguishable from the artifact otherwise, which is how a phase quietly stops
|
|
44
44
|
paying for itself.
|
|
@@ -67,7 +67,7 @@ Mandatory review phase. **`/flow-feat-ship` cannot run without passing through h
|
|
|
67
67
|
|
|
68
68
|
### 1.5 Freeze what you are about to read, and resolve what to compare it against
|
|
69
69
|
|
|
70
|
-
Two questions, answered here and nowhere later: **which tree** this round reads, and **against which base**.
|
|
70
|
+
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.
|
|
71
71
|
|
|
72
72
|
**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:
|
|
73
73
|
|
|
@@ -77,11 +77,11 @@ Two questions, answered here and nowhere later: **which tree** this round reads,
|
|
|
77
77
|
- 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.
|
|
78
78
|
- 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.
|
|
79
79
|
|
|
80
|
-
**The review base.** `reviewed_sha`
|
|
80
|
+
**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:
|
|
81
81
|
|
|
82
82
|
- 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.
|
|
83
83
|
- 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.
|
|
84
|
-
- **A first review has no `reviewed_sha` and reads the whole branch
|
|
84
|
+
- **A first review has no `reviewed_sha` and reads the whole branch**. The delta path only exists after a review that passed.
|
|
85
85
|
- `/flow-feat-review --full` ignores `reviewed_sha` and reads the branch on demand.
|
|
86
86
|
- **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`.
|
|
87
87
|
|
|
@@ -95,7 +95,7 @@ Scope for every reviewer: **the candidate revision of §1.5, against the review
|
|
|
95
95
|
|
|
96
96
|
**The CLI resolves it; you obey the output and record any deviation.** `npx flow-workflows@<version> tier --harness opencode --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.
|
|
97
97
|
|
|
98
|
-
Every step of that is arithmetic
|
|
98
|
+
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.
|
|
99
99
|
|
|
100
100
|
**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.
|
|
101
101
|
|
|
@@ -105,7 +105,7 @@ Every step of that is arithmetic, and the cost of leaving it here was never main
|
|
|
105
105
|
- **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.
|
|
106
106
|
- **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.
|
|
107
107
|
|
|
108
|
-
**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.
|
|
108
|
+
**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.
|
|
109
109
|
|
|
110
110
|
**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.
|
|
111
111
|
|
|
@@ -154,7 +154,7 @@ Launch the reviewers selected in §2.0 and **consolidate their findings into a s
|
|
|
154
154
|
|
|
155
155
|
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.
|
|
156
156
|
|
|
157
|
-
**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
|
|
157
|
+
**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.
|
|
158
158
|
|
|
159
159
|
### 2.2 Design truth vs design rationale (do not inherit rationalizations)
|
|
160
160
|
`03-design.md` goes to reviewers as context, with unequal authority:
|
|
@@ -173,7 +173,7 @@ Only what §2 does **not** already cover; skipped entirely under `light` (§2.0)
|
|
|
173
173
|
|
|
174
174
|
## 3.5. Completeness sweep (anti-abandonment, M/L only)
|
|
175
175
|
|
|
176
|
-
Counters a reviewer abandoning a large diff early. **Only if
|
|
176
|
+
Counters a reviewer abandoning a large diff early. **Only if the effective size of §2.0 is M or L**, and only
|
|
177
177
|
if §2.0b's budget still covers it (it is the first phase dropped).
|
|
178
178
|
|
|
179
179
|
**It runs after §2-§3 are consolidated, never in parallel with them.** The whole phase is an audit of
|
|
@@ -265,7 +265,7 @@ Findings enter the normal flow: §6, then the output. Blinded for the same reaso
|
|
|
265
265
|
|
|
266
266
|
A filter against over-reporting, not a second review; narrow gate. Never runs under `light` (§2.0).
|
|
267
267
|
|
|
268
|
-
**When it runs.** All
|
|
268
|
+
**When it runs.** All four conditions:
|
|
269
269
|
|
|
270
270
|
| Condition | Threshold |
|
|
271
271
|
|---|---|
|
|
@@ -274,7 +274,7 @@ A filter against over-reporting, not a second review; narrow gate. Never runs un
|
|
|
274
274
|
| Findings | **≥ 4** ambiguous findings across §2-§5 |
|
|
275
275
|
| Budget | §2.0b's budget still covers a round (§6 is the second phase dropped) |
|
|
276
276
|
|
|
277
|
-
Read the real diff (`git diff --stat
|
|
277
|
+
Read the real diff (`git diff --stat <review base>...<candidate_sha>`, §1.5), not the recorded size.
|
|
278
278
|
|
|
279
279
|
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.
|
|
280
280
|
|
|
@@ -354,7 +354,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
354
354
|
## Discarded by adversarial verification
|
|
355
355
|
<only if §6 was run; list of refuted findings with reason, or "not applicable">
|
|
356
356
|
<if the `fanout_max` cap left ambiguous findings unverified, list them here as "unverified (cap)">
|
|
357
|
-
<if §6 did not run, one line saying which condition did not hold — size, diff size, or
|
|
357
|
+
<if §6 did not run, one line saying which condition did not hold — size, diff size, count, or budget>
|
|
358
358
|
|
|
359
359
|
## Blockers (must-fix)
|
|
360
360
|
1. [file:line] · <origin> · description + concrete proposal
|
|
@@ -377,14 +377,16 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
377
377
|
- Blockers → **do not advance `phase`**. Leave `phase = "build"`; the user resolves them.
|
|
378
378
|
- 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.
|
|
379
379
|
- **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:
|
|
380
|
-
- `reviewed_sha` = **the candidate of §1.5**, the revision the reviewers actually read. Not `git rev-parse HEAD`, which
|
|
381
|
-
- `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
|
+
- `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.
|
|
381
|
+
- `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.
|
|
382
382
|
- `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.
|
|
383
383
|
- **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.
|
|
384
|
-
|
|
385
|
-
- **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.
|
|
384
|
+
- **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.
|
|
386
385
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
387
386
|
- **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.
|
|
388
387
|
- **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[]`.
|
|
389
388
|
- 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.
|
|
390
|
-
- **Autonomy handoff.** Only when there are **no blockers and no unresolved high-severity findings** — with any of those, stop in every mode (hard gate). 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`.
|
|
389
|
+
- **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`.
|
|
390
|
+
- **In `unattended`** (flow-core §2.1), blockers or unresolved high-severity findings are question
|
|
391
|
+
`high_findings`: the surviving findings in `question`, one line each, and the run ends. A person
|
|
392
|
+
picks it up in a session of their own, where they are fixed and reviewed again.
|
|
@@ -22,6 +22,37 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
22
22
|
|
|
23
23
|
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.
|
|
24
24
|
|
|
25
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing, and it is the only place that run
|
|
26
|
+
pushes. Each place it would ask:
|
|
27
|
+
|
|
28
|
+
- **The MR/PR itself (§3–§4)** — `autonomy.unattended_ship: draft` → skip the confirmation and
|
|
29
|
+
create it **as draft** with the §2 content (§4.1 says how); never merge it, never mark it ready.
|
|
30
|
+
The body gains one line saying an unattended run opened it and nobody confirmed its brief.
|
|
31
|
+
Empty or `stop` → nothing is pushed: question `ship`, the §3 preview as the question, and the run
|
|
32
|
+
ends; a person ships it from a session of their own. Pre-deploy SQL in the branch → question
|
|
33
|
+
`migration`, whatever `unattended_ship` says.
|
|
34
|
+
- **The §1 tree check** — `reviewed_sha` or `validated_sha` behind `HEAD` with more than tests →
|
|
35
|
+
re-run what is behind, **once per MR/PR**: the review on the delta, then `validate`. First record
|
|
36
|
+
`{ "key": "unattended:ship-recheck", "default": "mr <n>", "phase": "ship" }` in
|
|
37
|
+
`meta.json.defaults_used[]` — the record, not the context, is what remembers it; an entry with this
|
|
38
|
+
MR/PR's `n` already there → `blocked`, whatever the sha. Tracked changes this run's own phases left uncommitted → commit them
|
|
39
|
+
as WIP first (a WIP commit is `auto`'s to make) and check again · **blocking TODO/FIXME (§1)** →
|
|
40
|
+
continue and list them in the body.
|
|
41
|
+
- **Posting anything else** — the performance comment (§4.3), a contract handoff (§6.3) — → not
|
|
42
|
+
posted; the numbers go in the body, the handoff stays `pending`.
|
|
43
|
+
- **The offers and surveys (§5, §5.1, §5.2, §5.5, §6.4, §6.4bis)** → `Later`; nothing written outside
|
|
44
|
+
the work folder.
|
|
45
|
+
- **"Was it merged?" (§6.1)** → not merged; `meta.json` as §6.1 says for an unmerged MR/PR. **The
|
|
46
|
+
parent merged first (§6.2.1)** → blocked, never force-push. **Train continuation (§6.2)** → not
|
|
47
|
+
started: one MR/PR per unattended run.
|
|
48
|
+
- **At Close** write the stop file with `reason: "done"`, `mr_url`, and — with `mrs` still pending —
|
|
49
|
+
`detail` naming the next MR/PR and what it waits on (its `depends_on` merged, then
|
|
50
|
+
`/flow-feat-build`). It is the last thing the run does.
|
|
51
|
+
|
|
52
|
+
**In every mode**, criteria `07-validation.md` marks `not-verified-unattended` go into the body under
|
|
53
|
+
`## Not verified — needs a human`, with what to do for each. The §3 preview shows that section like
|
|
54
|
+
any other, and the person reading it is the check the run could not do.
|
|
55
|
+
|
|
25
56
|
## 1. Pre-flight
|
|
26
57
|
|
|
27
58
|
- Read `meta.json` and `00-summary.md`; open in full only the `Brief MR/PR #N` of `05-implementation.md`, the `## Summary`/blockers of `06-review.md` and `07-validation.md`. (flow-core §5)
|
|
@@ -133,7 +164,7 @@ Determine whether the branch modifies the database (migrations, mappings/schema,
|
|
|
133
164
|
|
|
134
165
|
## 3. Show the user and wait for confirmation (MANDATORY)
|
|
135
166
|
|
|
136
|
-
**Never skip this step, even when the content seems obvious.** Hard gate in every mode.
|
|
167
|
+
**Never skip this step, even when the content seems obvious.** Hard gate in every mode — in `unattended`, the unattended paragraph above decides it.
|
|
137
168
|
|
|
138
169
|
Print to the user in this exact format:
|
|
139
170
|
|
|
@@ -174,7 +205,14 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
|
|
|
174
205
|
- Train mode (`stacked_on` ≠ null) → the MR/PR must target that parent branch, not the main base.
|
|
175
206
|
|
|
176
207
|
### 4.1 Create MR/PR
|
|
177
|
-
|
|
208
|
+
**A draft (`unattended`, flow-core §2.1) — read this first: it replaces the invocation below.** Do
|
|
209
|
+
**not** invoke `commit-push-pr`, and do not use the plain CLI fallback below: both open a normal
|
|
210
|
+
MR/PR. Commit, `git push -u origin HEAD`, and create it with the forge CLI and its draft flag
|
|
211
|
+
(`gh pr create --draft`, `glab mr create --draft`, the equivalent elsewhere), assignee and squash as
|
|
212
|
+
below. The forge refusing a draft → `blocked` with its message; never retried without the flag.
|
|
213
|
+
Then record the URL, as the paragraph after the bullets says.
|
|
214
|
+
|
|
215
|
+
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.
|
|
178
216
|
|
|
179
217
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
180
218
|
- `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.
|
|
@@ -467,7 +505,7 @@ Read `meta.json.conventions_candidates[]` (flow-core §8). **No entries with `st
|
|
|
467
505
|
|
|
468
506
|
### 6.4ter Defaults that were used (one line, no question)
|
|
469
507
|
|
|
470
|
-
`meta.json.defaults_used[]` non-empty → **one line** in the Close: how many empty `FLOW.md` keys this
|
|
508
|
+
`meta.json.defaults_used[]` non-empty (keys prefixed `unattended:` not counted) → **one line** in the Close: how many empty `FLOW.md` keys this
|
|
471
509
|
work resolved with their default, and that `/flow-doctor` lists which ones and prints the line to
|
|
472
510
|
paste. Never a list here, and never a question: in `guided`/`auto` not asking is the contract
|
|
473
511
|
(flow-core §0, §2), and in `manual` the phases already offered what they were allowed to offer.
|
|
@@ -25,6 +25,20 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
25
25
|
- **Given** — an identifier in `tracker.prefix` format from `FLOW.md` → *ticket mode* (§2 reads it).
|
|
26
26
|
- **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.
|
|
27
27
|
|
|
28
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing; each place it would ask resolves as
|
|
29
|
+
that table says. Here: a ticket is required — empty, or a tracker read that fails, ends the run
|
|
30
|
+
`blocked` (there is no conversation to draft from and nobody to paste it) · uncommitted changes or a
|
|
31
|
+
branch other than the main one (§5.1) → `blocked`: the runner owns the checkout · cross-repo scope
|
|
32
|
+
(§3.5) → only the repos the ticket names · below-XS (§4) → open the work · `git.worktree: ask`
|
|
33
|
+
(§5.0) → in place · §5.5's linked branch → skipped, it pushes a branch and nothing is pushed before
|
|
34
|
+
`ship` · the tracker transition (§6.5) → as `auto`. **Clarifying questions (§2.1 precedence, §3)
|
|
35
|
+
wait until the branch and the work folder exist** — create them (§5, §6) first, write the questions
|
|
36
|
+
into `01-context.md` under "Decisions clarified at start" as open, then question `clarify` with all
|
|
37
|
+
of them in one stop. Whoever picks the work up is asked them by the next phase, first (flow-core
|
|
38
|
+
§2.1).
|
|
39
|
+
A `blocked` before the folder exists still has the stop file: its path does not depend on the folder
|
|
40
|
+
(flow-core §2.1).
|
|
41
|
+
|
|
28
42
|
## 1. Pre-flight
|
|
29
43
|
|
|
30
44
|
- Read the effective FLOW configuration per flow-core §0; neither base nor active overlay → each
|
|
@@ -151,12 +151,17 @@ Verify `needs-manual` criteria **together with the user**, one or a few at a tim
|
|
|
151
151
|
- **Blocked** → status `unproven`; record why. Does not pass the gate.
|
|
152
152
|
4. Repeat until every `needs-manual` criterion is `proven-manually`, or the user decides to stop (the rest stay `unproven`, which blocks advancing in §7).
|
|
153
153
|
|
|
154
|
+
**In `unattended`** there is nobody to run the check (flow-core §2.1): each `needs-manual` criterion
|
|
155
|
+
gets status `not-verified-unattended` with what a person must do to verify it, and that status does
|
|
156
|
+
**not** block §7 — the MR/PR can only be a draft, and `ship` lists these criteria in its body under
|
|
157
|
+
"Not verified — needs a human". A criterion §3.5 could have driven and did not is still `unproven`.
|
|
158
|
+
|
|
154
159
|
## 5. Manual edge cases
|
|
155
160
|
|
|
156
161
|
If the feature has UI or critical flows:
|
|
157
162
|
- Payments → test with the test cards or credentials the provider publishes for its sandbox (and the harness skill for that provider, if installed).
|
|
158
163
|
- Workers/queues → make sure no jobs are stuck in dead-letter. Stuck jobs that are not yours: do not touch them here.
|
|
159
|
-
- Migrations → run `quality.db_update` from `FLOW.md` (if defined); verify no unexpected schema difference with the comparison command the project uses.
|
|
164
|
+
- Migrations → run `quality.db_update` from `FLOW.md` (if defined; in `unattended`, never — a migration to apply is question `migration`, flow-core §2.1); verify no unexpected schema difference with the comparison command the project uses.
|
|
160
165
|
|
|
161
166
|
## 6. Output
|
|
162
167
|
|
|
@@ -210,11 +215,14 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
210
215
|
## 7. Close
|
|
211
216
|
|
|
212
217
|
- **Do not advance `phase`** if tests are red, regressions are found, or **any acceptance criterion is `unproven`** (no test demonstrably asserts it, and neither §3.5 nor the user confirmed it). The criterion→test mapping is part of the gate — the same "do not advance on red" rule. The user resolves the gap (add the missing test, fix the implementation, or finish the manual verification) and returns to `/flow-feat-validate`.
|
|
213
|
-
- Suite green **and** every acceptance criterion `proven-by-test`, `proven-by-agent` or `proven-manually` → `phase = "validate"`, add to `phases_done`. **Multi-MR/PR work** → also add `validate` to the current `in_progress` MR/PR's own `phases_done` (its `mrs[]` entry) — the per-MR/PR marker `/flow-feat-ship §1` gates on. Suggest `/flow-feat-ship`.
|
|
218
|
+
- Suite green **and** every acceptance criterion `proven-by-test`, `proven-by-agent` or `proven-manually` (in `unattended`, also `not-verified-unattended`, §4) → `phase = "validate"`, add to `phases_done`. **Multi-MR/PR work** → also add `validate` to the current `in_progress` MR/PR's own `phases_done` (its `mrs[]` entry) — the per-MR/PR marker `/flow-feat-ship §1` gates on. Suggest `/flow-feat-ship`.
|
|
214
219
|
- **Record *what* you validated**, in the same write and only when the phase advances: `validated_sha` = `git rev-parse HEAD`, work-level and in this MR/PR's `mrs[]` entry. `/flow-feat-ship §1` reads it to tell "the suite passed here" from "the suite passed on something else".
|
|
215
220
|
- **Unchecked edge cases and open risks become `followups[]` entries** (flow-core §7) before advancing — see the output template above.
|
|
216
221
|
- **Stage what the validation taught** (`knowledge.stage` set; silence by default): a mutation that stayed green, a disguise the scenario wore, a fixture that could not produce the case — findings about how this codebase is tested, not about this diff. Same rule and evidence line as the review's Close.
|
|
217
222
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
218
|
-
- **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
|
|
223
|
+
- **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`.
|
|
224
|
+
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow-feat-ship`, which
|
|
225
|
+
decides from `autonomy.unattended_ship` between a draft MR/PR and a question. It did not advance
|
|
226
|
+
(red suite, a criterion `unproven`) → `blocked`, naming what failed; never chain.
|
|
219
227
|
|
|
220
|
-
In `guided`/`auto` this is, together with the brief in `/flow-feat-build §2`, **the only stop of the whole MR/PR** — everything between them ran
|
|
228
|
+
In `guided`/`auto` this is, together with the brief in `/flow-feat-build §2`, **the only stop of the whole MR/PR** — everything between them ran without a person. It carries the **full stop header** and the body answers, in this order: what is green, what this MR/PR proves and what it does not, and what shipping it takes. Assume the user has read none of the build and review.
|
|
@@ -96,9 +96,10 @@ review, not a questionnaire. Then, and only then, five questions:
|
|
|
96
96
|
in the confirmation screen, not a question.
|
|
97
97
|
3. **Autonomy** (`autonomy.mode`): `manual` *(Recommended)* — stops at each decision, only recommends
|
|
98
98
|
the next command; `guided` — resolves low-risk decisions and chains phases, asks at the real ones;
|
|
99
|
-
`auto` — also resolves the rest with recorded defaults. Explain the hard gates that stop in
|
|
100
|
-
|
|
101
|
-
`auto`
|
|
99
|
+
`auto` — also resolves the rest with recorded defaults. Explain the hard gates that stop in these
|
|
100
|
+
three modes and the list of what `guided`/`auto` never ask (both in the `~/.claude/flow/CORE.opencode.md` §2),
|
|
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
103
|
4. **The quality commands as one block** (`quality.test`, `test_one`, `static_analysis`, `style_fix`,
|
|
103
104
|
`db_update`, `db_diff`) — confirm or edit what §2 found, all in one question, each may stay empty
|
|
104
105
|
(= auto-discover at the moment it is needed). Several suites chain into `test` with `&&`.
|
|
@@ -83,7 +83,6 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
83
83
|
"branch": "{PREFIX}XXXXX-slug",
|
|
84
84
|
"size": "XS" | "S" | "M" | "L",
|
|
85
85
|
"phase": "context" | "design" | "plan" | "build" | "review" | "validate" | "ship" | "investigate" | "fix" | "postmortem" | "done" | "abandoned",
|
|
86
|
-
// retired in v0.53.0 and still read from older works: "brainstorm" → treat as "context", "diagnose" → as "investigate"
|
|
87
86
|
"phases_done": ["context", ...],
|
|
88
87
|
"candidate_sha": "40-char sha the current review froze before reading, or ''",
|
|
89
88
|
"reviewed_sha": "40-char sha the last passing review read, or ''",
|
|
@@ -116,11 +115,11 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
116
115
|
],
|
|
117
116
|
"followups": [
|
|
118
117
|
{ "id": "F1",
|
|
119
|
-
"kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug",
|
|
118
|
+
"kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
|
|
120
119
|
"title": "one line, what would be done",
|
|
121
120
|
"why": "one line, why it was parked and why it still matters",
|
|
122
121
|
"source": "design" | "plan" | "build" | "validate" | "fix" | "postmortem",
|
|
123
|
-
"status": "proposed" | "accepted" | "in_progress" | "declined" | "done",
|
|
122
|
+
"status": "proposed" | "accepted" | "in_progress" | "declined" | "logged" | "done",
|
|
124
123
|
"ticket": null, "work": null, "note": "" }
|
|
125
124
|
],
|
|
126
125
|
"defaults_used": [
|
|
@@ -24,7 +24,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
24
24
|
|
|
25
25
|
Invoked by `/flow-feat-review` and `/flow-bug-review` (duel over the diff), `/flow-work-respond` (a reviewer objected to a query), `/flow-feat-design` (access paths), `/flow-feat-build`, `/flow-feat-validate`. Invoke directly for any doubt outside them (chat question, comment on an open MR/PR, a year-old query).
|
|
26
26
|
|
|
27
|
-
**Autonomy.** Modes as in flow-core §2. The duel, challenger count and whether to measure are flow mechanics — never a question, in any mode. **Hard gates — stop and ask, in every mode:** (1) **creating, seeding or dropping any database, schema or table**, including a throwaway one (§4) — show exact commands and target, never a database the project uses; (2) **any DDL** on a real database (index, column, collation) — the flow's schema gate; (3) editing code (output is a verdict, not a patch); (4) posting anything to an MR/PR or ticket.
|
|
27
|
+
**Autonomy.** Modes as in flow-core §2. The duel, challenger count and whether to measure are flow mechanics — never a question, in any mode. **Hard gates — stop and ask, in every mode:** (1) **creating, seeding or dropping any database, schema or table**, including a throwaway one (§4) — show exact commands and target, never a database the project uses; (2) **any DDL** on a real database (index, column, collation) — the flow's schema gate; (3) editing code (output is a verdict, not a patch); (4) posting anything to an MR/PR or ticket. **In `unattended`** (flow-core §2.1) (1) and (2) are never done: the verdict is schema-only and says so; (3) and (4) do not apply, this command never edits or posts.
|
|
28
28
|
|
|
29
29
|
## 1. Resolve the subject
|
|
30
30
|
|
|
@@ -20,14 +20,17 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, au
|
|
|
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
|
-
Use when returning to a work after a break (next morning, another session)
|
|
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).
|
|
25
|
+
|
|
26
|
+
**In `unattended`** this command asks nothing: recap, name the next step, end. It is how a person
|
|
27
|
+
reads where the run got to, not how the run continues.
|
|
24
28
|
|
|
25
29
|
## 1. Detection
|
|
26
30
|
|
|
27
31
|
- `git branch --show-current`.
|
|
28
32
|
- Search `.claude/work/` for the `meta.json` whose `branch` matches.
|
|
29
33
|
- None found → ask the user for the ticket or whether to start a new one.
|
|
30
|
-
- **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.
|
|
31
34
|
- `meta.json.worktree` non-null and the current directory is not that worktree → tell the user the work lives in a worktree and to `cd <worktree>` before continuing; run the repo-state checks below from there (`git -C <worktree> …`).
|
|
32
35
|
|
|
33
36
|
## 2. Recap
|
|
@@ -44,6 +47,7 @@ Last updated: <updated_at>
|
|
|
44
47
|
Notes: <meta.notes>
|
|
45
48
|
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
|
|
46
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 · `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)
|
|
47
51
|
```
|
|
48
52
|
|
|
49
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.
|
|
@@ -85,6 +89,7 @@ With what is new (there is already work on disk):
|
|
|
85
89
|
|
|
86
90
|
## 4. Next step
|
|
87
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.
|
|
88
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`.
|
|
89
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.
|
|
90
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.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.
|
|
6
|
+
"version": "0.82.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,45 @@ 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.82.0 — Nobody at the terminal, and the run still gets somewhere · 2026-09-29
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **A new autonomy mode, `unattended`, for runs nobody watches** — a script, a container, a headless
|
|
12
|
+
CLI. It behaves like `auto` and never asks. Before, such a run stopped for good at the first hard
|
|
13
|
+
gate: the brief, a serious review finding, `ship`, or any question left in prose for nobody.
|
|
14
|
+
- **It goes as far as it can without a person, and says exactly where it needs one.** The business
|
|
15
|
+
brief is written down and travels in the MR/PR body. `ship` opens a **draft** MR/PR only with
|
|
16
|
+
`autonomy.unattended_ship: draft` — never merged, never marked ready, never force-pushed. A
|
|
17
|
+
migration, serious review findings, a product decision or a doubt about the ticket end the run with
|
|
18
|
+
the question and its options in `.claude/work/stop.json`; a checkout or ticket the run cannot use
|
|
19
|
+
ends it as `blocked`. Nothing that protects the repo is approved in silence.
|
|
20
|
+
- **A runner reads one file.** `.claude/work/stop.json` says `running` while a phase works (left
|
|
21
|
+
behind = the run crashed), then `question`, `blocked` or `done` with the MR/PR. While a question is
|
|
22
|
+
pending no new unattended run goes past it. A person picks the work up in their own session:
|
|
23
|
+
`/flow:work:resume` shows the question, the next phase asks it first, and the file then says
|
|
24
|
+
`picked_up`. Keep `unattended` in a FLOW file only the runner's environment reads.
|
|
25
|
+
- **One MR/PR per run**, and only when written by hand: `unattended` is never inferred from a
|
|
26
|
+
headless harness, `/flow:init` does not offer it, and `manual`, `guided` and `auto` are unchanged.
|
|
27
|
+
|
|
28
|
+
Asked for in #168. Continuing a run automatically from an answer is not in this release.
|
|
29
|
+
|
|
30
|
+
## v0.81.0 — The review stopped contradicting itself · 2026-09-26
|
|
31
|
+
|
|
32
|
+
**In short**
|
|
33
|
+
- **The skeptic round and the coverage sweep open when they should.** Both now read the diff's
|
|
34
|
+
effective size over the range the review froze at the start. Before, one counted "three"
|
|
35
|
+
conditions out of four and measured against the target branch (the whole branch again on a second
|
|
36
|
+
review), and the other gated on the size recorded at `start`.
|
|
37
|
+
- **The shared rules agree with the review on the panel.** A diff just over 150 lines is reviewed at
|
|
38
|
+
`high`, and the project panel joins at 600 — `flow-core` said the panel came in at 150.
|
|
39
|
+
- **Deferred work has one list of states and kinds.** `flow-core` and the `meta.json` reference now
|
|
40
|
+
both list `in_progress`, `logged`, `tooling` and `decision`.
|
|
41
|
+
- **Less history on every run.** The commands no longer tell the model what they were called before
|
|
42
|
+
v0.53.0, the incidents behind a rule or which files were retired; each rule keeps its reason. Works
|
|
43
|
+
still on the retired `brainstorm`/`diagnose` phases are no longer mapped on resume.
|
|
44
|
+
|
|
45
|
+
Found by running Anthropic's prompt-audit guide over `feat:review` and `flow-core` (#164).
|
|
46
|
+
|
|
8
47
|
## v0.80.0 — The advisors were arguing with themselves · 2026-09-25
|
|
9
48
|
|
|
10
49
|
**In short**
|
|
@@ -89,7 +89,7 @@ Branch and Pull/Merge Request conventions.
|
|
|
89
89
|
## autonomy
|
|
90
90
|
How much the flow advances on its own vs. stopping to ask you.
|
|
91
91
|
|
|
92
|
-
- `mode:` # `manual` (default) | `guided` | `auto`. Empty = `manual`.
|
|
92
|
+
- `mode:` # `manual` (default) | `guided` | `auto` | `unattended`. Empty = `manual`.
|
|
93
93
|
# manual — every phase stops at each decision point and, at the end, proposes the
|
|
94
94
|
# next command as a one-click confirmation (you accept to advance, it is
|
|
95
95
|
# never typed for you and never runs without your confirmation).
|
|
@@ -99,7 +99,12 @@ How much the flow advances on its own vs. stopping to ask you.
|
|
|
99
99
|
# automatically (no advance confirmation).
|
|
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 and a person to pick up. One MR/PR per run. Only when set explicitly —
|
|
106
|
+
# in a FLOW file only the runner's environment reads.
|
|
107
|
+
# HARD GATES stop and ask in manual/guided/auto, no exceptions: any push or MR/PR (ship),
|
|
103
108
|
# branch creation with an ambiguous base, DB schema changes/migrations, a review
|
|
104
109
|
# with high-severity findings, and the business brief confirmed just before the
|
|
105
110
|
# first edit in `build`/`fix`.
|
|
@@ -107,6 +112,10 @@ How much the flow advances on its own vs. stopping to ask you.
|
|
|
107
112
|
# (panels, challengers, how many reviewers), WIP commits, continuing a train when
|
|
108
113
|
# the train's next MR/PR in `guided`/`auto`, size confirmation, and anything already decided
|
|
109
114
|
# and recorded — only new contradicting evidence reopens a settled decision.
|
|
115
|
+
- `unattended_ship:` # What `ship` does in `unattended`: `draft` | `stop`. Empty = `stop`.
|
|
116
|
+
# draft — push the work branch and open the MR/PR as draft; never merge, never ready.
|
|
117
|
+
# stop — nothing is pushed; ship ends the run with a question in stop.json.
|
|
118
|
+
# Read only when mode is `unattended`.
|
|
110
119
|
|
|
111
120
|
## quality
|
|
112
121
|
Repo commands for quality gates, whatever the stack — `make test`, `./gradlew test`, `dotnet test`,
|
|
@@ -256,7 +265,7 @@ subagent ignores the value and the step says so once, in one line.
|
|
|
256
265
|
# brings back status plus evidence — job names, exit codes, log tail, run URL — and never
|
|
257
266
|
# rules on it: triage and the merge verdict stay on the main thread whatever this says.
|
|
258
267
|
# Empty = falls back to `agents`, then to what the command runs on, and the dispatch says so
|
|
259
|
-
# in one line — an
|
|
268
|
+
# in one line — an unwatched wait is the one place an unpriced default runs longest.
|
|
260
269
|
|
|
261
270
|
**Three keys, one per kind of subagent — not one per kind of step.** There used to be five —
|
|
262
271
|
`study`, `code`, `test`, `review` — named after phases. They promised a granularity no harness
|