SuperAPIAI Directory

aoci-code

github.com · AI coding

AOCI-CODE is a local-first codebase cognitive index tool for programming agents, consisting of an MCP server and CLI written in Go. It organizes the entire codebase and database table schemas into a persistent, governed, Git-versioned plain-text index, so that agents such as Claude Code, Codex, Cursor, and OpenCode read the index before starting work, thereby understanding each file's responsibilities, dependencies, and inviolable constraints, and reducing repeated searching and re-reading of code. The index evolves with the code and is incrementally maintained by agents after tasks are completed.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

AOCI-CODE is the concrete implementation of the AOCI (AI-Oriented Cognition Infrastructure) methodology, positioned as a layer of cognitive infrastructure between programming agents and software systems. It consists of the aoci CLI, the MCP server, and the index jointly maintained by both, is written in Go, and runs locally.

Purpose In hosts that support standard stdio MCP, such as Codex, Claude Code, Cursor, and OpenCode, the agent reads the entire index before starting each task, thereby grasping the full picture of the system before the task begins: what each file is responsible for, what it depends on, what its callers depend on, and what cannot be inferred from the code but must never be gotten wrong. This reduces the overhead of re-searching and re-reading the codebase on every request, and also means that when taking over an existing system, switching agents, or starting a new session, understanding does not have to be rebuilt from scratch.

Main capabilities

  • The index is stored as plain-text files in the project repository, versioned by Git, and can be diffed, reviewed, and rolled back.
  • The index files include the root file aoci.txt (declaring the index composition and activation entry points), the meta file aoci.meta.txt (tag dictionary, FRAS rules, and authoring constraints), the code volume aoci.code.txt (entries written by the model for code and other repository assets), and the database volume aoci.database.txt (table-level entries after database cognition is enabled).
  • Each file has a one-line entry containing F (responsibility), R (content that must be read together), A (caller dependencies), S (constraints that cannot be inferred from the code but must not go wrong), as well as tags that locate the file by layer, domain, importance, and size.
  • Supports database table schema indexing: MySQL (5.7.6 and above), PostgreSQL, and openGauss 6.0.5 and SQLite with constraints; MariaDB is not supported. It is recommended to build the code index first, then the database index.
  • The MCP server detects code changes and indicates the entries that need updating; after completing a task, the agent incrementally maintains the index according to the formal workflow, keeping the index consistent with the current code.
  • Provides a status panel, which can be started in the background via aoci ui --detach --json to obtain a link.

Usage

  1. Obtain the binary: use a signature-verified package from GitHub Releases, or build from the canonical source (requires the Go toolchain declared in go.mod, make, and other repositoryrequired tools). The current version is v0.2.0-rc8, licensed under FSL-1.1-MIT.
  2. Run initialization in the root directory of the target repository (or specify a path via --repo). init writes the locale configuration, the managed AGENTS.md rule block, the Git boundary, and an empty index skeleton.
  3. Have the agent build the first index: the host reads the project AOCI rules and the live guide, examines source code, tests, configuration, and related evidence, and writes FRAS candidate entries for each managed object. When the final batch reports terminal_proof.aligned=true, the first index build is complete.
  4. After that, simply make development requests as usual; there is no need to attach "maintain the index" each time. Project rules and MCP will check and update affected entries once code and tests stabilize.
  5. If the context is compressed or you want to rebuild the system's understanding, you can have the agent re-read the full index.

Use cases

  • Maintaining a grasp of the overall structure during large-scale system development.
  • Taking over an existing codebase in one step (materials state it can handle codebases of roughly 500,000 lines; the actual limit depends on index size; in the example, the index for a 700,000-line commercial system is about 300,000 tokens).
  • Continuing context during project handover, when switching agents, or when starting a new session.
  • Non-professional developers continuously iterating on their own systems, and professional developers handing the system to an agent and focusing on architecture and design.

Limitations and notes

  • The first index takes a long time; materials state roughly one hour per 200,000 lines of code, depending on model and agent speed; it runs in batches and can resume after interruption.
  • Local-only operation: read-only with respect to the system, no network access, no credential storage; it reads only source code and database table schemas, not business data; database credentials are referenced by environment variable name.
  • It is independent of model provider APIs; the host must support standard stdio MCP and be able to follow the tool contract; a model name alone cannot determine compatibility.
  • After initialization, the agent session usually needs to be restarted to load the MCP server; hosts that load MCP dynamically may not need this.
  • The index does not fabricate business meaning from file names, directories, or the AST.
  • Specific installation commands, verification steps, and host integration details require consulting the project installation guide and host integration documentation; the materials do not provide them in full.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools