Introduce linear_buffers through the specification, AIR parser/serializer, verifier, deterministic interpreter and source lowering. A buffer owns an initialized prefix with explicit reserve, bounded push, moving pop/views and recoverable empty-only free. Growth charges old+new capacity; failed growth, full push and nonempty free preserve or return complete ownership. Implement compiler-pinned safe std.vec with nine operations for Copy values, owners, files and channel endpoints. Permit complete Copy moves inside specialized generic bodies without weakening monomorphic or borrow rules. Update RFC 0024, Q-036, STD-6a/b, reference grammar, Quick Reference, bundles, source coverage and CI. Remaining collections stay STD-6c. Validation: unit tests and AIR round-trip; 757 conformance cases; 56 dedicated buffer cases with per-instruction collection and 32-seed schedule stress; extended memory test; hosted smoke; 36 module, 20 generic, 49 linear and 118 buffer CLI checks; 91/91 source constructs; Zig fmt and reference bundles. Full source bundle: 49,589 -> 52,384 cl100k tokens (+5.6%); AIR 175,736 bytes. The reference interpreter's push copies its initialized prefix; no native performance or empirical MCC benefit is claimed.
Aji Specification 0.1
Status: Draft 0.1. The specification is the single normative source (see precedence in ../README.md). RFCs record decisions and rationale; their accepted rules are integrated here.
The specification is split by semantic domain. Rationale for major decisions lives in ../rfcs/; short decisions in ../design/decisions.md.
Files
| File | Status | Topic |
|---|---|---|
| 00-status-and-conformance.md | Normative draft | Conformance, safety, profiles |
| 01-language-overview.md | Normative draft | Language shape and control flow |
| 02-types-and-values.md | Normative draft | Primitive/composite types, properties |
| 03-memory-model.md | Normative draft | Ownership, regions, islands, frozen graphs |
| 04-concurrency-and-atomics.md | Normative draft | Tasks, synchronization, memory model, atomics |
| 05-effects-and-capabilities.md | Normative draft | Authority and effect tracking |
| 06-resources-and-errors.md | Normative draft | Linear resources and error handling |
| 07-air.md | Normative draft | Canonical IR, text format |
| 07a-air-instructions.md | Normative draft | Per-instruction contracts |
| 08-verifier.md | Normative draft | Verification rules |
| 09-runtime-and-abi.md | Normative draft | Runtime, FFI, MMIO/DMA |
| 10-diagnostics-and-agent-protocol.md | Normative draft | Stable diagnostics and ajid |
| 11-determinism-and-replay.md | Normative draft | Deterministic testing/replay |
| 12-packages-and-build.md | Normative draft | Manifest/build model |
| 13-contracts-and-unsafe.md | Normative draft | Contracts, proof status and unsafe boundaries |
| 14-agent-efficiency.md | Normative draft (design objectives) | Agent efficiency, Model Capability Compression, design review requirement |
| 15-source-language.md | Normative draft | The agent-facing source language .aji 0.1 (Phase 6A), lowering to AIR |
| 16-standard-library.md | Normative draft | Standard library contracts and built-in pure modules |
Reading order
Implementers: 00 → 01 → 03 → 04 → 07 → 08 → 13. The most consequential files are 03, 04, 05, 07, 08, 11 and 13.
Central semantic model
local value
│
├── ref<T> / mut<T> borrows
│
├── Own<T> per-object ownership
│
├── Region bulk lifetime
│ │
│ └── Island<T> closed movable mutable graph
│ │
│ └── freeze → Frozen<T>
│
└── synchronized sharing → Mutex/RwLock/Atomic/Channel
Concurrency is deliberately ordered by preference:
ownership transfer
→ shared immutable data
→ synchronized shared state
→ atomics
→ unsafe raw concurrency
Changing the spec
- Small clarifications and gap fills: edit the file directly, in the same change as the tests that exercise them.
- Changes to memory safety, concurrency, effects/capabilities, AIR or unsafe semantics: write an RFC first (
../rfcs/0000-template.md). On acceptance, integrate its rules into this directory in the same change. - AIR format 0 is frozen (spec 07 §8.7). Incompatible changes require a new format version.
- Known gaps are tracked in
../design/open-questions.md. Close the entry when the spec answers it.