flow-workflows 0.99.0 → 0.99.2
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 +2 -2
- package/adapters/codex/skills/flow-feat-plan/SKILL.md +2 -0
- package/adapters/codex/skills/flow-feat-validate/SKILL.md +3 -2
- package/adapters/codex/skills/flow-work-run/SKILL.md +2 -1
- package/adapters/gemini/CORE.md +2 -2
- package/adapters/gemini/commands/flow/feat/plan.toml +2 -0
- package/adapters/gemini/commands/flow/feat/validate.toml +3 -2
- package/adapters/gemini/commands/flow/work/run.toml +2 -1
- package/adapters/hermes/CORE.md +2 -2
- package/adapters/hermes/skills/flow-feat-plan/SKILL.md +2 -0
- package/adapters/hermes/skills/flow-feat-validate/SKILL.md +3 -2
- package/adapters/hermes/skills/flow-work-run/SKILL.md +2 -1
- package/adapters/opencode/CORE.md +2 -2
- package/adapters/opencode/commands/flow-feat-plan.md +2 -0
- package/adapters/opencode/commands/flow-feat-validate.md +3 -2
- package/adapters/opencode/commands/flow-work-run.md +2 -1
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +30 -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.99.
|
|
20
|
+
**This file belongs to flow `0.99.2`.** 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
|
|
@@ -407,7 +407,7 @@ person asking for changes, a ticket that already has code — is `$flow-work-run
|
|
|
407
407
|
| 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) |
|
|
408
408
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
409
409
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
410
|
-
| `validate` with a red suite | **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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `$flow-feat-build` (`$flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
410
|
+
| `validate` with a red suite | **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. **The base runs the way HEAD went red**: the same command (the whole suite when the whole suite went red, never the failing file alone), and a test that is red in the whole suite but green on its own is load- or order-dependent, so one run on each side proves nothing — run the whole suite three times on HEAD and three on the base, and write each side's red count and that test's duration in every run. Red on the base as often as on HEAD → the exception holds. Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said; its repair step says so, with both sides' counts and how much slower the failing runs were, and the fix is what this diff adds under concurrency (a lock, a pool, a timer, a background loop), never a longer timeout or a retry → 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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `$flow-feat-build` (`$flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
411
411
|
| A product decision (§7 `decision`) | question `decision` |
|
|
412
412
|
| Clarifying questions on the ticket (`start`) | question `clarify` — after the branch and the work folder exist, with the questions also written to `01-context.md` |
|
|
413
413
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -56,6 +56,8 @@ Launch a subagent with this brief (self-contained):
|
|
|
56
56
|
>
|
|
57
57
|
> Then build the **dependency graph** (which MR/PR needs another one merged or deployed before it can start) and **sort it topologically into execution waves**: wave 1 = everything with no unmet dependency (can start immediately, in parallel); wave 2 = everything unlocked once wave 1 is in; and so on. **Number the MRs/PRs following that wave order** — the lowest numbers to wave 1, then wave 2, etc. — so that **every MR/PR's dependencies have a strictly lower number than itself** (`#1` is always a legitimate starting point, never "start at #5"). Within a wave (parallel, no dependency between them) the order is free; number them consecutively. **The number is the execution order, not a grouping by feature area** — do not number by "Part A / Part B" and then reorder in prose.
|
|
58
58
|
>
|
|
59
|
+
> **"Released" or "deployed" means on the default branch.** In `unattended` the orchestrator may merge each MR/PR of a split into a base of its own (`meta.json.base`, not `git.default_base`): nothing of the split reaches the default branch, so no release or deploy can carry it, until the last one merges. A link that needs an earlier MR/PR released or deployed before the next can start cannot be met inside such a split — merge the two, or let the later one start without that wait and leave the check on a real release to a person on its MR/PR.
|
|
60
|
+
>
|
|
59
61
|
> **Merge test — run it before you return the table.** For every pair of MRs/PRs in the **same wave**, and for every direct link `#a → #b` where `#b` is the *only* thing depending on `#a`, state what is lost by merging the two into one. If the only answer is "they close different tickets" — one MR/PR can close several — or "the first has no product value of its own, it is scaffolding for the second", **merge them**. Report the pairs you merged and the pairs you kept apart, each with its reason; "no pair was worth evaluating" is not an answer, name the pairs you looked at.
|
|
60
62
|
>
|
|
61
63
|
> Return a table with: **`n`** (final number = execution order), **`wave`**, **`depends_on`** (list of the `n` it needs merged first; empty if it can start immediately), what it includes, standalone-mergeable (yes/no + how it is guaranteed), what it unlocks for the next one, risk if it stays alone on the main branch indefinitely, **`lines_est`** (approximate lines, sum of added + modified) and **`files_est`** (approximate files it touches). Estimates are **soft** — they serve as a thermometer during build, not as a contract. If the correct answer is "1 single MR/PR", justify it and return that. Under 600 words.
|
|
@@ -230,8 +230,9 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
230
230
|
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `$flow-feat-ship`, which
|
|
231
231
|
hands the MR/PR to the orchestrator with `publish`. A criterion `unproven` → `blocked`, naming
|
|
232
232
|
it; never chain. A red suite advances only under the base exception of flow-core §2.1: run the
|
|
233
|
-
failing tests on the base
|
|
234
|
-
|
|
233
|
+
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
234
|
+
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
235
|
+
the run counts and the base sha under "Suite results" in `07-validation.md`. Calling a failure "pre-existing" without that run is not the
|
|
235
236
|
exception — it is a red suite. Short of it, the red suite gets a repair round (the same row):
|
|
236
237
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
237
238
|
chains into `$flow-feat-build`, then review and this phase again. Rounds go on while each lowers
|
|
@@ -61,7 +61,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
|
|
|
61
61
|
| `answer` | `pending` set | apply `<cmd> answer` as flow-core §2.1 "The answer comes back" says, then `pending.resume` at `pending.resume_at`. The order fails or prints nothing → `blocked` |
|
|
62
62
|
| `answer` | nothing pending | `blocked` — there is no question for that answer to decide |
|
|
63
63
|
| `merged` | exists, something published | the entry of `meta.json.mrs` whose `status` is `published` (the only one: one MR/PR per run) becomes `merged`; set `meta.json.base` to the `base` just read (empty → `git.default_base`); the next startable MR/PR → `$flow-feat-build`; none left, or a work with no `mrs` and `published` true (one MR/PR, every bug) → `phase = done` and `done`, the summary naming the ticket as complete |
|
|
64
|
-
| `merged` |
|
|
64
|
+
| `merged` | exists, nothing published, its last `mrs[]` entry with a number `merged` | the same merge again: a run that recorded it and then stopped (a block, a crash) is relaunched with the same `why`, since no part was published after it. Nothing to record — the next startable MR/PR → `$flow-feat-build`; none left → `phase = done` and `done`, as the row above |
|
|
65
|
+
| `merged` | none, or nothing published and nothing merged | `blocked` — nothing of this ticket was published from here |
|
|
65
66
|
| `review` | exists | `$flow-work-respond` — the threads come from `<cmd> events --json` |
|
|
66
67
|
| `pipeline` | exists | `$flow-work-green` — the failed jobs come from `<cmd> events --json` |
|
|
67
68
|
| `conflict` | exists | `$flow-work-green` — the MR/PR conflicts with its base; which base, and where it stands, come from `<cmd> events --json` |
|
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.99.
|
|
19
|
+
**This file belongs to flow `0.99.2`.** 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
|
|
@@ -406,7 +406,7 @@ person asking for changes, a ticket that already has code — is `/flow:work:run
|
|
|
406
406
|
| 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) |
|
|
407
407
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
408
408
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
409
|
-
| `validate` with a red suite | **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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow:feat:build` (`/flow:bug:fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
409
|
+
| `validate` with a red suite | **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. **The base runs the way HEAD went red**: the same command (the whole suite when the whole suite went red, never the failing file alone), and a test that is red in the whole suite but green on its own is load- or order-dependent, so one run on each side proves nothing — run the whole suite three times on HEAD and three on the base, and write each side's red count and that test's duration in every run. Red on the base as often as on HEAD → the exception holds. Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said; its repair step says so, with both sides' counts and how much slower the failing runs were, and the fix is what this diff adds under concurrency (a lock, a pool, a timer, a background loop), never a longer timeout or a retry → 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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow:feat:build` (`/flow:bug:fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
410
410
|
| A product decision (§7 `decision`) | question `decision` |
|
|
411
411
|
| Clarifying questions on the ticket (`start`) | question `clarify` — after the branch and the work folder exist, with the questions also written to `01-context.md` |
|
|
412
412
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -52,6 +52,8 @@ Launch a subagent with this brief (self-contained):
|
|
|
52
52
|
>
|
|
53
53
|
> Then build the **dependency graph** (which MR/PR needs another one merged or deployed before it can start) and **sort it topologically into execution waves**: wave 1 = everything with no unmet dependency (can start immediately, in parallel); wave 2 = everything unlocked once wave 1 is in; and so on. **Number the MRs/PRs following that wave order** — the lowest numbers to wave 1, then wave 2, etc. — so that **every MR/PR's dependencies have a strictly lower number than itself** (`#1` is always a legitimate starting point, never "start at #5"). Within a wave (parallel, no dependency between them) the order is free; number them consecutively. **The number is the execution order, not a grouping by feature area** — do not number by "Part A / Part B" and then reorder in prose.
|
|
54
54
|
>
|
|
55
|
+
> **"Released" or "deployed" means on the default branch.** In `unattended` the orchestrator may merge each MR/PR of a split into a base of its own (`meta.json.base`, not `git.default_base`): nothing of the split reaches the default branch, so no release or deploy can carry it, until the last one merges. A link that needs an earlier MR/PR released or deployed before the next can start cannot be met inside such a split — merge the two, or let the later one start without that wait and leave the check on a real release to a person on its MR/PR.
|
|
56
|
+
>
|
|
55
57
|
> **Merge test — run it before you return the table.** For every pair of MRs/PRs in the **same wave**, and for every direct link `#a → #b` where `#b` is the *only* thing depending on `#a`, state what is lost by merging the two into one. If the only answer is "they close different tickets" — one MR/PR can close several — or "the first has no product value of its own, it is scaffolding for the second", **merge them**. Report the pairs you merged and the pairs you kept apart, each with its reason; "no pair was worth evaluating" is not an answer, name the pairs you looked at.
|
|
56
58
|
>
|
|
57
59
|
> Return a table with: **`n`** (final number = execution order), **`wave`**, **`depends_on`** (list of the `n` it needs merged first; empty if it can start immediately), what it includes, standalone-mergeable (yes/no + how it is guaranteed), what it unlocks for the next one, risk if it stays alone on the main branch indefinitely, **`lines_est`** (approximate lines, sum of added + modified) and **`files_est`** (approximate files it touches). Estimates are **soft** — they serve as a thermometer during build, not as a contract. If the correct answer is "1 single MR/PR", justify it and return that. Under 600 words.
|
|
@@ -226,8 +226,9 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
226
226
|
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow:feat:ship`, which
|
|
227
227
|
hands the MR/PR to the orchestrator with `publish`. A criterion `unproven` → `blocked`, naming
|
|
228
228
|
it; never chain. A red suite advances only under the base exception of flow-core §2.1: run the
|
|
229
|
-
failing tests on the base
|
|
230
|
-
|
|
229
|
+
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
230
|
+
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
231
|
+
the run counts and the base sha under "Suite results" in `07-validation.md`. Calling a failure "pre-existing" without that run is not the
|
|
231
232
|
exception — it is a red suite. Short of it, the red suite gets a repair round (the same row):
|
|
232
233
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
233
234
|
chains into `/flow:feat:build`, then review and this phase again. Rounds go on while each lowers
|
|
@@ -57,7 +57,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
|
|
|
57
57
|
| `answer` | `pending` set | apply `<cmd> answer` as flow-core §2.1 "The answer comes back" says, then `pending.resume` at `pending.resume_at`. The order fails or prints nothing → `blocked` |
|
|
58
58
|
| `answer` | nothing pending | `blocked` — there is no question for that answer to decide |
|
|
59
59
|
| `merged` | exists, something published | the entry of `meta.json.mrs` whose `status` is `published` (the only one: one MR/PR per run) becomes `merged`; set `meta.json.base` to the `base` just read (empty → `git.default_base`); the next startable MR/PR → `/flow:feat:build`; none left, or a work with no `mrs` and `published` true (one MR/PR, every bug) → `phase = done` and `done`, the summary naming the ticket as complete |
|
|
60
|
-
| `merged` |
|
|
60
|
+
| `merged` | exists, nothing published, its last `mrs[]` entry with a number `merged` | the same merge again: a run that recorded it and then stopped (a block, a crash) is relaunched with the same `why`, since no part was published after it. Nothing to record — the next startable MR/PR → `/flow:feat:build`; none left → `phase = done` and `done`, as the row above |
|
|
61
|
+
| `merged` | none, or nothing published and nothing merged | `blocked` — nothing of this ticket was published from here |
|
|
61
62
|
| `review` | exists | `/flow:work:respond` — the threads come from `<cmd> events --json` |
|
|
62
63
|
| `pipeline` | exists | `/flow:work:green` — the failed jobs come from `<cmd> events --json` |
|
|
63
64
|
| `conflict` | exists | `/flow:work:green` — the MR/PR conflicts with its base; which base, and where it stands, come from `<cmd> events --json` |
|
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.99.
|
|
20
|
+
**This file belongs to flow `0.99.2`.** 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
|
|
@@ -407,7 +407,7 @@ person asking for changes, a ticket that already has code — is `/flow-work-run
|
|
|
407
407
|
| 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) |
|
|
408
408
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
409
409
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
410
|
-
| `validate` with a red suite | **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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow-feat-build` (`/flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
410
|
+
| `validate` with a red suite | **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. **The base runs the way HEAD went red**: the same command (the whole suite when the whole suite went red, never the failing file alone), and a test that is red in the whole suite but green on its own is load- or order-dependent, so one run on each side proves nothing — run the whole suite three times on HEAD and three on the base, and write each side's red count and that test's duration in every run. Red on the base as often as on HEAD → the exception holds. Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said; its repair step says so, with both sides' counts and how much slower the failing runs were, and the fix is what this diff adds under concurrency (a lock, a pool, a timer, a background loop), never a longer timeout or a retry → 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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow-feat-build` (`/flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
411
411
|
| A product decision (§7 `decision`) | question `decision` |
|
|
412
412
|
| Clarifying questions on the ticket (`start`) | question `clarify` — after the branch and the work folder exist, with the questions also written to `01-context.md` |
|
|
413
413
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -56,6 +56,8 @@ Launch a subagent with this brief (self-contained):
|
|
|
56
56
|
>
|
|
57
57
|
> Then build the **dependency graph** (which MR/PR needs another one merged or deployed before it can start) and **sort it topologically into execution waves**: wave 1 = everything with no unmet dependency (can start immediately, in parallel); wave 2 = everything unlocked once wave 1 is in; and so on. **Number the MRs/PRs following that wave order** — the lowest numbers to wave 1, then wave 2, etc. — so that **every MR/PR's dependencies have a strictly lower number than itself** (`#1` is always a legitimate starting point, never "start at #5"). Within a wave (parallel, no dependency between them) the order is free; number them consecutively. **The number is the execution order, not a grouping by feature area** — do not number by "Part A / Part B" and then reorder in prose.
|
|
58
58
|
>
|
|
59
|
+
> **"Released" or "deployed" means on the default branch.** In `unattended` the orchestrator may merge each MR/PR of a split into a base of its own (`meta.json.base`, not `git.default_base`): nothing of the split reaches the default branch, so no release or deploy can carry it, until the last one merges. A link that needs an earlier MR/PR released or deployed before the next can start cannot be met inside such a split — merge the two, or let the later one start without that wait and leave the check on a real release to a person on its MR/PR.
|
|
60
|
+
>
|
|
59
61
|
> **Merge test — run it before you return the table.** For every pair of MRs/PRs in the **same wave**, and for every direct link `#a → #b` where `#b` is the *only* thing depending on `#a`, state what is lost by merging the two into one. If the only answer is "they close different tickets" — one MR/PR can close several — or "the first has no product value of its own, it is scaffolding for the second", **merge them**. Report the pairs you merged and the pairs you kept apart, each with its reason; "no pair was worth evaluating" is not an answer, name the pairs you looked at.
|
|
60
62
|
>
|
|
61
63
|
> Return a table with: **`n`** (final number = execution order), **`wave`**, **`depends_on`** (list of the `n` it needs merged first; empty if it can start immediately), what it includes, standalone-mergeable (yes/no + how it is guaranteed), what it unlocks for the next one, risk if it stays alone on the main branch indefinitely, **`lines_est`** (approximate lines, sum of added + modified) and **`files_est`** (approximate files it touches). Estimates are **soft** — they serve as a thermometer during build, not as a contract. If the correct answer is "1 single MR/PR", justify it and return that. Under 600 words.
|
|
@@ -230,8 +230,9 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
230
230
|
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow-feat-ship`, which
|
|
231
231
|
hands the MR/PR to the orchestrator with `publish`. A criterion `unproven` → `blocked`, naming
|
|
232
232
|
it; never chain. A red suite advances only under the base exception of flow-core §2.1: run the
|
|
233
|
-
failing tests on the base
|
|
234
|
-
|
|
233
|
+
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
234
|
+
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
235
|
+
the run counts and the base sha under "Suite results" in `07-validation.md`. Calling a failure "pre-existing" without that run is not the
|
|
235
236
|
exception — it is a red suite. Short of it, the red suite gets a repair round (the same row):
|
|
236
237
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
237
238
|
chains into `/flow-feat-build`, then review and this phase again. Rounds go on while each lowers
|
|
@@ -61,7 +61,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
|
|
|
61
61
|
| `answer` | `pending` set | apply `<cmd> answer` as flow-core §2.1 "The answer comes back" says, then `pending.resume` at `pending.resume_at`. The order fails or prints nothing → `blocked` |
|
|
62
62
|
| `answer` | nothing pending | `blocked` — there is no question for that answer to decide |
|
|
63
63
|
| `merged` | exists, something published | the entry of `meta.json.mrs` whose `status` is `published` (the only one: one MR/PR per run) becomes `merged`; set `meta.json.base` to the `base` just read (empty → `git.default_base`); the next startable MR/PR → `/flow-feat-build`; none left, or a work with no `mrs` and `published` true (one MR/PR, every bug) → `phase = done` and `done`, the summary naming the ticket as complete |
|
|
64
|
-
| `merged` |
|
|
64
|
+
| `merged` | exists, nothing published, its last `mrs[]` entry with a number `merged` | the same merge again: a run that recorded it and then stopped (a block, a crash) is relaunched with the same `why`, since no part was published after it. Nothing to record — the next startable MR/PR → `/flow-feat-build`; none left → `phase = done` and `done`, as the row above |
|
|
65
|
+
| `merged` | none, or nothing published and nothing merged | `blocked` — nothing of this ticket was published from here |
|
|
65
66
|
| `review` | exists | `/flow-work-respond` — the threads come from `<cmd> events --json` |
|
|
66
67
|
| `pipeline` | exists | `/flow-work-green` — the failed jobs come from `<cmd> events --json` |
|
|
67
68
|
| `conflict` | exists | `/flow-work-green` — the MR/PR conflicts with its base; which base, and where it stands, come from `<cmd> events --json` |
|
|
@@ -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.99.
|
|
19
|
+
**This file belongs to flow `0.99.2`.** 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
|
|
@@ -406,7 +406,7 @@ person asking for changes, a ticket that already has code — is `/flow-work-run
|
|
|
406
406
|
| 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) |
|
|
407
407
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
408
408
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
409
|
-
| `validate` with a red suite | **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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow-feat-build` (`/flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
409
|
+
| `validate` with a red suite | **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. **The base runs the way HEAD went red**: the same command (the whole suite when the whole suite went red, never the failing file alone), and a test that is red in the whole suite but green on its own is load- or order-dependent, so one run on each side proves nothing — run the whole suite three times on HEAD and three on the base, and write each side's red count and that test's duration in every run. Red on the base as often as on HEAD → the exception holds. Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said; its repair step says so, with both sides' counts and how much slower the failing runs were, and the fix is what this diff adds under concurrency (a lock, a pool, a timer, a background loop), never a longer timeout or a retry → 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 that, **repair rounds while they make progress, at most three per MR/PR**: each round is a heading under this MR/PR's plan (`05-implementation.md` / `04-fix.md`), `### Red suite at validate (unattended), round <k>: <n> red`. No such heading yet, or the last one's `<n>` above the count red now and `<k>` below 3 → write the next heading with one unticked step per failing test (its name and the first line of its failure), each ending *fix the code, or update an assertion whose expected value this MR/PR's design or fix changed — never delete, skip or loosen a test*; record `{"key":"unattended:validate-red-loop","default":"round <k>, <n> red: <test names>","phase":"validate"}`, leave `phase = build` (`fix`) and chain into `/flow-feat-build` (`/flow-bug-fix`) — whose steps then run through the phases that follow it as always, review and validate included. A review of that round treats a test the round deleted, skipped or loosened as a blocker. A round that did not lower the count, or a third round still red → blocked, naming the tests still red and the count each round left |
|
|
410
410
|
| A product decision (§7 `decision`) | question `decision` |
|
|
411
411
|
| Clarifying questions on the ticket (`start`) | question `clarify` — after the branch and the work folder exist, with the questions also written to `01-context.md` |
|
|
412
412
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -54,6 +54,8 @@ Launch a subagent with this brief (self-contained):
|
|
|
54
54
|
>
|
|
55
55
|
> Then build the **dependency graph** (which MR/PR needs another one merged or deployed before it can start) and **sort it topologically into execution waves**: wave 1 = everything with no unmet dependency (can start immediately, in parallel); wave 2 = everything unlocked once wave 1 is in; and so on. **Number the MRs/PRs following that wave order** — the lowest numbers to wave 1, then wave 2, etc. — so that **every MR/PR's dependencies have a strictly lower number than itself** (`#1` is always a legitimate starting point, never "start at #5"). Within a wave (parallel, no dependency between them) the order is free; number them consecutively. **The number is the execution order, not a grouping by feature area** — do not number by "Part A / Part B" and then reorder in prose.
|
|
56
56
|
>
|
|
57
|
+
> **"Released" or "deployed" means on the default branch.** In `unattended` the orchestrator may merge each MR/PR of a split into a base of its own (`meta.json.base`, not `git.default_base`): nothing of the split reaches the default branch, so no release or deploy can carry it, until the last one merges. A link that needs an earlier MR/PR released or deployed before the next can start cannot be met inside such a split — merge the two, or let the later one start without that wait and leave the check on a real release to a person on its MR/PR.
|
|
58
|
+
>
|
|
57
59
|
> **Merge test — run it before you return the table.** For every pair of MRs/PRs in the **same wave**, and for every direct link `#a → #b` where `#b` is the *only* thing depending on `#a`, state what is lost by merging the two into one. If the only answer is "they close different tickets" — one MR/PR can close several — or "the first has no product value of its own, it is scaffolding for the second", **merge them**. Report the pairs you merged and the pairs you kept apart, each with its reason; "no pair was worth evaluating" is not an answer, name the pairs you looked at.
|
|
58
60
|
>
|
|
59
61
|
> Return a table with: **`n`** (final number = execution order), **`wave`**, **`depends_on`** (list of the `n` it needs merged first; empty if it can start immediately), what it includes, standalone-mergeable (yes/no + how it is guaranteed), what it unlocks for the next one, risk if it stays alone on the main branch indefinitely, **`lines_est`** (approximate lines, sum of added + modified) and **`files_est`** (approximate files it touches). Estimates are **soft** — they serve as a thermometer during build, not as a contract. If the correct answer is "1 single MR/PR", justify it and return that. Under 600 words.
|
|
@@ -228,8 +228,9 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
228
228
|
**In `unattended`** (flow-core §2.1): the phase advanced → chain into `/flow-feat-ship`, which
|
|
229
229
|
hands the MR/PR to the orchestrator with `publish`. A criterion `unproven` → `blocked`, naming
|
|
230
230
|
it; never chain. A red suite advances only under the base exception of flow-core §2.1: run the
|
|
231
|
-
failing tests on the base
|
|
232
|
-
|
|
231
|
+
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
232
|
+
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
233
|
+
the run counts and the base sha under "Suite results" in `07-validation.md`. Calling a failure "pre-existing" without that run is not the
|
|
233
234
|
exception — it is a red suite. Short of it, the red suite gets a repair round (the same row):
|
|
234
235
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
235
236
|
chains into `/flow-feat-build`, then review and this phase again. Rounds go on while each lowers
|
|
@@ -59,7 +59,8 @@ of truth, and an argument that disagrees with it is ignored and named in the log
|
|
|
59
59
|
| `answer` | `pending` set | apply `<cmd> answer` as flow-core §2.1 "The answer comes back" says, then `pending.resume` at `pending.resume_at`. The order fails or prints nothing → `blocked` |
|
|
60
60
|
| `answer` | nothing pending | `blocked` — there is no question for that answer to decide |
|
|
61
61
|
| `merged` | exists, something published | the entry of `meta.json.mrs` whose `status` is `published` (the only one: one MR/PR per run) becomes `merged`; set `meta.json.base` to the `base` just read (empty → `git.default_base`); the next startable MR/PR → `/flow-feat-build`; none left, or a work with no `mrs` and `published` true (one MR/PR, every bug) → `phase = done` and `done`, the summary naming the ticket as complete |
|
|
62
|
-
| `merged` |
|
|
62
|
+
| `merged` | exists, nothing published, its last `mrs[]` entry with a number `merged` | the same merge again: a run that recorded it and then stopped (a block, a crash) is relaunched with the same `why`, since no part was published after it. Nothing to record — the next startable MR/PR → `/flow-feat-build`; none left → `phase = done` and `done`, as the row above |
|
|
63
|
+
| `merged` | none, or nothing published and nothing merged | `blocked` — nothing of this ticket was published from here |
|
|
63
64
|
| `review` | exists | `/flow-work-respond` — the threads come from `<cmd> events --json` |
|
|
64
65
|
| `pipeline` | exists | `/flow-work-green` — the failed jobs come from `<cmd> events --json` |
|
|
65
66
|
| `conflict` | exists | `/flow-work-green` — the MR/PR conflicts with its base; which base, and where it stands, come from `<cmd> events --json` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.99.
|
|
3
|
+
"version": "0.99.2",
|
|
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.99.
|
|
6
|
+
"version": "0.99.2",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,36 @@ 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.99.2 — A failure is called pre-existing only under the same load · 2026-10-22
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **An unattended `validate` checks the base the way HEAD went red.** Same command: the whole
|
|
12
|
+
suite when the whole suite failed, never the failing file alone.
|
|
13
|
+
- **A test red in the suite and green on its own runs three times on each side.** Each side's red
|
|
14
|
+
count and that test's durations go in `07-validation.md`. Red on the base as often → pre-existing.
|
|
15
|
+
Green on the base and red on HEAD even once → this diff made it.
|
|
16
|
+
- **The repair round then looks at what the diff adds under concurrency** — a lock, a pool, a timer,
|
|
17
|
+
a background loop — never a longer timeout or a retry.
|
|
18
|
+
|
|
19
|
+
An unattended run spent its three repair rounds on a test it called pre-existing after one isolated
|
|
20
|
+
run on the base. In the whole suite the test passed every time on the base and failed on its branch,
|
|
21
|
+
almost three times slower: the run had added the failure itself.
|
|
22
|
+
|
|
23
|
+
## v0.99.1 — A part's merge that comes back no longer blocks the split · 2026-10-22
|
|
24
|
+
|
|
25
|
+
**In short**
|
|
26
|
+
- **`/flow:work:run` with `why = merged` and the merge already recorded goes on.** A run that
|
|
27
|
+
recorded a part's merge and then stopped (a block, a crash) is relaunched with the same `merged`,
|
|
28
|
+
since no part was published after it. It used to block with «nothing published»; it now takes
|
|
29
|
+
the next startable MR/PR, or closes the work when none is left.
|
|
30
|
+
- **`/flow:feat:plan` knows a split's parts may not reach the default branch.** In `unattended`, an
|
|
31
|
+
orchestrator may merge each part into a base of its own until the last one merges, so a part
|
|
32
|
+
that waits for an earlier one to be *released or deployed* can never start. The plan merges the
|
|
33
|
+
two, or drops the wait and leaves the check on a real release to a person on the MR/PR.
|
|
34
|
+
|
|
35
|
+
An unattended split stopped for good: its plan waited for a release of part 1, which only lived on
|
|
36
|
+
the split's own base, and every relaunch came back as a `merged` that was already recorded.
|
|
37
|
+
|
|
8
38
|
## v0.99.0 — After an approved study, an unattended run answers its own questions · 2026-10-22
|
|
9
39
|
|
|
10
40
|
**In short**
|