IXBuild, buy, or hybrid — competitive positioning.
Part I
I
The context problem.
Why agentic coding stalls at enterprise scale — and what is actually missing.
Problem · Symptom
A single agent task on a real monorepo can readmillionsof tokens to answer one question.
10×cost vs. compiler-grade context per task
Naive retrieval over raw source code does not scale. Vector search alone cannot resolve symbols, types, or call graphs. The agent guesses; the bill grows; the team loses trust.
Problem · Why today's stack falls short
Three approaches, three failure modes.
01 · Raw retrieval
Embedding search over source files.
No symbol resolution, no type information, no awareness of call graphs. The agent retrieves text that looks related, not code that is related.
02 · Hand-curated prompts
Wikis, AGENTS.md, README pasted in.
Stale within weeks. No tie to the build. No way to verify that conventions described in the prompt match what the compiler enforces.
03 · Whole-repo dumps
Tree of files, no curation.
Token budget collapses. Context window saturates with boilerplate. Signal-to-noise ratio drops below the threshold where the agent can act safely.
All three share a root cause: there is no semantic layer between agents and the code they operate on.
Problem · Definition
Semantic context is what thecompiler knows,made available toagents.
Lexical
Tokens, files, lines.
What grep returns. What embedding search ranks. Useful, but not enough to reason about behavior or invariants.
Semantic
Symbols, types, calls, configs.
What the build resolves. Resolved references, generic instantiations, inheritance graphs, configuration bound at runtime, dependency provenance.
SCL-AD makes the second column queryable, versioned, and policy-bound — without making every agent a compiler.
Problem · Working definition
A reference architecture for a layer that delivers compiler-grade context to agents at scale.
Pillar 01
Precompute
Build symbol, type, and dependency graphs once, refresh on commit. Pay the compiler cost in CI, not per task.
Pillar 02
Target
Deliver only the slice the task needs. A recipe per intent, not a dump per repo.
Pillar 03
Execute
Surface context to agents through stable contracts: static files, MCP tools, or hybrid distribution.
Pillar 04
Coordinate
Govern lifecycle, identity, classification, and audit across recipes, registries, and agents.
Part II
II
Architecture and components.
Four layers, explicit contracts, and the cross-cutting concerns that hold them together.
Architecture · Reference stack
The four layers of a Semantic Context Layer.
Architecture · Components
Inside the layer: store, retrieval, governance.
Architecture · Cross-cutting
Four concerns cut every layer.
Identity
Who is asking.
Identity propagates from agent to recipe to registry to source. RBAC is per recipe and per artifact, not per platform.
Observability
What was used.
Every retrieval emits an OTel span: agent, recipe, artifact version, classification, latency, tokens.
Security
What is allowed.
Classification labels travel with the artifact. Recipes that read regulated data require explicit policy approval.
Lifecycle
When it expires.
Manifest versioning, content hashes, refresh policies, deprecation aliases. Stale context is the silent failure mode.
Architecture · Reference topology
A topology that survives audit.
Per-repository recipe authoring, central registry for distribution, MCP gateway for runtime delivery, with identity and audit threaded through every hop.
Code intelligence in CIRecipes in repoRegistry as a serviceMCP gateway runtimeOTel + audit logSPIFFE identity per agent
Part III
III
Code intelligence layer.
The compiler-grade foundation everything else depends on.
The agent knows which calls cross a module boundary, which generics are bound, which configuration keys are read at runtime, and where each definition lives.
Code intelligence · Required capabilities
Seven capabilities define the layer.
01
Symbol resolution
Each reference points to its unique definition across files and modules.
02
Type resolution
Generics, inferred types, and overloads resolved with full fidelity.
03
Inheritance graph
Classes, interfaces, traits, and their implementers across the workspace.
04
Call graphs
Static and virtual calls, intra- and inter-module, with cardinality.
05
Dependency resolution
Direct, transitive, and provenance for every external package.
06
Configuration mapping
Which keys are read where, with defaults and validation rules.
07
Source ranges
Every fact carries file plus line plus column for round-trip evidence.
All seven
No partial credit.
Missing one capability collapses recipe quality. Plan for all seven from day one.
Code intelligence · Pipeline
From source to a graph an agent can query.
Code intelligence · Per-language
Different languages, same contract.
JVM · .NET
Native compilers + LSP.
Use javac, kotlinc, Roslyn through LSP servers. Mature symbol and type resolution out of the box.
TypeScript · Python
Compiler API + type stubs.
tsc compiler API for TS, Pyright or Pyre for Python. Tree-sitter for fast lexical, then layered type analysis.
Go · Rust
Toolchain-native indexers.
gopls and rust-analyzer expose call graphs and type info via LSP. Both feed the same recipe contract.
Mainframe
COBOL, PL/I.
Specialized parsers (Cobol Programming Tooling, OpenLegacy) plus copybook and JCL resolution.
Polyglot
Cross-language refs.
REST schemas, OpenAPI, gRPC IDL, Avro — resolve calls that cross language boundaries.
Rule
One contract, many engines.
Layer 02 should not know which compiler produced the graph. Hide language-specific tooling behind the recipe API.
Part IV
IV
Context recipes.
Composable, intent-shaped units of context that turn graphs into agent-ready artifacts.
Recipes · Definition
A recipe is acontractbetween intent and context.
Inputs
Source plus graphs.
A recipe consumes Layer 01 artifacts (symbol graph, type info, call graph, dependency tree, configuration map) and project-local conventions.
Outputs
A targeted, versioned artifact.
Markdown, JSON, or structured graph snippet sized for the agent task. Manifest, implementation, and tests, like any code module.
A recipe answers one question well. Six recipes compose. Sixty recipes describe a platform.
Code that turns Layer 01 facts into a targeted artifact. Reproducible, deterministic, free of side effects.
Tests
Golden fixtures.
Snapshot tests over a fixed graph. CI fails if a recipe changes its output without an explicit version bump.
Docs
Intent + sample output.
One paragraph of intent, one example output. Recipe consumers should never have to read the implementation.
Recipes · Authoring
Five rules for recipe authors.
01One question per recipe. If the title needs an "and", split it into two recipes.
02Token budget per output. Declare it in the manifest. Fail the build when exceeded.
03Stable shape. Output schema is part of the contract; breaking changes require a major version.
04No secret leaks. Classification labels propagate from inputs to outputs. Recipes cannot widen scope.
05Provenance always. Every fact in the output cites its source range from Layer 01.
Part V
V
Registry and distribution.
Where recipes live, how they version, how they reach the agent at runtime.
Registry · Responsibilities
A registry is a package manager for context.
Storage
Co-located, central, federated.
Same repository, central object store, or per-domain federation. Pick one and document the trade-offs.
Discovery
By repo, capability, content.
Stable URIs and content addressing. Aliases for "latest stable" track moving versions safely.
Refresh
Commit, schedule, event.
Three triggers cover most needs. Staleness policy declares when a stale artifact must be refused.
Registry · Distribution flow
From a commit to an agent in three hops.
Registry · Versioning + refresh
Content addressing keeps history honest.
Versioning
Hash + manifest + alias.
Each artifact is addressed by its content hash. Manifest carries semantic version. Aliases like "stable" or "preview" track moving heads without breaking pinned consumers.
Refresh
Commit-driven, scheduled, event-driven.
Most recipes refresh on commit. Some run nightly (e.g., dependency advisories). Some are event-driven (new endpoint published, schema changed). Staleness policy decides when stale is unacceptable.
Part VI
VI
Agent integration patterns.
Static, MCP, custom configuration, hybrid — pick the right contract for the agent.
Integration · Patterns
Three patterns, one stack.
Integration · Per-agent reference
Where context lands in each agent.
GitHub Copilot
.github/copilot-instructions.md
Plus repository custom instructions. Static injection is the primary surface; MCP is emerging.
Cursor / Windsurf
.cursor/rules · .windsurfrules
File-based rules with scope. Both editors support MCP servers for richer queries.