flow-workflows 0.105.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 +30 -7
- 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 +33 -15
- package/adapters/gemini/CORE.md +30 -7
- 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 +33 -15
- package/adapters/hermes/CORE.md +30 -7
- 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 +33 -15
- package/adapters/opencode/CORE.md +30 -7
- 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 +33 -15
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +19 -0
|
@@ -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.
|
|
@@ -121,6 +122,16 @@ Decide first whether **this** MR/PR *completes* the issue: it does when, after i
|
|
|
121
122
|
|
|
122
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.
|
|
123
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.
|
|
134
|
+
|
|
124
135
|
### Referencing other MRs/PRs of the plan in the body (never `#<n>`)
|
|
125
136
|
|
|
126
137
|
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)`).
|
|
@@ -204,6 +215,8 @@ Issue link: <keyword that will appear in the body, e.g. "Closes #123" / "Part of
|
|
|
204
215
|
Pre-deploy (manual SQL): <"yes — N statements, a blocking thread will be opened" / "not applicable">
|
|
205
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)
|
|
206
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>
|
|
207
220
|
|
|
208
221
|
Description:
|
|
209
222
|
<full description rendered exactly as it will appear in the MR/PR>
|
|
@@ -215,7 +228,8 @@ If there is pre-deploy SQL, ask the user to **explicitly confirm that the block
|
|
|
215
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>"):
|
|
216
229
|
|
|
217
230
|
- **Create with this content** → invoke §4.
|
|
218
|
-
- **
|
|
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.
|
|
219
233
|
- **Cancel** → stop without creating anything. Do not touch `meta.json`. The user can return to `/flow-feat-ship` later.
|
|
220
234
|
|
|
221
235
|
Do not push or invoke any creation command until the user has responded "Create with this content".
|
|
@@ -237,6 +251,7 @@ Only here — with the content approved in §3 — invoke `Skill commit-commands
|
|
|
237
251
|
|
|
238
252
|
- `git.assignee` not empty → assign to that user. `git.squash` `true` → enable squash-before-merge.
|
|
239
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.
|
|
240
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.
|
|
241
256
|
|
|
242
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.
|
|
@@ -316,20 +331,22 @@ no measurable change, not a percentage.
|
|
|
316
331
|
- Posting to the forge is outward-facing: show the comment and confirm with `AskUserQuestion`
|
|
317
332
|
**in every `autonomy.mode`**, exactly like the description preview in §3.
|
|
318
333
|
|
|
319
|
-
## 5.
|
|
334
|
+
## 5. Knowledge still owed (re-run only)
|
|
320
335
|
|
|
321
|
-
|
|
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.
|
|
322
337
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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.
|
|
327
344
|
|
|
328
345
|
## 5.1 Specialists created (offer)
|
|
329
346
|
|
|
330
347
|
Read `meta.json.specialists[]` (flow-core §6.6). **No entry with `useful: true` and `status` unset
|
|
331
|
-
or `"later"` → skip this section and say nothing.** It comes after
|
|
332
|
-
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.
|
|
333
350
|
|
|
334
351
|
1. **A harness with no file-defined agents** → the section does not exist; say so in one line if
|
|
335
352
|
there were useful specialists, so the brief is not mistaken for lost (it stays in `meta.json`).
|
|
@@ -377,7 +394,7 @@ exist get what this work showed they lacked.
|
|
|
377
394
|
|
|
378
395
|
`meta.json.worktree` null → skip silently; there is nothing here that can go wrong.
|
|
379
396
|
|
|
380
|
-
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.
|
|
381
398
|
|
|
382
399
|
So, before the Close:
|
|
383
400
|
|
|
@@ -387,7 +404,7 @@ git -C "$(git rev-parse --path-format=absolute --git-common-dir)/.." status --po
|
|
|
387
404
|
|
|
388
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.
|
|
389
406
|
|
|
390
|
-
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.
|
|
391
408
|
|
|
392
409
|
## 6. Close
|
|
393
410
|
|
|
@@ -571,6 +588,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
571
588
|
|
|
572
589
|
Only if `phase = "done"`:
|
|
573
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.
|
|
574
592
|
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
575
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.
|
|
576
594
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.106.0",
|
|
4
4
|
"description": "Guided feat/bug workflows (start→ship), post-deploy monitoring and multi-agent code review, stack-agnostic. Each repo uses a shared FLOW.md plus optional harness overlay.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "flow",
|
|
4
4
|
"displayName": "Flow — guided dev workflows",
|
|
5
5
|
"description": "Guided feat/bug workflows (start→ship), post-deploy monitoring and multi-agent code review, stack-agnostic. Each repo uses a shared FLOW.md plus optional harness overlay.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.106.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,25 @@ plugin and is what `/flow:news` reads to show you what changed since your previo
|
|
|
5
5
|
|
|
6
6
|
The canonical, richest notes live in the [GitHub Releases](https://github.com/mashware/flow-workflows/releases).
|
|
7
7
|
|
|
8
|
+
## v0.106.0 — The knowledge a work learned ships in its own MR/PR · 2026-11-02
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **Knowledge is approved with the MR/PR, and saved before its commit.** `feat:ship` lists the findings to save in
|
|
12
|
+
the same preview as the title and description. Once you approve, it saves them and commits the files with the change.
|
|
13
|
+
It no longer offers them after the push, when the MR/PR had already gone out without them.
|
|
14
|
+
- **With a worktree, the files land in the branch, not in the main checkout.** A knowledge tool writes where its
|
|
15
|
+
session started, so flow now moves what it wrote into the work's worktree and leaves the main checkout as it found
|
|
16
|
+
it. That covers `ship`, a bug's `postmortem` and the mid-work offer in `daily`.
|
|
17
|
+
- **A small bug saves its knowledge too.** An XS/S fix has no postmortem, so what `investigate`, `validate` and
|
|
18
|
+
`review` staged was never saved. `bug:ship` now gathers it and ships it with the fix.
|
|
19
|
+
- **Knowledge left for later is not forgotten.** Postponed, failed or skipped by an unattended run, it is recorded in
|
|
20
|
+
`meta.json` and offered again by the next `ship`. The files go onto the open branch, or into a knowledge-only MR/PR
|
|
21
|
+
once the work has merged.
|
|
22
|
+
- **The staging is cleared when the work closes**, so `daily` stops offering findings that already shipped.
|
|
23
|
+
|
|
24
|
+
Until now, in a repo with `git.worktree: always`, every work's knowledge files ended up in the main checkout after
|
|
25
|
+
the push. Two works merged without them and needed a separate MR/PR just for the cards (#230, #167).
|
|
26
|
+
|
|
8
27
|
## v0.105.0 — A roadmap kept as tables: flow reads its dependencies and sees the rows the code already delivered · 2026-11-02
|
|
9
28
|
|
|
10
29
|
**In short**
|