flow-workflows 0.81.0 → 0.82.1
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 +120 -6
- package/adapters/codex/skills/flow-bug-fix/SKILL.md +8 -2
- package/adapters/codex/skills/flow-bug-investigate/SKILL.md +5 -0
- package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/codex/skills/flow-bug-review/SKILL.md +1 -1
- 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 -3
- package/adapters/codex/skills/flow-feat-build/SKILL.md +12 -6
- package/adapters/codex/skills/flow-feat-design/SKILL.md +6 -0
- package/adapters/codex/skills/flow-feat-review/SKILL.md +4 -1
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +43 -3
- package/adapters/codex/skills/flow-feat-start/SKILL.md +14 -0
- package/adapters/codex/skills/flow-feat-validate/SKILL.md +16 -5
- package/adapters/codex/skills/flow-init/SKILL.md +4 -3
- package/adapters/codex/skills/flow-work-query/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-resume/SKILL.md +7 -1
- package/adapters/gemini/CORE.md +120 -6
- package/adapters/gemini/commands/flow/bug/fix.toml +8 -2
- package/adapters/gemini/commands/flow/bug/investigate.toml +5 -0
- package/adapters/gemini/commands/flow/bug/postmortem.toml +1 -1
- package/adapters/gemini/commands/flow/bug/review.toml +1 -1
- 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 -3
- package/adapters/gemini/commands/flow/feat/build.toml +12 -6
- package/adapters/gemini/commands/flow/feat/design.toml +6 -0
- package/adapters/gemini/commands/flow/feat/review.toml +4 -1
- package/adapters/gemini/commands/flow/feat/ship.toml +43 -3
- package/adapters/gemini/commands/flow/feat/start.toml +14 -0
- package/adapters/gemini/commands/flow/feat/validate.toml +16 -5
- package/adapters/gemini/commands/flow/init.toml +4 -3
- package/adapters/gemini/commands/flow/work/query.toml +1 -1
- package/adapters/gemini/commands/flow/work/resume.toml +7 -1
- package/adapters/hermes/CORE.md +120 -6
- package/adapters/hermes/skills/flow-bug-fix/SKILL.md +8 -2
- package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +5 -0
- package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-bug-review/SKILL.md +1 -1
- 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 -3
- package/adapters/hermes/skills/flow-feat-build/SKILL.md +12 -6
- package/adapters/hermes/skills/flow-feat-design/SKILL.md +6 -0
- package/adapters/hermes/skills/flow-feat-review/SKILL.md +4 -1
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +43 -3
- package/adapters/hermes/skills/flow-feat-start/SKILL.md +14 -0
- package/adapters/hermes/skills/flow-feat-validate/SKILL.md +16 -5
- package/adapters/hermes/skills/flow-init/SKILL.md +4 -3
- package/adapters/hermes/skills/flow-work-query/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-resume/SKILL.md +7 -1
- package/adapters/opencode/CORE.md +120 -6
- package/adapters/opencode/commands/flow-bug-fix.md +8 -2
- package/adapters/opencode/commands/flow-bug-investigate.md +5 -0
- package/adapters/opencode/commands/flow-bug-postmortem.md +1 -1
- package/adapters/opencode/commands/flow-bug-review.md +1 -1
- 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 -3
- package/adapters/opencode/commands/flow-feat-build.md +12 -6
- package/adapters/opencode/commands/flow-feat-design.md +6 -0
- package/adapters/opencode/commands/flow-feat-review.md +4 -1
- package/adapters/opencode/commands/flow-feat-ship.md +43 -3
- package/adapters/opencode/commands/flow-feat-start.md +14 -0
- package/adapters/opencode/commands/flow-feat-validate.md +16 -5
- package/adapters/opencode/commands/flow-init.md +4 -3
- package/adapters/opencode/commands/flow-work-query.md +1 -1
- package/adapters/opencode/commands/flow-work-resume.md +7 -1
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +36 -0
- package/plugins/flow/examples/FLOW.template.md +12 -3
|
@@ -24,6 +24,39 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
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.
|
|
36
|
+
- **The §1 tree check** — `reviewed_sha` or `validated_sha` behind `HEAD` with more than tests →
|
|
37
|
+
re-run what is behind, **once per MR/PR**: the review on the delta, then `validate`. First record
|
|
38
|
+
`{ "key": "unattended:ship-recheck", "default": "mr <n>", "phase": "ship" }` in
|
|
39
|
+
`meta.json.defaults_used[]` — the record, not the context, is what remembers it; an entry with this
|
|
40
|
+
MR/PR's `n` already there → `blocked`, whatever the sha. Tracked changes this run's own phases left uncommitted → commit them
|
|
41
|
+
as WIP first (a WIP commit is `auto`'s to make) and check again · **blocking TODO/FIXME (§1)** →
|
|
42
|
+
continue and list them in the body.
|
|
43
|
+
- **Posting anything else** — the performance comment (§4.3), a contract handoff (§6.3) — → not
|
|
44
|
+
posted; the numbers go in the body, the handoff stays `pending`.
|
|
45
|
+
- **The offers and surveys (§5, §5.1, §5.2, §5.5, §6.4, §6.4bis)** → `Later`; nothing written outside
|
|
46
|
+
the work folder.
|
|
47
|
+
- **"Was it merged?" (§6.1)** → not merged; `meta.json` as §6.1 says for an unmerged MR/PR. **The
|
|
48
|
+
parent merged first (§6.2.1)** → blocked, never force-push. **Train continuation (§6.2)** → not
|
|
49
|
+
started: one MR/PR per unattended run.
|
|
50
|
+
- **At Close** write the stop file with `reason: "done"`, `mr_url`, and — with `mrs` still pending —
|
|
51
|
+
`detail` naming the next MR/PR and what it waits on (its `depends_on` merged, then
|
|
52
|
+
`/flow-feat-build`). It is the last thing the run does.
|
|
53
|
+
|
|
54
|
+
**In every mode**, criteria `07-validation.md` marks `not-verified-unattended` go into the body under
|
|
55
|
+
`## Not verified — needs a human`, with what to do for each — and so do the tests the suite left red
|
|
56
|
+
because they also fail on the base (`unattended:validate-red-base`): each name, and the base sha
|
|
57
|
+
where it failed too. The §3 preview shows that section like
|
|
58
|
+
any other, and the person reading it is the check the run could not do.
|
|
59
|
+
|
|
27
60
|
## 1. Pre-flight
|
|
28
61
|
|
|
29
62
|
- 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)
|
|
@@ -135,7 +168,7 @@ Determine whether the branch modifies the database (migrations, mappings/schema,
|
|
|
135
168
|
|
|
136
169
|
## 3. Show the user and wait for confirmation (MANDATORY)
|
|
137
170
|
|
|
138
|
-
**Never skip this step, even when the content seems obvious.** Hard gate in every mode.
|
|
171
|
+
**Never skip this step, even when the content seems obvious.** Hard gate in every mode — in `unattended`, the unattended paragraph above decides it.
|
|
139
172
|
|
|
140
173
|
Print to the user in this exact format:
|
|
141
174
|
|
|
@@ -176,7 +209,14 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
|
|
|
176
209
|
- Train mode (`stacked_on` ≠ null) → the MR/PR must target that parent branch, not the main base.
|
|
177
210
|
|
|
178
211
|
### 4.1 Create MR/PR
|
|
179
|
-
|
|
212
|
+
**A draft (`unattended`, flow-core §2.1) — read this first: it replaces the invocation below.** Do
|
|
213
|
+
**not** invoke `commit-push-pr`, and do not use the plain CLI fallback below: both open a normal
|
|
214
|
+
MR/PR. Commit, `git push -u origin HEAD`, and create it with the forge CLI and its draft flag
|
|
215
|
+
(`gh pr create --draft`, `glab mr create --draft`, the equivalent elsewhere), assignee and squash as
|
|
216
|
+
below. The forge refusing a draft → `blocked` with its message; never retried without the flag.
|
|
217
|
+
Then record the URL, as the paragraph after the bullets says.
|
|
218
|
+
|
|
219
|
+
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.
|
|
180
220
|
|
|
181
221
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
182
222
|
- `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.
|
|
@@ -469,7 +509,7 @@ Read `meta.json.conventions_candidates[]` (flow-core §8). **No entries with `st
|
|
|
469
509
|
|
|
470
510
|
### 6.4ter Defaults that were used (one line, no question)
|
|
471
511
|
|
|
472
|
-
`meta.json.defaults_used[]` non-empty → **one line** in the Close: how many empty `FLOW.md` keys this
|
|
512
|
+
`meta.json.defaults_used[]` non-empty (keys prefixed `unattended:` not counted) → **one line** in the Close: how many empty `FLOW.md` keys this
|
|
473
513
|
work resolved with their default, and that `/flow-doctor` lists which ones and prints the line to
|
|
474
514
|
paste. Never a list here, and never a question: in `guided`/`auto` not asking is the contract
|
|
475
515
|
(flow-core §0, §2), and in `manual` the phases already offered what they were allowed to offer.
|
|
@@ -27,6 +27,20 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
27
27
|
- **Given** — an identifier in `tracker.prefix` format from `FLOW.md` → *ticket mode* (§2 reads it).
|
|
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
|
+
**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).
|
|
41
|
+
A `blocked` before the folder exists still has the stop file: its path does not depend on the folder
|
|
42
|
+
(flow-core §2.1).
|
|
43
|
+
|
|
30
44
|
## 1. Pre-flight
|
|
31
45
|
|
|
32
46
|
- Read the effective FLOW configuration per flow-core §0; neither base nor active overlay → each
|
|
@@ -153,12 +153,17 @@ Verify `needs-manual` criteria **together with the user**, one or a few at a tim
|
|
|
153
153
|
- **Blocked** → status `unproven`; record why. Does not pass the gate.
|
|
154
154
|
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).
|
|
155
155
|
|
|
156
|
+
**In `unattended`** there is nobody to run the check (flow-core §2.1): each `needs-manual` criterion
|
|
157
|
+
gets status `not-verified-unattended` with what a person must do to verify it, and that status does
|
|
158
|
+
**not** block §7 — the MR/PR can only be a draft, and `ship` lists these criteria in its body under
|
|
159
|
+
"Not verified — needs a human". A criterion §3.5 could have driven and did not is still `unproven`.
|
|
160
|
+
|
|
156
161
|
## 5. Manual edge cases
|
|
157
162
|
|
|
158
163
|
If the feature has UI or critical flows:
|
|
159
164
|
- Payments → test with the test cards or credentials the provider publishes for its sandbox (and the harness skill for that provider, if installed).
|
|
160
165
|
- Workers/queues → make sure no jobs are stuck in dead-letter. Stuck jobs that are not yours: do not touch them here.
|
|
161
|
-
- Migrations → run `quality.db_update` from `FLOW.md` (if defined); verify no unexpected schema difference with the comparison command the project uses.
|
|
166
|
+
- 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.
|
|
162
167
|
|
|
163
168
|
## 6. Output
|
|
164
169
|
|
|
@@ -212,11 +217,17 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
212
217
|
## 7. Close
|
|
213
218
|
|
|
214
219
|
- **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`.
|
|
215
|
-
- 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`.
|
|
220
|
+
- 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`.
|
|
216
221
|
- **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".
|
|
217
222
|
- **Unchecked edge cases and open risks become `followups[]` entries** (flow-core §7) before advancing — see the output template above.
|
|
218
223
|
- **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.
|
|
219
224
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
220
|
-
- **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
|
|
221
|
-
|
|
222
|
-
|
|
225
|
+
- **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`.
|
|
226
|
+
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow-feat-ship`, which
|
|
227
|
+
decides from `autonomy.unattended_ship` between a draft MR/PR and a question. It did not advance
|
|
228
|
+
(red suite, a criterion `unproven`) → `blocked`, naming what failed; never chain. A red suite
|
|
229
|
+
advances only under the base exception of flow-core §2.1: run the failing tests on the base, and
|
|
230
|
+
write each name, its result there and the base sha under "Suite results" in `07-validation.md`.
|
|
231
|
+
Calling a failure "pre-existing" without that run is not the exception — it is a red suite.
|
|
232
|
+
|
|
233
|
+
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.
|
|
@@ -98,9 +98,10 @@ review, not a questionnaire. Then, and only then, five questions:
|
|
|
98
98
|
in the confirmation screen, not a question.
|
|
99
99
|
3. **Autonomy** (`autonomy.mode`): `manual` *(Recommended)* — stops at each decision, only recommends
|
|
100
100
|
the next command; `guided` — resolves low-risk decisions and chains phases, asks at the real ones;
|
|
101
|
-
`auto` — also resolves the rest with recorded defaults. Explain the hard gates that stop in
|
|
102
|
-
|
|
103
|
-
`auto`
|
|
101
|
+
`auto` — also resolves the rest with recorded defaults. Explain the hard gates that stop in these
|
|
102
|
+
three modes and the list of what `guided`/`auto` never ask (both in the `~/.claude/flow/CORE.hermes.md` §2),
|
|
103
|
+
so `auto` runs without a stop between the brief and `ship`. Do not offer `unattended`: it is for a
|
|
104
|
+
runner, written by hand where only the runner reads it. Editable any time. Empty = `manual`.
|
|
104
105
|
4. **The quality commands as one block** (`quality.test`, `test_one`, `static_analysis`, `style_fix`,
|
|
105
106
|
`db_update`, `db_diff`) — confirm or edit what §2 found, all in one question, each may stay empty
|
|
106
107
|
(= auto-discover at the moment it is needed). Several suites chain into `test` with `&&`.
|
|
@@ -26,7 +26,7 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
26
26
|
|
|
27
27
|
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).
|
|
28
28
|
|
|
29
|
-
**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.
|
|
29
|
+
**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.
|
|
30
30
|
|
|
31
31
|
## 1. Resolve the subject
|
|
32
32
|
|
|
@@ -22,7 +22,11 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, auto
|
|
|
22
22
|
|
|
23
23
|
**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.
|
|
24
24
|
|
|
25
|
-
Use when returning to a work after a break (next morning, another session)
|
|
25
|
+
Use when returning to a work after a break (next morning, another session) — including a work an
|
|
26
|
+
unattended run left waiting on a person (flow-core §2.1).
|
|
27
|
+
|
|
28
|
+
**In `unattended`** this command asks nothing: recap, name the next step, end. It is how a person
|
|
29
|
+
reads where the run got to, not how the run continues.
|
|
26
30
|
|
|
27
31
|
## 1. Detection
|
|
28
32
|
|
|
@@ -45,6 +49,7 @@ Last updated: <updated_at>
|
|
|
45
49
|
Notes: <meta.notes>
|
|
46
50
|
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
|
|
47
51
|
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)
|
|
52
|
+
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)
|
|
48
53
|
```
|
|
49
54
|
|
|
50
55
|
- `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.
|
|
@@ -86,6 +91,7 @@ With what is new (there is already work on disk):
|
|
|
86
91
|
|
|
87
92
|
## 4. Next step
|
|
88
93
|
|
|
94
|
+
- 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.
|
|
89
95
|
- 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`.
|
|
90
96
|
- §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.
|
|
91
97
|
- `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.
|
|
@@ -16,7 +16,7 @@ Every `/flow-*` command assumes these rules. They are stated once, here, so a co
|
|
|
16
16
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
17
17
|
`flow-core`" means this file.
|
|
18
18
|
|
|
19
|
-
**This file belongs to flow `0.
|
|
19
|
+
**This file belongs to flow `0.82.1`.** Compare it once, at the start of the session, against
|
|
20
20
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
21
21
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
22
22
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -177,15 +177,20 @@ line: the wait inherits this thread's model because no key is set. Name the key,
|
|
|
177
177
|
|
|
178
178
|
## 2. Autonomy — `autonomy.mode`
|
|
179
179
|
|
|
180
|
-
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
180
|
+
`manual` (default) · `guided` · `auto` · `unattended`. Read it once and apply it throughout the command.
|
|
181
181
|
|
|
182
182
|
| Mode | Decisions | End of the command |
|
|
183
183
|
|---|---|---|
|
|
184
184
|
| `manual` | Stop at every decision point | Propose the next command with one `AskUserQuestion` (recommended step as default). Invoke it only on confirmation. Never make the user type it. |
|
|
185
185
|
| `guided` | Resolve low-risk, unambiguous ones with the recommended default and **record** the choice in the phase artifact. Ask at genuine decision points. | Chain into the recommended next command automatically — the call that starts it first, no closing report before it (§3). |
|
|
186
186
|
| `auto` | As `guided`, plus resolve the remaining decision points with sensible, recorded defaults. | Chain without pausing, same rule. |
|
|
187
|
+
| `unattended` | As `auto`, for a run **nobody is watching** (a script, a container, a headless CLI). Every place `auto` would still stop for a person resolves by §2.1 instead. | Chain as `auto`; the run ends at a **stop file** (§2.1), never at a question. |
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
`unattended` is never inferred — not from a headless harness, not from a missing terminal. It is
|
|
190
|
+
the value someone wrote in the FLOW config, or it is not in effect.
|
|
191
|
+
|
|
192
|
+
**Hard gates — in `manual`, `guided` and `auto`, stop and ask, no exceptions** (in `unattended`
|
|
193
|
+
each one resolves as §2.1's table says — never approved in silence):
|
|
189
194
|
1. Any push or MR/PR creation (all of `ship`).
|
|
190
195
|
2. Creating or switching a branch when the base is ambiguous (not on a clean main, or a possible train/stacked branch).
|
|
191
196
|
3. DB schema changes or migrations.
|
|
@@ -210,7 +215,112 @@ sensible default and record it.
|
|
|
210
215
|
delegation removes. Take it, record it. What is still asked in `manual` is whatever the evidence
|
|
211
216
|
turns out to call for, once it is back.
|
|
212
217
|
|
|
213
|
-
Asking these anyway is how
|
|
218
|
+
Asking these anyway is how a run in `guided`/`auto` degrades into a manual one.
|
|
219
|
+
|
|
220
|
+
### 2.1 `unattended` — where a person would have been asked
|
|
221
|
+
|
|
222
|
+
Nobody answers a question in this mode. A question tool — `AskUserQuestion`, OpenCode's `question`,
|
|
223
|
+
whatever the harness calls it — either blocks a run that has no one to unblock it or, in print mode,
|
|
224
|
+
ends it with a question nobody reads. So **no question tool is ever called in `unattended`**, and a
|
|
225
|
+
question in prose is not a substitute. The run goes as far as it can without a person, and where it
|
|
226
|
+
needs one it **stops and says exactly what for**. It never answers for them. Each place a command
|
|
227
|
+
would have asked resolves one of three ways:
|
|
228
|
+
|
|
229
|
+
- **record** — take the resolution the table names, write it where the phase keeps its decisions,
|
|
230
|
+
add `{ "key": "unattended:<site>", "default": "<resolution>", "phase": "<phase>" }` to
|
|
231
|
+
`meta.json.defaults_used[]` (the prefix says it is not a FLOW key), and continue.
|
|
232
|
+
- **question** — a decision only a person can take. Write the stop file with `reason: "question"`,
|
|
233
|
+
the question and its options as `AskUserQuestion` would have carried them, set the panel's
|
|
234
|
+
`attention` to `wait`, and **end the run**: no further phase starts. A person picks the work up
|
|
235
|
+
in a session of their own, in any other mode, and the next phase asks them (below).
|
|
236
|
+
- **blocked** — something the run cannot get past (the environment, a tool, a check that keeps
|
|
237
|
+
failing). The stop file with `reason: "blocked"` and a one-line `detail`, `attention: block`, end
|
|
238
|
+
the run.
|
|
239
|
+
|
|
240
|
+
The §3 stop header is still printed at every stop — a log is the only screen that run has.
|
|
241
|
+
|
|
242
|
+
| Where | In `unattended` |
|
|
243
|
+
|---|---|
|
|
244
|
+
| Business brief before code (`build`, `fix`) | record — the brief is written to the phase artifact, marked `recorded (unattended)`, and travels in the MR/PR body |
|
|
245
|
+
| Push and MR/PR creation (`ship`) | `autonomy.unattended_ship: draft` → push the work branch and create the MR/PR **as draft**; never merge, never mark it ready; the forge refusing a draft → blocked, never retried as a normal one. Empty or `stop` → question `ship` |
|
|
246
|
+
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run |
|
|
247
|
+
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
248
|
+
| `validate` with a red suite or a criterion `unproven` | blocked — the phase does not advance and does not chain. **One exception, and it is measured, never judged**: every failing test also fails, under the same name, on the base (`git merge-base HEAD <git.default_base>`, run in a detached worktree), none of them lives in a file this diff touches, and none is the test that proves an acceptance criterion → record `{"key":"unattended:validate-red-base","default":"<n> red on HEAD and on base <short sha>: <test names>","phase":"validate"}` and advance; `ship` lists those tests under "Not verified — needs a human". Short of all three — a failure the base does not reproduce, a base that cannot be run, a test this diff touched — blocked |
|
|
249
|
+
| A product decision (§7 `decision`) | question `decision` |
|
|
250
|
+
| Clarifying questions on the ticket (`start`) | question `clarify` — after the branch and the work folder exist, with the questions also written to `01-context.md` |
|
|
251
|
+
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
252
|
+
| No ticket, a tracker read that fails, a checkout that is not a clean default base (`start`) | blocked — the runner owns the checkout and the ticket |
|
|
253
|
+
| Below-XS check (`start`) | record — open the work |
|
|
254
|
+
| "Create the branch?" (`start`), the 2–3 line note an XS `build`/`fix` asks for, a contract the design left in prose (`build`) | record — create it · write the note from the ticket · convert it to literal and say so in the artifact |
|
|
255
|
+
| `git.worktree: ask` | record — in place |
|
|
256
|
+
| Cross-repo scope (`start`) | record — only the repos the ticket names |
|
|
257
|
+
| Criteria that need a person to verify (`validate`) | record — `not-verified-unattended`; every later `ship`, in any mode, lists them in the body under "Not verified — needs a human" |
|
|
258
|
+
| The query duel needs a database (`review`, `query`) | record — schema-only verdict; never create or seed a database |
|
|
259
|
+
| "Was it merged?" (`ship` close) | record — not merged |
|
|
260
|
+
| The next MR/PR of a train (`ship` close) | record — not started: one MR/PR per unattended run |
|
|
261
|
+
| `build` with no startable MR/PR (its `depends_on` not `merged` in `meta.json`) | blocked — the detail names what must merge; an unattended `build` never stacks a branch on another, and never creates a remote branch |
|
|
262
|
+
| The parent of a stacked MR/PR merged — rebase and force-push | blocked — never force-push unattended |
|
|
263
|
+
| Any offer about the work's own bookkeeping — a tracker issue, the first `KNOWLEDGE.md` or a knowledge save, a FLOW convention, an agent lesson or a saved specialist, the follow-up survey, carrying files over from the main checkout, a contract handoff, archiving the work | record — `Later`; nothing written outside the work folder |
|
|
264
|
+
| A step the command cannot complete (a red suite it cannot fix, a tool missing, auth failing, the same check failing a second time) | blocked |
|
|
265
|
+
| Anything `auto` already decides on its own (size, flow mechanics, WIP commits, the next command) | as `auto` |
|
|
266
|
+
|
|
267
|
+
A place where `auto` would still ask and this table does not name is a **question** — the
|
|
268
|
+
conservative reading, never a guess dressed as a default.
|
|
269
|
+
|
|
270
|
+
**The stop file** — `.claude/work/stop.json`, at the root of the main checkout (§0: the repo root is
|
|
271
|
+
the main checkout's, whichever worktree the phase runs in). One fixed path, so a runner finds it
|
|
272
|
+
without knowing the work's folder, and `start` can write it before that folder exists. Written
|
|
273
|
+
whole, every time, with every field — by unattended runs, and outside that mode only to mark it
|
|
274
|
+
`picked_up` (below). **One unattended run per repository**: its
|
|
275
|
+
worktrees all share this file. A clean-tree check never counts `.claude/work/` — the flow's own
|
|
276
|
+
folder.
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{"reason": "question",
|
|
280
|
+
"phase": "build",
|
|
281
|
+
"gate": "migration",
|
|
282
|
+
"ticket": "168",
|
|
283
|
+
"work": "168-unattended-autonomy-mode",
|
|
284
|
+
"branch": "168-unattended-autonomy-mode",
|
|
285
|
+
"worktree": null,
|
|
286
|
+
"question": "The design adds a nullable column `mails.opened_at` and its migration. Write and apply it?",
|
|
287
|
+
"options": [{"label": "Write and apply it", "recommended": true}, {"label": "Change the design first"}],
|
|
288
|
+
"mr_url": null,
|
|
289
|
+
"detail": null,
|
|
290
|
+
"at": "2026-09-29T14:30:00+02:00"}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
- `reason`: `running` · `question` · `blocked` · `done` · `picked_up`. It mirrors the panel's `attention` (§4.2):
|
|
294
|
+
`question` ↔ `wait`, `blocked` ↔ `block`, `done` ↔ `done`, `running` and `picked_up` ↔ absent.
|
|
295
|
+
Set both in the same step.
|
|
296
|
+
- `work`, `branch`, `worktree`: where the person picks it up — `null` for the ones that do not exist
|
|
297
|
+
yet when `start` stops early.
|
|
298
|
+
- `gate`: the site's id from the table, or `null`. `question` and `options` carry the whole question,
|
|
299
|
+
the recommended option first — whoever reads it has not seen this session.
|
|
300
|
+
- `done` is written when the run's work is over: the MR/PR created (`mr_url` set; with a train,
|
|
301
|
+
`detail` says which MR/PR comes next and what it waits on), or a phase that finds nothing to do
|
|
302
|
+
(every MR/PR merged, a work already shipped) — `detail` says which. **No unattended phase ends
|
|
303
|
+
with `running` in the file**: every ending is one of `question`, `blocked` or `done`.
|
|
304
|
+
- `at` from the real clock (`date -Iseconds`).
|
|
305
|
+
|
|
306
|
+
**Every phase that starts in this mode writes `reason: "running"` first** — the whole file, `work`,
|
|
307
|
+
`branch` and `worktree` included — unless it holds a `question`, for this work or any other: no
|
|
308
|
+
person has answered it yet, and the file is the only record of it, so say so and end the run,
|
|
309
|
+
touching nothing. One question at a time per repository. (A `blocked` is overwritten: running
|
|
310
|
+
again *is* its retry, once the runner has fixed what it named.) A run that dies therefore leaves
|
|
311
|
+
`running` behind. For the runner: `running` at exit is a crash; a `question` older than the run's
|
|
312
|
+
own start is the earlier stop, still waiting, and the run refused to go past it.
|
|
313
|
+
|
|
314
|
+
**A person picks it up in any other mode.** `/flow-work-resume` names the pending stop in its
|
|
315
|
+
recap, and **the next phase that runs on that work** (`stop.json.work` is this one — never another
|
|
316
|
+
work's) **asks it first** — the question, verbatim, with its options — before doing anything else,
|
|
317
|
+
then overwrites the file with `reason: "picked_up"`. The answer decides what happens next, as any
|
|
318
|
+
answer does: *go on* → the phase goes on; *change the design*, *fix them* → the phase does that
|
|
319
|
+
instead (back to `design`, fix and review again). A `ship` question is not replayed: `ship`'s own
|
|
320
|
+
preview asks it, fresh. **The person's session must not itself be `unattended`**: set the mode where
|
|
321
|
+
only the runner reads it — a FLOW file the runner's own environment writes (its container, its CI
|
|
322
|
+
checkout), or the overlay of a harness only the runner uses. `/flow-doctor` says which file the
|
|
323
|
+
mode came from.
|
|
214
324
|
|
|
215
325
|
## 3. Reporting — how every stop reads
|
|
216
326
|
|
|
@@ -233,6 +343,9 @@ terminal by construction, the turn is over before you notice.
|
|
|
233
343
|
the answer arrives, before the work resumes (§4.4e).
|
|
234
344
|
- **Stopping? Then say so.** `I need:` names the decision or the action you are waiting on. It
|
|
235
345
|
never announces that you are continuing — if you were, you would not be writing this header.
|
|
346
|
+
- **In `unattended`, the stop is the stop file** (§2.1): write it, set the panel's `attention`,
|
|
347
|
+
end the run. The header below is still printed — a log is the only screen that run has — but
|
|
348
|
+
nothing in it is asked.
|
|
236
349
|
|
|
237
350
|
The user comes back to a screen they walked away from, often with other works in other panes.
|
|
238
351
|
They have read none of your tool calls, subagent reports or artifacts. So every stop **opens with
|
|
@@ -251,7 +364,7 @@ I need: <one line — the decision or action you are waiting on>
|
|
|
251
364
|
- **Short lines.** One or two lines of headline, then two to five bullets, one idea each. No "for context", no restating an earlier stop. When the user asks a technical question, answer it in full.
|
|
252
365
|
- **Out of the chat, into the artifact:** your own process, your mistakes, corrections to subagent reports, bookkeeping. Subagent completion or idle notifications never earn a turn of their own.
|
|
253
366
|
- **Zero-context rule.** First mention of an identifier carries 4–6 words of what it is. Never cite a section number without naming what it is. No jargon the user has not used first.
|
|
254
|
-
- **If it is a question, it is `AskUserQuestion
|
|
367
|
+
- **If it is a question, it is `AskUserQuestion`** — in `unattended`, the stop file (§2.1). Never end a message with a question in prose. If it does not deserve the menu, it is a decision you take and record.
|
|
255
368
|
- **What the question is about travels with the question.** A brief, an MR/PR body, a plan, a finding: put it where the user answers it — in the question text and its options — and not only in the prose above. **Nothing runs between the two**: a tool call after that prose is what makes a terminal fold it away, and the last thing a chat UI collapses is exactly the thing they were asked to read. A gate answered without seeing what it was about is not a gate; "it is in `05-implementation.md`" is not showing it, because the answer then costs opening an editor and finding the file. Too long for the harness's question → print it as the **last** thing before asking, tool calls already done.
|
|
256
369
|
|
|
257
370
|
## 4. Live panel — over the terminal's MCP, or `panel.json`
|
|
@@ -723,7 +836,8 @@ reader of `05-implementation.md` still sees the ideas in context.
|
|
|
723
836
|
ships, gets reviewed, and comes back as a ticket that costs a whole work to answer what was two
|
|
724
837
|
minutes of the user's. The test is one line: **if the answer changes what the code being written
|
|
725
838
|
does now, ask now; if it changes what someone builds later, record it.** Asked now means one
|
|
726
|
-
`AskUserQuestion` the moment it surfaces, **in every `autonomy.mode`, `auto` included**
|
|
839
|
+
`AskUserQuestion` the moment it surfaces, **in every `autonomy.mode`, `auto` included** (in
|
|
840
|
+
`unattended`, a `decision` question in the stop file, §2.1) — the
|
|
727
841
|
never-ask list of §2 is about flow mechanics, and a product decision is the opposite of mechanics —
|
|
728
842
|
phrased as the question itself with the options that were on the table, recommended one first. The
|
|
729
843
|
answer goes where the phase keeps its decisions (the brief in `04-fix.md`, the ADR-light in
|
|
@@ -50,6 +50,12 @@ What is NOT touched:
|
|
|
50
50
|
|
|
51
51
|
In `auto` this is one of the only two stops of the whole flow (this one and `ship`; `guided` adds the plan of §2.0bis on a fix of more than two steps): open with the **full stop header** (flow-core §3), then the brief.
|
|
52
52
|
|
|
53
|
+
In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, mark it
|
|
54
|
+
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and fix.
|
|
55
|
+
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
56
|
+
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
57
|
+
of one → stop file, end the run. A person continues from there.
|
|
58
|
+
|
|
53
59
|
**The brief travels inside the question** (flow-core §3) — read in the prompt being answered, not by opening `04-fix.md` — and **nothing runs between the brief and the question**: a tool call after it is what lets a terminal fold it away. Options:
|
|
54
60
|
- **Yes, go ahead** → apply the fix.
|
|
55
61
|
- **No, something is missing or wrong** → adjust the brief, ask again. No code until confirmed.
|
|
@@ -116,13 +122,13 @@ the fix is minimal precisely because it trusts that. When the fix depends on X b
|
|
|
116
122
|
cause and the investigation's evidence does not close that — one reproduction, a correlation, a
|
|
117
123
|
`git blame` that fits the story — that is the premise, and one skeptic on it costs less than the
|
|
118
124
|
second regression. **Refuted** → back to `/flow-bug-investigate`, never a second patch layered on
|
|
119
|
-
the first. **Unsettled** → recorded in `04-fix.md` under "Premises the fix depends on" and carried
|
|
125
|
+
the first (in `unattended`, the run ends `blocked` there, flow-core §2.1). **Unsettled** → recorded in `04-fix.md` under "Premises the fix depends on" and carried
|
|
120
126
|
into the stop, because `/flow-bug-validate` writes a regression test against the cause the fix
|
|
121
127
|
assumed.
|
|
122
128
|
|
|
123
129
|
## 2.3 Something outside the brief comes up?
|
|
124
130
|
|
|
125
|
-
Anything **not in the §2 brief** ("while I'm at it, I'll also fix X", "this rename fits here", "this extra test covers another case"): **pause before touching it** and ask with `AskUserQuestion`:
|
|
131
|
+
Anything **not in the §2 brief** ("while I'm at it, I'll also fix X", "this rename fits here", "this extra test covers another case"): **pause before touching it** and ask with `AskUserQuestion` (in `unattended`: *No, leave it out*, recorded):
|
|
126
132
|
- **Yes, add it to the brief** — update the brief in `04-fix.md`, continue.
|
|
127
133
|
- **No, leave it out** — note it under "Areas with similar risk" (a risk from the same pattern) or under "Ideas for separate tickets" in `04-fix.md`, **and append it to `meta.json.followups[]`** as `kind: "audit"` (similar risk) or `kind: "out-of-scope"`, `source: "fix"` (flow-core §7). **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.
|
|
128
134
|
|
|
@@ -18,6 +18,11 @@ description: Find the root cause of the bug (not just the symptom)
|
|
|
18
18
|
|
|
19
19
|
Investigation phase: reproduce the failure, then find **why it happened** — not just what is failing.
|
|
20
20
|
|
|
21
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing. The hypothesis sweep runs as in
|
|
22
|
+
`auto` · a size that no longer fits → record the new size · a `high` challenge with no response →
|
|
23
|
+
question `investigation_challenge`, the findings and their options in the stop file · a bug that
|
|
24
|
+
cannot be reproduced and needs a person to try → blocked.
|
|
25
|
+
|
|
21
26
|
## 1. Pre-flight
|
|
22
27
|
|
|
23
28
|
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; its parallel rounds take `models.workers`.**
|
|
@@ -95,4 +95,4 @@ Neither role set → skip this block silently.
|
|
|
95
95
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
96
96
|
- **Write every prevention action and similar-risk area to `meta.json.followups[]`** (flow-core §7), ids matching the tables above. This is the whole point of the phase: an action that lives only in `99-postmortem.md` is archived with the work and read by nobody, which is how the incident repeats.
|
|
97
97
|
- Suggest `/flow-bug-ship`. Say how many follow-ups it will ask about at its Close — **do not triage them here**: mid-postmortem is the wrong moment to judge what is worth a ticket, and `ship` asks once with the whole set in view.
|
|
98
|
-
- **Autonomy handoff — stops in every mode, `auto` included.** `ship` pushes and opens the MR/PR, a hard gate in every mode: do **not** chain into it; stop here and propose `/flow-bug-ship` with a single `AskUserQuestion` (recommended option by default).
|
|
98
|
+
- **Autonomy handoff — stops in every mode, `auto` included.** `ship` pushes and opens the MR/PR, a hard gate in every mode: do **not** chain into it; stop here and propose `/flow-bug-ship` with a single `AskUserQuestion` (recommended option by default). In `unattended` (flow-core §2.1), chain into `/flow-bug-ship`: it decides between a draft and a question.
|
|
@@ -236,4 +236,4 @@ Cost line: count every subagent this command launched — reviewers = §2.1 buil
|
|
|
236
236
|
- **Stage what the review taught** (`knowledge.stage` set; silence by default). Review is where a project teaches the most, and this is the only moment its findings are in context. Candidates are findings about the **domain or the codebase's real behaviour**, not about this diff: a library that does other than its name says, a test disguise that kept the suite green over a live defect, a module rule the reviewers had to cite from its own prose, a measurement. A blocker fixed here is not knowledge; *why it was written wrong* may be. Same evidence rule as `/flow-feat-design` §8 — one line of evidence per finding or it is not staged. One call per finding, one line to the user («Staged N finding(s) for `postmortem`/`ship`»). Never `knowledge.save` here.
|
|
237
237
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
238
238
|
- Stop body (after the flow-core §3 header): the findings that survived and what you did with each, plus the same Cost line as the Summary: "- Cost: <n>/<budget_max> subagents launched (<k> reviewers · <m> reinforcements · <s> skeptics), tier <light|proportional|full>".
|
|
239
|
-
- **Autonomy handoff.** Only without blockers — with blockers, stop in every mode. **M/L**: `manual` → propose `/flow-bug-postmortem` with a single `AskUserQuestion`; `guided`/`auto` → chain into it in this same turn. **XS/S**: the next step is `ship`, which pushes and opens the MR/PR — a hard gate in **every** mode: stop here and propose `/flow-bug-ship` with a single `AskUserQuestion`, never chaining into it.
|
|
239
|
+
- **Autonomy handoff.** Only without blockers — with blockers, stop in every mode (in `unattended`, question `high_findings` and the run ends, flow-core §2.1). **M/L**: `manual` → propose `/flow-bug-postmortem` with a single `AskUserQuestion`; `guided`/`auto` → chain into it in this same turn. **XS/S**: the next step is `ship`, which pushes and opens the MR/PR — a hard gate in **every** mode: stop here and propose `/flow-bug-ship` with a single `AskUserQuestion`, never chaining into it. In `unattended`, chain into `/flow-bug-ship`: it decides between a draft and a question.
|
|
@@ -21,6 +21,17 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow-feat-ship`, wi
|
|
|
21
21
|
1. If `99-postmortem.md` exists, **include the link or the executive summary** in the MR/PR description.
|
|
22
22
|
2. The knowledge-consolidation offer was already made in `/flow-bug-postmortem` — do not ask again here.
|
|
23
23
|
|
|
24
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing — the same resolutions as
|
|
25
|
+
`/flow-feat-ship`'s unattended paragraph, and its "In every mode" paragraph too, applied to the
|
|
26
|
+
sections here: the MR/PR (§2–§3) is a draft only with `autonomy.unattended_ship: draft`, created as
|
|
27
|
+
§3.1 says for a draft; otherwise question `ship` and the run ends; pre-deploy SQL → question
|
|
28
|
+
`migration`. The tree check (§0) re-runs what is behind `HEAD` once per MR/PR, recorded as
|
|
29
|
+
`/flow-feat-ship` says — here `validate` first, since it ran before the review, then the review on
|
|
30
|
+
the delta — and is `blocked` after that. The
|
|
31
|
+
performance comment (§3.3) is not posted; every offer and survey at Close (§4) — follow-ups,
|
|
32
|
+
conventions, archiving — is `Later`; "was it merged?" is not merged; and Close writes the stop file
|
|
33
|
+
with `reason: "done"` and `mr_url`.
|
|
34
|
+
|
|
24
35
|
## 0. Pre-flight
|
|
25
36
|
|
|
26
37
|
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with; the wait it delegates takes `models.supervisors`.**
|
|
@@ -120,7 +131,7 @@ Determine whether the fix modifies the database (migrations, mappings/schema, or
|
|
|
120
131
|
|
|
121
132
|
## 2. Show to user and wait for confirmation (REQUIRED)
|
|
122
133
|
|
|
123
|
-
**Never skip this step** — hard gate: the user approves what will be published before anything is created. Print in this exact format:
|
|
134
|
+
**Never skip this step** — hard gate: the user approves what will be published before anything is created (in `unattended`, the unattended paragraph above decides it). Print in this exact format:
|
|
124
135
|
|
|
125
136
|
```
|
|
126
137
|
─── Preview of {MR or PR, per git.host} (fix) ──────────────────────────────────
|
|
@@ -154,7 +165,9 @@ Same as `/flow-feat-ship` §4.0: `git rev-parse --abbrev-ref HEAD` must not be t
|
|
|
154
165
|
|
|
155
166
|
### 3.1 Create MR/PR
|
|
156
167
|
|
|
157
|
-
|
|
168
|
+
**A draft (`unattended`) — read this first:** exactly as `/flow-feat-ship §4.1` says for a draft — never `commit-push-pr`, never the plain CLI; the forge CLI with its draft flag; a refused draft → `blocked`.
|
|
169
|
+
|
|
170
|
+
Otherwise, only here — with the content approved in §2 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask; if it does, answer with what was confirmed. If it pushes, it uses `git push -u origin HEAD`, never to the main base.
|
|
158
171
|
|
|
159
172
|
Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.squash`.
|
|
160
173
|
|
|
@@ -21,6 +21,15 @@ Start a bug. `$ARGUMENTS` is **optional**:
|
|
|
21
21
|
- **Given** — a ticket (format `tracker.prefix` from FLOW.md) → *ticket mode*: start from it (§1 reads it).
|
|
22
22
|
- **Empty** — *ticket-less mode*: do **not** stop. Synthesize the bug from the conversation just held with the user (§1.5). Ask for a one-line symptom only if there is no conversation to draft from.
|
|
23
23
|
|
|
24
|
+
**In `unattended`** (flow-core §2.1) this command asks nothing; each place it would ask resolves as
|
|
25
|
+
that table says. Here: a ticket is required — empty, or a tracker read that fails, ends the run
|
|
26
|
+
`blocked` · uncommitted changes or a branch other than the main one (§3) → `blocked`: the runner
|
|
27
|
+
owns the checkout · cross-repo scope (§1.6) → only the repos the ticket names · `git.worktree: ask`
|
|
28
|
+
→ in place · a linked remote branch → skipped, nothing is pushed before `ship` · the tracker
|
|
29
|
+
transition (§4.5) → as `auto`. **A thread that changes what the bug *is* (§1.1 precedence) waits
|
|
30
|
+
until the branch and the work folder exist** — create them (§3, §4) first, write it into
|
|
31
|
+
`01-context.md` as open, then question `clarify`; the next phase asks it first (flow-core §2.1).
|
|
32
|
+
|
|
24
33
|
## 0. Pre-flight
|
|
25
34
|
|
|
26
35
|
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with (no `models` key).**
|
|
@@ -38,7 +38,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
38
38
|
Then:
|
|
39
39
|
1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
|
|
40
40
|
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).
|
|
41
|
-
3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
|
|
41
|
+
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 — a schema difference to apply is question `migration`, flow-core §2.1).
|
|
42
42
|
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).
|
|
43
43
|
|
|
44
44
|
## 2.5 Reproduce the original symptom against the running app
|
|
@@ -91,7 +91,7 @@ this is the same gate as a red test.
|
|
|
91
91
|
|
|
92
92
|
## 5. Close
|
|
93
93
|
|
|
94
|
-
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode.
|
|
94
|
+
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode (in `unattended`, the run ends `blocked` with the failing test named, flow-core §2.1 — unless every failing test also fails on the base, the one exception that row records; the reproduction test lives in a file this diff touches, so it never qualifies).
|
|
95
95
|
- Green → `phase = "validate"`, add to `phases_done`; in the same write record `validated_sha` = `git rev-parse HEAD` — the tree the regression test passed on, which `/flow-bug-ship §0` reads. Suggest `/flow-bug-review`.
|
|
96
96
|
- **Other bugs detected become `followups[]` entries** (flow-core §7) when they clear its bar — a reproducible symptom with someone who suffers it, not «this looks fragile» — per the output template.
|
|
97
97
|
- **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.
|
|
@@ -100,7 +100,9 @@ supervisors (empty) → the delegated waits (running pipeline, pending deploy
|
|
|
100
100
|
empty key in `guided`/`auto` records it rather than asking. This block is where that record is read
|
|
101
101
|
back.
|
|
102
102
|
|
|
103
|
-
Aggregate `defaults_used[]` from every `.claude/work/*/meta.json`, **`_archive/` included
|
|
103
|
+
Aggregate `defaults_used[]` from every `.claude/work/*/meta.json`, **`_archive/` included**, leaving
|
|
104
|
+
out keys prefixed `unattended:` — those record how an unattended run resolved a stop, not a FLOW key
|
|
105
|
+
with a line to paste. One row
|
|
104
106
|
per key: the key, the default that was used, in how many works, and the last phase that used it.
|
|
105
107
|
Sort by count, most-used first, and cap the block at the ten busiest keys with a count of the rest.
|
|
106
108
|
|
|
@@ -163,9 +165,15 @@ base branch resolvable — is §2 below; flag the key here, check the world ther
|
|
|
163
165
|
run against a development or throwaway database, never a live one.
|
|
164
166
|
- **Autonomy**: `autonomy.mode` empty → note it defaults to `manual` (every phase stops and, at the
|
|
165
167
|
end, proposes the next command as a one-click confirmation — never runs it unconfirmed). Set →
|
|
166
|
-
echo the mode and remind that the hard gates stop and ask in
|
|
168
|
+
echo the mode and remind that the hard gates stop and ask in `manual`/`guided`/`auto` and that `guided`/`auto`
|
|
167
169
|
never ask about the flow's own mechanics or anything already decided (both lists: `flow:flow-core`
|
|
168
|
-
skill §2). Unrecognized value → flag, `manual` assumed.
|
|
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,
|
|
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.
|
|
169
177
|
|
|
170
178
|
## 2. Checks
|
|
171
179
|
|