Methodology

How ClariLayer approaches the context layer

Anthropic and OpenAI both published how they make data agents accurate inside their own walls, and both landed on the same bottleneck: context, not SQL generation. ClariLayer is that idea, productized as an individual-analyst context layer (MCP-delivered) — no data team required.

Both posts describe the same architecture from different angles: accuracy comes from giving the agent structured, checked, maintained context — not from a better SQL generator and not from dumping more documents into retrieval. Both also describe an internal machine: canonical datasets, curated annotations, eval suites, and engineers to keep it all fresh.

ClariLayer starts from the analyst those posts do not serve: one person in Claude Code, Cursor, or Codex, working against their own — often messy, ungoverned — warehouse data, with no platform team to build the machine for them. This page lays out the principles we build by, so you can judge the approach before you install anything.

The failure we build against

An agent can have the right context served and still not use it. Anthropic reported a sharp ablation: giving the agent raw retrieval access to thousands of prior queries moved accuracy by less than a point. The information was available, but unstructured retrieval still could not map a new question to the right precedent. The bottleneck was structure, not access.

Our own agent tests reproduced the same failure at individual-analyst scale: the right definition retrieved, then a filter invented that was never in it, an aggregate computed at the wrong grain, a stale note preferred over a checked contract. Serving context is table stakes. The work — and everything below — is about making the checked contract the thing the agent actually uses.

Six principles

What we build by.

Each one is a response to a failure we have actually watched an agent make. Together they are the difference between a notes file your agent might read and a context layer it can be held to.

Recall-first proactivity

ClariLayer gives the connected agent standing instructions to recall saved context before writing SQL. The agent has an in-flow MCP tool it can call without you pasting a prompt each session; you maintain durable context, not a magic prompt.

Structured contracts over prose

A metric definition here is data, not a paragraph: source table, grain, filters, expected columns. Structure is what makes a contract checkable — and routable, so the agent can be handed the one checked contract instead of maybe-reading a wall of notes.

Reconciled, not blindly asserted

Saved context is checked against your real warehouse: your agent runs the SQL with its own access and reports the result shape back, and a declared-vs-actual mismatch surfaces as a caveat. Nothing is silently trusted — including what you typed in yourself.

Honest labels over silent confidence

When the best match comes from a different use case, it is labeled as such rather than passed off as a clean hit. When a question is ambiguous, the candidate scopes are named instead of one being guessed. Caveats ride with the contract, so the agent knows what to treat with care.

Humans gate change

When a standing rule conflicts with a checked contract, the agent surfaces the conflict and proposes an update for your review. It never silently rewrites canon — and never silently drops your rule. You stay the editor of record for your own context.

Routing is regression-tested

When the agent reaches for the wrong context, we use that failure to harden the routing behavior before it ships again.

Where it sits

Beside your agent — never between you and your warehouse

Recall, routing, and labels travel over MCP. Reconcile is analyst-run: your agent queries the warehouse with its own access and sends back the result shape. ClariLayer never holds your warehouse credentials and never runs SQL on our servers. The full data-flow, including what we will not pretend about preview rows, is on the security page.

What we deliberately don’t claim

Today, reconcile emits exactly two statuses: caveat when declared and actual mismatch, and asserted otherwise. There is no present-tense “verified” badge anywhere in the product — or on this site.

The reason is the methodology itself. Backing a verified stamp honestly requires a sound reading of what a query declares, and a heuristic reading of SQL cannot be made sound against the long tail of dialect edge cases. A single false “verified” is the one failure a trust product cannot ship — so the stronger stamp stays off until a real SQL parser replaces the heuristic, the documented fast-follow. A trust product earns trust by what it refuses to claim.

Stop re-explaining your data to your AI every session.

Connect ClariLayer to Claude Code, Cursor, or Codex. Bootstrap from the SQL you already have, reconcile the definitions that matter, and let your agent recall the checked contract in-flow.