flow-workflows 0.67.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 +65 -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 +11 -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 +65 -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 +11 -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 +65 -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 +11 -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 +65 -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 +11 -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/bin/cli.mjs +15 -0
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +58 -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
|
|
@@ -65,6 +65,15 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
65
65
|
base branch — and goes out in no MR/PR at all. So a phase writing a tracked file writes it
|
|
66
66
|
**here**, in the directory it is running in, and `$flow-feat-ship §5.5` is what catches the
|
|
67
67
|
tools that could not be told.
|
|
68
|
+
- **A fenced block in a FLOW file is an example, and an example is not configuration.** These
|
|
69
|
+
files are prose with keys in them, and the rule that decides what a key *is* — a `- key:` line
|
|
70
|
+
under a `## section` — knows nothing about triple backticks. So a block written to be pasted
|
|
71
|
+
("add this to try it once") was read as the configuration it illustrates, for as long as it sat
|
|
72
|
+
there. It happened in a real repo: `agents.exec_cmd` came from the fenced example of a file whose
|
|
73
|
+
prose argued at length that it was deliberately unset, and every review round took the one-shot
|
|
74
|
+
path that prose warned against — with nothing anywhere to say so, because the file and the
|
|
75
|
+
configuration disagreed while both looked right. **Skip fenced regions when you read a FLOW
|
|
76
|
+
file**; `flow-workflows` does the same, so the two of you resolve the same config.
|
|
68
77
|
- Merge by section and key. A key present in the active overlay replaces the base value; a key
|
|
69
78
|
absent there inherits the base. **A present-but-empty overlay key masks the base** and resolves
|
|
70
79
|
to the normal empty-key fallback — this is how Codex can inherit its session model while a legacy
|
|
@@ -143,10 +152,10 @@ explicit rather than degrading in silence.
|
|
|
143
152
|
|
|
144
153
|
## 1. Models — which model runs a step
|
|
145
154
|
|
|
146
|
-
|
|
147
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
148
|
-
|
|
149
|
-
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.
|
|
150
159
|
|
|
151
160
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
152
161
|
which keeps the model its own definition sets.
|
|
@@ -170,6 +179,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
170
179
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
171
180
|
was wise.
|
|
172
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
|
+
|
|
173
187
|
## 2. Autonomy — `autonomy.mode`
|
|
174
188
|
|
|
175
189
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -200,6 +214,10 @@ sensible default and record it.
|
|
|
200
214
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
201
215
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
202
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.
|
|
203
221
|
|
|
204
222
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
205
223
|
|
|
@@ -398,6 +416,48 @@ magnitude over what anyone intended.
|
|
|
398
416
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
399
417
|
budget and a phase that found nothing are not the same result.
|
|
400
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
|
+
|
|
401
461
|
## 7. Deferred work — `followups[]`
|
|
402
462
|
|
|
403
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.
|
|
@@ -129,6 +131,10 @@ Whether the world they describe exists —
|
|
|
129
131
|
CLIs installed *and authenticated*, agents discoverable, hooks executable, the MCP reachable, the
|
|
130
132
|
base branch resolvable — is §2 below; flag the key here, check the world there, never both.
|
|
131
133
|
|
|
134
|
+
- **Keys inside a fenced block**: report them, one line, naming the file and the keys — they are
|
|
135
|
+
an example and resolve to nothing (flow-core §0), which is exactly what a reader who pasted a
|
|
136
|
+
block to enable it cannot tell from a key that works. Say what to do about it: move the line out
|
|
137
|
+
of the fence to make it real, leave it there to keep it an illustration.
|
|
132
138
|
- **Fan-out and cost ceilings**: `agents.fanout_max` must be a positive integer; else flag and note
|
|
133
139
|
the default `4` applies. `agents.budget_max` must be a non-negative integer (`0` = no ceiling);
|
|
134
140
|
else flag and note the default `12`. **Both absent → say so as a finding, not a pass**: the review
|
|
@@ -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
|
|
@@ -64,6 +64,15 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
64
64
|
base branch — and goes out in no MR/PR at all. So a phase writing a tracked file writes it
|
|
65
65
|
**here**, in the directory it is running in, and `/flow:feat:ship §5.5` is what catches the
|
|
66
66
|
tools that could not be told.
|
|
67
|
+
- **A fenced block in a FLOW file is an example, and an example is not configuration.** These
|
|
68
|
+
files are prose with keys in them, and the rule that decides what a key *is* — a `- key:` line
|
|
69
|
+
under a `## section` — knows nothing about triple backticks. So a block written to be pasted
|
|
70
|
+
("add this to try it once") was read as the configuration it illustrates, for as long as it sat
|
|
71
|
+
there. It happened in a real repo: `agents.exec_cmd` came from the fenced example of a file whose
|
|
72
|
+
prose argued at length that it was deliberately unset, and every review round took the one-shot
|
|
73
|
+
path that prose warned against — with nothing anywhere to say so, because the file and the
|
|
74
|
+
configuration disagreed while both looked right. **Skip fenced regions when you read a FLOW
|
|
75
|
+
file**; `flow-workflows` does the same, so the two of you resolve the same config.
|
|
67
76
|
- Merge by section and key. A key present in the active overlay replaces the base value; a key
|
|
68
77
|
absent there inherits the base. **A present-but-empty overlay key masks the base** and resolves
|
|
69
78
|
to the normal empty-key fallback — this is how Codex can inherit its session model while a legacy
|
|
@@ -142,10 +151,10 @@ explicit rather than degrading in silence.
|
|
|
142
151
|
|
|
143
152
|
## 1. Models — which model runs a step
|
|
144
153
|
|
|
145
|
-
|
|
146
|
-
improvises, `models.workers` for the parallel fan-out rounds
|
|
147
|
-
|
|
148
|
-
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.
|
|
149
158
|
|
|
150
159
|
- Pass the resolved value to every subagent you launch, **except** an agent named in `agents.<role>`,
|
|
151
160
|
which keeps the model its own definition sets.
|
|
@@ -169,6 +178,11 @@ Agents named in `agents.<role>` are the exception here as above: they keep whate
|
|
|
169
178
|
definition sets, so a round can mix inherited and self-declared models. Report which, not whether it
|
|
170
179
|
was wise.
|
|
171
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
|
+
|
|
172
186
|
## 2. Autonomy — `autonomy.mode`
|
|
173
187
|
|
|
174
188
|
`manual` (default) · `guided` · `auto`. Read it once and apply it throughout the command.
|
|
@@ -199,6 +213,10 @@ sensible default and record it.
|
|
|
199
213
|
- (c) **Continuing to the next MR/PR of a train** — asked in `manual`, taken and recorded in `guided`/`auto`.
|
|
200
214
|
- (d) **Size confirmation** — take the proposed size, record it, move on.
|
|
201
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.
|
|
202
220
|
|
|
203
221
|
Asking these anyway is how an unattended run degrades into a manual one.
|
|
204
222
|
|
|
@@ -397,6 +415,48 @@ magnitude over what anyone intended.
|
|
|
397
415
|
- **The cost is reported where the user reads it**, as `spent/budget`: a phase silently skipped for
|
|
398
416
|
budget and a phase that found nothing are not the same result.
|
|
399
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
|
+
|
|
400
460
|
## 7. Deferred work — `followups[]`
|
|
401
461
|
|
|
402
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.
|
|
@@ -125,6 +127,10 @@ Whether the world they describe exists —
|
|
|
125
127
|
CLIs installed *and authenticated*, agents discoverable, hooks executable, the MCP reachable, the
|
|
126
128
|
base branch resolvable — is §2 below; flag the key here, check the world there, never both.
|
|
127
129
|
|
|
130
|
+
- **Keys inside a fenced block**: report them, one line, naming the file and the keys — they are
|
|
131
|
+
an example and resolve to nothing (flow-core §0), which is exactly what a reader who pasted a
|
|
132
|
+
block to enable it cannot tell from a key that works. Say what to do about it: move the line out
|
|
133
|
+
of the fence to make it real, leave it there to keep it an illustration.
|
|
128
134
|
- **Fan-out and cost ceilings**: `agents.fanout_max` must be a positive integer; else flag and note
|
|
129
135
|
the default `4` applies. `agents.budget_max` must be a non-negative integer (`0` = no ceiling);
|
|
130
136
|
else flag and note the default `12`. **Both absent → say so as a finding, not a pass**: the review
|
|
@@ -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**.
|