Repository navigation
PM handoff across assistants: board digest at PM start, optional handoff note, refuse a second live PM (#301) - #319
Merged
Merged
Conversation
…off note, refuse a second live PM: digest from task-monitor-snapshot --local --brief on a fresh PM register, task-monitor-queue handoff, task-pm live-PM refusal with --force (#301) - `task-monitor-snapshot --brief` renders the first repo as at most 40 text lines (`lib/monitor-digest.jq`, capped by `tm_board_digest`), then the handoff note with its age. `radio register` prints it on a fresh, non-alias `pm-*` register only, from `--local`, so there is no forge call. `TASK_FORCE_NO_PM_DIGEST=1` turns it off. - `task-monitor-queue handoff write|show|clear` owns `monitor/<repo>/handoff.md`. The snapshot gains a `handoff` field, and task-monitor shows it as a collapsed last row of the repo view that expands on Enter. - `task-pm` refuses while `pm-<repo>` is live (not in `radio orphans`) in a tab other than the active one, naming the agent from `<role>.agent`. `--force` overrides. When it proceeds over an earlier session file it retires that file, so the new register is fresh and prints the backlog and the digest. - Every PM prompt gains a "Handing off" paragraph. Docs: README, schema doc and example, the workflow docs, CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck SC2119) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Spec compliance (#301)All three proposal items and the acceptance list are delivered.
Code-review findingsI found no blockers and no correctness bugs.
Notes that need no change:
Verdictclean. The PR body opens with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A PM that starts fresh now opens with a short board digest (in flight, queue, recent merges, attention), built from disk with no forge call, plus the previous PM's handoff note when one was left. That means handing the PM from claude to kiro, or back, no longer begins with a blind tracker re-read.
task-pmalso refuses to start a second PM while this repo's PM is live in another tab, so two assistants never split one inbox.Closes #301
What changed
1. Board digest at a fresh PM start
task-monitor-snapshot --brief: a new output mode. It prints the first repo as text: attention first, then in flight (ref, title, PR, review state), the queue with its notes, and the last 24h of merges with each PR summary's first sentence. The text comes from the newlib/monitor-digest.jq.tm_board_digestinlib/monitor-text.shcaps it at 40 lines, and the last line says how many were cut. Titles are clipped at 90 characters and sentences at 160.radio registerrunstask-monitor-snapshot --local --brieffor apm-*role under the same gate as the offline-backlog summary (fresh=1, not an alias). So it never prints on a/compactor/clearre-register, and never for a worker. A failure is logged, never fatal.TASK_FORCE_NO_PM_DIGEST=1turns it off. Claude'sSessionStartand kiro'sagentSpawnboth callradio register, so one path serves both, and the installed hook commands are unchanged.2. Handoff note
task-monitor-queue handoff write|show|clear.writereads the note on stdin and saves it to$TASK_FORCE_HOME/monitor/<repo>/handoff.md, withwritten_at, the PM role and its recorded agent in frontmatter. It refuses an empty note. I made this a subcommand rather than a new binary, so noinstall.shchanges are needed.handofffield,{text, written_at, role, agent}or null (documented indocs/task-monitor-schema.md, with an example).[handoff]line with its agent, role and age, capped at 20 lines. The note stays until the next write replaces it.⏎expands it in the usual detail view.ohas nothing to open, andtgoes to the PM tab..claude/commands/pm.md, gain a short "Handing off" paragraph.3. One live PM per repo
task-pmrefuses whenpm-<repo>has a session file thatradio orphansdoes not list (heartbeat under 1h) and whoseTAB_IDandZELLIJ_SESSIONare not the active tab's. The refusal names the agent from<role>.agentand says to close that PM first.--forceoverrides.task-pmproceeds over an earlier session file, it retires that file withradio unregister --manual. Without this, a claude PM started right after a kiro PM sees the leftover file, takes thefresh=0path, and never prints the backlog or the digest. That is exactly the handoff this ticket is for. The inbox and the sidecars are left alone.Tests
tests/pm_handoff.bats(new, 10 tests):ghcall, under a gh loadout with a queued ref;written 2h ago), stays until overwritten, then is replaced;clearremoves it;task-pmrefuses a live kiro PM in another tab, with the agent read from the sidecar;--forcelaunches and retires the old session;the_handoff_note_renders_collapsed_in_the_repo_view_and_expands.AGENT=, so the sidecar read was never tested. The test now removes that field.tests/task_pm.bats: the Flip radio wake defaults: workers auto-submit and stay in the background; the PM box is never auto-submitted #254 auto-submit takeover test now passes--force, because it takes over a live PM, which this change refuses on purpose.handoff: null, plus timestamps.Upgrading
Re-run
task-init <loadout>on every loadout: the copiedcommands/pm.md/agents/pm.jsonand the workflow doc changed. The hooks did not. Re-runinstall.shto rebuild task-monitor and get the handoff row.🤖 Generated with Claude Code