# ktx - Doramagic AI Context Pack

> Purpose: pre-work context for the user's host AI. This pack does not prove that the project has been installed, run, or validated.

## Project

- canonical_name: `Kaelio/ktx`
- capability: ktx is an executable context layer for data and analytics agents 🐙 Allow Claude Code, Codex, or other AI agents to query analytical databases accurately and with full context of your company
- expected_user_outcome: ktx is an executable context layer for data and analytics agents 🐙 Allow Claude Code, Codex, or other AI agents to query analytical databases accurately and with full context of your company

## Operating Boundaries

- Do not claim that the project has been installed, run, called through an API, or used on local files unless separate evidence proves it.
- Project facts must come from repo evidence, Claim Graph, or explicit source references.
- When a capability is not verified, mark it as unverified instead of completing it as fact.
- publish_status: `publishable`
- blocking_gaps: none

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Overview & System Architecture**: importance `high`
  - source_paths: README.md, package.json, pnpm-workspace.yaml, pyproject.toml, packages/cli/src/context/project/project.ts
- **Database Connectors & Context Source Adapters**: importance `high`
  - source_paths: packages/cli/src/connectors/postgres/connector.ts, packages/cli/src/connectors/snowflake/connector.ts, packages/cli/src/connectors/bigquery/connector.ts, packages/cli/src/connectors/clickhouse/connector.ts, packages/cli/src/connectors/mysql/connector.ts
- **Semantic Layer, Wiki & Hybrid Search (Context Engine)**: importance `high`
  - source_paths: packages/cli/src/context/sl/semantic-layer.service.ts, packages/cli/src/context/sl/sl-search.service.ts, packages/cli/src/context/sl/schemas.ts, packages/cli/src/context/sl/local-sl.ts, packages/cli/src/context/wiki/knowledge-wiki.service.ts
- **Agent Integration — CLI, MCP Server & LLM Runtime**: importance `high`
  - source_paths: packages/cli/src/cli-program.ts, packages/cli/src/bin.ts, packages/cli/src/commands/setup-commands.ts, packages/cli/src/commands/status-commands.ts, packages/cli/src/commands/ingest-commands.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `89f25435d5c3ddfe650b6d8b39c3ae4c472cb0dd`
- inspected_files: `README.md`, `package.json`, `pnpm-lock.yaml`, `pyproject.toml`, `uv.lock`, `docs/code-design.md`, `docs/release.md`, `docs/terminology.md`, `examples/README.md`, `examples/local-warehouse/README.md`, `examples/local-warehouse/ktx.yaml`, `examples/local-warehouse/semantic-layer/warehouse/orders.yaml`, `examples/local-warehouse/source/orders/orders.json`, `examples/local-warehouse/wiki/global/revenue.md`, `examples/orbit-relationship-verification/README.md`, `examples/orbit-relationship-verification/ktx.yaml`, `examples/package-artifacts/README.md`, `examples/postgres-historic/README.md`, `examples/postgres-historic/docker-compose.yml`, `packages/cli/assets/demo/orbit/links/provenance.json`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Configuration risk requires verification

- Trigger: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/Kaelio/ktx/issues/305
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: Add Sigma context source
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Add Sigma context source. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: Add Sigma context source
- Evidence: failure_mode_cluster:github_issue | https://github.com/Kaelio/ktx/issues/168
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/Kaelio/ktx/issues/161
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Security or permission risk requires verification

- Trigger: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/Kaelio/ktx/issues/169
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Security or permission risk requires verification

- Trigger: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/Kaelio/ktx/issues/168
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v0.12.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.12.0. Context: Observed when using python
- Why it matters: Upgrade or migration may change expected behavior: v0.12.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Kaelio/ktx/releases/tag/v0.12.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v0.13.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.13.0. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: v0.13.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Kaelio/ktx/releases/tag/v0.13.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v0.6.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.6.0. Context: Observed when using node, windows
- Why it matters: Upgrade or migration may change expected behavior: v0.6.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Kaelio/ktx/releases/tag/v0.6.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 9: Configuration risk requires verification

- Trigger: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.host_targets | https://github.com/Kaelio/ktx
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 10: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: Add Amazon Redshift connector
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Add Amazon Redshift connector. Context: Observed during installation or first-run setup.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: Add Amazon Redshift connector
- Evidence: failure_mode_cluster:github_issue | https://github.com/Kaelio/ktx/issues/161
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
