Skip to content

feat: add /handoff skill — structured context transfer between parallel agents#408

Open
kpatel513 wants to merge 2 commits intogarrytan:mainfrom
kpatel513:feature/handoff-skill
Open

feat: add /handoff skill — structured context transfer between parallel agents#408
kpatel513 wants to merge 2 commits intogarrytan:mainfrom
kpatel513:feature/handoff-skill

Conversation

@kpatel513
Copy link

@kpatel513 kpatel513 commented Mar 23, 2026

The problem

gstack's parallel sprint model has a coordination tax that grows as you add agents. Each agent starts cold, with no knowledge of decisions made in other sessions, assumptions embedded in the code, or work left unfinished. Without a handoff, you are the bus. More agents means more manual context-switching for the human, not less.

What /handoff does

Produces a structured artifact the next agent loads as context before starting. Four sections:

  • Decisions -- captured via targeted questions grounded in the actual diff ("you switched retry logic in auth.ts from exponential to linear backoff -- what drove that?"), not inferred from code structure
  • Assumptions -- three specific patterns only: unguarded env vars, explicit assumption comments, and external calls with no error handling. Nothing else.
  • Danger zones -- timing-sensitive code, partial error handling, layered patches, "don't touch" comments
  • Open threads -- TODOs, skipped tests, stashed work. Explicit signals only, no inference.

The artifact lands at HANDOFF.md (gitignored) and is auto-injected into CLAUDE.md so the next agent loads it automatically without being told to.

Two modes: quick (~30s, decisions + open threads) and deep (~2min, full analysis + specific entry point for the next agent).

Design decisions worth noting

Diff is capped at the top 20 most-changed files, generated files excluded. Reading the full diff on a large branch is unbounded and produces a summary too lossy to be useful. This focuses analysis where the most change happened.

Decisions come from questions, not inference. The diff is used to identify the 3 most non-obvious changes and ask about them directly. Inferring decisions from code structure produces noise. A one-sentence answer from the developer is worth more than 10 inferred "decisions".

Assumptions are three patterns, not a heuristic sweep. Flagging every array access and type cast produces false positives that train users to ignore the section. The three patterns (unguarded env vars, explicit assumption comments, unhandled external calls) have high signal-to-noise ratio and cover the cases that actually cause production incidents.

CLAUDE.md injection makes loading the handoff a technical guarantee, not a social contract. Without it, the handoff only works if the next agent knows to look for it.

Files changed

  • handoff/SKILL.md.tmpl -- skill source
  • handoff/SKILL.md -- generated skill (ready to use)
  • CLAUDE.md -- added handoff/ to directory listing
  • SKILL.md.tmpl + SKILL.md -- added /handoff to adjacent skill suggestions

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