# Repository Briefing: aoci-spec/aoci-code
> Source: https://repoforai.com/repo/aoci-spec/aoci-code (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/aoci-spec/aoci-code
- **Official Docs / Website**: https://www.aoci.ai
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: See repository
- **Engineering Health**: A (79/100 · Maintenance 35/35 · Adoption 18/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.1.1 (2026-11-04) — https://github.com/aoci-spec/aoci-code/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, MCP, Self-Hosted
- **Momentum**: 3,193 ★ total (+11 24h / +108 7d) · 286 forks
- **Topics**: `agent-memory`, `agents-md`, `ai-coding`, `ai-context`, `claude-code`, `code-indexing`, `code-intelligence`, `codex`, `coding-agent`, `context-engineering`, `cursor`, `database-schema`
- **When to Use**: Best for: Teams maintaining a long-lived Git repository across coding-agent sessions, especially when changes span code and database schemas and architectural context needs to be reviewable in Git. Skip if: You mainly need exact symbol lookup, cannot allocate host time and context for an agent-authored index, or require an unrestricted permissive license.

## Overview
```text
### Architecture & Core Mechanics
AOCI-CODE splits semantic authorship from index governance. The Go `aoci` CLI initializes the repository and inventories managed files through Git. The coding agent reads the relevant evidence and authors semantic entries through a local stdio MCP server. The runtime does not infer business meaning from paths or an AST; it governs how entries are written and updated.

The state is plain text under Git: `aoci.txt` declares and activates the index, alongside assets such as `aoci.meta.txt` and `aoci.code.txt`. The manifest pairs Cobra with the official Go MCP SDK. The integration boundary is the host’s MCP support and ability to follow the tool contract, not the model provider’s API. That keeps the index portable across compatible hosts without moving model inference into the server.

### Key Capabilities & Differentiators
A file entry records FRAS: responsibility, strongly related objects, exposed contracts, and constraints that may not be obvious from structure alone. Entries can capture transaction boundaries or compatibility requirements alongside public interfaces. The initial scan establishes the managed Baseline. After managed objects change, the server identifies entries that need updates and the agent supplies the new text. Git provides a way to review and roll back those changes.

Database cognition adds a separate table-level index from catalog metadata, without reading business rows. PostgreSQL and MySQL 5.7.6 or later are supported; openGauss 6.0.5 and SQLite have constraints, and MariaDB is not supported. The manifest includes `pgx/v5`, `go-sql-driver/mysql`, `ncruces/go-sqlite3`, and a local replacement for the openGauss connector. The combined code and schema index is useful when changes cross application and database boundaries.

### Trade-offs & Limitations
Unlike CodeGraph, which resolves specific symbols and call paths, AOCI-CODE front-loads system context: it gives the agent a compact account of what the system does and what must not change before it starts searching. The two are complementary. AOCI-CODE does not replace exact source lookup, and an accepted entry is not proof of semantic correctness. Because entries are model-authored, review consequential contract or constraint changes against source and tests.

The first build reads every managed file in resumable batches. The planning example is about an hour per 200,000 lines, dependent on model and host speed rather than a throughput guarantee. The resulting index size matters more than line count: one 700,000-line example produced roughly 300,000 index tokens, which may not fit the host’s usable context budget. Evaluate build cost and index size together. The v0.2.0-rc8 release uses the source-available FSL-1.1-MIT license; review the terms rather than treating it as MIT-only.

### Hardware & Deployment Guide
Install a verified signed package or build from canonical source with the Go toolchain declared in `go.mod` and `make build`. Put the binary at a stable absolute path and run `init` and `scan` against a writable Git checkout. Keep generated index assets out of Git ignore rules so the scan can see them. Load or restart the MCP host before asking it to build the index; Cursor may require manual configuration. For a server database, supply the connection string through the declared environment variable rather than storing credentials in the index.

The binary needs no model runtime of its own. Its documented network connections are limited to the declared database and the loopback status panel; the coding host still follows its own model and data-handling setup. In the 0.2.0 candidate series, a Claude Code build on rc7 completed a MySQL-backed first index after accepting database Evidence before any Code Entry, a sequence that deadlocked on rc6. The rc8 milestone is still a release candidate, so verify and pin the build you pilot.
```

## Key Capabilities
```text
- Index layout: `aoci.txt` activates the index; `aoci.meta.txt` and `aoci.code.txt` are separate Git-reviewable assets.
- Entry format: FRAS separates responsibility, related objects, public contracts, and constraints in a single file entry.
- Scope governance: Git supplies the scan inventory; an established Baseline changes through Scope Change, not `scan --force`.
- Host integration: Standard stdio MCP connects to Codex, Claude Code, Cursor, or OpenCode without a separate model-provider integration.
- Database coverage: Catalog-only indexing supports PostgreSQL and MySQL 5.7.6+, with constrained openGauss 6.0.5 and SQLite support; MariaDB is excluded.
- Operational visibility: `aoci ui --detach --json` starts the local status panel in the background.
```

## Quick Start / Clone
```bash
gh auth login
gh release download v0.2.0-rc8 --repo aoci-spec/aoci-code
```
