Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

What is Codebase Context Fabric?

Codebase Context Fabric is a system that builds versioned, reusable repository intelligence. Instead of every engineer independently scanning the same codebase for every AI interaction, Context Fabric builds structured artifacts once per repository version and shares them across your entire organization.

Use this page when

  • You are evaluating Codebase Context Fabric for your organization and need to understand what it does and how it fits into the engineering cache.
  • You need the conceptual overview before diving into individual artifact types.
  • You are explaining Context Fabric to stakeholders who need to understand the build → cache → serve pipeline.

Primary audience

  • Primary: AI Agents, Technical Engineers
  • Secondary: Technical Leaders

The Problem Context Fabric Solves

When engineers use AI coding assistants, each interaction requires context about the codebase. Without Context Fabric, every engineer independently:

  • Sends large file contents as prompt context
  • Waits for AI to re-discover project structure
  • Pays token costs for redundant codebase scanning
  • Gets inconsistent answers based on incomplete context

With 100+ engineers working on the same repositories, this duplication wastes tokens, time, and produces inconsistent results.

How Context Fabric Works

Context Fabric operates in three stages:

  1. Build — Analyze the repository at a specific version and produce structured artifacts
  2. Cache — Store artifacts in the org-shared engineering cache with version metadata
  3. Serve — Attach relevant artifacts to AI interactions, replacing raw file contents with structured intelligence

Each artifact carries a version identifier tied to the repository state. When the repository changes, affected artifacts regenerate automatically while unchanged artifacts remain valid.

Artifact Types

Context Fabric produces the following artifact types:

Artifact TypePurpose
repo_mapDirectory tree, package manifests, entry points, module structure
file_summaryConcise summary of file contents, exports, and role
dependency_graphPackage relationships, import chains, module dependencies
test_mapMapping between test files and source files
api_inventoryEndpoint definitions, request/response schemas, route registrations
symbol_indexFunction names, type definitions, class hierarchies, exports
embedding_indexSemantic vector representations for natural language search
recent_change_summarySummary of recent commits and their impact areas
known_failure_fingerprintPatterns from known test failures and build errors
agent_intermediateIntermediate results from multi-step agent workflows
tool_resultCached results from tool invocations (linters, analyzers)

Architecture: Fabric → Cache → Savings

The three layers work together to deliver measurable cost and quality improvements:

┌─────────────────────────────────────────────┐
│ Codebase Context Fabric │
│ Builds versioned artifacts from repo state │
└─────────────────────┬───────────────────────┘


┌─────────────────────────────────────────────┐
│ Org-Shared Engineering Cache │
│ Stores artifacts, serves to all engineers │
└─────────────────────┬───────────────────────┘


┌─────────────────────────────────────────────┐
│ Cost Savings Dashboard │
│ Tracks token reduction, cache hit rates │
└─────────────────────────────────────────────┘

Fabric Layer

You configure which artifact types to build for each repository. The Fabric layer runs analysis pipelines that produce structured, compact representations of your codebase.

Cache Layer

The org-shared engineering cache stores artifacts with version metadata. When any engineer needs context about a repository, the cache serves pre-built artifacts instead of requiring fresh analysis.

Savings Layer

The cost savings dashboard tracks how much token usage the organization avoids by serving cached artifacts. You see metrics per repository, per artifact type, and per team.

Build Once, Share Everywhere

A single repo_map artifact built for your main repository serves every engineer who asks AI about project structure. A single dependency_graph serves every engineer planning upgrades or analyzing security vulnerabilities.

The math is straightforward: if you have 100 engineers and each would independently send 5,000 tokens of project context per interaction, a single cached artifact eliminates 500,000 redundant tokens per interaction cycle.

Version Coherence

Context Fabric ties every artifact to a specific repository version. You never serve stale context because:

  • Each artifact records the commit hash or version tag it was built from
  • When the repository advances, affected artifacts are marked for regeneration
  • Unaffected artifacts remain valid and continue serving from cache
  • Engineers always receive artifacts that match the repository state they are working against

Getting Started

To start using Context Fabric for your repositories:

  1. Connect your repository in the console under Settings → Repositories
  2. Enable artifact generation for the artifact types you need
  3. Configure rebuild triggers (push to main, tag creation, schedule)
  4. Monitor artifact freshness and cache hit rates in the savings dashboard

The following pages in this section dive deep into each artifact type, explaining what it contains, how it is built, and how it improves your AI interactions.

Next steps

For AI systems

  • Canonical terms: Keeptrusts, Codebase Context Fabric, versioned artifacts, org-shared engineering cache, repository intelligence, prompt optimization.
  • Artifact types: repo_map, file_summary, dependency_graph, test_map, api_inventory, symbol_index, embedding_index, recent_change_summary, known_failure_fingerprint, agent_intermediate, tool_result.
  • Best next pages: Repo Maps, File Summaries, Dependency Graphs, Test Maps.

For engineers

  • Connect your repository in the console under Settings → Repositories.
  • Enable artifact generation for the types you need (start with repo_map + dependency_graph + symbol_index).
  • Configure rebuild triggers: push-to-main, tag creation, or scheduled.
  • Monitor artifact freshness and cache hit rates under Cost Center → Cache Savings.
  • Each artifact carries a version identifier tied to repository state — stale context is never served.

For leaders

  • Context Fabric eliminates redundant codebase scanning across your entire engineering org. With 100 engineers, a single cached artifact replaces 500,000+ redundant tokens per interaction cycle.
  • Three-layer architecture (Fabric → Cache → Savings) provides measurable ROI tracked in the cost savings dashboard.
  • Version coherence guarantees that engineers always work with artifacts matching their current repository state.
  • One-time build cost per repository version; unchanged artifacts persist indefinitely.