flow-workflows 0.95.1 → 0.96.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 +28 -3
- package/adapters/codex/skills/flow-bug-fix/SKILL.md +3 -1
- package/adapters/codex/skills/flow-feat-build/SKILL.md +3 -1
- package/adapters/codex/skills/flow-feat-design/SKILL.md +1 -1
- package/adapters/codex/skills/flow-feat-review/SKILL.md +3 -1
- package/adapters/codex/skills/flow-work-handoff/SKILL.md +13 -0
- package/adapters/codex/skills/flow-work-run/SKILL.md +7 -0
- package/adapters/gemini/CORE.md +28 -3
- package/adapters/gemini/commands/flow/bug/fix.toml +3 -1
- package/adapters/gemini/commands/flow/feat/build.toml +3 -1
- package/adapters/gemini/commands/flow/feat/design.toml +1 -1
- package/adapters/gemini/commands/flow/feat/review.toml +3 -1
- package/adapters/gemini/commands/flow/work/handoff.toml +13 -0
- package/adapters/gemini/commands/flow/work/run.toml +7 -0
- package/adapters/hermes/CORE.md +28 -3
- package/adapters/hermes/skills/flow-bug-fix/SKILL.md +3 -1
- package/adapters/hermes/skills/flow-feat-build/SKILL.md +3 -1
- package/adapters/hermes/skills/flow-feat-design/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-feat-review/SKILL.md +3 -1
- package/adapters/hermes/skills/flow-work-handoff/SKILL.md +13 -0
- package/adapters/hermes/skills/flow-work-run/SKILL.md +7 -0
- package/adapters/opencode/CORE.md +28 -3
- package/adapters/opencode/commands/flow-bug-fix.md +3 -1
- package/adapters/opencode/commands/flow-feat-build.md +3 -1
- package/adapters/opencode/commands/flow-feat-design.md +1 -1
- package/adapters/opencode/commands/flow-feat-review.md +3 -1
- package/adapters/opencode/commands/flow-work-handoff.md +13 -0
- package/adapters/opencode/commands/flow-work-run.md +7 -0
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +20 -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.96.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
|
|
@@ -225,7 +225,8 @@ the value someone wrote in the FLOW config, or it is not in effect.
|
|
|
225
225
|
each one resolves as §2.1's table says — never approved in silence):
|
|
226
226
|
1. Any push or MR/PR creation (all of `ship`).
|
|
227
227
|
2. Creating or switching a branch when the base is ambiguous (not on a clean main, or a possible train/stacked branch).
|
|
228
|
-
3. DB schema changes or migrations
|
|
228
|
+
3. DB schema changes or migrations — writing one a schema approved with the study already lists is
|
|
229
|
+
not asked again (below); applying one always is.
|
|
229
230
|
4. A `review` that surfaced high-severity findings — never chain into `ship` on those.
|
|
230
231
|
5. The business brief written before touching code (`build`, `fix`).
|
|
231
232
|
|
|
@@ -262,6 +263,30 @@ studies a ticket there goes on to build it — unless the orchestrator launched
|
|
|
262
263
|
(§2.1), which stops at the door to code. With `autonomy.mode: auto`, a `--study` work runs on its
|
|
263
264
|
own up to the push.
|
|
264
265
|
|
|
266
|
+
**A schema approved with the study.** A study that changes the schema says so literally: the
|
|
267
|
+
`## Schema changes` section of the `flow-study` block (`$flow-work-handoff` §5) lists, one line
|
|
268
|
+
each and by name, every table, column, index, constraint and data copy its migrations create,
|
|
269
|
+
alter or drop — from `03-design.md` "Data model", the intended fix of `03-investigation.md` for a
|
|
270
|
+
bug — or says `none`. Approving the study approves that list, and the approval is a file in the
|
|
271
|
+
work folder, `approved-schema.md`: a first line saying where it was approved (`Approved at
|
|
272
|
+
handoff, <date>` · `Approved with the study run, <date>`), then the section verbatim. Two places
|
|
273
|
+
write it and nothing else does — the handoff push answered **Push — schema approved**
|
|
274
|
+
(`$flow-work-handoff` §4), and `$flow-work-run` §2 when the orchestrator approves a study run with
|
|
275
|
+
`why = start`. Then, in every mode:
|
|
276
|
+
|
|
277
|
+
- **Writing** a migration — in `build`, in `fix`, or for a fix a review asks for — whose every
|
|
278
|
+
object created, altered or dropped is on that list is not asked: write it, add
|
|
279
|
+
`{ "key": "study:approved-schema", "default": "<the objects it writes>", "phase": "<phase>" }` to
|
|
280
|
+
`meta.json.defaults_used[]`, and one line under "Decisions made during implementation" naming
|
|
281
|
+
`approved-schema.md`.
|
|
282
|
+
- **Anything the list does not name** — one more column, an index, a drop, a type beyond what its
|
|
283
|
+
line says — is hard gate 3 as always, and the question names what lies beyond the list, so the
|
|
284
|
+
person decides on the difference alone.
|
|
285
|
+
- **Applying** a migration (`validate`) and the pre-deploy SQL (`ship`) are asked as before: the
|
|
286
|
+
study approved what the schema becomes, not when a database changes.
|
|
287
|
+
- A study revision (`$flow-work-run` §2) moves `approved-schema.md` aside with the rest of the
|
|
288
|
+
study; the new summary is approved anew.
|
|
289
|
+
|
|
265
290
|
### 2.1 `unattended` — where a person would have been asked
|
|
266
291
|
|
|
267
292
|
No person is there to answer a question in this mode. A question tool — `AskUserQuestion`, OpenCode's `question`,
|
|
@@ -373,7 +398,7 @@ person asking for changes, a ticket that already has code — is `$flow-work-run
|
|
|
373
398
|
| Business brief before code (`build`, `fix`) | record — the brief is written to the phase artifact, marked `recorded (unattended)`, and travels in the MR/PR body |
|
|
374
399
|
| The door to code in a study run (`build`, `fix` pre-flight) | done — `done-summary.md`, the study as `$flow-work-handoff` §5 writes it for the ticket, and one `--depends-on` per `meta.json.ticket_deps` entry |
|
|
375
400
|
| Push and MR/PR creation (`ship`) | `publish` — the run commits on its own branch, writes title and body, and hands them over; the orchestrator pushes and opens the draft |
|
|
376
|
-
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build` |
|
|
401
|
+
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build`. Writing one whose every object `approved-schema.md` lists is not asked (§2, a schema approved with the study) |
|
|
377
402
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
378
403
|
| `validate` with a red suite or a criterion `unproven` | blocked — the phase does not advance and does not chain. **One exception, and it is measured, never judged**: every failing test also fails, under the same name, on the base (`git merge-base HEAD <git.default_base>`, run in a detached worktree), none of them lives in a file this diff touches, and none is the test that proves an acceptance criterion → record `{"key":"unattended:validate-red-base","default":"<n> red on HEAD and on base <short sha>: <test names>","phase":"validate"}` and advance; `ship` lists those tests under "Not verified — needs a human". Short of all three — a failure the base does not reproduce, a base that cannot be run, a test this diff touched — blocked |
|
|
379
404
|
| A product decision (§7 `decision`) | question `decision` |
|
|
@@ -75,7 +75,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
75
75
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and fix.
|
|
76
76
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
77
77
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
78
|
-
of one → the question stop, end the run.
|
|
78
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
79
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
80
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
79
81
|
exactly as `$flow-feat-build §2` says, with `04-fix.md` for `05-implementation.md` and
|
|
80
82
|
`$flow-bug-validate` as the phase it chains into after a review's *Fix them* (`$flow-bug-review`
|
|
81
83
|
for XS, which has no validate).
|
|
@@ -82,7 +82,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
82
82
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
|
|
83
83
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
84
84
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
85
|
-
of one → the question stop, end the run.
|
|
85
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
86
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
87
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
86
88
|
(flow-core §2.1): the brief, the contracts and the plan are already written — keep them — and the
|
|
87
89
|
MR/PR is the one already `in_progress`, not a new pick. *Write it and continue* → the first unticked
|
|
88
90
|
step, the migration included · *Change the design first* → `blocked`. A plan step marked approved
|
|
@@ -228,7 +228,7 @@ Consolidate outputs into `.claude/work/<TICKET>/03-design.md`:
|
|
|
228
228
|
|
|
229
229
|
## Data model
|
|
230
230
|
- New / modified entities: <for each new one, indicate "no equivalent found" or "knowingly duplicated because...">
|
|
231
|
-
- Migrations:
|
|
231
|
+
- Migrations: <each table, column, index, constraint and data copy created, altered or dropped, by name — approving the study approves exactly this list (flow-core §2, a schema approved with the study)>
|
|
232
232
|
- Indexes:
|
|
233
233
|
|
|
234
234
|
### Access paths
|
|
@@ -403,4 +403,6 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
403
403
|
unticked step under this MR/PR's plan in `05-implementation.md` (`04-fix.md` for a bug), leaves
|
|
404
404
|
`phase = build` (`fix`), and chains into `$flow-feat-build` (`$flow-bug-fix`), which builds those
|
|
405
405
|
steps and chains back here — a bug through `$flow-bug-validate` first, as its order has it. A migration one of this round's fixes needs is question `migration`
|
|
406
|
-
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1)
|
|
406
|
+
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1),
|
|
407
|
+
unless `approved-schema.md` lists every object it writes (flow-core §2): then it is an ordinary
|
|
408
|
+
step, and build writes it without asking.
|
|
@@ -108,6 +108,15 @@ Show the branch, the remote and the file list the build printed — every path,
|
|
|
108
108
|
ask with `AskUserQuestion` **in every `autonomy.mode`**: a push leaves the machine (flow-core §2).
|
|
109
109
|
**Push** · **Cancel**. Nothing between the list and the question (flow-core §3).
|
|
110
110
|
|
|
111
|
+
**A study that changes the schema** — its `## Schema changes` section (§5) is not `none` — shows
|
|
112
|
+
that section too, under the file list, and the same question carries the approval: **Push — schema
|
|
113
|
+
approved** · **Push — build asks first** · **Cancel**. Whoever builds it can ask no one about what
|
|
114
|
+
the person here already read. *Push — schema approved* → write `approved-schema.md` in the work
|
|
115
|
+
folder (flow-core §2, a schema approved with the study: `Approved at handoff, <date>`, then the
|
|
116
|
+
section verbatim), run the build block again, check its file list is the one shown plus that file,
|
|
117
|
+
and push that commit. *Push — build asks first* → push as it stands: build will ask `migration`
|
|
118
|
+
before writing the first line of it.
|
|
119
|
+
|
|
111
120
|
```bash handoff-push
|
|
112
121
|
BRANCH='@BRANCH@'; COMMIT='@COMMIT@'
|
|
113
122
|
case "$COMMIT" in ''|*[!0-9a-f]*) echo "not a commit sha: $COMMIT"; exit 1 ;; esac
|
|
@@ -144,6 +153,7 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
144
153
|
## Acceptance criteria
|
|
145
154
|
## Design in brief
|
|
146
155
|
## MR/PR plan
|
|
156
|
+
## Schema changes
|
|
147
157
|
## Risks
|
|
148
158
|
<!-- end flow-study -->
|
|
149
159
|
```
|
|
@@ -152,6 +162,9 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
152
162
|
entry and its why — `Depends on #253: <why>` — so whoever approves the study sees what it waits
|
|
153
163
|
for; an unattended study's `done-summary.md` is this block, so it carries them too. The plan
|
|
154
164
|
lists each MR/PR with what it covers and what it waits on; a bug's plan is its single fix.
|
|
165
|
+
`## Schema changes` lists, one line each and by name, every table, column, index, constraint and
|
|
166
|
+
data copy the study's migrations create, alter or drop (flow-core §2, a schema approved with the
|
|
167
|
+
study), or says `none` — it is what approving the study approves, so nothing there is prose.
|
|
155
168
|
- **The new body**: the body read above with the block between the two markers replaced — or, with
|
|
156
169
|
no markers yet, the block appended after a blank line. Then, for each `meta.json.ticket_deps`
|
|
157
170
|
entry (`$flow-feat-design` §5.1) whose line is not already a line of that body — same text,
|
|
@@ -107,6 +107,13 @@ record `{ "key": "unattended:base-caught-up", "default": "<old short sha> → <n
|
|
|
107
107
|
ancestor → it holds commits a previous run made: leave it as it is — bringing the base into work in
|
|
108
108
|
progress is the orchestrator's (flow-core §2.1).
|
|
109
109
|
|
|
110
|
+
**On `start`, an approved study run approves its schema** — only while no build or fix has begun,
|
|
111
|
+
`done-summary.md` exists (the summary a person approved) and `approved-schema.md` does not. Its
|
|
112
|
+
`## Schema changes` section names something → write `approved-schema.md` (flow-core §2, a schema
|
|
113
|
+
approved with the study: `Approved with the study run, <date>`, then the section verbatim) and
|
|
114
|
+
record `{ "key": "unattended:schema-approved", "default": "<n> object(s)", "phase": "run" }`. The
|
|
115
|
+
section says `none`, or is missing → nothing is written, and build asks as it always did.
|
|
116
|
+
|
|
110
117
|
**A person's changes to a study, on `study`** (flow-core §2.1: they rewind it). The work's branch
|
|
111
118
|
first, as above. `<work>/study-revision.md` holds the reply, as the row above wrote it. Each step
|
|
112
119
|
can be run again: a run that dies part-way is finished by the next relaunch, whatever it serves.
|
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.96.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
|
|
@@ -224,7 +224,8 @@ the value someone wrote in the FLOW config, or it is not in effect.
|
|
|
224
224
|
each one resolves as §2.1's table says — never approved in silence):
|
|
225
225
|
1. Any push or MR/PR creation (all of `ship`).
|
|
226
226
|
2. Creating or switching a branch when the base is ambiguous (not on a clean main, or a possible train/stacked branch).
|
|
227
|
-
3. DB schema changes or migrations
|
|
227
|
+
3. DB schema changes or migrations — writing one a schema approved with the study already lists is
|
|
228
|
+
not asked again (below); applying one always is.
|
|
228
229
|
4. A `review` that surfaced high-severity findings — never chain into `ship` on those.
|
|
229
230
|
5. The business brief written before touching code (`build`, `fix`).
|
|
230
231
|
|
|
@@ -261,6 +262,30 @@ studies a ticket there goes on to build it — unless the orchestrator launched
|
|
|
261
262
|
(§2.1), which stops at the door to code. With `autonomy.mode: auto`, a `--study` work runs on its
|
|
262
263
|
own up to the push.
|
|
263
264
|
|
|
265
|
+
**A schema approved with the study.** A study that changes the schema says so literally: the
|
|
266
|
+
`## Schema changes` section of the `flow-study` block (`/flow:work:handoff` §5) lists, one line
|
|
267
|
+
each and by name, every table, column, index, constraint and data copy its migrations create,
|
|
268
|
+
alter or drop — from `03-design.md` "Data model", the intended fix of `03-investigation.md` for a
|
|
269
|
+
bug — or says `none`. Approving the study approves that list, and the approval is a file in the
|
|
270
|
+
work folder, `approved-schema.md`: a first line saying where it was approved (`Approved at
|
|
271
|
+
handoff, <date>` · `Approved with the study run, <date>`), then the section verbatim. Two places
|
|
272
|
+
write it and nothing else does — the handoff push answered **Push — schema approved**
|
|
273
|
+
(`/flow:work:handoff` §4), and `/flow:work:run` §2 when the orchestrator approves a study run with
|
|
274
|
+
`why = start`. Then, in every mode:
|
|
275
|
+
|
|
276
|
+
- **Writing** a migration — in `build`, in `fix`, or for a fix a review asks for — whose every
|
|
277
|
+
object created, altered or dropped is on that list is not asked: write it, add
|
|
278
|
+
`{ "key": "study:approved-schema", "default": "<the objects it writes>", "phase": "<phase>" }` to
|
|
279
|
+
`meta.json.defaults_used[]`, and one line under "Decisions made during implementation" naming
|
|
280
|
+
`approved-schema.md`.
|
|
281
|
+
- **Anything the list does not name** — one more column, an index, a drop, a type beyond what its
|
|
282
|
+
line says — is hard gate 3 as always, and the question names what lies beyond the list, so the
|
|
283
|
+
person decides on the difference alone.
|
|
284
|
+
- **Applying** a migration (`validate`) and the pre-deploy SQL (`ship`) are asked as before: the
|
|
285
|
+
study approved what the schema becomes, not when a database changes.
|
|
286
|
+
- A study revision (`/flow:work:run` §2) moves `approved-schema.md` aside with the rest of the
|
|
287
|
+
study; the new summary is approved anew.
|
|
288
|
+
|
|
264
289
|
### 2.1 `unattended` — where a person would have been asked
|
|
265
290
|
|
|
266
291
|
No person is there to answer a question in this mode. A question tool — `AskUserQuestion`, OpenCode's `question`,
|
|
@@ -372,7 +397,7 @@ person asking for changes, a ticket that already has code — is `/flow:work:run
|
|
|
372
397
|
| Business brief before code (`build`, `fix`) | record — the brief is written to the phase artifact, marked `recorded (unattended)`, and travels in the MR/PR body |
|
|
373
398
|
| The door to code in a study run (`build`, `fix` pre-flight) | done — `done-summary.md`, the study as `/flow:work:handoff` §5 writes it for the ticket, and one `--depends-on` per `meta.json.ticket_deps` entry |
|
|
374
399
|
| Push and MR/PR creation (`ship`) | `publish` — the run commits on its own branch, writes title and body, and hands them over; the orchestrator pushes and opens the draft |
|
|
375
|
-
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build` |
|
|
400
|
+
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build`. Writing one whose every object `approved-schema.md` lists is not asked (§2, a schema approved with the study) |
|
|
376
401
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
377
402
|
| `validate` with a red suite or a criterion `unproven` | blocked — the phase does not advance and does not chain. **One exception, and it is measured, never judged**: every failing test also fails, under the same name, on the base (`git merge-base HEAD <git.default_base>`, run in a detached worktree), none of them lives in a file this diff touches, and none is the test that proves an acceptance criterion → record `{"key":"unattended:validate-red-base","default":"<n> red on HEAD and on base <short sha>: <test names>","phase":"validate"}` and advance; `ship` lists those tests under "Not verified — needs a human". Short of all three — a failure the base does not reproduce, a base that cannot be run, a test this diff touched — blocked |
|
|
378
403
|
| A product decision (§7 `decision`) | question `decision` |
|
|
@@ -71,7 +71,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
71
71
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and fix.
|
|
72
72
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
73
73
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
74
|
-
of one → the question stop, end the run.
|
|
74
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
75
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
76
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
75
77
|
exactly as `/flow:feat:build §2` says, with `04-fix.md` for `05-implementation.md` and
|
|
76
78
|
`/flow:bug:validate` as the phase it chains into after a review's *Fix them* (`/flow:bug:review`
|
|
77
79
|
for XS, which has no validate).
|
|
@@ -78,7 +78,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
78
78
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
|
|
79
79
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
80
80
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
81
|
-
of one → the question stop, end the run.
|
|
81
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
82
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
83
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
82
84
|
(flow-core §2.1): the brief, the contracts and the plan are already written — keep them — and the
|
|
83
85
|
MR/PR is the one already `in_progress`, not a new pick. *Write it and continue* → the first unticked
|
|
84
86
|
step, the migration included · *Change the design first* → `blocked`. A plan step marked approved
|
|
@@ -224,7 +224,7 @@ Consolidate outputs into `.claude/work/<TICKET>/03-design.md`:
|
|
|
224
224
|
|
|
225
225
|
## Data model
|
|
226
226
|
- New / modified entities: <for each new one, indicate "no equivalent found" or "knowingly duplicated because...">
|
|
227
|
-
- Migrations:
|
|
227
|
+
- Migrations: <each table, column, index, constraint and data copy created, altered or dropped, by name — approving the study approves exactly this list (flow-core §2, a schema approved with the study)>
|
|
228
228
|
- Indexes:
|
|
229
229
|
|
|
230
230
|
### Access paths
|
|
@@ -399,5 +399,7 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
399
399
|
unticked step under this MR/PR's plan in `05-implementation.md` (`04-fix.md` for a bug), leaves
|
|
400
400
|
`phase = build` (`fix`), and chains into `/flow:feat:build` (`/flow:bug:fix`), which builds those
|
|
401
401
|
steps and chains back here — a bug through `/flow:bug:validate` first, as its order has it. A migration one of this round's fixes needs is question `migration`
|
|
402
|
-
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1)
|
|
402
|
+
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1),
|
|
403
|
+
unless `approved-schema.md` lists every object it writes (flow-core §2): then it is an ordinary
|
|
404
|
+
step, and build writes it without asking.
|
|
403
405
|
"""
|
|
@@ -104,6 +104,15 @@ Show the branch, the remote and the file list the build printed — every path,
|
|
|
104
104
|
ask with `AskUserQuestion` **in every `autonomy.mode`**: a push leaves the machine (flow-core §2).
|
|
105
105
|
**Push** · **Cancel**. Nothing between the list and the question (flow-core §3).
|
|
106
106
|
|
|
107
|
+
**A study that changes the schema** — its `## Schema changes` section (§5) is not `none` — shows
|
|
108
|
+
that section too, under the file list, and the same question carries the approval: **Push — schema
|
|
109
|
+
approved** · **Push — build asks first** · **Cancel**. Whoever builds it can ask no one about what
|
|
110
|
+
the person here already read. *Push — schema approved* → write `approved-schema.md` in the work
|
|
111
|
+
folder (flow-core §2, a schema approved with the study: `Approved at handoff, <date>`, then the
|
|
112
|
+
section verbatim), run the build block again, check its file list is the one shown plus that file,
|
|
113
|
+
and push that commit. *Push — build asks first* → push as it stands: build will ask `migration`
|
|
114
|
+
before writing the first line of it.
|
|
115
|
+
|
|
107
116
|
```bash handoff-push
|
|
108
117
|
BRANCH='@BRANCH@'; COMMIT='@COMMIT@'
|
|
109
118
|
case "$COMMIT" in ''|*[!0-9a-f]*) echo "not a commit sha: $COMMIT"; exit 1 ;; esac
|
|
@@ -140,6 +149,7 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
140
149
|
## Acceptance criteria
|
|
141
150
|
## Design in brief
|
|
142
151
|
## MR/PR plan
|
|
152
|
+
## Schema changes
|
|
143
153
|
## Risks
|
|
144
154
|
<!-- end flow-study -->
|
|
145
155
|
```
|
|
@@ -148,6 +158,9 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
148
158
|
entry and its why — `Depends on #253: <why>` — so whoever approves the study sees what it waits
|
|
149
159
|
for; an unattended study's `done-summary.md` is this block, so it carries them too. The plan
|
|
150
160
|
lists each MR/PR with what it covers and what it waits on; a bug's plan is its single fix.
|
|
161
|
+
`## Schema changes` lists, one line each and by name, every table, column, index, constraint and
|
|
162
|
+
data copy the study's migrations create, alter or drop (flow-core §2, a schema approved with the
|
|
163
|
+
study), or says `none` — it is what approving the study approves, so nothing there is prose.
|
|
151
164
|
- **The new body**: the body read above with the block between the two markers replaced — or, with
|
|
152
165
|
no markers yet, the block appended after a blank line. Then, for each `meta.json.ticket_deps`
|
|
153
166
|
entry (`/flow:feat:design` §5.1) whose line is not already a line of that body — same text,
|
|
@@ -103,6 +103,13 @@ record `{ "key": "unattended:base-caught-up", "default": "<old short sha> → <n
|
|
|
103
103
|
ancestor → it holds commits a previous run made: leave it as it is — bringing the base into work in
|
|
104
104
|
progress is the orchestrator's (flow-core §2.1).
|
|
105
105
|
|
|
106
|
+
**On `start`, an approved study run approves its schema** — only while no build or fix has begun,
|
|
107
|
+
`done-summary.md` exists (the summary a person approved) and `approved-schema.md` does not. Its
|
|
108
|
+
`## Schema changes` section names something → write `approved-schema.md` (flow-core §2, a schema
|
|
109
|
+
approved with the study: `Approved with the study run, <date>`, then the section verbatim) and
|
|
110
|
+
record `{ "key": "unattended:schema-approved", "default": "<n> object(s)", "phase": "run" }`. The
|
|
111
|
+
section says `none`, or is missing → nothing is written, and build asks as it always did.
|
|
112
|
+
|
|
106
113
|
**A person's changes to a study, on `study`** (flow-core §2.1: they rewind it). The work's branch
|
|
107
114
|
first, as above. `<work>/study-revision.md` holds the reply, as the row above wrote it. Each step
|
|
108
115
|
can be run again: a run that dies part-way is finished by the next relaunch, whatever it serves.
|
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.96.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
|
|
@@ -225,7 +225,8 @@ the value someone wrote in the FLOW config, or it is not in effect.
|
|
|
225
225
|
each one resolves as §2.1's table says — never approved in silence):
|
|
226
226
|
1. Any push or MR/PR creation (all of `ship`).
|
|
227
227
|
2. Creating or switching a branch when the base is ambiguous (not on a clean main, or a possible train/stacked branch).
|
|
228
|
-
3. DB schema changes or migrations
|
|
228
|
+
3. DB schema changes or migrations — writing one a schema approved with the study already lists is
|
|
229
|
+
not asked again (below); applying one always is.
|
|
229
230
|
4. A `review` that surfaced high-severity findings — never chain into `ship` on those.
|
|
230
231
|
5. The business brief written before touching code (`build`, `fix`).
|
|
231
232
|
|
|
@@ -262,6 +263,30 @@ studies a ticket there goes on to build it — unless the orchestrator launched
|
|
|
262
263
|
(§2.1), which stops at the door to code. With `autonomy.mode: auto`, a `--study` work runs on its
|
|
263
264
|
own up to the push.
|
|
264
265
|
|
|
266
|
+
**A schema approved with the study.** A study that changes the schema says so literally: the
|
|
267
|
+
`## Schema changes` section of the `flow-study` block (`/flow-work-handoff` §5) lists, one line
|
|
268
|
+
each and by name, every table, column, index, constraint and data copy its migrations create,
|
|
269
|
+
alter or drop — from `03-design.md` "Data model", the intended fix of `03-investigation.md` for a
|
|
270
|
+
bug — or says `none`. Approving the study approves that list, and the approval is a file in the
|
|
271
|
+
work folder, `approved-schema.md`: a first line saying where it was approved (`Approved at
|
|
272
|
+
handoff, <date>` · `Approved with the study run, <date>`), then the section verbatim. Two places
|
|
273
|
+
write it and nothing else does — the handoff push answered **Push — schema approved**
|
|
274
|
+
(`/flow-work-handoff` §4), and `/flow-work-run` §2 when the orchestrator approves a study run with
|
|
275
|
+
`why = start`. Then, in every mode:
|
|
276
|
+
|
|
277
|
+
- **Writing** a migration — in `build`, in `fix`, or for a fix a review asks for — whose every
|
|
278
|
+
object created, altered or dropped is on that list is not asked: write it, add
|
|
279
|
+
`{ "key": "study:approved-schema", "default": "<the objects it writes>", "phase": "<phase>" }` to
|
|
280
|
+
`meta.json.defaults_used[]`, and one line under "Decisions made during implementation" naming
|
|
281
|
+
`approved-schema.md`.
|
|
282
|
+
- **Anything the list does not name** — one more column, an index, a drop, a type beyond what its
|
|
283
|
+
line says — is hard gate 3 as always, and the question names what lies beyond the list, so the
|
|
284
|
+
person decides on the difference alone.
|
|
285
|
+
- **Applying** a migration (`validate`) and the pre-deploy SQL (`ship`) are asked as before: the
|
|
286
|
+
study approved what the schema becomes, not when a database changes.
|
|
287
|
+
- A study revision (`/flow-work-run` §2) moves `approved-schema.md` aside with the rest of the
|
|
288
|
+
study; the new summary is approved anew.
|
|
289
|
+
|
|
265
290
|
### 2.1 `unattended` — where a person would have been asked
|
|
266
291
|
|
|
267
292
|
No person is there to answer a question in this mode. A question tool — `AskUserQuestion`, OpenCode's `question`,
|
|
@@ -373,7 +398,7 @@ person asking for changes, a ticket that already has code — is `/flow-work-run
|
|
|
373
398
|
| Business brief before code (`build`, `fix`) | record — the brief is written to the phase artifact, marked `recorded (unattended)`, and travels in the MR/PR body |
|
|
374
399
|
| The door to code in a study run (`build`, `fix` pre-flight) | done — `done-summary.md`, the study as `/flow-work-handoff` §5 writes it for the ticket, and one `--depends-on` per `meta.json.ticket_deps` entry |
|
|
375
400
|
| Push and MR/PR creation (`ship`) | `publish` — the run commits on its own branch, writes title and body, and hands them over; the orchestrator pushes and opens the draft |
|
|
376
|
-
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build` |
|
|
401
|
+
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build`. Writing one whose every object `approved-schema.md` lists is not asked (§2, a schema approved with the study) |
|
|
377
402
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
378
403
|
| `validate` with a red suite or a criterion `unproven` | blocked — the phase does not advance and does not chain. **One exception, and it is measured, never judged**: every failing test also fails, under the same name, on the base (`git merge-base HEAD <git.default_base>`, run in a detached worktree), none of them lives in a file this diff touches, and none is the test that proves an acceptance criterion → record `{"key":"unattended:validate-red-base","default":"<n> red on HEAD and on base <short sha>: <test names>","phase":"validate"}` and advance; `ship` lists those tests under "Not verified — needs a human". Short of all three — a failure the base does not reproduce, a base that cannot be run, a test this diff touched — blocked |
|
|
379
404
|
| A product decision (§7 `decision`) | question `decision` |
|
|
@@ -75,7 +75,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
75
75
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and fix.
|
|
76
76
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
77
77
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
78
|
-
of one → the question stop, end the run.
|
|
78
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
79
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
80
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
79
81
|
exactly as `/flow-feat-build §2` says, with `04-fix.md` for `05-implementation.md` and
|
|
80
82
|
`/flow-bug-validate` as the phase it chains into after a review's *Fix them* (`/flow-bug-review`
|
|
81
83
|
for XS, which has no validate).
|
|
@@ -82,7 +82,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
82
82
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
|
|
83
83
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
84
84
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
85
|
-
of one → the question stop, end the run.
|
|
85
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
86
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
87
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
86
88
|
(flow-core §2.1): the brief, the contracts and the plan are already written — keep them — and the
|
|
87
89
|
MR/PR is the one already `in_progress`, not a new pick. *Write it and continue* → the first unticked
|
|
88
90
|
step, the migration included · *Change the design first* → `blocked`. A plan step marked approved
|
|
@@ -228,7 +228,7 @@ Consolidate outputs into `.claude/work/<TICKET>/03-design.md`:
|
|
|
228
228
|
|
|
229
229
|
## Data model
|
|
230
230
|
- New / modified entities: <for each new one, indicate "no equivalent found" or "knowingly duplicated because...">
|
|
231
|
-
- Migrations:
|
|
231
|
+
- Migrations: <each table, column, index, constraint and data copy created, altered or dropped, by name — approving the study approves exactly this list (flow-core §2, a schema approved with the study)>
|
|
232
232
|
- Indexes:
|
|
233
233
|
|
|
234
234
|
### Access paths
|
|
@@ -403,4 +403,6 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
403
403
|
unticked step under this MR/PR's plan in `05-implementation.md` (`04-fix.md` for a bug), leaves
|
|
404
404
|
`phase = build` (`fix`), and chains into `/flow-feat-build` (`/flow-bug-fix`), which builds those
|
|
405
405
|
steps and chains back here — a bug through `/flow-bug-validate` first, as its order has it. A migration one of this round's fixes needs is question `migration`
|
|
406
|
-
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1)
|
|
406
|
+
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1),
|
|
407
|
+
unless `approved-schema.md` lists every object it writes (flow-core §2): then it is an ordinary
|
|
408
|
+
step, and build writes it without asking.
|
|
@@ -108,6 +108,15 @@ Show the branch, the remote and the file list the build printed — every path,
|
|
|
108
108
|
ask with `AskUserQuestion` **in every `autonomy.mode`**: a push leaves the machine (flow-core §2).
|
|
109
109
|
**Push** · **Cancel**. Nothing between the list and the question (flow-core §3).
|
|
110
110
|
|
|
111
|
+
**A study that changes the schema** — its `## Schema changes` section (§5) is not `none` — shows
|
|
112
|
+
that section too, under the file list, and the same question carries the approval: **Push — schema
|
|
113
|
+
approved** · **Push — build asks first** · **Cancel**. Whoever builds it can ask no one about what
|
|
114
|
+
the person here already read. *Push — schema approved* → write `approved-schema.md` in the work
|
|
115
|
+
folder (flow-core §2, a schema approved with the study: `Approved at handoff, <date>`, then the
|
|
116
|
+
section verbatim), run the build block again, check its file list is the one shown plus that file,
|
|
117
|
+
and push that commit. *Push — build asks first* → push as it stands: build will ask `migration`
|
|
118
|
+
before writing the first line of it.
|
|
119
|
+
|
|
111
120
|
```bash handoff-push
|
|
112
121
|
BRANCH='@BRANCH@'; COMMIT='@COMMIT@'
|
|
113
122
|
case "$COMMIT" in ''|*[!0-9a-f]*) echo "not a commit sha: $COMMIT"; exit 1 ;; esac
|
|
@@ -144,6 +153,7 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
144
153
|
## Acceptance criteria
|
|
145
154
|
## Design in brief
|
|
146
155
|
## MR/PR plan
|
|
156
|
+
## Schema changes
|
|
147
157
|
## Risks
|
|
148
158
|
<!-- end flow-study -->
|
|
149
159
|
```
|
|
@@ -152,6 +162,9 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
152
162
|
entry and its why — `Depends on #253: <why>` — so whoever approves the study sees what it waits
|
|
153
163
|
for; an unattended study's `done-summary.md` is this block, so it carries them too. The plan
|
|
154
164
|
lists each MR/PR with what it covers and what it waits on; a bug's plan is its single fix.
|
|
165
|
+
`## Schema changes` lists, one line each and by name, every table, column, index, constraint and
|
|
166
|
+
data copy the study's migrations create, alter or drop (flow-core §2, a schema approved with the
|
|
167
|
+
study), or says `none` — it is what approving the study approves, so nothing there is prose.
|
|
155
168
|
- **The new body**: the body read above with the block between the two markers replaced — or, with
|
|
156
169
|
no markers yet, the block appended after a blank line. Then, for each `meta.json.ticket_deps`
|
|
157
170
|
entry (`/flow-feat-design` §5.1) whose line is not already a line of that body — same text,
|
|
@@ -107,6 +107,13 @@ record `{ "key": "unattended:base-caught-up", "default": "<old short sha> → <n
|
|
|
107
107
|
ancestor → it holds commits a previous run made: leave it as it is — bringing the base into work in
|
|
108
108
|
progress is the orchestrator's (flow-core §2.1).
|
|
109
109
|
|
|
110
|
+
**On `start`, an approved study run approves its schema** — only while no build or fix has begun,
|
|
111
|
+
`done-summary.md` exists (the summary a person approved) and `approved-schema.md` does not. Its
|
|
112
|
+
`## Schema changes` section names something → write `approved-schema.md` (flow-core §2, a schema
|
|
113
|
+
approved with the study: `Approved with the study run, <date>`, then the section verbatim) and
|
|
114
|
+
record `{ "key": "unattended:schema-approved", "default": "<n> object(s)", "phase": "run" }`. The
|
|
115
|
+
section says `none`, or is missing → nothing is written, and build asks as it always did.
|
|
116
|
+
|
|
110
117
|
**A person's changes to a study, on `study`** (flow-core §2.1: they rewind it). The work's branch
|
|
111
118
|
first, as above. `<work>/study-revision.md` holds the reply, as the row above wrote it. Each step
|
|
112
119
|
can be run again: a run that dies part-way is finished by the next relaunch, whatever it serves.
|
|
@@ -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.96.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
|
|
@@ -224,7 +224,8 @@ the value someone wrote in the FLOW config, or it is not in effect.
|
|
|
224
224
|
each one resolves as §2.1's table says — never approved in silence):
|
|
225
225
|
1. Any push or MR/PR creation (all of `ship`).
|
|
226
226
|
2. Creating or switching a branch when the base is ambiguous (not on a clean main, or a possible train/stacked branch).
|
|
227
|
-
3. DB schema changes or migrations
|
|
227
|
+
3. DB schema changes or migrations — writing one a schema approved with the study already lists is
|
|
228
|
+
not asked again (below); applying one always is.
|
|
228
229
|
4. A `review` that surfaced high-severity findings — never chain into `ship` on those.
|
|
229
230
|
5. The business brief written before touching code (`build`, `fix`).
|
|
230
231
|
|
|
@@ -261,6 +262,30 @@ studies a ticket there goes on to build it — unless the orchestrator launched
|
|
|
261
262
|
(§2.1), which stops at the door to code. With `autonomy.mode: auto`, a `--study` work runs on its
|
|
262
263
|
own up to the push.
|
|
263
264
|
|
|
265
|
+
**A schema approved with the study.** A study that changes the schema says so literally: the
|
|
266
|
+
`## Schema changes` section of the `flow-study` block (`/flow-work-handoff` §5) lists, one line
|
|
267
|
+
each and by name, every table, column, index, constraint and data copy its migrations create,
|
|
268
|
+
alter or drop — from `03-design.md` "Data model", the intended fix of `03-investigation.md` for a
|
|
269
|
+
bug — or says `none`. Approving the study approves that list, and the approval is a file in the
|
|
270
|
+
work folder, `approved-schema.md`: a first line saying where it was approved (`Approved at
|
|
271
|
+
handoff, <date>` · `Approved with the study run, <date>`), then the section verbatim. Two places
|
|
272
|
+
write it and nothing else does — the handoff push answered **Push — schema approved**
|
|
273
|
+
(`/flow-work-handoff` §4), and `/flow-work-run` §2 when the orchestrator approves a study run with
|
|
274
|
+
`why = start`. Then, in every mode:
|
|
275
|
+
|
|
276
|
+
- **Writing** a migration — in `build`, in `fix`, or for a fix a review asks for — whose every
|
|
277
|
+
object created, altered or dropped is on that list is not asked: write it, add
|
|
278
|
+
`{ "key": "study:approved-schema", "default": "<the objects it writes>", "phase": "<phase>" }` to
|
|
279
|
+
`meta.json.defaults_used[]`, and one line under "Decisions made during implementation" naming
|
|
280
|
+
`approved-schema.md`.
|
|
281
|
+
- **Anything the list does not name** — one more column, an index, a drop, a type beyond what its
|
|
282
|
+
line says — is hard gate 3 as always, and the question names what lies beyond the list, so the
|
|
283
|
+
person decides on the difference alone.
|
|
284
|
+
- **Applying** a migration (`validate`) and the pre-deploy SQL (`ship`) are asked as before: the
|
|
285
|
+
study approved what the schema becomes, not when a database changes.
|
|
286
|
+
- A study revision (`/flow-work-run` §2) moves `approved-schema.md` aside with the rest of the
|
|
287
|
+
study; the new summary is approved anew.
|
|
288
|
+
|
|
264
289
|
### 2.1 `unattended` — where a person would have been asked
|
|
265
290
|
|
|
266
291
|
No person is there to answer a question in this mode. A question tool — `AskUserQuestion`, OpenCode's `question`,
|
|
@@ -372,7 +397,7 @@ person asking for changes, a ticket that already has code — is `/flow-work-run
|
|
|
372
397
|
| Business brief before code (`build`, `fix`) | record — the brief is written to the phase artifact, marked `recorded (unattended)`, and travels in the MR/PR body |
|
|
373
398
|
| The door to code in a study run (`build`, `fix` pre-flight) | done — `done-summary.md`, the study as `/flow-work-handoff` §5 writes it for the ticket, and one `--depends-on` per `meta.json.ticket_deps` entry |
|
|
374
399
|
| Push and MR/PR creation (`ship`) | `publish` — the run commits on its own branch, writes title and body, and hands them over; the orchestrator pushes and opens the draft |
|
|
375
|
-
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build` |
|
|
400
|
+
| Writing a DB schema change, index or migration — in any phase, a review's own fixes included — or applying one (`validate`) | question `migration`, before the first line of it is written or run — except in `respond` and `green`, where it is blocked: a schema change agreed after the MR/PR exists goes back through `build`. Writing one whose every object `approved-schema.md` lists is not asked (§2, a schema approved with the study) |
|
|
376
401
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
377
402
|
| `validate` with a red suite or a criterion `unproven` | blocked — the phase does not advance and does not chain. **One exception, and it is measured, never judged**: every failing test also fails, under the same name, on the base (`git merge-base HEAD <git.default_base>`, run in a detached worktree), none of them lives in a file this diff touches, and none is the test that proves an acceptance criterion → record `{"key":"unattended:validate-red-base","default":"<n> red on HEAD and on base <short sha>: <test names>","phase":"validate"}` and advance; `ship` lists those tests under "Not verified — needs a human". Short of all three — a failure the base does not reproduce, a base that cannot be run, a test this diff touched — blocked |
|
|
378
403
|
| A product decision (§7 `decision`) | question `decision` |
|
|
@@ -73,7 +73,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
73
73
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and fix.
|
|
74
74
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
75
75
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
76
|
-
of one → the question stop, end the run.
|
|
76
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
77
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
78
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
77
79
|
exactly as `/flow-feat-build §2` says, with `04-fix.md` for `05-implementation.md` and
|
|
78
80
|
`/flow-bug-validate` as the phase it chains into after a review's *Fix them* (`/flow-bug-review`
|
|
79
81
|
for XS, which has no validate).
|
|
@@ -80,7 +80,9 @@ In `unattended` (flow-core §2.1) nobody is there to answer: write the brief, ma
|
|
|
80
80
|
`recorded (unattended)` under its heading, record the site in `meta.json.defaults_used[]`, and build.
|
|
81
81
|
The gate's purpose moves to the draft MR/PR, whose body carries the brief for the person who reads it.
|
|
82
82
|
**A schema change or migration is still a question** (`migration`): before writing the first line
|
|
83
|
-
of one → the question stop, end the run.
|
|
83
|
+
of one → the question stop, end the run — unless `approved-schema.md` lists every object it
|
|
84
|
+
creates, alters or drops (flow-core §2, a schema approved with the study): then write it, record
|
|
85
|
+
it there, do not stop. The orchestrator's answer re-enters here
|
|
84
86
|
(flow-core §2.1): the brief, the contracts and the plan are already written — keep them — and the
|
|
85
87
|
MR/PR is the one already `in_progress`, not a new pick. *Write it and continue* → the first unticked
|
|
86
88
|
step, the migration included · *Change the design first* → `blocked`. A plan step marked approved
|
|
@@ -226,7 +226,7 @@ Consolidate outputs into `.claude/work/<TICKET>/03-design.md`:
|
|
|
226
226
|
|
|
227
227
|
## Data model
|
|
228
228
|
- New / modified entities: <for each new one, indicate "no equivalent found" or "knowingly duplicated because...">
|
|
229
|
-
- Migrations:
|
|
229
|
+
- Migrations: <each table, column, index, constraint and data copy created, altered or dropped, by name — approving the study approves exactly this list (flow-core §2, a schema approved with the study)>
|
|
230
230
|
- Indexes:
|
|
231
231
|
|
|
232
232
|
### Access paths
|
|
@@ -401,4 +401,6 @@ Write `.claude/work/<TICKET>/06-review.md`. The `Cost:` line of `## Summary` is
|
|
|
401
401
|
unticked step under this MR/PR's plan in `05-implementation.md` (`04-fix.md` for a bug), leaves
|
|
402
402
|
`phase = build` (`fix`), and chains into `/flow-feat-build` (`/flow-bug-fix`), which builds those
|
|
403
403
|
steps and chains back here — a bug through `/flow-bug-validate` first, as its order has it. A migration one of this round's fixes needs is question `migration`
|
|
404
|
-
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1)
|
|
404
|
+
asked here — after `high_findings`, in its own stop — and answered the same way (flow-core §2.1),
|
|
405
|
+
unless `approved-schema.md` lists every object it writes (flow-core §2): then it is an ordinary
|
|
406
|
+
step, and build writes it without asking.
|
|
@@ -106,6 +106,15 @@ Show the branch, the remote and the file list the build printed — every path,
|
|
|
106
106
|
ask with `AskUserQuestion` **in every `autonomy.mode`**: a push leaves the machine (flow-core §2).
|
|
107
107
|
**Push** · **Cancel**. Nothing between the list and the question (flow-core §3).
|
|
108
108
|
|
|
109
|
+
**A study that changes the schema** — its `## Schema changes` section (§5) is not `none` — shows
|
|
110
|
+
that section too, under the file list, and the same question carries the approval: **Push — schema
|
|
111
|
+
approved** · **Push — build asks first** · **Cancel**. Whoever builds it can ask no one about what
|
|
112
|
+
the person here already read. *Push — schema approved* → write `approved-schema.md` in the work
|
|
113
|
+
folder (flow-core §2, a schema approved with the study: `Approved at handoff, <date>`, then the
|
|
114
|
+
section verbatim), run the build block again, check its file list is the one shown plus that file,
|
|
115
|
+
and push that commit. *Push — build asks first* → push as it stands: build will ask `migration`
|
|
116
|
+
before writing the first line of it.
|
|
117
|
+
|
|
109
118
|
```bash handoff-push
|
|
110
119
|
BRANCH='@BRANCH@'; COMMIT='@COMMIT@'
|
|
111
120
|
case "$COMMIT" in ''|*[!0-9a-f]*) echo "not a commit sha: $COMMIT"; exit 1 ;; esac
|
|
@@ -142,6 +151,7 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
142
151
|
## Acceptance criteria
|
|
143
152
|
## Design in brief
|
|
144
153
|
## MR/PR plan
|
|
154
|
+
## Schema changes
|
|
145
155
|
## Risks
|
|
146
156
|
<!-- end flow-study -->
|
|
147
157
|
```
|
|
@@ -150,6 +160,9 @@ the ticket read it there, never in the work folder; the receiver does not parse
|
|
|
150
160
|
entry and its why — `Depends on #253: <why>` — so whoever approves the study sees what it waits
|
|
151
161
|
for; an unattended study's `done-summary.md` is this block, so it carries them too. The plan
|
|
152
162
|
lists each MR/PR with what it covers and what it waits on; a bug's plan is its single fix.
|
|
163
|
+
`## Schema changes` lists, one line each and by name, every table, column, index, constraint and
|
|
164
|
+
data copy the study's migrations create, alter or drop (flow-core §2, a schema approved with the
|
|
165
|
+
study), or says `none` — it is what approving the study approves, so nothing there is prose.
|
|
153
166
|
- **The new body**: the body read above with the block between the two markers replaced — or, with
|
|
154
167
|
no markers yet, the block appended after a blank line. Then, for each `meta.json.ticket_deps`
|
|
155
168
|
entry (`/flow-feat-design` §5.1) whose line is not already a line of that body — same text,
|
|
@@ -105,6 +105,13 @@ record `{ "key": "unattended:base-caught-up", "default": "<old short sha> → <n
|
|
|
105
105
|
ancestor → it holds commits a previous run made: leave it as it is — bringing the base into work in
|
|
106
106
|
progress is the orchestrator's (flow-core §2.1).
|
|
107
107
|
|
|
108
|
+
**On `start`, an approved study run approves its schema** — only while no build or fix has begun,
|
|
109
|
+
`done-summary.md` exists (the summary a person approved) and `approved-schema.md` does not. Its
|
|
110
|
+
`## Schema changes` section names something → write `approved-schema.md` (flow-core §2, a schema
|
|
111
|
+
approved with the study: `Approved with the study run, <date>`, then the section verbatim) and
|
|
112
|
+
record `{ "key": "unattended:schema-approved", "default": "<n> object(s)", "phase": "run" }`. The
|
|
113
|
+
section says `none`, or is missing → nothing is written, and build asks as it always did.
|
|
114
|
+
|
|
108
115
|
**A person's changes to a study, on `study`** (flow-core §2.1: they rewind it). The work's branch
|
|
109
116
|
first, as above. `<work>/study-revision.md` holds the reply, as the row above wrote it. Each step
|
|
110
117
|
can be run again: a run that dies part-way is finished by the next relaunch, whatever it serves.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.96.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.96.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,26 @@ 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.96.0 — A schema approved with the study is not asked again at build · 2026-10-20
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **A study that changes the schema now lists it, object by object.** The study summary — the one
|
|
12
|
+
a handoff writes to the ticket and a study run sends to the orchestrator — gains
|
|
13
|
+
`## Schema changes`: every table, column, index, constraint and data copy, by name, or `none`.
|
|
14
|
+
- **Approving the study approves that list.** The handoff push question offers **Push — schema
|
|
15
|
+
approved**; a study run approved with `why = start` takes its list from the summary. Either way
|
|
16
|
+
the approval is written to `approved-schema.md` in the work folder.
|
|
17
|
+
- **Build no longer asks for a migration that is on the list.** It writes it and records it. One
|
|
18
|
+
more column, an index or a drop the list does not name is still the `migration` question, which
|
|
19
|
+
now names only what lies beyond the list.
|
|
20
|
+
- **Applying a migration and the pre-deploy SQL are still asked.** The study approved what the
|
|
21
|
+
schema becomes, not when a database changes.
|
|
22
|
+
|
|
23
|
+
An unattended build stopped before writing a migration the study had already designed in full and
|
|
24
|
+
a person had already approved, and the question repeated that design almost word for word. Nothing
|
|
25
|
+
recorded the approval in a form build could check. A study revision moves the approval aside with
|
|
26
|
+
the rest of the study, so a changed study is approved again. Closes #206.
|
|
27
|
+
|
|
8
28
|
## v0.95.1 — An unattended run waits for its tests instead of sleeping a guess · 2026-10-15
|
|
9
29
|
|
|
10
30
|
**In short**
|