The 6 Phases
Sessions progress through structured phases:
| Phase | Purpose |
|---|---|
setup | Claiming files, reading context |
planning | Deciding approach |
implementing | Writing code |
testing | Running tests |
reviewing | Code review |
cleanup | Releasing 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:
- Heartbeat: Agents ping every 5 minutes
- Stale: No heartbeat for 10 minutes
- Dead: No heartbeat for 20 minutes -- enters salvage queue
- Adaptive reaper: Adjusts thresholds based on system load
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.