| name | handoff-protocol |
| description | Use when transitioning work between agents during multi-agent execution. |
| allowed-tools | Read, Write |
Handoff Protocol for Multi-Agent Orchestration
This skill guides the Framework Developer Orchestrator on how to properly hand off work between different LLM sessions, ensuring continuity, quality, and traceability across multi-agent workflows.
Why Handoffs Matter
When multiple agents work on a project:
- Context is lost between sessions
- Assumptions differ between LLMs
- Quality varies without standards
- Integration fails without clear contracts
The handoff protocol ensures each agent knows:
- What was done before
- What they need to do
- What contracts to follow
- How to signal completion
Handoff Document Format
Create handoff files in 05-execution/handoffs/:
# Handoff: [Source Agent] → [Target Agent]
## Handoff ID: HO-001
**Created:** [ISO timestamp]
**Status:** PENDING | IN_PROGRESS | COMPLETED | BLOCKED
---
## Context Summary
### What Was Done
- [Brief summary of completed work]
- [Key decisions made]
- [Files created/modified]
### Current State
- Build status: PASSING | FAILING
- Tests: X passing, Y failing
- Lint: CLEAN | X warnings
---
## Your Tasks
### Primary Objective
[One sentence describing what this agent needs to accomplish]
### Specific Tasks
1. [ ] Task 1 - [Description]
2. [ ] Task 2 - [Description]
3. [ ] Task 3 - [Description]
### Out of Scope
- [Things this agent should NOT do]
- [Changes reserved for other agents]
---
## Contracts to Follow
### API Contracts
Read: `.framework-blueprints/03-api-planning/api-contracts.md`
Relevant endpoints:
| Endpoint | Method | Your Responsibility |
|----------|--------|---------------------|
| /api/users | GET | Implement handler |
| /api/users | POST | Implement validation |
### Code Patterns
- Use [pattern] for [purpose]
- Follow [convention] established in [file]
---
## Critical Details (DON'T FORGET)
### Environment Variables
- `DATABASE_URL` - PostgreSQL connection
- `JWT_SECRET` - For token signing
### Non-Standard Paths
- Auth is at `src/core/auth/`, not `src/auth/`
### API Quirks
- POST returns 201, not 200
- All dates are UTC ISO 8601
---
## Quality Checklist
Before marking handoff complete:
- [ ] All tasks completed
- [ ] No lint errors
- [ ] No type errors
- [ ] Tests pass
- [ ] Matches API contracts
- [ ] Documentation updated
---
## Handoff Notes
### Gotchas I Encountered
- [Issue and how you solved it]
### Recommendations for Next Agent
- [Suggestions based on what you learned]
### Open Questions
- [Questions that need user clarification]
---
## Completion
When done, update this file:
- Change status to COMPLETED
- Fill in completion timestamp
- Summarize what was accomplished
- List any deviations from plan
**Completed At:** [timestamp]
**Completed By:** [Agent/LLM name]
Handoff States
| State | Meaning | Next Action |
|---|
PENDING | Created, not started | Target agent picks up |
IN_PROGRESS | Target agent working | Monitor progress |
COMPLETED | All tasks done | Orchestrator reviews |
BLOCKED | Cannot proceed | Resolve blocker |
Creating a Handoff
Step 1: Prepare Context
Before creating a handoff:
- Read
00-project-state.json for current status
- Read
api-contracts.md for relevant endpoints
- Identify exactly what the next agent needs to know
Step 2: Write the Handoff Document
Use the template above with:
- Unique ID (HO-001, HO-002, etc.)
- Specific tasks (not vague)
- Clear contracts to follow
- All critical details that could be forgotten
Step 3: Update State
Update the project state file (see project-state-management skill for state file details):
{
"handoffs": [
{
"id": "HO-001",
"from": "Backend Agent",
"to": "Frontend Agent",
"status": "pending",
"artifact": "05-execution/handoffs/HO-001-backend-to-frontend.md",
"initiatedAt": "2025-01-03T10:00:00Z"
}
]
}
Step 4: Create Git Checkpoint
git add .
git commit -m "Handoff HO-001: Backend → Frontend"
git tag handoff-HO-001
Receiving a Handoff
When picking up a handoff:
Step 1: Read Everything
- Read the handoff document completely
- Read referenced API contracts
- Read any referenced code files
Step 2: Verify Understanding
Before starting work:
I'm picking up handoff HO-001.
My understanding:
- I need to: [summary]
- I must follow: [contracts]
- Critical details: [list]
Is this correct? [Confirm with orchestrator]
Step 3: Update Status
Change handoff status to IN_PROGRESS.
Step 4: Complete the Checklist
Work through tasks, checking off as you go.
Step 5: Complete Handoff
- Update handoff document with completion info
- Run quality checklist
- Update state file
- Create git checkpoint
Quality Gates
Before Sending Handoff
Before Accepting Handoff
Handoff Verification Protocol
The orchestrator verifies each handoff:
## Handoff Verification: HO-001
### Deliverables Check
- [ ] All files listed exist
- [ ] Tests pass
- [ ] Build succeeds
### Contract Compliance
- [ ] Endpoints match api-contracts.md
- [ ] Schemas match specifications
- [ ] No unauthorized changes
### Documentation
- [ ] Handoff notes helpful
- [ ] Critical details accurate
- [ ] Next steps clear
### Verdict: APPROVED | NEEDS_REVISION
Common Handoff Failures
| Failure | Cause | Prevention |
|---|
| Wrong endpoints | Didn't read contracts | Always read api-contracts.md |
| Missing files | Forgot to commit | Verify with git status |
| Type errors | Different assumptions | Include type definitions |
| Integration fails | Incompatible interfaces | Test integration points |
Handoff Anti-Patterns
Don't Do This
- Vague task descriptions ("fix the auth")
- Missing contracts ("use REST best practices")
- Assumed knowledge ("you know the schema")
- No quality gate ("just push when done")
Do This Instead
- Specific tasks ("implement POST /users with validation")
- Explicit contracts ("follow api-contracts.md section 3")
- Full context ("schema is defined in types/user.ts")
- Clear gates ("run
npm test before marking complete")
Integration with Phase 5
During Phase 5 (Execution):
- Start of agent session: Read assigned handoff
- During work: Update progress in handoff doc
- Blockers: Update status to BLOCKED with reason
- Completion: Fill completion section, run checklist
- Next handoff: Create handoff for dependent agents
Rollback Protocol
If a handoff must be reverted:
git log --oneline | grep "handoff-HO-001"
git revert <commit-hash>
Document why the rollback was needed in the handoff file.
Quick Reference
Creating Handoff
- Prepare context (read state, contracts)
- Write handoff document
- Update state file
- Git checkpoint
Receiving Handoff
- Read handoff completely
- Confirm understanding
- Update status to IN_PROGRESS
- Complete tasks
- Run quality checklist
- Complete handoff
Verifying Handoff
- Check all deliverables exist
- Verify contract compliance
- Run tests
- Approve or request revision