name: handoff-receive
Process an incoming handoff to quickly get up to speed on existing work. Run this when picking up work from another agent or resuming your own saved context.
1. LOCATE: Find the handoff document(s)
2. READ: Parse the handoff completely before acting
3. VALIDATE: Verify branch, files, and environment
4. UNDERSTAND: Confirm key decisions and next steps
5. PREPARE: Set up the workspace
6. CONTINUE: Start executing next steps
Search for handoff documents in priority order:
paths:
- HANDOFF.md (workspace root)
- handoffs/HANDOFF-*.md (dated handoffs, pick latest)
Use glob to find them:
glob("HANDOFF.md")glob("handoffs/HANDOFF-*.md")Read the full handoff document. Create a mental model of:
Before trusting the handoff, verify key claims:
CHECKLIST:
- [ ] git branch exists: `git branch --list {branch}`
- [ ] git branch is current: `git rev-parse --abbrev-ref HEAD`
- [ ] Latest commit matches: `git log -1 --oneline`
- [ ] Key files exist: `Test-Path {file}` for each critical file
- [ ] Dependencies installed: check package.json, requirements.txt, etc.
- [ ] Tests still pass: run the test suite quickly
- [ ] Any uncommitted changes: `git status`
If any verification fails:
git checkout {branch} or git stash && git checkoutgit pull or git fetch && git logFor each key decision in the handoff:
Ask: "Does this decision still make sense given what I see now?"
1. git checkout {branch}
2. git pull (if shared repo)
3. Install/update deps
4. Build/compile if needed
5. Run tests to establish baseline
6. Open key files from the handoff
Start with the first item in Next Steps.
If next steps are vague or missing:
After processing the handoff, write a brief summary of what you found:
## Onboarding Complete
Goal: {restate goal from handoff}
Status Verified: {all checks passed / issues found}
Key Decisions Understood: {list}
Starting With: {first action}
This helps the next handoff if you need to pause again.
| Issue | Resolution |
|---|---|
| Handoff is outdated | Check git log for changes since handoff was written |
| Branch doesn't exist | Check git branch -a for remote branches |
| Decisions not explained | Look at git blame / commit messages for rationale |
| Next steps too vague | Check open issues, TODO comments, failing tests |
| Build broken | Check CI status, dependency changes |
| Secret/credential in handoff | Flag immediately, do not commit |
If the handoff is poor (missing info, unclear), do NOT just guess. Instead: