flow-workflows 0.97.2 → 0.98.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/README.md +4 -5
- package/adapters/codex/AGENTS.md +0 -1
- package/adapters/codex/CORE.md +2 -2
- package/adapters/codex/README.md +3 -6
- package/adapters/codex/skills/flow-bug-review/SKILL.md +1 -1
- package/adapters/codex/skills/flow-bug-start/SKILL.md +1 -1
- package/adapters/codex/skills/flow-doctor/SKILL.md +1 -1
- package/adapters/codex/skills/flow-feat-review/SKILL.md +1 -1
- package/adapters/codex/skills/flow-feat-ship/SKILL.md +1 -1
- package/adapters/codex/skills/flow-feat-start/SKILL.md +1 -1
- package/adapters/codex/skills/flow-init/SKILL.md +1 -1
- package/adapters/codex/skills/flow-next/SKILL.md +2 -2
- package/adapters/codex/skills/flow-work-README/SKILL.md +3 -4
- package/adapters/codex/skills/flow-work-abandon/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-clean/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-daily/SKILL.md +71 -17
- package/adapters/codex/skills/flow-work-respond/SKILL.md +1 -1
- package/adapters/codex/skills/flow-work-resume/SKILL.md +1 -1
- package/adapters/gemini/CORE.md +2 -2
- package/adapters/gemini/README.md +2 -2
- package/adapters/gemini/commands/flow/bug/review.toml +1 -1
- package/adapters/gemini/commands/flow/bug/start.toml +1 -1
- package/adapters/gemini/commands/flow/doctor.toml +1 -1
- package/adapters/gemini/commands/flow/feat/review.toml +1 -1
- package/adapters/gemini/commands/flow/feat/ship.toml +1 -1
- package/adapters/gemini/commands/flow/feat/start.toml +1 -1
- package/adapters/gemini/commands/flow/init.toml +1 -1
- package/adapters/gemini/commands/flow/next.toml +2 -2
- package/adapters/gemini/commands/flow/work/README.toml +3 -4
- package/adapters/gemini/commands/flow/work/abandon.toml +1 -1
- package/adapters/gemini/commands/flow/work/clean.toml +1 -1
- package/adapters/gemini/commands/flow/work/daily.toml +71 -17
- package/adapters/gemini/commands/flow/work/respond.toml +1 -1
- package/adapters/gemini/commands/flow/work/resume.toml +1 -1
- package/adapters/hermes/CORE.md +2 -2
- package/adapters/hermes/README.md +1 -4
- package/adapters/hermes/skills/flow-bug-review/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-bug-start/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-doctor/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-feat-review/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-feat-ship/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-feat-start/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-init/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-next/SKILL.md +2 -2
- package/adapters/hermes/skills/flow-work-README/SKILL.md +3 -4
- package/adapters/hermes/skills/flow-work-abandon/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-clean/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-daily/SKILL.md +71 -17
- package/adapters/hermes/skills/flow-work-respond/SKILL.md +1 -1
- package/adapters/hermes/skills/flow-work-resume/SKILL.md +1 -1
- package/adapters/opencode/CORE.md +2 -2
- package/adapters/opencode/README.md +1 -1
- package/adapters/opencode/commands/flow-bug-review.md +1 -1
- package/adapters/opencode/commands/flow-bug-start.md +1 -1
- package/adapters/opencode/commands/flow-doctor.md +1 -1
- package/adapters/opencode/commands/flow-feat-review.md +1 -1
- package/adapters/opencode/commands/flow-feat-ship.md +1 -1
- package/adapters/opencode/commands/flow-feat-start.md +1 -1
- package/adapters/opencode/commands/flow-init.md +1 -1
- package/adapters/opencode/commands/flow-next.md +2 -2
- package/adapters/opencode/commands/flow-work-README.md +3 -4
- package/adapters/opencode/commands/flow-work-abandon.md +1 -1
- package/adapters/opencode/commands/flow-work-clean.md +1 -1
- package/adapters/opencode/commands/flow-work-daily.md +71 -17
- package/adapters/opencode/commands/flow-work-respond.md +1 -1
- package/adapters/opencode/commands/flow-work-resume.md +1 -1
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow/CHANGELOG.md +23 -0
- package/plugins/flow/examples/FLOW.template.md +5 -5
- package/adapters/codex/skills/flow-work-status/SKILL.md +0 -131
- package/adapters/gemini/commands/flow/work/status.toml +0 -128
- package/adapters/hermes/skills/flow-work-status/SKILL.md +0 -131
- package/adapters/opencode/commands/flow-work-status.md +0 -129
|
@@ -5,6 +5,29 @@ 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.98.0 — One overview, and it knows what you merged · 2026-10-21
|
|
9
|
+
|
|
10
|
+
**In short**
|
|
11
|
+
- **`/flow:work:status` is gone; `/flow:work:daily` is the one overview.** Everything only `status`
|
|
12
|
+
showed moved in: one block per open work (phase, MR/PR states, size against the estimate,
|
|
13
|
+
measured cost), log against git on the current branch, orphaned branches and folders, residue.
|
|
14
|
+
With forge and tracker unavailable it is still the full local picture.
|
|
15
|
+
- **An MR/PR merged outside flow no longer looks in progress.** `daily` asks the forge for the real
|
|
16
|
+
state of every MR/PR a work recorded as open; merged or closed there → *merged on the forge, work
|
|
17
|
+
still says in progress*, pointing at `/flow:work:clean` (last part) or `/flow:work:resume` (more
|
|
18
|
+
parts planned). Read-only: `clean` still writes the verdict.
|
|
19
|
+
- **"You" is the authenticated account, never a name.** Tickets assigned to you come from
|
|
20
|
+
`assignee = currentUser()` on Jira and `@me` on GitHub/GitLab; review threads compare your login
|
|
21
|
+
to the author's username. `tracker.assignee` overrides it only as an exact id or email, and
|
|
22
|
+
`{ASSIGNEE}` no longer falls back to `git.assignee` — a forge username is not a tracker account.
|
|
23
|
+
- **The Jira examples now run.** `start_cmd`, `done_cmd` and `abandon_cmd` use `--key`/`--status`/
|
|
24
|
+
`--yes` and `--assignee`, the syntax `acli` accepts; the positional form they showed was refused.
|
|
25
|
+
|
|
26
|
+
Two developers sharing a first name ran `daily`, and one got the other's tickets: the tracker
|
|
27
|
+
query was left to the model, which matched by name. The same user had been using `status` to see
|
|
28
|
+
what was in flight after a busy day — it read only `meta.json`, so every MR merged on the forge
|
|
29
|
+
still showed as in progress until each work was resumed one by one.
|
|
30
|
+
|
|
8
31
|
## v0.97.2 — An update to an open MR/PR no longer declares a part · 2026-10-20
|
|
9
32
|
|
|
10
33
|
**In short**
|
|
@@ -45,13 +45,13 @@ How tickets are identified and read.
|
|
|
45
45
|
# GitLab: `glab issue view {TICKET} --comments`
|
|
46
46
|
# Empty = derived from `tool` for `gh`/`glab`; for Jira/`linear` the commands try the native way once
|
|
47
47
|
# and, if there is none, warn in one line that the thread was not read (never silently assume it was empty).
|
|
48
|
-
- `assignee:` # tracker
|
|
48
|
+
- `assignee:` # tracker account (exact id or email) for the `{ASSIGNEE}` token in the commands below, and the "you" `/flow:work:daily` filters tickets by. Empty = the tracker's own self-reference (`@me`) — never `git.assignee`, which is a forge username.
|
|
49
49
|
- `start_cmd:` # optional, run when a work STARTS (`/flow:feat:start`, `/flow:bug:start`) to move the ticket to "in progress" and/or assign it. `{TICKET}` and `{ASSIGNEE}` substituted; chain two calls with `&&`. Empty = do not transition on start. e.g.:
|
|
50
|
-
# Jira: `acli jira workitem transition {TICKET} "In Progress" && acli jira workitem assign {TICKET} {ASSIGNEE}`
|
|
50
|
+
# Jira: `acli jira workitem transition --key {TICKET} --status "In Progress" --yes && acli jira workitem assign --key {TICKET} --assignee {ASSIGNEE}`
|
|
51
51
|
- `done_cmd:` # optional, run when a work SHIPS and is merged (`phase` reaches `done`) to move the ticket to "done". `{TICKET}` substituted. Empty = do not transition. **Leave empty on GitHub/GitLab** — the `Closes #N` in the MR/PR body already auto-closes the issue on merge. e.g.:
|
|
52
|
-
# Jira: `acli jira workitem transition {TICKET} "Done"`
|
|
52
|
+
# Jira: `acli jira workitem transition --key {TICKET} --status "Done" --yes`
|
|
53
53
|
- `abandon_cmd:` # optional, run when a work is ABANDONED (`/flow:work:abandon`) to move the ticket to a cancelled / won't-do state. `{TICKET}` substituted. Empty = do not transition. e.g.:
|
|
54
|
-
# Jira: `acli jira workitem transition {TICKET} "Won't Do"`
|
|
54
|
+
# Jira: `acli jira workitem transition --key {TICKET} --status "Won't Do" --yes`
|
|
55
55
|
#
|
|
56
56
|
# The three `*_cmd` transitions are **best-effort, idempotent, and gated**: outward-facing, so
|
|
57
57
|
# they are asked before running in `autonomy.mode: manual` and run automatically in `guided`/`auto`;
|
|
@@ -366,7 +366,7 @@ command or skill fits. Section empty or absent = every knowledge step is skipped
|
|
|
366
366
|
# Empty = the finding is written to the phase artifact only (no staging).
|
|
367
367
|
- `read_staging:` # optional. Tool that returns what this branch has staged. Empty = the phase artifacts are the staging.
|
|
368
368
|
- `save:` # optional. Tool that consolidates one finding into the store (`ship`, `postmortem`, `abandon`, and the
|
|
369
|
-
# offer in `/flow:work:
|
|
369
|
+
# offer in `/flow:work:daily` when there is staging). Empty = the consolidation appends the findings to
|
|
370
370
|
# `KNOWLEDGE.md` at the repo root instead.
|
|
371
371
|
- `timeout_s:` # per call. Empty = 2. A call that fails or takes longer → continue without it, silently.
|
|
372
372
|
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-work-status
|
|
3
|
-
description: "Summary of all open works in .claude/work/"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/work/status.md — do not edit; change the plugin file and run the script. -->
|
|
7
|
-
|
|
8
|
-
# `$flow-work-status`
|
|
9
|
-
|
|
10
|
-
> **codex adapter — how the Claude Code primitives named below map here.**
|
|
11
|
-
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
12
|
-
> - `Agent <role>` / `Agent general-purpose` / subagents → the subagent declared under `[agents.<name>]` in `~/.codex/config.toml`; the name comes from `agents.<role>` in `FLOW.md`, empty → do it in this context.
|
|
13
|
-
> - Parallel fan-out → several subagents in one response, capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
|
|
14
|
-
> - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `codex exec "<command>"` with cron or Codex automations.
|
|
15
|
-
> - `TaskCreate` → a markdown checklist in the phase artifact.
|
|
16
|
-
> - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
|
|
17
|
-
> - `/model <value>` → the `--model` flag at launch (or `/model` if your Codex version has it).
|
|
18
|
-
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `[mcp_servers.<name>]` in `config.toml` (see `config.snippet.toml`).
|
|
19
|
-
> - `$ARGUMENTS` → whatever the user typed after the skill name, empty if nothing — Codex substitutes nothing, so read it off their message.
|
|
20
|
-
|
|
21
|
-
Read `~/.claude/flow/CORE.codex.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
|
|
22
|
-
|
|
23
|
-
**Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
|
|
24
|
-
|
|
25
|
-
Overview of works in progress; detects divergences between artifacts and actual git state.
|
|
26
|
-
|
|
27
|
-
## 1. List works
|
|
28
|
-
|
|
29
|
-
- `ls -1 .claude/work/` (ignore `_archive`).
|
|
30
|
-
- **Then `_archive/*/meta.json` for `followups[]` alone** — entries not `declined`/`logged`/`done` (§5). Nothing else about an archived work is shown; a finished work is exactly when its deferred items stop being visible, which is the point of reading them here.
|
|
31
|
-
- Read the `meta.json` of **every** folder (named `<TICKET>-<slug>`, `<slug>` for ticket-less/local works, or just `<TICKET>` for older ones). Identify each work by `meta.json.ticket`, not by the folder name.
|
|
32
|
-
- Read `00-summary.md` per work when it exists and use it for the recap (`Next:` line, what is pending) instead of reading every artifact (flow-core §5); missing → fall back to the artifacts.
|
|
33
|
-
|
|
34
|
-
## 2. For each work, display
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
<TICKET> — <title> [feat|bug] [XS|S|M|L] ⏵ <current phase>
|
|
38
|
-
Branch: <branch> [✓ active | ⚠ not current]
|
|
39
|
-
Started: <date>
|
|
40
|
-
Updated: <date>
|
|
41
|
-
Phases done: context, design, build…
|
|
42
|
-
MR/PRs: 2/4 merged · MR/PR #3 in_progress · MR/PR #4 pending
|
|
43
|
-
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"> (line only if any)
|
|
44
|
-
Follow-ups: 2 awaiting a decision · 1 accepted, not started (line only if any)
|
|
45
|
-
Cost: $0.71 measured over 2 phases · 1 phase not reported (line only if any)
|
|
46
|
-
Next: <suggested next command>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
- "MR"/"PR" from `git.host` (`gitlab` → MR, every other host → PR); no host → "MR/PR".
|
|
50
|
-
- `Cross-repo:` only when `meta.json.related_repos` has entries not `done`: each as `<repo>: <scope>`, appending ` — contract not handed over` when that entry's `contract_handoff` is `pending`. It flags that a **sibling repo still has a pending part**; flow never scans or touches the other repo.
|
|
51
|
-
- `Follow-ups:` only when `meta.json.followups[]` has entries not `declined`/`logged`/`done` (flow-core §7): count the `proposed` ones as *awaiting a decision* and the `accepted` ones without a `work` as *accepted, not started*, naming the ticket id when there is one. `in_progress` entries are already visible as their own work — do not double-count them.
|
|
52
|
-
- `Cost:` only when `meta.json.cost[]` has entries (flow-core §4): sum the `usd` figures that are there, count the phases behind them, and count separately the entries whose `source` is `not reported`. A work with no entries shows **no line at all** — absence is not zero, and a `$0.00` under a work nobody measured is the one output that would make the block worth ignoring. The figures are the harness's own client-side estimates, not a bill; `flow cost` prints the same data phase by phase.
|
|
53
|
-
- `MR/PRs:` only when `meta.json.mrs` exists with >0 entries:
|
|
54
|
-
- Summary: `<merged>/<total> merged`.
|
|
55
|
-
- `closed` or `superseded` MR/PRs present → add to the count: `2/4 merged · 1 closed · 1 pending`.
|
|
56
|
-
- One `in_progress` → show it explicitly with its number.
|
|
57
|
-
- Any `closed`/`superseded` → list the reason (truncated to 40 chars): `MR/PR #2 closed (reviewer requested different approach)`.
|
|
58
|
-
|
|
59
|
-
### Actual progress vs estimate
|
|
60
|
-
|
|
61
|
-
**Only for the `in_progress` MR/PR and only if the branch matches the current one** (you can measure the diff). Base = `git.default_base` in FLOW.md; empty → auto-discover the repo's base branch. Calculate:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
git diff --shortstat <base>..HEAD # lines
|
|
65
|
-
git diff --name-only <base>..HEAD | wc -l # files
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Compare with `mrs[in_progress].lines_est` and `files_est`; show a line below `MR/PRs:`:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
Current MR/PR size: 180/120 lines (150%) · 7/6 files ⚠ exceeds estimate
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Rules:
|
|
75
|
-
- lines ≤ `lines_est * 1.5` **and** files ≤ `files_est + 2` → show without warning, in grey.
|
|
76
|
-
- **Either** threshold exceeded → add `⚠ exceeds estimate` and suggest that `$flow-feat-build` applies §2.3 (the size thermometer: cut / continue / reopen).
|
|
77
|
-
- No `lines_est` in meta.json (older work) → do not show the line, do not invent an estimate.
|
|
78
|
-
|
|
79
|
-
## 3. Divergences with git
|
|
80
|
-
|
|
81
|
-
Only if the branch in meta.json **is the current one**:
|
|
82
|
-
|
|
83
|
-
- `git diff --name-only <base>...HEAD | wc -l` → files changed on the branch.
|
|
84
|
-
- Read `05-implementation.md` (features) or `04-fix.md` (bugs); extract the listed files.
|
|
85
|
-
- Files changed in git that do not appear in the log:
|
|
86
|
-
```
|
|
87
|
-
⚠ Divergence: <N> changed files not recorded in log.
|
|
88
|
-
Examples: <path>, <path>…
|
|
89
|
-
```
|
|
90
|
-
- Files in the log with no actual change in git → same.
|
|
91
|
-
|
|
92
|
-
## 4. Orphaned works
|
|
93
|
-
|
|
94
|
-
- Local branches matching the ticket pattern with no work folder (`.claude/work/<TICKET>/` or `.claude/work/<TICKET>-*/`, matched via `meta.json.ticket`/`branch`) → warn.
|
|
95
|
-
- Work folders whose branch no longer exists locally → ask whether to archive.
|
|
96
|
-
- **Residue count** (one line, no per-entry detail): worktrees registered (`git worktree list`, minus the main checkout), work folders with `phase: done` still outside `_archive/`, and prunable registrations (`git worktree prune --dry-run`). Total above a handful → `Residue: <N> worktrees · <N> unarchived done · <N> prunable → $flow-work-clean --dry-run`. This command never deletes anything — `clean` establishes the merged/open verdict and acts.
|
|
97
|
-
- Branch pattern from `git.branch_pattern` in FLOW.md; empty → branches matching `<prefix>XXXXX-*` or orphaned folders in `.claude/work/`.
|
|
98
|
-
|
|
99
|
-
## 5. Open follow-ups (live works and `_archive/`)
|
|
100
|
-
|
|
101
|
-
One block at the end, only when there is anything to show. Deferred work outlives the work that
|
|
102
|
-
deferred it, and `_archive/` is where it goes to be forgotten:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
Follow-ups awaiting a decision
|
|
106
|
-
PROJ-123 F2 audit the other three callers of the same helper (archived work)
|
|
107
|
-
PROJ-140 F1 index on events.created_at — plan says full scan → PROJ-155
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
- Source: `followups[]` of every `meta.json`, live folders **and** `_archive/`, entries not
|
|
111
|
-
`declined`/`logged`/`done`. Show the originating ticket, the id, the `title`, and the created ticket when
|
|
112
|
-
`ticket` is set. Mark archived origins so it is clear the work itself is finished.
|
|
113
|
-
- `proposed` entries are listed under *awaiting a decision*; `accepted` ones without a `work` under
|
|
114
|
-
*accepted, not started*. Suggest `$flow-feat-start <ticket>` for the latter.
|
|
115
|
-
- More than about eight → show the newest five and the total. This command is read-only: it never
|
|
116
|
-
triages, creates a ticket, or edits `followups[]`. That happens once, at `ship` (flow-core §7).
|
|
117
|
-
|
|
118
|
-
## 6. Quick actions
|
|
119
|
-
|
|
120
|
-
If a work's branch matches the current one, suggest:
|
|
121
|
-
- `phase = "done"` → nothing to do; offer to archive.
|
|
122
|
-
- `phase = "abandoned"` → the folder should already be in `_archive/`; at the root → suggest moving it.
|
|
123
|
-
- An `in_progress` MR/PR waiting for merge confirmation → `$flow-feat-ship` should update the state.
|
|
124
|
-
- A `closed` MR/PR with no subsequent decision → warn so the user can decide (retry build or abandon).
|
|
125
|
-
- Otherwise → the concrete next command.
|
|
126
|
-
|
|
127
|
-
**A mid-work knowledge save lives here.** `knowledge.read_staging` is set and returns entries for the
|
|
128
|
-
current branch → offer, as one more action, to consolidate them now (flow-core §0) instead of waiting
|
|
129
|
-
for `ship` or `postmortem`. Only when there are entries, only as an option among the others, and
|
|
130
|
-
never as a question of its own: this is the last place a session that is about to end can bank what
|
|
131
|
-
it learned.
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# GENERATED by script/adapter-build.py from plugins/flow/commands/work/status.md — do not edit; change the plugin file and run the script.
|
|
2
|
-
description = "Summary of all open works in .claude/work/"
|
|
3
|
-
|
|
4
|
-
prompt = """
|
|
5
|
-
# `/flow:work:status`
|
|
6
|
-
|
|
7
|
-
> **gemini adapter — how the Claude Code primitives named below map here.**
|
|
8
|
-
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
9
|
-
> - `Agent <role>` / `Agent general-purpose` / subagents → `@<name>` from `.gemini/agents/`; the name comes from `agents.<role>` in `FLOW.md`, empty or absent → do it in this context.
|
|
10
|
-
> - Parallel fan-out → several `@name` in one turn (sequential in this context if none are configured), capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
|
|
11
|
-
> - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `gemini -p "<command>"` with cron.
|
|
12
|
-
> - `TaskCreate` → a markdown checklist in the phase artifact.
|
|
13
|
-
> - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
|
|
14
|
-
> - `/model <value>` → the `--model` flag at launch.
|
|
15
|
-
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
|
|
16
|
-
|
|
17
|
-
Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
|
|
18
|
-
|
|
19
|
-
**Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
|
|
20
|
-
|
|
21
|
-
Overview of works in progress; detects divergences between artifacts and actual git state.
|
|
22
|
-
|
|
23
|
-
## 1. List works
|
|
24
|
-
|
|
25
|
-
- `ls -1 .claude/work/` (ignore `_archive`).
|
|
26
|
-
- **Then `_archive/*/meta.json` for `followups[]` alone** — entries not `declined`/`logged`/`done` (§5). Nothing else about an archived work is shown; a finished work is exactly when its deferred items stop being visible, which is the point of reading them here.
|
|
27
|
-
- Read the `meta.json` of **every** folder (named `<TICKET>-<slug>`, `<slug>` for ticket-less/local works, or just `<TICKET>` for older ones). Identify each work by `meta.json.ticket`, not by the folder name.
|
|
28
|
-
- Read `00-summary.md` per work when it exists and use it for the recap (`Next:` line, what is pending) instead of reading every artifact (flow-core §5); missing → fall back to the artifacts.
|
|
29
|
-
|
|
30
|
-
## 2. For each work, display
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
<TICKET> — <title> [feat|bug] [XS|S|M|L] ⏵ <current phase>
|
|
34
|
-
Branch: <branch> [✓ active | ⚠ not current]
|
|
35
|
-
Started: <date>
|
|
36
|
-
Updated: <date>
|
|
37
|
-
Phases done: context, design, build…
|
|
38
|
-
MR/PRs: 2/4 merged · MR/PR #3 in_progress · MR/PR #4 pending
|
|
39
|
-
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"> (line only if any)
|
|
40
|
-
Follow-ups: 2 awaiting a decision · 1 accepted, not started (line only if any)
|
|
41
|
-
Cost: $0.71 measured over 2 phases · 1 phase not reported (line only if any)
|
|
42
|
-
Next: <suggested next command>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
- "MR"/"PR" from `git.host` (`gitlab` → MR, every other host → PR); no host → "MR/PR".
|
|
46
|
-
- `Cross-repo:` only when `meta.json.related_repos` has entries not `done`: each as `<repo>: <scope>`, appending ` — contract not handed over` when that entry's `contract_handoff` is `pending`. It flags that a **sibling repo still has a pending part**; flow never scans or touches the other repo.
|
|
47
|
-
- `Follow-ups:` only when `meta.json.followups[]` has entries not `declined`/`logged`/`done` (flow-core §7): count the `proposed` ones as *awaiting a decision* and the `accepted` ones without a `work` as *accepted, not started*, naming the ticket id when there is one. `in_progress` entries are already visible as their own work — do not double-count them.
|
|
48
|
-
- `Cost:` only when `meta.json.cost[]` has entries (flow-core §4): sum the `usd` figures that are there, count the phases behind them, and count separately the entries whose `source` is `not reported`. A work with no entries shows **no line at all** — absence is not zero, and a `$0.00` under a work nobody measured is the one output that would make the block worth ignoring. The figures are the harness's own client-side estimates, not a bill; `flow cost` prints the same data phase by phase.
|
|
49
|
-
- `MR/PRs:` only when `meta.json.mrs` exists with >0 entries:
|
|
50
|
-
- Summary: `<merged>/<total> merged`.
|
|
51
|
-
- `closed` or `superseded` MR/PRs present → add to the count: `2/4 merged · 1 closed · 1 pending`.
|
|
52
|
-
- One `in_progress` → show it explicitly with its number.
|
|
53
|
-
- Any `closed`/`superseded` → list the reason (truncated to 40 chars): `MR/PR #2 closed (reviewer requested different approach)`.
|
|
54
|
-
|
|
55
|
-
### Actual progress vs estimate
|
|
56
|
-
|
|
57
|
-
**Only for the `in_progress` MR/PR and only if the branch matches the current one** (you can measure the diff). Base = `git.default_base` in FLOW.md; empty → auto-discover the repo's base branch. Calculate:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
git diff --shortstat <base>..HEAD # lines
|
|
61
|
-
git diff --name-only <base>..HEAD | wc -l # files
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Compare with `mrs[in_progress].lines_est` and `files_est`; show a line below `MR/PRs:`:
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
Current MR/PR size: 180/120 lines (150%) · 7/6 files ⚠ exceeds estimate
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Rules:
|
|
71
|
-
- lines ≤ `lines_est * 1.5` **and** files ≤ `files_est + 2` → show without warning, in grey.
|
|
72
|
-
- **Either** threshold exceeded → add `⚠ exceeds estimate` and suggest that `/flow:feat:build` applies §2.3 (the size thermometer: cut / continue / reopen).
|
|
73
|
-
- No `lines_est` in meta.json (older work) → do not show the line, do not invent an estimate.
|
|
74
|
-
|
|
75
|
-
## 3. Divergences with git
|
|
76
|
-
|
|
77
|
-
Only if the branch in meta.json **is the current one**:
|
|
78
|
-
|
|
79
|
-
- `git diff --name-only <base>...HEAD | wc -l` → files changed on the branch.
|
|
80
|
-
- Read `05-implementation.md` (features) or `04-fix.md` (bugs); extract the listed files.
|
|
81
|
-
- Files changed in git that do not appear in the log:
|
|
82
|
-
```
|
|
83
|
-
⚠ Divergence: <N> changed files not recorded in log.
|
|
84
|
-
Examples: <path>, <path>…
|
|
85
|
-
```
|
|
86
|
-
- Files in the log with no actual change in git → same.
|
|
87
|
-
|
|
88
|
-
## 4. Orphaned works
|
|
89
|
-
|
|
90
|
-
- Local branches matching the ticket pattern with no work folder (`.claude/work/<TICKET>/` or `.claude/work/<TICKET>-*/`, matched via `meta.json.ticket`/`branch`) → warn.
|
|
91
|
-
- Work folders whose branch no longer exists locally → ask whether to archive.
|
|
92
|
-
- **Residue count** (one line, no per-entry detail): worktrees registered (`git worktree list`, minus the main checkout), work folders with `phase: done` still outside `_archive/`, and prunable registrations (`git worktree prune --dry-run`). Total above a handful → `Residue: <N> worktrees · <N> unarchived done · <N> prunable → /flow:work:clean --dry-run`. This command never deletes anything — `clean` establishes the merged/open verdict and acts.
|
|
93
|
-
- Branch pattern from `git.branch_pattern` in FLOW.md; empty → branches matching `<prefix>XXXXX-*` or orphaned folders in `.claude/work/`.
|
|
94
|
-
|
|
95
|
-
## 5. Open follow-ups (live works and `_archive/`)
|
|
96
|
-
|
|
97
|
-
One block at the end, only when there is anything to show. Deferred work outlives the work that
|
|
98
|
-
deferred it, and `_archive/` is where it goes to be forgotten:
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
Follow-ups awaiting a decision
|
|
102
|
-
PROJ-123 F2 audit the other three callers of the same helper (archived work)
|
|
103
|
-
PROJ-140 F1 index on events.created_at — plan says full scan → PROJ-155
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
- Source: `followups[]` of every `meta.json`, live folders **and** `_archive/`, entries not
|
|
107
|
-
`declined`/`logged`/`done`. Show the originating ticket, the id, the `title`, and the created ticket when
|
|
108
|
-
`ticket` is set. Mark archived origins so it is clear the work itself is finished.
|
|
109
|
-
- `proposed` entries are listed under *awaiting a decision*; `accepted` ones without a `work` under
|
|
110
|
-
*accepted, not started*. Suggest `/flow:feat:start <ticket>` for the latter.
|
|
111
|
-
- More than about eight → show the newest five and the total. This command is read-only: it never
|
|
112
|
-
triages, creates a ticket, or edits `followups[]`. That happens once, at `ship` (flow-core §7).
|
|
113
|
-
|
|
114
|
-
## 6. Quick actions
|
|
115
|
-
|
|
116
|
-
If a work's branch matches the current one, suggest:
|
|
117
|
-
- `phase = "done"` → nothing to do; offer to archive.
|
|
118
|
-
- `phase = "abandoned"` → the folder should already be in `_archive/`; at the root → suggest moving it.
|
|
119
|
-
- An `in_progress` MR/PR waiting for merge confirmation → `/flow:feat:ship` should update the state.
|
|
120
|
-
- A `closed` MR/PR with no subsequent decision → warn so the user can decide (retry build or abandon).
|
|
121
|
-
- Otherwise → the concrete next command.
|
|
122
|
-
|
|
123
|
-
**A mid-work knowledge save lives here.** `knowledge.read_staging` is set and returns entries for the
|
|
124
|
-
current branch → offer, as one more action, to consolidate them now (flow-core §0) instead of waiting
|
|
125
|
-
for `ship` or `postmortem`. Only when there are entries, only as an option among the others, and
|
|
126
|
-
never as a question of its own: this is the last place a session that is about to end can bank what
|
|
127
|
-
it learned.
|
|
128
|
-
"""
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-work-status
|
|
3
|
-
description: "Summary of all open works in .claude/work/"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/work/status.md — do not edit; change the plugin file and run the script. -->
|
|
7
|
-
|
|
8
|
-
# `/flow-work-status`
|
|
9
|
-
|
|
10
|
-
> **hermes adapter — how the Claude Code primitives named below map here.**
|
|
11
|
-
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
12
|
-
> - `Agent <role>` / `Agent general-purpose` / subagents → `delegate_task`, which creates the child on the spot from the `goal` and `context` you give it: the name in `agents.<role>` in `FLOW.md` is a role to state in that prompt, not an agent to declare anywhere; empty → do it in this context.
|
|
13
|
-
> - Parallel fan-out → several `delegate_task` calls in one response, capped at `agents.fanout_max` (empty → 4) and, above that, by `delegation.max_concurrent_children` in `config.yaml` (default 10); `agents.fanout_tool` is Claude Code-only, ignore it.
|
|
14
|
-
> - `ScheduleWakeup` / `Monitor` / `/loop` → Hermes schedules itself: the `cronjob` tool, or `/cron add "every 30m" "<this command>"`. Each firing is a fresh session with no history, so the state still lives in `monitor.md` and the scheduled text must stand alone; retiring the job from inside a firing needs `cron.allow_agent_scheduling: true`.
|
|
15
|
-
> - `TaskCreate` → a markdown checklist in the phase artifact.
|
|
16
|
-
> - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
|
|
17
|
-
> - `/model <value>` → Hermes's own `/model`; a subagent's model is `delegation.model` in `config.yaml`, one value for every child of a round.
|
|
18
|
-
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcp_servers` in `~/.hermes/config.yaml` (see `config.snippet.yaml`).
|
|
19
|
-
> - `$ARGUMENTS` → what the user typed after the skill name: Hermes takes everything from the first non-skill token on as the instruction.
|
|
20
|
-
|
|
21
|
-
Read `~/.claude/flow/CORE.hermes.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
|
|
22
|
-
|
|
23
|
-
**Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
|
|
24
|
-
|
|
25
|
-
Overview of works in progress; detects divergences between artifacts and actual git state.
|
|
26
|
-
|
|
27
|
-
## 1. List works
|
|
28
|
-
|
|
29
|
-
- `ls -1 .claude/work/` (ignore `_archive`).
|
|
30
|
-
- **Then `_archive/*/meta.json` for `followups[]` alone** — entries not `declined`/`logged`/`done` (§5). Nothing else about an archived work is shown; a finished work is exactly when its deferred items stop being visible, which is the point of reading them here.
|
|
31
|
-
- Read the `meta.json` of **every** folder (named `<TICKET>-<slug>`, `<slug>` for ticket-less/local works, or just `<TICKET>` for older ones). Identify each work by `meta.json.ticket`, not by the folder name.
|
|
32
|
-
- Read `00-summary.md` per work when it exists and use it for the recap (`Next:` line, what is pending) instead of reading every artifact (flow-core §5); missing → fall back to the artifacts.
|
|
33
|
-
|
|
34
|
-
## 2. For each work, display
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
<TICKET> — <title> [feat|bug] [XS|S|M|L] ⏵ <current phase>
|
|
38
|
-
Branch: <branch> [✓ active | ⚠ not current]
|
|
39
|
-
Started: <date>
|
|
40
|
-
Updated: <date>
|
|
41
|
-
Phases done: context, design, build…
|
|
42
|
-
MR/PRs: 2/4 merged · MR/PR #3 in_progress · MR/PR #4 pending
|
|
43
|
-
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"> (line only if any)
|
|
44
|
-
Follow-ups: 2 awaiting a decision · 1 accepted, not started (line only if any)
|
|
45
|
-
Cost: $0.71 measured over 2 phases · 1 phase not reported (line only if any)
|
|
46
|
-
Next: <suggested next command>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
- "MR"/"PR" from `git.host` (`gitlab` → MR, every other host → PR); no host → "MR/PR".
|
|
50
|
-
- `Cross-repo:` only when `meta.json.related_repos` has entries not `done`: each as `<repo>: <scope>`, appending ` — contract not handed over` when that entry's `contract_handoff` is `pending`. It flags that a **sibling repo still has a pending part**; flow never scans or touches the other repo.
|
|
51
|
-
- `Follow-ups:` only when `meta.json.followups[]` has entries not `declined`/`logged`/`done` (flow-core §7): count the `proposed` ones as *awaiting a decision* and the `accepted` ones without a `work` as *accepted, not started*, naming the ticket id when there is one. `in_progress` entries are already visible as their own work — do not double-count them.
|
|
52
|
-
- `Cost:` only when `meta.json.cost[]` has entries (flow-core §4): sum the `usd` figures that are there, count the phases behind them, and count separately the entries whose `source` is `not reported`. A work with no entries shows **no line at all** — absence is not zero, and a `$0.00` under a work nobody measured is the one output that would make the block worth ignoring. The figures are the harness's own client-side estimates, not a bill; `flow cost` prints the same data phase by phase.
|
|
53
|
-
- `MR/PRs:` only when `meta.json.mrs` exists with >0 entries:
|
|
54
|
-
- Summary: `<merged>/<total> merged`.
|
|
55
|
-
- `closed` or `superseded` MR/PRs present → add to the count: `2/4 merged · 1 closed · 1 pending`.
|
|
56
|
-
- One `in_progress` → show it explicitly with its number.
|
|
57
|
-
- Any `closed`/`superseded` → list the reason (truncated to 40 chars): `MR/PR #2 closed (reviewer requested different approach)`.
|
|
58
|
-
|
|
59
|
-
### Actual progress vs estimate
|
|
60
|
-
|
|
61
|
-
**Only for the `in_progress` MR/PR and only if the branch matches the current one** (you can measure the diff). Base = `git.default_base` in FLOW.md; empty → auto-discover the repo's base branch. Calculate:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
git diff --shortstat <base>..HEAD # lines
|
|
65
|
-
git diff --name-only <base>..HEAD | wc -l # files
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Compare with `mrs[in_progress].lines_est` and `files_est`; show a line below `MR/PRs:`:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
Current MR/PR size: 180/120 lines (150%) · 7/6 files ⚠ exceeds estimate
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Rules:
|
|
75
|
-
- lines ≤ `lines_est * 1.5` **and** files ≤ `files_est + 2` → show without warning, in grey.
|
|
76
|
-
- **Either** threshold exceeded → add `⚠ exceeds estimate` and suggest that `/flow-feat-build` applies §2.3 (the size thermometer: cut / continue / reopen).
|
|
77
|
-
- No `lines_est` in meta.json (older work) → do not show the line, do not invent an estimate.
|
|
78
|
-
|
|
79
|
-
## 3. Divergences with git
|
|
80
|
-
|
|
81
|
-
Only if the branch in meta.json **is the current one**:
|
|
82
|
-
|
|
83
|
-
- `git diff --name-only <base>...HEAD | wc -l` → files changed on the branch.
|
|
84
|
-
- Read `05-implementation.md` (features) or `04-fix.md` (bugs); extract the listed files.
|
|
85
|
-
- Files changed in git that do not appear in the log:
|
|
86
|
-
```
|
|
87
|
-
⚠ Divergence: <N> changed files not recorded in log.
|
|
88
|
-
Examples: <path>, <path>…
|
|
89
|
-
```
|
|
90
|
-
- Files in the log with no actual change in git → same.
|
|
91
|
-
|
|
92
|
-
## 4. Orphaned works
|
|
93
|
-
|
|
94
|
-
- Local branches matching the ticket pattern with no work folder (`.claude/work/<TICKET>/` or `.claude/work/<TICKET>-*/`, matched via `meta.json.ticket`/`branch`) → warn.
|
|
95
|
-
- Work folders whose branch no longer exists locally → ask whether to archive.
|
|
96
|
-
- **Residue count** (one line, no per-entry detail): worktrees registered (`git worktree list`, minus the main checkout), work folders with `phase: done` still outside `_archive/`, and prunable registrations (`git worktree prune --dry-run`). Total above a handful → `Residue: <N> worktrees · <N> unarchived done · <N> prunable → /flow-work-clean --dry-run`. This command never deletes anything — `clean` establishes the merged/open verdict and acts.
|
|
97
|
-
- Branch pattern from `git.branch_pattern` in FLOW.md; empty → branches matching `<prefix>XXXXX-*` or orphaned folders in `.claude/work/`.
|
|
98
|
-
|
|
99
|
-
## 5. Open follow-ups (live works and `_archive/`)
|
|
100
|
-
|
|
101
|
-
One block at the end, only when there is anything to show. Deferred work outlives the work that
|
|
102
|
-
deferred it, and `_archive/` is where it goes to be forgotten:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
Follow-ups awaiting a decision
|
|
106
|
-
PROJ-123 F2 audit the other three callers of the same helper (archived work)
|
|
107
|
-
PROJ-140 F1 index on events.created_at — plan says full scan → PROJ-155
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
- Source: `followups[]` of every `meta.json`, live folders **and** `_archive/`, entries not
|
|
111
|
-
`declined`/`logged`/`done`. Show the originating ticket, the id, the `title`, and the created ticket when
|
|
112
|
-
`ticket` is set. Mark archived origins so it is clear the work itself is finished.
|
|
113
|
-
- `proposed` entries are listed under *awaiting a decision*; `accepted` ones without a `work` under
|
|
114
|
-
*accepted, not started*. Suggest `/flow-feat-start <ticket>` for the latter.
|
|
115
|
-
- More than about eight → show the newest five and the total. This command is read-only: it never
|
|
116
|
-
triages, creates a ticket, or edits `followups[]`. That happens once, at `ship` (flow-core §7).
|
|
117
|
-
|
|
118
|
-
## 6. Quick actions
|
|
119
|
-
|
|
120
|
-
If a work's branch matches the current one, suggest:
|
|
121
|
-
- `phase = "done"` → nothing to do; offer to archive.
|
|
122
|
-
- `phase = "abandoned"` → the folder should already be in `_archive/`; at the root → suggest moving it.
|
|
123
|
-
- An `in_progress` MR/PR waiting for merge confirmation → `/flow-feat-ship` should update the state.
|
|
124
|
-
- A `closed` MR/PR with no subsequent decision → warn so the user can decide (retry build or abandon).
|
|
125
|
-
- Otherwise → the concrete next command.
|
|
126
|
-
|
|
127
|
-
**A mid-work knowledge save lives here.** `knowledge.read_staging` is set and returns entries for the
|
|
128
|
-
current branch → offer, as one more action, to consolidate them now (flow-core §0) instead of waiting
|
|
129
|
-
for `ship` or `postmortem`. Only when there are entries, only as an option among the others, and
|
|
130
|
-
never as a question of its own: this is the last place a session that is about to end can bank what
|
|
131
|
-
it learned.
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Summary of all open works in .claude/work/
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<!-- GENERATED by script/adapter-build.py from plugins/flow/commands/work/status.md — do not edit; change the plugin file and run the script. -->
|
|
6
|
-
|
|
7
|
-
# `/flow-work-status`
|
|
8
|
-
|
|
9
|
-
> **opencode adapter — how the Claude Code primitives named below map here.**
|
|
10
|
-
> - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
|
|
11
|
-
> - `Agent <role>` / `Agent general-purpose` / subagents → `@<name>` declared in `agents/<name>.md` (`mode: subagent`); the name comes from `agents.<role>` in `FLOW.md`, empty → do it in this context.
|
|
12
|
-
> - Parallel fan-out → several `@name` in one prompt, capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
|
|
13
|
-
> - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `opencode run -p "<command>"` with cron.
|
|
14
|
-
> - `TaskCreate` → a markdown checklist in the phase artifact.
|
|
15
|
-
> - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
|
|
16
|
-
> - `/model <value>` → opencode's model picker (`/models`).
|
|
17
|
-
> - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared in `opencode.json` (see this adapter's `opencode.json` for the domain-memory example).
|
|
18
|
-
|
|
19
|
-
Read `~/.claude/flow/CORE.opencode.md` first (shared rules: `FLOW.md` step 0, autonomy, how a stop reads, the live panel, `00-summary.md`) — skip if you already read it in this session.
|
|
20
|
-
|
|
21
|
-
**Panel words are closed** — `mark`: `done` · `current` · `pending` · `wait` · `block` · `info`; `style`: `normal` · `dim` · `title` · `accent` · `ok` · `warn` · `error`. Anything else is dropped by the reader in silence: the panel still paints, and nobody is told.
|
|
22
|
-
|
|
23
|
-
Overview of works in progress; detects divergences between artifacts and actual git state.
|
|
24
|
-
|
|
25
|
-
## 1. List works
|
|
26
|
-
|
|
27
|
-
- `ls -1 .claude/work/` (ignore `_archive`).
|
|
28
|
-
- **Then `_archive/*/meta.json` for `followups[]` alone** — entries not `declined`/`logged`/`done` (§5). Nothing else about an archived work is shown; a finished work is exactly when its deferred items stop being visible, which is the point of reading them here.
|
|
29
|
-
- Read the `meta.json` of **every** folder (named `<TICKET>-<slug>`, `<slug>` for ticket-less/local works, or just `<TICKET>` for older ones). Identify each work by `meta.json.ticket`, not by the folder name.
|
|
30
|
-
- Read `00-summary.md` per work when it exists and use it for the recap (`Next:` line, what is pending) instead of reading every artifact (flow-core §5); missing → fall back to the artifacts.
|
|
31
|
-
|
|
32
|
-
## 2. For each work, display
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
<TICKET> — <title> [feat|bug] [XS|S|M|L] ⏵ <current phase>
|
|
36
|
-
Branch: <branch> [✓ active | ⚠ not current]
|
|
37
|
-
Started: <date>
|
|
38
|
-
Updated: <date>
|
|
39
|
-
Phases done: context, design, build…
|
|
40
|
-
MR/PRs: 2/4 merged · MR/PR #3 in_progress · MR/PR #4 pending
|
|
41
|
-
Cross-repo: <meta.related_repos entries not "done", as "repo: scope"> (line only if any)
|
|
42
|
-
Follow-ups: 2 awaiting a decision · 1 accepted, not started (line only if any)
|
|
43
|
-
Cost: $0.71 measured over 2 phases · 1 phase not reported (line only if any)
|
|
44
|
-
Next: <suggested next command>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- "MR"/"PR" from `git.host` (`gitlab` → MR, every other host → PR); no host → "MR/PR".
|
|
48
|
-
- `Cross-repo:` only when `meta.json.related_repos` has entries not `done`: each as `<repo>: <scope>`, appending ` — contract not handed over` when that entry's `contract_handoff` is `pending`. It flags that a **sibling repo still has a pending part**; flow never scans or touches the other repo.
|
|
49
|
-
- `Follow-ups:` only when `meta.json.followups[]` has entries not `declined`/`logged`/`done` (flow-core §7): count the `proposed` ones as *awaiting a decision* and the `accepted` ones without a `work` as *accepted, not started*, naming the ticket id when there is one. `in_progress` entries are already visible as their own work — do not double-count them.
|
|
50
|
-
- `Cost:` only when `meta.json.cost[]` has entries (flow-core §4): sum the `usd` figures that are there, count the phases behind them, and count separately the entries whose `source` is `not reported`. A work with no entries shows **no line at all** — absence is not zero, and a `$0.00` under a work nobody measured is the one output that would make the block worth ignoring. The figures are the harness's own client-side estimates, not a bill; `flow cost` prints the same data phase by phase.
|
|
51
|
-
- `MR/PRs:` only when `meta.json.mrs` exists with >0 entries:
|
|
52
|
-
- Summary: `<merged>/<total> merged`.
|
|
53
|
-
- `closed` or `superseded` MR/PRs present → add to the count: `2/4 merged · 1 closed · 1 pending`.
|
|
54
|
-
- One `in_progress` → show it explicitly with its number.
|
|
55
|
-
- Any `closed`/`superseded` → list the reason (truncated to 40 chars): `MR/PR #2 closed (reviewer requested different approach)`.
|
|
56
|
-
|
|
57
|
-
### Actual progress vs estimate
|
|
58
|
-
|
|
59
|
-
**Only for the `in_progress` MR/PR and only if the branch matches the current one** (you can measure the diff). Base = `git.default_base` in FLOW.md; empty → auto-discover the repo's base branch. Calculate:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
git diff --shortstat <base>..HEAD # lines
|
|
63
|
-
git diff --name-only <base>..HEAD | wc -l # files
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Compare with `mrs[in_progress].lines_est` and `files_est`; show a line below `MR/PRs:`:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
Current MR/PR size: 180/120 lines (150%) · 7/6 files ⚠ exceeds estimate
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Rules:
|
|
73
|
-
- lines ≤ `lines_est * 1.5` **and** files ≤ `files_est + 2` → show without warning, in grey.
|
|
74
|
-
- **Either** threshold exceeded → add `⚠ exceeds estimate` and suggest that `/flow-feat-build` applies §2.3 (the size thermometer: cut / continue / reopen).
|
|
75
|
-
- No `lines_est` in meta.json (older work) → do not show the line, do not invent an estimate.
|
|
76
|
-
|
|
77
|
-
## 3. Divergences with git
|
|
78
|
-
|
|
79
|
-
Only if the branch in meta.json **is the current one**:
|
|
80
|
-
|
|
81
|
-
- `git diff --name-only <base>...HEAD | wc -l` → files changed on the branch.
|
|
82
|
-
- Read `05-implementation.md` (features) or `04-fix.md` (bugs); extract the listed files.
|
|
83
|
-
- Files changed in git that do not appear in the log:
|
|
84
|
-
```
|
|
85
|
-
⚠ Divergence: <N> changed files not recorded in log.
|
|
86
|
-
Examples: <path>, <path>…
|
|
87
|
-
```
|
|
88
|
-
- Files in the log with no actual change in git → same.
|
|
89
|
-
|
|
90
|
-
## 4. Orphaned works
|
|
91
|
-
|
|
92
|
-
- Local branches matching the ticket pattern with no work folder (`.claude/work/<TICKET>/` or `.claude/work/<TICKET>-*/`, matched via `meta.json.ticket`/`branch`) → warn.
|
|
93
|
-
- Work folders whose branch no longer exists locally → ask whether to archive.
|
|
94
|
-
- **Residue count** (one line, no per-entry detail): worktrees registered (`git worktree list`, minus the main checkout), work folders with `phase: done` still outside `_archive/`, and prunable registrations (`git worktree prune --dry-run`). Total above a handful → `Residue: <N> worktrees · <N> unarchived done · <N> prunable → /flow-work-clean --dry-run`. This command never deletes anything — `clean` establishes the merged/open verdict and acts.
|
|
95
|
-
- Branch pattern from `git.branch_pattern` in FLOW.md; empty → branches matching `<prefix>XXXXX-*` or orphaned folders in `.claude/work/`.
|
|
96
|
-
|
|
97
|
-
## 5. Open follow-ups (live works and `_archive/`)
|
|
98
|
-
|
|
99
|
-
One block at the end, only when there is anything to show. Deferred work outlives the work that
|
|
100
|
-
deferred it, and `_archive/` is where it goes to be forgotten:
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Follow-ups awaiting a decision
|
|
104
|
-
PROJ-123 F2 audit the other three callers of the same helper (archived work)
|
|
105
|
-
PROJ-140 F1 index on events.created_at — plan says full scan → PROJ-155
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
- Source: `followups[]` of every `meta.json`, live folders **and** `_archive/`, entries not
|
|
109
|
-
`declined`/`logged`/`done`. Show the originating ticket, the id, the `title`, and the created ticket when
|
|
110
|
-
`ticket` is set. Mark archived origins so it is clear the work itself is finished.
|
|
111
|
-
- `proposed` entries are listed under *awaiting a decision*; `accepted` ones without a `work` under
|
|
112
|
-
*accepted, not started*. Suggest `/flow-feat-start <ticket>` for the latter.
|
|
113
|
-
- More than about eight → show the newest five and the total. This command is read-only: it never
|
|
114
|
-
triages, creates a ticket, or edits `followups[]`. That happens once, at `ship` (flow-core §7).
|
|
115
|
-
|
|
116
|
-
## 6. Quick actions
|
|
117
|
-
|
|
118
|
-
If a work's branch matches the current one, suggest:
|
|
119
|
-
- `phase = "done"` → nothing to do; offer to archive.
|
|
120
|
-
- `phase = "abandoned"` → the folder should already be in `_archive/`; at the root → suggest moving it.
|
|
121
|
-
- An `in_progress` MR/PR waiting for merge confirmation → `/flow-feat-ship` should update the state.
|
|
122
|
-
- A `closed` MR/PR with no subsequent decision → warn so the user can decide (retry build or abandon).
|
|
123
|
-
- Otherwise → the concrete next command.
|
|
124
|
-
|
|
125
|
-
**A mid-work knowledge save lives here.** `knowledge.read_staging` is set and returns entries for the
|
|
126
|
-
current branch → offer, as one more action, to consolidate them now (flow-core §0) instead of waiting
|
|
127
|
-
for `ship` or `postmortem`. Only when there are entries, only as an option among the others, and
|
|
128
|
-
never as a question of its own: this is the last place a session that is about to end can bank what
|
|
129
|
-
it learned.
|