flow-workflows 0.68.0 → 0.69.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/README.md +1 -0
- package/adapters/codex/CORE.md +56 -5
- package/adapters/codex/skills/flow-bug-ship/SKILL.md +3 -1
- package/adapters/codex/skills/flow-bug-validate/SKILL.md +2 -2
- package/adapters/codex/skills/flow-doctor/SKILL.md +7 -5
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +3 -1
- package/adapters/codex/skills/flow-feat-validate/SKILL.md +2 -2
- package/adapters/codex/skills/flow-work-green/SKILL.md +3 -3
- package/adapters/codex/skills/flow-work-watch/SKILL.md +2 -2
- package/adapters/gemini/CORE.md +56 -5
- package/adapters/gemini/commands/flow/bug/ship.toml +3 -1
- package/adapters/gemini/commands/flow/bug/validate.toml +2 -2
- package/adapters/gemini/commands/flow/doctor.toml +7 -5
- package/adapters/gemini/commands/flow/feat/ship.toml +3 -1
- package/adapters/gemini/commands/flow/feat/validate.toml +2 -2
- package/adapters/gemini/commands/flow/work/green.toml +3 -3
- package/adapters/gemini/commands/flow/work/watch.toml +2 -2
- package/adapters/hermes/CORE.md +56 -5
- package/adapters/hermes/skills/flow-bug-ship/SKILL.md +3 -1
- package/adapters/hermes/skills/flow-bug-validate/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-doctor/SKILL.md +7 -5
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +3 -1
- package/adapters/hermes/skills/flow-feat-validate/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-work-green/SKILL.md +3 -3
- package/adapters/hermes/skills/flow-work-watch/SKILL.md +2 -2
- package/adapters/opencode/CORE.md +56 -5
- package/adapters/opencode/commands/flow-bug-ship.md +3 -1
- package/adapters/opencode/commands/flow-bug-validate.md +2 -2
- package/adapters/opencode/commands/flow-doctor.md +7 -5
- package/adapters/opencode/commands/flow-feat-ship.md +3 -1
- package/adapters/opencode/commands/flow-feat-validate.md +2 -2
- package/adapters/opencode/commands/flow-work-green.md +3 -3
- package/adapters/opencode/commands/flow-work-watch.md +2 -2
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +31 -0
- package/plugins/flow/examples/FLOW.template.md +14 -6
package/README.md
CHANGED
|
@@ -263,6 +263,7 @@ Ordered by effect. Each is one line in `FLOW.md`:
|
|
|
263
263
|
|
|
264
264
|
| Change | What it drops | What you lose |
|
|
265
265
|
|---|---|---|
|
|
266
|
+
| `models.supervisors` to a cheaper tier | The waits — a running pipeline, a deploy that has not landed, a long suite — stop being watched on the thread's model | Nothing: a supervisor reports status and evidence, and the verdict on them was never its to give |
|
|
266
267
|
| `models.agents` / `models.workers` to a cheaper tier | Subagents stop running on the thread's model | Little: a subagent reads a diff and reports ≤250 words |
|
|
267
268
|
| `quality.review_depth: light` | The panel, the reinforcements, the skeptic fan-out | Depth on everything but the built-in reviewer; a sensitive surface still bumps back up |
|
|
268
269
|
| `agents.budget_max`, `agents.fanout_max` | Rounds past the ceiling, in the order each command declares | Coverage — but named coverage: what a ceiling skipped is reported, never silently dropped |
|
package/adapters/codex/CORE.md
CHANGED
|
@@ -17,7 +17,7 @@ Every `$flow-*` command assumes these rules. They are stated once, here, so a co
|
|
|
17
17
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
18
18
|
`flow-core`" means this file.
|
|
19
19
|
|
|
20
|
-
**This file belongs to flow `0.
|
|
20
|
+
**This file belongs to flow `0.69.0`.** Compare it once, at the start of the session, against
|
|
21
21
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
22
22
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
23
23
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -152,10 +152,10 @@ explicit rather than degrading in silence.
|
|
|
152
152
|
|
|
153
153
|
## 1. Models — which model runs a step
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
157
|
-
|
|
158
|
-
nothing.
|
|
155
|
+
Three keys, and they govern **subagents only**: `models.agents` for every subagent a command
|
|
156
|
+
improvises, `models.workers` for the parallel fan-out rounds, and `models.supervisors` for the
|
|
157
|
+
bounded waits of §6.5 — the last two falling back to `models.agents`. Empty, absent, or no section
|
|
158
|
+
→ everything runs on the model you were launched with, and you say nothing.
|
|
159
159
|
|
|
160
160
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
161
161
|
which keeps the model its own definition sets.
|
|
@@ -179,6 +179,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
179
179
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
180
180
|
was wise.
|
|
181
181
|
|
|
182
|
+
**A delegated wait says the same line at one agent.** A round of fifteen and a single supervisor
|
|
183
|
+
sitting on a forty-minute pipeline are the same blank cheque arriving at different speeds. So when a
|
|
184
|
+
wait is dispatched (§6.5) with `models.supervisors` and `models.agents` both empty, say it in one
|
|
185
|
+
line: the wait inherits this thread's model because no key is set. Name the key, never a model.
|
|
186
|
+
|
|
182
187
|
## 2. Autonomy — `autonomy.mode`
|
|
183
188
|
|
|
184
189
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -209,6 +214,10 @@ sensible default and record it.
|
|
|
209
214
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
210
215
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
211
216
|
- (e) **Anything already decided and recorded** in the work's artifacts or `meta.json.notes`. Reopen only when new evidence contradicts the premise — then lead with the evidence.
|
|
217
|
+
- (f) **Delegating a wait** (§6.5) — handing a running pipeline, a deploy that has not landed or a
|
|
218
|
+
long suite to a supervisor is mechanics, and the cost objection to waiting is exactly what the
|
|
219
|
+
delegation removes. Take it, record it. What is still asked in `manual` is whatever the evidence
|
|
220
|
+
turns out to call for, once it is back.
|
|
212
221
|
|
|
213
222
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
214
223
|
|
|
@@ -407,6 +416,48 @@ magnitude over what anyone intended.
|
|
|
407
416
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
408
417
|
budget and a phase that found nothing are not the same result.
|
|
409
418
|
|
|
419
|
+
### 6.5 — A wait is delegated, never sat through
|
|
420
|
+
|
|
421
|
+
**Waiting is not a phase, and on this thread it is not free.** A pipeline polled from here charges
|
|
422
|
+
the whole conversation for every cycle that reads `pending`: the context is resent, the model
|
|
423
|
+
reasons about a state that has not moved, and a forty-minute suite costs more to *watch* than the
|
|
424
|
+
diff it is checking cost to write. The expense was never the waiting — it is who does it.
|
|
425
|
+
|
|
426
|
+
So a wait you expect to run **longer than a few minutes** goes to **one supervisor subagent**, with
|
|
427
|
+
a brief closed at both ends:
|
|
428
|
+
|
|
429
|
+
- **What to watch** — the exact command, run id or resource, never "the CI".
|
|
430
|
+
- **How often, and until when** — the interval, and a deadline after which it returns what it has
|
|
431
|
+
instead of waiting forever.
|
|
432
|
+
- **Every terminal state** — success *and* failure, so it neither comes back at the first red job
|
|
433
|
+
with three still running, nor sits out a queue that will never move.
|
|
434
|
+
- **What it brings back** — status (`finished` · `failed` · `timed out`), and the evidence for it:
|
|
435
|
+
job names, exit codes, the log tail that matters, the run URL, the SHA it watched. Plus the path
|
|
436
|
+
it writes before replying, exactly like any other brief.
|
|
437
|
+
|
|
438
|
+
**It reports; it never rules.** The supervisor says which job failed and hands you the log. It does
|
|
439
|
+
not decide that the failure is flaky, that the threshold is close enough, or that the branch can
|
|
440
|
+
merge now. Delegating that judgement is how a pipeline ends up declared green by whoever was
|
|
441
|
+
cheapest to ask, which is the one thing `$flow-work-green` exists to forbid. Delegate the waiting
|
|
442
|
+
and the evidence; the verdict stays here.
|
|
443
|
+
|
|
444
|
+
**Then end the turn.** Dispatching a supervisor and staying in a poll loop of your own pays both
|
|
445
|
+
bills and saves nothing. What wakes you is whatever the harness offers — a background task that
|
|
446
|
+
re-invokes you when it finishes, a scheduled wake-up, a message back to this thread; where it offers
|
|
447
|
+
none, the supervisor's evidence file is read at your next stop, and **you say that** rather than
|
|
448
|
+
implying something is being watched. Refresh `panel.json` before you go (§4): the line carries
|
|
449
|
+
`mark: "wait"` and `stale_after_minutes` set to the deadline you gave, because a thread that goes
|
|
450
|
+
quiet with `current` on screen reads as a session that died.
|
|
451
|
+
|
|
452
|
+
**A supervisor is a subagent** — it runs on `models.supervisors` (empty → `models.agents`, then what
|
|
453
|
+
this thread runs on), and it counts against `agents.budget_max` like any other, relaunches included.
|
|
454
|
+
Bound it with the deadline instead of relaunching a wait that has already told you the queue is not
|
|
455
|
+
moving.
|
|
456
|
+
|
|
457
|
+
**Not every wait is worth a brief.** A suite that finishes in ninety seconds costs more to delegate
|
|
458
|
+
than to run — the brief, the round trip and the report are the whole of the saving. And anything you
|
|
459
|
+
must *react to* mid-wait is not a wait at all: it is the work, and it stays here.
|
|
460
|
+
|
|
410
461
|
## 7. Deferred work — `followups[]`
|
|
411
462
|
|
|
412
463
|
Every chain in this plugin reaches moments where the right call is **not to do it here**: a build
|
|
@@ -25,7 +25,7 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `$flow-feat-ship`, wi
|
|
|
25
25
|
|
|
26
26
|
## 0. Pre-flight
|
|
27
27
|
|
|
28
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
28
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
29
29
|
|
|
30
30
|
- Read `meta.json` and `00-summary.md`; open in full only `04-fix.md` (the Brief), `06-review.md` (the verdict), `05-validation.md`, the §"Root cause identified" of `03-investigation.md`, and `99-postmortem.md` if it exists. (flow-core §5)
|
|
31
31
|
- Require `review` in `phases_done`; also `validate` if `size` ≥ S, and `postmortem` if `size` is M or L (the same sizes `$flow-bug-review §8` routes to postmortem — one rule). Missing → refuse and redirect to the missing step.
|
|
@@ -160,6 +160,8 @@ Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.sq
|
|
|
160
160
|
|
|
161
161
|
**Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh `panel.json` (flow-core §4) right here, before §3.2 and before anything else can fail.
|
|
162
162
|
|
|
163
|
+
**The pipeline the push starts is not watched from this thread — `$flow-feat-ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `$flow-work-green`'s to triage, never this command's.
|
|
164
|
+
|
|
163
165
|
### 3.2 Pre-deploy thread (deployment gate)
|
|
164
166
|
**Only if `git.predeploy_gate` is active and the fix has pre-deploy SQL** (§1). After creating the MR/PR, open **a single resolvable/blocking thread** with all the consolidated SQL, using the host from `git.host`/`git.cli` (GitLab: `glab api ".../merge_requests/<iid>/discussions"`; GitHub: review conversation with required resolution). Body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE deploying" + "Resolve only after running it in production".
|
|
165
167
|
|
|
@@ -22,7 +22,7 @@ Validate that the fix works and that the bug does not return.
|
|
|
22
22
|
|
|
23
23
|
## 1. Pre-flight
|
|
24
24
|
|
|
25
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
25
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
26
26
|
|
|
27
27
|
- Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
|
|
28
28
|
- Require `fix` in `phases_done`.
|
|
@@ -37,7 +37,7 @@ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, model
|
|
|
37
37
|
|
|
38
38
|
Then:
|
|
39
39
|
1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
|
|
40
|
-
2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow).
|
|
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
41
|
3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
|
|
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
|
|
|
@@ -78,15 +78,17 @@ is invalid.
|
|
|
78
78
|
|
|
79
79
|
#### 1.5.2 Resolved models (only if either file has a `models` key)
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
Three keys, all about subagents. Print what each one actually reaches:
|
|
82
82
|
|
|
83
83
|
```
|
|
84
|
-
agents
|
|
85
|
-
|
|
86
|
-
workers
|
|
84
|
+
agents fable → improvised subagents: review panel members with no named agent, blinded
|
|
85
|
+
auditors, delegated build pieces, the general-purpose challenger
|
|
86
|
+
workers (empty) → fan-out rounds — falls back to `agents`
|
|
87
|
+
supervisors (empty) → the delegated waits (running pipeline, pending deploy, long suite) —
|
|
88
|
+
falls back to `agents`
|
|
87
89
|
```
|
|
88
90
|
|
|
89
|
-
- State once, plainly: **the main agent's own steps are not covered by
|
|
91
|
+
- State once, plainly: **the main agent's own steps are not covered by any key** — reading the
|
|
90
92
|
ticket, the design, and the single-thread `build`/`fix` run on the model the command was launched
|
|
91
93
|
with, because an agent cannot switch its own model. A phase that wants another one says so at the
|
|
92
94
|
handoff; nothing enforces it.
|
|
@@ -18,7 +18,7 @@ description: "Commit, push, MR/PR, and offer to save domain knowledge"
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
|
|
19
19
|
> - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
21
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
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
|
|
|
@@ -181,6 +181,8 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
181
181
|
|
|
182
182
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh `panel.json` right here, before §4.2 and before anything else can fail.
|
|
183
183
|
|
|
184
|
+
**The push just started a pipeline, and this thread does not sit on it.** Its result belongs to `$flow-work-green`, not here, so either close the ship with CI reported as *running* — the honest state — or, when the user wants to hear how it ended, delegate the wait as any other (flow-core §6.5): one supervisor subagent on `models.supervisors`, a deadline, and back with status plus failing-job evidence. Whatever it returns, a red pipeline is triaged by `$flow-work-green`; this command never fixes CI and never closes reporting a green it did not see.
|
|
185
|
+
|
|
184
186
|
### 4.2 Pre-deploy thread (deployment gate)
|
|
185
187
|
**Only if `git.predeploy_gate` is active and the branch has pre-deploy SQL** (§2). After creating the MR/PR, open **a single resolvable/blocking thread** with **all** the consolidated SQL, using the `git.host`/`git.cli` host:
|
|
186
188
|
- **GitLab**: `glab api "projects/<repo-url-encoded>/merge_requests/<iid>/discussions" -f body="..."` (resolvable thread).
|
|
@@ -18,7 +18,7 @@ description: "Validate tests, edge cases, and integrity before shipping"
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
|
|
19
19
|
> - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
21
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
22
22
|
|
|
23
23
|
Verify the feature is complete: test coverage, edge cases, performance, regressions.
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@ One of the three below writes and two of them read, so they do not all go at onc
|
|
|
42
42
|
|
|
43
43
|
**A green suite is not a performance result** — a tiny fixture database proves a query's **rows**, never its **plan**. If `$flow-feat-review §3.6` left any query verdict `unresolved`, or an acceptance criterion concerns speed or volume: run the measurement of **`$flow-work-query §4`** with the volumes in `data.volumes` (or a data set shaped like them — the distribution matters more than the total), record plan and timings, and gate on the result. No `data.*` configuration and the criterion cannot be measured → it is `unproven` with the reason, never silently `proven`.
|
|
44
44
|
|
|
45
|
-
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
45
|
+
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. **A suite measured in tens of minutes is a wait, not a step**: hand it to a supervisor subagent on `models.supervisors` (flow-core §6.5) — it runs it, times out, and brings back the exit code plus the failing tests' output, never a reading of whether those failures matter. Short suites stay here; delegating ninety seconds costs more than running them. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
46
46
|
|
|
47
47
|
## 3. Criteria coverage (S and larger)
|
|
48
48
|
|
|
@@ -32,7 +32,7 @@ Usage: `$flow-work-green [mr-iid-or-url]` — optional; default is the MR/PR of
|
|
|
32
32
|
|
|
33
33
|
Extract from `git`: `host`, `cli` (empty → the default for that host), `default_base`. The term MR/PR follows `host`. From `tracker`: `tool`, `prefix`. From `quality`: `test`, `test_one`, `static_analysis`, `style_fix` (local reproduce/verify commands, §5; empty → auto-discover from Makefile / npm / composer scripts), `review_skill` (§5, non-trivial fixes). `agents`: expert sub-agents to delegate fixes to. `knowledge.search` set → `knowledge.search` in §3.
|
|
34
34
|
|
|
35
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
35
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
36
36
|
|
|
37
37
|
**Autonomy.** Modes as in flow-core §2; `guided`/`auto` record their choices in `09-ci.md` (e.g. a pure formatter auto-fix). **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
|
|
38
38
|
1. **Any push** (§6).
|
|
@@ -82,7 +82,7 @@ Decide the exit on the **combination** of both halves, never on the pipeline alo
|
|
|
82
82
|
|
|
83
83
|
- **Pipeline green *and* verdict mergeable** → report both facts, stop.
|
|
84
84
|
- **Pipeline green but blockers remain** → do **not** report "green, you're good": report the pipeline green, list the blockers, continue to §3 with them.
|
|
85
|
-
- **Pipeline running / pending** →
|
|
85
|
+
- **Pipeline running / pending** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors`, told which run to watch, at what interval, with a deadline and every terminal state, bringing back status **plus evidence** (failing job names, exit codes, log tail, run URL) and **no verdict** — the triage of §3 is this thread's, whatever it reports. Then work any **non-pipeline** blockers meanwhile, or end the turn on the harness's own wake-up (a background task that re-invokes you, `Monitor`, `ScheduleWakeup` ~2–3 min). Neither a supervisor nor a wake-up available → say so plainly and let the user re-run when CI finishes; never imply the pipeline is being watched when nothing is watching it.
|
|
86
86
|
- **Pipeline never ran** (no CI, or not triggered) → say so; verdict clean too → stop.
|
|
87
87
|
|
|
88
88
|
## 3. Triage every blocker
|
|
@@ -144,7 +144,7 @@ Run **before** the other buckets, only after the hard gate:
|
|
|
144
144
|
|
|
145
145
|
- **Push (hard gate).** Show what will be pushed (files, commit message), confirm with `AskUserQuestion`. Never push to the base branch: HEAD must not be `git.default_base` and its upstream must point to the branch itself (same anti-deploy lock as `$flow-feat-ship §4.0` and `$flow-work-respond §6.2`). `git push` to the existing branch — the push re-triggers the pipeline. **Force-push only after a rebase the user explicitly chose** (§5.C.2), and only `git push --force-with-lease` — never bare `--force`, never as a way out of a rejected push (the remote moved: fetch and understand first).
|
|
146
146
|
- **Rerun without a push** (rerun-only, K). Only after the user confirms (hard gate): `glab ci retry` / `gh run rerun <run-id> --failed`. Attach the recorded flake evidence. Fails again the same way → **not** flaky: reclassify to T/Y and fix; do not rerun a second time.
|
|
147
|
-
- **Watch it back to green
|
|
147
|
+
- **Watch it back to green — delegated, not polled from here** (flow-core §6.5). The push starts a run that takes as long as the one you just triaged: hand it to the same kind of supervisor as §2.3 and end the turn, or let a later `$flow-work-green` re-check. With neither a supervisor nor a wake-up, say so instead of implying it is watched. Do not claim the pipeline is fixed until it reports green: report what you pushed and that CI is re-running.
|
|
148
148
|
- **Re-read the merge verdict too.** Once the pipeline settles, re-run §2.1 and report the *merge* verdict, not only the pipeline — the only evidence the MR/PR is actually mergeable.
|
|
149
149
|
|
|
150
150
|
## 7. Log, loop, and domain knowledge
|
|
@@ -18,7 +18,7 @@ description: "Monitor the observability platform after a deploy and alert on err
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
|
|
19
19
|
> - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
21
|
+
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
22
22
|
|
|
23
23
|
**Autopiloted post-deploy monitoring**: signals **scoped to the change** over a window (default 30 min), against a baseline; alert on errors or performance regressions from the deploy.
|
|
24
24
|
|
|
@@ -47,7 +47,7 @@ If `knowledge.search` is set, call `knowledge.search` with the ticket name befor
|
|
|
47
47
|
- **Confirm WHAT is being deployed — never assume it from `meta.json`** (several MR/PRs per ticket; stale artifacts). Cross-reference the **actual deploy event** (e.g. `get_change_stories`) and recent merges; any ambiguity → `AskUserQuestion` which MR/PR or commit is deploying. The surface (§2) is scoped to **that** change.
|
|
48
48
|
- **When to start.** When the code **is live in production**, not at merge. Launched right after the merge → **wait for the deploy yourself**:
|
|
49
49
|
- Check whether the new version is live (`observability.deploy_detect`; empty → `get_change_stories` or other deploy indicators).
|
|
50
|
-
- **Not yet deployed** → poll every ~2-3 min
|
|
50
|
+
- **Not yet deployed** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors` watching for the go-live of that exact SHA, ~2-3 min interval, a deadline, and back with status plus evidence (pipeline/job names, exit codes, the deploy event) — never with a judgement on whether the deploy is healthy. No supervisor available → poll every ~2-3 min here and say that this thread is doing the waiting. Either way the monitoring window does not start until the code is live.
|
|
51
51
|
- **Pipeline fails** → **abort monitoring** and alert: the code did not reach production.
|
|
52
52
|
- Already deployed → proceed.
|
|
53
53
|
- **How to identify YOUR deploy.** The chain in `observability.deploy_detect`. Empty → merge to base branch → CI/CD pipeline → go-live jobs. Determine the exact merge commit; confirm the go-live jobs of the affected services reach `success`. Any fail → **abort**.
|
package/adapters/gemini/CORE.md
CHANGED
|
@@ -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.69.0`.** Compare it once, at the start of the session, against
|
|
20
20
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
21
21
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
22
22
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -151,10 +151,10 @@ explicit rather than degrading in silence.
|
|
|
151
151
|
|
|
152
152
|
## 1. Models — which model runs a step
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
156
|
-
|
|
157
|
-
nothing.
|
|
154
|
+
Three keys, and they govern **subagents only**: `models.agents` for every subagent a command
|
|
155
|
+
improvises, `models.workers` for the parallel fan-out rounds, and `models.supervisors` for the
|
|
156
|
+
bounded waits of §6.5 — the last two falling back to `models.agents`. Empty, absent, or no section
|
|
157
|
+
→ everything runs on the model you were launched with, and you say nothing.
|
|
158
158
|
|
|
159
159
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
160
160
|
which keeps the model its own definition sets.
|
|
@@ -178,6 +178,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
178
178
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
179
179
|
was wise.
|
|
180
180
|
|
|
181
|
+
**A delegated wait says the same line at one agent.** A round of fifteen and a single supervisor
|
|
182
|
+
sitting on a forty-minute pipeline are the same blank cheque arriving at different speeds. So when a
|
|
183
|
+
wait is dispatched (§6.5) with `models.supervisors` and `models.agents` both empty, say it in one
|
|
184
|
+
line: the wait inherits this thread's model because no key is set. Name the key, never a model.
|
|
185
|
+
|
|
181
186
|
## 2. Autonomy — `autonomy.mode`
|
|
182
187
|
|
|
183
188
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -208,6 +213,10 @@ sensible default and record it.
|
|
|
208
213
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
209
214
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
210
215
|
- (e) **Anything already decided and recorded** in the work's artifacts or `meta.json.notes`. Reopen only when new evidence contradicts the premise — then lead with the evidence.
|
|
216
|
+
- (f) **Delegating a wait** (§6.5) — handing a running pipeline, a deploy that has not landed or a
|
|
217
|
+
long suite to a supervisor is mechanics, and the cost objection to waiting is exactly what the
|
|
218
|
+
delegation removes. Take it, record it. What is still asked in `manual` is whatever the evidence
|
|
219
|
+
turns out to call for, once it is back.
|
|
211
220
|
|
|
212
221
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
213
222
|
|
|
@@ -406,6 +415,48 @@ magnitude over what anyone intended.
|
|
|
406
415
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
407
416
|
budget and a phase that found nothing are not the same result.
|
|
408
417
|
|
|
418
|
+
### 6.5 — A wait is delegated, never sat through
|
|
419
|
+
|
|
420
|
+
**Waiting is not a phase, and on this thread it is not free.** A pipeline polled from here charges
|
|
421
|
+
the whole conversation for every cycle that reads `pending`: the context is resent, the model
|
|
422
|
+
reasons about a state that has not moved, and a forty-minute suite costs more to *watch* than the
|
|
423
|
+
diff it is checking cost to write. The expense was never the waiting — it is who does it.
|
|
424
|
+
|
|
425
|
+
So a wait you expect to run **longer than a few minutes** goes to **one supervisor subagent**, with
|
|
426
|
+
a brief closed at both ends:
|
|
427
|
+
|
|
428
|
+
- **What to watch** — the exact command, run id or resource, never "the CI".
|
|
429
|
+
- **How often, and until when** — the interval, and a deadline after which it returns what it has
|
|
430
|
+
instead of waiting forever.
|
|
431
|
+
- **Every terminal state** — success *and* failure, so it neither comes back at the first red job
|
|
432
|
+
with three still running, nor sits out a queue that will never move.
|
|
433
|
+
- **What it brings back** — status (`finished` · `failed` · `timed out`), and the evidence for it:
|
|
434
|
+
job names, exit codes, the log tail that matters, the run URL, the SHA it watched. Plus the path
|
|
435
|
+
it writes before replying, exactly like any other brief.
|
|
436
|
+
|
|
437
|
+
**It reports; it never rules.** The supervisor says which job failed and hands you the log. It does
|
|
438
|
+
not decide that the failure is flaky, that the threshold is close enough, or that the branch can
|
|
439
|
+
merge now. Delegating that judgement is how a pipeline ends up declared green by whoever was
|
|
440
|
+
cheapest to ask, which is the one thing `/flow:work:green` exists to forbid. Delegate the waiting
|
|
441
|
+
and the evidence; the verdict stays here.
|
|
442
|
+
|
|
443
|
+
**Then end the turn.** Dispatching a supervisor and staying in a poll loop of your own pays both
|
|
444
|
+
bills and saves nothing. What wakes you is whatever the harness offers — a background task that
|
|
445
|
+
re-invokes you when it finishes, a scheduled wake-up, a message back to this thread; where it offers
|
|
446
|
+
none, the supervisor's evidence file is read at your next stop, and **you say that** rather than
|
|
447
|
+
implying something is being watched. Refresh `panel.json` before you go (§4): the line carries
|
|
448
|
+
`mark: "wait"` and `stale_after_minutes` set to the deadline you gave, because a thread that goes
|
|
449
|
+
quiet with `current` on screen reads as a session that died.
|
|
450
|
+
|
|
451
|
+
**A supervisor is a subagent** — it runs on `models.supervisors` (empty → `models.agents`, then what
|
|
452
|
+
this thread runs on), and it counts against `agents.budget_max` like any other, relaunches included.
|
|
453
|
+
Bound it with the deadline instead of relaunching a wait that has already told you the queue is not
|
|
454
|
+
moving.
|
|
455
|
+
|
|
456
|
+
**Not every wait is worth a brief.** A suite that finishes in ninety seconds costs more to delegate
|
|
457
|
+
than to run — the brief, the round trip and the report are the whole of the saving. And anything you
|
|
458
|
+
must *react to* mid-wait is not a wait at all: it is the work, and it stays here.
|
|
459
|
+
|
|
409
460
|
## 7. Deferred work — `followups[]`
|
|
410
461
|
|
|
411
462
|
Every chain in this plugin reaches moments where the right call is **not to do it here**: a build
|
|
@@ -21,7 +21,7 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow:feat:ship`, wi
|
|
|
21
21
|
|
|
22
22
|
## 0. Pre-flight
|
|
23
23
|
|
|
24
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
24
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
25
25
|
|
|
26
26
|
- Read `meta.json` and `00-summary.md`; open in full only `04-fix.md` (the Brief), `06-review.md` (the verdict), `05-validation.md`, the §"Root cause identified" of `03-investigation.md`, and `99-postmortem.md` if it exists. (flow-core §5)
|
|
27
27
|
- Require `review` in `phases_done`; also `validate` if `size` ≥ S, and `postmortem` if `size` is M or L (the same sizes `/flow:bug:review §8` routes to postmortem — one rule). Missing → refuse and redirect to the missing step.
|
|
@@ -156,6 +156,8 @@ Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.sq
|
|
|
156
156
|
|
|
157
157
|
**Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh `panel.json` (flow-core §4) right here, before §3.2 and before anything else can fail.
|
|
158
158
|
|
|
159
|
+
**The pipeline the push starts is not watched from this thread — `/flow:feat:ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `/flow:work:green`'s to triage, never this command's.
|
|
160
|
+
|
|
159
161
|
### 3.2 Pre-deploy thread (deployment gate)
|
|
160
162
|
**Only if `git.predeploy_gate` is active and the fix has pre-deploy SQL** (§1). After creating the MR/PR, open **a single resolvable/blocking thread** with all the consolidated SQL, using the host from `git.host`/`git.cli` (GitLab: `glab api ".../merge_requests/<iid>/discussions"`; GitHub: review conversation with required resolution). Body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE deploying" + "Resolve only after running it in production".
|
|
161
163
|
|
|
@@ -18,7 +18,7 @@ Validate that the fix works and that the bug does not return.
|
|
|
18
18
|
|
|
19
19
|
## 1. Pre-flight
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
21
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
22
22
|
|
|
23
23
|
- Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
|
|
24
24
|
- Require `fix` in `phases_done`.
|
|
@@ -33,7 +33,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
33
33
|
|
|
34
34
|
Then:
|
|
35
35
|
1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
|
|
36
|
-
2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow).
|
|
36
|
+
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).
|
|
37
37
|
3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
|
|
38
38
|
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).
|
|
39
39
|
|
|
@@ -74,15 +74,17 @@ is invalid.
|
|
|
74
74
|
|
|
75
75
|
#### 1.5.2 Resolved models (only if either file has a `models` key)
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Three keys, all about subagents. Print what each one actually reaches:
|
|
78
78
|
|
|
79
79
|
```
|
|
80
|
-
agents
|
|
81
|
-
|
|
82
|
-
workers
|
|
80
|
+
agents fable → improvised subagents: review panel members with no named agent, blinded
|
|
81
|
+
auditors, delegated build pieces, the general-purpose challenger
|
|
82
|
+
workers (empty) → fan-out rounds — falls back to `agents`
|
|
83
|
+
supervisors (empty) → the delegated waits (running pipeline, pending deploy, long suite) —
|
|
84
|
+
falls back to `agents`
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
- State once, plainly: **the main agent's own steps are not covered by
|
|
87
|
+
- State once, plainly: **the main agent's own steps are not covered by any key** — reading the
|
|
86
88
|
ticket, the design, and the single-thread `build`/`fix` run on the model the command was launched
|
|
87
89
|
with, because an agent cannot switch its own model. A phase that wants another one says so at the
|
|
88
90
|
handoff; nothing enforces it.
|
|
@@ -14,7 +14,7 @@ prompt = """
|
|
|
14
14
|
> - `/model <value>` → the `--model` flag at launch.
|
|
15
15
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
|
|
16
16
|
|
|
17
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
17
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
18
18
|
|
|
19
19
|
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.
|
|
20
20
|
|
|
@@ -177,6 +177,8 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
177
177
|
|
|
178
178
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh `panel.json` right here, before §4.2 and before anything else can fail.
|
|
179
179
|
|
|
180
|
+
**The push just started a pipeline, and this thread does not sit on it.** Its result belongs to `/flow:work:green`, not here, so either close the ship with CI reported as *running* — the honest state — or, when the user wants to hear how it ended, delegate the wait as any other (flow-core §6.5): one supervisor subagent on `models.supervisors`, a deadline, and back with status plus failing-job evidence. Whatever it returns, a red pipeline is triaged by `/flow:work:green`; this command never fixes CI and never closes reporting a green it did not see.
|
|
181
|
+
|
|
180
182
|
### 4.2 Pre-deploy thread (deployment gate)
|
|
181
183
|
**Only if `git.predeploy_gate` is active and the branch has pre-deploy SQL** (§2). After creating the MR/PR, open **a single resolvable/blocking thread** with **all** the consolidated SQL, using the `git.host`/`git.cli` host:
|
|
182
184
|
- **GitLab**: `glab api "projects/<repo-url-encoded>/merge_requests/<iid>/discussions" -f body="..."` (resolvable thread).
|
|
@@ -14,7 +14,7 @@ prompt = """
|
|
|
14
14
|
> - `/model <value>` → the `--model` flag at launch.
|
|
15
15
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
|
|
16
16
|
|
|
17
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
17
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
18
18
|
|
|
19
19
|
Verify the feature is complete: test coverage, edge cases, performance, regressions.
|
|
20
20
|
|
|
@@ -38,7 +38,7 @@ One of the three below writes and two of them read, so they do not all go at onc
|
|
|
38
38
|
|
|
39
39
|
**A green suite is not a performance result** — a tiny fixture database proves a query's **rows**, never its **plan**. If `/flow:feat:review §3.6` left any query verdict `unresolved`, or an acceptance criterion concerns speed or volume: run the measurement of **`/flow:work:query §4`** with the volumes in `data.volumes` (or a data set shaped like them — the distribution matters more than the total), record plan and timings, and gate on the result. No `data.*` configuration and the criterion cannot be measured → it is `unproven` with the reason, never silently `proven`.
|
|
40
40
|
|
|
41
|
-
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
41
|
+
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. **A suite measured in tens of minutes is a wait, not a step**: hand it to a supervisor subagent on `models.supervisors` (flow-core §6.5) — it runs it, times out, and brings back the exit code plus the failing tests' output, never a reading of whether those failures matter. Short suites stay here; delegating ninety seconds costs more than running them. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
42
42
|
|
|
43
43
|
## 3. Criteria coverage (S and larger)
|
|
44
44
|
|
|
@@ -28,7 +28,7 @@ Usage: `/flow:work:green [mr-iid-or-url]` — optional; default is the MR/PR of
|
|
|
28
28
|
|
|
29
29
|
Extract from `git`: `host`, `cli` (empty → the default for that host), `default_base`. The term MR/PR follows `host`. From `tracker`: `tool`, `prefix`. From `quality`: `test`, `test_one`, `static_analysis`, `style_fix` (local reproduce/verify commands, §5; empty → auto-discover from Makefile / npm / composer scripts), `review_skill` (§5, non-trivial fixes). `agents`: expert sub-agents to delegate fixes to. `knowledge.search` set → `knowledge.search` in §3.
|
|
30
30
|
|
|
31
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
31
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
32
32
|
|
|
33
33
|
**Autonomy.** Modes as in flow-core §2; `guided`/`auto` record their choices in `09-ci.md` (e.g. a pure formatter auto-fix). **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
|
|
34
34
|
1. **Any push** (§6).
|
|
@@ -78,7 +78,7 @@ Decide the exit on the **combination** of both halves, never on the pipeline alo
|
|
|
78
78
|
|
|
79
79
|
- **Pipeline green *and* verdict mergeable** → report both facts, stop.
|
|
80
80
|
- **Pipeline green but blockers remain** → do **not** report "green, you're good": report the pipeline green, list the blockers, continue to §3 with them.
|
|
81
|
-
- **Pipeline running / pending** →
|
|
81
|
+
- **Pipeline running / pending** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors`, told which run to watch, at what interval, with a deadline and every terminal state, bringing back status **plus evidence** (failing job names, exit codes, log tail, run URL) and **no verdict** — the triage of §3 is this thread's, whatever it reports. Then work any **non-pipeline** blockers meanwhile, or end the turn on the harness's own wake-up (a background task that re-invokes you, `Monitor`, `ScheduleWakeup` ~2–3 min). Neither a supervisor nor a wake-up available → say so plainly and let the user re-run when CI finishes; never imply the pipeline is being watched when nothing is watching it.
|
|
82
82
|
- **Pipeline never ran** (no CI, or not triggered) → say so; verdict clean too → stop.
|
|
83
83
|
|
|
84
84
|
## 3. Triage every blocker
|
|
@@ -140,7 +140,7 @@ Run **before** the other buckets, only after the hard gate:
|
|
|
140
140
|
|
|
141
141
|
- **Push (hard gate).** Show what will be pushed (files, commit message), confirm with `AskUserQuestion`. Never push to the base branch: HEAD must not be `git.default_base` and its upstream must point to the branch itself (same anti-deploy lock as `/flow:feat:ship §4.0` and `/flow:work:respond §6.2`). `git push` to the existing branch — the push re-triggers the pipeline. **Force-push only after a rebase the user explicitly chose** (§5.C.2), and only `git push --force-with-lease` — never bare `--force`, never as a way out of a rejected push (the remote moved: fetch and understand first).
|
|
142
142
|
- **Rerun without a push** (rerun-only, K). Only after the user confirms (hard gate): `glab ci retry` / `gh run rerun <run-id> --failed`. Attach the recorded flake evidence. Fails again the same way → **not** flaky: reclassify to T/Y and fix; do not rerun a second time.
|
|
143
|
-
- **Watch it back to green
|
|
143
|
+
- **Watch it back to green — delegated, not polled from here** (flow-core §6.5). The push starts a run that takes as long as the one you just triaged: hand it to the same kind of supervisor as §2.3 and end the turn, or let a later `/flow:work:green` re-check. With neither a supervisor nor a wake-up, say so instead of implying it is watched. Do not claim the pipeline is fixed until it reports green: report what you pushed and that CI is re-running.
|
|
144
144
|
- **Re-read the merge verdict too.** Once the pipeline settles, re-run §2.1 and report the *merge* verdict, not only the pipeline — the only evidence the MR/PR is actually mergeable.
|
|
145
145
|
|
|
146
146
|
## 7. Log, loop, and domain knowledge
|
|
@@ -14,7 +14,7 @@ prompt = """
|
|
|
14
14
|
> - `/model <value>` → the `--model` flag at launch.
|
|
15
15
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
|
|
16
16
|
|
|
17
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
17
|
+
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
18
18
|
|
|
19
19
|
**Autopiloted post-deploy monitoring**: signals **scoped to the change** over a window (default 30 min), against a baseline; alert on errors or performance regressions from the deploy.
|
|
20
20
|
|
|
@@ -43,7 +43,7 @@ If `knowledge.search` is set, call `knowledge.search` with the ticket name befor
|
|
|
43
43
|
- **Confirm WHAT is being deployed — never assume it from `meta.json`** (several MR/PRs per ticket; stale artifacts). Cross-reference the **actual deploy event** (e.g. `get_change_stories`) and recent merges; any ambiguity → `AskUserQuestion` which MR/PR or commit is deploying. The surface (§2) is scoped to **that** change.
|
|
44
44
|
- **When to start.** When the code **is live in production**, not at merge. Launched right after the merge → **wait for the deploy yourself**:
|
|
45
45
|
- Check whether the new version is live (`observability.deploy_detect`; empty → `get_change_stories` or other deploy indicators).
|
|
46
|
-
- **Not yet deployed** → poll every ~2-3 min
|
|
46
|
+
- **Not yet deployed** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors` watching for the go-live of that exact SHA, ~2-3 min interval, a deadline, and back with status plus evidence (pipeline/job names, exit codes, the deploy event) — never with a judgement on whether the deploy is healthy. No supervisor available → poll every ~2-3 min here and say that this thread is doing the waiting. Either way the monitoring window does not start until the code is live.
|
|
47
47
|
- **Pipeline fails** → **abort monitoring** and alert: the code did not reach production.
|
|
48
48
|
- Already deployed → proceed.
|
|
49
49
|
- **How to identify YOUR deploy.** The chain in `observability.deploy_detect`. Empty → merge to base branch → CI/CD pipeline → go-live jobs. Determine the exact merge commit; confirm the go-live jobs of the affected services reach `success`. Any fail → **abort**.
|
package/adapters/hermes/CORE.md
CHANGED
|
@@ -17,7 +17,7 @@ Every `/flow-*` command assumes these rules. They are stated once, here, so a co
|
|
|
17
17
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
18
18
|
`flow-core`" means this file.
|
|
19
19
|
|
|
20
|
-
**This file belongs to flow `0.
|
|
20
|
+
**This file belongs to flow `0.69.0`.** Compare it once, at the start of the session, against
|
|
21
21
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
22
22
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
23
23
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -152,10 +152,10 @@ explicit rather than degrading in silence.
|
|
|
152
152
|
|
|
153
153
|
## 1. Models — which model runs a step
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
157
|
-
|
|
158
|
-
nothing.
|
|
155
|
+
Three keys, and they govern **subagents only**: `models.agents` for every subagent a command
|
|
156
|
+
improvises, `models.workers` for the parallel fan-out rounds, and `models.supervisors` for the
|
|
157
|
+
bounded waits of §6.5 — the last two falling back to `models.agents`. Empty, absent, or no section
|
|
158
|
+
→ everything runs on the model you were launched with, and you say nothing.
|
|
159
159
|
|
|
160
160
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
161
161
|
which keeps the model its own definition sets.
|
|
@@ -179,6 +179,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
179
179
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
180
180
|
was wise.
|
|
181
181
|
|
|
182
|
+
**A delegated wait says the same line at one agent.** A round of fifteen and a single supervisor
|
|
183
|
+
sitting on a forty-minute pipeline are the same blank cheque arriving at different speeds. So when a
|
|
184
|
+
wait is dispatched (§6.5) with `models.supervisors` and `models.agents` both empty, say it in one
|
|
185
|
+
line: the wait inherits this thread's model because no key is set. Name the key, never a model.
|
|
186
|
+
|
|
182
187
|
## 2. Autonomy — `autonomy.mode`
|
|
183
188
|
|
|
184
189
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -209,6 +214,10 @@ sensible default and record it.
|
|
|
209
214
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
210
215
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
211
216
|
- (e) **Anything already decided and recorded** in the work's artifacts or `meta.json.notes`. Reopen only when new evidence contradicts the premise — then lead with the evidence.
|
|
217
|
+
- (f) **Delegating a wait** (§6.5) — handing a running pipeline, a deploy that has not landed or a
|
|
218
|
+
long suite to a supervisor is mechanics, and the cost objection to waiting is exactly what the
|
|
219
|
+
delegation removes. Take it, record it. What is still asked in `manual` is whatever the evidence
|
|
220
|
+
turns out to call for, once it is back.
|
|
212
221
|
|
|
213
222
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
214
223
|
|
|
@@ -407,6 +416,48 @@ magnitude over what anyone intended.
|
|
|
407
416
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
408
417
|
budget and a phase that found nothing are not the same result.
|
|
409
418
|
|
|
419
|
+
### 6.5 — A wait is delegated, never sat through
|
|
420
|
+
|
|
421
|
+
**Waiting is not a phase, and on this thread it is not free.** A pipeline polled from here charges
|
|
422
|
+
the whole conversation for every cycle that reads `pending`: the context is resent, the model
|
|
423
|
+
reasons about a state that has not moved, and a forty-minute suite costs more to *watch* than the
|
|
424
|
+
diff it is checking cost to write. The expense was never the waiting — it is who does it.
|
|
425
|
+
|
|
426
|
+
So a wait you expect to run **longer than a few minutes** goes to **one supervisor subagent**, with
|
|
427
|
+
a brief closed at both ends:
|
|
428
|
+
|
|
429
|
+
- **What to watch** — the exact command, run id or resource, never "the CI".
|
|
430
|
+
- **How often, and until when** — the interval, and a deadline after which it returns what it has
|
|
431
|
+
instead of waiting forever.
|
|
432
|
+
- **Every terminal state** — success *and* failure, so it neither comes back at the first red job
|
|
433
|
+
with three still running, nor sits out a queue that will never move.
|
|
434
|
+
- **What it brings back** — status (`finished` · `failed` · `timed out`), and the evidence for it:
|
|
435
|
+
job names, exit codes, the log tail that matters, the run URL, the SHA it watched. Plus the path
|
|
436
|
+
it writes before replying, exactly like any other brief.
|
|
437
|
+
|
|
438
|
+
**It reports; it never rules.** The supervisor says which job failed and hands you the log. It does
|
|
439
|
+
not decide that the failure is flaky, that the threshold is close enough, or that the branch can
|
|
440
|
+
merge now. Delegating that judgement is how a pipeline ends up declared green by whoever was
|
|
441
|
+
cheapest to ask, which is the one thing `/flow-work-green` exists to forbid. Delegate the waiting
|
|
442
|
+
and the evidence; the verdict stays here.
|
|
443
|
+
|
|
444
|
+
**Then end the turn.** Dispatching a supervisor and staying in a poll loop of your own pays both
|
|
445
|
+
bills and saves nothing. What wakes you is whatever the harness offers — a background task that
|
|
446
|
+
re-invokes you when it finishes, a scheduled wake-up, a message back to this thread; where it offers
|
|
447
|
+
none, the supervisor's evidence file is read at your next stop, and **you say that** rather than
|
|
448
|
+
implying something is being watched. Refresh `panel.json` before you go (§4): the line carries
|
|
449
|
+
`mark: "wait"` and `stale_after_minutes` set to the deadline you gave, because a thread that goes
|
|
450
|
+
quiet with `current` on screen reads as a session that died.
|
|
451
|
+
|
|
452
|
+
**A supervisor is a subagent** — it runs on `models.supervisors` (empty → `models.agents`, then what
|
|
453
|
+
this thread runs on), and it counts against `agents.budget_max` like any other, relaunches included.
|
|
454
|
+
Bound it with the deadline instead of relaunching a wait that has already told you the queue is not
|
|
455
|
+
moving.
|
|
456
|
+
|
|
457
|
+
**Not every wait is worth a brief.** A suite that finishes in ninety seconds costs more to delegate
|
|
458
|
+
than to run — the brief, the round trip and the report are the whole of the saving. And anything you
|
|
459
|
+
must *react to* mid-wait is not a wait at all: it is the work, and it stays here.
|
|
460
|
+
|
|
410
461
|
## 7. Deferred work — `followups[]`
|
|
411
462
|
|
|
412
463
|
Every chain in this plugin reaches moments where the right call is **not to do it here**: a build
|
|
@@ -25,7 +25,7 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow-feat-ship`, wi
|
|
|
25
25
|
|
|
26
26
|
## 0. Pre-flight
|
|
27
27
|
|
|
28
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
28
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
29
29
|
|
|
30
30
|
- Read `meta.json` and `00-summary.md`; open in full only `04-fix.md` (the Brief), `06-review.md` (the verdict), `05-validation.md`, the §"Root cause identified" of `03-investigation.md`, and `99-postmortem.md` if it exists. (flow-core §5)
|
|
31
31
|
- Require `review` in `phases_done`; also `validate` if `size` ≥ S, and `postmortem` if `size` is M or L (the same sizes `/flow-bug-review §8` routes to postmortem — one rule). Missing → refuse and redirect to the missing step.
|
|
@@ -160,6 +160,8 @@ Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.sq
|
|
|
160
160
|
|
|
161
161
|
**Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh `panel.json` (flow-core §4) right here, before §3.2 and before anything else can fail.
|
|
162
162
|
|
|
163
|
+
**The pipeline the push starts is not watched from this thread — `/flow-feat-ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `/flow-work-green`'s to triage, never this command's.
|
|
164
|
+
|
|
163
165
|
### 3.2 Pre-deploy thread (deployment gate)
|
|
164
166
|
**Only if `git.predeploy_gate` is active and the fix has pre-deploy SQL** (§1). After creating the MR/PR, open **a single resolvable/blocking thread** with all the consolidated SQL, using the host from `git.host`/`git.cli` (GitLab: `glab api ".../merge_requests/<iid>/discussions"`; GitHub: review conversation with required resolution). Body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE deploying" + "Resolve only after running it in production".
|
|
165
167
|
|
|
@@ -22,7 +22,7 @@ Validate that the fix works and that the bug does not return.
|
|
|
22
22
|
|
|
23
23
|
## 1. Pre-flight
|
|
24
24
|
|
|
25
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
25
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
26
26
|
|
|
27
27
|
- Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
|
|
28
28
|
- Require `fix` in `phases_done`.
|
|
@@ -37,7 +37,7 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
37
37
|
|
|
38
38
|
Then:
|
|
39
39
|
1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
|
|
40
|
-
2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow).
|
|
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
41
|
3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
|
|
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
|
|
|
@@ -78,15 +78,17 @@ is invalid.
|
|
|
78
78
|
|
|
79
79
|
#### 1.5.2 Resolved models (only if either file has a `models` key)
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
Three keys, all about subagents. Print what each one actually reaches:
|
|
82
82
|
|
|
83
83
|
```
|
|
84
|
-
agents
|
|
85
|
-
|
|
86
|
-
workers
|
|
84
|
+
agents fable → improvised subagents: review panel members with no named agent, blinded
|
|
85
|
+
auditors, delegated build pieces, the general-purpose challenger
|
|
86
|
+
workers (empty) → fan-out rounds — falls back to `agents`
|
|
87
|
+
supervisors (empty) → the delegated waits (running pipeline, pending deploy, long suite) —
|
|
88
|
+
falls back to `agents`
|
|
87
89
|
```
|
|
88
90
|
|
|
89
|
-
- State once, plainly: **the main agent's own steps are not covered by
|
|
91
|
+
- State once, plainly: **the main agent's own steps are not covered by any key** — reading the
|
|
90
92
|
ticket, the design, and the single-thread `build`/`fix` run on the model the command was launched
|
|
91
93
|
with, because an agent cannot switch its own model. A phase that wants another one says so at the
|
|
92
94
|
handoff; nothing enforces it.
|
|
@@ -18,7 +18,7 @@ description: "Commit, push, MR/PR, and offer to save domain knowledge"
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcp_servers` in `~/.hermes/config.yaml` (see `config.snippet.yaml`).
|
|
19
19
|
> - `$ARGUMENTS` → what the user typed after the skill name: Hermes takes everything from the first non-skill token on as the instruction.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
21
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
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
|
|
|
@@ -181,6 +181,8 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
181
181
|
|
|
182
182
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh `panel.json` right here, before §4.2 and before anything else can fail.
|
|
183
183
|
|
|
184
|
+
**The push just started a pipeline, and this thread does not sit on it.** Its result belongs to `/flow-work-green`, not here, so either close the ship with CI reported as *running* — the honest state — or, when the user wants to hear how it ended, delegate the wait as any other (flow-core §6.5): one supervisor subagent on `models.supervisors`, a deadline, and back with status plus failing-job evidence. Whatever it returns, a red pipeline is triaged by `/flow-work-green`; this command never fixes CI and never closes reporting a green it did not see.
|
|
185
|
+
|
|
184
186
|
### 4.2 Pre-deploy thread (deployment gate)
|
|
185
187
|
**Only if `git.predeploy_gate` is active and the branch has pre-deploy SQL** (§2). After creating the MR/PR, open **a single resolvable/blocking thread** with **all** the consolidated SQL, using the `git.host`/`git.cli` host:
|
|
186
188
|
- **GitLab**: `glab api "projects/<repo-url-encoded>/merge_requests/<iid>/discussions" -f body="..."` (resolvable thread).
|
|
@@ -18,7 +18,7 @@ description: "Validate tests, edge cases, and integrity before shipping"
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcp_servers` in `~/.hermes/config.yaml` (see `config.snippet.yaml`).
|
|
19
19
|
> - `$ARGUMENTS` → what the user typed after the skill name: Hermes takes everything from the first non-skill token on as the instruction.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
21
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
22
22
|
|
|
23
23
|
Verify the feature is complete: test coverage, edge cases, performance, regressions.
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@ One of the three below writes and two of them read, so they do not all go at onc
|
|
|
42
42
|
|
|
43
43
|
**A green suite is not a performance result** — a tiny fixture database proves a query's **rows**, never its **plan**. If `/flow-feat-review §3.6` left any query verdict `unresolved`, or an acceptance criterion concerns speed or volume: run the measurement of **`/flow-work-query §4`** with the volumes in `data.volumes` (or a data set shaped like them — the distribution matters more than the total), record plan and timings, and gate on the result. No `data.*` configuration and the criterion cannot be measured → it is `unproven` with the reason, never silently `proven`.
|
|
44
44
|
|
|
45
|
-
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
45
|
+
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. **A suite measured in tens of minutes is a wait, not a step**: hand it to a supervisor subagent on `models.supervisors` (flow-core §6.5) — it runs it, times out, and brings back the exit code plus the failing tests' output, never a reading of whether those failures matter. Short suites stay here; delegating ninety seconds costs more than running them. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
46
46
|
|
|
47
47
|
## 3. Criteria coverage (S and larger)
|
|
48
48
|
|
|
@@ -32,7 +32,7 @@ Usage: `/flow-work-green [mr-iid-or-url]` — optional; default is the MR/PR of
|
|
|
32
32
|
|
|
33
33
|
Extract from `git`: `host`, `cli` (empty → the default for that host), `default_base`. The term MR/PR follows `host`. From `tracker`: `tool`, `prefix`. From `quality`: `test`, `test_one`, `static_analysis`, `style_fix` (local reproduce/verify commands, §5; empty → auto-discover from Makefile / npm / composer scripts), `review_skill` (§5, non-trivial fixes). `agents`: expert sub-agents to delegate fixes to. `knowledge.search` set → `knowledge.search` in §3.
|
|
34
34
|
|
|
35
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
35
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
36
36
|
|
|
37
37
|
**Autonomy.** Modes as in flow-core §2; `guided`/`auto` record their choices in `09-ci.md` (e.g. a pure formatter auto-fix). **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
|
|
38
38
|
1. **Any push** (§6).
|
|
@@ -82,7 +82,7 @@ Decide the exit on the **combination** of both halves, never on the pipeline alo
|
|
|
82
82
|
|
|
83
83
|
- **Pipeline green *and* verdict mergeable** → report both facts, stop.
|
|
84
84
|
- **Pipeline green but blockers remain** → do **not** report "green, you're good": report the pipeline green, list the blockers, continue to §3 with them.
|
|
85
|
-
- **Pipeline running / pending** →
|
|
85
|
+
- **Pipeline running / pending** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors`, told which run to watch, at what interval, with a deadline and every terminal state, bringing back status **plus evidence** (failing job names, exit codes, log tail, run URL) and **no verdict** — the triage of §3 is this thread's, whatever it reports. Then work any **non-pipeline** blockers meanwhile, or end the turn on the harness's own wake-up (a background task that re-invokes you, `Monitor`, `ScheduleWakeup` ~2–3 min). Neither a supervisor nor a wake-up available → say so plainly and let the user re-run when CI finishes; never imply the pipeline is being watched when nothing is watching it.
|
|
86
86
|
- **Pipeline never ran** (no CI, or not triggered) → say so; verdict clean too → stop.
|
|
87
87
|
|
|
88
88
|
## 3. Triage every blocker
|
|
@@ -144,7 +144,7 @@ Run **before** the other buckets, only after the hard gate:
|
|
|
144
144
|
|
|
145
145
|
- **Push (hard gate).** Show what will be pushed (files, commit message), confirm with `AskUserQuestion`. Never push to the base branch: HEAD must not be `git.default_base` and its upstream must point to the branch itself (same anti-deploy lock as `/flow-feat-ship §4.0` and `/flow-work-respond §6.2`). `git push` to the existing branch — the push re-triggers the pipeline. **Force-push only after a rebase the user explicitly chose** (§5.C.2), and only `git push --force-with-lease` — never bare `--force`, never as a way out of a rejected push (the remote moved: fetch and understand first).
|
|
146
146
|
- **Rerun without a push** (rerun-only, K). Only after the user confirms (hard gate): `glab ci retry` / `gh run rerun <run-id> --failed`. Attach the recorded flake evidence. Fails again the same way → **not** flaky: reclassify to T/Y and fix; do not rerun a second time.
|
|
147
|
-
- **Watch it back to green
|
|
147
|
+
- **Watch it back to green — delegated, not polled from here** (flow-core §6.5). The push starts a run that takes as long as the one you just triaged: hand it to the same kind of supervisor as §2.3 and end the turn, or let a later `/flow-work-green` re-check. With neither a supervisor nor a wake-up, say so instead of implying it is watched. Do not claim the pipeline is fixed until it reports green: report what you pushed and that CI is re-running.
|
|
148
148
|
- **Re-read the merge verdict too.** Once the pipeline settles, re-run §2.1 and report the *merge* verdict, not only the pipeline — the only evidence the MR/PR is actually mergeable.
|
|
149
149
|
|
|
150
150
|
## 7. Log, loop, and domain knowledge
|
|
@@ -18,7 +18,7 @@ description: "Monitor the observability platform after a deploy and alert on err
|
|
|
18
18
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcp_servers` in `~/.hermes/config.yaml` (see `config.snippet.yaml`).
|
|
19
19
|
> - `$ARGUMENTS` → what the user typed after the skill name: Hermes takes everything from the first non-skill token on as the instruction.
|
|
20
20
|
|
|
21
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
21
|
+
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
22
22
|
|
|
23
23
|
**Autopiloted post-deploy monitoring**: signals **scoped to the change** over a window (default 30 min), against a baseline; alert on errors or performance regressions from the deploy.
|
|
24
24
|
|
|
@@ -47,7 +47,7 @@ If `knowledge.search` is set, call `knowledge.search` with the ticket name befor
|
|
|
47
47
|
- **Confirm WHAT is being deployed — never assume it from `meta.json`** (several MR/PRs per ticket; stale artifacts). Cross-reference the **actual deploy event** (e.g. `get_change_stories`) and recent merges; any ambiguity → `AskUserQuestion` which MR/PR or commit is deploying. The surface (§2) is scoped to **that** change.
|
|
48
48
|
- **When to start.** When the code **is live in production**, not at merge. Launched right after the merge → **wait for the deploy yourself**:
|
|
49
49
|
- Check whether the new version is live (`observability.deploy_detect`; empty → `get_change_stories` or other deploy indicators).
|
|
50
|
-
- **Not yet deployed** → poll every ~2-3 min
|
|
50
|
+
- **Not yet deployed** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors` watching for the go-live of that exact SHA, ~2-3 min interval, a deadline, and back with status plus evidence (pipeline/job names, exit codes, the deploy event) — never with a judgement on whether the deploy is healthy. No supervisor available → poll every ~2-3 min here and say that this thread is doing the waiting. Either way the monitoring window does not start until the code is live.
|
|
51
51
|
- **Pipeline fails** → **abort monitoring** and alert: the code did not reach production.
|
|
52
52
|
- Already deployed → proceed.
|
|
53
53
|
- **How to identify YOUR deploy.** The chain in `observability.deploy_detect`. Empty → merge to base branch → CI/CD pipeline → go-live jobs. Determine the exact merge commit; confirm the go-live jobs of the affected services reach `success`. Any fail → **abort**.
|
|
@@ -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.69.0`.** Compare it once, at the start of the session, against
|
|
20
20
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
21
21
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
22
22
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -151,10 +151,10 @@ explicit rather than degrading in silence.
|
|
|
151
151
|
|
|
152
152
|
## 1. Models — which model runs a step
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
156
|
-
|
|
157
|
-
nothing.
|
|
154
|
+
Three keys, and they govern **subagents only**: `models.agents` for every subagent a command
|
|
155
|
+
improvises, `models.workers` for the parallel fan-out rounds, and `models.supervisors` for the
|
|
156
|
+
bounded waits of §6.5 — the last two falling back to `models.agents`. Empty, absent, or no section
|
|
157
|
+
→ everything runs on the model you were launched with, and you say nothing.
|
|
158
158
|
|
|
159
159
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
160
160
|
which keeps the model its own definition sets.
|
|
@@ -178,6 +178,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
178
178
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
179
179
|
was wise.
|
|
180
180
|
|
|
181
|
+
**A delegated wait says the same line at one agent.** A round of fifteen and a single supervisor
|
|
182
|
+
sitting on a forty-minute pipeline are the same blank cheque arriving at different speeds. So when a
|
|
183
|
+
wait is dispatched (§6.5) with `models.supervisors` and `models.agents` both empty, say it in one
|
|
184
|
+
line: the wait inherits this thread's model because no key is set. Name the key, never a model.
|
|
185
|
+
|
|
181
186
|
## 2. Autonomy — `autonomy.mode`
|
|
182
187
|
|
|
183
188
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -208,6 +213,10 @@ sensible default and record it.
|
|
|
208
213
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
209
214
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
210
215
|
- (e) **Anything already decided and recorded** in the work's artifacts or `meta.json.notes`. Reopen only when new evidence contradicts the premise — then lead with the evidence.
|
|
216
|
+
- (f) **Delegating a wait** (§6.5) — handing a running pipeline, a deploy that has not landed or a
|
|
217
|
+
long suite to a supervisor is mechanics, and the cost objection to waiting is exactly what the
|
|
218
|
+
delegation removes. Take it, record it. What is still asked in `manual` is whatever the evidence
|
|
219
|
+
turns out to call for, once it is back.
|
|
211
220
|
|
|
212
221
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
213
222
|
|
|
@@ -406,6 +415,48 @@ magnitude over what anyone intended.
|
|
|
406
415
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
407
416
|
budget and a phase that found nothing are not the same result.
|
|
408
417
|
|
|
418
|
+
### 6.5 — A wait is delegated, never sat through
|
|
419
|
+
|
|
420
|
+
**Waiting is not a phase, and on this thread it is not free.** A pipeline polled from here charges
|
|
421
|
+
the whole conversation for every cycle that reads `pending`: the context is resent, the model
|
|
422
|
+
reasons about a state that has not moved, and a forty-minute suite costs more to *watch* than the
|
|
423
|
+
diff it is checking cost to write. The expense was never the waiting — it is who does it.
|
|
424
|
+
|
|
425
|
+
So a wait you expect to run **longer than a few minutes** goes to **one supervisor subagent**, with
|
|
426
|
+
a brief closed at both ends:
|
|
427
|
+
|
|
428
|
+
- **What to watch** — the exact command, run id or resource, never "the CI".
|
|
429
|
+
- **How often, and until when** — the interval, and a deadline after which it returns what it has
|
|
430
|
+
instead of waiting forever.
|
|
431
|
+
- **Every terminal state** — success *and* failure, so it neither comes back at the first red job
|
|
432
|
+
with three still running, nor sits out a queue that will never move.
|
|
433
|
+
- **What it brings back** — status (`finished` · `failed` · `timed out`), and the evidence for it:
|
|
434
|
+
job names, exit codes, the log tail that matters, the run URL, the SHA it watched. Plus the path
|
|
435
|
+
it writes before replying, exactly like any other brief.
|
|
436
|
+
|
|
437
|
+
**It reports; it never rules.** The supervisor says which job failed and hands you the log. It does
|
|
438
|
+
not decide that the failure is flaky, that the threshold is close enough, or that the branch can
|
|
439
|
+
merge now. Delegating that judgement is how a pipeline ends up declared green by whoever was
|
|
440
|
+
cheapest to ask, which is the one thing `/flow-work-green` exists to forbid. Delegate the waiting
|
|
441
|
+
and the evidence; the verdict stays here.
|
|
442
|
+
|
|
443
|
+
**Then end the turn.** Dispatching a supervisor and staying in a poll loop of your own pays both
|
|
444
|
+
bills and saves nothing. What wakes you is whatever the harness offers — a background task that
|
|
445
|
+
re-invokes you when it finishes, a scheduled wake-up, a message back to this thread; where it offers
|
|
446
|
+
none, the supervisor's evidence file is read at your next stop, and **you say that** rather than
|
|
447
|
+
implying something is being watched. Refresh `panel.json` before you go (§4): the line carries
|
|
448
|
+
`mark: "wait"` and `stale_after_minutes` set to the deadline you gave, because a thread that goes
|
|
449
|
+
quiet with `current` on screen reads as a session that died.
|
|
450
|
+
|
|
451
|
+
**A supervisor is a subagent** — it runs on `models.supervisors` (empty → `models.agents`, then what
|
|
452
|
+
this thread runs on), and it counts against `agents.budget_max` like any other, relaunches included.
|
|
453
|
+
Bound it with the deadline instead of relaunching a wait that has already told you the queue is not
|
|
454
|
+
moving.
|
|
455
|
+
|
|
456
|
+
**Not every wait is worth a brief.** A suite that finishes in ninety seconds costs more to delegate
|
|
457
|
+
than to run — the brief, the round trip and the report are the whole of the saving. And anything you
|
|
458
|
+
must *react to* mid-wait is not a wait at all: it is the work, and it stays here.
|
|
459
|
+
|
|
409
460
|
## 7. Deferred work — `followups[]`
|
|
410
461
|
|
|
411
462
|
Every chain in this plugin reaches moments where the right call is **not to do it here**: a build
|
|
@@ -23,7 +23,7 @@ Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow-feat-ship`, wi
|
|
|
23
23
|
|
|
24
24
|
## 0. Pre-flight
|
|
25
25
|
|
|
26
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
26
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
27
27
|
|
|
28
28
|
- Read `meta.json` and `00-summary.md`; open in full only `04-fix.md` (the Brief), `06-review.md` (the verdict), `05-validation.md`, the §"Root cause identified" of `03-investigation.md`, and `99-postmortem.md` if it exists. (flow-core §5)
|
|
29
29
|
- Require `review` in `phases_done`; also `validate` if `size` ≥ S, and `postmortem` if `size` is M or L (the same sizes `/flow-bug-review §8` routes to postmortem — one rule). Missing → refuse and redirect to the missing step.
|
|
@@ -158,6 +158,8 @@ Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.sq
|
|
|
158
158
|
|
|
159
159
|
**Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh `panel.json` (flow-core §4) right here, before §3.2 and before anything else can fail.
|
|
160
160
|
|
|
161
|
+
**The pipeline the push starts is not watched from this thread — `/flow-feat-ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `/flow-work-green`'s to triage, never this command's.
|
|
162
|
+
|
|
161
163
|
### 3.2 Pre-deploy thread (deployment gate)
|
|
162
164
|
**Only if `git.predeploy_gate` is active and the fix has pre-deploy SQL** (§1). After creating the MR/PR, open **a single resolvable/blocking thread** with all the consolidated SQL, using the host from `git.host`/`git.cli` (GitLab: `glab api ".../merge_requests/<iid>/discussions"`; GitHub: review conversation with required resolution). Body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE deploying" + "Resolve only after running it in production".
|
|
163
165
|
|
|
@@ -20,7 +20,7 @@ Validate that the fix works and that the bug does not return.
|
|
|
20
20
|
|
|
21
21
|
## 1. Pre-flight
|
|
22
22
|
|
|
23
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
23
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
24
24
|
|
|
25
25
|
- Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
|
|
26
26
|
- Require `fix` in `phases_done`.
|
|
@@ -35,7 +35,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
35
35
|
|
|
36
36
|
Then:
|
|
37
37
|
1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
|
|
38
|
-
2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow).
|
|
38
|
+
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).
|
|
39
39
|
3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
|
|
40
40
|
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).
|
|
41
41
|
|
|
@@ -76,15 +76,17 @@ is invalid.
|
|
|
76
76
|
|
|
77
77
|
#### 1.5.2 Resolved models (only if either file has a `models` key)
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
Three keys, all about subagents. Print what each one actually reaches:
|
|
80
80
|
|
|
81
81
|
```
|
|
82
|
-
agents
|
|
83
|
-
|
|
84
|
-
workers
|
|
82
|
+
agents fable → improvised subagents: review panel members with no named agent, blinded
|
|
83
|
+
auditors, delegated build pieces, the general-purpose challenger
|
|
84
|
+
workers (empty) → fan-out rounds — falls back to `agents`
|
|
85
|
+
supervisors (empty) → the delegated waits (running pipeline, pending deploy, long suite) —
|
|
86
|
+
falls back to `agents`
|
|
85
87
|
```
|
|
86
88
|
|
|
87
|
-
- State once, plainly: **the main agent's own steps are not covered by
|
|
89
|
+
- State once, plainly: **the main agent's own steps are not covered by any key** — reading the
|
|
88
90
|
ticket, the design, and the single-thread `build`/`fix` run on the model the command was launched
|
|
89
91
|
with, because an agent cannot switch its own model. A phase that wants another one says so at the
|
|
90
92
|
handoff; nothing enforces it.
|
|
@@ -16,7 +16,7 @@ description: Commit, push, MR/PR, and offer to save domain knowledge
|
|
|
16
16
|
> - `/model <value>` → opencode's model picker (`/models`).
|
|
17
17
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared in `opencode.json` (see this adapter's `opencode.json` for the domain-memory example).
|
|
18
18
|
|
|
19
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
19
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
20
20
|
|
|
21
21
|
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.
|
|
22
22
|
|
|
@@ -179,6 +179,8 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
179
179
|
|
|
180
180
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh `panel.json` right here, before §4.2 and before anything else can fail.
|
|
181
181
|
|
|
182
|
+
**The push just started a pipeline, and this thread does not sit on it.** Its result belongs to `/flow-work-green`, not here, so either close the ship with CI reported as *running* — the honest state — or, when the user wants to hear how it ended, delegate the wait as any other (flow-core §6.5): one supervisor subagent on `models.supervisors`, a deadline, and back with status plus failing-job evidence. Whatever it returns, a red pipeline is triaged by `/flow-work-green`; this command never fixes CI and never closes reporting a green it did not see.
|
|
183
|
+
|
|
182
184
|
### 4.2 Pre-deploy thread (deployment gate)
|
|
183
185
|
**Only if `git.predeploy_gate` is active and the branch has pre-deploy SQL** (§2). After creating the MR/PR, open **a single resolvable/blocking thread** with **all** the consolidated SQL, using the `git.host`/`git.cli` host:
|
|
184
186
|
- **GitLab**: `glab api "projects/<repo-url-encoded>/merge_requests/<iid>/discussions" -f body="..."` (resolvable thread).
|
|
@@ -16,7 +16,7 @@ description: Validate tests, edge cases, and integrity before shipping
|
|
|
16
16
|
> - `/model <value>` → opencode's model picker (`/models`).
|
|
17
17
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared in `opencode.json` (see this adapter's `opencode.json` for the domain-memory example).
|
|
18
18
|
|
|
19
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
19
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
20
20
|
|
|
21
21
|
Verify the feature is complete: test coverage, edge cases, performance, regressions.
|
|
22
22
|
|
|
@@ -40,7 +40,7 @@ One of the three below writes and two of them read, so they do not all go at onc
|
|
|
40
40
|
|
|
41
41
|
**A green suite is not a performance result** — a tiny fixture database proves a query's **rows**, never its **plan**. If `/flow-feat-review §3.6` left any query verdict `unresolved`, or an acceptance criterion concerns speed or volume: run the measurement of **`/flow-work-query §4`** with the volumes in `data.volumes` (or a data set shaped like them — the distribution matters more than the total), record plan and timings, and gate on the result. No `data.*` configuration and the criterion cannot be measured → it is `unproven` with the reason, never silently `proven`.
|
|
42
42
|
|
|
43
|
-
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
43
|
+
3. **Full suite**: run `quality.test` from `FLOW.md` in the background; if empty, auto-discover the project's test command and note what you use. **A suite measured in tens of minutes is a wait, not a step**: hand it to a supervisor subagent on `models.supervisors` (flow-core §6.5) — it runs it, times out, and brings back the exit code plus the failing tests' output, never a reading of whether those failures matter. Short suites stay here; delegating ninety seconds costs more than running them. A repo with more than one suite chains them in that one key (`make test && make test-frontend`); when it does not and the diff touches a suite the key misses, run that one too and say so in one line.
|
|
44
44
|
|
|
45
45
|
## 3. Criteria coverage (S and larger)
|
|
46
46
|
|
|
@@ -30,7 +30,7 @@ Usage: `/flow-work-green [mr-iid-or-url]` — optional; default is the MR/PR of
|
|
|
30
30
|
|
|
31
31
|
Extract from `git`: `host`, `cli` (empty → the default for that host), `default_base`. The term MR/PR follows `host`. From `tracker`: `tool`, `prefix`. From `quality`: `test`, `test_one`, `static_analysis`, `style_fix` (local reproduce/verify commands, §5; empty → auto-discover from Makefile / npm / composer scripts), `review_skill` (§5, non-trivial fixes). `agents`: expert sub-agents to delegate fixes to. `knowledge.search` set → `knowledge.search` in §3.
|
|
32
32
|
|
|
33
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
|
|
33
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`; the wait it delegates takes `models.supervisors`.**
|
|
34
34
|
|
|
35
35
|
**Autonomy.** Modes as in flow-core §2; `guided`/`auto` record their choices in `09-ci.md` (e.g. a pure formatter auto-fix). **Hard gates — ALWAYS stop and ask, in every mode, no exceptions:**
|
|
36
36
|
1. **Any push** (§6).
|
|
@@ -80,7 +80,7 @@ Decide the exit on the **combination** of both halves, never on the pipeline alo
|
|
|
80
80
|
|
|
81
81
|
- **Pipeline green *and* verdict mergeable** → report both facts, stop.
|
|
82
82
|
- **Pipeline green but blockers remain** → do **not** report "green, you're good": report the pipeline green, list the blockers, continue to §3 with them.
|
|
83
|
-
- **Pipeline running / pending** →
|
|
83
|
+
- **Pipeline running / pending** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors`, told which run to watch, at what interval, with a deadline and every terminal state, bringing back status **plus evidence** (failing job names, exit codes, log tail, run URL) and **no verdict** — the triage of §3 is this thread's, whatever it reports. Then work any **non-pipeline** blockers meanwhile, or end the turn on the harness's own wake-up (a background task that re-invokes you, `Monitor`, `ScheduleWakeup` ~2–3 min). Neither a supervisor nor a wake-up available → say so plainly and let the user re-run when CI finishes; never imply the pipeline is being watched when nothing is watching it.
|
|
84
84
|
- **Pipeline never ran** (no CI, or not triggered) → say so; verdict clean too → stop.
|
|
85
85
|
|
|
86
86
|
## 3. Triage every blocker
|
|
@@ -142,7 +142,7 @@ Run **before** the other buckets, only after the hard gate:
|
|
|
142
142
|
|
|
143
143
|
- **Push (hard gate).** Show what will be pushed (files, commit message), confirm with `AskUserQuestion`. Never push to the base branch: HEAD must not be `git.default_base` and its upstream must point to the branch itself (same anti-deploy lock as `/flow-feat-ship §4.0` and `/flow-work-respond §6.2`). `git push` to the existing branch — the push re-triggers the pipeline. **Force-push only after a rebase the user explicitly chose** (§5.C.2), and only `git push --force-with-lease` — never bare `--force`, never as a way out of a rejected push (the remote moved: fetch and understand first).
|
|
144
144
|
- **Rerun without a push** (rerun-only, K). Only after the user confirms (hard gate): `glab ci retry` / `gh run rerun <run-id> --failed`. Attach the recorded flake evidence. Fails again the same way → **not** flaky: reclassify to T/Y and fix; do not rerun a second time.
|
|
145
|
-
- **Watch it back to green
|
|
145
|
+
- **Watch it back to green — delegated, not polled from here** (flow-core §6.5). The push starts a run that takes as long as the one you just triaged: hand it to the same kind of supervisor as §2.3 and end the turn, or let a later `/flow-work-green` re-check. With neither a supervisor nor a wake-up, say so instead of implying it is watched. Do not claim the pipeline is fixed until it reports green: report what you pushed and that CI is re-running.
|
|
146
146
|
- **Re-read the merge verdict too.** Once the pipeline settles, re-run §2.1 and report the *merge* verdict, not only the pipeline — the only evidence the MR/PR is actually mergeable.
|
|
147
147
|
|
|
148
148
|
## 7. Log, loop, and domain knowledge
|
|
@@ -16,7 +16,7 @@ description: Monitor the observability platform after a deploy and alert on erro
|
|
|
16
16
|
> - `/model <value>` → opencode's model picker (`/models`).
|
|
17
17
|
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared in `opencode.json` (see this adapter's `opencode.json` for the domain-memory example).
|
|
18
18
|
|
|
19
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: this command runs with the model it was launched with
|
|
19
|
+
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `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`.**
|
|
20
20
|
|
|
21
21
|
**Autopiloted post-deploy monitoring**: signals **scoped to the change** over a window (default 30 min), against a baseline; alert on errors or performance regressions from the deploy.
|
|
22
22
|
|
|
@@ -45,7 +45,7 @@ If `knowledge.search` is set, call `knowledge.search` with the ticket name befor
|
|
|
45
45
|
- **Confirm WHAT is being deployed — never assume it from `meta.json`** (several MR/PRs per ticket; stale artifacts). Cross-reference the **actual deploy event** (e.g. `get_change_stories`) and recent merges; any ambiguity → `AskUserQuestion` which MR/PR or commit is deploying. The surface (§2) is scoped to **that** change.
|
|
46
46
|
- **When to start.** When the code **is live in production**, not at merge. Launched right after the merge → **wait for the deploy yourself**:
|
|
47
47
|
- Check whether the new version is live (`observability.deploy_detect`; empty → `get_change_stories` or other deploy indicators).
|
|
48
|
-
- **Not yet deployed** → poll every ~2-3 min
|
|
48
|
+
- **Not yet deployed** → **delegate the wait** (flow-core §6.5): one supervisor subagent on `models.supervisors` watching for the go-live of that exact SHA, ~2-3 min interval, a deadline, and back with status plus evidence (pipeline/job names, exit codes, the deploy event) — never with a judgement on whether the deploy is healthy. No supervisor available → poll every ~2-3 min here and say that this thread is doing the waiting. Either way the monitoring window does not start until the code is live.
|
|
49
49
|
- **Pipeline fails** → **abort monitoring** and alert: the code did not reach production.
|
|
50
50
|
- Already deployed → proceed.
|
|
51
51
|
- **How to identify YOUR deploy.** The chain in `observability.deploy_detect`. Empty → merge to base branch → CI/CD pipeline → go-live jobs. Determine the exact merge commit; confirm the go-live jobs of the affected services reach `success`. Any fail → **abort**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.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.69.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,37 @@ 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.69.0 — Waiting on the pipeline was paid for at the main thread's price · 2026-09-21
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **A wait is delegated now, not sat through.** A running pipeline, a deploy that has not landed and a suite measured in tens of minutes go to one supervisor subagent with an interval, a deadline and every terminal state; this thread ends its turn instead of polling.
|
|
12
|
+
- **What comes back is evidence, never a verdict** — failing job names, exit codes, the log tail, the run URL, the SHA it watched. Whether a red job is flaky, whether a threshold is close enough, whether the branch can merge is still decided on the main thread.
|
|
13
|
+
- **`models.supervisors`** names the model for it, falling back to `models.agents` and then to inheritance. An empty section behaves exactly as before, and the dispatch says in one line that the wait inherits this thread's model — an unattended wait is where an unpriced default runs longest.
|
|
14
|
+
- **Applied where the flow actually waits**: `/flow:work:green` §2.3 and its re-trigger, `/flow:work:watch` §1, both `validate` commands for a long suite, and both `ship` commands for the pipeline the push starts.
|
|
15
|
+
- **Delegating a wait is mechanics**, so it is on the never-ask list: `manual` still asks whatever the evidence turns out to call for, once it is back.
|
|
16
|
+
|
|
17
|
+
Every command that waited, waited on the thread holding the whole conversation. `green` offered to
|
|
18
|
+
poll a running pipeline every two or three minutes; `watch` polled for a deploy that had not landed
|
|
19
|
+
yet; `validate` ran the full suite in the background and stayed with it. None of that reads a diff
|
|
20
|
+
or weighs a finding — it reads `pending` — and each cycle resends the entire context to do it. A
|
|
21
|
+
forty-minute pipeline could cost more to watch than the diff cost to write, and the cost was
|
|
22
|
+
invisible because waiting looks like nothing happening.
|
|
23
|
+
|
|
24
|
+
The delegation is bounded on purpose. The brief names the exact run rather than "the CI", every
|
|
25
|
+
terminal state rather than the first red job, and a deadline after which the supervisor returns what
|
|
26
|
+
it has instead of waiting forever. It writes its evidence to a path before it replies, like every
|
|
27
|
+
other brief, so a report lost in transit is recoverable for the cost of one `ls`. And it counts
|
|
28
|
+
against `agents.budget_max` like any other subagent, relaunches included.
|
|
29
|
+
|
|
30
|
+
What it must never do is rule. Handing the judgement to whoever is cheapest to ask is how a pipeline
|
|
31
|
+
ends up declared green by a model that was hired to watch a clock — the machine version of the
|
|
32
|
+
green-washing `/flow:work:green` refuses in every autonomy mode. The supervisor reports; the triage,
|
|
33
|
+
the merge verdict and the decision to push stay exactly where they were.
|
|
34
|
+
|
|
35
|
+
Not every wait is worth a brief either: a suite that finishes in ninety seconds costs more to
|
|
36
|
+
delegate than to run, and anything the phase must react to mid-wait was never a wait — it is the
|
|
37
|
+
work.
|
|
38
|
+
|
|
8
39
|
## v0.68.0 — The block written to be pasted was the configuration · 2026-09-21
|
|
9
40
|
|
|
10
41
|
**In short**
|
|
@@ -239,11 +239,19 @@ subagent ignores the value and the step says so once, in one line.
|
|
|
239
239
|
- `workers:` # the parallel fan-out rounds ONLY: approach panel (design §1.5.3), hypothesis sweep
|
|
240
240
|
# (investigate §3.A), finding skeptics (review §6 / §5), the deferred-work skeptic
|
|
241
241
|
# (ship). Empty = falls back to `agents`, then to what the command runs on.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
- `supervisors:` # the ONE subagent a command hands a long wait to instead of polling it from the main thread
|
|
243
|
+
# (flow-core §6.5): a running pipeline (green §2.3, §6), a deploy that has not landed yet
|
|
244
|
+
# (watch §1), a suite measured in tens of minutes (validate §2). It watches, times out and
|
|
245
|
+
# brings back status plus evidence — job names, exit codes, log tail, run URL — and never
|
|
246
|
+
# rules on it: triage and the merge verdict stay on the main thread whatever this says.
|
|
247
|
+
# Empty = falls back to `agents`, then to what the command runs on, and the dispatch says so
|
|
248
|
+
# in one line — an unattended wait is the one place an unpriced default runs longest.
|
|
249
|
+
|
|
250
|
+
**Three keys, one per kind of subagent — not one per kind of step.** There used to be five —
|
|
251
|
+
`study`, `code`, `test`, `review` — named after phases. They promised a granularity no harness
|
|
252
|
+
delivers: the main agent cannot switch its own model, so the phases those keys named ran on whatever
|
|
253
|
+
you launched, and the value only ever reached the subagents. These three name what can actually be
|
|
254
|
+
set: the improvised agent, the fan-out round, and the wait.
|
|
247
255
|
|
|
248
256
|
Two limits, stated here because they bound what these keys can promise:
|
|
249
257
|
|
|
@@ -255,7 +263,7 @@ question in `guided`/`auto` and never a gate.
|
|
|
255
263
|
|
|
256
264
|
**A named agent keeps its own model.** If `agents.<role>` names a real agent, that agent's own
|
|
257
265
|
definition wins — you configured it, and it is not overridden from two places. `/flow:doctor` prints
|
|
258
|
-
|
|
266
|
+
the three keys resolved, with who decided each.
|
|
259
267
|
|
|
260
268
|
## data
|
|
261
269
|
How this repo lets you look at a query's **plan** instead of arguing about it. Read by
|