flow-workflows 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/codex/CORE.md +1 -1
- package/adapters/codex/skills/flow-bug-review/SKILL.md +1 -0
- package/adapters/codex/skills/flow-bug-ship/SKILL.md +3 -3
- package/adapters/codex/skills/flow-feat-review/SKILL.md +4 -2
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +16 -9
- package/adapters/gemini/CORE.md +1 -1
- package/adapters/gemini/commands/flow/bug/review.toml +1 -0
- package/adapters/gemini/commands/flow/bug/ship.toml +3 -3
- package/adapters/gemini/commands/flow/feat/review.toml +4 -2
- package/adapters/gemini/commands/flow/feat/ship.toml +16 -9
- package/adapters/hermes/CORE.md +1 -1
- package/adapters/hermes/skills/flow-bug-review/SKILL.md +1 -0
- package/adapters/hermes/skills/flow-bug-ship/SKILL.md +3 -3
- package/adapters/hermes/skills/flow-feat-review/SKILL.md +4 -2
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +16 -9
- package/adapters/opencode/CORE.md +1 -1
- package/adapters/opencode/commands/flow-bug-review.md +1 -0
- package/adapters/opencode/commands/flow-bug-ship.md +3 -3
- package/adapters/opencode/commands/flow-feat-review.md +4 -2
- package/adapters/opencode/commands/flow-feat-ship.md +16 -9
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +18 -0
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.102.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
|
|
@@ -141,6 +141,7 @@ Fix-specific:
|
|
|
141
141
|
- **Every modified query carries its base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`$flow-work-query` §4). This chain already demanded it for slowness bugs; it now applies to any query the fix changes, because a fix that quietly costs 40 ms is a regression whether or not the ticket mentioned speed.
|
|
142
142
|
- **Bug about slowness or timeouts → the duel is the fix's proof**: the base and after rows are the verdict, or the fix is unproven whatever the tests say.
|
|
143
143
|
- A **trick** added under pressure (a cast to align a collation, a hint, a hand-written column order) — checklist item 11 applies in full: it ships with a comment saying why it is there and what removes it, plus the ticket for the root cause, or it does not ship.
|
|
144
|
+
- **This round's own fixes are diff too** — `$flow-feat-review` §3.6, unchanged: a fix applied after the round that adds or modifies a query (a scope the user widened included) is dueled before §8, and "no queries touched" is written only when neither the candidate nor the fixes touched one.
|
|
144
145
|
- Verdicts map as findings: **change** blocks, **regressed** blocks unless `03-investigation.md` justifies the trade, **schema / follow-up** → proposed ticket **and a `followups[]` entry** (flow-core §7), **unresolved** recorded literally.
|
|
145
146
|
|
|
146
147
|
## 4. Over-engineering audit (fit + YAGNI)
|
|
@@ -48,7 +48,7 @@ Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, model
|
|
|
48
48
|
- **The review has to be about the tree you are about to push — `$flow-feat-ship` §1, in full and unchanged**, including its four newer cases: `reviewed_sha` is the revision the reviewers *read* (`$flow-bug-review` §1.5 froze it), so `fixed_sha` set alongside an equal sha is a mismatch and not a match; a dirty tree at this end is named and asked about rather than passed over; and a `reviewed_sha` that no longer resolves is reported, then treated as absent. Compare `meta.json.reviewed_sha` and `validated_sha` against `git rev-parse HEAD`:
|
|
49
49
|
- **Equal** (and no `fixed_sha`, over a clean tree) → continue.
|
|
50
50
|
- **Absent** (a work from before the shas were recorded) → say so in one line, continue; absence is not a mismatch.
|
|
51
|
-
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`$flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed.
|
|
51
|
+
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`$flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed. Its own question, never a line of the §2 MR/PR preview; a delta that adds or modifies a query or a schema object names it in the question, as `$flow-feat-ship` §1 says.
|
|
52
52
|
|
|
53
53
|
## 1. Draft title and description (without sending anything yet)
|
|
54
54
|
|
|
@@ -185,8 +185,8 @@ With an "all threads resolved before merge" policy, the MR/PR cannot be merged o
|
|
|
185
185
|
|
|
186
186
|
### 3.3 Performance comment
|
|
187
187
|
|
|
188
|
-
`$flow-feat-ship` §4.3, unchanged: query rows from `06-review.md` —
|
|
189
|
-
measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
188
|
+
`$flow-feat-ship` §4.3, unchanged: query and schema rows from `06-review.md` — added and modified
|
|
189
|
+
queries alike, one that was not measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
190
190
|
posted as comments anchored on the changed lines of the MR/PR, confirmed in every mode. A slowness bug is the case where this comment *is* the proof the fix worked.
|
|
191
191
|
|
|
192
192
|
## 4. Close
|
|
@@ -212,7 +212,9 @@ Judging rules: **no number, no win** (unresolved is recorded unresolved, never s
|
|
|
212
212
|
|
|
213
213
|
**A modified query is judged against its own past, not only against its rivals.** For every query the diff *changes* (as opposed to adds), the duel carries the **base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`$flow-work-query` §4). Without it the table cannot say whether this diff made things better or worse, which is the one thing a reviewer wants from it.
|
|
214
214
|
|
|
215
|
-
**A
|
|
215
|
+
**A query with no plan behind its verdict — added or modified — is recorded `ok (plan not measured)` — and says what would measure it (`data.explain_cmd`, a data set) — never a bare `ok`.** Ship publishes that row on the MR/PR (`$flow-feat-ship` §4.3); a reviewer who finds a plain "ok" and no number has no way to know nobody looked.
|
|
216
|
+
|
|
217
|
+
**This round's own fixes are diff too.** A fix applied after the round — a blocker's, a suggestion's, or a scope the user widened when a finding asked — that adds or modifies a query or a schema object runs this section on it before §9, on the tree that holds the fix. "No queries touched" is written only when neither the candidate nor the fixes touched one; a query that entered with a fix and was judged by reading it ("indexed unique key, LIMIT 1") is `ok (plan not measured)`, never an `ok`, and ship publishes it as such.
|
|
216
218
|
|
|
217
219
|
Verdicts as findings: **change** = blocker, through §6; **regressed** = blocker unless `03-design.md` justifies the trade, in which case it is stated and published; **schema / follow-up** → proposed ticket in the output **and a `followups[]` entry** (flow-core §7); **unresolved** → recorded literally with the open question (as §3.5). A `change` verdict resting on a measured plan is already confirmed — no §6 skeptic.
|
|
218
220
|
|
|
@@ -336,7 +338,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
336
338
|
<the phases §2.0b's give-up order dropped because the budget ran out, one line each with what was not looked at, or "none">
|
|
337
339
|
|
|
338
340
|
## Data-access duel
|
|
339
|
-
<one row per query added or modified by the diff, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
341
|
+
<one row per query added or modified by the diff or by this round's fixes, and per schema change, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
340
342
|
|
|
341
343
|
| Query (file:line) | New/mod | Bound | Index used / plan | Rows read → returned | vs base | Verdict | Evidence |
|
|
342
344
|
|---|---|---|---|---|---|---|---|
|
|
@@ -88,7 +88,7 @@ the one taken checked (flow-core §2.1, the recommended answer).
|
|
|
88
88
|
- **Absent** (work started before the shas were recorded) → say so in one line and continue. Absence is not a mismatch.
|
|
89
89
|
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**, never by size. When `fixed_sha` is set, say in the same line that part of this delta is the review's own fixes: the user is judging what the reviewers never read, and where it came from is the first thing they need.
|
|
90
90
|
- Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) and this work's own folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue **without asking** (a test written by `validate` after the review is the normal order).
|
|
91
|
-
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`$flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently.
|
|
91
|
+
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`$flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently, and never fold it into the §3 description preview as a line to accept with the MR/PR: it is a question of its own, asked before §2 drafts anything. **A delta that adds or modifies a query or a schema object** says so in the question, by name: re-reviewing it is what puts it through the data-access duel (`$flow-feat-review` §3.6) and onto the performance comment (§4.3); shipping as it stands leaves that query out of both, and the appended line in `06-review.md` names it as unmeasured.
|
|
92
92
|
- Check for blocking TODO/FIXME added on this branch (`git diff --unified=0 <git.default_base>...HEAD | grep -E '^\+.*(TODO|FIXME)'`). If any, list them and ask whether to continue.
|
|
93
93
|
|
|
94
94
|
## 2. Draft title and description (without sending anything yet)
|
|
@@ -246,20 +246,26 @@ Thread body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE
|
|
|
246
246
|
|
|
247
247
|
With the repo policy "all threads resolved before merge", the MR/PR cannot merge until the SQL is executed and the thread **resolved**. **One single thread even with multiple statements.** Tell the user it is left open on purpose.
|
|
248
248
|
|
|
249
|
-
### 4.3 Performance comment (every
|
|
249
|
+
### 4.3 Performance comment (every query or table the diff touches, measured or not)
|
|
250
250
|
|
|
251
|
-
Post one when `06-review.md` §"Data-access duel" has a row for a
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
Post one when `06-review.md` §"Data-access duel" has a row for a query the diff **adds or modifies**,
|
|
252
|
+
or for a **schema change** (a table created or altered, an index added or dropped) — **whatever its
|
|
253
|
+
verdict, measured or not** — or `07-validation.md` §3.7 has benchmark rows. Renames and reformats
|
|
254
|
+
only, and nothing benchmarked → post nothing.
|
|
254
255
|
|
|
255
|
-
**
|
|
256
|
+
**An added query has no past, not no plan.** Its comment carries the plan on the branch alone, the
|
|
257
|
+
`base` row reading `new`. A new table carries its DDL with the indexes it was created with, and the
|
|
258
|
+
plan of every query in the diff that reads it — a table nobody queries yet says so in one line. The
|
|
259
|
+
row is anchored to the migration's changed lines, the queries' rows to theirs.
|
|
260
|
+
|
|
261
|
+
**A query that was never measured is the case this comment exists for.** Silence reads as
|
|
256
262
|
"nothing to see"; a reviewer cannot tell a query that was measured and is fine from one that nobody
|
|
257
263
|
looked at. The row says `not measured (<reason>)` and what would settle it (`data.explain_cmd`, a
|
|
258
264
|
data set, the entry point to run), so the reviewer knows what was *not* checked.
|
|
259
265
|
|
|
260
266
|
**Where it goes: on the query, not under the title.** One **inline thread anchored to the changed
|
|
261
267
|
lines of that query in the MR/PR diff** (a resolvable GitLab discussion with a `position`; a GitHub
|
|
262
|
-
review comment on `path` + `line`), one per
|
|
268
|
+
review comment on `path` + `line`), one per query or schema change. The entry-point rows anchor to the entry
|
|
263
269
|
point's changed line the same way. Anchoring fails (the line is not in the diff, the forge refuses
|
|
264
270
|
the position) → a general MR/PR comment that names the file and line, and say so. A general comment
|
|
265
271
|
is the fallback, never the default: a number a reviewer meets on the line they are reading is read;
|
|
@@ -294,8 +300,9 @@ no measurable change, not a percentage.
|
|
|
294
300
|
plan command for it — `EXPLAIN`, never `EXPLAIN ANALYZE` on a write — in a code block, so the
|
|
295
301
|
author can run it on production or a replica and answer in the thread. This is a complement to the
|
|
296
302
|
sandbox measurement, never a substitute: the flow does not touch production.
|
|
297
|
-
- **Memory is the entry point's, not the query's.** A
|
|
298
|
-
that exercises it, through `quality.bench_cmd` on both sides
|
|
303
|
+
- **Memory is the entry point's, not the query's.** A query the diff adds or modifies also gets the
|
|
304
|
+
entry-point row that exercises it, through `quality.bench_cmd` on both sides — the branch alone
|
|
305
|
+
for an added one (`$flow-*-validate` §3.7). No
|
|
299
306
|
`bench_cmd` → the entry-point row says `not measured (no quality.bench_cmd)`; never an estimate.
|
|
300
307
|
- **Verdicts**: `improved` · `no measurable change` · `regressed` · `not measured (<reason>)`.
|
|
301
308
|
- **A `regressed` row is a review blocker** unless `03-design.md` justifies the trade — in which
|
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.102.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
|
|
@@ -137,6 +137,7 @@ Fix-specific:
|
|
|
137
137
|
- **Every modified query carries its base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow:work:query` §4). This chain already demanded it for slowness bugs; it now applies to any query the fix changes, because a fix that quietly costs 40 ms is a regression whether or not the ticket mentioned speed.
|
|
138
138
|
- **Bug about slowness or timeouts → the duel is the fix's proof**: the base and after rows are the verdict, or the fix is unproven whatever the tests say.
|
|
139
139
|
- A **trick** added under pressure (a cast to align a collation, a hint, a hand-written column order) — checklist item 11 applies in full: it ships with a comment saying why it is there and what removes it, plus the ticket for the root cause, or it does not ship.
|
|
140
|
+
- **This round's own fixes are diff too** — `/flow:feat:review` §3.6, unchanged: a fix applied after the round that adds or modifies a query (a scope the user widened included) is dueled before §8, and "no queries touched" is written only when neither the candidate nor the fixes touched one.
|
|
140
141
|
- Verdicts map as findings: **change** blocks, **regressed** blocks unless `03-investigation.md` justifies the trade, **schema / follow-up** → proposed ticket **and a `followups[]` entry** (flow-core §7), **unresolved** recorded literally.
|
|
141
142
|
|
|
142
143
|
## 4. Over-engineering audit (fit + YAGNI)
|
|
@@ -44,7 +44,7 @@ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
44
44
|
- **The review has to be about the tree you are about to push — `/flow:feat:ship` §1, in full and unchanged**, including its four newer cases: `reviewed_sha` is the revision the reviewers *read* (`/flow:bug:review` §1.5 froze it), so `fixed_sha` set alongside an equal sha is a mismatch and not a match; a dirty tree at this end is named and asked about rather than passed over; and a `reviewed_sha` that no longer resolves is reported, then treated as absent. Compare `meta.json.reviewed_sha` and `validated_sha` against `git rev-parse HEAD`:
|
|
45
45
|
- **Equal** (and no `fixed_sha`, over a clean tree) → continue.
|
|
46
46
|
- **Absent** (a work from before the shas were recorded) → say so in one line, continue; absence is not a mismatch.
|
|
47
|
-
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow:bug:review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed.
|
|
47
|
+
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow:bug:review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed. Its own question, never a line of the §2 MR/PR preview; a delta that adds or modifies a query or a schema object names it in the question, as `/flow:feat:ship` §1 says.
|
|
48
48
|
|
|
49
49
|
## 1. Draft title and description (without sending anything yet)
|
|
50
50
|
|
|
@@ -181,8 +181,8 @@ With an "all threads resolved before merge" policy, the MR/PR cannot be merged o
|
|
|
181
181
|
|
|
182
182
|
### 3.3 Performance comment
|
|
183
183
|
|
|
184
|
-
`/flow:feat:ship` §4.3, unchanged: query rows from `06-review.md` —
|
|
185
|
-
measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
184
|
+
`/flow:feat:ship` §4.3, unchanged: query and schema rows from `06-review.md` — added and modified
|
|
185
|
+
queries alike, one that was not measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
186
186
|
posted as comments anchored on the changed lines of the MR/PR, confirmed in every mode. A slowness bug is the case where this comment *is* the proof the fix worked.
|
|
187
187
|
|
|
188
188
|
## 4. Close
|
|
@@ -208,7 +208,9 @@ Judging rules: **no number, no win** (unresolved is recorded unresolved, never s
|
|
|
208
208
|
|
|
209
209
|
**A modified query is judged against its own past, not only against its rivals.** For every query the diff *changes* (as opposed to adds), the duel carries the **base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow:work:query` §4). Without it the table cannot say whether this diff made things better or worse, which is the one thing a reviewer wants from it.
|
|
210
210
|
|
|
211
|
-
**A
|
|
211
|
+
**A query with no plan behind its verdict — added or modified — is recorded `ok (plan not measured)` — and says what would measure it (`data.explain_cmd`, a data set) — never a bare `ok`.** Ship publishes that row on the MR/PR (`/flow:feat:ship` §4.3); a reviewer who finds a plain "ok" and no number has no way to know nobody looked.
|
|
212
|
+
|
|
213
|
+
**This round's own fixes are diff too.** A fix applied after the round — a blocker's, a suggestion's, or a scope the user widened when a finding asked — that adds or modifies a query or a schema object runs this section on it before §9, on the tree that holds the fix. "No queries touched" is written only when neither the candidate nor the fixes touched one; a query that entered with a fix and was judged by reading it ("indexed unique key, LIMIT 1") is `ok (plan not measured)`, never an `ok`, and ship publishes it as such.
|
|
212
214
|
|
|
213
215
|
Verdicts as findings: **change** = blocker, through §6; **regressed** = blocker unless `03-design.md` justifies the trade, in which case it is stated and published; **schema / follow-up** → proposed ticket in the output **and a `followups[]` entry** (flow-core §7); **unresolved** → recorded literally with the open question (as §3.5). A `change` verdict resting on a measured plan is already confirmed — no §6 skeptic.
|
|
214
216
|
|
|
@@ -332,7 +334,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
332
334
|
<the phases §2.0b's give-up order dropped because the budget ran out, one line each with what was not looked at, or "none">
|
|
333
335
|
|
|
334
336
|
## Data-access duel
|
|
335
|
-
<one row per query added or modified by the diff, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
337
|
+
<one row per query added or modified by the diff or by this round's fixes, and per schema change, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
336
338
|
|
|
337
339
|
| Query (file:line) | New/mod | Bound | Index used / plan | Rows read → returned | vs base | Verdict | Evidence |
|
|
338
340
|
|---|---|---|---|---|---|---|---|
|
|
@@ -84,7 +84,7 @@ the one taken checked (flow-core §2.1, the recommended answer).
|
|
|
84
84
|
- **Absent** (work started before the shas were recorded) → say so in one line and continue. Absence is not a mismatch.
|
|
85
85
|
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**, never by size. When `fixed_sha` is set, say in the same line that part of this delta is the review's own fixes: the user is judging what the reviewers never read, and where it came from is the first thing they need.
|
|
86
86
|
- Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) and this work's own folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue **without asking** (a test written by `validate` after the review is the normal order).
|
|
87
|
-
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow:feat:review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently.
|
|
87
|
+
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow:feat:review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently, and never fold it into the §3 description preview as a line to accept with the MR/PR: it is a question of its own, asked before §2 drafts anything. **A delta that adds or modifies a query or a schema object** says so in the question, by name: re-reviewing it is what puts it through the data-access duel (`/flow:feat:review` §3.6) and onto the performance comment (§4.3); shipping as it stands leaves that query out of both, and the appended line in `06-review.md` names it as unmeasured.
|
|
88
88
|
- Check for blocking TODO/FIXME added on this branch (`git diff --unified=0 <git.default_base>...HEAD | grep -E '^\\+.*(TODO|FIXME)'`). If any, list them and ask whether to continue.
|
|
89
89
|
|
|
90
90
|
## 2. Draft title and description (without sending anything yet)
|
|
@@ -242,20 +242,26 @@ Thread body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE
|
|
|
242
242
|
|
|
243
243
|
With the repo policy "all threads resolved before merge", the MR/PR cannot merge until the SQL is executed and the thread **resolved**. **One single thread even with multiple statements.** Tell the user it is left open on purpose.
|
|
244
244
|
|
|
245
|
-
### 4.3 Performance comment (every
|
|
245
|
+
### 4.3 Performance comment (every query or table the diff touches, measured or not)
|
|
246
246
|
|
|
247
|
-
Post one when `06-review.md` §"Data-access duel" has a row for a
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
Post one when `06-review.md` §"Data-access duel" has a row for a query the diff **adds or modifies**,
|
|
248
|
+
or for a **schema change** (a table created or altered, an index added or dropped) — **whatever its
|
|
249
|
+
verdict, measured or not** — or `07-validation.md` §3.7 has benchmark rows. Renames and reformats
|
|
250
|
+
only, and nothing benchmarked → post nothing.
|
|
250
251
|
|
|
251
|
-
**
|
|
252
|
+
**An added query has no past, not no plan.** Its comment carries the plan on the branch alone, the
|
|
253
|
+
`base` row reading `new`. A new table carries its DDL with the indexes it was created with, and the
|
|
254
|
+
plan of every query in the diff that reads it — a table nobody queries yet says so in one line. The
|
|
255
|
+
row is anchored to the migration's changed lines, the queries' rows to theirs.
|
|
256
|
+
|
|
257
|
+
**A query that was never measured is the case this comment exists for.** Silence reads as
|
|
252
258
|
"nothing to see"; a reviewer cannot tell a query that was measured and is fine from one that nobody
|
|
253
259
|
looked at. The row says `not measured (<reason>)` and what would settle it (`data.explain_cmd`, a
|
|
254
260
|
data set, the entry point to run), so the reviewer knows what was *not* checked.
|
|
255
261
|
|
|
256
262
|
**Where it goes: on the query, not under the title.** One **inline thread anchored to the changed
|
|
257
263
|
lines of that query in the MR/PR diff** (a resolvable GitLab discussion with a `position`; a GitHub
|
|
258
|
-
review comment on `path` + `line`), one per
|
|
264
|
+
review comment on `path` + `line`), one per query or schema change. The entry-point rows anchor to the entry
|
|
259
265
|
point's changed line the same way. Anchoring fails (the line is not in the diff, the forge refuses
|
|
260
266
|
the position) → a general MR/PR comment that names the file and line, and say so. A general comment
|
|
261
267
|
is the fallback, never the default: a number a reviewer meets on the line they are reading is read;
|
|
@@ -290,8 +296,9 @@ no measurable change, not a percentage.
|
|
|
290
296
|
plan command for it — `EXPLAIN`, never `EXPLAIN ANALYZE` on a write — in a code block, so the
|
|
291
297
|
author can run it on production or a replica and answer in the thread. This is a complement to the
|
|
292
298
|
sandbox measurement, never a substitute: the flow does not touch production.
|
|
293
|
-
- **Memory is the entry point's, not the query's.** A
|
|
294
|
-
that exercises it, through `quality.bench_cmd` on both sides
|
|
299
|
+
- **Memory is the entry point's, not the query's.** A query the diff adds or modifies also gets the
|
|
300
|
+
entry-point row that exercises it, through `quality.bench_cmd` on both sides — the branch alone
|
|
301
|
+
for an added one (`/flow:*:validate` §3.7). No
|
|
295
302
|
`bench_cmd` → the entry-point row says `not measured (no quality.bench_cmd)`; never an estimate.
|
|
296
303
|
- **Verdicts**: `improved` · `no measurable change` · `regressed` · `not measured (<reason>)`.
|
|
297
304
|
- **A `regressed` row is a review blocker** unless `03-design.md` justifies the trade — in which
|
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.102.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
|
|
@@ -141,6 +141,7 @@ Fix-specific:
|
|
|
141
141
|
- **Every modified query carries its base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow-work-query` §4). This chain already demanded it for slowness bugs; it now applies to any query the fix changes, because a fix that quietly costs 40 ms is a regression whether or not the ticket mentioned speed.
|
|
142
142
|
- **Bug about slowness or timeouts → the duel is the fix's proof**: the base and after rows are the verdict, or the fix is unproven whatever the tests say.
|
|
143
143
|
- A **trick** added under pressure (a cast to align a collation, a hint, a hand-written column order) — checklist item 11 applies in full: it ships with a comment saying why it is there and what removes it, plus the ticket for the root cause, or it does not ship.
|
|
144
|
+
- **This round's own fixes are diff too** — `/flow-feat-review` §3.6, unchanged: a fix applied after the round that adds or modifies a query (a scope the user widened included) is dueled before §8, and "no queries touched" is written only when neither the candidate nor the fixes touched one.
|
|
144
145
|
- Verdicts map as findings: **change** blocks, **regressed** blocks unless `03-investigation.md` justifies the trade, **schema / follow-up** → proposed ticket **and a `followups[]` entry** (flow-core §7), **unresolved** recorded literally.
|
|
145
146
|
|
|
146
147
|
## 4. Over-engineering audit (fit + YAGNI)
|
|
@@ -48,7 +48,7 @@ Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, mode
|
|
|
48
48
|
- **The review has to be about the tree you are about to push — `/flow-feat-ship` §1, in full and unchanged**, including its four newer cases: `reviewed_sha` is the revision the reviewers *read* (`/flow-bug-review` §1.5 froze it), so `fixed_sha` set alongside an equal sha is a mismatch and not a match; a dirty tree at this end is named and asked about rather than passed over; and a `reviewed_sha` that no longer resolves is reported, then treated as absent. Compare `meta.json.reviewed_sha` and `validated_sha` against `git rev-parse HEAD`:
|
|
49
49
|
- **Equal** (and no `fixed_sha`, over a clean tree) → continue.
|
|
50
50
|
- **Absent** (a work from before the shas were recorded) → say so in one line, continue; absence is not a mismatch.
|
|
51
|
-
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed.
|
|
51
|
+
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed. Its own question, never a line of the §2 MR/PR preview; a delta that adds or modifies a query or a schema object names it in the question, as `/flow-feat-ship` §1 says.
|
|
52
52
|
|
|
53
53
|
## 1. Draft title and description (without sending anything yet)
|
|
54
54
|
|
|
@@ -185,8 +185,8 @@ With an "all threads resolved before merge" policy, the MR/PR cannot be merged o
|
|
|
185
185
|
|
|
186
186
|
### 3.3 Performance comment
|
|
187
187
|
|
|
188
|
-
`/flow-feat-ship` §4.3, unchanged: query rows from `06-review.md` —
|
|
189
|
-
measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
188
|
+
`/flow-feat-ship` §4.3, unchanged: query and schema rows from `06-review.md` — added and modified
|
|
189
|
+
queries alike, one that was not measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
190
190
|
posted as comments anchored on the changed lines of the MR/PR, confirmed in every mode. A slowness bug is the case where this comment *is* the proof the fix worked.
|
|
191
191
|
|
|
192
192
|
## 4. Close
|
|
@@ -212,7 +212,9 @@ Judging rules: **no number, no win** (unresolved is recorded unresolved, never s
|
|
|
212
212
|
|
|
213
213
|
**A modified query is judged against its own past, not only against its rivals.** For every query the diff *changes* (as opposed to adds), the duel carries the **base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow-work-query` §4). Without it the table cannot say whether this diff made things better or worse, which is the one thing a reviewer wants from it.
|
|
214
214
|
|
|
215
|
-
**A
|
|
215
|
+
**A query with no plan behind its verdict — added or modified — is recorded `ok (plan not measured)` — and says what would measure it (`data.explain_cmd`, a data set) — never a bare `ok`.** Ship publishes that row on the MR/PR (`/flow-feat-ship` §4.3); a reviewer who finds a plain "ok" and no number has no way to know nobody looked.
|
|
216
|
+
|
|
217
|
+
**This round's own fixes are diff too.** A fix applied after the round — a blocker's, a suggestion's, or a scope the user widened when a finding asked — that adds or modifies a query or a schema object runs this section on it before §9, on the tree that holds the fix. "No queries touched" is written only when neither the candidate nor the fixes touched one; a query that entered with a fix and was judged by reading it ("indexed unique key, LIMIT 1") is `ok (plan not measured)`, never an `ok`, and ship publishes it as such.
|
|
216
218
|
|
|
217
219
|
Verdicts as findings: **change** = blocker, through §6; **regressed** = blocker unless `03-design.md` justifies the trade, in which case it is stated and published; **schema / follow-up** → proposed ticket in the output **and a `followups[]` entry** (flow-core §7); **unresolved** → recorded literally with the open question (as §3.5). A `change` verdict resting on a measured plan is already confirmed — no §6 skeptic.
|
|
218
220
|
|
|
@@ -336,7 +338,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
336
338
|
<the phases §2.0b's give-up order dropped because the budget ran out, one line each with what was not looked at, or "none">
|
|
337
339
|
|
|
338
340
|
## Data-access duel
|
|
339
|
-
<one row per query added or modified by the diff, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
341
|
+
<one row per query added or modified by the diff or by this round's fixes, and per schema change, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
340
342
|
|
|
341
343
|
| Query (file:line) | New/mod | Bound | Index used / plan | Rows read → returned | vs base | Verdict | Evidence |
|
|
342
344
|
|---|---|---|---|---|---|---|---|
|
|
@@ -88,7 +88,7 @@ the one taken checked (flow-core §2.1, the recommended answer).
|
|
|
88
88
|
- **Absent** (work started before the shas were recorded) → say so in one line and continue. Absence is not a mismatch.
|
|
89
89
|
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**, never by size. When `fixed_sha` is set, say in the same line that part of this delta is the review's own fixes: the user is judging what the reviewers never read, and where it came from is the first thing they need.
|
|
90
90
|
- Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) and this work's own folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue **without asking** (a test written by `validate` after the review is the normal order).
|
|
91
|
-
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently.
|
|
91
|
+
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently, and never fold it into the §3 description preview as a line to accept with the MR/PR: it is a question of its own, asked before §2 drafts anything. **A delta that adds or modifies a query or a schema object** says so in the question, by name: re-reviewing it is what puts it through the data-access duel (`/flow-feat-review` §3.6) and onto the performance comment (§4.3); shipping as it stands leaves that query out of both, and the appended line in `06-review.md` names it as unmeasured.
|
|
92
92
|
- Check for blocking TODO/FIXME added on this branch (`git diff --unified=0 <git.default_base>...HEAD | grep -E '^\+.*(TODO|FIXME)'`). If any, list them and ask whether to continue.
|
|
93
93
|
|
|
94
94
|
## 2. Draft title and description (without sending anything yet)
|
|
@@ -246,20 +246,26 @@ Thread body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE
|
|
|
246
246
|
|
|
247
247
|
With the repo policy "all threads resolved before merge", the MR/PR cannot merge until the SQL is executed and the thread **resolved**. **One single thread even with multiple statements.** Tell the user it is left open on purpose.
|
|
248
248
|
|
|
249
|
-
### 4.3 Performance comment (every
|
|
249
|
+
### 4.3 Performance comment (every query or table the diff touches, measured or not)
|
|
250
250
|
|
|
251
|
-
Post one when `06-review.md` §"Data-access duel" has a row for a
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
Post one when `06-review.md` §"Data-access duel" has a row for a query the diff **adds or modifies**,
|
|
252
|
+
or for a **schema change** (a table created or altered, an index added or dropped) — **whatever its
|
|
253
|
+
verdict, measured or not** — or `07-validation.md` §3.7 has benchmark rows. Renames and reformats
|
|
254
|
+
only, and nothing benchmarked → post nothing.
|
|
254
255
|
|
|
255
|
-
**
|
|
256
|
+
**An added query has no past, not no plan.** Its comment carries the plan on the branch alone, the
|
|
257
|
+
`base` row reading `new`. A new table carries its DDL with the indexes it was created with, and the
|
|
258
|
+
plan of every query in the diff that reads it — a table nobody queries yet says so in one line. The
|
|
259
|
+
row is anchored to the migration's changed lines, the queries' rows to theirs.
|
|
260
|
+
|
|
261
|
+
**A query that was never measured is the case this comment exists for.** Silence reads as
|
|
256
262
|
"nothing to see"; a reviewer cannot tell a query that was measured and is fine from one that nobody
|
|
257
263
|
looked at. The row says `not measured (<reason>)` and what would settle it (`data.explain_cmd`, a
|
|
258
264
|
data set, the entry point to run), so the reviewer knows what was *not* checked.
|
|
259
265
|
|
|
260
266
|
**Where it goes: on the query, not under the title.** One **inline thread anchored to the changed
|
|
261
267
|
lines of that query in the MR/PR diff** (a resolvable GitLab discussion with a `position`; a GitHub
|
|
262
|
-
review comment on `path` + `line`), one per
|
|
268
|
+
review comment on `path` + `line`), one per query or schema change. The entry-point rows anchor to the entry
|
|
263
269
|
point's changed line the same way. Anchoring fails (the line is not in the diff, the forge refuses
|
|
264
270
|
the position) → a general MR/PR comment that names the file and line, and say so. A general comment
|
|
265
271
|
is the fallback, never the default: a number a reviewer meets on the line they are reading is read;
|
|
@@ -294,8 +300,9 @@ no measurable change, not a percentage.
|
|
|
294
300
|
plan command for it — `EXPLAIN`, never `EXPLAIN ANALYZE` on a write — in a code block, so the
|
|
295
301
|
author can run it on production or a replica and answer in the thread. This is a complement to the
|
|
296
302
|
sandbox measurement, never a substitute: the flow does not touch production.
|
|
297
|
-
- **Memory is the entry point's, not the query's.** A
|
|
298
|
-
that exercises it, through `quality.bench_cmd` on both sides
|
|
303
|
+
- **Memory is the entry point's, not the query's.** A query the diff adds or modifies also gets the
|
|
304
|
+
entry-point row that exercises it, through `quality.bench_cmd` on both sides — the branch alone
|
|
305
|
+
for an added one (`/flow-*-validate` §3.7). No
|
|
299
306
|
`bench_cmd` → the entry-point row says `not measured (no quality.bench_cmd)`; never an estimate.
|
|
300
307
|
- **Verdicts**: `improved` · `no measurable change` · `regressed` · `not measured (<reason>)`.
|
|
301
308
|
- **A `regressed` row is a review blocker** unless `03-design.md` justifies the trade — in which
|
|
@@ -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.102.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
|
|
@@ -139,6 +139,7 @@ Fix-specific:
|
|
|
139
139
|
- **Every modified query carries its base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow-work-query` §4). This chain already demanded it for slowness bugs; it now applies to any query the fix changes, because a fix that quietly costs 40 ms is a regression whether or not the ticket mentioned speed.
|
|
140
140
|
- **Bug about slowness or timeouts → the duel is the fix's proof**: the base and after rows are the verdict, or the fix is unproven whatever the tests say.
|
|
141
141
|
- A **trick** added under pressure (a cast to align a collation, a hint, a hand-written column order) — checklist item 11 applies in full: it ships with a comment saying why it is there and what removes it, plus the ticket for the root cause, or it does not ship.
|
|
142
|
+
- **This round's own fixes are diff too** — `/flow-feat-review` §3.6, unchanged: a fix applied after the round that adds or modifies a query (a scope the user widened included) is dueled before §8, and "no queries touched" is written only when neither the candidate nor the fixes touched one.
|
|
142
143
|
- Verdicts map as findings: **change** blocks, **regressed** blocks unless `03-investigation.md` justifies the trade, **schema / follow-up** → proposed ticket **and a `followups[]` entry** (flow-core §7), **unresolved** recorded literally.
|
|
143
144
|
|
|
144
145
|
## 4. Over-engineering audit (fit + YAGNI)
|
|
@@ -46,7 +46,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
46
46
|
- **The review has to be about the tree you are about to push — `/flow-feat-ship` §1, in full and unchanged**, including its four newer cases: `reviewed_sha` is the revision the reviewers *read* (`/flow-bug-review` §1.5 froze it), so `fixed_sha` set alongside an equal sha is a mismatch and not a match; a dirty tree at this end is named and asked about rather than passed over; and a `reviewed_sha` that no longer resolves is reported, then treated as absent. Compare `meta.json.reviewed_sha` and `validated_sha` against `git rev-parse HEAD`:
|
|
47
47
|
- **Equal** (and no `fixed_sha`, over a clean tree) → continue.
|
|
48
48
|
- **Absent** (a work from before the shas were recorded) → say so in one line, continue; absence is not a mismatch.
|
|
49
|
-
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed.
|
|
49
|
+
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**. Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) or this work's folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue without asking. **Anything else** → stop and ask in **every** `autonomy.mode`, no exceptions (`AskUserQuestion`): *re-review the delta* (`/flow-bug-review`, the recommended default — its §1.5 takes `reviewed_sha` as the base, so the delta is both what it reads and what sets its tier) · *ship as it stands*, recording in `06-review.md` the two shas and that the user accepted them unreviewed. Its own question, never a line of the §2 MR/PR preview; a delta that adds or modifies a query or a schema object names it in the question, as `/flow-feat-ship` §1 says.
|
|
50
50
|
|
|
51
51
|
## 1. Draft title and description (without sending anything yet)
|
|
52
52
|
|
|
@@ -183,8 +183,8 @@ With an "all threads resolved before merge" policy, the MR/PR cannot be merged o
|
|
|
183
183
|
|
|
184
184
|
### 3.3 Performance comment
|
|
185
185
|
|
|
186
|
-
`/flow-feat-ship` §4.3, unchanged: query rows from `06-review.md` —
|
|
187
|
-
measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
186
|
+
`/flow-feat-ship` §4.3, unchanged: query and schema rows from `06-review.md` — added and modified
|
|
187
|
+
queries alike, one that was not measured included, as `not measured (<reason>)` — and benchmark rows from `05-validation.md`,
|
|
188
188
|
posted as comments anchored on the changed lines of the MR/PR, confirmed in every mode. A slowness bug is the case where this comment *is* the proof the fix worked.
|
|
189
189
|
|
|
190
190
|
## 4. Close
|
|
@@ -210,7 +210,9 @@ Judging rules: **no number, no win** (unresolved is recorded unresolved, never s
|
|
|
210
210
|
|
|
211
211
|
**A modified query is judged against its own past, not only against its rivals.** For every query the diff *changes* (as opposed to adds), the duel carries the **base row** — the same query on `git merge-base HEAD <git.default_base>`, measured in the same sandbox with the same seed (`/flow-work-query` §4). Without it the table cannot say whether this diff made things better or worse, which is the one thing a reviewer wants from it.
|
|
212
212
|
|
|
213
|
-
**A
|
|
213
|
+
**A query with no plan behind its verdict — added or modified — is recorded `ok (plan not measured)` — and says what would measure it (`data.explain_cmd`, a data set) — never a bare `ok`.** Ship publishes that row on the MR/PR (`/flow-feat-ship` §4.3); a reviewer who finds a plain "ok" and no number has no way to know nobody looked.
|
|
214
|
+
|
|
215
|
+
**This round's own fixes are diff too.** A fix applied after the round — a blocker's, a suggestion's, or a scope the user widened when a finding asked — that adds or modifies a query or a schema object runs this section on it before §9, on the tree that holds the fix. "No queries touched" is written only when neither the candidate nor the fixes touched one; a query that entered with a fix and was judged by reading it ("indexed unique key, LIMIT 1") is `ok (plan not measured)`, never an `ok`, and ship publishes it as such.
|
|
214
216
|
|
|
215
217
|
Verdicts as findings: **change** = blocker, through §6; **regressed** = blocker unless `03-design.md` justifies the trade, in which case it is stated and published; **schema / follow-up** → proposed ticket in the output **and a `followups[]` entry** (flow-core §7); **unresolved** → recorded literally with the open question (as §3.5). A `change` verdict resting on a measured plan is already confirmed — no §6 skeptic.
|
|
216
218
|
|
|
@@ -334,7 +336,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
334
336
|
<the phases §2.0b's give-up order dropped because the budget ran out, one line each with what was not looked at, or "none">
|
|
335
337
|
|
|
336
338
|
## Data-access duel
|
|
337
|
-
<one row per query added or modified by the diff, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
339
|
+
<one row per query added or modified by the diff or by this round's fixes, and per schema change, per §3.6; "no queries touched" if none, or "renames only" when the change did not alter filter/order/bound/joins/columns>
|
|
338
340
|
|
|
339
341
|
| Query (file:line) | New/mod | Bound | Index used / plan | Rows read → returned | vs base | Verdict | Evidence |
|
|
340
342
|
|---|---|---|---|---|---|---|---|
|
|
@@ -86,7 +86,7 @@ the one taken checked (flow-core §2.1, the recommended answer).
|
|
|
86
86
|
- **Absent** (work started before the shas were recorded) → say so in one line and continue. Absence is not a mismatch.
|
|
87
87
|
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**, never by size. When `fixed_sha` is set, say in the same line that part of this delta is the review's own fixes: the user is judging what the reviewers never read, and where it came from is the first thing they need.
|
|
88
88
|
- Only test files (`tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `*Test.*`, `*.test.*`, `*.spec.*`) and this work's own folder under `.claude/work/` → append both shas and the file list to `06-review.md`, continue **without asking** (a test written by `validate` after the review is the normal order).
|
|
89
|
-
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently.
|
|
89
|
+
- **Anything else** → stop and ask, in **every** `autonomy.mode`, with a single `AskUserQuestion`: *re-review the delta* (`/flow-feat-review`, recommended default — §1.5 resolves `reviewed_sha` as its base, so it reads the delta and nothing else, and resolves the tier on the delta too) · *ship it as it stands*, which first appends to `06-review.md` the two shas, the files, and that the user accepted them unreviewed. Never resolve this one silently, and never fold it into the §3 description preview as a line to accept with the MR/PR: it is a question of its own, asked before §2 drafts anything. **A delta that adds or modifies a query or a schema object** says so in the question, by name: re-reviewing it is what puts it through the data-access duel (`/flow-feat-review` §3.6) and onto the performance comment (§4.3); shipping as it stands leaves that query out of both, and the appended line in `06-review.md` names it as unmeasured.
|
|
90
90
|
- Check for blocking TODO/FIXME added on this branch (`git diff --unified=0 <git.default_base>...HEAD | grep -E '^\+.*(TODO|FIXME)'`). If any, list them and ask whether to continue.
|
|
91
91
|
|
|
92
92
|
## 2. Draft title and description (without sending anything yet)
|
|
@@ -244,20 +244,26 @@ Thread body: the SQL block under "Pre-deploy: run this SQL on the server BEFORE
|
|
|
244
244
|
|
|
245
245
|
With the repo policy "all threads resolved before merge", the MR/PR cannot merge until the SQL is executed and the thread **resolved**. **One single thread even with multiple statements.** Tell the user it is left open on purpose.
|
|
246
246
|
|
|
247
|
-
### 4.3 Performance comment (every
|
|
247
|
+
### 4.3 Performance comment (every query or table the diff touches, measured or not)
|
|
248
248
|
|
|
249
|
-
Post one when `06-review.md` §"Data-access duel" has a row for a
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
Post one when `06-review.md` §"Data-access duel" has a row for a query the diff **adds or modifies**,
|
|
250
|
+
or for a **schema change** (a table created or altered, an index added or dropped) — **whatever its
|
|
251
|
+
verdict, measured or not** — or `07-validation.md` §3.7 has benchmark rows. Renames and reformats
|
|
252
|
+
only, and nothing benchmarked → post nothing.
|
|
252
253
|
|
|
253
|
-
**
|
|
254
|
+
**An added query has no past, not no plan.** Its comment carries the plan on the branch alone, the
|
|
255
|
+
`base` row reading `new`. A new table carries its DDL with the indexes it was created with, and the
|
|
256
|
+
plan of every query in the diff that reads it — a table nobody queries yet says so in one line. The
|
|
257
|
+
row is anchored to the migration's changed lines, the queries' rows to theirs.
|
|
258
|
+
|
|
259
|
+
**A query that was never measured is the case this comment exists for.** Silence reads as
|
|
254
260
|
"nothing to see"; a reviewer cannot tell a query that was measured and is fine from one that nobody
|
|
255
261
|
looked at. The row says `not measured (<reason>)` and what would settle it (`data.explain_cmd`, a
|
|
256
262
|
data set, the entry point to run), so the reviewer knows what was *not* checked.
|
|
257
263
|
|
|
258
264
|
**Where it goes: on the query, not under the title.** One **inline thread anchored to the changed
|
|
259
265
|
lines of that query in the MR/PR diff** (a resolvable GitLab discussion with a `position`; a GitHub
|
|
260
|
-
review comment on `path` + `line`), one per
|
|
266
|
+
review comment on `path` + `line`), one per query or schema change. The entry-point rows anchor to the entry
|
|
261
267
|
point's changed line the same way. Anchoring fails (the line is not in the diff, the forge refuses
|
|
262
268
|
the position) → a general MR/PR comment that names the file and line, and say so. A general comment
|
|
263
269
|
is the fallback, never the default: a number a reviewer meets on the line they are reading is read;
|
|
@@ -292,8 +298,9 @@ no measurable change, not a percentage.
|
|
|
292
298
|
plan command for it — `EXPLAIN`, never `EXPLAIN ANALYZE` on a write — in a code block, so the
|
|
293
299
|
author can run it on production or a replica and answer in the thread. This is a complement to the
|
|
294
300
|
sandbox measurement, never a substitute: the flow does not touch production.
|
|
295
|
-
- **Memory is the entry point's, not the query's.** A
|
|
296
|
-
that exercises it, through `quality.bench_cmd` on both sides
|
|
301
|
+
- **Memory is the entry point's, not the query's.** A query the diff adds or modifies also gets the
|
|
302
|
+
entry-point row that exercises it, through `quality.bench_cmd` on both sides — the branch alone
|
|
303
|
+
for an added one (`/flow-*-validate` §3.7). No
|
|
297
304
|
`bench_cmd` → the entry-point row says `not measured (no quality.bench_cmd)`; never an estimate.
|
|
298
305
|
- **Verdicts**: `improved` · `no measurable change` · `regressed` · `not measured (<reason>)`.
|
|
299
306
|
- **A `regressed` row is a review blocker** unless `03-design.md` justifies the trade — in which
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.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.102.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,24 @@ 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.102.0 — A query that entered after the review still reaches the MR with its plan · 2026-10-28
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **New queries and new tables get the performance comment too.** Before, only a *modified* query
|
|
12
|
+
did: a new query ships with its plan on the branch (base row `new`), a new table with its DDL,
|
|
13
|
+
its indexes and the plan of the queries that read it.
|
|
14
|
+
- **The review duels its own fixes.** A blocker fixed in the round, or a scope widened when a
|
|
15
|
+
finding asked, that adds a query is tried on its plan before the review closes. "No queries
|
|
16
|
+
touched" now means none in the candidate *and* none in the fixes.
|
|
17
|
+
- **Ship asks the re-review question on its own.** Code the reviewers never read is a separate
|
|
18
|
+
question, never a line inside the MR/PR preview, and when that code adds a query or a schema
|
|
19
|
+
object the question names it: shipping as it stands leaves it unmeasured, and says so.
|
|
20
|
+
|
|
21
|
+
A bug fix widened its scope after a review finding and added a query that checked who owned the
|
|
22
|
+
record. The review had already written "no queries touched", the query was judged by reading it,
|
|
23
|
+
and ship folded "these lines were only reviewed by me" into the MR preview — so no plan was ever
|
|
24
|
+
taken and no comment was posted.
|
|
25
|
+
|
|
8
26
|
## v0.101.0 — An approved study answers its own design questions too · 2026-10-25
|
|
9
27
|
|
|
10
28
|
**In short**
|