@@ -65,7 +65,7 @@ context, find semantic-layer entities, compile trusted semantic queries, run
read-only SQL, and use the same tools through MCP.
- Generate SQL from approved metrics, joins, filters, and dimensions.
-- Explain metric provenance with wiki context and source evidence.
+- Explain metric provenance with wiki content and source evidence.
- Repair context through reviewable YAML and Markdown diffs.
- Work alongside dbt, MetricFlow, LookML, Looker, Metabase, Notion, and
supported databases.
diff --git a/docs-site/content/docs/getting-started/quickstart.mdx b/docs-site/content/docs/getting-started/quickstart.mdx
index 14fe476f..e43dbf29 100644
--- a/docs-site/content/docs/getting-started/quickstart.mdx
+++ b/docs-site/content/docs/getting-started/quickstart.mdx
@@ -117,7 +117,7 @@ The wizard walks you through everything KTX needs in one pass:
SQLite, PostgreSQL, MySQL, SQL Server, BigQuery, and Snowflake.
5. **Context sources** - optionally adds dbt, MetricFlow, LookML, Looker,
Metabase, or Notion. You can skip and add them later.
-6. **Build** - runs the first ingest so semantic-layer sources and wiki pages
+6. **Build** - runs the first ingest so semantic sources and wiki pages
are ready for agents.
7. **Agent integration** - installs project-local rules for Claude Code,
Codex, Cursor, OpenCode, or universal `.agents`.
@@ -204,7 +204,7 @@ KTX writes plain files so people and agents can review changes in git.
|------|---------|
| `ktx.yaml` | Project configuration |
| `.ktx/secrets/*` | Local secret files referenced from `ktx.yaml` - do not commit |
-| `semantic-layer//*.yaml` | Semantic sources for SQL generation |
+| `semantic-layer//*.yaml` | Semantic sources for SQL compilation |
| `wiki/global/*.md` | Shared business context and metric definitions |
| `.claude/skills/ktx/`, `.agents/skills/ktx/`, `.cursor/rules/ktx.mdc`, `.opencode/commands/ktx.md` | Installed agent rules |
diff --git a/docs-site/content/docs/guides/building-context.mdx b/docs-site/content/docs/guides/building-context.mdx
index b1d5ed36..506fd31f 100644
--- a/docs-site/content/docs/guides/building-context.mdx
+++ b/docs-site/content/docs/guides/building-context.mdx
@@ -1,10 +1,10 @@
---
title: Building Context
-description: Build and refresh KTX context from databases, source tools, query history, and text.
+description: Build and refresh KTX context from databases, context sources, query history, and text.
---
Build context after `ktx setup` creates `ktx.yaml` and at least one database or
-context-source connection. KTX writes local semantic-layer sources and wiki
+context-source connection. KTX writes local semantic sources and wiki
pages for agents to use before writing SQL.
## The build loop
@@ -38,8 +38,8 @@ Depth controls how much context KTX builds:
| Flag | Best for | What it does |
|------|----------|--------------|
-| `--fast` | First setup, quick refreshes, CI smoke checks | Deterministic schema ingest with tables, columns, types, constraints, and row counts |
-| `--deep` | Agent-ready context for real analysis | Fast ingest plus AI-enriched descriptions, embeddings, relationship evidence, and optional query history |
+| `--fast` | First setup, quick refreshes, CI smoke checks | Deterministic fast ingest with tables, columns, types, constraints, and row counts |
+| `--deep` | Agent-ready context for real analysis | Fast ingest plus deep enrichment with descriptions, embeddings, relationship evidence, and optional query history |
Examples:
@@ -83,10 +83,10 @@ Context-source connections pull metadata from dbt, BI tools, Notion, and other
configured systems. Pass one connection id or `--all`.
```bash
-# Build one source connection
+# Build one context-source connection
ktx ingest dbt_main
-# Build every configured database and source connection
+# Build every configured database and context-source connection
ktx ingest --all
```
@@ -101,8 +101,8 @@ Supported source types:
| `metabase` | Metabase API | Questions, dashboards, table metadata, and mappings |
| `notion` | Notion API | Wiki pages and business knowledge |
-Source ingest writes semantic-layer YAML and wiki Markdown, merging with local
-edits.
+Context-source ingest writes semantic source YAML and wiki Markdown, reconciling
+with local edits.
## Text ingest
@@ -131,7 +131,7 @@ Useful flags:
| `--json` | Print structured output |
| `--fail-fast` | Stop after the first failed text/file item |
-Use text ingest for small, high-signal documents. Prefer configured source
+Use text ingest for small, high-signal documents. Prefer configured context-source
ingest for Notion, dbt, Metabase, and similar systems.
## Output and artifacts
@@ -146,8 +146,8 @@ Typical generated files:
| Path | Created by | Purpose |
|------|------------|---------|
-| `semantic-layer//*.yaml` | Database and source ingest | Queryable semantic source definitions |
-| `wiki/global/*.md` | Source, text, and memory ingest | Shared business definitions and notes |
+| `semantic-layer//*.yaml` | Database and context-source ingest | Queryable semantic source definitions |
+| `wiki/global/*.md` | Context-source, text, and memory ingest | Shared business definitions and notes |
| `wiki/user//*.md` | Text and memory ingest | User-scoped context |
| `.ktx/setup/context-build.json` | Setup context build | Resume and readiness state for setup |
@@ -177,7 +177,7 @@ ktx wiki "revenue" --json --limit 10
|---------|--------------|----------|
| Connection not configured | The connection id is missing from `ktx.yaml` | Add it with `ktx setup` |
| Deep readiness is missing | LLM or embeddings are not setup-ready | Run `ktx setup`, or rerun with `--fast` |
-| Query history is unsupported | The selected database driver does not expose query history | Run schema ingest without query-history flags |
-| No connections configured | The project has no entries under `connections` | Run `ktx setup` and add a database or source connection |
-| Source flags have no effect | Depth and query-history flags were supplied for a source connector | Use those flags only for database connections |
+| Query history is unsupported | The selected database driver does not expose query history | Run fast ingest without query-history flags |
+| No connections configured | The project has no entries under `connections` | Run `ktx setup` and add a database or context-source connection |
+| Context-source flags have no effect | Depth and query-history flags were supplied for a context-source connector | Use those flags only for database connections |
| Text ingest stops early | `--fail-fast` stopped on the first failed item | Fix the item or rerun without `--fail-fast` |
diff --git a/docs-site/content/docs/guides/serving-agents.mdx b/docs-site/content/docs/guides/serving-agents.mdx
index df6eba2a..c7cc5e39 100644
--- a/docs-site/content/docs/guides/serving-agents.mdx
+++ b/docs-site/content/docs/guides/serving-agents.mdx
@@ -103,7 +103,7 @@ ktx wiki --json
ktx wiki "revenue recognition" --json --limit 10
```
-Search wiki context for business definitions, metric caveats, process rules, and
+Search the wiki for business definitions, metric caveats, process rules, and
non-obvious terms.
### Context refresh
diff --git a/docs-site/content/docs/guides/writing-context.mdx b/docs-site/content/docs/guides/writing-context.mdx
index 066c4dea..e4ac70c0 100644
--- a/docs-site/content/docs/guides/writing-context.mdx
+++ b/docs-site/content/docs/guides/writing-context.mdx
@@ -44,7 +44,7 @@ Use this order for most context changes:
Semantic sources are YAML files for queryable tables or custom SQL. They define
agent-facing measures, dimensions, segments, joins, and grain.
-Source files live at:
+Semantic source files live at:
```text
semantic-layer//.yaml
@@ -259,7 +259,7 @@ ktx sl query \
## Wiki pages
-Wiki pages hold context that does not belong in one source file: policies,
+Wiki pages hold context that does not belong in one semantic source: policies,
caveats, vocabulary, freshness, known issues, and source-of-truth notes.
Wiki files live under:
diff --git a/docs-site/content/docs/integrations/agent-clients.mdx b/docs-site/content/docs/integrations/agent-clients.mdx
index 9f1ad659..9269c4a3 100644
--- a/docs-site/content/docs/integrations/agent-clients.mdx
+++ b/docs-site/content/docs/integrations/agent-clients.mdx
@@ -282,10 +282,10 @@ Admin CLI skills call the same KTX CLI commands:
|---------|-------------|
| `ktx status --json` | Return project setup and context readiness |
| `ktx wiki --json` | Search wiki pages |
-| `ktx sl --json` | List semantic-layer sources |
-| `ktx sl --json` | Search semantic-layer sources |
+| `ktx sl --json` | List semantic sources |
+| `ktx sl --json` | Search semantic sources |
| `ktx sl validate --connection-id ` | Validate semantic source definitions |
-| `ktx sl query --format json` | Execute a Semantic Query when semantic compute is configured |
+| `ktx sl query --format json` | Execute a semantic query when semantic compute is configured |
### Security constraints
diff --git a/docs-site/content/docs/integrations/context-sources.mdx b/docs-site/content/docs/integrations/context-sources.mdx
index 15137056..4bcd5373 100644
--- a/docs-site/content/docs/integrations/context-sources.mdx
+++ b/docs-site/content/docs/integrations/context-sources.mdx
@@ -3,7 +3,7 @@ title: Context Sources
description: Ingest semantic context from dbt, MetricFlow, LookML, Metabase, Looker, and Notion.
---
-Context sources feed your existing analytics tooling into KTX. During ingestion, KTX extracts metadata from each source and uses an LLM agent to reconcile it with your existing semantic layer and knowledge base - merging intelligently rather than overwriting.
+Context sources feed your existing analytics tooling into KTX. During ingestion, KTX extracts metadata from each source and uses a reconciliation agent to reconcile it with your existing semantic layer and knowledge base - preserving accepted edits rather than overwriting.
All context sources are configured in `ktx.yaml` under `connections` with their respective `driver` value.
@@ -27,7 +27,7 @@ LookML uses top-level `repoUrl`, and MetricFlow uses nested
| Field | Required | Description |
|-------|----------|-------------|
-| `driver` | Yes | Source adapter: `dbt`, `metricflow`, `lookml`, `metabase`, `looker`, or `notion` |
+| `driver` | Yes | Source connector: `dbt`, `metricflow`, `lookml`, `metabase`, `looker`, or `notion` |
| `source_dir` | For local file sources | Absolute or project-relative source directory |
| `repo_url` | For Git-hosted dbt sources | Git repository URL |
| `repoUrl` | For Git-hosted LookML sources | Git repository URL |
@@ -88,7 +88,7 @@ connections:
### What gets ingested
- YAML semantic sources generated from dbt schema files
-- One work unit per model file (for projects with >25 YAML files) or all at once for smaller projects
+- One work unit per semantic source (for projects with >25 YAML files) or all at once for smaller projects
- Column descriptions, tests, and relationships are preserved
---
@@ -316,7 +316,7 @@ Ingests pages and databases from a Notion workspace as wiki pages. Useful for ca
- Wiki pages synthesized from Notion content
- Page hierarchy and relationships
-- Database schemas (when Notion databases describe data sources)
+- Database schemas (when Notion databases describe primary sources)
- Semantic clustering for organized ingestion
### Connection config
@@ -378,7 +378,7 @@ Create an integration at [notion.so/my-integrations](https://www.notion.so/my-in
| Error or symptom | Likely cause | Recovery |
|------------------|--------------|----------|
-| Adapter cannot read source files | `source_dir`, `repo_url`, `repoUrl`, `metricflow.repoUrl`, `branch`, or `path` is wrong | Verify the path locally or clone the repo manually with the same credentials |
+| Connector cannot read source files | `source_dir`, `repo_url`, `repoUrl`, `metricflow.repoUrl`, `branch`, or `path` is wrong | Verify the path locally or clone the repo manually with the same credentials |
| Private repo/API authentication fails | Token env var or secret file is missing | Export the env var or update `auth_token_ref` to a readable file |
| Ingest creates duplicate context | Existing source names or wiki pages do not match imported terminology | Review the diff, rename duplicates, and add wiki pages with canonical names |
| Notion ingest skips pages | Integration lacks access or root ids are missing | Share pages with the Notion integration and set `root_page_ids` or use `all_accessible` carefully |
diff --git a/docs-site/content/docs/integrations/primary-sources.mdx b/docs-site/content/docs/integrations/primary-sources.mdx
index 28ff4559..5c5abd51 100644
--- a/docs-site/content/docs/integrations/primary-sources.mdx
+++ b/docs-site/content/docs/integrations/primary-sources.mdx
@@ -109,7 +109,7 @@ This helps KTX understand how your team actually queries the data.
### Dialect notes
-- SQL generation uses `LIMIT/OFFSET` pagination
+- SQL compilation uses `LIMIT/OFFSET` pagination
- Named parameters converted to positional (`$1`, `$2`, ...)
- Supports `COUNT(*) FILTER (WHERE ...)` for null analysis
- Full support for PostgreSQL types: `uuid`, `jsonb`, `timestamptz`, `numeric`, `text[]`, etc.
@@ -458,4 +458,4 @@ No authentication required - SQLite is file-based. The file must be readable by
| Database ingest returns no tables | Schema, database, or project filter is wrong, or the user lacks metadata permissions | Verify the schema list and grant metadata read permissions |
| Query history is empty | Query history extension or warehouse history view is unavailable | Enable the warehouse-specific history feature, then rerun `ktx ingest --query-history` or `ktx setup` |
| Column statistics are missing | Connector cannot access stats tables or the warehouse does not expose them | Grant stats permissions where supported; otherwise rely on fast schema context |
-| Semantic Query execution fails | Connection is missing, unreachable, or query execution is disabled | Run `ktx connection test ` and check the `ktx sl query` flags |
+| Semantic query execution fails | Connection is missing, unreachable, or query execution is disabled | Run `ktx connection test ` and check the `ktx sl query` flags |
diff --git a/docs-site/lib/llm-docs.ts b/docs-site/lib/llm-docs.ts
index f821ca30..d0aaa2ef 100644
--- a/docs-site/lib/llm-docs.ts
+++ b/docs-site/lib/llm-docs.ts
@@ -46,7 +46,7 @@ export function buildLlmsTxt() {
return `# KTX
-> Agent-native context layer for analytics engineering and database agents.
+> Agent-native context layer for analytics engineering and data agents.
KTX provides semantic-layer files, warehouse scans, wiki pages, provenance, and agent-facing tools that help coding agents answer analytics questions without inventing metrics or joins.
diff --git a/docs-site/next-env.d.ts b/docs-site/next-env.d.ts
index c4b7818f..9edff1c7 100644
--- a/docs-site/next-env.d.ts
+++ b/docs-site/next-env.d.ts
@@ -1,6 +1,6 @@
///
///
-import "./.next/dev/types/routes.d.ts";
+import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/docs-site/public/images/ingestion-flow-transparent.svg b/docs-site/public/images/ingestion-flow-transparent.svg
index 3eebd91e..ed36cc0f 100644
--- a/docs-site/public/images/ingestion-flow-transparent.svg
+++ b/docs-site/public/images/ingestion-flow-transparent.svg
@@ -1,6 +1,6 @@