3.2 KiB
Workflow: Create Handoff
<required_reading> Read these files NOW:
- templates/continue-here.md </required_reading>
Handoff is a parking lot, not a journal. Create when leaving, delete when returning.
<when_to_create>
- User says "pack it up", "stopping for now", "save my place"
- Context window at 15% or below (offer to create)
- Context window at 10% (auto-create)
- Switching to different project </when_to_create>
# Find current phase (most recently modified PLAN.md)
ls -lt .planning/phases/*/PLAN.md 2>/dev/null | head -1
Handoff goes in the current phase directory.
Collect everything needed for seamless resumption:- Current position: Which phase, which task
- Work completed: What's done this session
- Work remaining: What's left
- Decisions made: Why things were done this way
- Blockers/issues: Anything stuck
- Mental context: The "vibe" - what you were thinking
Write to .planning/phases/XX-name/.continue-here.md:
---
phase: XX-name
task: 3
total_tasks: 7
status: in_progress
last_updated: [ISO timestamp]
---
Then markdown body with full context.
Commit handoff as WIP:git add .planning/
git commit -m "$(cat <<'EOF'
wip: [phase-name] paused at task [X]/[Y]
Current: [task name]
[If blocked:] Blocked: [reason]
EOF
)"
Confirm: "Committed: wip: [phase] paused at task [X]/[Y]"
Require acknowledgment:"Handoff created: .planning/phases/[XX]/.continue-here.md
Current state:
- Phase: [XX-name]
- Task: [X] of [Y]
- Status: [in_progress/blocked/etc]
- Committed as WIP
To resume: Invoke this skill in a new session.
Confirmed?"
Wait for acknowledgment before ending.
<context_trigger> Auto-handoff at 10% context:
When system warning shows ~20k tokens remaining:
- Complete current atomic operation (don't leave broken state)
- Create handoff automatically
- Tell user: "Context limit reached. Handoff created at [location]."
- Stop working - don't start new tasks
Warning at 15%: "Context getting low (~30k remaining). Create handoff now or push through?" </context_trigger>
<handoff_lifecycle>
Working → No handoff exists
"Pack it up" → CREATE .continue-here.md
[Session ends]
[New session]
"Resume" → READ handoff, then DELETE it
Working → No handoff (context is fresh)
Phase complete → Ensure no stale handoff exists
Handoff is temporary. If it persists after resuming, it's stale. </handoff_lifecycle>
<success_criteria> Handoff is complete when:
- .continue-here.md exists in current phase
- YAML frontmatter has phase, task, status, timestamp
- Body has: completed work, remaining work, decisions, context
- User knows how to resume </success_criteria>