百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
aoci-code

aoci-code

> DevOps
免费

将代码和数据库知识提炼为整个仓库的持久、受控的映射,帮助

268 stars0 点赞1 次浏览
GitHub

工具介绍

将代码和数据库知识提炼为整个仓库的持久、受控的映射,帮助

AOCI-CODE

AOCI-CODE is an indexing method that establishes global software-project cognition for AI Agents and provides a persistent, governable repository cognition map.

English | 简体中文

1. What AOCI-CODE does

1.1 Keep developing a system inside a Code Agent. In Codex, Claude Code, Cursor, OpenCode, and similar Agents, grow a system from nothing into a complete 500,000-line codebase plus its database. The Agent always works with the whole-system cognition the AOCI index provides instead of searching and re-reading the entire codebase for every task. Non-professional developers can keep iterating on their own systems; professional developers can hand the whole system to an Agent for collaborative evolution and keep their attention on architecture and design decisions.

1.2 Understand an existing system in one step and take over its development. For an existing system of up to 500,000 lines, one sentence has the Agent build whole-system cognition; it reports how well it has mastered the system, then takes over development seamlessly. The supported scale is set by the index size, not by the line count as such: in practice a 700,000-line commercial system is developed this way today, with an index of about 300K tokens.

1.3 Change the people, the Agent, or the conversation without losing cognition. The index lives in the repository next to the code and is versioned by Git. When a project changes its project manager or developers, switches to another Agent, or opens a new conversation, one read of the index picks up where things left off, seamlessly across Agents and conversations.

1.4 After the first index, maintenance is automatic. The MCP detects code changes and issues the Entries that need updating; the Agent fills them in as it finishes each development task, so the index always matches the current code version and development is never interrupted.

2. Notes before you start

2.1 The first index takes time. The Agent reads every managed file and writes one Entry per file, so a larger system takes longer: about 1 hour for 200,000 lines of code, depending on the model and the Agent's speed. The index is built in batches, and an interrupted build resumes where it stopped.

2.2 For a system with a database, build the database index too. MySQL and PostgreSQL are supported, and openGauss 6.0.5 with constraints. Build the code index first, then the database index; when code cognition and table-level cognition are delivered together, the Agent understands the system more completely.

2.3 Read-only on your system, no Internet, no stored credentials. AOCI-CODE only reads your source code and database table structures, never business data. It writes its index files and its own state inside the project directory, plus the status page's registration in your user cache directory. It never reaches the Internet and uploads nothing: the only connections it opens are to the database you declare, for catalog metadata, and its own loopback status page. Database credentials are referenced only by environment-variable name, never stored. The index text is written locally by your own Agent through the model channel you already use; AOCI-CODE adds no new data exit.

One-step setup

Give the following instruction to your AI Agent to download AOCI-CODE and integrate it; after restarting the Agent, send the second instruction to build the index:

…

After restarting the Agent, send this one:

First confirm the AOCI MCP server is connected, then build the AOCI index for this project. When it is complete, give me the AOCI panel link.

The Agent starts the panel in the background with aoci ui --detach --json and hands you the link; what the panel shows and its other commands are under “AOCI panel”.

The index is authored through AOCI's MCP tools, and the MCP server that init has just written was not loaded in the session that wrote it, so index building has to follow the restart. A host that loads MCP servers dynamically may not need one; “Host integration” explains how to tell.

If your project has a database (PostgreSQL and MySQL are supported, plus constrained openGauss 6.0.5), building a database index is recommended as well. First declare the source as described under “Database Cognition” and provide the connection-string environment variable in the host environment (AOCI stores no credentials), then send:

Build the AOCI database index for this project.

If the context has been compacted, or you want the Agent to re-establish its cognition of the system, send this:

Using only AOCI, establish whole-framework cognition of this project, tell me your mastery of each area as a percentage, and whether you can take over development.

What is AOCI?

AOCI (AI-Oriented Cognition Infrastructure) is cognition infrastructure positioned between AI Agents and software systems.

Large models handle reasoning, Agents handle planning and execution, and AOCI organizes code, configuration, tests, and database structures into continuously maintainable system cognition bound to the current system version, for Agents to read and understand before acting.

️ What is AOCI-CODE?

AOCI-CODE originates from AOCI. Put simply, AOCI-CODE distills the information from source code, database structures, and other assets that materially affects how AI understands and modifies a system into a high-information-density, plain-text index combining symbols and semantics.

AOCI-CODE applies this method to projects through the aoci CLI and MCP Server.

When model context is limited, an AI Agent can read the index first, acquire most of the project’s key information in one pass, and then enter a specific development task. This reduces repeated searching and code re-learning while improving continuity across tasks and sessions.

  • The index is not a one-time summary: it evolves with the system and remains in the project over the long term, where it can be diffed, reviewed, versioned, and rolled back with Git.
  • It records more than “where files are”: AOCI-CODE also preserves object responsibilities, strong relationships, public contracts, transaction boundaries, compatibility constraints, and other information that is difficult to infer directly from code structure.
  • The index is portable: the index is stored with the project and is not tied to a specific model, AI Agent, or individual session. When the index is aligned with the code version, different AI Agents and later sessions can read and reuse the same system cognition without rebuilding their understanding from scratch each time.
  • Code and databases can be understood together: the model can build an independent table-level index for database tables. When Code Cognition and Database Cognition are delivered together, an AI Agent can understand the software system more completely.

Names in this document have the following roles: AOCI refers to the cognition paradigm and protocol, while AOCI-CODE refers to the project and the index itself that embody this method.

⚙️ How AOCI works

In the current Volume-first layout, AOCI-CODE organizes the index as governed, plain-text cognition assets stored with the project:

  • Root (aoci.txt): declares the composition and activation entry point of the current CognitionSet;
  • Meta (aoci.meta.txt): stores the tag dictionary, FRAS rules, and model-authoring constraints;
  • Code (aoci.code.txt): stores model-authored cognition for code and other repository assets;
  • Database (aoci.database.txt): stores optional table-level cognition when Database Cognition is enabled.

Root, Meta, and participating object Volumes together form the current Whole-Index. On top of these assets, the workflow has three stages:

  1. Establish governed cognition: The model reads source code and accepted evidence, while AOCI-CODE governs Managed Scope and model-authored cognition for managed objects with the index role.
  2. Deliver cognition before action: The Agent reads the Rules, live Guide, and current Whole-Index, then checks source and other evidence for the task at hand.
  3. Maintain cognition after verified change: Once code and tests are stable, project Rules and the AOCI MCP workflow guide the Agent to update affected Entries and return formal cognition to aligned.

These plain-text cognition assets are stored with the project and can be versioned with Git. When cognition remains aligned with the current system version, different AI Agents and later sessions can read and reuse the same Whole-Index.

Manual integration

Obtain AOCI-CODE from canonical source or use a signed package from GitHub Releases. Before using a prebuilt binary, follow the basic, recommended, or full verification level in the installation guide, and report which level completed. Give this README and the verified binary's stable absolute path to a trusted AI Agent such as Codex, Claude Code, Cursor, or OpenCode. The AI Agent can follow the in-project instructions to initialize AOCI, integrate MCP, and build the first index.

The time required to generate complete cognition for the first time depends on repository size. A normal integration consists of preparing the binary, having the AI Agent or user initialize the target repository, asking the host to “build the index,” and verifying alignment. Subsequent development does not require a repeated “maintain the index” reminder at the end of every request; project rules and the AOCI MCP workflow guide the AI Agent through incremental cognition maintenance after managed objects change.

0. Requirements

  • A verified release package or a checkout of the canonical AOCI-CODE source repository;
  • For source builds only, the Go toolchain declared by go.mod, make, and the other tools required by the repository;
  • A supported MCP host, such as Codex, Claude Code, Cursor, or OpenCode;
  • Normal read and write access to the target repository.

The signed-package route and executable verification commands are in the installation guide. The source-build route remains available below.

1. Current RC: use a verified package or build from source

[!IMPORTANT] AOCI-CODE v0.1.0-rc13 is the current release candidate. It is Fair Source/source-available software under FSL-1.1-MIT; see LICENSE. Build from canonical source or use a signed package from the v0.1.0-rc13 GitHub Release after following the release verification procedure.

The signed Release binary identifies itself as aoci version 0.1.0-rc13. A source build identifies the exact checkout instead and may report a development version such as v0.1.0-rc13-1-g (plus -dirty when applicable), together with its Git commit. These identify different build inputs and are not a version conflict.

To download with GitHub CLI, authenticate first, then download the tagged Release assets:

bash
gh auth login
gh release download v0.1.0-rc13 --repo aoci-spec/aoci-code

For an anonymous download, use the v0.1.0-rc13 Release page in a browser and download the required archive and verification assets there.

Clone the canonical repository, build the binary, and keep its resulting path stable:

bash
git clone https://github.com/aoci-spec/aoci-code.git
cd aoci-code
mkdir -p build
make build
./build/aoci --version

On Windows, build the same canonical source in PowerShell:

powershell
git clone https://github.com/

Issues· 10 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

开发者工具

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年9月9日
最后更新2026年9月18日
分类DevOps
定价免费

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理