The policy engine lets you attach business descriptions to tables and columns via a YAML file. These descriptions are merged intoDocumentation Index
Fetch the complete documentation index at: https://isthmus.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
describe_table and discover responses, giving the AI model context about what your data means — not just what types it has.
Enabling the policy engine
Set thePOLICY_FILE environment variable or --policy-file CLI flag to the path of your YAML file:
YAML format
schema.table_name. Descriptions only fill empty comments — Postgres COMMENT ON values always take precedence.
Full example
How enrichment works
Without a policy file,describe_table returns raw schema information:
amount_cents is in cents and in USD — so it knows to divide by 100 when displaying amounts, and not to confuse it with other currencies.
Tips for writing descriptions
- Be specific about units — “Price in cents (USD)” is better than “Price”
- Document enum values — “Status: draft, pending, paid, shipped, delivered, cancelled”
- Explain relationships — “FK to customers.id — the buyer”
- Describe lifecycles — “Lifecycle: draft -> pending -> paid -> shipped -> delivered”
- Clarify ambiguous names — “created_at: Account creation timestamp (UTC)” vs. just “timestamp”
- Think like an AI — what would you need to know to write correct SQL against this table?
Column masking
The policy file also supports per-column masking to protect PII and sensitive data. Add amask directive to any column:
redact, hash, partial, and null. Masking is applied to both query results and describe_table sample rows.
See Column Masking for the full reference — mask types, examples, conflict detection, and best practices.
Validation
The policy file is validated at startup. Isthmus will reject files with:- Empty table keys
- Empty column keys within a table
- Invalid mask values (allowed:
redact,hash,partial,null) - Conflicting masks for the same column name across different tables