flow-workflows 0.110.0 → 0.112.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 +60 -3
- package/adapters/codex/skills/flow-bug-ship/SKILL.md +1 -1
- package/adapters/codex/skills/flow-doctor/SKILL.md +1 -0
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +1 -1
- package/adapters/codex/skills/flow-init/SKILL.md +53 -2
- package/adapters/codex/skills/flow-work-README/SKILL.md +2 -0
- package/adapters/codex/skills/flow-work-abandon/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-clean/SKILL.md +1 -1
- package/adapters/gemini/CORE.md +60 -3
- package/adapters/gemini/commands/flow/bug/ship.toml +1 -1
- package/adapters/gemini/commands/flow/doctor.toml +1 -0
- package/adapters/gemini/commands/flow/feat/ship.toml +1 -1
- package/adapters/gemini/commands/flow/init.toml +53 -2
- package/adapters/gemini/commands/flow/work/README.toml +2 -0
- package/adapters/gemini/commands/flow/work/abandon.toml +1 -1
- package/adapters/gemini/commands/flow/work/clean.toml +1 -1
- package/adapters/hermes/CORE.md +60 -3
- package/adapters/hermes/skills/flow-bug-ship/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-doctor/SKILL.md +1 -0
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-init/SKILL.md +53 -2
- package/adapters/hermes/skills/flow-work-README/SKILL.md +2 -0
- package/adapters/hermes/skills/flow-work-abandon/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-clean/SKILL.md +1 -1
- package/adapters/opencode/CORE.md +60 -3
- package/adapters/opencode/commands/flow-bug-ship.md +1 -1
- package/adapters/opencode/commands/flow-doctor.md +1 -0
- package/adapters/opencode/commands/flow-feat-ship.md +1 -1
- package/adapters/opencode/commands/flow-init.md +53 -2
- package/adapters/opencode/commands/flow-work-README.md +2 -0
- package/adapters/opencode/commands/flow-work-abandon.md +1 -1
- package/adapters/opencode/commands/flow-work-clean.md +1 -1
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +37 -0
- package/plugins/flow/examples/FLOW.template.md +8 -0
package/adapters/codex/CORE.md
CHANGED
|
@@ -17,7 +17,7 @@ Every `$flow-*` command assumes these rules. They are stated once, here, so a co
|
|
|
17
17
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
18
18
|
`flow-core`" means this file.
|
|
19
19
|
|
|
20
|
-
**This file belongs to flow `0.
|
|
20
|
+
**This file belongs to flow `0.112.0`.** Compare it once, at the start of the session, against
|
|
21
21
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
22
22
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
23
23
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -117,7 +117,7 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
117
117
|
prints that file with it — "`agents: opus` (`FLOW.claude.md`)", never the value alone. `doctor` reports it and later
|
|
118
118
|
edits preserve it.
|
|
119
119
|
- The sections in any of the files are tracker, git, autonomy, quality, agents, models, data,
|
|
120
|
-
conventions, notes, knowledge, and
|
|
120
|
+
conventions, notes, knowledge, observability, roadmap, and panel. No layer found, or an effective empty key
|
|
121
121
|
→ the default or auto-discovery each step names. Never stop because a file or key is empty.
|
|
122
122
|
- **An empty key that is a real decision for this repo is offered where it first matters**, and
|
|
123
123
|
nowhere else. Three steps, in order:
|
|
@@ -674,7 +674,9 @@ right now. **Any progress line you were about to type into the chat is a panel u
|
|
|
674
674
|
available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
|
|
675
675
|
**stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
|
|
676
676
|
all. When they are not there, write the file (§4.3). No work folder (lightweight
|
|
677
|
-
`respond`/`green`) → nothing to publish, either way.
|
|
677
|
+
`respond`/`green`) → nothing to publish, either way. With `panel.artifact` set, each publication is
|
|
678
|
+
also mirrored to a claude.ai page that gathers every work of every repo (§4.6) — in addition to the
|
|
679
|
+
transport, never instead of it.
|
|
678
680
|
|
|
679
681
|
**Look for them before you conclude they are missing**, once per session, in pre-flight. A harness
|
|
680
682
|
namespaces an MCP server's tools, so what you are looking for is a tool whose name *ends* in
|
|
@@ -803,6 +805,61 @@ that reports no figure is recorded with `"source": "not reported"` rather than e
|
|
|
803
805
|
phase with no entry measured nothing — **absence is not zero**. Every figure is the harness's own
|
|
804
806
|
client-side estimate and can differ from a bill.
|
|
805
807
|
|
|
808
|
+
### 4.6 The artifact mirror — one page for every work, opt-in
|
|
809
|
+
|
|
810
|
+
Someone running flow in several consoles, across several repos, has one panel per pane and no view
|
|
811
|
+
of them together. `panel.artifact` in the FLOW config — the URL of a claude.ai artifact, which
|
|
812
|
+
`$flow-init room` publishes from `examples/panel-artifact.html` or finds among the person's own —
|
|
813
|
+
turns on a mirror: each work writes its own card to that
|
|
814
|
+
page's shared database, and the page shows every card, grouped by repo. Empty or absent → this
|
|
815
|
+
section does not exist: no artifact tool is loaded or called.
|
|
816
|
+
|
|
817
|
+
- **Only where the tool is.** The writes go through the tool whose name ends in `ArtifactData` —
|
|
818
|
+
interactive Claude Code, and possibly **deferred** (load it, as §4 says of the panel tools).
|
|
819
|
+
Absent → the mirror is off, in silence: no line, no error. A headless run (`claude -p`, an
|
|
820
|
+
`unattended` container) has no such tool, and other harnesses never read `FLOW.claude.md`, where
|
|
821
|
+
the key belongs.
|
|
822
|
+
- **When**: right after the transport publishes, at §4.4 (a) to (e) — a phase's own publications
|
|
823
|
+
(`ship` the moment an MR/PR URL exists, `plan`, `resume`, `watch`, `abandon`) are among them. At
|
|
824
|
+
(f), a plan step, only when the card's last write is 10 minutes old or more: every write is a
|
|
825
|
+
tool call, and outside auto mode a prompt, while a card left alone for 30 minutes reads as a dead
|
|
826
|
+
session on the page.
|
|
827
|
+
- **What**: what the terminal now shows, never a document rebuilt in your head. On the file
|
|
828
|
+
transport, the §4.1 document just written. Over the tools, what `panel_get` returns right after a
|
|
829
|
+
publication that applied — a refused patch changed nothing on screen and writes nothing here.
|
|
830
|
+
Then set, whichever transport:
|
|
831
|
+
- `updated_at` — the real clock (`date -Iseconds`); over the tools the app stamps arrival itself,
|
|
832
|
+
so the document carries none of its own.
|
|
833
|
+
- `attention` — as §4.2 defines it, on the file transport too: `wait` while a `Decision` is
|
|
834
|
+
parked on the user, `block` while stuck on somebody else, absent while simply working — and
|
|
835
|
+
`done` only once the work is over: `meta.json.phase` set to `done`, or `abandon` (whose terminal
|
|
836
|
+
panel clears `attention` and carries a `block` line; the card says `done`). An open MR/PR
|
|
837
|
+
waiting to merge is not over. The page reads the state from this field alone.
|
|
838
|
+
- `repo` (the repo id below), `work` (the work folder's name), `ticket`, `type`, `branch`, and
|
|
839
|
+
`harness` (`Claude Code`), from `meta.json` and git.
|
|
840
|
+
- **Where**: action `set` — the whole document, so a line dropped from the panel leaves the card —
|
|
841
|
+
`url` the key's value, collection `works`, doc id `<repo id>--<work folder>`. The repo id is the
|
|
842
|
+
path of `git remote get-url origin` — everything after the host, which ends at the first `/` after
|
|
843
|
+
`//` (`https://host/owner/repo.git`, `ssh://git@host:22/owner/repo.git`) or at the first `:`
|
|
844
|
+
(`git@host:owner/repo.git`) — with `.git` dropped and every `/` turned into `.`: `owner.repo`,
|
|
845
|
+
`group.subgroup.repo`. No remote → the main checkout's directory name (§0). Any character outside
|
|
846
|
+
`[A-Za-z0-9_.~:@+-]` becomes `-`.
|
|
847
|
+
- **Version**: a write to a card that exists needs `if_version`, the version the last write
|
|
848
|
+
returned. Keep it in the session — one writer per card, so it is right until the session loses
|
|
849
|
+
it. None held → one `get` first: the card exists → pin to its version; it does not → write
|
|
850
|
+
unpinned. A write refused for its version — stale, or missing on a card that exists — is not a
|
|
851
|
+
failure: one retry pinned to the version the refusal names, or to the one a single `get` returns.
|
|
852
|
+
Then remember what the write returned.
|
|
853
|
+
- **A card ends with its work folder.** Whatever moves a work folder to `_archive/` — `abandon`,
|
|
854
|
+
`clean`, the archive offer at `ship`'s Close — first deletes that work's card: action `delete`,
|
|
855
|
+
pinned to the version held, or to the one a single `get` returns; no card → nothing to do. The
|
|
856
|
+
mirror off or the key empty → nothing to do. A folder moved back out of `_archive/` gets its card
|
|
857
|
+
again at its next publication.
|
|
858
|
+
- **Failure never stops a phase.** A second version refusal → no more retries for that
|
|
859
|
+
publication. Any other failure — a wrong URL, auth, a permission prompt the user declined — turns
|
|
860
|
+
the mirror off for the rest of the session. Either way the next stop carries one line,
|
|
861
|
+
`artifact panel: <error>`, once.
|
|
862
|
+
|
|
806
863
|
## 5. Work summary — `00-summary.md`
|
|
807
864
|
|
|
808
865
|
Each phase reads what the previous ones wrote. Reading every artifact whole on every phase is the
|
|
@@ -213,5 +213,5 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
213
213
|
- **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.
|
|
214
214
|
- **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.
|
|
215
215
|
- **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).
|
|
216
|
-
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`.
|
|
216
|
+
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`. Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
217
217
|
- 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.
|
|
@@ -226,6 +226,7 @@ refuse) · **degraded** (it runs, quietly worse than the config promises), plus
|
|
|
226
226
|
that fits, else `general-purpose` (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
|
|
227
227
|
- Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
|
|
228
228
|
- **Where the live panel will go this session** (flow-core §4): a tool whose name ends in `panel_set` / `panel_patch` — namespaced by the harness (`mcp__panel__panel_set` on Claude Code) and possibly **deferred**, which reads as absent until the list of deferred tools is checked → the terminal draws the panel and no `panel.json` is written; genuinely absent → the panel is that file, as before. Neither is a fault — one line naming the tools as they are actually called here, or saying the file is the transport.
|
|
229
|
+
- **The artifact mirror** (flow-core §4.6) — `panel.artifact` empty and the artifact tools here → one information line, not a fault: *control room off — `$flow-init room` turns it on*. Set: one line with its value and the file it came from; whether a tool whose name ends in `ArtifactData` is here (deferred counts); and, when it is, whether a `list` of collection `works` (limit 1) on that URL answers — a read, never a write. Tool present → also name the rule that keeps every card update from asking — `ArtifactData` (as the harness calls it) under `permissions.allow` — and its cost in the same line: it lets any session write to the data of any of your artifacts without asking, not only this page's; without it, each card update is approved by hand. The value coming from any file but `FLOW.claude.md` → a fault: the URL is one person's page, and a committed `FLOW.md` hands it to every teammate, whose writes it refuses. Key set and no tool → *off in this harness*, not a fault. The read failing → the error, as a fault.
|
|
229
230
|
|
|
230
231
|
### 2.3 Knowledge sources
|
|
231
232
|
|
|
@@ -595,7 +595,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
595
595
|
Only if `phase = "done"`:
|
|
596
596
|
- 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.
|
|
597
597
|
- 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.
|
|
598
|
-
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
598
|
+
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`). Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
599
599
|
- 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.
|
|
600
600
|
|
|
601
601
|
On a **train MR/PR** neither offer fires (`phase` is not `done`; the branch is the base of the next one). When shipping an intermediate MR/PR whose predecessor has since merged, say so in one line and point at `$flow-work-clean`, which sweeps the whole backlog at once. Mention it once per work, not per MR/PR.
|
|
@@ -5,7 +5,7 @@ description: "Assistant that generates FLOW.md and its optional harness overlay
|
|
|
5
5
|
|
|
6
6
|
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/init.md — do not edit; change the plugin file and run the script. -->
|
|
7
7
|
|
|
8
|
-
# `$flow-init`
|
|
8
|
+
# `$flow-init $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
> **codex adapter — how the Claude Code primitives named below map here.**
|
|
11
11
|
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
@@ -30,6 +30,12 @@ auto-detected and only confirmed.
|
|
|
30
30
|
|
|
31
31
|
Key names and contract: `examples/FLOW.template.md` from the plugin. Do not invent keys that are not there.
|
|
32
32
|
|
|
33
|
+
**`$ARGUMENTS` is `room`** → run only §4.5, the control room, and end there — for a repo that is
|
|
34
|
+
already set up. Neither `FLOW.md` nor the active overlay exists → say so in one line and run the
|
|
35
|
+
whole command instead: the room is offered at its close, and a repo never ends with an overlay that
|
|
36
|
+
holds nothing but the room while nobody was asked the rest. Any other `$ARGUMENTS` → ignore it and
|
|
37
|
+
run the whole command.
|
|
38
|
+
|
|
33
39
|
## 1. If either configuration file already exists
|
|
34
40
|
|
|
35
41
|
Show `FLOW.md` and the active overlay when each exists, then show their effective merged values —
|
|
@@ -143,7 +149,7 @@ phase, so their size is paid on every step:
|
|
|
143
149
|
current file unless the user explicitly requested a split.
|
|
144
150
|
- Two-line header in each file: whether it is the shared base or which harness it overlays, and that
|
|
145
151
|
the plugin's `examples/FLOW.template.md` documents every key, merge rule, and default.
|
|
146
|
-
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
152
|
+
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, roadmap, panel, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
147
153
|
- Empty keys are omitted from the base (absent = default). In an overlay, preserve or write an empty
|
|
148
154
|
key only when it intentionally masks a non-empty base value; removing it would change the
|
|
149
155
|
effective config. A section with no set or masking key is omitted. **The two base-file exceptions
|
|
@@ -154,6 +160,49 @@ phase, so their size is paid on every step:
|
|
|
154
160
|
|
|
155
161
|
- **A worked example exists for one stack.** When detection says PHP (a `composer.json`, a `symfony.lock`, a `bin/console`), add **one line** to the close: *"an example `FLOW.md` and agent set for Symfony ship with the plugin under `examples/symfony/` — copy what applies."* Never copy anything on your own, and never mention it for another stack: it is one stack's answer, not a default.
|
|
156
162
|
|
|
163
|
+
## 4.5 Control room — one page for every work (Claude Code)
|
|
164
|
+
|
|
165
|
+
Plain `init` runs this **from §5's close**, as its last question; `init room` runs it alone. Either
|
|
166
|
+
way, leaving this section ends only this section.
|
|
167
|
+
|
|
168
|
+
Only when a tool whose name ends in `Artifact` and one ending in `ArtifactData` are both here
|
|
169
|
+
(deferred counts: load them) — interactive Claude Code. Neither → plain `init` says nothing about
|
|
170
|
+
it; `init room` says in one line that the control room needs an interactive Claude Code session.
|
|
171
|
+
|
|
172
|
+
The control room is the page flow-core §4.6 mirrors every work's panel to; each person has one, and
|
|
173
|
+
every repo they work in points at it.
|
|
174
|
+
|
|
175
|
+
1. **Already set?** `panel.artifact` resolves (flow-core §0) from `FLOW.claude.md` → say where it
|
|
176
|
+
points; nothing else to do. From any other file → it is one person's page handed to whoever
|
|
177
|
+
reads that file (doctor flags it): offer, in the question of step 4, to move it to
|
|
178
|
+
`FLOW.claude.md`.
|
|
179
|
+
2. **Find theirs.** Artifact `list`, scope `mine`, `limit` 200, every page of it (`page_token`
|
|
180
|
+
until none is left): the artifacts titled exactly `Flow Control Room`. A page past the first 25
|
|
181
|
+
is still theirs, and a second page would split their works in two. Read `works` once (ArtifactData
|
|
182
|
+
`list`, limit 1) on each candidate you will offer: a page that refuses it was published without
|
|
183
|
+
its database and cannot hold cards — leave it out.
|
|
184
|
+
3. **Can the key be kept out of git?** `git ls-files --error-unmatch FLOW.claude.md` succeeds → the
|
|
185
|
+
overlay is tracked, and anything written there reaches the team: do not write the key — say so,
|
|
186
|
+
and that untracking the file (`git rm --cached FLOW.claude.md`, then ignoring it) is the user's
|
|
187
|
+
call. Not tracked and not git-ignored (`git check-ignore -q FLOW.claude.md` fails — `.git/info/exclude` counts as ignored) → the step-4 question also asks to ignore it, unless §5
|
|
188
|
+
already asked that this run.
|
|
189
|
+
4. **One `AskUserQuestion`**, before anything is published or written. Options: each page found in
|
|
190
|
+
step 2, most recently updated first, at most three — or, when none was found, **publish your
|
|
191
|
+
control room** — and **not now**. With a page found, **publish a new one** stays as an option
|
|
192
|
+
only when fewer than three were offered. The ignore part of step 3 and the move of step 1 ride
|
|
193
|
+
along in the same question.
|
|
194
|
+
5. **Publish, when chosen.** Copy `~/.claude/flow/examples/panel-artifact.html` into the
|
|
195
|
+
session's scratchpad (the Artifact tool publishes only from the working directory or the
|
|
196
|
+
scratchpad, and the plugin's folder is neither), read it whole, load whatever the harness asks
|
|
197
|
+
for before passing `capabilities`, and publish that copy as a new artifact with the capabilities
|
|
198
|
+
its header names. Nobody types a path or a version: the plugin knows where it is.
|
|
199
|
+
6. **Write the key** — `- artifact: <url>` under `## panel` in `FLOW.claude.md`, in the template's
|
|
200
|
+
section order (§4): the section exists → replace the value; the file exists without it → insert
|
|
201
|
+
the section where that order puts it; absent → create the file with the two-line header of §4
|
|
202
|
+
and that section alone. Then the ignore line, if it was accepted.
|
|
203
|
+
7. **One line**: the URL, whether it was reused or published, and that `$flow-doctor` checks it and
|
|
204
|
+
names the permission rule that stops each card update from asking.
|
|
205
|
+
|
|
157
206
|
## 5. Close
|
|
158
207
|
|
|
159
208
|
- Summarize on screen: what was written to the base, what was written to the active overlay, and
|
|
@@ -169,4 +218,6 @@ phase, so their size is paid on every step:
|
|
|
169
218
|
(`FLOW.<context>.md`, flow-core §0), which a repo commits on purpose. Do not use a recursive
|
|
170
219
|
pattern either: examples under the plugin must remain visible.
|
|
171
220
|
- Git-ignore `.claude/work/` too — recommended default: ignore it (artifacts are personal working state; teams that want to share them commit deliberately). `git.worktree` not `off` → offer `.worktrees/` in the same gesture.
|
|
221
|
+
- **The control room** (§4.5), when the artifact tools are here and `panel.artifact` is empty: offer
|
|
222
|
+
it as the last question of the close.
|
|
172
223
|
- Suggest `$flow-next` as the next step (it routes to `$flow-feat-start`, `$flow-work-resume` or `$flow-work-daily`).
|
|
@@ -220,6 +220,8 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
220
220
|
|
|
221
221
|
**No headings over the train.** A shipped MR/PR is *open, waiting to merge*; `mark` says it per entry — `wait` shipped, `current` being worked, `done` only merged.
|
|
222
222
|
|
|
223
|
+
**The artifact mirror** (opt-in, flow-core §4.6). With `panel.artifact` set — in `FLOW.claude.md`, Claude Code only — each publication is also written (a per-step patch only when the card is 10 minutes old), whole, as one card of a claude.ai page that gathers every work of every repo: doc `<owner.repo>--<work folder>` in collection `works`, the document above plus `updated_at`, `attention` (on either transport) and `repo`, `work`, `ticket`, `type`, `branch`, `harness`. The page is `examples/panel-artifact.html`, published once by hand. The transport above is unchanged.
|
|
224
|
+
|
|
223
225
|
**Who publishes it.** The 18 phase commands (flow-core §4); `$flow-feat-ship` and `$flow-bug-ship` the instant an MR/PR URL exists; `$flow-feat-plan` when the train is populated — a new train is a new shape, so a full republish; `$flow-work-resume` (§5), after reading what is on screen; `$flow-work-watch` every cycle; `$flow-work-abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never publish; `$flow-work-clean` archives the folder with any panel file inside.
|
|
224
226
|
|
|
225
227
|
## Shortcuts by size
|
|
@@ -94,7 +94,7 @@ Ask the user what to do with the branch — do not decide alone:
|
|
|
94
94
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
95
95
|
- **Tracker: move to won't-do** (never "done" — this work did not ship). Only if `tracker.tool` is not `none`/empty, `tracker.abandon_cmd` is set, and `meta.json.ticket` is a **real tracker id** (skip for local-only slugs). Run `tracker.abandon_cmd` substituting `{TICKET}` = `meta.json.ticket`. Same contract as `$flow-feat-start §6.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-in-state ticket → warn and continue, never block. `tracker.abandon_cmd` empty → do nothing (the user closes the ticket by hand if they want).
|
|
96
96
|
- Panel published for this work (flow-core §4) → publish a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line, and `attention` cleared where the panel tools carry it — nothing is waiting on anyone any more.
|
|
97
|
-
-
|
|
97
|
+
- Delete the work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*), then move the folder to `.claude/work/_archive/` **keeping its directory name** (`_archive/<work-dir>/`, the folder located in §1 — e.g. `<TICKET>-<slug>`) so `$flow-work-daily` no longer lists it.
|
|
98
98
|
- Report to the user: ticket abandoned, reason, what was done with the branch.
|
|
99
99
|
|
|
100
100
|
## Recovery
|
|
@@ -189,7 +189,7 @@ Execute in this order (a branch cannot be deleted while a worktree holds it):
|
|
|
189
189
|
|
|
190
190
|
1. **Worktrees** — `git worktree remove <path>`. No `--force`, ever: §5 excluded the dirty ones, so a failure means something changed since the inventory. Stop that row, report it, continue.
|
|
191
191
|
2. **Branches** — `git branch -d <branch>` first. Git refuses on a squash merge; only then `git branch -D`, and only for rows whose verdict came from **the forge** (§4a) — never a locally inferred one. Name it in the report: `-D (squash-merged, MR #401)`.
|
|
192
|
-
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `$flow-work-abandon` §6 does. Never `rm`.
|
|
192
|
+
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `$flow-work-abandon` §6 does. Never `rm`. Before each move, delete that work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*).
|
|
193
193
|
4. **Prune** — `git worktree prune`.
|
|
194
194
|
|
|
195
195
|
Never touch the remote (no `git push --delete`; deleting merged remote branches is the forge's job).
|
package/adapters/gemini/CORE.md
CHANGED
|
@@ -16,7 +16,7 @@ Every `/flow:*` command assumes these rules. They are stated once, here, so a co
|
|
|
16
16
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
17
17
|
`flow-core`" means this file.
|
|
18
18
|
|
|
19
|
-
**This file belongs to flow `0.
|
|
19
|
+
**This file belongs to flow `0.112.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
|
|
@@ -116,7 +116,7 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
116
116
|
prints that file with it — "`agents: opus` (`FLOW.claude.md`)", never the value alone. `doctor` reports it and later
|
|
117
117
|
edits preserve it.
|
|
118
118
|
- The sections in any of the files are tracker, git, autonomy, quality, agents, models, data,
|
|
119
|
-
conventions, notes, knowledge, and
|
|
119
|
+
conventions, notes, knowledge, observability, roadmap, and panel. No layer found, or an effective empty key
|
|
120
120
|
→ the default or auto-discovery each step names. Never stop because a file or key is empty.
|
|
121
121
|
- **An empty key that is a real decision for this repo is offered where it first matters**, and
|
|
122
122
|
nowhere else. Three steps, in order:
|
|
@@ -673,7 +673,9 @@ right now. **Any progress line you were about to type into the chat is a panel u
|
|
|
673
673
|
available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
|
|
674
674
|
**stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
|
|
675
675
|
all. When they are not there, write the file (§4.3). No work folder (lightweight
|
|
676
|
-
`respond`/`green`) → nothing to publish, either way.
|
|
676
|
+
`respond`/`green`) → nothing to publish, either way. With `panel.artifact` set, each publication is
|
|
677
|
+
also mirrored to a claude.ai page that gathers every work of every repo (§4.6) — in addition to the
|
|
678
|
+
transport, never instead of it.
|
|
677
679
|
|
|
678
680
|
**Look for them before you conclude they are missing**, once per session, in pre-flight. A harness
|
|
679
681
|
namespaces an MCP server's tools, so what you are looking for is a tool whose name *ends* in
|
|
@@ -802,6 +804,61 @@ that reports no figure is recorded with `"source": "not reported"` rather than e
|
|
|
802
804
|
phase with no entry measured nothing — **absence is not zero**. Every figure is the harness's own
|
|
803
805
|
client-side estimate and can differ from a bill.
|
|
804
806
|
|
|
807
|
+
### 4.6 The artifact mirror — one page for every work, opt-in
|
|
808
|
+
|
|
809
|
+
Someone running flow in several consoles, across several repos, has one panel per pane and no view
|
|
810
|
+
of them together. `panel.artifact` in the FLOW config — the URL of a claude.ai artifact, which
|
|
811
|
+
`/flow:init room` publishes from `examples/panel-artifact.html` or finds among the person's own —
|
|
812
|
+
turns on a mirror: each work writes its own card to that
|
|
813
|
+
page's shared database, and the page shows every card, grouped by repo. Empty or absent → this
|
|
814
|
+
section does not exist: no artifact tool is loaded or called.
|
|
815
|
+
|
|
816
|
+
- **Only where the tool is.** The writes go through the tool whose name ends in `ArtifactData` —
|
|
817
|
+
interactive Claude Code, and possibly **deferred** (load it, as §4 says of the panel tools).
|
|
818
|
+
Absent → the mirror is off, in silence: no line, no error. A headless run (`claude -p`, an
|
|
819
|
+
`unattended` container) has no such tool, and other harnesses never read `FLOW.claude.md`, where
|
|
820
|
+
the key belongs.
|
|
821
|
+
- **When**: right after the transport publishes, at §4.4 (a) to (e) — a phase's own publications
|
|
822
|
+
(`ship` the moment an MR/PR URL exists, `plan`, `resume`, `watch`, `abandon`) are among them. At
|
|
823
|
+
(f), a plan step, only when the card's last write is 10 minutes old or more: every write is a
|
|
824
|
+
tool call, and outside auto mode a prompt, while a card left alone for 30 minutes reads as a dead
|
|
825
|
+
session on the page.
|
|
826
|
+
- **What**: what the terminal now shows, never a document rebuilt in your head. On the file
|
|
827
|
+
transport, the §4.1 document just written. Over the tools, what `panel_get` returns right after a
|
|
828
|
+
publication that applied — a refused patch changed nothing on screen and writes nothing here.
|
|
829
|
+
Then set, whichever transport:
|
|
830
|
+
- `updated_at` — the real clock (`date -Iseconds`); over the tools the app stamps arrival itself,
|
|
831
|
+
so the document carries none of its own.
|
|
832
|
+
- `attention` — as §4.2 defines it, on the file transport too: `wait` while a `Decision` is
|
|
833
|
+
parked on the user, `block` while stuck on somebody else, absent while simply working — and
|
|
834
|
+
`done` only once the work is over: `meta.json.phase` set to `done`, or `abandon` (whose terminal
|
|
835
|
+
panel clears `attention` and carries a `block` line; the card says `done`). An open MR/PR
|
|
836
|
+
waiting to merge is not over. The page reads the state from this field alone.
|
|
837
|
+
- `repo` (the repo id below), `work` (the work folder's name), `ticket`, `type`, `branch`, and
|
|
838
|
+
`harness` (`Claude Code`), from `meta.json` and git.
|
|
839
|
+
- **Where**: action `set` — the whole document, so a line dropped from the panel leaves the card —
|
|
840
|
+
`url` the key's value, collection `works`, doc id `<repo id>--<work folder>`. The repo id is the
|
|
841
|
+
path of `git remote get-url origin` — everything after the host, which ends at the first `/` after
|
|
842
|
+
`//` (`https://host/owner/repo.git`, `ssh://git@host:22/owner/repo.git`) or at the first `:`
|
|
843
|
+
(`git@host:owner/repo.git`) — with `.git` dropped and every `/` turned into `.`: `owner.repo`,
|
|
844
|
+
`group.subgroup.repo`. No remote → the main checkout's directory name (§0). Any character outside
|
|
845
|
+
`[A-Za-z0-9_.~:@+-]` becomes `-`.
|
|
846
|
+
- **Version**: a write to a card that exists needs `if_version`, the version the last write
|
|
847
|
+
returned. Keep it in the session — one writer per card, so it is right until the session loses
|
|
848
|
+
it. None held → one `get` first: the card exists → pin to its version; it does not → write
|
|
849
|
+
unpinned. A write refused for its version — stale, or missing on a card that exists — is not a
|
|
850
|
+
failure: one retry pinned to the version the refusal names, or to the one a single `get` returns.
|
|
851
|
+
Then remember what the write returned.
|
|
852
|
+
- **A card ends with its work folder.** Whatever moves a work folder to `_archive/` — `abandon`,
|
|
853
|
+
`clean`, the archive offer at `ship`'s Close — first deletes that work's card: action `delete`,
|
|
854
|
+
pinned to the version held, or to the one a single `get` returns; no card → nothing to do. The
|
|
855
|
+
mirror off or the key empty → nothing to do. A folder moved back out of `_archive/` gets its card
|
|
856
|
+
again at its next publication.
|
|
857
|
+
- **Failure never stops a phase.** A second version refusal → no more retries for that
|
|
858
|
+
publication. Any other failure — a wrong URL, auth, a permission prompt the user declined — turns
|
|
859
|
+
the mirror off for the rest of the session. Either way the next stop carries one line,
|
|
860
|
+
`artifact panel: <error>`, once.
|
|
861
|
+
|
|
805
862
|
## 5. Work summary — `00-summary.md`
|
|
806
863
|
|
|
807
864
|
Each phase reads what the previous ones wrote. Reading every artifact whole on every phase is the
|
|
@@ -209,6 +209,6 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
209
209
|
- **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.
|
|
210
210
|
- **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.
|
|
211
211
|
- **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).
|
|
212
|
-
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`.
|
|
212
|
+
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`. Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
213
213
|
- 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.
|
|
214
214
|
"""
|
|
@@ -222,6 +222,7 @@ refuse) · **degraded** (it runs, quietly worse than the config promises), plus
|
|
|
222
222
|
that fits, else `general-purpose` (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
|
|
223
223
|
- Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
|
|
224
224
|
- **Where the live panel will go this session** (flow-core §4): a tool whose name ends in `panel_set` / `panel_patch` — namespaced by the harness (`mcp__panel__panel_set` on Claude Code) and possibly **deferred**, which reads as absent until the list of deferred tools is checked → the terminal draws the panel and no `panel.json` is written; genuinely absent → the panel is that file, as before. Neither is a fault — one line naming the tools as they are actually called here, or saying the file is the transport.
|
|
225
|
+
- **The artifact mirror** (flow-core §4.6) — `panel.artifact` empty and the artifact tools here → one information line, not a fault: *control room off — `/flow:init room` turns it on*. Set: one line with its value and the file it came from; whether a tool whose name ends in `ArtifactData` is here (deferred counts); and, when it is, whether a `list` of collection `works` (limit 1) on that URL answers — a read, never a write. Tool present → also name the rule that keeps every card update from asking — `ArtifactData` (as the harness calls it) under `permissions.allow` — and its cost in the same line: it lets any session write to the data of any of your artifacts without asking, not only this page's; without it, each card update is approved by hand. The value coming from any file but `FLOW.claude.md` → a fault: the URL is one person's page, and a committed `FLOW.md` hands it to every teammate, whose writes it refuses. Key set and no tool → *off in this harness*, not a fault. The read failing → the error, as a fault.
|
|
225
226
|
|
|
226
227
|
### 2.3 Knowledge sources
|
|
227
228
|
|
|
@@ -591,7 +591,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
591
591
|
Only if `phase = "done"`:
|
|
592
592
|
- 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.
|
|
593
593
|
- 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.
|
|
594
|
-
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
594
|
+
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`). Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
595
595
|
- 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.
|
|
596
596
|
|
|
597
597
|
On a **train MR/PR** neither offer fires (`phase` is not `done`; the branch is the base of the next one). When shipping an intermediate MR/PR whose predecessor has since merged, say so in one line and point at `/flow:work:clean`, which sweeps the whole backlog at once. Mention it once per work, not per MR/PR.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description = "Assistant that generates FLOW.md and its optional harness overlay (auto-detects what it can, asks the minimum)"
|
|
3
3
|
|
|
4
4
|
prompt = """
|
|
5
|
-
# `/flow:init`
|
|
5
|
+
# `/flow:init {{args}}`
|
|
6
6
|
|
|
7
7
|
> **gemini adapter — how the Claude Code primitives named below map here.**
|
|
8
8
|
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
@@ -26,6 +26,12 @@ auto-detected and only confirmed.
|
|
|
26
26
|
|
|
27
27
|
Key names and contract: `examples/FLOW.template.md` from the plugin. Do not invent keys that are not there.
|
|
28
28
|
|
|
29
|
+
**`{{args}}` is `room`** → run only §4.5, the control room, and end there — for a repo that is
|
|
30
|
+
already set up. Neither `FLOW.md` nor the active overlay exists → say so in one line and run the
|
|
31
|
+
whole command instead: the room is offered at its close, and a repo never ends with an overlay that
|
|
32
|
+
holds nothing but the room while nobody was asked the rest. Any other `{{args}}` → ignore it and
|
|
33
|
+
run the whole command.
|
|
34
|
+
|
|
29
35
|
## 1. If either configuration file already exists
|
|
30
36
|
|
|
31
37
|
Show `FLOW.md` and the active overlay when each exists, then show their effective merged values —
|
|
@@ -139,7 +145,7 @@ phase, so their size is paid on every step:
|
|
|
139
145
|
current file unless the user explicitly requested a split.
|
|
140
146
|
- Two-line header in each file: whether it is the shared base or which harness it overlays, and that
|
|
141
147
|
the plugin's `examples/FLOW.template.md` documents every key, merge rule, and default.
|
|
142
|
-
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
148
|
+
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, roadmap, panel, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
143
149
|
- Empty keys are omitted from the base (absent = default). In an overlay, preserve or write an empty
|
|
144
150
|
key only when it intentionally masks a non-empty base value; removing it would change the
|
|
145
151
|
effective config. A section with no set or masking key is omitted. **The two base-file exceptions
|
|
@@ -150,6 +156,49 @@ phase, so their size is paid on every step:
|
|
|
150
156
|
|
|
151
157
|
- **A worked example exists for one stack.** When detection says PHP (a `composer.json`, a `symfony.lock`, a `bin/console`), add **one line** to the close: *"an example `FLOW.md` and agent set for Symfony ship with the plugin under `examples/symfony/` — copy what applies."* Never copy anything on your own, and never mention it for another stack: it is one stack's answer, not a default.
|
|
152
158
|
|
|
159
|
+
## 4.5 Control room — one page for every work (Claude Code)
|
|
160
|
+
|
|
161
|
+
Plain `init` runs this **from §5's close**, as its last question; `init room` runs it alone. Either
|
|
162
|
+
way, leaving this section ends only this section.
|
|
163
|
+
|
|
164
|
+
Only when a tool whose name ends in `Artifact` and one ending in `ArtifactData` are both here
|
|
165
|
+
(deferred counts: load them) — interactive Claude Code. Neither → plain `init` says nothing about
|
|
166
|
+
it; `init room` says in one line that the control room needs an interactive Claude Code session.
|
|
167
|
+
|
|
168
|
+
The control room is the page flow-core §4.6 mirrors every work's panel to; each person has one, and
|
|
169
|
+
every repo they work in points at it.
|
|
170
|
+
|
|
171
|
+
1. **Already set?** `panel.artifact` resolves (flow-core §0) from `FLOW.claude.md` → say where it
|
|
172
|
+
points; nothing else to do. From any other file → it is one person's page handed to whoever
|
|
173
|
+
reads that file (doctor flags it): offer, in the question of step 4, to move it to
|
|
174
|
+
`FLOW.claude.md`.
|
|
175
|
+
2. **Find theirs.** Artifact `list`, scope `mine`, `limit` 200, every page of it (`page_token`
|
|
176
|
+
until none is left): the artifacts titled exactly `Flow Control Room`. A page past the first 25
|
|
177
|
+
is still theirs, and a second page would split their works in two. Read `works` once (ArtifactData
|
|
178
|
+
`list`, limit 1) on each candidate you will offer: a page that refuses it was published without
|
|
179
|
+
its database and cannot hold cards — leave it out.
|
|
180
|
+
3. **Can the key be kept out of git?** `git ls-files --error-unmatch FLOW.claude.md` succeeds → the
|
|
181
|
+
overlay is tracked, and anything written there reaches the team: do not write the key — say so,
|
|
182
|
+
and that untracking the file (`git rm --cached FLOW.claude.md`, then ignoring it) is the user's
|
|
183
|
+
call. Not tracked and not git-ignored (`git check-ignore -q FLOW.claude.md` fails — `.git/info/exclude` counts as ignored) → the step-4 question also asks to ignore it, unless §5
|
|
184
|
+
already asked that this run.
|
|
185
|
+
4. **One `AskUserQuestion`**, before anything is published or written. Options: each page found in
|
|
186
|
+
step 2, most recently updated first, at most three — or, when none was found, **publish your
|
|
187
|
+
control room** — and **not now**. With a page found, **publish a new one** stays as an option
|
|
188
|
+
only when fewer than three were offered. The ignore part of step 3 and the move of step 1 ride
|
|
189
|
+
along in the same question.
|
|
190
|
+
5. **Publish, when chosen.** Copy `~/.claude/flow/examples/panel-artifact.html` into the
|
|
191
|
+
session's scratchpad (the Artifact tool publishes only from the working directory or the
|
|
192
|
+
scratchpad, and the plugin's folder is neither), read it whole, load whatever the harness asks
|
|
193
|
+
for before passing `capabilities`, and publish that copy as a new artifact with the capabilities
|
|
194
|
+
its header names. Nobody types a path or a version: the plugin knows where it is.
|
|
195
|
+
6. **Write the key** — `- artifact: <url>` under `## panel` in `FLOW.claude.md`, in the template's
|
|
196
|
+
section order (§4): the section exists → replace the value; the file exists without it → insert
|
|
197
|
+
the section where that order puts it; absent → create the file with the two-line header of §4
|
|
198
|
+
and that section alone. Then the ignore line, if it was accepted.
|
|
199
|
+
7. **One line**: the URL, whether it was reused or published, and that `/flow:doctor` checks it and
|
|
200
|
+
names the permission rule that stops each card update from asking.
|
|
201
|
+
|
|
153
202
|
## 5. Close
|
|
154
203
|
|
|
155
204
|
- Summarize on screen: what was written to the base, what was written to the active overlay, and
|
|
@@ -165,5 +214,7 @@ phase, so their size is paid on every step:
|
|
|
165
214
|
(`FLOW.<context>.md`, flow-core §0), which a repo commits on purpose. Do not use a recursive
|
|
166
215
|
pattern either: examples under the plugin must remain visible.
|
|
167
216
|
- Git-ignore `.claude/work/` too — recommended default: ignore it (artifacts are personal working state; teams that want to share them commit deliberately). `git.worktree` not `off` → offer `.worktrees/` in the same gesture.
|
|
217
|
+
- **The control room** (§4.5), when the artifact tools are here and `panel.artifact` is empty: offer
|
|
218
|
+
it as the last question of the close.
|
|
168
219
|
- Suggest `/flow:next` as the next step (it routes to `/flow:feat:start`, `/flow:work:resume` or `/flow:work:daily`).
|
|
169
220
|
"""
|
|
@@ -216,6 +216,8 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
216
216
|
|
|
217
217
|
**No headings over the train.** A shipped MR/PR is *open, waiting to merge*; `mark` says it per entry — `wait` shipped, `current` being worked, `done` only merged.
|
|
218
218
|
|
|
219
|
+
**The artifact mirror** (opt-in, flow-core §4.6). With `panel.artifact` set — in `FLOW.claude.md`, Claude Code only — each publication is also written (a per-step patch only when the card is 10 minutes old), whole, as one card of a claude.ai page that gathers every work of every repo: doc `<owner.repo>--<work folder>` in collection `works`, the document above plus `updated_at`, `attention` (on either transport) and `repo`, `work`, `ticket`, `type`, `branch`, `harness`. The page is `examples/panel-artifact.html`, published once by hand. The transport above is unchanged.
|
|
220
|
+
|
|
219
221
|
**Who publishes it.** The 18 phase commands (flow-core §4); `/flow:feat:ship` and `/flow:bug:ship` the instant an MR/PR URL exists; `/flow:feat:plan` when the train is populated — a new train is a new shape, so a full republish; `/flow:work:resume` (§5), after reading what is on screen; `/flow:work:watch` every cycle; `/flow:work:abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never publish; `/flow:work:clean` archives the folder with any panel file inside.
|
|
220
222
|
|
|
221
223
|
## Shortcuts by size
|
|
@@ -90,7 +90,7 @@ Ask the user what to do with the branch — do not decide alone:
|
|
|
90
90
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
91
91
|
- **Tracker: move to won't-do** (never "done" — this work did not ship). Only if `tracker.tool` is not `none`/empty, `tracker.abandon_cmd` is set, and `meta.json.ticket` is a **real tracker id** (skip for local-only slugs). Run `tracker.abandon_cmd` substituting `{TICKET}` = `meta.json.ticket`. Same contract as `/flow:feat:start §6.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-in-state ticket → warn and continue, never block. `tracker.abandon_cmd` empty → do nothing (the user closes the ticket by hand if they want).
|
|
92
92
|
- Panel published for this work (flow-core §4) → publish a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line, and `attention` cleared where the panel tools carry it — nothing is waiting on anyone any more.
|
|
93
|
-
-
|
|
93
|
+
- Delete the work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*), then move the folder to `.claude/work/_archive/` **keeping its directory name** (`_archive/<work-dir>/`, the folder located in §1 — e.g. `<TICKET>-<slug>`) so `/flow:work:daily` no longer lists it.
|
|
94
94
|
- Report to the user: ticket abandoned, reason, what was done with the branch.
|
|
95
95
|
|
|
96
96
|
## Recovery
|
|
@@ -185,7 +185,7 @@ Execute in this order (a branch cannot be deleted while a worktree holds it):
|
|
|
185
185
|
|
|
186
186
|
1. **Worktrees** — `git worktree remove <path>`. No `--force`, ever: §5 excluded the dirty ones, so a failure means something changed since the inventory. Stop that row, report it, continue.
|
|
187
187
|
2. **Branches** — `git branch -d <branch>` first. Git refuses on a squash merge; only then `git branch -D`, and only for rows whose verdict came from **the forge** (§4a) — never a locally inferred one. Name it in the report: `-D (squash-merged, MR #401)`.
|
|
188
|
-
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow:work:abandon` §6 does. Never `rm`.
|
|
188
|
+
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow:work:abandon` §6 does. Never `rm`. Before each move, delete that work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*).
|
|
189
189
|
4. **Prune** — `git worktree prune`.
|
|
190
190
|
|
|
191
191
|
Never touch the remote (no `git push --delete`; deleting merged remote branches is the forge's job).
|
package/adapters/hermes/CORE.md
CHANGED
|
@@ -17,7 +17,7 @@ Every `/flow-*` command assumes these rules. They are stated once, here, so a co
|
|
|
17
17
|
carries what is specific to its phase. Read this once per session; a command that says "load
|
|
18
18
|
`flow-core`" means this file.
|
|
19
19
|
|
|
20
|
-
**This file belongs to flow `0.
|
|
20
|
+
**This file belongs to flow `0.112.0`.** Compare it once, at the start of the session, against
|
|
21
21
|
`version` in `~/.claude/flow/.claude-plugin/plugin.json`. The two differing means the session
|
|
22
22
|
is running a **mixture** — the commands from one copy of the plugin, these shared rules from another
|
|
23
23
|
— which is exactly what happens when a branch or a release candidate is loaded over an installed
|
|
@@ -117,7 +117,7 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
117
117
|
prints that file with it — "`agents: opus` (`FLOW.claude.md`)", never the value alone. `doctor` reports it and later
|
|
118
118
|
edits preserve it.
|
|
119
119
|
- The sections in any of the files are tracker, git, autonomy, quality, agents, models, data,
|
|
120
|
-
conventions, notes, knowledge, and
|
|
120
|
+
conventions, notes, knowledge, observability, roadmap, and panel. No layer found, or an effective empty key
|
|
121
121
|
→ the default or auto-discovery each step names. Never stop because a file or key is empty.
|
|
122
122
|
- **An empty key that is a real decision for this repo is offered where it first matters**, and
|
|
123
123
|
nowhere else. Three steps, in order:
|
|
@@ -674,7 +674,9 @@ right now. **Any progress line you were about to type into the chat is a panel u
|
|
|
674
674
|
available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
|
|
675
675
|
**stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
|
|
676
676
|
all. When they are not there, write the file (§4.3). No work folder (lightweight
|
|
677
|
-
`respond`/`green`) → nothing to publish, either way.
|
|
677
|
+
`respond`/`green`) → nothing to publish, either way. With `panel.artifact` set, each publication is
|
|
678
|
+
also mirrored to a claude.ai page that gathers every work of every repo (§4.6) — in addition to the
|
|
679
|
+
transport, never instead of it.
|
|
678
680
|
|
|
679
681
|
**Look for them before you conclude they are missing**, once per session, in pre-flight. A harness
|
|
680
682
|
namespaces an MCP server's tools, so what you are looking for is a tool whose name *ends* in
|
|
@@ -803,6 +805,61 @@ that reports no figure is recorded with `"source": "not reported"` rather than e
|
|
|
803
805
|
phase with no entry measured nothing — **absence is not zero**. Every figure is the harness's own
|
|
804
806
|
client-side estimate and can differ from a bill.
|
|
805
807
|
|
|
808
|
+
### 4.6 The artifact mirror — one page for every work, opt-in
|
|
809
|
+
|
|
810
|
+
Someone running flow in several consoles, across several repos, has one panel per pane and no view
|
|
811
|
+
of them together. `panel.artifact` in the FLOW config — the URL of a claude.ai artifact, which
|
|
812
|
+
`/flow-init room` publishes from `examples/panel-artifact.html` or finds among the person's own —
|
|
813
|
+
turns on a mirror: each work writes its own card to that
|
|
814
|
+
page's shared database, and the page shows every card, grouped by repo. Empty or absent → this
|
|
815
|
+
section does not exist: no artifact tool is loaded or called.
|
|
816
|
+
|
|
817
|
+
- **Only where the tool is.** The writes go through the tool whose name ends in `ArtifactData` —
|
|
818
|
+
interactive Claude Code, and possibly **deferred** (load it, as §4 says of the panel tools).
|
|
819
|
+
Absent → the mirror is off, in silence: no line, no error. A headless run (`claude -p`, an
|
|
820
|
+
`unattended` container) has no such tool, and other harnesses never read `FLOW.claude.md`, where
|
|
821
|
+
the key belongs.
|
|
822
|
+
- **When**: right after the transport publishes, at §4.4 (a) to (e) — a phase's own publications
|
|
823
|
+
(`ship` the moment an MR/PR URL exists, `plan`, `resume`, `watch`, `abandon`) are among them. At
|
|
824
|
+
(f), a plan step, only when the card's last write is 10 minutes old or more: every write is a
|
|
825
|
+
tool call, and outside auto mode a prompt, while a card left alone for 30 minutes reads as a dead
|
|
826
|
+
session on the page.
|
|
827
|
+
- **What**: what the terminal now shows, never a document rebuilt in your head. On the file
|
|
828
|
+
transport, the §4.1 document just written. Over the tools, what `panel_get` returns right after a
|
|
829
|
+
publication that applied — a refused patch changed nothing on screen and writes nothing here.
|
|
830
|
+
Then set, whichever transport:
|
|
831
|
+
- `updated_at` — the real clock (`date -Iseconds`); over the tools the app stamps arrival itself,
|
|
832
|
+
so the document carries none of its own.
|
|
833
|
+
- `attention` — as §4.2 defines it, on the file transport too: `wait` while a `Decision` is
|
|
834
|
+
parked on the user, `block` while stuck on somebody else, absent while simply working — and
|
|
835
|
+
`done` only once the work is over: `meta.json.phase` set to `done`, or `abandon` (whose terminal
|
|
836
|
+
panel clears `attention` and carries a `block` line; the card says `done`). An open MR/PR
|
|
837
|
+
waiting to merge is not over. The page reads the state from this field alone.
|
|
838
|
+
- `repo` (the repo id below), `work` (the work folder's name), `ticket`, `type`, `branch`, and
|
|
839
|
+
`harness` (`Claude Code`), from `meta.json` and git.
|
|
840
|
+
- **Where**: action `set` — the whole document, so a line dropped from the panel leaves the card —
|
|
841
|
+
`url` the key's value, collection `works`, doc id `<repo id>--<work folder>`. The repo id is the
|
|
842
|
+
path of `git remote get-url origin` — everything after the host, which ends at the first `/` after
|
|
843
|
+
`//` (`https://host/owner/repo.git`, `ssh://git@host:22/owner/repo.git`) or at the first `:`
|
|
844
|
+
(`git@host:owner/repo.git`) — with `.git` dropped and every `/` turned into `.`: `owner.repo`,
|
|
845
|
+
`group.subgroup.repo`. No remote → the main checkout's directory name (§0). Any character outside
|
|
846
|
+
`[A-Za-z0-9_.~:@+-]` becomes `-`.
|
|
847
|
+
- **Version**: a write to a card that exists needs `if_version`, the version the last write
|
|
848
|
+
returned. Keep it in the session — one writer per card, so it is right until the session loses
|
|
849
|
+
it. None held → one `get` first: the card exists → pin to its version; it does not → write
|
|
850
|
+
unpinned. A write refused for its version — stale, or missing on a card that exists — is not a
|
|
851
|
+
failure: one retry pinned to the version the refusal names, or to the one a single `get` returns.
|
|
852
|
+
Then remember what the write returned.
|
|
853
|
+
- **A card ends with its work folder.** Whatever moves a work folder to `_archive/` — `abandon`,
|
|
854
|
+
`clean`, the archive offer at `ship`'s Close — first deletes that work's card: action `delete`,
|
|
855
|
+
pinned to the version held, or to the one a single `get` returns; no card → nothing to do. The
|
|
856
|
+
mirror off or the key empty → nothing to do. A folder moved back out of `_archive/` gets its card
|
|
857
|
+
again at its next publication.
|
|
858
|
+
- **Failure never stops a phase.** A second version refusal → no more retries for that
|
|
859
|
+
publication. Any other failure — a wrong URL, auth, a permission prompt the user declined — turns
|
|
860
|
+
the mirror off for the rest of the session. Either way the next stop carries one line,
|
|
861
|
+
`artifact panel: <error>`, once.
|
|
862
|
+
|
|
806
863
|
## 5. Work summary — `00-summary.md`
|
|
807
864
|
|
|
808
865
|
Each phase reads what the previous ones wrote. Reading every artifact whole on every phase is the
|
|
@@ -213,5 +213,5 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
213
213
|
- **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.
|
|
214
214
|
- **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.
|
|
215
215
|
- **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).
|
|
216
|
-
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`.
|
|
216
|
+
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`. Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
217
217
|
- 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.
|
|
@@ -226,6 +226,7 @@ refuse) · **degraded** (it runs, quietly worse than the config promises), plus
|
|
|
226
226
|
that fits, else `general-purpose` (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
|
|
227
227
|
- Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
|
|
228
228
|
- **Where the live panel will go this session** (flow-core §4): a tool whose name ends in `panel_set` / `panel_patch` — namespaced by the harness (`mcp__panel__panel_set` on Claude Code) and possibly **deferred**, which reads as absent until the list of deferred tools is checked → the terminal draws the panel and no `panel.json` is written; genuinely absent → the panel is that file, as before. Neither is a fault — one line naming the tools as they are actually called here, or saying the file is the transport.
|
|
229
|
+
- **The artifact mirror** (flow-core §4.6) — `panel.artifact` empty and the artifact tools here → one information line, not a fault: *control room off — `/flow-init room` turns it on*. Set: one line with its value and the file it came from; whether a tool whose name ends in `ArtifactData` is here (deferred counts); and, when it is, whether a `list` of collection `works` (limit 1) on that URL answers — a read, never a write. Tool present → also name the rule that keeps every card update from asking — `ArtifactData` (as the harness calls it) under `permissions.allow` — and its cost in the same line: it lets any session write to the data of any of your artifacts without asking, not only this page's; without it, each card update is approved by hand. The value coming from any file but `FLOW.claude.md` → a fault: the URL is one person's page, and a committed `FLOW.md` hands it to every teammate, whose writes it refuses. Key set and no tool → *off in this harness*, not a fault. The read failing → the error, as a fault.
|
|
229
230
|
|
|
230
231
|
### 2.3 Knowledge sources
|
|
231
232
|
|
|
@@ -595,7 +595,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
595
595
|
Only if `phase = "done"`:
|
|
596
596
|
- 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.
|
|
597
597
|
- 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.
|
|
598
|
-
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
598
|
+
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`). Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
599
599
|
- 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.
|
|
600
600
|
|
|
601
601
|
On a **train MR/PR** neither offer fires (`phase` is not `done`; the branch is the base of the next one). When shipping an intermediate MR/PR whose predecessor has since merged, say so in one line and point at `/flow-work-clean`, which sweeps the whole backlog at once. Mention it once per work, not per MR/PR.
|
|
@@ -5,7 +5,7 @@ description: "Assistant that generates FLOW.md and its optional harness overlay
|
|
|
5
5
|
|
|
6
6
|
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/init.md — do not edit; change the plugin file and run the script. -->
|
|
7
7
|
|
|
8
|
-
# `/flow-init`
|
|
8
|
+
# `/flow-init $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
> **hermes adapter — how the Claude Code primitives named below map here.**
|
|
11
11
|
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
@@ -30,6 +30,12 @@ auto-detected and only confirmed.
|
|
|
30
30
|
|
|
31
31
|
Key names and contract: `examples/FLOW.template.md` from the plugin. Do not invent keys that are not there.
|
|
32
32
|
|
|
33
|
+
**`$ARGUMENTS` is `room`** → run only §4.5, the control room, and end there — for a repo that is
|
|
34
|
+
already set up. Neither `FLOW.md` nor the active overlay exists → say so in one line and run the
|
|
35
|
+
whole command instead: the room is offered at its close, and a repo never ends with an overlay that
|
|
36
|
+
holds nothing but the room while nobody was asked the rest. Any other `$ARGUMENTS` → ignore it and
|
|
37
|
+
run the whole command.
|
|
38
|
+
|
|
33
39
|
## 1. If either configuration file already exists
|
|
34
40
|
|
|
35
41
|
Show `FLOW.md` and the active overlay when each exists, then show their effective merged values —
|
|
@@ -143,7 +149,7 @@ phase, so their size is paid on every step:
|
|
|
143
149
|
current file unless the user explicitly requested a split.
|
|
144
150
|
- Two-line header in each file: whether it is the shared base or which harness it overlays, and that
|
|
145
151
|
the plugin's `examples/FLOW.template.md` documents every key, merge rule, and default.
|
|
146
|
-
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
152
|
+
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, roadmap, panel, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
147
153
|
- Empty keys are omitted from the base (absent = default). In an overlay, preserve or write an empty
|
|
148
154
|
key only when it intentionally masks a non-empty base value; removing it would change the
|
|
149
155
|
effective config. A section with no set or masking key is omitted. **The two base-file exceptions
|
|
@@ -154,6 +160,49 @@ phase, so their size is paid on every step:
|
|
|
154
160
|
|
|
155
161
|
- **A worked example exists for one stack.** When detection says PHP (a `composer.json`, a `symfony.lock`, a `bin/console`), add **one line** to the close: *"an example `FLOW.md` and agent set for Symfony ship with the plugin under `examples/symfony/` — copy what applies."* Never copy anything on your own, and never mention it for another stack: it is one stack's answer, not a default.
|
|
156
162
|
|
|
163
|
+
## 4.5 Control room — one page for every work (Claude Code)
|
|
164
|
+
|
|
165
|
+
Plain `init` runs this **from §5's close**, as its last question; `init room` runs it alone. Either
|
|
166
|
+
way, leaving this section ends only this section.
|
|
167
|
+
|
|
168
|
+
Only when a tool whose name ends in `Artifact` and one ending in `ArtifactData` are both here
|
|
169
|
+
(deferred counts: load them) — interactive Claude Code. Neither → plain `init` says nothing about
|
|
170
|
+
it; `init room` says in one line that the control room needs an interactive Claude Code session.
|
|
171
|
+
|
|
172
|
+
The control room is the page flow-core §4.6 mirrors every work's panel to; each person has one, and
|
|
173
|
+
every repo they work in points at it.
|
|
174
|
+
|
|
175
|
+
1. **Already set?** `panel.artifact` resolves (flow-core §0) from `FLOW.claude.md` → say where it
|
|
176
|
+
points; nothing else to do. From any other file → it is one person's page handed to whoever
|
|
177
|
+
reads that file (doctor flags it): offer, in the question of step 4, to move it to
|
|
178
|
+
`FLOW.claude.md`.
|
|
179
|
+
2. **Find theirs.** Artifact `list`, scope `mine`, `limit` 200, every page of it (`page_token`
|
|
180
|
+
until none is left): the artifacts titled exactly `Flow Control Room`. A page past the first 25
|
|
181
|
+
is still theirs, and a second page would split their works in two. Read `works` once (ArtifactData
|
|
182
|
+
`list`, limit 1) on each candidate you will offer: a page that refuses it was published without
|
|
183
|
+
its database and cannot hold cards — leave it out.
|
|
184
|
+
3. **Can the key be kept out of git?** `git ls-files --error-unmatch FLOW.claude.md` succeeds → the
|
|
185
|
+
overlay is tracked, and anything written there reaches the team: do not write the key — say so,
|
|
186
|
+
and that untracking the file (`git rm --cached FLOW.claude.md`, then ignoring it) is the user's
|
|
187
|
+
call. Not tracked and not git-ignored (`git check-ignore -q FLOW.claude.md` fails — `.git/info/exclude` counts as ignored) → the step-4 question also asks to ignore it, unless §5
|
|
188
|
+
already asked that this run.
|
|
189
|
+
4. **One `AskUserQuestion`**, before anything is published or written. Options: each page found in
|
|
190
|
+
step 2, most recently updated first, at most three — or, when none was found, **publish your
|
|
191
|
+
control room** — and **not now**. With a page found, **publish a new one** stays as an option
|
|
192
|
+
only when fewer than three were offered. The ignore part of step 3 and the move of step 1 ride
|
|
193
|
+
along in the same question.
|
|
194
|
+
5. **Publish, when chosen.** Copy `~/.claude/flow/examples/panel-artifact.html` into the
|
|
195
|
+
session's scratchpad (the Artifact tool publishes only from the working directory or the
|
|
196
|
+
scratchpad, and the plugin's folder is neither), read it whole, load whatever the harness asks
|
|
197
|
+
for before passing `capabilities`, and publish that copy as a new artifact with the capabilities
|
|
198
|
+
its header names. Nobody types a path or a version: the plugin knows where it is.
|
|
199
|
+
6. **Write the key** — `- artifact: <url>` under `## panel` in `FLOW.claude.md`, in the template's
|
|
200
|
+
section order (§4): the section exists → replace the value; the file exists without it → insert
|
|
201
|
+
the section where that order puts it; absent → create the file with the two-line header of §4
|
|
202
|
+
and that section alone. Then the ignore line, if it was accepted.
|
|
203
|
+
7. **One line**: the URL, whether it was reused or published, and that `/flow-doctor` checks it and
|
|
204
|
+
names the permission rule that stops each card update from asking.
|
|
205
|
+
|
|
157
206
|
## 5. Close
|
|
158
207
|
|
|
159
208
|
- Summarize on screen: what was written to the base, what was written to the active overlay, and
|
|
@@ -169,4 +218,6 @@ phase, so their size is paid on every step:
|
|
|
169
218
|
(`FLOW.<context>.md`, flow-core §0), which a repo commits on purpose. Do not use a recursive
|
|
170
219
|
pattern either: examples under the plugin must remain visible.
|
|
171
220
|
- Git-ignore `.claude/work/` too — recommended default: ignore it (artifacts are personal working state; teams that want to share them commit deliberately). `git.worktree` not `off` → offer `.worktrees/` in the same gesture.
|
|
221
|
+
- **The control room** (§4.5), when the artifact tools are here and `panel.artifact` is empty: offer
|
|
222
|
+
it as the last question of the close.
|
|
172
223
|
- Suggest `/flow-next` as the next step (it routes to `/flow-feat-start`, `/flow-work-resume` or `/flow-work-daily`).
|
|
@@ -220,6 +220,8 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
220
220
|
|
|
221
221
|
**No headings over the train.** A shipped MR/PR is *open, waiting to merge*; `mark` says it per entry — `wait` shipped, `current` being worked, `done` only merged.
|
|
222
222
|
|
|
223
|
+
**The artifact mirror** (opt-in, flow-core §4.6). With `panel.artifact` set — in `FLOW.claude.md`, Claude Code only — each publication is also written (a per-step patch only when the card is 10 minutes old), whole, as one card of a claude.ai page that gathers every work of every repo: doc `<owner.repo>--<work folder>` in collection `works`, the document above plus `updated_at`, `attention` (on either transport) and `repo`, `work`, `ticket`, `type`, `branch`, `harness`. The page is `examples/panel-artifact.html`, published once by hand. The transport above is unchanged.
|
|
224
|
+
|
|
223
225
|
**Who publishes it.** The 18 phase commands (flow-core §4); `/flow-feat-ship` and `/flow-bug-ship` the instant an MR/PR URL exists; `/flow-feat-plan` when the train is populated — a new train is a new shape, so a full republish; `/flow-work-resume` (§5), after reading what is on screen; `/flow-work-watch` every cycle; `/flow-work-abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never publish; `/flow-work-clean` archives the folder with any panel file inside.
|
|
224
226
|
|
|
225
227
|
## Shortcuts by size
|
|
@@ -94,7 +94,7 @@ Ask the user what to do with the branch — do not decide alone:
|
|
|
94
94
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
95
95
|
- **Tracker: move to won't-do** (never "done" — this work did not ship). Only if `tracker.tool` is not `none`/empty, `tracker.abandon_cmd` is set, and `meta.json.ticket` is a **real tracker id** (skip for local-only slugs). Run `tracker.abandon_cmd` substituting `{TICKET}` = `meta.json.ticket`. Same contract as `/flow-feat-start §6.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-in-state ticket → warn and continue, never block. `tracker.abandon_cmd` empty → do nothing (the user closes the ticket by hand if they want).
|
|
96
96
|
- Panel published for this work (flow-core §4) → publish a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line, and `attention` cleared where the panel tools carry it — nothing is waiting on anyone any more.
|
|
97
|
-
-
|
|
97
|
+
- Delete the work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*), then move the folder to `.claude/work/_archive/` **keeping its directory name** (`_archive/<work-dir>/`, the folder located in §1 — e.g. `<TICKET>-<slug>`) so `/flow-work-daily` no longer lists it.
|
|
98
98
|
- Report to the user: ticket abandoned, reason, what was done with the branch.
|
|
99
99
|
|
|
100
100
|
## Recovery
|
|
@@ -189,7 +189,7 @@ Execute in this order (a branch cannot be deleted while a worktree holds it):
|
|
|
189
189
|
|
|
190
190
|
1. **Worktrees** — `git worktree remove <path>`. No `--force`, ever: §5 excluded the dirty ones, so a failure means something changed since the inventory. Stop that row, report it, continue.
|
|
191
191
|
2. **Branches** — `git branch -d <branch>` first. Git refuses on a squash merge; only then `git branch -D`, and only for rows whose verdict came from **the forge** (§4a) — never a locally inferred one. Name it in the report: `-D (squash-merged, MR #401)`.
|
|
192
|
-
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow-work-abandon` §6 does. Never `rm`.
|
|
192
|
+
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow-work-abandon` §6 does. Never `rm`. Before each move, delete that work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*).
|
|
193
193
|
4. **Prune** — `git worktree prune`.
|
|
194
194
|
|
|
195
195
|
Never touch the remote (no `git push --delete`; deleting merged remote branches is the forge's job).
|
|
@@ -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.112.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
|
|
@@ -116,7 +116,7 @@ a command relies on is simply absent in that session, and nothing else will repo
|
|
|
116
116
|
prints that file with it — "`agents: opus` (`FLOW.claude.md`)", never the value alone. `doctor` reports it and later
|
|
117
117
|
edits preserve it.
|
|
118
118
|
- The sections in any of the files are tracker, git, autonomy, quality, agents, models, data,
|
|
119
|
-
conventions, notes, knowledge, and
|
|
119
|
+
conventions, notes, knowledge, observability, roadmap, and panel. No layer found, or an effective empty key
|
|
120
120
|
→ the default or auto-discovery each step names. Never stop because a file or key is empty.
|
|
121
121
|
- **An empty key that is a real decision for this repo is offered where it first matters**, and
|
|
122
122
|
nowhere else. Three steps, in order:
|
|
@@ -673,7 +673,9 @@ right now. **Any progress line you were about to type into the chat is a panel u
|
|
|
673
673
|
available, this console is a pane of agent-terminal: publish the panel through them (§4.2) and
|
|
674
674
|
**stop writing `.claude/work/<work>/panel.json`** — while a pane is claimed, its file is not read at
|
|
675
675
|
all. When they are not there, write the file (§4.3). No work folder (lightweight
|
|
676
|
-
`respond`/`green`) → nothing to publish, either way.
|
|
676
|
+
`respond`/`green`) → nothing to publish, either way. With `panel.artifact` set, each publication is
|
|
677
|
+
also mirrored to a claude.ai page that gathers every work of every repo (§4.6) — in addition to the
|
|
678
|
+
transport, never instead of it.
|
|
677
679
|
|
|
678
680
|
**Look for them before you conclude they are missing**, once per session, in pre-flight. A harness
|
|
679
681
|
namespaces an MCP server's tools, so what you are looking for is a tool whose name *ends* in
|
|
@@ -802,6 +804,61 @@ that reports no figure is recorded with `"source": "not reported"` rather than e
|
|
|
802
804
|
phase with no entry measured nothing — **absence is not zero**. Every figure is the harness's own
|
|
803
805
|
client-side estimate and can differ from a bill.
|
|
804
806
|
|
|
807
|
+
### 4.6 The artifact mirror — one page for every work, opt-in
|
|
808
|
+
|
|
809
|
+
Someone running flow in several consoles, across several repos, has one panel per pane and no view
|
|
810
|
+
of them together. `panel.artifact` in the FLOW config — the URL of a claude.ai artifact, which
|
|
811
|
+
`/flow-init room` publishes from `examples/panel-artifact.html` or finds among the person's own —
|
|
812
|
+
turns on a mirror: each work writes its own card to that
|
|
813
|
+
page's shared database, and the page shows every card, grouped by repo. Empty or absent → this
|
|
814
|
+
section does not exist: no artifact tool is loaded or called.
|
|
815
|
+
|
|
816
|
+
- **Only where the tool is.** The writes go through the tool whose name ends in `ArtifactData` —
|
|
817
|
+
interactive Claude Code, and possibly **deferred** (load it, as §4 says of the panel tools).
|
|
818
|
+
Absent → the mirror is off, in silence: no line, no error. A headless run (`claude -p`, an
|
|
819
|
+
`unattended` container) has no such tool, and other harnesses never read `FLOW.claude.md`, where
|
|
820
|
+
the key belongs.
|
|
821
|
+
- **When**: right after the transport publishes, at §4.4 (a) to (e) — a phase's own publications
|
|
822
|
+
(`ship` the moment an MR/PR URL exists, `plan`, `resume`, `watch`, `abandon`) are among them. At
|
|
823
|
+
(f), a plan step, only when the card's last write is 10 minutes old or more: every write is a
|
|
824
|
+
tool call, and outside auto mode a prompt, while a card left alone for 30 minutes reads as a dead
|
|
825
|
+
session on the page.
|
|
826
|
+
- **What**: what the terminal now shows, never a document rebuilt in your head. On the file
|
|
827
|
+
transport, the §4.1 document just written. Over the tools, what `panel_get` returns right after a
|
|
828
|
+
publication that applied — a refused patch changed nothing on screen and writes nothing here.
|
|
829
|
+
Then set, whichever transport:
|
|
830
|
+
- `updated_at` — the real clock (`date -Iseconds`); over the tools the app stamps arrival itself,
|
|
831
|
+
so the document carries none of its own.
|
|
832
|
+
- `attention` — as §4.2 defines it, on the file transport too: `wait` while a `Decision` is
|
|
833
|
+
parked on the user, `block` while stuck on somebody else, absent while simply working — and
|
|
834
|
+
`done` only once the work is over: `meta.json.phase` set to `done`, or `abandon` (whose terminal
|
|
835
|
+
panel clears `attention` and carries a `block` line; the card says `done`). An open MR/PR
|
|
836
|
+
waiting to merge is not over. The page reads the state from this field alone.
|
|
837
|
+
- `repo` (the repo id below), `work` (the work folder's name), `ticket`, `type`, `branch`, and
|
|
838
|
+
`harness` (`Claude Code`), from `meta.json` and git.
|
|
839
|
+
- **Where**: action `set` — the whole document, so a line dropped from the panel leaves the card —
|
|
840
|
+
`url` the key's value, collection `works`, doc id `<repo id>--<work folder>`. The repo id is the
|
|
841
|
+
path of `git remote get-url origin` — everything after the host, which ends at the first `/` after
|
|
842
|
+
`//` (`https://host/owner/repo.git`, `ssh://git@host:22/owner/repo.git`) or at the first `:`
|
|
843
|
+
(`git@host:owner/repo.git`) — with `.git` dropped and every `/` turned into `.`: `owner.repo`,
|
|
844
|
+
`group.subgroup.repo`. No remote → the main checkout's directory name (§0). Any character outside
|
|
845
|
+
`[A-Za-z0-9_.~:@+-]` becomes `-`.
|
|
846
|
+
- **Version**: a write to a card that exists needs `if_version`, the version the last write
|
|
847
|
+
returned. Keep it in the session — one writer per card, so it is right until the session loses
|
|
848
|
+
it. None held → one `get` first: the card exists → pin to its version; it does not → write
|
|
849
|
+
unpinned. A write refused for its version — stale, or missing on a card that exists — is not a
|
|
850
|
+
failure: one retry pinned to the version the refusal names, or to the one a single `get` returns.
|
|
851
|
+
Then remember what the write returned.
|
|
852
|
+
- **A card ends with its work folder.** Whatever moves a work folder to `_archive/` — `abandon`,
|
|
853
|
+
`clean`, the archive offer at `ship`'s Close — first deletes that work's card: action `delete`,
|
|
854
|
+
pinned to the version held, or to the one a single `get` returns; no card → nothing to do. The
|
|
855
|
+
mirror off or the key empty → nothing to do. A folder moved back out of `_archive/` gets its card
|
|
856
|
+
again at its next publication.
|
|
857
|
+
- **Failure never stops a phase.** A second version refusal → no more retries for that
|
|
858
|
+
publication. Any other failure — a wrong URL, auth, a permission prompt the user declined — turns
|
|
859
|
+
the mirror off for the rest of the session. Either way the next stop carries one line,
|
|
860
|
+
`artifact panel: <error>`, once.
|
|
861
|
+
|
|
805
862
|
## 5. Work summary — `00-summary.md`
|
|
806
863
|
|
|
807
864
|
Each phase reads what the previous ones wrote. Reading every artifact whole on every phase is the
|
|
@@ -211,5 +211,5 @@ posted as comments anchored on the changed lines of the MR/PR, confirmed in ever
|
|
|
211
211
|
- **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.
|
|
212
212
|
- **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.
|
|
213
213
|
- **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).
|
|
214
|
-
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`.
|
|
214
|
+
- Ask whether to archive `.claude/work/<TICKET>/` to `.claude/work/_archive/`. Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
215
215
|
- 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.
|
|
@@ -224,6 +224,7 @@ refuse) · **degraded** (it runs, quietly worse than the config promises), plus
|
|
|
224
224
|
that fits, else `general-purpose` (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
|
|
225
225
|
- Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
|
|
226
226
|
- **Where the live panel will go this session** (flow-core §4): a tool whose name ends in `panel_set` / `panel_patch` — namespaced by the harness (`mcp__panel__panel_set` on Claude Code) and possibly **deferred**, which reads as absent until the list of deferred tools is checked → the terminal draws the panel and no `panel.json` is written; genuinely absent → the panel is that file, as before. Neither is a fault — one line naming the tools as they are actually called here, or saying the file is the transport.
|
|
227
|
+
- **The artifact mirror** (flow-core §4.6) — `panel.artifact` empty and the artifact tools here → one information line, not a fault: *control room off — `/flow-init room` turns it on*. Set: one line with its value and the file it came from; whether a tool whose name ends in `ArtifactData` is here (deferred counts); and, when it is, whether a `list` of collection `works` (limit 1) on that URL answers — a read, never a write. Tool present → also name the rule that keeps every card update from asking — `ArtifactData` (as the harness calls it) under `permissions.allow` — and its cost in the same line: it lets any session write to the data of any of your artifacts without asking, not only this page's; without it, each card update is approved by hand. The value coming from any file but `FLOW.claude.md` → a fault: the URL is one person's page, and a committed `FLOW.md` hands it to every teammate, whose writes it refuses. Key set and no tool → *off in this harness*, not a fault. The read failing → the error, as a fault.
|
|
227
228
|
|
|
228
229
|
### 2.3 Knowledge sources
|
|
229
230
|
|
|
@@ -593,7 +593,7 @@ paste. Never a list here, and never a question: in `guided`/`auto` not asking is
|
|
|
593
593
|
Only if `phase = "done"`:
|
|
594
594
|
- 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.
|
|
595
595
|
- 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.
|
|
596
|
-
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`).
|
|
596
|
+
- Ask whether to keep `.claude/work/<TICKET>/` or archive it (move to `.claude/work/_archive/`). Archiving deletes the work's card from the artifact control room first, when `panel.artifact` is set (flow-core §4.6).
|
|
597
597
|
- 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.
|
|
598
598
|
|
|
599
599
|
On a **train MR/PR** neither offer fires (`phase` is not `done`; the branch is the base of the next one). When shipping an intermediate MR/PR whose predecessor has since merged, say so in one line and point at `/flow-work-clean`, which sweeps the whole backlog at once. Mention it once per work, not per MR/PR.
|
|
@@ -4,7 +4,7 @@ description: Assistant that generates FLOW.md and its optional harness overlay (
|
|
|
4
4
|
|
|
5
5
|
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/init.md — do not edit; change the plugin file and run the script. -->
|
|
6
6
|
|
|
7
|
-
# `/flow-init`
|
|
7
|
+
# `/flow-init $ARGUMENTS`
|
|
8
8
|
|
|
9
9
|
> **opencode adapter — how the Claude Code primitives named below map here.**
|
|
10
10
|
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
@@ -28,6 +28,12 @@ auto-detected and only confirmed.
|
|
|
28
28
|
|
|
29
29
|
Key names and contract: `examples/FLOW.template.md` from the plugin. Do not invent keys that are not there.
|
|
30
30
|
|
|
31
|
+
**`$ARGUMENTS` is `room`** → run only §4.5, the control room, and end there — for a repo that is
|
|
32
|
+
already set up. Neither `FLOW.md` nor the active overlay exists → say so in one line and run the
|
|
33
|
+
whole command instead: the room is offered at its close, and a repo never ends with an overlay that
|
|
34
|
+
holds nothing but the room while nobody was asked the rest. Any other `$ARGUMENTS` → ignore it and
|
|
35
|
+
run the whole command.
|
|
36
|
+
|
|
31
37
|
## 1. If either configuration file already exists
|
|
32
38
|
|
|
33
39
|
Show `FLOW.md` and the active overlay when each exists, then show their effective merged values —
|
|
@@ -141,7 +147,7 @@ phase, so their size is paid on every step:
|
|
|
141
147
|
current file unless the user explicitly requested a split.
|
|
142
148
|
- Two-line header in each file: whether it is the shared base or which harness it overlays, and that
|
|
143
149
|
the plugin's `examples/FLOW.template.md` documents every key, merge rule, and default.
|
|
144
|
-
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
150
|
+
- Sections in the template's order — tracker, git, autonomy, quality, agents, models, data, conventions, roadmap, panel, notes, knowledge, observability — but **only the sections and keys that have a value**. One line per key: `- key: value`. No template comments.
|
|
145
151
|
- Empty keys are omitted from the base (absent = default). In an overlay, preserve or write an empty
|
|
146
152
|
key only when it intentionally masks a non-empty base value; removing it would change the
|
|
147
153
|
effective config. A section with no set or masking key is omitted. **The two base-file exceptions
|
|
@@ -152,6 +158,49 @@ phase, so their size is paid on every step:
|
|
|
152
158
|
|
|
153
159
|
- **A worked example exists for one stack.** When detection says PHP (a `composer.json`, a `symfony.lock`, a `bin/console`), add **one line** to the close: *"an example `FLOW.md` and agent set for Symfony ship with the plugin under `examples/symfony/` — copy what applies."* Never copy anything on your own, and never mention it for another stack: it is one stack's answer, not a default.
|
|
154
160
|
|
|
161
|
+
## 4.5 Control room — one page for every work (Claude Code)
|
|
162
|
+
|
|
163
|
+
Plain `init` runs this **from §5's close**, as its last question; `init room` runs it alone. Either
|
|
164
|
+
way, leaving this section ends only this section.
|
|
165
|
+
|
|
166
|
+
Only when a tool whose name ends in `Artifact` and one ending in `ArtifactData` are both here
|
|
167
|
+
(deferred counts: load them) — interactive Claude Code. Neither → plain `init` says nothing about
|
|
168
|
+
it; `init room` says in one line that the control room needs an interactive Claude Code session.
|
|
169
|
+
|
|
170
|
+
The control room is the page flow-core §4.6 mirrors every work's panel to; each person has one, and
|
|
171
|
+
every repo they work in points at it.
|
|
172
|
+
|
|
173
|
+
1. **Already set?** `panel.artifact` resolves (flow-core §0) from `FLOW.claude.md` → say where it
|
|
174
|
+
points; nothing else to do. From any other file → it is one person's page handed to whoever
|
|
175
|
+
reads that file (doctor flags it): offer, in the question of step 4, to move it to
|
|
176
|
+
`FLOW.claude.md`.
|
|
177
|
+
2. **Find theirs.** Artifact `list`, scope `mine`, `limit` 200, every page of it (`page_token`
|
|
178
|
+
until none is left): the artifacts titled exactly `Flow Control Room`. A page past the first 25
|
|
179
|
+
is still theirs, and a second page would split their works in two. Read `works` once (ArtifactData
|
|
180
|
+
`list`, limit 1) on each candidate you will offer: a page that refuses it was published without
|
|
181
|
+
its database and cannot hold cards — leave it out.
|
|
182
|
+
3. **Can the key be kept out of git?** `git ls-files --error-unmatch FLOW.claude.md` succeeds → the
|
|
183
|
+
overlay is tracked, and anything written there reaches the team: do not write the key — say so,
|
|
184
|
+
and that untracking the file (`git rm --cached FLOW.claude.md`, then ignoring it) is the user's
|
|
185
|
+
call. Not tracked and not git-ignored (`git check-ignore -q FLOW.claude.md` fails — `.git/info/exclude` counts as ignored) → the step-4 question also asks to ignore it, unless §5
|
|
186
|
+
already asked that this run.
|
|
187
|
+
4. **One `AskUserQuestion`**, before anything is published or written. Options: each page found in
|
|
188
|
+
step 2, most recently updated first, at most three — or, when none was found, **publish your
|
|
189
|
+
control room** — and **not now**. With a page found, **publish a new one** stays as an option
|
|
190
|
+
only when fewer than three were offered. The ignore part of step 3 and the move of step 1 ride
|
|
191
|
+
along in the same question.
|
|
192
|
+
5. **Publish, when chosen.** Copy `~/.claude/flow/examples/panel-artifact.html` into the
|
|
193
|
+
session's scratchpad (the Artifact tool publishes only from the working directory or the
|
|
194
|
+
scratchpad, and the plugin's folder is neither), read it whole, load whatever the harness asks
|
|
195
|
+
for before passing `capabilities`, and publish that copy as a new artifact with the capabilities
|
|
196
|
+
its header names. Nobody types a path or a version: the plugin knows where it is.
|
|
197
|
+
6. **Write the key** — `- artifact: <url>` under `## panel` in `FLOW.claude.md`, in the template's
|
|
198
|
+
section order (§4): the section exists → replace the value; the file exists without it → insert
|
|
199
|
+
the section where that order puts it; absent → create the file with the two-line header of §4
|
|
200
|
+
and that section alone. Then the ignore line, if it was accepted.
|
|
201
|
+
7. **One line**: the URL, whether it was reused or published, and that `/flow-doctor` checks it and
|
|
202
|
+
names the permission rule that stops each card update from asking.
|
|
203
|
+
|
|
155
204
|
## 5. Close
|
|
156
205
|
|
|
157
206
|
- Summarize on screen: what was written to the base, what was written to the active overlay, and
|
|
@@ -167,4 +216,6 @@ phase, so their size is paid on every step:
|
|
|
167
216
|
(`FLOW.<context>.md`, flow-core §0), which a repo commits on purpose. Do not use a recursive
|
|
168
217
|
pattern either: examples under the plugin must remain visible.
|
|
169
218
|
- Git-ignore `.claude/work/` too — recommended default: ignore it (artifacts are personal working state; teams that want to share them commit deliberately). `git.worktree` not `off` → offer `.worktrees/` in the same gesture.
|
|
219
|
+
- **The control room** (§4.5), when the artifact tools are here and `panel.artifact` is empty: offer
|
|
220
|
+
it as the last question of the close.
|
|
170
221
|
- Suggest `/flow-next` as the next step (it routes to `/flow-feat-start`, `/flow-work-resume` or `/flow-work-daily`).
|
|
@@ -218,6 +218,8 @@ This system **orchestrates** the project's existing sub-agents and skills (it do
|
|
|
218
218
|
|
|
219
219
|
**No headings over the train.** A shipped MR/PR is *open, waiting to merge*; `mark` says it per entry — `wait` shipped, `current` being worked, `done` only merged.
|
|
220
220
|
|
|
221
|
+
**The artifact mirror** (opt-in, flow-core §4.6). With `panel.artifact` set — in `FLOW.claude.md`, Claude Code only — each publication is also written (a per-step patch only when the card is 10 minutes old), whole, as one card of a claude.ai page that gathers every work of every repo: doc `<owner.repo>--<work folder>` in collection `works`, the document above plus `updated_at`, `attention` (on either transport) and `repo`, `work`, `ticket`, `type`, `branch`, `harness`. The page is `examples/panel-artifact.html`, published once by hand. The transport above is unchanged.
|
|
222
|
+
|
|
221
223
|
**Who publishes it.** The 18 phase commands (flow-core §4); `/flow-feat-ship` and `/flow-bug-ship` the instant an MR/PR URL exists; `/flow-feat-plan` when the train is populated — a new train is a new shape, so a full republish; `/flow-work-resume` (§5), after reading what is on screen; `/flow-work-watch` every cycle; `/flow-work-abandon` with a terminal state. Read-only `status`, `daily`, `config`, `doctor`, `news` never publish; `/flow-work-clean` archives the folder with any panel file inside.
|
|
222
224
|
|
|
223
225
|
## Shortcuts by size
|
|
@@ -92,7 +92,7 @@ Ask the user what to do with the branch — do not decide alone:
|
|
|
92
92
|
- Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
|
|
93
93
|
- **Tracker: move to won't-do** (never "done" — this work did not ship). Only if `tracker.tool` is not `none`/empty, `tracker.abandon_cmd` is set, and `meta.json.ticket` is a **real tracker id** (skip for local-only slugs). Run `tracker.abandon_cmd` substituting `{TICKET}` = `meta.json.ticket`. Same contract as `/flow-feat-start §6.5`: **best-effort, idempotent, gated** (ask once in `autonomy.mode: manual`; automatic in `guided`/`auto`); failure or already-in-state ticket → warn and continue, never block. `tracker.abandon_cmd` empty → do nothing (the user closes the ticket by hand if they want).
|
|
94
94
|
- Panel published for this work (flow-core §4) → publish a terminal state before archiving: the title, one `block` line saying the work was abandoned and why, no `Decision` line, and `attention` cleared where the panel tools carry it — nothing is waiting on anyone any more.
|
|
95
|
-
-
|
|
95
|
+
- Delete the work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*), then move the folder to `.claude/work/_archive/` **keeping its directory name** (`_archive/<work-dir>/`, the folder located in §1 — e.g. `<TICKET>-<slug>`) so `/flow-work-daily` no longer lists it.
|
|
96
96
|
- Report to the user: ticket abandoned, reason, what was done with the branch.
|
|
97
97
|
|
|
98
98
|
## Recovery
|
|
@@ -187,7 +187,7 @@ Execute in this order (a branch cannot be deleted while a worktree holds it):
|
|
|
187
187
|
|
|
188
188
|
1. **Worktrees** — `git worktree remove <path>`. No `--force`, ever: §5 excluded the dirty ones, so a failure means something changed since the inventory. Stop that row, report it, continue.
|
|
189
189
|
2. **Branches** — `git branch -d <branch>` first. Git refuses on a squash merge; only then `git branch -D`, and only for rows whose verdict came from **the forge** (§4a) — never a locally inferred one. Name it in the report: `-D (squash-merged, MR #401)`.
|
|
190
|
-
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow-work-abandon` §6 does. Never `rm`.
|
|
190
|
+
3. **Work folders** — `mv .claude/work/<dir> .claude/work/_archive/<dir>`, keeping the name, as `/flow-work-abandon` §6 does. Never `rm`. Before each move, delete that work's card from the artifact control room when `panel.artifact` is set (flow-core §4.6, *a card ends with its work folder*).
|
|
191
191
|
4. **Prune** — `git worktree prune`.
|
|
192
192
|
|
|
193
193
|
Never touch the remote (no `git push --delete`; deleting merged remote branches is the forge's job).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.112.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.112.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Alberto Vioque",
|
|
9
9
|
"email": "mashware@gmail.com"
|
|
@@ -5,6 +5,43 @@ 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.112.0 — The control room sets itself up · 2026-11-04
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **One command per repo: `/flow:init room`.** The first time, flow publishes your control room by itself. In
|
|
12
|
+
every other repo it finds that same page among your artifacts and reuses it. Nobody types a path or a version.
|
|
13
|
+
- **`/flow:doctor` tells you when the room is off** and names the command that turns it on. It still changes
|
|
14
|
+
nothing.
|
|
15
|
+
- **A repo with no flow configuration gets the full setup**, with the room offered at the end, so no repo is
|
|
16
|
+
left with only half a configuration.
|
|
17
|
+
- **Plain `/flow:init` offers the room too**, as its last question, whenever Claude Code has the artifact tools.
|
|
18
|
+
|
|
19
|
+
Until now, turning the room on meant publishing the plugin's page by hand. That required knowing where the plugin
|
|
20
|
+
was installed and which version it was, then pasting the URL into each repo (#240).
|
|
21
|
+
|
|
22
|
+
## v0.111.0 — Every work of every repo on one page · 2026-11-04
|
|
23
|
+
|
|
24
|
+
**In short**
|
|
25
|
+
- **One page for all your consoles.** With `panel.artifact` set, each work also writes its live panel to its own
|
|
26
|
+
card on a claude.ai artifact. The page shows every work of every repo, grouped by repo, and you can open it from
|
|
27
|
+
any device.
|
|
28
|
+
- **Each card shows what the terminal shows**: the MR/PR train, what runs now, what comes next, and whether the
|
|
29
|
+
work waits on you. It is a copy of what is on screen, never a version rebuilt from memory.
|
|
30
|
+
- **Off unless you turn it on.** The key belongs in `FLOW.claude.md`, because only an interactive Claude Code
|
|
31
|
+
session has the artifact tools. Left empty, flow calls no artifact tool and nothing changes. Headless runs and
|
|
32
|
+
other harnesses keep the terminal panel only.
|
|
33
|
+
- **It never stops a phase.** A card whose version moved on gets one retry. Any other failure (a wrong URL, a
|
|
34
|
+
declined permission) turns the mirror off for the rest of the session, with one line at the next stop.
|
|
35
|
+
- **`doctor` checks it**: where the key came from, whether the tool is there, whether the page answers, and the
|
|
36
|
+
permission rule that keeps every card update from asking.
|
|
37
|
+
- **Finished work leaves the page.** Archiving a work (`abandon`, `clean`, `ship`'s archive offer) deletes its
|
|
38
|
+
card, and done cards older than a day fold into one line per repo.
|
|
39
|
+
- **The page ships with the plugin** as `examples/panel-artifact.html`. You publish it once and paste its URL into
|
|
40
|
+
each repo.
|
|
41
|
+
|
|
42
|
+
Until now each panel lived in its own pane. Someone with several consoles across several repos had no single place
|
|
43
|
+
to see which work was running and which one was waiting on them (#237).
|
|
44
|
+
|
|
8
45
|
## v0.110.0 — A bug that a flow review read is counted against that review · 2026-11-04
|
|
9
46
|
|
|
10
47
|
**In short**
|
|
@@ -357,6 +357,14 @@ already delivered but the file does not say; `feat:start` links a work to one of
|
|
|
357
357
|
- `mark:` # `ship` (default) = mark in progress on the work's first MR/PR, done on its last | `never` = read-only, flow only reads it.
|
|
358
358
|
- `columns:` # only when a table's header is ambiguous: `state=<header>, ticket=<header>, depends=<header>`. Empty = read off the header.
|
|
359
359
|
|
|
360
|
+
## panel
|
|
361
|
+
One page for every work you have running, across repos and consoles (flow-core §4.6): each work
|
|
362
|
+
mirrors its live panel to its own card on a claude.ai artifact, grouped by repo. Claude Code only —
|
|
363
|
+
put the key in `FLOW.claude.md`, which is personal and read by no other harness. `/flow:init room`
|
|
364
|
+
sets it: the first time it publishes your page, in every other repo it finds that page and reuses it.
|
|
365
|
+
|
|
366
|
+
- `artifact:` # the artifact's URL, `https://claude.ai/artifact/<id>` — `/flow:init room` writes it. Empty = no mirror, no artifact tool called. Each card update is a tool call that asks permission unless `ArtifactData` is allowed — `doctor` prints the rule.
|
|
367
|
+
|
|
360
368
|
## notes
|
|
361
369
|
Per-command extra guidance. When a command runs, it MUST follow the entry matching its command
|
|
362
370
|
plus the `all` entry, as **mandatory additional instructions for that step**, on top of the
|