flow-workflows 0.102.1 → 0.104.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 +59 -2
- package/adapters/codex/skills/flow-bug-validate/SKILL.md +1 -1
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +8 -1
- package/adapters/codex/skills/flow-feat-start/SKILL.md +6 -0
- package/adapters/codex/skills/flow-feat-validate/SKILL.md +4 -1
- package/adapters/codex/skills/flow-init/SKILL.md +2 -0
- package/adapters/codex/skills/flow-next/SKILL.md +3 -0
- package/adapters/codex/skills/flow-work-README/SKILL.md +2 -0
- package/adapters/codex/skills/flow-work-daily/SKILL.md +5 -0
- package/adapters/codex/skills/flow-work-resume/SKILL.md +1 -0
- package/adapters/gemini/CORE.md +59 -2
- package/adapters/gemini/commands/flow/bug/validate.toml +1 -1
- package/adapters/gemini/commands/flow/feat/ship.toml +8 -1
- package/adapters/gemini/commands/flow/feat/start.toml +6 -0
- package/adapters/gemini/commands/flow/feat/validate.toml +4 -1
- package/adapters/gemini/commands/flow/init.toml +2 -0
- package/adapters/gemini/commands/flow/next.toml +3 -0
- package/adapters/gemini/commands/flow/work/README.toml +2 -0
- package/adapters/gemini/commands/flow/work/daily.toml +5 -0
- package/adapters/gemini/commands/flow/work/resume.toml +1 -0
- package/adapters/hermes/CORE.md +59 -2
- package/adapters/hermes/skills/flow-bug-validate/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +8 -1
- package/adapters/hermes/skills/flow-feat-start/SKILL.md +6 -0
- package/adapters/hermes/skills/flow-feat-validate/SKILL.md +4 -1
- package/adapters/hermes/skills/flow-init/SKILL.md +2 -0
- package/adapters/hermes/skills/flow-next/SKILL.md +3 -0
- package/adapters/hermes/skills/flow-work-README/SKILL.md +2 -0
- package/adapters/hermes/skills/flow-work-daily/SKILL.md +5 -0
- package/adapters/hermes/skills/flow-work-resume/SKILL.md +1 -0
- package/adapters/opencode/CORE.md +59 -2
- package/adapters/opencode/commands/flow-bug-validate.md +1 -1
- package/adapters/opencode/commands/flow-feat-ship.md +8 -1
- package/adapters/opencode/commands/flow-feat-start.md +6 -0
- package/adapters/opencode/commands/flow-feat-validate.md +4 -1
- package/adapters/opencode/commands/flow-init.md +2 -0
- package/adapters/opencode/commands/flow-next.md +3 -0
- package/adapters/opencode/commands/flow-work-README.md +2 -0
- package/adapters/opencode/commands/flow-work-daily.md +5 -0
- package/adapters/opencode/commands/flow-work-resume.md +1 -0
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +34 -0
- package/plugins/flow/examples/FLOW.template.md +8 -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.104.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
|
|
@@ -426,7 +426,7 @@ person asking for changes, a ticket that already has code — is `$flow-work-run
|
|
|
426
426
|
| 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) |
|
|
427
427
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
428
428
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
429
|
-
| `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-
|
|
429
|
+
| `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: 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". Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said (a suspect flake, below, gets five more runs first); 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. **A suspect flake is measured again before it is blamed**: a test red in exactly one of HEAD's three runs (the run that first went red is not one of them), in none of the base's, in a file this diff does not touch, green when run on its own, and not the test that proves an acceptance criterion. When at least one test is red in HEAD's three runs and every such test is one, run the whole suite five more times on HEAD — not on the base, whose three runs already said 0 — and write each run's red tests and the suspects' durations. Nothing red in any of the five → record `{"key":"unattended:validate-flaky","default":"<test name>: red 1/3 then 0/5 on HEAD, 0/3 on base <short sha>","phase":"validate"}` per test and advance; `ship` lists them under "Not verified — needs a human". Anything red in the five, or a red test that is not a suspect → this diff made it, and the repair rounds below follow: every red test, suspects included, goes to the repair rounds and counts in their `<n>`. The five runs are only ever more runs: a test is never rerun alone in their place, retried, skipped or loosened. Short of the exception and of a flake that held, **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 |
|
|
430
430
|
| A product decision (§7 `decision`) | question `decision` |
|
|
431
431
|
| 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` |
|
|
432
432
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -1287,3 +1287,60 @@ estimate meeting a good change.
|
|
|
1287
1287
|
**It travels into every brief.** A subagent handed a size or a `lines_est` is handed a thermometer,
|
|
1288
1288
|
never a budget, and the brief says so (§6). An agent optimising for a number nobody told it was
|
|
1289
1289
|
advisory is the one that returns tidier, shorter, worse code — and it returns it looking finished.
|
|
1290
|
+
|
|
1291
|
+
## 10. Roadmap — the phases and milestones above the ticket
|
|
1292
|
+
|
|
1293
|
+
A ticket is the largest thing a work knows about: it splits into MRs/PRs (`04-mr-plan.md`), and
|
|
1294
|
+
nothing sits above it. A project that is being built in phases usually keeps that plan in a markdown
|
|
1295
|
+
file — phases, milestones, sub-milestones, tasks with checkboxes — and without this section no
|
|
1296
|
+
command reads it unless told to, `next` cannot say where the project stands, and nobody ticks off
|
|
1297
|
+
what an MR/PR delivered.
|
|
1298
|
+
|
|
1299
|
+
**The file.** `roadmap.path` in `FLOW.md`; `none` turns the whole section off. Empty → `ROADMAP.md`
|
|
1300
|
+
at the repo root, then `docs/ROADMAP.md`, and either counts only if it holds at least one checkbox
|
|
1301
|
+
line (`- [ ]` / `- [x]`). Nothing found → there is no roadmap, and every command below behaves as
|
|
1302
|
+
before, silently. A tracked file is read **here** (it is this branch's version); a git-ignored one
|
|
1303
|
+
from the main checkout, by §0's rule.
|
|
1304
|
+
|
|
1305
|
+
**Its shape is the author's, not flow's.** Headings are phases and milestones, at whatever depth the
|
|
1306
|
+
file uses; a checkbox line is a task; a checkbox line with checkbox children is a milestone made of
|
|
1307
|
+
those children. flow never rewrites the structure, renumbers, reorders or adds headings — it touches
|
|
1308
|
+
exactly two things: a checkbox, and a short annotation at the end of the line it ticks.
|
|
1309
|
+
|
|
1310
|
+
**Where the project stands** — computed the same way by `next`, `daily` and `resume`:
|
|
1311
|
+
- **Current phase**: the first heading, in file order, that still holds an unchecked item.
|
|
1312
|
+
- **In progress**: unchecked items an open work links (below), or that carry flow's in-progress
|
|
1313
|
+
annotation.
|
|
1314
|
+
- **Next**: the first unchecked item of the current phase that is neither — a leaf, not a milestone
|
|
1315
|
+
whose children are listed.
|
|
1316
|
+
- Said in one line: `Roadmap: <phase> › <milestone> — <done>/<total> · in progress: <item> (<work>) ·
|
|
1317
|
+
next: <item>`. Counts are the checkboxes under the current phase. All done → `Roadmap: complete`.
|
|
1318
|
+
|
|
1319
|
+
**The link.** A work records the item it delivers in `meta.json.roadmap`:
|
|
1320
|
+
`{ "path": "<file>", "item": "<the line's text, without checkbox or annotation>", "under": "<heading › heading>" }`
|
|
1321
|
+
— or `null`. `$flow-feat-start` sets it: an item the ticket clearly names (its id, or its title
|
|
1322
|
+
matching the item's text) is taken in every mode; otherwise `manual` asks once, offering the next
|
|
1323
|
+
unchecked items and *none*, and `guided`/`auto`/`unattended` record `null` and say so in one line. A
|
|
1324
|
+
work is linked to one item, at any depth: linking a milestone means the work delivers all its
|
|
1325
|
+
children.
|
|
1326
|
+
|
|
1327
|
+
**The mark — in the MR/PR, so the roadmap moves with the code and is reviewed with it.** `$flow-feat-ship`
|
|
1328
|
+
edits the file in the same commit as the change, and the preview shows the line it will become:
|
|
1329
|
+
- **First MR/PR of the work, more to come** → the item stays unchecked and gains
|
|
1330
|
+
` — in progress (<TICKET>)`.
|
|
1331
|
+
- **Last MR/PR of the work** (the one that `Closes` the ticket, or a single one) → `- [x]` and the
|
|
1332
|
+
annotation becomes ` — done (<TICKET>)`. Every child of a linked milestone is ticked with it;
|
|
1333
|
+
a parent checkbox whose children are now all ticked is ticked too, without annotation.
|
|
1334
|
+
- **Intermediate MRs/PRs of a train** touch nothing: the first one marked the item and the last one
|
|
1335
|
+
closes it, so stacked branches never edit the same line twice.
|
|
1336
|
+
- Write the annotation's words in the file's language. flow recognises its own annotation as a
|
|
1337
|
+
trailing ` — <words> (<ticket>)` and replaces it rather than stacking a second one. The ticket,
|
|
1338
|
+
not the MR/PR url: the edit is committed before the MR/PR exists, and the ticket already leads to
|
|
1339
|
+
it. A ticket-less work writes its slug.
|
|
1340
|
+
- **The item cannot be found** (renamed, moved, deleted since `start`) → do not guess a near match:
|
|
1341
|
+
leave the file alone and say so in the ship's stop. **The file is git-ignored** → there is no MR/PR
|
|
1342
|
+
to carry it: edit it in place in the main checkout at the same moment, and say so.
|
|
1343
|
+
- `roadmap.mark: never` keeps the roadmap read-only — a team document flow only reads.
|
|
1344
|
+
|
|
1345
|
+
Bugs do not link: a bug repairs something already delivered, and the roadmap tracks what is still to
|
|
1346
|
+
deliver. A bug that *is* a roadmap item is started as a feature.
|
|
@@ -97,7 +97,7 @@ this is the same gate as a red test.
|
|
|
97
97
|
|
|
98
98
|
## 5. Close
|
|
99
99
|
|
|
100
|
-
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode except `unattended`, where flow-core §2.1 decides: every failing test also red on the base → its exception advances (the reproduction test lives in a file this diff touches, so it never qualifies); otherwise a repair round of that row — the failing tests become unticked steps of `04-fix.md`'s plan, `phase = fix`, chain into `$flow-bug-fix`, which chains back here; rounds go on while each lowers the red count, three at most, and one that does not, or a third still red → `blocked`, naming the tests still red. The original symptom still reproducible in §2.5 is not a failing test: `blocked`, naming it.
|
|
100
|
+
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode except `unattended`, where flow-core §2.1 decides: every failing test also red on the base → its exception advances (the reproduction test lives in a file this diff touches, so it never qualifies); when every test red in HEAD's three runs is a suspect flake — red once in HEAD's three runs, never on the base, outside the files this diff touches, green on their own — those tests get that row's five more HEAD runs, their counts written in `05-validation.md`, and nothing red in them advances with `unattended:validate-flaky` (the reproduction test never qualifies here either); otherwise a repair round of that row — the failing tests become unticked steps of `04-fix.md`'s plan, `phase = fix`, chain into `$flow-bug-fix`, which chains back here; rounds go on while each lowers the red count, three at most, and one that does not, or a third still red → `blocked`, naming the tests still red. The original symptom still reproducible in §2.5 is not a failing test: `blocked`, naming it.
|
|
101
101
|
- Green → `phase = "validate"`, add to `phases_done`; in the same write record `validated_sha` = `git rev-parse HEAD` — the tree the regression test passed on, which `$flow-bug-ship §0` reads. Suggest `$flow-bug-review`.
|
|
102
102
|
- **Other bugs detected become `followups[]` entries** (flow-core §7) when they clear its bar — a reproducible symptom with someone who suffers it, not «this looks fragile» — per the output template.
|
|
103
103
|
- **Stage what the validation taught** (`knowledge.stage` set; silence by default): a mutation that stayed green, a disguise the scenario wore, a fixture that could not produce the case — findings about how this codebase is tested, not about this diff. Same rule and evidence line as the review's Close.
|
|
@@ -68,7 +68,8 @@ place it would ask:
|
|
|
68
68
|
**In every mode**, criteria `07-validation.md` marks `not-verified-unattended` go into the body under
|
|
69
69
|
`## Not verified — needs a human`, with what to do for each — and so do the tests the suite left red
|
|
70
70
|
because they also fail on the base (`unattended:validate-red-base`): each name, and the base sha
|
|
71
|
-
where it failed too — and the
|
|
71
|
+
where it failed too — and the suspect flakes the run advanced past (`unattended:validate-flaky`), one line each:
|
|
72
|
+
`` `<test>` — intermittent: red 1/3 then 0/5 on HEAD, 0/3 on base `<sha>`; not in a file this change touches `` — and the review findings an orchestrator's answer accepted unfixed
|
|
72
73
|
(`06-review.md` "Answered (unattended)"), one line each. The §3 preview shows that section like
|
|
73
74
|
any other, and the person reading it is the check the run could not do. Entries of
|
|
74
75
|
`auto-answers.md` for this MR/PR (`MR/PR <n>` in their heading, or all of them for a work with no
|
|
@@ -118,6 +119,10 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
|
|
|
118
119
|
- **`linear`**: `Closes <TICKET>` (Linear id, e.g. `ENG-123`) on the completing MR/PR; nothing on intermediates.
|
|
119
120
|
- **`none` / empty**: nothing to link.
|
|
120
121
|
|
|
122
|
+
### Roadmap mark (only with a linked item)
|
|
123
|
+
|
|
124
|
+
`meta.json.roadmap` set and `roadmap.mark` not `never` → decide the edit by flow-core §10, with the same *completes / intermediate* answer as the issue link above: the work's first MR/PR with more to come marks the item in progress, the completing one ticks it (with its children, and any parent left with every child ticked), an intermediate one touches nothing. Find the line by its `item` text with flow's annotation stripped; not found → no edit, and the stop says so. Decide it here, show it in the §3 preview, write it in §4.1 — never before approval.
|
|
125
|
+
|
|
121
126
|
### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
|
|
122
127
|
|
|
123
128
|
When the body mentions **another MR/PR of the delivery plan**, **never write `#<n>`** with `<n>` the plan order from `meta.json.mrs` — GitHub/GitLab auto-link it to whatever issue/PR carries that number (`#5 (closed)`).
|
|
@@ -199,6 +204,7 @@ Squash on merge: <git.squash from FLOW.md>
|
|
|
199
204
|
Target branch: <git.default_base from FLOW.md, or the parent branch in train mode>
|
|
200
205
|
Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "Part of #123 (intermediate train PR)" / "none — Jira links by title prefix">
|
|
201
206
|
Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
|
|
207
|
+
Roadmap: <"<line now>" → "<line after>" / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item)
|
|
202
208
|
|
|
203
209
|
Description:
|
|
204
210
|
<full description rendered exactly as it will appear in the MR/PR>
|
|
@@ -231,6 +237,7 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
|
|
|
231
237
|
Only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
|
|
232
238
|
|
|
233
239
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
240
|
+
- **Roadmap mark approved in §3** → write it into the roadmap file **before** the commit, here in the worktree (a tracked file belongs to the branch, flow-core §0), so it ships in the same commit as the change. A git-ignored roadmap is edited in place in the main checkout instead, and the stop says it travelled in no MR/PR.
|
|
234
241
|
- `commit-push-pr` skill unavailable → commit and push manually and create the MR/PR with the `git.cli` CLI from `FLOW.md` — always with the content confirmed in §3.
|
|
235
242
|
|
|
236
243
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh the panel (flow-core §4) right here, before §4.2 and before anything else can fail.
|
|
@@ -155,6 +155,10 @@ While reading the ticket (§2), look for a **published contract block** (what `$
|
|
|
155
155
|
|
|
156
156
|
Another repo referenced but **no** contract → say so in one line — *"the `<repo>` side is referenced but no contract was published; the literal shapes will have to be confirmed with that side, not assumed"* — and record it in `01-context.md` under the same heading. **Silent by default**: no cross-repo signal → skip this section, no note.
|
|
157
157
|
|
|
158
|
+
## 3.7 Roadmap item
|
|
159
|
+
|
|
160
|
+
Only when the repo has a roadmap (flow-core §10) and `roadmap.path` is not `none`: link this work to the item it delivers, by §10's rule. A clear match — the item names this ticket's id, or its text is this ticket's title (a ticket-less start drafted from a roadmap item is one) — is taken in every mode, with no question. Otherwise `manual` asks once (header "Roadmap"): the next two or three unchecked items of the current phase, **none** as the last option; `guided`/`auto`/`unattended` record `null` and say in one line that the work is not linked. Never create, rename or reorder an item here: start reads the roadmap, `ship` is the only command that writes it.
|
|
161
|
+
|
|
158
162
|
## 4. Classify size
|
|
159
163
|
|
|
160
164
|
Propose a size. **`manual`** → confirm with one `AskUserQuestion`. **`guided`/`auto` → do not ask**: record your estimate in `01-context.md` with a one-line reason and continue — the size is a route, not a commitment; `$flow-feat-design §1.5.5`, `§7` and `$flow-feat-plan §5` reclassify.
|
|
@@ -250,6 +254,7 @@ Create the work directory where flow-core §0 puts a new one (the main checkout,
|
|
|
250
254
|
"draft_from_conversation": false,
|
|
251
255
|
"tracker_issue": null,
|
|
252
256
|
"related_repos": [],
|
|
257
|
+
"roadmap": null,
|
|
253
258
|
"started_at": "<ISO8601 now>",
|
|
254
259
|
"updated_at": "<ISO8601 now>",
|
|
255
260
|
"notes": ""
|
|
@@ -259,6 +264,7 @@ Create the work directory where flow-core §0 puts a new one (the main checkout,
|
|
|
259
264
|
- `handoff` — `true` only when `--study` was given and `git.handoff_branch` is set; omit it otherwise.
|
|
260
265
|
- Ticket-less (§2.5) → `draft_from_conversation: true`, `tracker_issue` = created issue id/url (or `null` if local-only). Ticket mode → defaults above.
|
|
261
266
|
- `base` — `unattended` only: the ticket's `base`, or `git.default_base` when it is empty — never empty (the branch every MR/PR of this work starts from and targets; `$flow-work-run` refreshes it on `merged`). Omit it in every other mode.
|
|
267
|
+
- `roadmap` from §3.7 — `{ "path", "item", "under" }` (flow-core §10), or `null` with no roadmap or no link.
|
|
262
268
|
- `related_repos` from §3.5 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo; `[]` for a single-repo task.
|
|
263
269
|
- **This work *is* an accepted follow-up** (the ticket came from another work's `followups[]`, flow-core §7) → set `origin: { "work": "<originating work dir>", "followup": "F<n>" }`, carry that entry's recorded `why` into `01-context.md` verbatim instead of re-deriving it, and set the originating entry to `in_progress` with `work` naming this folder. Not a follow-up → omit `origin` entirely.
|
|
264
270
|
|
|
@@ -233,7 +233,10 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
233
233
|
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
234
234
|
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
235
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
|
|
236
|
-
exception — it is a red suite.
|
|
236
|
+
exception — it is a red suite. Tests red once in HEAD's three runs, never on the base, outside the
|
|
237
|
+
files this diff touches, green on their own and proving no criterion are suspect flakes: when every test red in HEAD's three runs is one,
|
|
238
|
+
five more whole-suite runs on HEAD decide — nothing red in them → `unattended:validate-flaky`, the
|
|
239
|
+
counts under "Suite results", and the phase advances. Short of it, the red suite gets a repair round (the same row):
|
|
237
240
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
238
241
|
chains into `$flow-feat-build`, then review and this phase again. Rounds go on while each lowers
|
|
239
242
|
the red count, three at most; one that does not, or a third still red → `blocked`, naming the
|
|
@@ -81,6 +81,8 @@ Run, deduce, show what was found for confirmation or correction:
|
|
|
81
81
|
|
|
82
82
|
<!-- stack-detection:end -->
|
|
83
83
|
|
|
84
|
+
- **Roadmap** (`roadmap.path`, flow-core §10) — a markdown file at the root or under `docs/` with headings and checkbox lines whose name or title says plan, roadmap, phases or milestones, in any language. `ROADMAP.md` or `docs/ROADMAP.md` → nothing to write, it is found by default. Any other → propose its path. Several → ask which one is the project's plan. None → leave the section out.
|
|
85
|
+
|
|
84
86
|
## 3. Ask five things
|
|
85
87
|
|
|
86
88
|
Everything §2 detected is shown **in one screen** for confirmation or correction — host, base
|
|
@@ -32,6 +32,7 @@ runs a phase on its own and never advances `meta.json`.
|
|
|
32
32
|
3. Those work folders — how many open works, in which worktree each is checked out (`git worktree list`), and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
|
|
33
33
|
3b. `followups[]` across those works **and** their `_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
|
|
34
34
|
4. Is the working tree dirty (`git status --porcelain`)?
|
|
35
|
+
5. The roadmap, if the repo has one (flow-core §10): where the project stands — current phase, what is in progress, the next unstarted item.
|
|
35
36
|
|
|
36
37
|
## 2. Route
|
|
37
38
|
|
|
@@ -41,9 +42,11 @@ runs a phase on its own and never advances `meta.json`.
|
|
|
41
42
|
| A work matches the current branch | Its stop header (flow-core §3: ticket · size · phase · MR #n of N) and the next phase for its size. | `$flow-work-resume` |
|
|
42
43
|
| No match, but open works exist | Count, and the two most recently updated with their phase — and the worktree each lives in, so the answer to "where were we" is a `cd`. | `$flow-work-daily`, or `$flow-feat-start` / `$flow-bug-start` if the user said what they want to do |
|
|
43
44
|
| No works at all, but an accepted follow-up is waiting | "Nothing in flight — but `<TICKET>` F1 was accepted and never started: `<title>`." | `$flow-feat-start <ticket>` (or `$flow-bug-start`) for that follow-up · `$flow-feat-start` for something else |
|
|
45
|
+
| No works at all, but the roadmap has a next item | "Nothing in flight. Roadmap: `<phase> › <milestone>` — next: `<item>`." | `$flow-feat-start <id>` when the item names a ticket, else `$flow-feat-start` with the item as the draft · `$flow-feat-start` for something else |
|
|
44
46
|
| No works at all | "Nothing in flight." | `$flow-feat-start <TICKET>` (or with no ticket, from the conversation) · `$flow-bug-start <TICKET>` |
|
|
45
47
|
|
|
46
48
|
- The SessionStart hook (`hooks/session-start.sh`) has already printed the first two rows of this table's second case — the header and what the last session was doing — off disk, without reading a ticket or an artifact. Say them again anyway: `next` is where the user asked, and a line they scrolled past is not an answer.
|
|
49
|
+
- A roadmap exists → its one line (flow-core §10) goes under the situation in every row but the first: the work in front of you is one step of it, and that line is what "where are we" means for the project.
|
|
47
50
|
- An `accepted` follow-up exists **and** other works are open → do not reroute; add one line naming it after the options. It is a standing commitment, not an interruption.
|
|
48
51
|
- Dirty tree and no matching work → mention it in one line ("uncommitted changes on `<branch>`, no work is tracking them") before the options; `start` will warn again.
|
|
49
52
|
- A FLOW layer is present but `$flow-doctor` has never been run in this session and the
|
|
@@ -121,6 +121,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
121
121
|
"related_repos": [
|
|
122
122
|
{ "repo": "sibling-project", "scope": "what's needed there", "status": "pending" | "in_progress" | "done", "contract_handoff": "none" | "pending" | "published → <location>" }
|
|
123
123
|
],
|
|
124
|
+
"roadmap": { "path": "ROADMAP.md", "item": "the checkbox line's text", "under": "Phase 2 › Milestone 2.3" } | null,
|
|
124
125
|
"followups": [
|
|
125
126
|
{ "id": "F1",
|
|
126
127
|
"kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
|
|
@@ -165,6 +166,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
165
166
|
- **`review_findings[]`**: one entry per finding **per source** — `{ round, origin, severity, file, discarded_by_skeptic }`, no finding text (that stays in `06-review.md`). Written at `review`'s Close, and by `flow review --record` when the CLI ran the panel. `origin` is `built-in`, a panel role, or the pass that raised it. It exists so a pass can be retired on evidence: `flow cost` reports per origin how many findings each contributed, how many **only** it raised, and how many of those survived §6 — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no exclusive surviving finding across twenty reviews and the pass comes out of the command.
|
|
166
167
|
Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
|
|
167
168
|
- **`respond_rounds`**: rounds of `$flow-work-respond` on an MR/PR. `$flow-work-respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
|
|
169
|
+
- **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `$flow-feat-start §3.7`, marked in progress / ticked by `$flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume`. `null` with no roadmap, no link, or a bug.
|
|
168
170
|
- **`related_repos`**: the **other repos a task touches**. Captured at `$flow-feat-start` / `$flow-bug-start` §cross-repo, refined at `design`/`plan`, reminded at `ship`, shown by `daily`/`resume`/`status`. flow only notes and reminds — never touches the other repo. `[]` for single-repo.
|
|
169
171
|
- **`ticket_deps`**: the **other tickets this study cannot be built without** — something the design needs that is not on the base branch and that another ticket brings (`$flow-feat-design` §5.1, `$flow-bug-investigate` §4.1). Read at the two exits of a study: `$flow-work-handoff` §5 writes a `Depends on <ticket>` line per entry into the ticket body, and an unattended study run passes `--depends-on N` per entry on its `done` (flow-core §2.1). Not `mrs[].depends_on`, which orders this work's own MRs/PRs. Written whole each time `design` (or `investigate`) runs, and removed when an unattended study is rewound. `[]` or absent when the study depends on nothing.
|
|
170
172
|
- **`contract_handoff`**: whether the sibling knows **what shape to build against** (`scope` is prose; distinct from `status`). `none` — consumes no contract declared here. `pending` — consumes one, not handed over yet. `published → <location>` — published where that side reads it (normally the tracker ticket; `$flow-feat-ship` §6.3), picked up by the sibling's `$flow-feat-start` §3.6.
|
|
@@ -49,6 +49,7 @@ Every *mine* below — your MRs/PRs, your threads, your tickets — is the **aut
|
|
|
49
49
|
- Repo pulse: `git log --oneline --since="<last-session boundary>"` (fallback `-10`) and `git status --short` for uncommitted changes.
|
|
50
50
|
- Per work: `phase`, `phases_done`, MRs and their `status` (from `meta.json.mrs`), and what was **left pending**.
|
|
51
51
|
- **Cross-repo parts**: `meta.json.related_repos` entries not `done` → a *sibling repo* still needs work. Surface only what is recorded — never scan or open the other repo.
|
|
52
|
+
- **Roadmap** (flow-core §10): where the project stands, and which open work delivers which item. An unchecked item no open work links, ahead of the in-progress ones, is what to pick up next.
|
|
52
53
|
- **Open follow-ups**: `followups[]` entries not `declined`/`logged`/`done`, from the live works **and** from `_archive/*/meta.json` (flow-core §7). The archive is read for this and nothing else — a finished work is exactly when its deferred items stop being visible.
|
|
53
54
|
- **Measured cost**: `meta.json.cost[]` entries (flow-core §4) — sum the `usd` there, count the phases behind them, count apart the entries whose `source` is `not reported`. No entries → no figure at all: absence is not zero. The figures are the harness's client-side estimates, not a bill; `flow cost` prints them phase by phase.
|
|
54
55
|
|
|
@@ -121,6 +122,7 @@ The briefing's reference section: every open work, compact, most recently update
|
|
|
121
122
|
Cross-repo: <repo>: <scope> — contract not handed over (only if any)
|
|
122
123
|
Follow-ups: 2 awaiting a decision · 1 accepted, not started (only if any)
|
|
123
124
|
Cost: $0.71 measured over 2 phases · 1 phase not reported (only if any)
|
|
125
|
+
Roadmap: <phase › item it delivers> (only if linked)
|
|
124
126
|
Next: <the concrete next command>
|
|
125
127
|
```
|
|
126
128
|
|
|
@@ -141,6 +143,9 @@ Yesterday / last session
|
|
|
141
143
|
Today
|
|
142
144
|
<what to resume + what the forge/tracker asks of you, ordered by urgency>
|
|
143
145
|
|
|
146
|
+
Roadmap (only with one)
|
|
147
|
+
<phase › milestone — done/total · in progress: item (work) · next: item>
|
|
148
|
+
|
|
144
149
|
Blockers / attention
|
|
145
150
|
<CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · divergences · raised priorities — or "none">
|
|
146
151
|
|
|
@@ -48,6 +48,7 @@ Waves: Wave 1: #1 ∥ #2 → Wave 2: #3 → Wave 3: #4 ∥ #5 (lin
|
|
|
48
48
|
Last updated: <updated_at>
|
|
49
49
|
Notes: <meta.notes>
|
|
50
50
|
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
|
|
51
|
+
Roadmap: <meta.roadmap: "under › item" — and the project's one line, flow-core §10> (line only with a roadmap)
|
|
51
52
|
Ticket thread: <new since <updated_at>: <n> comment(s) that change the work — detailed below · or "nothing new" · or "not read"> (line only in ticket mode, from §2.5)
|
|
52
53
|
Unattended: <from `meta.json.pending` when it is set: the gate, `resume` and the question file's first line — the orchestrator holds the question and will relaunch with its answer> (line only when `pending` is set)
|
|
53
54
|
```
|
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.104.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
|
|
@@ -425,7 +425,7 @@ person asking for changes, a ticket that already has code — is `/flow:work:run
|
|
|
425
425
|
| 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) |
|
|
426
426
|
| `review` with blockers or high-severity findings | question `high_findings` |
|
|
427
427
|
| `validate` with a criterion `unproven` | blocked — the phase does not advance and does not chain |
|
|
428
|
-
| `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-
|
|
428
|
+
| `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: 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". Green on the base and red on HEAD, even once in three → this diff made it, whatever a single base run said (a suspect flake, below, gets five more runs first); 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. **A suspect flake is measured again before it is blamed**: a test red in exactly one of HEAD's three runs (the run that first went red is not one of them), in none of the base's, in a file this diff does not touch, green when run on its own, and not the test that proves an acceptance criterion. When at least one test is red in HEAD's three runs and every such test is one, run the whole suite five more times on HEAD — not on the base, whose three runs already said 0 — and write each run's red tests and the suspects' durations. Nothing red in any of the five → record `{"key":"unattended:validate-flaky","default":"<test name>: red 1/3 then 0/5 on HEAD, 0/3 on base <short sha>","phase":"validate"}` per test and advance; `ship` lists them under "Not verified — needs a human". Anything red in the five, or a red test that is not a suspect → this diff made it, and the repair rounds below follow: every red test, suspects included, goes to the repair rounds and counts in their `<n>`. The five runs are only ever more runs: a test is never rerun alone in their place, retried, skipped or loosened. Short of the exception and of a flake that held, **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 |
|
|
429
429
|
| A product decision (§7 `decision`) | question `decision` |
|
|
430
430
|
| 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` |
|
|
431
431
|
| An unanswered high-severity challenge (`design`, `investigate`) | question `design_challenge` / `investigation_challenge` |
|
|
@@ -1286,3 +1286,60 @@ estimate meeting a good change.
|
|
|
1286
1286
|
**It travels into every brief.** A subagent handed a size or a `lines_est` is handed a thermometer,
|
|
1287
1287
|
never a budget, and the brief says so (§6). An agent optimising for a number nobody told it was
|
|
1288
1288
|
advisory is the one that returns tidier, shorter, worse code — and it returns it looking finished.
|
|
1289
|
+
|
|
1290
|
+
## 10. Roadmap — the phases and milestones above the ticket
|
|
1291
|
+
|
|
1292
|
+
A ticket is the largest thing a work knows about: it splits into MRs/PRs (`04-mr-plan.md`), and
|
|
1293
|
+
nothing sits above it. A project that is being built in phases usually keeps that plan in a markdown
|
|
1294
|
+
file — phases, milestones, sub-milestones, tasks with checkboxes — and without this section no
|
|
1295
|
+
command reads it unless told to, `next` cannot say where the project stands, and nobody ticks off
|
|
1296
|
+
what an MR/PR delivered.
|
|
1297
|
+
|
|
1298
|
+
**The file.** `roadmap.path` in `FLOW.md`; `none` turns the whole section off. Empty → `ROADMAP.md`
|
|
1299
|
+
at the repo root, then `docs/ROADMAP.md`, and either counts only if it holds at least one checkbox
|
|
1300
|
+
line (`- [ ]` / `- [x]`). Nothing found → there is no roadmap, and every command below behaves as
|
|
1301
|
+
before, silently. A tracked file is read **here** (it is this branch's version); a git-ignored one
|
|
1302
|
+
from the main checkout, by §0's rule.
|
|
1303
|
+
|
|
1304
|
+
**Its shape is the author's, not flow's.** Headings are phases and milestones, at whatever depth the
|
|
1305
|
+
file uses; a checkbox line is a task; a checkbox line with checkbox children is a milestone made of
|
|
1306
|
+
those children. flow never rewrites the structure, renumbers, reorders or adds headings — it touches
|
|
1307
|
+
exactly two things: a checkbox, and a short annotation at the end of the line it ticks.
|
|
1308
|
+
|
|
1309
|
+
**Where the project stands** — computed the same way by `next`, `daily` and `resume`:
|
|
1310
|
+
- **Current phase**: the first heading, in file order, that still holds an unchecked item.
|
|
1311
|
+
- **In progress**: unchecked items an open work links (below), or that carry flow's in-progress
|
|
1312
|
+
annotation.
|
|
1313
|
+
- **Next**: the first unchecked item of the current phase that is neither — a leaf, not a milestone
|
|
1314
|
+
whose children are listed.
|
|
1315
|
+
- Said in one line: `Roadmap: <phase> › <milestone> — <done>/<total> · in progress: <item> (<work>) ·
|
|
1316
|
+
next: <item>`. Counts are the checkboxes under the current phase. All done → `Roadmap: complete`.
|
|
1317
|
+
|
|
1318
|
+
**The link.** A work records the item it delivers in `meta.json.roadmap`:
|
|
1319
|
+
`{ "path": "<file>", "item": "<the line's text, without checkbox or annotation>", "under": "<heading › heading>" }`
|
|
1320
|
+
— or `null`. `/flow:feat:start` sets it: an item the ticket clearly names (its id, or its title
|
|
1321
|
+
matching the item's text) is taken in every mode; otherwise `manual` asks once, offering the next
|
|
1322
|
+
unchecked items and *none*, and `guided`/`auto`/`unattended` record `null` and say so in one line. A
|
|
1323
|
+
work is linked to one item, at any depth: linking a milestone means the work delivers all its
|
|
1324
|
+
children.
|
|
1325
|
+
|
|
1326
|
+
**The mark — in the MR/PR, so the roadmap moves with the code and is reviewed with it.** `/flow:feat:ship`
|
|
1327
|
+
edits the file in the same commit as the change, and the preview shows the line it will become:
|
|
1328
|
+
- **First MR/PR of the work, more to come** → the item stays unchecked and gains
|
|
1329
|
+
` — in progress (<TICKET>)`.
|
|
1330
|
+
- **Last MR/PR of the work** (the one that `Closes` the ticket, or a single one) → `- [x]` and the
|
|
1331
|
+
annotation becomes ` — done (<TICKET>)`. Every child of a linked milestone is ticked with it;
|
|
1332
|
+
a parent checkbox whose children are now all ticked is ticked too, without annotation.
|
|
1333
|
+
- **Intermediate MRs/PRs of a train** touch nothing: the first one marked the item and the last one
|
|
1334
|
+
closes it, so stacked branches never edit the same line twice.
|
|
1335
|
+
- Write the annotation's words in the file's language. flow recognises its own annotation as a
|
|
1336
|
+
trailing ` — <words> (<ticket>)` and replaces it rather than stacking a second one. The ticket,
|
|
1337
|
+
not the MR/PR url: the edit is committed before the MR/PR exists, and the ticket already leads to
|
|
1338
|
+
it. A ticket-less work writes its slug.
|
|
1339
|
+
- **The item cannot be found** (renamed, moved, deleted since `start`) → do not guess a near match:
|
|
1340
|
+
leave the file alone and say so in the ship's stop. **The file is git-ignored** → there is no MR/PR
|
|
1341
|
+
to carry it: edit it in place in the main checkout at the same moment, and say so.
|
|
1342
|
+
- `roadmap.mark: never` keeps the roadmap read-only — a team document flow only reads.
|
|
1343
|
+
|
|
1344
|
+
Bugs do not link: a bug repairs something already delivered, and the roadmap tracks what is still to
|
|
1345
|
+
deliver. A bug that *is* a roadmap item is started as a feature.
|
|
@@ -93,7 +93,7 @@ this is the same gate as a red test.
|
|
|
93
93
|
|
|
94
94
|
## 5. Close
|
|
95
95
|
|
|
96
|
-
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode except `unattended`, where flow-core §2.1 decides: every failing test also red on the base → its exception advances (the reproduction test lives in a file this diff touches, so it never qualifies); otherwise a repair round of that row — the failing tests become unticked steps of `04-fix.md`'s plan, `phase = fix`, chain into `/flow:bug:fix`, which chains back here; rounds go on while each lowers the red count, three at most, and one that does not, or a third still red → `blocked`, naming the tests still red. The original symptom still reproducible in §2.5 is not a failing test: `blocked`, naming it.
|
|
96
|
+
- Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode except `unattended`, where flow-core §2.1 decides: every failing test also red on the base → its exception advances (the reproduction test lives in a file this diff touches, so it never qualifies); when every test red in HEAD's three runs is a suspect flake — red once in HEAD's three runs, never on the base, outside the files this diff touches, green on their own — those tests get that row's five more HEAD runs, their counts written in `05-validation.md`, and nothing red in them advances with `unattended:validate-flaky` (the reproduction test never qualifies here either); otherwise a repair round of that row — the failing tests become unticked steps of `04-fix.md`'s plan, `phase = fix`, chain into `/flow:bug:fix`, which chains back here; rounds go on while each lowers the red count, three at most, and one that does not, or a third still red → `blocked`, naming the tests still red. The original symptom still reproducible in §2.5 is not a failing test: `blocked`, naming it.
|
|
97
97
|
- Green → `phase = "validate"`, add to `phases_done`; in the same write record `validated_sha` = `git rev-parse HEAD` — the tree the regression test passed on, which `/flow:bug:ship §0` reads. Suggest `/flow:bug:review`.
|
|
98
98
|
- **Other bugs detected become `followups[]` entries** (flow-core §7) when they clear its bar — a reproducible symptom with someone who suffers it, not «this looks fragile» — per the output template.
|
|
99
99
|
- **Stage what the validation taught** (`knowledge.stage` set; silence by default): a mutation that stayed green, a disguise the scenario wore, a fixture that could not produce the case — findings about how this codebase is tested, not about this diff. Same rule and evidence line as the review's Close.
|
|
@@ -64,7 +64,8 @@ place it would ask:
|
|
|
64
64
|
**In every mode**, criteria `07-validation.md` marks `not-verified-unattended` go into the body under
|
|
65
65
|
`## Not verified — needs a human`, with what to do for each — and so do the tests the suite left red
|
|
66
66
|
because they also fail on the base (`unattended:validate-red-base`): each name, and the base sha
|
|
67
|
-
where it failed too — and the
|
|
67
|
+
where it failed too — and the suspect flakes the run advanced past (`unattended:validate-flaky`), one line each:
|
|
68
|
+
`` `<test>` — intermittent: red 1/3 then 0/5 on HEAD, 0/3 on base `<sha>`; not in a file this change touches `` — and the review findings an orchestrator's answer accepted unfixed
|
|
68
69
|
(`06-review.md` "Answered (unattended)"), one line each. The §3 preview shows that section like
|
|
69
70
|
any other, and the person reading it is the check the run could not do. Entries of
|
|
70
71
|
`auto-answers.md` for this MR/PR (`MR/PR <n>` in their heading, or all of them for a work with no
|
|
@@ -114,6 +115,10 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
|
|
|
114
115
|
- **`linear`**: `Closes <TICKET>` (Linear id, e.g. `ENG-123`) on the completing MR/PR; nothing on intermediates.
|
|
115
116
|
- **`none` / empty**: nothing to link.
|
|
116
117
|
|
|
118
|
+
### Roadmap mark (only with a linked item)
|
|
119
|
+
|
|
120
|
+
`meta.json.roadmap` set and `roadmap.mark` not `never` → decide the edit by flow-core §10, with the same *completes / intermediate* answer as the issue link above: the work's first MR/PR with more to come marks the item in progress, the completing one ticks it (with its children, and any parent left with every child ticked), an intermediate one touches nothing. Find the line by its `item` text with flow's annotation stripped; not found → no edit, and the stop says so. Decide it here, show it in the §3 preview, write it in §4.1 — never before approval.
|
|
121
|
+
|
|
117
122
|
### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
|
|
118
123
|
|
|
119
124
|
When the body mentions **another MR/PR of the delivery plan**, **never write `#<n>`** with `<n>` the plan order from `meta.json.mrs` — GitHub/GitLab auto-link it to whatever issue/PR carries that number (`#5 (closed)`).
|
|
@@ -195,6 +200,7 @@ Squash on merge: <git.squash from FLOW.md>
|
|
|
195
200
|
Target branch: <git.default_base from FLOW.md, or the parent branch in train mode>
|
|
196
201
|
Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "Part of #123 (intermediate train PR)" / "none — Jira links by title prefix">
|
|
197
202
|
Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
|
|
203
|
+
Roadmap: <"<line now>" → "<line after>" / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item)
|
|
198
204
|
|
|
199
205
|
Description:
|
|
200
206
|
<full description rendered exactly as it will appear in the MR/PR>
|
|
@@ -227,6 +233,7 @@ git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null # must NOT be
|
|
|
227
233
|
Only here — with the content approved in §3 — invoke `Skill commit-commands:commit-push-pr` passing **the final title and description**. The skill must not re-ask for the content; if it does, answer with what was confirmed. Any push it does must be `git push -u origin HEAD` (own branch), never to the base branch.
|
|
228
234
|
|
|
229
235
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
236
|
+
- **Roadmap mark approved in §3** → write it into the roadmap file **before** the commit, here in the worktree (a tracked file belongs to the branch, flow-core §0), so it ships in the same commit as the change. A git-ignored roadmap is edited in place in the main checkout instead, and the stop says it travelled in no MR/PR.
|
|
230
237
|
- `commit-push-pr` skill unavailable → commit and push manually and create the MR/PR with the `git.cli` CLI from `FLOW.md` — always with the content confirmed in §3.
|
|
231
238
|
|
|
232
239
|
**Record the URL the moment it exists**: write it into this MR/PR's `meta.json.mrs` entry and refresh the panel (flow-core §4) right here, before §4.2 and before anything else can fail.
|
|
@@ -151,6 +151,10 @@ While reading the ticket (§2), look for a **published contract block** (what `/
|
|
|
151
151
|
|
|
152
152
|
Another repo referenced but **no** contract → say so in one line — *"the `<repo>` side is referenced but no contract was published; the literal shapes will have to be confirmed with that side, not assumed"* — and record it in `01-context.md` under the same heading. **Silent by default**: no cross-repo signal → skip this section, no note.
|
|
153
153
|
|
|
154
|
+
## 3.7 Roadmap item
|
|
155
|
+
|
|
156
|
+
Only when the repo has a roadmap (flow-core §10) and `roadmap.path` is not `none`: link this work to the item it delivers, by §10's rule. A clear match — the item names this ticket's id, or its text is this ticket's title (a ticket-less start drafted from a roadmap item is one) — is taken in every mode, with no question. Otherwise `manual` asks once (header "Roadmap"): the next two or three unchecked items of the current phase, **none** as the last option; `guided`/`auto`/`unattended` record `null` and say in one line that the work is not linked. Never create, rename or reorder an item here: start reads the roadmap, `ship` is the only command that writes it.
|
|
157
|
+
|
|
154
158
|
## 4. Classify size
|
|
155
159
|
|
|
156
160
|
Propose a size. **`manual`** → confirm with one `AskUserQuestion`. **`guided`/`auto` → do not ask**: record your estimate in `01-context.md` with a one-line reason and continue — the size is a route, not a commitment; `/flow:feat:design §1.5.5`, `§7` and `/flow:feat:plan §5` reclassify.
|
|
@@ -246,6 +250,7 @@ Create the work directory where flow-core §0 puts a new one (the main checkout,
|
|
|
246
250
|
"draft_from_conversation": false,
|
|
247
251
|
"tracker_issue": null,
|
|
248
252
|
"related_repos": [],
|
|
253
|
+
"roadmap": null,
|
|
249
254
|
"started_at": "<ISO8601 now>",
|
|
250
255
|
"updated_at": "<ISO8601 now>",
|
|
251
256
|
"notes": ""
|
|
@@ -255,6 +260,7 @@ Create the work directory where flow-core §0 puts a new one (the main checkout,
|
|
|
255
260
|
- `handoff` — `true` only when `--study` was given and `git.handoff_branch` is set; omit it otherwise.
|
|
256
261
|
- Ticket-less (§2.5) → `draft_from_conversation: true`, `tracker_issue` = created issue id/url (or `null` if local-only). Ticket mode → defaults above.
|
|
257
262
|
- `base` — `unattended` only: the ticket's `base`, or `git.default_base` when it is empty — never empty (the branch every MR/PR of this work starts from and targets; `/flow:work:run` refreshes it on `merged`). Omit it in every other mode.
|
|
263
|
+
- `roadmap` from §3.7 — `{ "path", "item", "under" }` (flow-core §10), or `null` with no roadmap or no link.
|
|
258
264
|
- `related_repos` from §3.5 — one `{ "repo": "<name>", "scope": "<one line>", "status": "pending", "contract_handoff": "pending" | "none" }` per *other* repo; `[]` for a single-repo task.
|
|
259
265
|
- **This work *is* an accepted follow-up** (the ticket came from another work's `followups[]`, flow-core §7) → set `origin: { "work": "<originating work dir>", "followup": "F<n>" }`, carry that entry's recorded `why` into `01-context.md` verbatim instead of re-deriving it, and set the originating entry to `in_progress` with `work` naming this folder. Not a follow-up → omit `origin` entirely.
|
|
260
266
|
|
|
@@ -229,7 +229,10 @@ Write `.claude/work/<TICKET>/07-validation.md`:
|
|
|
229
229
|
failing tests on the base the way they went red on HEAD — the whole suite, three runs on each side
|
|
230
230
|
for a test that is red in the suite and green on its own — and write each name, its result there,
|
|
231
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
|
|
232
|
-
exception — it is a red suite.
|
|
232
|
+
exception — it is a red suite. Tests red once in HEAD's three runs, never on the base, outside the
|
|
233
|
+
files this diff touches, green on their own and proving no criterion are suspect flakes: when every test red in HEAD's three runs is one,
|
|
234
|
+
five more whole-suite runs on HEAD decide — nothing red in them → `unattended:validate-flaky`, the
|
|
235
|
+
counts under "Suite results", and the phase advances. Short of it, the red suite gets a repair round (the same row):
|
|
233
236
|
the failing tests become unticked steps of this MR/PR's plan, `phase = build`, and the run
|
|
234
237
|
chains into `/flow:feat:build`, then review and this phase again. Rounds go on while each lowers
|
|
235
238
|
the red count, three at most; one that does not, or a third still red → `blocked`, naming the
|
|
@@ -77,6 +77,8 @@ Run, deduce, show what was found for confirmation or correction:
|
|
|
77
77
|
|
|
78
78
|
<!-- stack-detection:end -->
|
|
79
79
|
|
|
80
|
+
- **Roadmap** (`roadmap.path`, flow-core §10) — a markdown file at the root or under `docs/` with headings and checkbox lines whose name or title says plan, roadmap, phases or milestones, in any language. `ROADMAP.md` or `docs/ROADMAP.md` → nothing to write, it is found by default. Any other → propose its path. Several → ask which one is the project's plan. None → leave the section out.
|
|
81
|
+
|
|
80
82
|
## 3. Ask five things
|
|
81
83
|
|
|
82
84
|
Everything §2 detected is shown **in one screen** for confirmation or correction — host, base
|
|
@@ -28,6 +28,7 @@ runs a phase on its own and never advances `meta.json`.
|
|
|
28
28
|
3. Those work folders — how many open works, in which worktree each is checked out (`git worktree list`), and their `phase` (from `meta.json`; read `00-summary.md` when present, never the full artifacts).
|
|
29
29
|
3b. `followups[]` across those works **and** their `_archive/*/meta.json`: any entry `accepted` with no `work` started (flow-core §7).
|
|
30
30
|
4. Is the working tree dirty (`git status --porcelain`)?
|
|
31
|
+
5. The roadmap, if the repo has one (flow-core §10): where the project stands — current phase, what is in progress, the next unstarted item.
|
|
31
32
|
|
|
32
33
|
## 2. Route
|
|
33
34
|
|
|
@@ -37,9 +38,11 @@ runs a phase on its own and never advances `meta.json`.
|
|
|
37
38
|
| A work matches the current branch | Its stop header (flow-core §3: ticket · size · phase · MR #n of N) and the next phase for its size. | `/flow:work:resume` |
|
|
38
39
|
| No match, but open works exist | Count, and the two most recently updated with their phase — and the worktree each lives in, so the answer to "where were we" is a `cd`. | `/flow:work:daily`, or `/flow:feat:start` / `/flow:bug:start` if the user said what they want to do |
|
|
39
40
|
| No works at all, but an accepted follow-up is waiting | "Nothing in flight — but `<TICKET>` F1 was accepted and never started: `<title>`." | `/flow:feat:start <ticket>` (or `/flow:bug:start`) for that follow-up · `/flow:feat:start` for something else |
|
|
41
|
+
| No works at all, but the roadmap has a next item | "Nothing in flight. Roadmap: `<phase> › <milestone>` — next: `<item>`." | `/flow:feat:start <id>` when the item names a ticket, else `/flow:feat:start` with the item as the draft · `/flow:feat:start` for something else |
|
|
40
42
|
| No works at all | "Nothing in flight." | `/flow:feat:start <TICKET>` (or with no ticket, from the conversation) · `/flow:bug:start <TICKET>` |
|
|
41
43
|
|
|
42
44
|
- The SessionStart hook (`hooks/session-start.sh`) has already printed the first two rows of this table's second case — the header and what the last session was doing — off disk, without reading a ticket or an artifact. Say them again anyway: `next` is where the user asked, and a line they scrolled past is not an answer.
|
|
45
|
+
- A roadmap exists → its one line (flow-core §10) goes under the situation in every row but the first: the work in front of you is one step of it, and that line is what "where are we" means for the project.
|
|
43
46
|
- An `accepted` follow-up exists **and** other works are open → do not reroute; add one line naming it after the options. It is a standing commitment, not an interruption.
|
|
44
47
|
- Dirty tree and no matching work → mention it in one line ("uncommitted changes on `<branch>`, no work is tracking them") before the options; `start` will warn again.
|
|
45
48
|
- A FLOW layer is present but `/flow:doctor` has never been run in this session and the
|
|
@@ -117,6 +117,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
117
117
|
"related_repos": [
|
|
118
118
|
{ "repo": "sibling-project", "scope": "what's needed there", "status": "pending" | "in_progress" | "done", "contract_handoff": "none" | "pending" | "published → <location>" }
|
|
119
119
|
],
|
|
120
|
+
"roadmap": { "path": "ROADMAP.md", "item": "the checkbox line's text", "under": "Phase 2 › Milestone 2.3" } | null,
|
|
120
121
|
"followups": [
|
|
121
122
|
{ "id": "F1",
|
|
122
123
|
"kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
|
|
@@ -161,6 +162,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
161
162
|
- **`review_findings[]`**: one entry per finding **per source** — `{ round, origin, severity, file, discarded_by_skeptic }`, no finding text (that stays in `06-review.md`). Written at `review`'s Close, and by `flow review --record` when the CLI ran the panel. `origin` is `built-in`, a panel role, or the pass that raised it. It exists so a pass can be retired on evidence: `flow cost` reports per origin how many findings each contributed, how many **only** it raised, and how many of those survived §6 — and a finding three sources raised says nothing about any of them, which is why dedup keeps every source rather than the first. The rule was written down before the data arrived: no exclusive surviving finding across twenty reviews and the pass comes out of the command.
|
|
162
163
|
Two fields for the review because they are two facts. `reviewed_sha` used to be `git rev-parse HEAD` at the end of the phase, which by then held the round's own fixes — so `ship` compared a sha against itself and reported a match over code no reviewer had read. Read by `ship` at pre-flight against `HEAD`: a delta of test files and this work's own folder passes with a note in `06-review.md`; anything else stops and asks in every autonomy mode. Empty is not a mismatch; `fixed_sha` set with `reviewed_sha == HEAD` is one. `review` also reads `reviewed_sha` back as **its own base** on a re-review, so the second round reads the delta instead of the whole branch.
|
|
163
164
|
- **`respond_rounds`**: rounds of `/flow:work:respond` on an MR/PR. `/flow:work:respond §1` reads it against `quality.respond_max_rounds` (empty = 3) and refuses the round that would exceed it, handing the open threads back to the user.
|
|
165
|
+
- **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow:feat:start §3.7`, marked in progress / ticked by `/flow:feat:ship` inside the MR/PR, shown by `next`/`daily`/`resume`. `null` with no roadmap, no link, or a bug.
|
|
164
166
|
- **`related_repos`**: the **other repos a task touches**. Captured at `/flow:feat:start` / `/flow:bug:start` §cross-repo, refined at `design`/`plan`, reminded at `ship`, shown by `daily`/`resume`/`status`. flow only notes and reminds — never touches the other repo. `[]` for single-repo.
|
|
165
167
|
- **`ticket_deps`**: the **other tickets this study cannot be built without** — something the design needs that is not on the base branch and that another ticket brings (`/flow:feat:design` §5.1, `/flow:bug:investigate` §4.1). Read at the two exits of a study: `/flow:work:handoff` §5 writes a `Depends on <ticket>` line per entry into the ticket body, and an unattended study run passes `--depends-on N` per entry on its `done` (flow-core §2.1). Not `mrs[].depends_on`, which orders this work's own MRs/PRs. Written whole each time `design` (or `investigate`) runs, and removed when an unattended study is rewound. `[]` or absent when the study depends on nothing.
|
|
166
168
|
- **`contract_handoff`**: whether the sibling knows **what shape to build against** (`scope` is prose; distinct from `status`). `none` — consumes no contract declared here. `pending` — consumes one, not handed over yet. `published → <location>` — published where that side reads it (normally the tracker ticket; `/flow:feat:ship` §6.3), picked up by the sibling's `/flow:feat:start` §3.6.
|
|
@@ -45,6 +45,7 @@ Every *mine* below — your MRs/PRs, your threads, your tickets — is the **aut
|
|
|
45
45
|
- Repo pulse: `git log --oneline --since="<last-session boundary>"` (fallback `-10`) and `git status --short` for uncommitted changes.
|
|
46
46
|
- Per work: `phase`, `phases_done`, MRs and their `status` (from `meta.json.mrs`), and what was **left pending**.
|
|
47
47
|
- **Cross-repo parts**: `meta.json.related_repos` entries not `done` → a *sibling repo* still needs work. Surface only what is recorded — never scan or open the other repo.
|
|
48
|
+
- **Roadmap** (flow-core §10): where the project stands, and which open work delivers which item. An unchecked item no open work links, ahead of the in-progress ones, is what to pick up next.
|
|
48
49
|
- **Open follow-ups**: `followups[]` entries not `declined`/`logged`/`done`, from the live works **and** from `_archive/*/meta.json` (flow-core §7). The archive is read for this and nothing else — a finished work is exactly when its deferred items stop being visible.
|
|
49
50
|
- **Measured cost**: `meta.json.cost[]` entries (flow-core §4) — sum the `usd` there, count the phases behind them, count apart the entries whose `source` is `not reported`. No entries → no figure at all: absence is not zero. The figures are the harness's client-side estimates, not a bill; `flow cost` prints them phase by phase.
|
|
50
51
|
|
|
@@ -117,6 +118,7 @@ The briefing's reference section: every open work, compact, most recently update
|
|
|
117
118
|
Cross-repo: <repo>: <scope> — contract not handed over (only if any)
|
|
118
119
|
Follow-ups: 2 awaiting a decision · 1 accepted, not started (only if any)
|
|
119
120
|
Cost: $0.71 measured over 2 phases · 1 phase not reported (only if any)
|
|
121
|
+
Roadmap: <phase › item it delivers> (only if linked)
|
|
120
122
|
Next: <the concrete next command>
|
|
121
123
|
```
|
|
122
124
|
|
|
@@ -137,6 +139,9 @@ Yesterday / last session
|
|
|
137
139
|
Today
|
|
138
140
|
<what to resume + what the forge/tracker asks of you, ordered by urgency>
|
|
139
141
|
|
|
142
|
+
Roadmap (only with one)
|
|
143
|
+
<phase › milestone — done/total · in progress: item (work) · next: item>
|
|
144
|
+
|
|
140
145
|
Blockers / attention
|
|
141
146
|
<CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · divergences · raised priorities — or "none">
|
|
142
147
|
|
|
@@ -44,6 +44,7 @@ Waves: Wave 1: #1 ∥ #2 → Wave 2: #3 → Wave 3: #4 ∥ #5 (lin
|
|
|
44
44
|
Last updated: <updated_at>
|
|
45
45
|
Notes: <meta.notes>
|
|
46
46
|
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"; or "—">
|
|
47
|
+
Roadmap: <meta.roadmap: "under › item" — and the project's one line, flow-core §10> (line only with a roadmap)
|
|
47
48
|
Ticket thread: <new since <updated_at>: <n> comment(s) that change the work — detailed below · or "nothing new" · or "not read"> (line only in ticket mode, from §2.5)
|
|
48
49
|
Unattended: <from `meta.json.pending` when it is set: the gate, `resume` and the question file's first line — the orchestrator holds the question and will relaunch with its answer> (line only when `pending` is set)
|
|
49
50
|
```
|