Concepts
The Context Layer
How ClariLayer bootstraps five source kinds and reconciles explicit warehouse and HubSpot evidence adapters in-flow over MCP.
ClariLayer is a personal context layer for your AI coding agent, delivered over MCP. Your warehouse computes the data. Your agent writes the queries. The context layer is the part in between that your agent keeps getting wrong session after session: which table is the right one, how two tables actually join, that refunds live in a separate table, that amount is in cents, that "active customer" excludes test workspaces. That is the context you find yourself re-explaining every time you open a new chat.
The pitch is simple: stop re-explaining your data to your AI every session. Connect ClariLayer once, and your agent can recall your real working context instead of guessing — so it stops making the same data mistakes.
Why a hand-typed CLAUDE.md is not enough
The obvious fix is to write your project facts into a CLAUDE.md and call it done. That helps, but it has a trust problem: a CLAUDE.md full of claimed definitions has the same trust property as the original numbers — it is just asserted text. Nothing checks that the definition you wrote down still matches what your warehouse actually returns. When a number looks off, the CLAUDE.md cannot tell you whether it is the SQL or the definition that drifted.
ClariLayer is different in three ways that matter:
- It bootstraps from the work you already have, so you do not start from a blank page.
- It reconciles compatible stored SQL definitions and HubSpot CRM contracts through explicit evidence adapters, so supported context is checked, not blindly asserted.
- It rides in-flow inside the agent you already use, so it is not a destination you have to remember to visit.
Bootstrap, don't blank-slate
You point your agent at existing SQL, dbt models, CLAUDE.md notes, a data dictionary / codebook, or semantic-layer models, and it bootstraps your real working context. Those are the five supported source kinds. SQL is validated and deterministically structured; dictionaries and semantic models arrive as agent-normalized structured rows or models; dbt and notes are stored for recall. You get day-1 value instead of an empty store you have to fill by hand. See bootstrap for the source kinds and limits.
Reconciled, not blindly asserted
This is the differentiator. ClariLayer has two live reconcile adapters. For a compatible stored SQL definition, your agent runs the query with its own warehouse access and sends actual_sample result-shape evidence. For a HubSpot CRM contract, it collects bounded property metadata and distributions and sends row-free crm_evidence. ClariLayer compares what the definition declared with that supported evidence, and a mismatch surfaces as a caveat.
In the personal MCP reconcile path, ClariLayer does not receive your source credentials or execute SQL server-side, and it never calls HubSpot — your agent is the connector. The separately gated team connector surface uses only explicitly configured connectors under its own controls. Warehouse actual_sample may include an optional bounded preview with real values, so omit or redact it when result columns and row count are enough. HubSpot crm_evidence is row-free by contract: it contains declared property metadata and aggregate value distributions, never CRM records. Reconcile records a caveat on mismatch or leaves the entry asserted. The stronger verified status remains gated and is not part of the live public result contract. The honest claim is "reconciled and caveat-aware," and Verified vs Asserted explains exactly why.
In-flow, via MCP
ClariLayer lives inside the agent you already use. Claude Code, Cursor, and Codex connect to the production MCP server with a local context key; claude.ai connects to the same service as a custom Connector over OAuth. From then on your agent has an in-flow recall tool (get_analysis_context) it can call to pull the right context mid-task — you never leave your flow. Recall is a tool your agent decides to call. For the local clients, you make it the default by adding the managed project rule that tells the agent to recall ClariLayer context before answering.
It compounds
Every correction you make, every reconcile, every new note quietly persists. Your agent grounds on more of your context over time, so it gets progressively more right about your data — the "Claude Code finally understands my project" feeling. The context you build is yours, it travels across claude.ai, Claude Code, Cursor, and Codex, and when your team is ready, the Governed Context Edge promotes it into a shared, governed team canon.
For teams
The personal context you build is the foundation for the team story — and that team layer exists today: the Governed Context Edge — org canon, Diff-to-team, adjudication. It is in a hand-run private pilot; request access on the For teams page. Your personal layer stays free either way.
See also
- Quickstart — install the MCP and connect your agent.
- AI Agent Context Guide — the recall-first working loop.
- Verified vs Asserted — what "checked" honestly means.