AOCI-CODE
A Go CLI and a local MCP server that keep one plain-text map of a repository — one line per managed file, saying what it is responsible for, what has to be read with it, what it exposes and what must not break — so a coding agent reads the system once instead of re-reading the code for every task.

What it is
AOCI-CODE keeps a persistent, Git-versioned map of a repository that a coding agent reads before it touches anything. It is one CGO-free Go binary that works as a CLI and as a stdio MCP server exposing exactly nine tools, and what it governs is plain text: a Root declaring which Volumes take part, a Meta carrying the tag dictionary and the authoring rules, a Code Volume with one FRAS line per managed file, and an optional Database Volume built from accepted schema evidence. Each line records what an object is responsible for (F), what has to be read with it (R), what callers may depend on (A) and the constraints that cannot be inferred from the code (S). The model owns meaning; the binary owns governance — scope, the Baseline, source digests, structural validation, cross-process locks and compare-and-swap writes, the ledger, recovery, and an attestation that proves a complete index really was delivered. The README gives the licence as FSL-1.1-MIT — Fair Source, source-available rather than an OSI licence.
Who built itThe repository belongs to the aoci-spec organization rather than to a personal account, and the commits split unevenly inside it: 163 of 193 carry the name alkor2000, and 155 of those are linked to that GitHub account. dayebishouji accounts for 25, funfitx for 3 and DaisyHunter for 1, while 161 of the 193 commits carry a co-author trailer and 153 of those name a Claude model. Around them sit 689 stars, 118 forks and 13 open issues.
How it is put together
The parts · 6A local-first governance kernel wrapped around a text file. The index is plain text in the repository, one line per managed object, so Git can diff it, review it and roll it back; the binary never invents meaning and the model never writes governance facts. That split runs through the whole layout — Root and Meta declare and constrain, Volumes hold the entries, and a repository may only narrow what the machine allows, because the field limits are compiled in rather than read back from the project. Because the artefact is a file that a model edits in batches over hours, nearly all of the engineering goes into proving what happened to it: deterministic plans and source digests, candidate validation against the tag dictionary and the managed scope, cross-process locks with compare-and-swap publication, a ledger and receipts, a Baseline fingerprint per object, and a fail-closed recovery path that either resumes from a provable postimage or returns to the exact preimage instead of overwriting a third party. Two physical layouts exist because the earlier monolithic header was already in the field: Volumes v1 for new projects, and a Legacy layout kept readable while its commands are scheduled for removal.
- internal/
- The Go program, split along its own governance vocabulary:
internal/cliis 225 files and 1.5 MB,internal/mcptoolsis 107 files and 1.2 MB, and the rest carry database evidence, the index and the Baseline, scope change, migration, onboarding, host hooks, the ledger, the status page, the safety checks and the machine vocabulary the contract text has to agree with. - spec/public/
- Twenty plain-text contracts and 179 KB, shipped inside the public tree: cognition volumes, overview delivery, cognition refresh and cognition state, index format, object FRAS, the S-field discipline in two languages, managed scope and budget, safe inventory, database evidence and database table FRAS, host capability and messaging, and the MCP, CLI, config and system-cognition runtimes.
- scripts/blackbox/
- 516 files and 3.8 MB of suites and fixtures: the conformance, scenario, lifecycle and upgrade harnesses plus three frozen repositories, one of them a 453-file layered service. The fixtures include files that exist in order to be skipped — 1.1 MB text dumps, 69-byte images and zero-byte files.
- textassets/
- The strings the binary serves, kept as data rather than as code: 138 files for en-US and 138 for zh-CN, 298 KB and 264 KB, behind an 11.9 KB catalog and a 9.7 KB integrity test, covering guide instructions, help text, templates and the managed blocks written into a host repository.
- docs/ and AGENTS.md
- Twenty documents and 219 KB, led by a 24 KB Windows host guide, a 22.9 KB volumes document, a 22.5 KB troubleshooting file and a 21.5 KB scope-and-budget document, with a 4.5 KB contract-authority note and its 3.5 KB original.
AGENTS.mdis 18.4 KB and holds both the repository rules and the managed cognition block AOCI writes into it. - Release tooling
- Four workflows — release at 29.6 KB, full confidence at 17.9 KB, continuous integration at 9 KB and a release rehearsal at 3.8 KB — driven by a 15.5 KB Makefile and a 1.7 KB GoReleaser file, with eight release scripts including a manifest signer and a clean-room smoke test, and a 104 KB changelog kept beside a 88.8 KB third-party notice file for a 1.2 KB
go.mod.
Choices, and what they beat
Split the index into Volumes rather than one monolithic header over keeping the single-file Legacy layout as the path for new repositories
Root, Meta, Code and Database each get their own file, evidence source and lifecycle, and the Root is published last so a partial set cannot be mistaken for the complete one. The Legacy layout stays readable and its commands still work, but the README marks it deprecated and schedules the Legacy-only commands for removal, because the older format cannot carry per-Volume evidence and ownership.
Compile the field limits into the binary instead of the project over letting a repository widen its own FRAS limits from its Meta text
The Meta Volume carries
#FRAS-v2-Limits-Authority: machine-contract, which the README calls the load-bearing line: the limits belong to the binary, so a project cannot widen them by editing its own text. The same instinct fixes the binary name, the nine-tool MCP surface and the stdout reservation inAGENTS.md, where a change has to preserve them.The model owns meaning and the binary owns governance over having the program assemble entries from paths, extensions, ASTs or templates
Stated as a division of labour: the program does not build entries out of filenames or structure and does not silently rewrite what the model wrote, while it does own scope, plans, source digests, validation, atomic publication, the ledger and recovery. The README and the FAQ both say that an all-green result proves the encoded structural and governance conditions hold, not that the statements the model wrote are correct.
Test the shipped binary from outside, over the public protocols over testing only the packages in process
Four suites speak nothing but stdio MCP and the CLI, need only Python 3 and git on top of a built binary, and accept an alternative binary through an environment variable, so a fork or a platform port can be checked against the same contracts. The upgrade axis exists because the other three suites mint their fixtures with the binary under test and therefore cannot see a preimage that changed between versions.
Keep the MCP surface at nine tools over exposing every new capability as another tool
System cognition — lineage, relations, impact, snapshot and evolution — arrived as CLI commands over the existing governance kernel, and the README says explicitly that they add no tenth tool and change neither the names nor the stdio contract of the existing nine.
AGENTS.mdlists the nine-tool surface among the things a change has to preserve, and the stdout reservation is why logs go to stderr.
Read fromAGENTS.md (18,391 bytes), README.md (75,265 bytes) and README.zh-CN.md (67,381 bytes), the twenty files under spec/public/ with their sizes, the twenty documents under docs/, the four workflows and the 15,453-byte Makefile, scripts/blackbox/README.md, go.mod, and the complete 1,812-file tree with byte sizes.
Build log
6 stages- 01
Seventeen release candidates, and a version line that never left 0.1.0
The repository was created on 2026-08-08, and its first commit the same day is titled "chore: initial public release candidate" — which turns out to describe the whole project. In 52 days it took 193 commits, 109 of them in August and 84 in September, and published 17 releases, every one of them marked prerelease: v0.1.0-rc1 on 2026-08-08 through v0.1.0-rc17 on 2026-09-29. Nothing has ever been promoted out of the release-candidate line. The authorship is more interesting than the version number: 161 of the 193 commits carry a co-author trailer, and 153 of those name a Claude model — Fable 5.1 seventy-one times, Opus 5 sixty-seven, Fable 5 thirteen times and Opus 5.5 twice. The repository is owned by the aoci-spec organization, 155 commits are linked to alkor2000, 25 to dayebishouji, three to funfitx and one to DaisyHunter, with 689 stars and 118 forks around them.
- 02
The contracts are files, and the pull request template measures against them
The repository rule in
AGENTS.mdis one line long: "Public runtime contracts live underspec/public/." That directory holds 20 plain-text documents and 179 KB, led by a 32 KB cognition-volumes contract, a 17.9 KB overview-delivery contract, a 15.5 KB database-authoring contract and a 13.3 KB refresh contract. What makes them contracts rather than documentation is that both ends are testable.AGENTS.mdalso fixes the binary name, the nine-tool MCP surface and the reservation of stdout for JSON-RPC, while every pull request body opens with an "Affected public contracts" checklist whose boxes are exactly those axes: MCP names and response shapes, CLI commands, flags and exit codes,spec/public/text, the machine vocabulary ininternal/machinecontract, and index, Baseline, receipt or transaction identity. The Meta Volume goes further and declares#FRAS-v2-Limits-Authority: machine-contract; the README calls that the load-bearing line, because "the field limits belong to the binary, not to this text, so a project cannot widen them by editing its own Meta." - 03
Four black-box suites, and a gate table that says when green means nothing
AGENTS.mdstates thatmake fastis the Tier-0 gate and is "never sufficient evidence on its own", and lists five gates that run only undermake full— clean-room smoke, licenses, race, vuln and database integration — with the note that changing a machine default once broke clean-room smoke alone while every fast gate stayed green. Above the unit tests sit four black-box suites underscripts/blackbox/that drive a built binary strictly from outside the process: 46 read-only conformance checks of the MCP wire surface, 64 fault-injection scenarios over cursor tampering, crash recovery and racing writers, a lifecycle suite over three frozen fixture repositories (a TypeScript app, a Python service with MySQL, and a 453-file layered service), and an upgrade axis of 48 checks per released version across six repository shapes. The README says plainly what the suite cannot see: the other three suites mint every fixture with the binary under test, "so a preimage that changed between versions is invisible to them by construction." - 04
What ships when: a soak window and a queue of things held back on purpose
On 2026-09-21 the maintainer wrote, in a review, that main was "in the soak window for 0.1.0", with the plan to promote the current candidate unchanged "as long as no product code lands before then"; a pull request that touched the database collector was left open for that reason alone. The same answer came back for a change to the section-header convention — taken, "just not into a 0.1.0 candidate", because anyone still on the older candidate reading a neutral index would only get the old guarantees, so it became a 0.2.0 item to be landed later under the contributor’s own name with the maintainer doing the rebase. The clearest example of that caution is a dependency bump. An MCP SDK upgrade from 1.6.1 to 1.8.0 is not treated as a version bump at all: the newer line links another module into the binary, which changes the license inventory,
THIRD-PARTY-NOTICESand the supply-chain documents;tools/listgains two fields, a visible change to a response pinned by a golden file; and it enables a stateless protocol revision that none of the four black-box suites can speak, so it would ship unexercised. - 05
A bug report that was wrong three times, and the bytes that ended it
Issue 89 is the best-documented failure in the repository. A user reported that responses from
aoci_maintainoccasionally contained hex digests of 63 or 66 characters instead of 64, so that submissions copied verbatim from those responses were rejected. The reporter then revised the attribution twice in public — first to a stale in-process candidate cache, then to bad values persisted into the disk receipt — and both times posted a correction after reading the source, the second time concluding that the disk layer could not have accepted a malformed value at all. The maintainer read the server side, found no place that could put a stray character into a hex string, noted that the values go straight from an in-memory receipt through the standard encoder with no manual assembly, and asked for raw bytes instead of another theory. The answer came from the host’s own session database: across 141 AOCI tool calls, all 1,824 digest values inaoci_maintainresponses were exactly 64 characters, while 23 of the 1,530 values in the model’s ownaoci_update_entryrequests were malformed. The corruption was in the copying, not in the server, and the companion issue was closed as not planned. - 06
Cost admitted up front, and a repository made of files that check each other
The README tells a prospective user how long the first index takes before it explains how to start one: about an hour per 200,000 lines of code, because the model reads every managed file and writes one entry for each. When an issue asked why the tool was so slow, the answer separated the two costs — the Baseline keeps a fingerprint per file and maintenance only sends back the changed ones, but nothing avoids the first pass — and reported that the current candidate had halved each batch response and begun cutting batches by a byte budget, taking two or three tenths off the number of rounds. The same instinct decides what is worth indexing: a test earns an entry only when it is "an executable contract someone must run by name", because at roughly 110 tokens per entry, indexing ordinary package tests "would more than double the Whole-Index and buy nothing". The repository applies this to itself: its Code Volume is 195 KB against a 305-byte Root and 910 bytes of Meta, with a 447 KB Baseline beside them, among 1,812 files that also include four release workflows, a 104 KB changelog, two parallel localized text-asset trees of 138 files each, and a vendored openGauss connector carrying a 39.5 KB patch of its own.
Adjacent records
All records →No. 091
OKF Agent Memory
Keeps what a coding agent learns as plain Markdown inside the repository — an OKF v0.2 knowledge bundle searched in-process by BM25 — so the memory can be diffed and reviewed instead of living in a database.
No. 090
Reverify
A verifier for an AI’s claims about binaries: the model proposes, a deterministic toolkit checks the claim against the actual bytes, and what comes back is VERIFIED, REFUTED or INCONCLUSIVE with the evidence it read — the verdicts, not the prose, are what survives a reset.
No. 081
pgbot
A single static Go binary that connects to PostgreSQL read-only, reads the server’s own statistics views and prints a graded, findings-first health report — and, because every run saves a local baseline, tells you what changed since last time; the same deterministic findings are served to AI agents over MCP, and the optional AI layer may only explain them.