Skip to content

Codebase Intelligence

Codebase Intelligence (CI) captures the complete development story behind AI-written code. Every plan, decision, gotcha, and trade-off is recorded as your agents work — creating a semantically rich history that goes far beyond what git blame or commit messages could ever tell you.

When AI agents build your software, the most valuable part of the process isn’t the code — it’s the reasoning. Why was this approach chosen over alternatives? What gotchas were discovered? What architectural trade-offs were made? All of that context lives in agent sessions that vanish when the conversation ends.

Git captures what changed. OAK captures why, how, and what was learned along the way.

Codebase Intelligence runs as a lightweight local daemon that provides four interconnected capabilities:

CI automatically captures the full lifecycle of every agent session — prompts, tool executions, plans, AI summaries, and outcomes. In the background, an LLM classifies these activities and extracts observations: gotchas, decisions, discoveries, bug fixes, and trade-offs. These become your project’s persistent memory.

  • Gotchas: “The auth module requires Redis to be running.”
  • Decisions: “We chose SQLite over Postgres for simplicity.”
  • Trade-offs: “Sacrificed write throughput for read latency in the caching layer.”

This is the development context that no one writes down but everyone wishes they had six months later.

The daemon maintains a real-time vector index of your codebase using AST-aware chunking (via tree-sitter across 13 languages). Agents find code by concept rather than keyword — “where is the authentication middleware?” finds the right file even if it’s named differently, based on its semantic function.

CI doesn’t wait for you to ask. It integrates directly with your agent’s workflow through hooks:

  • Session Start: Injects project context and relevant memories before the agent begins.
  • Pre-Prompt: Surfaces related code and past learnings before each prompt.
  • Post-Tool: Analyzes file operations to provide file-specific memories and capture new activities.
  • Session End: Summarizes the entire session and extracts observations for long-term memory.

The result: agents that remember what your team has learned, across every session and every engineer.

OAK extends your agent’s capabilities through Skills — slash commands that leverage CI’s knowledge base for tasks like finding related code, analyzing change impacts, creating RFCs, and establishing project standards.

After setup, the Dashboard is your primary interface. Use it to search your codebase, browse agent sessions, manage memories, configure settings, and more — all from your browser.

The OAK Dashboard

AgentContext InjectionActivity CaptureIntegration Method
Claude CodeSession + Prompt + Post-toolYessettings.json hooks
Gemini CLISession + Prompt + Post-toolYessettings.json hooks
CursorSession + Prompt + Post-toolYes.cursor/hooks.json
OpenCodeSession + Prompt + Post-toolYesTypeScript plugin (oak-ci.ts)
WindsurfPrompt onlyYes.windsurf/hooks.json
Codex CLIVia OpenTelemetryYesOTLP log events & Notify
GitHub CopilotNone (cloud-only hooks)No.github/hooks/hooks.json

Context injection is what makes CI proactive — it automatically surfaces relevant memories and code search results into your agent’s context. Agents with Session + Prompt + Post-tool injection get the richest experience: context at session start, before each prompt, and after file operations. Agents with Prompt only receive context before each prompt but not at session start.