Files
2025-11-29 18:28:37 +08:00

3.2 KiB

Workflow: Create Handoff

<required_reading> Read these files NOW:

  1. templates/continue-here.md </required_reading>
Create a context handoff file when pausing work. This preserves full context so a fresh Claude session can pick up exactly where you left off.

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>
Determine which phase we're in:
# 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:
  1. Current position: Which phase, which task
  2. Work completed: What's done this session
  3. Work remaining: What's left
  4. Decisions made: Why things were done this way
  5. Blockers/issues: Anything stuck
  6. Mental context: The "vibe" - what you were thinking
Use template from `templates/continue-here.md`.

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:

  1. Complete current atomic operation (don't leave broken state)
  2. Create handoff automatically
  3. Tell user: "Context limit reached. Handoff created at [location]."
  4. 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>