phase-handoff

Write phase state to `.devflow/state/<branch>/` and spawn a new session.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/AndreJorgeLopes/devflow --skill phase-handoff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phase-handoff
Source: https://github.com/AndreJorgeLopes/devflow/tree/main/skills/phase-handoff
Command: npx skills add https://github.com/AndreJorgeLopes/devflow --skill phase-handoff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

devflow phase-handoff prevents agents from continuing with stale or mixed context by capturing a deterministic frozen state at phase boundaries and starting the next phase in a clean session.

Core Features & Use Cases

  • Freezes phase state to disk: Writes .devflow/state/<branch>/ with the current phase snapshot so the next session has an explicit, read-only entry point.
  • Marks progress in the current session: Uses mark_chapter (when available) to label the phase you’re leaving and sets a terminal title when possible.
  • Spawns the next phase deterministically: Gates the handoff behind a one-click user confirmation, then uses mcp__ccd_session__spawn_task to create a new Claude Desktop sidebar session with a stable, tool-triggerable slash command.

Quick Start

In the current phase, run phase-handoff for your branch by providing --phase and --next-phase so it writes the frozen-state file and spawns the next-session with the correct first-line slash invocation.

Frequently Asked Questions about phase-handoff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I freeze Claude Desktop session context between development phases?

To freeze Claude Desktop session context between development phases, the devflow phase-handoff captures deterministic state to disk and spawns a cold new session, preventing stale or mixed context from carrying over.

Why does my AI agent carry stale context into the next pipeline phase?

AI agents carry stale context when sessions persist across pipeline phases. Using a phase-handoff mechanism freezes the current state and spawns a clean session for the next phase, ensuring downstream decisions read only frozen artifacts.

How do I spawn a new Claude Desktop session with an MCP task?

You can spawn a new Claude Desktop session by calling mcp__ccd_session__spawn_task with a prompt whose first line is the next-phase slash command, creating a clean sidebar session for the next development phase.

Can I use git worktree for AI session orchestration across spec, plan, and lock-tests steps?

Yes, git worktree supports AI session orchestration by allowing phase-handoff to write frozen state files to .devflow/state/<branch>/ for spec, plan, and lock-tests pipeline steps before spawning the next session.

What is the best way to prevent mixed context when handing off AI development phases?

The best way to prevent mixed context during AI development phase handoffs is to freeze the current phase state as a read-only markdown file and spawn a cold new session that reads only frozen artifacts from disk.

Does phase-handoff require user confirmation before spawning the next session?

Yes, phase-handoff gates the session spawn behind a one-click user confirmation before calling mcp__ccd_session__spawn_task, ensuring deterministic control over when the next devflow phase begins.