- providers: per-model request extras (e.g. reasoning_effort), key_env,
token_param (max_completion_tokens on api.openai.com); recorded
- docs pinned to the toolchain being run: Rust offline docs from the
sysroot, Zig langref and std source of the same installation; several
mounts under a read-only /docs; hashes recorded (cached for big trees)
- protocol: neutral model labels and calibration before classes (§2);
smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of
degradation (§39a); Track A controlled vs Track B native agents (§39b)
- plan: E-C calibration, E-G gates, E-N native-agent run
tools/eval (stdlib Python): one agent loop, system prompt and tool set
(list/read/write/edit files, run, finish) for every language; language
profiles for aji_air, rust, zig carry only toolchain invocation, docs
location and command classification; bubblewrap sandbox without
network, read-only toolchain and /docs; providers: Anthropic Messages,
OpenAI-compatible (incl. local servers), scripted; run record per
protocol §28 (hashes, versions, limits, hardware, seed, all events,
patches, commands, final repository, first-generation snapshot,
evaluator verdicts, cost); metrics §14-§17; resumable matrix plans;
report (VSR, repair cycles, context, cost per correct solution);
classify (§27 categories, caught-by, smoke-test causes).
docs/evaluation/harness.md (task format for the private benchmark
repository, evaluator contract, record schema); dev-tasks/dev-echo
(harness development task, no benchmark family); smoke plan shape for
the owner's E-S choice (binary/stream parser, bounded pipeline);
self-tests in CI
P3-10 and P3-11 moved to P7-10 and P7-11 (executor model for async and
blocking host operations); semantic development paused until the E-S
smoke test is analysed
- program_parallel_map: four exclusive loans of disjoint quarters
- program_channel_transfer: heap-owned messages moved through a bounded
channel; the 64-byte budget fits exactly the bounded worst case
- program_tcp_echo_tasks: server task, one echo task per connection,
two client tasks sharing address and message by shared loans
- runner --stress N: seeds 0..N-1 under quanta 1, 2, 7 and the test's
own; failures print the replay command; CI runs --stress 200
- plan: P3-12, P3-13 done
- spec 04 §40: mutex<T> always linear, never copyable; mutex.take is the
only way to dismantle it and needs no live borrow (hence no guard and
no waiter); no unlock or destructor
- P3-10 (async buffer claims, E4303) moved to P7-10 with task-aware
I/O; E4303 stays reserved; Phase 3 scope closed
- RFC 0012 erratum: consumption after send is E2002, use is E2001
- tests: take while borrowed (E2101), use after take (E3001)
- features cancellation, channels, sync supported
- AIR model/parser/printer: shield, sender<T>, receiver<T>, mutex<T>,
guard<T>; task.check_cancel, task.join.cancel, task.shield.*,
channel.*, select (bracketed arms), mutex.*
- verifier: arities (E5002), element rules (E4001/E1001, E0006
channel_transfer), guard_transfer gating, task.wait effect (gated for
task.join by cancellation), per-edge consumption with values and
handles returned as block parameters, loans moved to the handle on
task.join.cancel's cancelled edge, shield order (E4305), guard
children (E2102), critical-section rule (E4304)
- interpreter: waiting-operation rule (ready, else cancelled if
observable, else wait), shield depth, bounded and rendezvous channels
with FIFO offers, drain-then-close receiver, budget release at the
last close, select with seeded draw among ready arms, mutex wakeups;
schedule record also after a select draw
- report counts task.spawn, task.wait and channel allocations
- spec erratum: mutex<T> is linear (format 0 has no droppable
move-only class)
- 30 new conformance tests (10 run with schedules, 4 accept, 16
reject); 6000-run schedule stress and 4350 mutants without failure
revision 2 per owner review: reserved-feature dependencies may change
until publication (general rule, DD-014); task.join.cancel returns the
handle on cancelled with loans still LOANED; channel.sender.dup from
ref<sender<T>> (MPSC, receiver_dup reserved); task.wait required by
every suspending operation, task.join included, only in modules
declaring cancellation; sent values and handles come back as block
parameters on closed/cancelled edges; explicit channel states
spec 04 §37-§41 and pointers in §11-§16, §35, §36; spec 05 §9, 07
§8.11, 07a, 08 §14, 11 §6-§7; features cancellation, channels, sync
published (implementation pending); rwlock, channel_transfer,
receiver_dup, guard_transfer reserved; effect task.wait; E4304, E4305;
Q-013 resolved; bundle +15.8 % tokens (recorded)
features cancellation, channels, sync; bounded/rendezvous channels with
separate linear endpoints and a drain-then-close receiver protocol;
waiting-operation rule with ok/closed/cancelled edges; shields with
innermost-first nesting (E4305); mutex with function-bound guard and the
no-wait-while-locked rule (E4304); select over channel operations with
seeded choice among ready arms and per-edge ownership (Q-013); rwlock,
channel_transfer, guard_transfer reserved; owner decisions D1-D3
- interpreter core rewritten around explicit per-task frame stacks so a
task can be suspended at any instruction; behavior of all existing
tests unchanged
- tasks: scope and task<T> (function-bound; task_transfer and
task_borrow_returns reserved), spawn/join/cancel/cancelled/scope.end;
cooperative scheduler with seeded choice rule, separate schedule seed,
quantum = fuel unit, task limit (limit_exceeded kind tasks), global
quiescence over waiting tasks; schedule field in the run record
- verifier: Send/Share table (E4001, E4002), loans as task-owned borrows
(E4302 on early end, E4101 on conflicts), E4301 at scope end, task
effects (E3101)
- CLI --quantum, --task-limit, --schedule-seed; runner schedules:,
quantum:, task_limit:, limit_exceeded:
- fixed: schedule seed default used orelse/^ precedence wrongly
- 15 phase-3 conformance tests; 4000 mutants without a crash
- Agent Reference Bundle +10.9 % tokens (recorded)
function-bound task handles and scopes (task_transfer reserved); loan
state machine; task results Send and borrow-free (task_borrow_returns
reserved); spawn argument rules (E4001/E4002); cancel is a request only;
child trap terminates the execution; deterministic task limit
(limit_exceeded kind tasks); separate schedule seed; one instruction =
one fuel unit = one quantum step; narrowed native equivalence
Feature tasks: scope and task<T>, spawn/join/cancel/cancelled, borrows
lent to tasks until join (E4302, E4101), structural Send/Share with a
base table resolving Q-014 (E4001, E4002), cooperative scheduler with a
seeded choice rule, quantum, global fuel, schedule exploration.
- src/manifest.zig: strict aji.toml subset ([package], [capabilities],
[metadata]); errors with line numbers
- aji run --manifest: entry relative to the manifest, manifest grants
replaced per parameter by --grant; usage error on manifest problems
- examples/packages/hello as a runnable package, checked in CI
- implemented_phase = 2; Phase 2 exit review; README and AGENTS updated
spec 12 §1 manifest format with strict TOML subset, [package] entry,
[capabilities] by parameter name, [metadata]; aji run --manifest with
operator precedence of --grant; spec 05 §10.2 and capabilities.md
updated.
Manifest [capabilities] uses the --grant model (parameter = kind[:scope]);
the manifest requests and the operator grants via aji run --manifest;
command-line grants replace manifest entries per parameter; strict TOML
subset.
- spec 10 §6.1: schema of the format-0 audit report (canonical JSON)
- aji report FILE: entry capabilities, per-function effect graph with
declared/used/unused effects (fixed point over calls, unsafe stopped
at trusted callees), intrinsics, allocations, runtime and proven
checks, unsafe operations; capability kinds; unsafe summary
- golden unit test; runs over the whole conformance corpus without a
crash
- src/interp/host.zig: real console, files (scope checked before any
host call, positional reads/writes, append from file size) and TCP
through std.Io; monotonic clock and host CSPRNG; host errors mapped
to the closed io_error set; open handles released at the end of the
instance
- interpreter dispatches intrinsics to the host or the deterministic
world; never reports blocked in the hosted profile
- CLI: --profile hosted; the program owns stdout/stderr, the run record
goes to --result-file, otherwise a human summary on stderr
- spec 11 §8.0: host error mapping table
- tests/hosted/smoke.py (file copy, scope denial, stdin->stdout, TCP
echo on a free port) runs in CI
- works around Zig 0.17 net.Stream.read not compiling by using
readWithControl
Feature unsafe: assume and borrow.index.unchecked as the first unsafe
operations, unsafe as a contagious flat effect, trusted functions with a
documented obligation as the only discharging boundary, E6001, T0009
detected precondition violations, unsafe report.
- air: own<T>, own_array<T>, region, alloc_error; own.new/array/take/
free, region.create/new/array/reset/destroy; mem.alloc budget form;
linear contents of owners gated by linear_aggregates
- verifier: allocation types and capability kind (E1001, E3201),
mem.alloc effect (E3101), ok/err counts; borrow-typed block params
checked in the CFG stage with the region-allocation exception; linear
owners and regions (E3002, E3001, E2001, E2002, E2101); region
allocations as disjoint exclusive children of the shared region
borrow; E2104 when reset/destroy would invalidate a live reference
- interp: live-byte budgets charged along the narrowing chain, shared by
copies, mandatory in the deterministic profile; heap cells; regions
return quota only on reset/destroy
- conformance: 25 heap/region tests including a 64 KiB region file copy;
4000 mutants without a crash
- spec 03 §18-§21: allocation authority and live-byte budgets, heap
(own.new/array/take/free), regions (create/new/array/reset/destroy,
static generations, E2104 on live references)
- spec 05 §11.2, 07 §8.9, 07a summary, 08 §11.2 region allocation paths
and the ok-parameter exception to borrow_joins
- registries: alloc_error, mem.alloc budget form, mandatory deterministic
budget; heap and regions published
- own.take added (T -> own<T> -> T); no take for own_array
- no region-specific limit: one quota mechanism, cap.narrow.budget
- no hidden destruction: own/own_array/region contents must not contain
linear values until linear_aggregates
- live allocation vs live reference: borrow.end never returns quota;
reset/destroy return all bytes; E2104 means a live reference would be
invalidated
- narrowing reserves nothing; children compete for the parent budget
own<T>/own_array<T> (heap), region with shared-borrow allocation and
static generations (E2104 on reset/destroy with live allocations),
cap<mem.alloc> budgets limiting live bytes and shared by copies,
hierarchical cap.narrow.budget, alloc_error, mandatory deterministic
budget.
Owner review of the RFC 0007 implementation:
- spec 11 §8.1: xoshiro256** with SplitMix64 seeding specified bit for
bit, fill consumes ceil(n/8) outputs LSB first; golden vector; own
implementation replaces std.Random (whose seeding differs)
- spec 07a: canonical run record; stdout/stderr as UTF-8 strings or
base64 objects, files always base64 objects
- spec 11 §8: blocked only at global quiescence (no runnable unit, no
known future event, unfinished execution)
- reserved feature resource_joins; test names are permanent and
rule-descriptive (renamed resource_*/borrow_* tests)
- plan: remaining Phase 2 order heap/regions -> unsafe -> hosted ->
reports -> aji.toml
- file<read|write|append>: mode in the type, wrong mode is E1001
- closing intrinsics consume on both edges; second close is E2002
- io_error.other carries no host errno; built-in enum variant sets are
frozen once published (timed_out reserved for Phase 3 timers)
- no synthetic timed_out: deterministic quiescence ends the run with
environment outcome blocked (exit 7)
- hosted run record goes to a separate result channel (--result-file);
stderr summary is for humans only
- air: cap<K> and built-in enums (cap_error) as types; enum.switch over
built-in enums; cap.narrow terminator with ok/err targets; intrinsic
syntax (registry still empty: E0004); registries for effects,
capability kinds and built-in enums, synced with reference docs
- verifier: effect stage (E3101, flat, direct callees); cap.narrow form
check (E3202) and ok/err parameter rules (E5002, E1001); capabilities
are copyable, not zeroable, not comparable; sizes cap 8, built-in tag
- interp: host authority table; @main instantiation from grants by
parameter name with not_instantiated reasons; capabilities render as
opaque
- CLI: --grant P=KIND[:SCOPE], exit code 6; runner: grant: and
not_instantiated: headers, pending only for unsupported features
- conformance: 18 Phase 2 tests; 4000 mutants without a crash
1. capabilities are unforgeable references to one shared authority
object; authority-bearing types are transitively non-serializable
2. effect -> authority registry; not every effect needs a capability
3. flat effects kept; effect sets must be part of future fn pointer types
4. grants bound by @main parameter name; missing, mismatched, unknown
and invalid grants are not_instantiated reasons (exit 6)
5. cap.narrow is a fallible terminator (ok -> cap<K>, err -> cap_error);
no empty capabilities
6. cap.narrow is the only authority transformation; no combine
7. startup data deferred and separate from authority; environment via
cap<process.env>
8. capabilities live for one execution instance
Resolves Q-011 (flat effects, no discharge in format 0) and Q-012
(opaque copyable capabilities, origin only as @main parameters granted
by the host, explicit narrowing without widening, not_instantiated
environment outcome, intrinsic call mechanism).
- spec 08 §7.1: platform-independent accounted size table shared by
max_value_size and max_local_frame; enum tag is the smallest of
1/2/4/8 bytes; borrows 8, slices 16; checked arithmetic, overflow is
E5101 with found = "overflow"
- every materializable type in a module must be at most 1 MiB,
checked before functions are verified; each oversized type reported
once
- E5101 fields no longer truncate huge sizes
- conformance: frame_too_large, value_too_large, size_overflow
- Q-020 resolved; Phase 1 closed
- all Phase 1 tasks done, exit criterion met
- README and architecture reflect the implemented modules
- open question Q-020: size bound for SSA array values
- air: types local/ref/mut/array/slice/slice_mut, from-returns,
multi-result binding, 18 new instructions; feature gating reports
E0006 feature_not_declared; borrow-typed block parameters gated by
borrow_joins; printer and round-trip tests for all new forms
- verifier: second-class and zeroable type rules (E1001); local.alloc
only in entry (E5002); frame size accounting (E5101); stages init
(E1010), borrow (E2101, E2102, E2105-E2108) and bounds facts (E2103);
value types shared between stages
- interp: frame cells, places, slices, deep copies between storage and
SSA values, T0008 bounds traps
- features arrays and ownership supported; implemented_phase = 1
- conformance: 5 accept, 18 reject, 11 run tests for Phase 1, including
the file-copy core exit program; 6000 mutants without a crash
- RFC 0005 Accepted (revision 2)
- spec 07 §8.8 types and syntax; spec 07a contracts for features
ownership and arrays; spec 08 §11-§14 borrows, facts, initialization,
stage order; spec 03 frame storage, second-class borrows, static
region generations
- grammar: from-returns, multi-result, new types and opcodes
- feature registry: ownership and arrays published; heap added and
regions moved to Phase 2; borrow_joins reserved and unscheduled
- codes E2105-E2108, T0008
- Q-009, Q-010 resolved; Phase 1 and Phase 2 plans updated; Own test
moved to phase 2
1. frame-derived borrows never escape (new E2108); aggregate escape
impossible by the second-class rule
2. local.alloc only in the entry block (E5002); frame size limit with a
normative accounting table (E5101)
3. path linearity of borrows; full borrow state compared at joins; only
the accepted program set is normative
4. slice.sub takes (start, len) with overflow-free checks; slice.split
ranges; slice.copy copies len(src) into the prefix of dst, no overlap
5. explicit fact table for borrow.index.proven
Phase 1 memory design for features ownership and arrays, recording the
owner's decisions on Q-009 (second-class borrows, `from` on returns),
Q-010 (static-only region generations) and phase order (no heap in
Phase 1; Own, heap and regions move to Phase 2).
- reference/air-features.md: normative feature registry (arrays,
atomics, capabilities, channels, effects, islands, ownership, regions,
sync, tasks; all reserved), dependency closures, reasons for E0006
- spec 07 §8.1/§8.5/§8.7: features are mandatory, validated before the
body, full dependency closure declared, sorted canonically; every
extension belongs to a feature; published feature semantics immutable
- spec 05 §8: features vs effects vs capabilities
- src/air/features.zig: registry, validation, sync test with the docs
- parser validates features first; E0006 carries `reason`
- `aji features` prints supported AIR format, language and features
- conformance: unknown, reserved and duplicate feature tests
- plan: feature publication tasks in phases 1-5
Owner decisions after the Phase 0 review:
- precedence: docs/spec/ is the single normative source; RFCs are
decision records whose accepted rules are integrated into the spec in
the same change (AGENTS.md, docs/README.md, rfcs/README.md, DD-011)
- RFC 0004 Accepted (scope: AIR format 0, language 0.1)
- AIR format 0 frozen as the semantic baseline; spec 07 §8.7 defines the
only permitted additive changes, everything else needs `air 1` (DD-012)
- Q-019 resolved: deterministic instruction fuel (spec 11 §7). Outcome
`limit_exceeded` is a runner outcome, not a trap; `aji run --fuel N`,
exit code 5; conformance runs always use fuel (default 1 000 000,
`fuel:` header); fuel/schedule budget/quantum kept separate for P3
(DD-013)
- all Phase 0 tasks done; exit criterion met (41 conformance tests,
run records compared across two runs)
- RFC 0004 Amendment 1 documents format-0 additions; status stays
Proposed pending owner acceptance
- open question Q-019: non-terminating programs in test tooling
- README/CONTRIBUTING: current state and `aji run`