Files
aji/docs/plan/phase-8-agent-protocol.md
dev 2bbbd2135c rfc: 0015 scalar atomics and the Aji memory model accepted (revision 2) and integrated into the spec
The Aji RC11 profile (RC11 with NO-THIN-AIR; stronger than ISO C11/C++20) as
normative axioms in spec 04 §20; DRF-SC; linear atomic<T> for AtomicScalar
with atomic.new/atomic.take; ref<atomic<T>> operands; ordering tables incl.
cmpxchg failure table and two results; effects [atomic] / [atomic, atomic.weak];
target atomic_widths and E4203; E4202; enumerator as oracle (observed ⊆ allowed,
exact equality on the normative litmus corpus). Feature atomics stays reserved
until P5-2a. Q-015 resolved; record/replay and Q-017 moved to Phase 8.
RFC 0003 superseded. AIR bundle +1.9 %.
2026-10-06 00:30:35 +03:00

2.6 KiB

Phase 8 — Agent protocol

Non-normative. Part of the implementation plan.

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 Integrate ajid with the evaluation scaffold (E0-3) so Aji runs use the agent protocol P8-2, E0-3 scaffold adapter scaffold drives Aji through ajid; protocol §28 records complete
P8-8 todo External agent trial on a reference task P8-2…P8-5 trial report in docs/plan/ exit criterion passes
P8-10 todo Record and replay (moved from P5-8 by RFC 0015): aji run --record / aji replay; the replay format (Q-017) records scheduler choices, reads-from choices, modification orders and the SC order P8-1 src/interp/replay.zig, spec 11 §4 a failing concurrent run, weak-memory runs included, is reproduced byte for byte from its file
P8-9 todo Phase exit review; Aji 0.1 release-candidate checklist all plan status all phases done; spec status updated