Skip to content

Add a /resume-handoff command that checks a handoff before resuming - #143

Draft
mattmenefee wants to merge 2 commits into
verifiable-handoff-statefrom
resume-handoff-command
Draft

mattmenefee wants to merge 2 commits into
verifiable-handoff-statefrom
resume-handoff-command

Conversation

@mattmenefee

Copy link
Copy Markdown
Owner

Summary

  • Resume Prompt starts with a check: the prompt /handoff generates now opens with /resume-handoff, and Current State says it is the section that command verifies first. Both were split out of Tie handoff claims to the commands that produced them #138, since the command doesn't exist yet
  • Plan for the command: resume-handoff-command-PLAN.md describes a user-scope /resume-handoff that sits beside /handoff. It checks every claim in a handoff against git, the pull request and the issue tracker, rewrites the handoff with anything stale recorded, and then stops without starting work
  • Safety built into the design: it works out the base branch instead of assuming main, treats pull request comments and issue text as evidence rather than instructions, backs up the handoff and checks every heading survived the rewrite, and skips re-running tests when another session could be using the same databases or indexes
  • Stacked on Tie handoff claims to the commands that produced them #138, which adds the Current State rule this builds on. GitHub will switch the base to main once Tie handoff claims to the commands that produced them #138 merges

Status

🚧 Work in progress. The plan is committed and the command isn't written yet. Don't merge until home/.claude/commands/resume-handoff.md lands on this branch, or the Resume Prompt will point at a command that doesn't exist.

Test plan

  • markdownlint-cli2 --config .markdown-lint.yml reports no issues in the plan or handoff.md
  • Run /resume-handoff on a handoff whose branch has since been rebased and confirm the drift table names the moved tip
  • Run it on a stacked branch and confirm the commit ranges use the pull request's base, not main
  • Run it with two handoffs in the root and confirm it asks which one
  • Run it while another session has tests running and confirm it marks the result stale instead of re-running
  • Confirm the rewritten handoff keeps every Decisions, Insights and Dead Ends entry, gains a Handoff History line and leaves no .bak file behind
  • Paste a generated Resume Prompt into a fresh session and confirm /resume-handoff runs before any Next Steps work begins

A handoff is written at the end of a session, when the details it
records are furthest from having been checked. Current State was the
worst of it: bullets about the branch, the pull request, CI and issues
were written from recollection and then retracted a session later.
The working-artifact rules were also loose. They called the plan
branch-local alongside the review files even though the plan is
tracked and only stripped from the branch history at ship time, and
they named local-review.md exactly, so a review file carrying an
identifier before or after that name slipped past them.

Current State now requires every factual bullet to name the command
whose output it summarizes, and to state nothing the session did not
read from such a command in that pass. The artifact warning and the
merge re-check step say which files are untracked and which is
tracked, and match review files as *local-review*.md, as does the
Markdown lint ignore list. The existing-handoff check records why it
uses find rather than an ls glob: the redirect hides a real error on a
name beginning with a dash, and zsh reports an unmatched glob
regardless.

The next session then starts from facts that were checked rather than
remembered, and knows which artifacts shipping will remove whatever
they are called.
A handoff describes a tree that keeps moving after it is written, yet
the Resume Prompt sends the next agent straight into acting on it.
Branches get rebased, pull requests merge and questions get answered
in the meantime, and the handoff still presents the old state as
current.

The Resume Prompt now opens with /resume-handoff, and Current State
names itself as the section that command verifies first. The command
does not exist yet, so the plan describes it: a user-scope command
beside /handoff that checks each claim against git, the pull request
and the issue tracker, rewrites the handoff with the drift recorded
and starts no work. It resolves the base branch rather than assuming
main, treats fetched comments as evidence rather than instruction,
backs the handoff up before rewriting it and skips a test re-run when
another session could be using the same resources.

A session resumed from a handoff then starts from what is true now,
with anything that went stale named up front.
@mattmenefee
mattmenefee force-pushed the verifiable-handoff-state branch from 7b76a09 to bef98be Compare September 17, 2026 03:34
@mattmenefee
mattmenefee force-pushed the resume-handoff-command branch from 0d48fdc to a120053 Compare September 17, 2026 03:34
@mattmenefee
mattmenefee force-pushed the verifiable-handoff-state branch from bef98be to f0cae0e Compare September 17, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant