> For the complete documentation index, see [llms.txt](https://docs.visdom.virtuslab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visdom.virtuslab.com/visdom-context-fabric/context-fabric-in-the-platform.md).

# Context Fabric in the platform

The compiled knowledge layer: aggregate, serve, govern.

The Context Fabric answers the hardest requirement in this domain: semantic understanding of a large, multi-repository, complicated project structure. Rather than leaving an agent to "discover" the code on every issue, which is expensive, slow and not repeatable, the platform maintains a **compiled knowledge layer** about your systems.

![The Context Fabric: sources compiled into topic pages, served to agents over MCP and as generated rule files](https://1398155133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FED9nLcXxDQR0x7nt8zMS%2Fuploads%2FBZJOFQSXuOJCwAnm8o19%2Fcontext-fabric.png?alt=media)

## Processing model: aggregate, serve, govern

**Aggregate.** Signals from repositories (code, history, blame), infrastructure as code, pull request history, issues and documentation are compiled and merged into **topic pages**, not a raw document index. Every artefact keeps its **provenance** back to the sources. Updates are incremental: cost is proportional to the change, not to the size of the knowledge base.

**Serve.** An agent describes its task and receives the smallest high-signal subset of context **within a given token budget**, tuned to the phase of work (planning, implementation, review). Two delivery channels: **MCP tools** for live queries (`context.system.dependencies(...)`, `context.org.reviewers(...)`, `context.history.why(...)`) and **generated rule files** (`AGENTS.md` / `CLAUDE.md`) injected into the agent's environment.

**Govern.** When a source changes, every affected page is rebuilt from current sources. Currency by construction, so stale facts cease to exist rather than lingering. Contradictions between sources and orphaned topics are reported for a human to resolve; a human can correct and pin an artefact; and corrections reviewers keep repeating flow back into the knowledge layer.

{% hint style="info" %}
**MCP** is the Model Context Protocol, the standard interface an agent uses to call a tool. The Fabric serves context over it, and your own internal tools can be exposed to agents the same way.
{% endhint %}

## Five levels of context

* **L1, system context**: services, dependencies, contracts, architectural boundaries as a living graph.
* **L2, code context**: conventions, lint rules, build configuration, recurring review remarks.
* **L3, organisational context**: the real (not nominal) reviewers and module owners, escalation paths.
* **L4, historical context**: architecture decision records, pull request threads, postmortems, decisions.
* **L5, operational context**: telemetry and incident history.

Most tools on the market stop at L1 and L2. L3 and L4 are what make code location accurate and keep a fix consistent with the organisation's conventions.

## The deterministic layer

Alongside knowledge compiled with the help of a model, the Context Fabric maintains deterministic analytical indexes over Git history, the dependency graph and pull request discussions: module ownership, **blast radius analysis** (which modules and services a change touches), expertise maps and change heatmaps. Results are repeatable, the same commit yields the same data, and they are pinned to a SHA and reusable across agent sessions. This is what supports cross-module and cross-repository dependency analysis (a shared library to its consuming service) and data-flow analysis between files and application layers.

{% hint style="info" %}
**Blast radius** is which modules and services a change can affect, computed from the dependency graph rather than guessed. It is what decides how much review a change gets.
{% endhint %}

## Injecting organisational standards

Internal standards and architectural conventions are attached to the knowledge layer as first-class sources (pointed at existing documentation by glob) and cited in agent output by document path, with no model fine-tuning involved.

## Where this sits in Visdom

Context Fabric decides what an agent knows; the Orchestrator decides what it may run; AI Tracing records what it did.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.visdom.virtuslab.com/visdom-context-fabric/context-fabric-in-the-platform.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
