canonic.yaml is validated against CanonicConfig at load time. Unknown top-level fields are ignored rather than rejected. Only version and project are required: everything else defaults.
Top-level fields
| Field | Type | Default | Governs |
|---|---|---|---|
version | int | n/a (required) | Config schema version; currently only 1 is recognized. |
project | ProjectConfig | n/a (required) | Project name and optional default_connection. |
connections | list[Connection] | [] | Configured data sources; see Connectors. |
llm | LLMConfig | null | null | LLM provider config; see Configuring an LLM. |
embeddings | EmbeddingConfig | model: all-MiniLM-L6-v2 | Local embedding model for knowledge vector search. |
telemetry | TelemetryConfig | enabled: false | Opt-in telemetry flag; see Instrumentation & evaluation. |
reconcile | ReconcileConfig | propose-only | Auto-apply policy for ingestion; see Ingestion & reconciliation. |
runtime | RuntimeConfig | air_gapped: false | Air-gapped enforcement; see LLM & embeddings runtime. |
logging | LoggingConfig | level: WARNING, format: text | Log level, optional file, and text/json format. |
connections[]
credentials_ref(andllm.api_key_ref) must be a reference, one ofenv:,keyring:, orfile:, never a literal secret; config validation rejects a literal outright.- Postgres/Redshift connections additionally recognize
schema/schemas(search path) andtables(glob patterns narrowing introspection), plusfetch_column_stats: trueto merge zero-scan cardinality/null-ratio stats into the returned schema (a no-op on SQLite/DuckDB).
llm
openai_compatible requires base_url; openai/anthropic require api_key_ref; github_copilot forbids one (device-code auth, outside canonic.yaml).
reconcile
runtime
air_gapped: true, load-time validation additionally rejects: a public llm.base_url, telemetry.enabled: true, and any credentials_ref/api_key_ref using a non-local scheme.
Reserved directories
Independent ofcanonic.yaml fields, every project scaffolds four committed context directories (semantics/, knowledge/, contracts/, raw-sources/) plus a git-ignored .canonic/ local-state directory (created with 0o700 permissions).