# Phase 8 — Agent protocol Non-normative. Part of the [implementation plan](README.md). **Goal:** a long-running machine interface (`ajid`) and audit artifacts that let an external coding agent implement and repair Aji programs without reading prose diagnostics; a benchmark that measures whether Aji achieves its mission. **Exit criterion:** an external coding agent implements or repairs a reference task using only the protocol and the repository spec. **Spec inputs:** spec 10, 12, 13 §5; `plan/conformance-suite.md` (agent benchmark). ## Tasks | ID | Status | Task | Depends | Output | Done when | |---|---|---|---|---|---| | P8-1 | todo | Specify `ajid` transport and method schemas (parse, typecheck, verify, compile, run, test, trace, inspect, explain, benchmark) | — (may start after P2) | spec 10 | request/response schemas versioned and published | | P8-2 | todo | `ajid` server over `check.zig`: parse, typecheck, verify, run, test | P8-1 | `src/ajid/` | protocol conformance tests; responses deterministic | | P8-3 | todo | `trace` and `inspect`: verifier state summaries per value and instruction | P8-2 | `src/ajid/` | an agent can query ownership/borrow state at any instruction | | P8-4 | todo | `explain` and repair-candidate coverage for every registry code | P8-2 | `src/diag.zig`, spec 10 | every code has structured fields and at least one repair candidate kind | | P8-5 | todo | Verification report artifact (spec 10 §6) combining all `src/report/` outputs | P8-2 | `aji report` | single deterministic JSON document; schema documented | | P8-6 | todo | Packages: dependencies, lockfile, content addressing, sandboxed declared build extensions | — | spec 12, `src/pkg/` | dependency resolution is deterministic; unsafe dependencies reported separately | | P8-7 | todo | Benchmark harness: Aji vs Zig, Rust, C on shared task specs | P8-2 | `bench/` | records P(correct \| one iteration), iterations, tokens, defects | | P8-8 | todo | External agent trial on a reference task | P8-2…P8-5 | trial report in `docs/plan/` | exit criterion passes | | P8-9 | todo | Phase exit review; Aji 0.1 release-candidate checklist | all | plan status | all phases done; spec status updated |