flow-workflows 0.104.0 → 0.106.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 +130 -42
- package/adapters/codex/skills/flow-bug-investigate/SKILL.md +1 -1
- package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/codex/skills/flow-bug-ship/SKILL.md +10 -5
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +37 -18
- package/adapters/codex/skills/flow-feat-start/SKILL.md +1 -1
- package/adapters/codex/skills/flow-init/SKILL.md +1 -1
- package/adapters/codex/skills/flow-next/SKILL.md +2 -2
- package/adapters/codex/skills/flow-work-README/SKILL.md +2 -2
- package/adapters/codex/skills/flow-work-daily/SKILL.md +5 -3
- package/adapters/codex/skills/flow-work-resume/SKILL.md +1 -1
- package/adapters/gemini/CORE.md +130 -42
- package/adapters/gemini/commands/flow/bug/investigate.toml +1 -1
- package/adapters/gemini/commands/flow/bug/postmortem.toml +1 -1
- package/adapters/gemini/commands/flow/bug/ship.toml +10 -5
- package/adapters/gemini/commands/flow/feat/ship.toml +37 -18
- package/adapters/gemini/commands/flow/feat/start.toml +1 -1
- package/adapters/gemini/commands/flow/init.toml +1 -1
- package/adapters/gemini/commands/flow/next.toml +2 -2
- package/adapters/gemini/commands/flow/work/README.toml +2 -2
- package/adapters/gemini/commands/flow/work/daily.toml +5 -3
- package/adapters/gemini/commands/flow/work/resume.toml +1 -1
- package/adapters/hermes/CORE.md +130 -42
- package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-bug-ship/SKILL.md +10 -5
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +37 -18
- package/adapters/hermes/skills/flow-feat-start/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-init/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-next/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-work-README/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-work-daily/SKILL.md +5 -3
- package/adapters/hermes/skills/flow-work-resume/SKILL.md +1 -1
- package/adapters/opencode/CORE.md +130 -42
- package/adapters/opencode/commands/flow-bug-investigate.md +1 -1
- package/adapters/opencode/commands/flow-bug-postmortem.md +1 -1
- package/adapters/opencode/commands/flow-bug-ship.md +10 -5
- package/adapters/opencode/commands/flow-feat-ship.md +37 -18
- package/adapters/opencode/commands/flow-feat-start.md +1 -1
- package/adapters/opencode/commands/flow-init.md +1 -1
- package/adapters/opencode/commands/flow-next.md +2 -2
- package/adapters/opencode/commands/flow-work-README.md +2 -2
- package/adapters/opencode/commands/flow-work-daily.md +5 -3
- package/adapters/opencode/commands/flow-work-resume.md +1 -1
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +45 -0
- package/plugins/flow/examples/FLOW.template.md +9 -6
|
@@ -121,7 +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
|
|
124
|
+
"roadmap": { "path": "ROADMAP.md", "item": "the item's text — a checkbox line or a table row", "under": "Phase 2 › Milestone 2.3" } | null,
|
|
125
125
|
"followups": [
|
|
126
126
|
{ "id": "F1",
|
|
127
127
|
"kind": "prevention" | "audit" | "out-of-scope" | "risk" | "edge-case" | "other-bug" | "tooling" | "decision",
|
|
@@ -166,7 +166,7 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
166
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.
|
|
167
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.
|
|
168
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 /
|
|
169
|
+
- **`roadmap`**: the roadmap item this work delivers (flow-core §10). Linked at `/flow-feat-start §3.7`, marked in progress / done by `/flow-feat-ship` inside the MR/PR, shown by `next`/`daily`/`resume` — which also flag an item the code delivered but the file still does not mark. `null` with no roadmap, no link, or a bug.
|
|
170
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.
|
|
171
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.
|
|
172
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,7 +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,
|
|
52
|
+
- **Roadmap** (flow-core §10): where the project stands, which open work delivers which item, what is next (the first pending item whose dependencies are met and no open work links), what is blocked and on what, and the stale items — not done in the file, delivered by the works, the tracker or the forge.
|
|
53
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.
|
|
54
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.
|
|
55
55
|
|
|
@@ -101,6 +101,7 @@ Turn the *joins* into concrete, **suggested** commands (never act):
|
|
|
101
101
|
- Local work `done`/`ship` but its ticket still open in the tracker → divergence to close out.
|
|
102
102
|
- Local work whose branch has an open MR/PR with **CI red or an unmergeable state** (conflicts, behind base) → `/flow-work-green`; with **threads awaiting your reply** (latest comment not yours) → `/flow-work-respond`.
|
|
103
103
|
- A ticket's **priority was raised** while you were on something else → call out the possible refocus.
|
|
104
|
+
- A **stale roadmap item** (flow-core §10) → the file is behind the code: name the item and its evidence. The next `/flow-feat-ship` offers to correct it in its MR/PR; this command never edits the file.
|
|
104
105
|
- `related_repos` entries not `done` → the **other repo's part is still open**: surface it (`<repo>: <scope>`) and suggest `/flow-feat-start <TICKET>` in that repo. `contract_handoff` `pending` → add that the contract was never handed over; the fix is `/flow-feat-ship` §6.3 on this side first. flow only reminds; it never scans the sibling.
|
|
105
106
|
- **Follow-ups nobody has decided on** → one line at most, not a list: `<N> follow-ups awaiting a decision (oldest: <TICKET> F2 — <title>)`, and separately any `accepted` entry with no `work` started, suggesting `/flow-feat-start <ticket>`. A standup is where deferred work should resurface; it is not where it gets triaged — that is `ship`, once. Say nothing when there are none.
|
|
106
107
|
- Uncommitted local changes not reflected in any log/artifact → nudge toward the relevant phase.
|
|
@@ -144,10 +145,11 @@ Today
|
|
|
144
145
|
<what to resume + what the forge/tracker asks of you, ordered by urgency>
|
|
145
146
|
|
|
146
147
|
Roadmap (only with one)
|
|
147
|
-
<phase › milestone — done/total · in progress: item (work) · next: item>
|
|
148
|
+
<phase › milestone — done/total · in progress: item (work) · next: item · blocked: item ← what it waits on>
|
|
149
|
+
<stale: milestone › item still <state> — TICKET merged <date>, one line each — only if any>
|
|
148
150
|
|
|
149
151
|
Blockers / attention
|
|
150
|
-
<CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · divergences · raised priorities — or "none">
|
|
152
|
+
<CI red · reviews awaiting you (latest comment not yours) · stale works (merged on the forge) · stale roadmap items · divergences · raised priorities — or "none">
|
|
151
153
|
|
|
152
154
|
Awaiting others (optional)
|
|
153
155
|
<threads you already answered, waiting on the reviewer — informational, not yours to act on>
|
|
@@ -48,7 +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
|
+
Roadmap: <meta.roadmap: "under › item" — and the project's one line, flow-core §10, plus any stale item> (line only with a roadmap)
|
|
52
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)
|
|
53
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)
|
|
54
54
|
```
|
|
@@ -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.106.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
|
|
@@ -155,8 +155,9 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
155
155
|
artifact only; no `read_staging` → the artifacts are the staging; no `save` →
|
|
156
156
|
the consolidation appends to `KNOWLEDGE.md` at the repo root. Per-call timeout
|
|
157
157
|
`knowledge.timeout_s` (empty = 2 s); a failure or timeout → continue without it, silently.
|
|
158
|
-
**How a consolidation runs** (`ship
|
|
159
|
-
|
|
158
|
+
**How a consolidation runs** (`ship` — before its commit, so the findings travel in the work's own
|
|
159
|
+
MR/PR —, `postmortem`, `abandon`, and the offer in `/flow-work-daily` when `read_staging` has
|
|
160
|
+
entries). No role set at all → say so in one line and stop:
|
|
160
161
|
|
|
161
162
|
1. **Read the staging** for this branch with `knowledge.read_staging`; the role empty → the "why"
|
|
162
163
|
findings already written in this work's artifacts (`03-design.md` ADR-light and challenges,
|
|
@@ -173,12 +174,34 @@ when `read_staging` has entries). No role set at all → say so in one line and
|
|
|
173
174
|
`## <topic>` heading — the finding, its evidence line, the date and the branch. Creating that file
|
|
174
175
|
the first time edits the tree, so it is asked once, in every mode; appending to an existing one is
|
|
175
176
|
recorded, not asked.
|
|
176
|
-
4. **
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
4. **Land the writes in the work's tree** — only with `meta.json.worktree` set, and only for a work
|
|
178
|
+
that will still ship its branch (`ship`, `postmortem`, the `daily` offer; never `abandon`, whose
|
|
179
|
+
worktree is about to go). A `knowledge.save` tool is started once per session, resolves the repo
|
|
180
|
+
from the directory it started in and takes no root in its call, so what it writes lands in the
|
|
181
|
+
**main checkout**, standing on another branch; flow is the only party that knows a worktree
|
|
182
|
+
exists, so flow moves it. Before the first `save`, read the main checkout's
|
|
183
|
+
`git -C <main checkout> status --porcelain` and keep it. After the last one, the files written
|
|
184
|
+
are what each result names (a `file_written`, a path) or, where it names none, the paths new in
|
|
185
|
+
that status since the snapshot — never a path that was already there. Copy each one to the same
|
|
186
|
+
relative path in the worktree, then take it out of the main checkout: delete an untracked file,
|
|
187
|
+
`git -C <main checkout> checkout -- <path>` a tracked one. A path that already differs in the
|
|
188
|
+
worktree is not overwritten: ask (`AskUserQuestion`). Record the paths in
|
|
189
|
+
`meta.json.knowledge.files`; they ride the work's next commit like any change (a `ship` puts them
|
|
190
|
+
in its own commit), and the main checkout is left as it was found.
|
|
191
|
+
5. **Report** in one line: *"Created N · Updated M · Conflicts resolved J"*, or *"Appended N
|
|
192
|
+
finding(s) to KNOWLEDGE.md"* — plus, after step 4, *"moved to the branch: <paths>"*.
|
|
193
|
+
6. **Record the outcome** in `meta.json.knowledge`: `{ "status": "consolidated" | "declined" |
|
|
194
|
+
"later" | "failed" | "nothing", "phase": "<phase>", "files": [...] }`. Every consolidation point
|
|
195
|
+
writes it, an offer turned down included: it is how `ship` knows whether the work's knowledge is
|
|
196
|
+
still owed (`/flow-feat-ship` §2, *Domain knowledge*), and a decision that lives only in the
|
|
197
|
+
conversation is lost with it.
|
|
198
|
+
7. **Clear the staging** for the branch, when the store has that notion: after a consolidation that
|
|
199
|
+
saved, and in any case once the work reaches `phase = "done"` (`ship`'s Close) — a draft left
|
|
200
|
+
in staging after its findings shipped is offered again by `daily` as if nothing had been saved.
|
|
179
201
|
|
|
180
202
|
A tool call that fails is **reported, never swallowed** — this is the one knowledge path that is
|
|
181
|
-
explicit rather than degrading in silence.
|
|
203
|
+
explicit rather than degrading in silence. It records `failed` (step 6), and the work ships without
|
|
204
|
+
those files rather than not shipping.
|
|
182
205
|
|
|
183
206
|
- `notes.<command>` (or `notes.all`) → mandatory extra instructions for that command.
|
|
184
207
|
- Key names, merge rules, and defaults: the template shipped with the plugin
|
|
@@ -1291,55 +1314,120 @@ advisory is the one that returns tidier, shorter, worse code — and it returns
|
|
|
1291
1314
|
|
|
1292
1315
|
A ticket is the largest thing a work knows about: it splits into MRs/PRs (`04-mr-plan.md`), and
|
|
1293
1316
|
nothing sits above it. A project that is being built in phases usually keeps that plan in a markdown
|
|
1294
|
-
file — phases, milestones,
|
|
1295
|
-
|
|
1296
|
-
what an MR/PR delivered.
|
|
1317
|
+
file — phases, milestones, the deliverables of each — and without this section no command reads it
|
|
1318
|
+
unless told to, `next` cannot say where the project stands, and nobody marks what an MR/PR delivered.
|
|
1297
1319
|
|
|
1298
1320
|
**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`,
|
|
1300
|
-
|
|
1301
|
-
before, silently. A tracked file is read **here** (it is this
|
|
1302
|
-
from the main checkout, by §0's rule.
|
|
1303
|
-
|
|
1304
|
-
**Its shape is the author's, not flow's.**
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1321
|
+
at the repo root, then `docs/ROADMAP.md`, either name in any letter case, and either counts only if
|
|
1322
|
+
it holds at least one item in one of the two notations below. Nothing found → there is no roadmap,
|
|
1323
|
+
and every command below behaves as before, silently. A tracked file is read **here** (it is this
|
|
1324
|
+
branch's version); a git-ignored one from the main checkout, by §0's rule.
|
|
1325
|
+
|
|
1326
|
+
**Its shape is the author's, not flow's.** flow never rewrites the structure, renumbers, reorders,
|
|
1327
|
+
adds headings, rows or columns, or realigns a table. What it reads is a set of items, each with a
|
|
1328
|
+
text, a state (*pending*, *in progress* or *done*), an optional note, its ticket(s) and its
|
|
1329
|
+
dependencies, grouped under milestones. Two notations carry them, and one file may use both:
|
|
1330
|
+
|
|
1331
|
+
- **Checkboxes.** A checkbox line (`- [ ]` / `- [x]`) is an item: `[x]` is done, flow's trailing
|
|
1332
|
+
annotation (below) says in progress, anything else is pending. A checkbox line with checkbox
|
|
1333
|
+
children is a milestone made of those children. Checkbox items have no dependencies but their
|
|
1334
|
+
order.
|
|
1335
|
+
- **Tables.** A markdown table whose header has a **state** column holds one item per row. The
|
|
1336
|
+
column roles are read off the header, in the file's language: *state* (status, estado…),
|
|
1337
|
+
*ticket* (issue, ticket…), *dependencies* (depends on, after, depende de…), and the item's text in
|
|
1338
|
+
the first remaining column. `roadmap.columns` names them when the header is ambiguous —
|
|
1339
|
+
`state=<header>, ticket=<header>, depends=<header>`. A state cell is a state word, optionally
|
|
1340
|
+
followed by `:` and a free note the team wrote; the state is read from the word alone, against the
|
|
1341
|
+
words the file itself uses (done / in progress / pending, in its language). A word flow cannot
|
|
1342
|
+
place is shown as it is and counted as pending.
|
|
1343
|
+
|
|
1344
|
+
**Milestones.** The headings that hold items are the phases and milestones, at whatever depth the
|
|
1345
|
+
file uses. When the file has an **order table** — a table whose rows name the other sections
|
|
1346
|
+
(`H1`, `Phase 2`, a heading's text) — only the sections it lists are milestones, and its own
|
|
1347
|
+
dependency column is the milestones' dependencies; a section with items that it does not list is
|
|
1348
|
+
**side work** (work that is not code, a parallel track): counted and shown, never proposed as next.
|
|
1349
|
+
A milestone may state its **closing criterion** in prose — a line such as `Done when: …` / `Terminado
|
|
1350
|
+
cuando: …` right under its heading. flow never judges prose, so a milestone with a criterion is
|
|
1351
|
+
closed **only when the file says so**: a done state for it in the order table, or a checked checkbox
|
|
1352
|
+
on the criterion line. One without a criterion is closed when every item in it is done.
|
|
1353
|
+
|
|
1354
|
+
**Dependencies.** An item's dependency cell names other items or milestones — by their text, their
|
|
1355
|
+
ticket, or the milestone's id or heading — and an item inherits its milestone's dependencies. A
|
|
1356
|
+
dependency is **met** when the item it names is done, or the milestone it names is closed. A name
|
|
1357
|
+
that resolves to nothing is **unmet**, and is said as such: flow never guesses a near match.
|
|
1308
1358
|
|
|
1309
1359
|
**Where the project stands** — computed the same way by `next`, `daily` and `resume`:
|
|
1310
|
-
- **Current phase**: the first
|
|
1311
|
-
- **In progress**:
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1360
|
+
- **Current phase**: the first milestone, in file order, that is not closed.
|
|
1361
|
+
- **In progress**: items an open work links (below), or whose state is in progress.
|
|
1362
|
+
- **Next**: the first pending item, in file order across the whole file, whose dependencies are all
|
|
1363
|
+
met and that no open work links — a leaf, not a milestone whose children are listed, and never
|
|
1364
|
+
side work. Without dependencies this is the first pending item of the current phase, as order
|
|
1365
|
+
alone always said.
|
|
1366
|
+
- **Blocked**: the pending items ahead of *next* that wait on something, each with what it waits on;
|
|
1367
|
+
a milestone whose items are all done but whose criterion is not marked is named with its criterion.
|
|
1368
|
+
- **Stale**: items whose work has already merged while their state still says otherwise (below).
|
|
1315
1369
|
- Said in one line: `Roadmap: <phase> › <milestone> — <done>/<total> · in progress: <item> (<work>) ·
|
|
1316
|
-
next: <item
|
|
1370
|
+
next: <item> · blocked: <item> ← <what it waits on>`, the last part only when something ahead of
|
|
1371
|
+
*next* is blocked; a milestone waiting on its criterion reads `<milestone>: items done — criterion
|
|
1372
|
+
not marked: "<criterion>"`. Counts are the items under the current phase. Every milestone closed →
|
|
1373
|
+
`Roadmap: complete`.
|
|
1374
|
+
|
|
1375
|
+
**Stale items — the merge that never reached the file.** An item can stay *in progress* or *pending*
|
|
1376
|
+
after the work that delivers it merged: a part shipped outside flow, a train whose closing MR/PR was
|
|
1377
|
+
merged by hand, a deliverable split across several tickets. `next`, `daily` and `resume` check every
|
|
1378
|
+
item that is not done and names a ticket, or that an open or archived work links, against:
|
|
1379
|
+
- **the works** — a live or `_archive/` work linking the item (or carrying its ticket) whose
|
|
1380
|
+
`phase` is `done`, or whose `mrs[]` are all merged → **delivered**;
|
|
1381
|
+
- **the tracker**, when `tracker.cli` is set — the ticket reports done, and the forge has no open
|
|
1382
|
+
MR/PR carrying it → **delivered**;
|
|
1383
|
+
- **the forge alone** — MRs/PRs carrying the ticket are merged and none is open, with no work and no
|
|
1384
|
+
tracker to say it was the last part → **probably delivered**: said as such, never corrected by
|
|
1385
|
+
`ship`.
|
|
1386
|
+
A delivered item whose state is not done is **stale**, said in one line with its evidence:
|
|
1387
|
+
`stale: <milestone> › <item> still <state> — <TICKET> merged <date>`. One forge query per ticket,
|
|
1388
|
+
only for items that are not done; the commands that report it stay read-only.
|
|
1317
1389
|
|
|
1318
1390
|
**The link.** A work records the item it delivers in `meta.json.roadmap`:
|
|
1319
|
-
`{ "path": "<file>", "item": "<the
|
|
1320
|
-
— or `null`. `/flow-feat-start` sets it: an item the ticket clearly names (its id
|
|
1321
|
-
matching the item's text) is taken in every mode; otherwise `manual`
|
|
1322
|
-
|
|
1323
|
-
work is linked to one item, at any depth: linking a milestone means the work
|
|
1324
|
-
|
|
1391
|
+
`{ "path": "<file>", "item": "<the item's text, without checkbox, annotation or note>", "under": "<heading › heading>" }`
|
|
1392
|
+
— or `null`. `/flow-feat-start` sets it: an item the ticket clearly names (its id in the item's text
|
|
1393
|
+
or ticket cell, or its title matching the item's text) is taken in every mode; otherwise `manual`
|
|
1394
|
+
asks once, offering the next items and *none*, and `guided`/`auto`/`unattended` record `null` and
|
|
1395
|
+
say so in one line. A work is linked to one item, at any depth: linking a milestone means the work
|
|
1396
|
+
delivers all its items.
|
|
1325
1397
|
|
|
1326
1398
|
**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
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1399
|
+
edits the file in the same commit as the change, and the preview shows each line it will change,
|
|
1400
|
+
before and after:
|
|
1401
|
+
- **First MR/PR of the work, more to come** → in progress. A checkbox item stays unchecked and gains
|
|
1402
|
+
` — in progress (<TICKET>)`. A table row gets the file's in-progress word in its state cell.
|
|
1403
|
+
- **Last MR/PR of the work** (the one that `Closes` the ticket, or a single one) → done. A checkbox
|
|
1404
|
+
item becomes `- [x]` and its annotation ` — done (<TICKET>)`; every child of a linked milestone is
|
|
1405
|
+
ticked with it, and a parent checkbox whose children are now all ticked is ticked too, without
|
|
1406
|
+
annotation — unless it states a closing criterion, which flow never marks. A table row gets the
|
|
1407
|
+
file's done word; every row of a linked milestone with it. A milestone itself is never closed by
|
|
1408
|
+
flow when it has a criterion.
|
|
1333
1409
|
- **Intermediate MRs/PRs of a train** touch nothing: the first one marked the item and the last one
|
|
1334
1410
|
closes it, so stacked branches never edit the same line twice.
|
|
1335
|
-
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1411
|
+
- **A table row is edited in two cells at most, and only there**: the state word — the note after
|
|
1412
|
+
the `:` is kept as the team wrote it, the preview shows it so a note that no longer holds is seen
|
|
1413
|
+
before approval — and the ticket cell, filled with this work's ticket when it is empty. No other
|
|
1414
|
+
cell, row or alignment changes; a cell that grows wider than its column is left so, because
|
|
1415
|
+
realigning would touch every row. A `|` inside a value is written `\|`. Without a ticket column
|
|
1416
|
+
the ticket goes in parentheses after the state word.
|
|
1417
|
+
- **The words are the file's.** A state word is one the column already uses, or — for a state it
|
|
1418
|
+
never uses yet — the one the file's own instructions name, else the plain word in the file's
|
|
1419
|
+
language. flow recognises its checkbox annotation as a trailing ` — <words> (<ticket>)` and
|
|
1420
|
+
replaces it rather than stacking a second one. The ticket, not the MR/PR url: the edit is
|
|
1421
|
+
committed before the MR/PR exists, and the ticket already leads to it. A ticket-less work writes
|
|
1422
|
+
its slug.
|
|
1423
|
+
- **Stale items found on the way** → the same preview offers to correct them in this MR/PR: only
|
|
1424
|
+
items **delivered** by the works or the tracker (never *probably delivered*), only to *done*, by
|
|
1425
|
+
the rules above, each line shown before and after. Not on an intermediate MR/PR of a train.
|
|
1339
1426
|
- **The item cannot be found** (renamed, moved, deleted since `start`) → do not guess a near match:
|
|
1340
1427
|
leave the file alone and say so in the ship's stop. **The file is git-ignored** → there is no MR/PR
|
|
1341
1428
|
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.
|
|
1429
|
+
- `roadmap.mark: never` keeps the roadmap read-only — a team document flow only reads. Stale items
|
|
1430
|
+
are still reported.
|
|
1343
1431
|
|
|
1344
1432
|
Bugs do not link: a bug repairs something already delivered, and the roadmap tracks what is still to
|
|
1345
1433
|
deliver. A bug that *is* a roadmap item is started as a feature.
|
|
@@ -223,7 +223,7 @@ If the bug turned out simpler or wider than `meta.json.size` says (multi-compone
|
|
|
223
223
|
If `knowledge.stage` is set and the root cause reveals a **non-obvious "why"** about the domain (a false model assumption, a historical decision that no longer applies, an undocumented external-integration behaviour), stage it. Silence by default — only on a clear signal.
|
|
224
224
|
|
|
225
225
|
- `knowledge.stage` with the finding and context, one call per finding.
|
|
226
|
-
- Notify the user: "Staged X domain finding(s) to consolidate in `/flow-bug-postmortem`".
|
|
226
|
+
- Notify the user: "Staged X domain finding(s) to consolidate in `/flow-bug-postmortem`" (M/L) or "in `/flow-bug-ship`" (XS/S, whose route has no postmortem).
|
|
227
227
|
- Never `knowledge.save` here — that belongs to the postmortem.
|
|
228
228
|
|
|
229
229
|
## 8. Close
|
|
@@ -87,7 +87,7 @@ Produce an honest analysis:
|
|
|
87
87
|
1. Call `knowledge.read_staging` (empty → the findings recorded in `03-investigation.md`) — the findings staged in `/flow-bug-investigate` are the primary material.
|
|
88
88
|
2. Review the postmortem for additional "why" items not staged at the time (business decisions, legal constraints, integrations, false model assumptions). The "what" (code, paths) is not saved.
|
|
89
89
|
3. Combine staging + new findings. Empty or only obvious things → do not insist.
|
|
90
|
-
4. 1+ relevant findings → ask the user whether to save them. Yes → run the consolidation of flow-core §0, with the right angle (the lesson, not the code). No → do not insist.
|
|
90
|
+
4. 1+ relevant findings → ask the user whether to save them. Yes → run the consolidation of flow-core §0, with the right angle (the lesson, not the code) — with a worktree, its step 4 moves the written files into it, left uncommitted for `/flow-bug-ship` §3.1 to commit with the fix. No → do not insist. Either way record the answer in `meta.json.knowledge` (flow-core §0 step 6): `ship` reads it to know the question was asked.
|
|
91
91
|
|
|
92
92
|
Neither role set → skip this block silently.
|
|
93
93
|
|
|
@@ -19,13 +19,13 @@ description: Commit, push, MR/PR the fix
|
|
|
19
19
|
Close the bug flow: commit, push, MR/PR. Same mechanics as `/flow-feat-ship`, with two differences:
|
|
20
20
|
|
|
21
21
|
1. If `99-postmortem.md` exists, **include the link or the executive summary** in the MR/PR description.
|
|
22
|
-
2.
|
|
22
|
+
2. **Knowledge goes in the fix's own commit, decided where it was not decided yet.** `postmortem` in `phases_done` and `meta.json.knowledge.status` set → `/flow-bug-postmortem` §4 already answered it (and with a worktree, already moved the files into it): do not ask again; its `meta.json.knowledge.files` are staged with the fix in §3.1. Otherwise — a fix of size XS/S, whose route has no postmortem, or a postmortem from before this rule — run `/flow-feat-ship` §2 *Domain knowledge* here, with `03-investigation.md`, `04-fix.md`, `05-validation.md` and `06-review.md` as the artifacts it reads: the findings go into the §2 preview, and §3.1 consolidates them before the commit. Without this, what `investigate`, `validate` and `review` staged on a small fix was never saved, or went out later in an MR/PR of its own.
|
|
23
23
|
|
|
24
24
|
**In `unattended`** (flow-core §2.1) this command asks nothing, pushes nothing and opens nothing —
|
|
25
25
|
the same resolutions as `/flow-feat-ship`'s unattended paragraph, and its "In every mode" paragraph
|
|
26
26
|
too, applied to the sections here: the MR/PR (§2–§3) is not confirmed and not created — its title
|
|
27
27
|
and description go to `publish-title.md` / `publish-body.md` in the work folder, §3.1–§3.3 do not
|
|
28
|
-
run, and pre-deploy SQL → question `migration`; §3.0's upstream on the base is unset with no push. The tree check (§0) re-runs what is behind `HEAD`
|
|
28
|
+
run, the knowledge of difference 2 is `Later` (recorded, as `/flow-feat-ship` says), and pre-deploy SQL → question `migration`; §3.0's upstream on the base is unset with no push. The tree check (§0) re-runs what is behind `HEAD`
|
|
29
29
|
once per MR/PR, recorded as `/flow-feat-ship` says — here `validate` first, since it ran before the
|
|
30
30
|
review, then the review on the delta — and is `blocked` after that. Every offer and survey at Close
|
|
31
31
|
(§4) — follow-ups, conventions, archiving — is `Later`; "was it merged?" is not merged (`phase`
|
|
@@ -144,6 +144,7 @@ Squash: <git.squash from FLOW.md>
|
|
|
144
144
|
Target branch: <git.default_base>
|
|
145
145
|
Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "none — Jira links by title prefix">
|
|
146
146
|
Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
|
|
147
|
+
Knowledge: <N finding(s) saved before the commit, shipped in it — one line each / "N file(s) the postmortem saved, shipped in it"> (line only when there is any)
|
|
147
148
|
|
|
148
149
|
Description:
|
|
149
150
|
<full description rendered exactly as it will appear in the MR/PR>
|
|
@@ -155,6 +156,7 @@ If there is pre-deploy SQL, ask the user to **explicitly confirm that the block
|
|
|
155
156
|
Then ask with `AskUserQuestion` (header: "Create {MR or PR}"):
|
|
156
157
|
|
|
157
158
|
- **Create {MR or PR} with this content** → §3.
|
|
159
|
+
- **Create, without saving the knowledge** (only with findings gathered here) → §3 without the consolidation; `meta.json.knowledge.status: "later"`, offered again on the re-run as `/flow-feat-ship` §5 says.
|
|
158
160
|
- **Edit before creating** → adjust what the user indicates, return to §2.
|
|
159
161
|
- **Cancel** → stop without creating anything. Do not touch `meta.json`.
|
|
160
162
|
|
|
@@ -172,6 +174,8 @@ Only here — with the content approved in §2 — invoke `Skill commit-commands
|
|
|
172
174
|
|
|
173
175
|
Assign to `git.assignee` from FLOW.md (empty → unassigned). Squash per `git.squash`.
|
|
174
176
|
|
|
177
|
+
**Knowledge, before the commit — `/flow-feat-ship` §4.1's knowledge bullet, in full and unchanged**: findings approved in §2 → the consolidation of flow-core §0, step 4 moving the written files from the main checkout into the worktree; then those files, and any the postmortem already landed (`meta.json.knowledge.files`), are staged with the fix. A failed `save` → one line, `failed`, and the fix ships without them.
|
|
178
|
+
|
|
175
179
|
**Record the URL the moment it exists**: write it into `meta.json` (the `mrs` entry if there is one) and refresh the panel (flow-core §4) right here, before §3.2 and before anything else can fail.
|
|
176
180
|
|
|
177
181
|
**The pipeline the push starts is not watched from this thread — `/flow-feat-ship` §4.1, in full and unchanged**: close with CI reported as *running*, or delegate the wait to a supervisor subagent on `models.supervisors` (flow-core §6.5) with a deadline, taking back status and failing-job evidence only. A red pipeline is `/flow-work-green`'s to triage, never this command's.
|
|
@@ -189,7 +193,8 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
189
193
|
|
|
190
194
|
## 4. Close
|
|
191
195
|
|
|
192
|
-
- **A worktree does not own the tree its tools wrote into — `/flow-feat-ship` §5.5, in full and unchanged.** First, before anything below: `meta.json.worktree` not null → read the main checkout's `git status --porcelain`, name any paths it holds in one line as what they are (in the main checkout, not in the branch just pushed, and not necessarily put there by this run), and offer once to carry them over.
|
|
196
|
+
- **A worktree does not own the tree its tools wrote into — `/flow-feat-ship` §5.5, in full and unchanged.** First, before anything below: `meta.json.worktree` not null → read the main checkout's `git status --porcelain`, name any paths it holds in one line as what they are (in the main checkout, not in the branch just pushed, and not necessarily put there by this run), and offer once to carry them over. The knowledge files are no longer the expected case — flow-core §0 step 4 moved them into the worktree before the commit, whether `postmortem` or §3.1 saved them — so what is left here is another tool's output, or a move that went wrong.
|
|
197
|
+
- **Knowledge still owed — `/flow-feat-ship` §5, in full and unchanged**: `meta.json.knowledge.status` `later` or `failed` → offered once on this re-run; onto the open branch, or a knowledge-only MR/PR once the fix merged.
|
|
193
198
|
- Update `meta.json`: add `ship` to `phases_done`, update `updated_at`. **`phase` becomes `done` only once the MR/PR is confirmed merged** — creating it is not finishing it. Right after §3.1 it is open, so ask once with `AskUserQuestion` whether it has already been merged: **no** (the normal answer) → leave `phase = "ship"`; **yes** → `phase = "done"`. `/flow-work-green` and `/flow-work-respond` work on the open MR/PR; `/flow-work-clean` only sweeps what merged.
|
|
194
199
|
- Refresh the panel: while the MR/PR is open its line is `wait` with the `link`; once merged it is `done`, and only then say there is nothing left here (`mark: "info"`, `style: "ok"`). Drop the `Decision` line either way.
|
|
195
200
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
@@ -198,10 +203,10 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
198
203
|
- **Cross-repo reminder**: for each `meta.json.related_repos` entry not `done`: *"you've shipped the `<this-repo>` part; `<repo>` still needs: `<scope>` → go there and run `/flow-bug-start <TICKET>` (or `/flow-feat-start`)"*. flow only reminds; this is not a hard gate.
|
|
199
204
|
- **Cross-repo contract handoff**: for each such entry with `contract_handoff: "pending"` — the fix changed a surface that sibling consumes — hand the new shape over as `/flow-feat-ship` §6.3 (publish the **literal** shape to the tracker ticket, mandatory preview in every autonomy mode, then record `published → <location>`; versioned-file fallback when there is no tracker). A bug flow has no §"External contracts": take the literal from the fix itself — the actual key, code, route or event the code now emits — read it off the code, never from memory.
|
|
200
205
|
- **Follow-up triage — `/flow-feat-ship` §6.4, in full and unchanged.** Read `meta.json.followups[]`; nothing `proposed` → skip silently. Otherwise §6.4 step 0 first — **3 or more candidates go to a skeptic** whose job is to refute that each deserves a ticket, and only the strongest `tracker.followup_ask_max` (empty → **2**) reach the user (flow-core §7) — then one batched `AskUserQuestion` (**Do it** / **Not worth it** / **Later**; `decision` entries asked as their question, `tooling` and everything `log`ged never asked), the accepted ones get their tracker issue created (outward-facing → **asks in every mode**), the logged ones nothing but `status: "logged"` in `meta.json`, then one offer to start the first. A bug flow is where the gate earns its keep: the prevention actions `/flow-bug-postmortem` wrote, the neighbouring bugs `/flow-bug-validate` found and the similar-risk patterns `/flow-bug-fix` flagged all land here — half a dozen of them, from one fix, and «similar risk elsewhere» that no skeptic ever read is exactly the entry that turns a closed bug into six open questions. Repeat for anything still `proposed` on the re-run that confirms the merge.
|
|
201
|
-
- **Specialists created — `/flow-feat-ship` §5.1, in full and unchanged.** Read `meta.json.specialists[]` (flow-core §6.6); nothing `useful` and pending → skip silently. Otherwise one batched offer to save each as an agent, after the MR/PR and
|
|
206
|
+
- **Specialists created — `/flow-feat-ship` §5.1, in full and unchanged.** Read `meta.json.specialists[]` (flow-core §6.6); nothing `useful` and pending → skip silently. Otherwise one batched offer to save each as an agent, after the MR/PR and the knowledge that shipped in it — asked in every mode, never overwriting an agent that exists.
|
|
202
207
|
- **What the agents missed — `/flow-feat-ship` §5.2, in full and unchanged.** Read `meta.json.agent_lessons[]` (flow-core §6.7); `agents.learn: off` or nothing pending → skip silently. Otherwise one question per agent with the resulting lessons section, backup first, your agents asked in every mode.
|
|
203
208
|
- **Conventions learned — `/flow-feat-ship` §6.4bis, in full and unchanged.** Read `meta.json.conventions_candidates[]` (flow-core §8); nothing pending → skip silently. Otherwise: drop what `FLOW.md` already says, then one batched `AskUserQuestion` (**Add to FLOW.md** / **Not a rule** / **Later**, or **Replace** when it contradicts a line that is there). Asked in every mode — it edits a file in the tree. A fix is where the corrections land hardest: *«never mock the repository in that layer»*, *«the regression test goes next to the unit test, not in the functional suite»* — said once inside `bug:fix`, and proposed again in the next incident unless they reach the file.
|
|
204
209
|
- **Close the follow-up that started this work.** `meta.json.origin` set and this ship moved `phase` to `done` → open the originating work's `meta.json` (live folder or `_archive/`) and set that `followups[]` entry to `status: "done"`. Best-effort: the originating folder is gone or unreadable → warn in one line and continue, never block. Without this the entry stays `in_progress` forever and `status`/`daily` keep reporting work that is finished.
|
|
205
|
-
- **Only once `phase` is `done`**: delete the candidate anchor `/flow-bug-review §1.5` left behind — `git update-ref -d refs/flow/candidate/<TICKET>`. No question: local, never pushed, and the gate that needed it has run.
|
|
210
|
+
- **Only once `phase` is `done`**: delete the candidate anchor `/flow-bug-review §1.5` left behind — `git update-ref -d refs/flow/candidate/<TICKET>`. No question: local, never pushed, and the gate that needed it has run. And clear the branch's staging as `/flow-feat-ship` §6.5 says (`consolidated`/`declined` only).
|
|
206
211
|
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`.
|
|
207
212
|
- If `meta.json.worktree` is not null, offer `git worktree remove <worktree>` once the MR/PR is merged (`--force` only if the user confirms discarding remaining changes). Not before merge, not without confirmation.
|
|
@@ -22,7 +22,7 @@ Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, mo
|
|
|
22
22
|
|
|
23
23
|
**In `unattended`, before this phase's first step, read flow-core §2.1 whole — from its heading to the next section, unless it is already in your context whole; having read parts of it does not count** — the orchestrator command, the question stop and the way its answer comes back are all in it, and a phase that reads only part of it skips them.
|
|
24
24
|
|
|
25
|
-
Closes the feature: commit, push, MR/PR (assigned per `git.assignee`, squash per `git.squash`, sections per `git.request_sections`) and
|
|
25
|
+
Closes the feature: commit, push, MR/PR (assigned per `git.assignee`, squash per `git.squash`, sections per `git.request_sections`), with the domain knowledge the work learned approved in the same preview and shipped in the same commit.
|
|
26
26
|
|
|
27
27
|
**In `unattended`** (flow-core §2.1) this command asks nothing, pushes nothing and opens nothing:
|
|
28
28
|
it hands the finished MR/PR to the orchestrator, which pushes the branch and opens the draft. Each
|
|
@@ -46,8 +46,9 @@ place it would ask:
|
|
|
46
46
|
continue and list them in the body.
|
|
47
47
|
- **Posting anything else** — a contract handoff (§6.3) — → not posted; the handoff stays
|
|
48
48
|
`pending`.
|
|
49
|
-
- **The offers and surveys (§5, §5.1, §5.2, §5.5, §6.4, §6.4bis)** → `Later`;
|
|
50
|
-
the work folder.
|
|
49
|
+
- **The offers and surveys (§2's *Domain knowledge*, §5, §5.1, §5.2, §5.5, §6.4, §6.4bis)** → `Later`;
|
|
50
|
+
nothing written outside the work folder. Knowledge left unsaved this way is recorded
|
|
51
|
+
(`meta.json.knowledge.status: "later"`), so the first attended `ship` of the work offers it again.
|
|
51
52
|
- **"Was it merged?" (§6.1)** → not merged: the entry stays `in_progress` (a work with no `mrs`
|
|
52
53
|
keeps `phase = "ship"`) until `publish` succeeds, below. **The parent merged first (§6.2.1)** → blocked, never
|
|
53
54
|
force-push. **Train continuation (§6.2)** → not started: one MR/PR per unattended run (with
|
|
@@ -82,7 +83,7 @@ the one taken checked (flow-core §2.1, the recommended answer).
|
|
|
82
83
|
- Not met → refuse and send the user to the missing step (multi-MR/PR: `/flow-feat-review` or `/flow-feat-validate` **for this MR/PR**).
|
|
83
84
|
- **The review has to be about the tree you are about to push.** `reviewed_sha` is the revision the reviewers **read** (`/flow-feat-review §1.5` froze it), not the one that phase ended on, so the round's own fixes are a real delta here rather than a match. Compare `meta.json.reviewed_sha` and `validated_sha` (this MR/PR's `mrs[]` entry in a multi-MR/PR work) against `git rev-parse HEAD`:
|
|
84
85
|
- **Equal** → continue, nothing to report — **unless `fixed_sha` is set**, which says the review changed the tree after reading it and cannot then be equal to `HEAD`. That combination is a mismatch, not a match: the shas were recorded by two different mechanisms and one of them is wrong. Say so and treat it as Different below.
|
|
85
|
-
- **The tree is dirty at this end** (`git status --porcelain` non-empty, ignoring untracked) → both shas describe committed history and the bytes about to be pushed are not in either. Name the paths and ask, exactly as Different does; a comparison of two identical shas over two different trees is the case the old gate passed over in silence.
|
|
86
|
+
- **The tree is dirty at this end** (`git status --porcelain` non-empty, ignoring untracked, and ignoring the paths in `meta.json.knowledge.files` — knowledge a `postmortem` or a `daily` offer already landed here, flow-core §0 step 4, which ships with this commit and is no code to review) → both shas describe committed history and the bytes about to be pushed are not in either. Name the paths and ask, exactly as Different does; a comparison of two identical shas over two different trees is the case the old gate passed over in silence.
|
|
86
87
|
- **`reviewed_sha` does not resolve** (`git cat-file -e <sha>^{commit}`) — a candidate from a dirty tree whose anchor ref was deleted, or history rewritten since — → say so in one line and treat it as Absent. A gate that cannot read its own input must not report nothing wrong here.
|
|
87
88
|
- **Absent** (work started before the shas were recorded) → say so in one line and continue. Absence is not a mismatch.
|
|
88
89
|
- **Different** → read the delta (`git log --oneline <sha>..HEAD`, `git diff --stat <sha>..HEAD`) and judge it by **what it touches**, never by size. When `fixed_sha` is set, say in the same line that part of this delta is the review's own fixes: the user is judging what the reviewers never read, and where it came from is the first thing they need.
|
|
@@ -117,9 +118,19 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
|
|
|
117
118
|
- **`linear`**: `Closes <TICKET>` (Linear id, e.g. `ENG-123`) on the completing MR/PR; nothing on intermediates.
|
|
118
119
|
- **`none` / empty**: nothing to link.
|
|
119
120
|
|
|
120
|
-
### Roadmap mark (only with a linked item)
|
|
121
|
+
### Roadmap mark (only with a linked item or a stale one)
|
|
121
122
|
|
|
122
|
-
`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
|
|
123
|
+
`meta.json.roadmap` set, or a stale item §10 counts as delivered, 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 marks it done (with its children, and any parent left with every child done — never a milestone that states a closing criterion), an intermediate one touches nothing. Find the item by its `item` text with flow's annotation, or a table row's note, stripped; not found → no edit, and the stop says so. In a table, only the state cell and an empty ticket cell change. Not an intermediate MR/PR → also list the **stale items** §10 counts as delivered, to be marked done in the same edit. Decide it here, show it in the §3 preview, write it in §4.1 — never before approval.
|
|
124
|
+
|
|
125
|
+
### Domain knowledge (decided with the MR/PR, written before its commit)
|
|
126
|
+
|
|
127
|
+
Only if `knowledge.read_staging` or `knowledge.save` is set; neither → skip without notifying (the artifacts already hold the findings). `meta.json.knowledge.status` already `consolidated` (a `daily` offer banked it mid-work) → nothing new to gather beyond what was staged since; `declined` → skip, it was answered.
|
|
128
|
+
|
|
129
|
+
1. **Read the staging accumulated during the branch**: `knowledge.read_staging` (empty → what the artifacts recorded) — what `/flow-feat-design` and the other phases staged. Main material.
|
|
130
|
+
2. **Review** `03-design.md`, `05-implementation.md`, `06-review.md` for "why" findings (domain decisions, legal constraints, integrations, business motivations) **not staged at the time**. The "what" (code, paths) is NOT saved.
|
|
131
|
+
3. **Combine** into a short list, one line per finding. Empty or only code-derivable → no `Knowledge` line in §3 and `meta.json.knowledge.status: "nothing"` — silence by default.
|
|
132
|
+
|
|
133
|
+
Nothing is saved here. The list goes into the §3 preview and is approved with the MR/PR; §4.1 runs the consolidation (flow-core §0) **before the commit**, so the files it writes travel in the same commit as the change. Saving after the push is what left knowledge files sitting in a main checkout while the MR/PR merged without them.
|
|
123
134
|
|
|
124
135
|
### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
|
|
125
136
|
|
|
@@ -202,7 +213,10 @@ Squash on merge: <git.squash from FLOW.md>
|
|
|
202
213
|
Target branch: <git.default_base from FLOW.md, or the parent branch in train mode>
|
|
203
214
|
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">
|
|
204
215
|
Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
|
|
205
|
-
Roadmap: <"<line now>" → "<line after>" / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item)
|
|
216
|
+
Roadmap: <"<line now>" → "<line after>", one pair per line changed / "untouched — intermediate MR/PR" / "item not found"> (line only with a linked item or a stale one)
|
|
217
|
+
<stale items: "<line now>" → "<line after>" — <evidence>; each one can be dropped from the edit> (only if any)
|
|
218
|
+
Knowledge: <N finding(s) saved before the commit, shipped in it:> (line only with a §2 list)
|
|
219
|
+
<- one line per finding>
|
|
206
220
|
|
|
207
221
|
Description:
|
|
208
222
|
<full description rendered exactly as it will appear in the MR/PR>
|
|
@@ -214,7 +228,8 @@ If there is pre-deploy SQL, ask the user to **explicitly confirm that the block
|
|
|
214
228
|
The preview is the last thing before the question — **no tool call between them** (flow-core §3), or the block the user is meant to approve is the one their terminal folds away. Then ask with `AskUserQuestion` (header: "Create <MR or PR>"):
|
|
215
229
|
|
|
216
230
|
- **Create with this content** → invoke §4.
|
|
217
|
-
- **
|
|
231
|
+
- **Create, without saving the knowledge** (only with a `Knowledge` line) → invoke §4 and skip its consolidation; `meta.json.knowledge.status: "later"`, offered again by the re-run of this command (§5). A finding the user wants dropped rather than postponed is an *Edit*.
|
|
232
|
+
- **Edit before creating** → user says what to change (title, a section, a finding, any of them); adjust and return to §3 with the new preview.
|
|
218
233
|
- **Cancel** → stop without creating anything. Do not touch `meta.json`. The user can return to `/flow-feat-ship` later.
|
|
219
234
|
|
|
220
235
|
Do not push or invoke any creation command until the user has responded "Create with this content".
|
|
@@ -236,6 +251,7 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
236
251
|
|
|
237
252
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
238
253
|
- **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.
|
|
254
|
+
- **Knowledge approved in §3** → at the same point, before the commit: run the consolidation of flow-core §0 on the approved list, step 4 included — with `meta.json.worktree` set, every file `knowledge.save` wrote is moved from the main checkout into this worktree, so it is in the diff about to be committed and the main checkout is left as it was. Then stage what it wrote (`meta.json.knowledge.files`, or the `KNOWLEDGE.md` it appended) with the change — and the files an earlier phase already landed in this worktree (the same key), which are otherwise left uncommitted. A store that writes outside the repo leaves nothing to stage, and that is fine. A `save` that fails → report it in one line, `meta.json.knowledge.status: "failed"`, and the MR/PR goes out without those files; §5 offers them again.
|
|
239
255
|
- `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.
|
|
240
256
|
|
|
241
257
|
**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.
|
|
@@ -315,20 +331,22 @@ no measurable change, not a percentage.
|
|
|
315
331
|
- Posting to the forge is outward-facing: show the comment and confirm with `AskUserQuestion`
|
|
316
332
|
**in every `autonomy.mode`**, exactly like the description preview in §3.
|
|
317
333
|
|
|
318
|
-
## 5.
|
|
334
|
+
## 5. Knowledge still owed (re-run only)
|
|
319
335
|
|
|
320
|
-
|
|
336
|
+
The knowledge normally left with the commit (§2, §4.1). This section is for the run where it did not: `meta.json.knowledge.status` is `later` or `failed` — postponed in §3, a `save` that failed, or an unattended run. Anything else → skip silently.
|
|
321
337
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
338
|
+
On every re-run of this command (the one that confirms the merge included), offer it once with `AskUserQuestion`, listing the findings again from §2's steps: **Save them now** · **Not worth it** (→ `declined`, never offered again) · **Later** (stays). *Save them now* runs the consolidation of flow-core §0, then ships its files by the MR/PR's state:
|
|
339
|
+
|
|
340
|
+
- **Still open** → commit them onto this branch in the worktree and push; the MR/PR updates itself.
|
|
341
|
+
- **Merged** → a knowledge-only MR/PR: a fresh branch from `git.default_base` with this work's branch name, one commit, title `<TICKET> Domain knowledge from <the work's title>`, the same issue-link rule as §2 (`Part of`, never `Closes` — the issue is already done). It goes through §3's preview and §4.0's checks like any MR/PR: outward-facing, asked in every mode.
|
|
342
|
+
|
|
343
|
+
A store that writes outside the repo leaves no file to ship; then saving is the whole step.
|
|
326
344
|
|
|
327
345
|
## 5.1 Specialists created (offer)
|
|
328
346
|
|
|
329
347
|
Read `meta.json.specialists[]` (flow-core §6.6). **No entry with `useful: true` and `status` unset
|
|
330
|
-
or `"later"` → skip this section and say nothing.** It comes after
|
|
331
|
-
the knowledge
|
|
348
|
+
or `"later"` → skip this section and say nothing.** It comes after the MR/PR on purpose: the MR/PR is open,
|
|
349
|
+
the knowledge shipped with it, and what is left is whether an agent this work improvised deserves a name.
|
|
332
350
|
|
|
333
351
|
1. **A harness with no file-defined agents** → the section does not exist; say so in one line if
|
|
334
352
|
there were useful specialists, so the brief is not mistaken for lost (it stays in `meta.json`).
|
|
@@ -376,7 +394,7 @@ exist get what this work showed they lacked.
|
|
|
376
394
|
|
|
377
395
|
`meta.json.worktree` null → skip silently; there is nothing here that can go wrong.
|
|
378
396
|
|
|
379
|
-
Everything above this line ran in a worktree, and several of the tools it called had no way of knowing that. A configured tool
|
|
397
|
+
Everything above this line ran in a worktree, and several of the tools it called had no way of knowing that. A configured tool is started once per session, resolves the repo from the directory it was started in, and takes no root in its call. A worktree is the same repo with another tree, so its output can land in the **main checkout**, which is standing on another branch, while the branch §4 just pushed goes out without it. `knowledge.save` was the first one this caught, and its writes are now moved into the worktree before the commit (flow-core §0 step 4); this check is the net for every other tool, and for a move that went wrong. Nothing in the invocation could have corrected that: flow is the only party that knows `meta.json.worktree` is set, and this is the only place that knows the push already happened.
|
|
380
398
|
|
|
381
399
|
So, before the Close:
|
|
382
400
|
|
|
@@ -386,7 +404,7 @@ git -C "$(git rev-parse --path-format=absolute --git-common-dir)/.." status --po
|
|
|
386
404
|
|
|
387
405
|
Empty → say nothing at all. Non-empty → **one line naming the paths**, and what it means in plain words: they are sitting in the main checkout, not in the branch that was pushed. Say it as a reading, never as an accusation — that checkout may have been dirty before this work started, and only the user can tell their own leftovers from what this run put there.
|
|
388
406
|
|
|
389
|
-
Then offer once, with `AskUserQuestion` **in every autonomy mode** (it edits two trees): **carry them over** — copy the paths the user confirms into this worktree, commit onto the branch, push, and the MR/PR from §4 updates itself — or **leave them**, which is the right answer whenever what is sitting there belongs to the other branch. Either way the Close reports what was decided: a `ship` that quietly repaired two checkouts is worse than one that named the problem and left it standing.
|
|
407
|
+
Then offer once, with `AskUserQuestion` **in every autonomy mode** (it edits two trees): **carry them over** — copy the paths the user confirms into this worktree, take them out of the main checkout as flow-core §0 step 4 does, commit onto the branch with `git -C <worktree>` (a push launched from the main checkout's directory can be refused by a guard that sees the base branch there), push, and the MR/PR from §4 updates itself — or **leave them**, which is the right answer whenever what is sitting there belongs to the other branch. Either way the Close reports what was decided: a `ship` that quietly repaired two checkouts is worse than one that named the problem and left it standing.
|
|
390
408
|
|
|
391
409
|
## 6. Close
|
|
392
410
|
|
|
@@ -570,6 +588,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
570
588
|
|
|
571
589
|
Only if `phase = "done"`:
|
|
572
590
|
- Delete the candidate anchor `/flow-feat-review §1.5` left behind: `git update-ref -d refs/flow/candidate/<TICKET>`. It existed to stop the object being collected while the gate still needed it; the gate has run. No question — it is local, it was never pushed, and nothing reads it after this. Absent already → nothing to do.
|
|
591
|
+
- Clear this branch's staging (flow-core §0 step 7) when `meta.json.knowledge.status` is `consolidated` or `declined` and the store has that notion. No question: what it held is saved, or was refused. `later`/`failed` → leave it; §5 still owes it.
|
|
573
592
|
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
574
593
|
- If `meta.json.worktree` is not null, offer to remove the worktree (from the main checkout) with `git worktree remove <worktree>` (`--force` only if it still has changes the user confirms discarding). Never without confirmation, never if the MR/PR is not yet merged.
|
|
575
594
|
|
|
@@ -155,7 +155,7 @@ Another repo referenced but **no** contract → say so in one line — *"the `<r
|
|
|
155
155
|
|
|
156
156
|
## 3.7 Roadmap item
|
|
157
157
|
|
|
158
|
-
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
|
|
158
|
+
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, in its text or its ticket cell, 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 items by §10's *next* rule (dependencies met, not linked by another work), **none** as the last option; an item whose dependencies are not met is never offered, and one the ticket clearly names but that is blocked is linked anyway, with one line naming what it waits on; `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.
|
|
159
159
|
|
|
160
160
|
## 4. Classify size
|
|
161
161
|
|
|
@@ -79,7 +79,7 @@ Run, deduce, show what was found for confirmation or correction:
|
|
|
79
79
|
|
|
80
80
|
<!-- stack-detection:end -->
|
|
81
81
|
|
|
82
|
-
- **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
|
|
82
|
+
- **Roadmap** (`roadmap.path`, flow-core §10) — a markdown file at the root or under `docs/` with headings and either checkbox lines or tables with a state column, whose name or title says plan, roadmap, phases or milestones, in any language. `ROADMAP.md` or `docs/ROADMAP.md`, in any letter case → nothing to write, it is found by default. Tables whose header does not say plainly which column is the state, the ticket and the dependencies → propose `roadmap.columns` with the headers you would map, for confirmation. Any other → propose its path. Several → ask which one is the project's plan. None → leave the section out.
|
|
83
83
|
|
|
84
84
|
## 3. Ask five things
|
|
85
85
|
|