ClariLayer Docs

bootstrap

Quickstart

bootstrap

Bulk-ingest your existing SQL, dbt models, and CLAUDE.md notes so your agent is grounded on day one instead of starting from a blank context store.

bootstrap solves the cold-start problem. A fresh ClariLayer context store is empty, so your agent has nothing to recall on its first session. Rather than typing definitions in by hand, you point your agent at the work you already have — your SQL files, your dbt models, an existing CLAUDE.md — and it ingests them in one batch. Day-1 value, not a cold empty store.

ClariLayer never reads your filesystem or your warehouse directly. Your agent reads each artifact locally and passes the content to the bootstrap tool, so you stay in control of exactly what is shared.

What it ingests

bootstrap accepts exactly three source kinds today:

  • sql — a SELECT query. This is the only source kind that is deterministically structured: ClariLayer validates the SQL and extracts a structured shape (tables, joins, group-bys, time grain) so the resulting entry is genuinely queryable context, not just stored text.
  • dbt — a dbt model file. The content is imported and stored as a schema note (raw content plus light metadata). It is not parsed into structure the way SQL is.
  • claude_md — a CLAUDE.md or freeform notes. Imported and stored as a note so your agent can recall it later.

Query-history ingest is on the roadmap; it is not a shipped source kind yet. Do not expect bootstrap to pull from your warehouse's query log today.

How to run it

Ask your agent to bootstrap from a directory or a set of files. A natural prompt:

Bootstrap my ClariLayer context from ./analytics/sql and my dbt models in ./models.

Your agent reads those files and calls bootstrap with their content. The tool is bounded so a single call cannot flood your store: each source is capped (around 50 KB per source), and the whole call is capped (around 200 KB and 200 sources). Oversized sources are reported back, never silently truncated.

What you get back

bootstrap returns a summary of what happened: how many entries were created, updated, and skipped, a breakdown by source type, and any sources it dropped (for example, an oversized file or an unparseable SQL statement). Ingestion is deduped, so re-running bootstrap over the same artifacts updates existing entries rather than creating duplicates.

After a bootstrap, the entries it created are stored with status asserted and provenance that records where they came from (sql_import, dbt, and so on). asserted is the honest baseline — it means "saved, but not yet checked against your data." To raise confidence in a specific entry, run reconcile against it.

Bootstrap, then recall

Once your store has content, your agent can recall it in-flow. The typical first loop is:

  1. bootstrap from your SQL and dbt so the store is not empty.
  2. Ask a question; your agent recalls the relevant definitions and answers from them.
  3. When your agent learns something new or you correct it, remember it so the next session benefits.
  4. When a number looks off, reconcile the definition against your real warehouse result.

Privacy posture

ClariLayer receives only the artifact text your agent chooses to send (your SQL, dbt models, CLAUDE.md); it never connects to your warehouse, holds warehouse credentials, or executes SQL server-side. The sql structuring is a static parse of the query text — ClariLayer reasons about the shape of the query, not live data. This is the same containment posture as every other ClariLayer verb: your agent is the connector, and it sends only the artifact text it chooses to send.

See also

  • Quickstart — install the MCP and mint a context key.
  • recall — pull bootstrapped context back in-flow.
  • Verified vs Asserted — what the asserted status on a bootstrapped entry means.