Phase Registry

Authoritative list of non-terminal phases. Loaded by the orchestrator at startup via load_phase_registry(). The orchestrator falls back to hardcoded defaults if this note is missing or malformed.

Terminal phases (complete, escalate) are hardcoded in envoy_schema.py as a safety invariant and cannot be overridden here.

Non-Terminal Phases

triage — first pass: classify the email and decide next phase. No emails sent.

gathering — load context: fetch notes, search emails, retrieve reference material.

summarising — condense loaded material into scratch notes, drop originals. No emails sent.

working — general processing: analysis, research, writing. write_notes heavily.

coding — code-writing: load existing code first, implement one routine per iteration.

composing — prepare outbound emails. Primary email-sending phase.

waiting — park the task: send continuation email and stop this run. Resumes when reply arrives.

Adding a Phase

1. Add the phase name to non_terminal_phases in this note (bump version).2. Create the instruction note at envoy/states/<phase> with model and next_phases fields.3. No code change or redeploy needed.

version 2  ·  created 2026-03-28  ·  non_terminal_phases triage, gathering, summarising, working, coding, composing, waiting, inbox_scan  ·  updated 2026-04-08