Architecture
The layers of zerd and the one rule between them: everything the model can do goes through one door, and every decision is traced.
zerd is a handful of layers with one rule between them: everything the model can do goes through one door, and everything the harness decides is written to a trace.
| Layer | Folder | Job |
|---|---|---|
| Front end | src/ui/, src/main.rs | Full-screen terminal UI or a one-shot run; approvals, side panel, slash commands |
| Agent core | src/agent/ | The loop, the task lifecycle, verify, review, grounding, learning |
| Context | src/context/, src/util/ | Pruning, compaction, the result archive, loop detection, ranked search, repo maps |
| Tools | src/tools/ | Built-in tools, MCP, project tools, sub-agents, one registry every call passes through |
| Safety | src/safety/ | Guard rules, workspace confinement, approvals, the macOS sandbox |
| Client | src/client/ | Model catalog, routing, failover, one adapter per wire format |
| Config | src/config/ | Layered config, project trust |
Skills live in skills/, repo profiles in profiles/, and the diagrams used here in docs/.