-
Notifications
You must be signed in to change notification settings - Fork 4
echo protocol.md
Fame edited this page Aug 5, 2026
·
1 revision
The governance system that makes Savant Code different.
ECHO is a multi-agent orchestration protocol that ensures every code change follows a strict process. It's not a suggestion — it's enforced by the harness.
- FID-Bound Execution — Code is never written until the FID (Feature Implementation Document) converges through the Perfection Loop
- Separation of Duties — The agent that writes code cannot verify it
- No Deferrals — Every approved work item must be completed
- Evidence-Based Verification — Claims must be backed by tool output, not self-reporting
| Law | Name | Description |
|---|---|---|
| 1 | Read 0-EOF Before Touch | Read all relevant files before making any changes |
| 2 | Present Before Act | Show the plan to the user before implementing |
| 3 | Verify Before Proceed | Run verification after implementation |
| 4 | Call-Graph Reachability | Ensure new code is actually called somewhere |
| Law | Name | Description |
|---|---|---|
| 5 | No Placeholders | No TODO, FIXME, or placeholder code |
| 6 | Type Safety | No any, no @ts-ignore, no type shortcuts |
| 7 | Error Handling | All error paths must be handled |
| 8 | Search Before Create | Check if similar code/functions already exist |
| 9 | Documentation | Production-grade docs for all public APIs |
| 10 | Test Coverage | New code must have tests |
| 11 | Pattern Compliance | Follow existing codebase conventions |
| 12 | Minimal Changes | Make the smallest change that fixes the issue |
| 13 | Security Awareness | Be mindful of security implications |
| 14 | Graceful Degradation | Fail gracefully, never hard-fail |
| 15 | Attribution | Credit sources and prior work |
Every code change follows a formal Finite State Machine (FSM):
RED → GREEN → AUDIT → SELF-CORRECT → COMPLETE
↑ |
└───────────────────────────────────────┘
-
RED — Identify ALL failures and issues with evidence
- Detective agent runs code search queries
- Catalogs findings with file paths, line numbers, and grep output
- Cannot write code — only discovers and reports
-
GREEN — Implement minimal, surgical changes
- Thinker reasons through the fix
- Recorder documents the FID
- Forge implements the code
- Cannot run tests — only writes code
-
AUDIT — Independent verification
- Verifier independently audits the implementation
- Checks type safety, error handling, call-graph reachability
- Has zero write tools — completely read-only
-
SELF-CORRECT — Fix audit findings
- If issues found, Forge fixes them
- Verifier re-audits
- Loop until clean
-
COMPLETE — Document and archive
- Recorder archives the FID
- Updates CHANGELOG
- Scribe captures session summary
- 10-iteration hard stop — If the loop hasn't converged after 10 iterations, it stops
- Oscillation detection — If the same change is made repeatedly, it stops
- Convergence detection — Stops when change delta < 2% for 2 consecutive passes
- Write-phase lock — Write tools are blocked outside GREEN/SELF-CORRECT phases
Every change goes through a FID lifecycle:
created → analyzed → fixed → verified → closed → archived
- Problem Statement — What's broken and why
- Evidence — File paths, line numbers, grep output
- Root Cause Analysis — Why the problem exists
- Proposed Solution — What to change
- Verification — How to verify the fix works
- Audit Trail — Complete history of the change
- No code is written without a converged FID
- The implementing agent cannot serve as the final verifier
- Every FID must have evidence-based verification
- FIDs are archived after completion for audit trail
- Single model guesses at code
- Self-verification (the model checks its own work)
- No formal process
- Bugs slip through silently
- 9 specialized agents with restricted tools
- Independent verification by a separate agent
- Formal Perfection Loop with circuit breakers
- Bugs caught structurally, not statistically
- Agent Roster — The 9 agents and their roles
- Features — Key features of Savant Code
- GitHub — Source code