# AOCI Cognition — governed repository knowledge for AI agent

> Establish persistent, Git-versioned codebase and database cognition using the AOCI-CODE protocol.

AOCI Cognition — governed repository knowledge for AI agent is a free AI agent skill on Agensi by Fourteenth-Night, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Fourteenth-Night](https://www.agensi.io/creators/fourteenth-night)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 2
- Version: 1.1
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/aoci-cognition-governed-repository-knowledge-for-ai-agent
- Tags: ai-agents, database, documentation, mcp-server, git, codebase-analysis, code-understanding, codebase-onboarding

## About this skill

Onboarding a new developer to a complex codebase usually takes days of manual exploration. This skill implements the AOCI-CODE collaboration protocol, enabling an agent to maintain a persistent, Git-versioned cognition map of both source code and database schemas. It replaces guesswork with a governed system of responsibilities, contracts, and constraints.

### What it does
- **Governed Cognition** maintains a version-controlled map of code responsibilities (FRAS) and system boundaries.
- **Database Mapping** integrates table-level cognition using read-only environment variable DSNs for schema analysis.
- **Semantic Tracking** triggers maintenance only when machine-computed semantic change thresholds are crossed.
- **Protocol Adherence** enforces a strict session lifecycle including overview loading, attestation, and task-end maintenance.
- **Evidence Reporting** generates headers and reports to prove alignment between the cognition map and the actual source.

### How it works
1. **Initialize** the session by calling `aoci_rules` to confirm the behavior contract and protocol constraints.
2. **Load Overview** by consuming the architecture and module boundary map, following cursors if transport limits are hit.
3. **Execute & Maintain** by performing business edits followed by the `aoci_maintain` command to identify semantic drift.
4. **Update & Verify** by batch-submitting semantic candidates via `aoci_update_entry` and proving alignment with `aoci_verify`.

### Frameworks & tools
Requires the `aoci` CLI binary (versioned and checksum-verified) and a Git repository. Works with any MCP-capable agent host like Claude Code, Cursor, or OpenCode. Supports database schema cognition via `AOCI_DB_*_DSN` environment variables.

### Why this beats prompting it yourself
Manual prompts lack persistence and struggle with context window limits in large repos. This skill uses a formal protocol to ensure the agent's "understanding" is stored in Git, preventing hallucinations about system boundaries and ensuring every architectural claim is bound to a source SHA256.

### Use cases
- **Codebase Takeover** quickly building a mental model of an unfamiliar repository's architecture and contracts.
- **System Impact Analysis** determining which code objects or database tables are affected by a proposed change.
- **Consistency Enforcement** maintaining strict FRAS (Function/Responsibility/Authority/Sign-off) discipline across large teams.

### Known limitations
Requires pre-installation of the `aoci` binary on a stable path. Does not handle business data or network egress; it focuses exclusively on source and schema metadata.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the AOCI Cognition — governed repository knowledge for AI agent skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does AOCI Cognition solve the problem of AI agents 'forgetting' codebase context?

AOCI Cognition creates a persistent, Git-versioned 'map' of your code's architecture, preventing the 'context rot' that occurs when AI agents lose track of complex file relationships during long sessions.

### Which AI agents and IDEs are compatible with this MCP skill?

The skill is designed for any host that supports the Model Context Protocol (MCP), including Claude Code, Cursor, and OpenCode, provided the host has access to the local file system.

### Where is the 'cognition map' stored, and will my team have access to it?

The cognition map is stored directly in your Git repository as governed metadata, meaning your system knowledge evolves alongside your code and is shared across your entire development team.

### What are the technical requirements for installing AOCI Cognition?

Setup involves installing the `aoci` CLI binary on your local machine and connecting the nine included MCP tools to your preferred AI agent host.

### Can't I just prompt my AI to remember the file structure instead of using this skill?

Unlike standard prompting, this skill uses a deterministic maintenance loop (AOCI-CODE protocol) to verify that the agent's mental model matches the actual source code before every task.

### What exactly is included in the purchase of this skill?

You receive the full suite of nine AOCI-CODE MCP tools, the `aoci` CLI binary for repository initialization, and the governed protocol definitions for maintaining system integrity.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
