Session Phases & Integration

Track progress and coordinate between agents with structured phases, integration signals, and project briefings.

12 min read Tutorial 8 of 8 Advanced

The 6 Phases

Sessions progress through structured phases:

PhasePurpose
setupClaiming files, reading context
planningDeciding approach
implementingWriting code
testingRunning tests
reviewingCode review
cleanupReleasing resources
$ pd session phase my-session implementing
$ pd session phase my-session testing

Phases only move forward -- no going back to previous phases. This gives other agents a clear signal about where you are in your workflow.

Integration Signals

Agents can declare what they've completed and what they need:

# Agent A finishes the API
$ pd integration ready my-session api

# Agent B declares it needs the API
$ pd integration needs my-session api
Already ready! Agent B can proceed immediately.

Integration signals solve the classic coordination problem: "Is the API ready yet?" Instead of polling or asking in Slack, agents declare dependencies and get instant answers.

Agent Liveness

The daemon monitors agent health with progressive degradation:

When an agent dies, its work is preserved. Another agent can pick up where it left off:

$ pd salvage --project myapp
1 dead agent(s) in myapp:*

Agent: agent-abc123
Purpose: Building auth system
Phase: implementing
Notes: 3 note(s)
Files: src/auth.ts, src/middleware.ts

$ pd salvage claim agent-abc123

Project Briefings

Get a summary of everything happening in a project:

$ pd briefing myproject
Project: myproject
Active agents: 2
Sessions: 3 (2 active, 1 completed)

Agent agent-a1b2c3 (implementing)
  Purpose: Building auth system
  Files: src/auth.ts

Agent agent-d4e5f6 (testing)
  Purpose: Adding API tests
  Files: tests/api.test.ts

Integration signals:
  auth-api: READY (by agent-a1b2c3)
  database: NEEDED (by agent-d4e5f6)

Dead agents needing salvage: 0

Shows: active agents, sessions with phases, integration signals, recent notes, and any dead agents needing salvage.