context blueprint
The blueprint command exports your data products as AI Blueprints — self-contained YAML files that capture the complete semantic specification following the Open Semantic Interchange (OSI) v1.0 standard.
An AI Blueprint is the Gold-tier deliverable. It contains every dataset, field, relationship, metric, business rule, guardrail filter, golden query, and glossary term for a data product in a single portable file.
context blueprint [model]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
model | Model name to export (omit for all models) |
Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
--out <path> | Output directory for blueprint files | ./blueprints |
--stdout | Print to stdout instead of writing files | — |
--context-dir <path> | Path to context directory | context/ |
Examples
Section titled “Examples”Export all data products
Section titled “Export all data products”context blueprintWrites one .data-product.osi.yaml file per model to ./blueprints/.
Export a single data product
Section titled “Export a single data product”context blueprint sales-analyticsPrint to stdout (for piping)
Section titled “Print to stdout (for piping)”context blueprint sales-analytics --stdoutCustom output directory
Section titled “Custom output directory”context blueprint --out ./dist/blueprintsWhat’s in an AI Blueprint
Section titled “What’s in an AI Blueprint”# AI Blueprint — Open Semantic Interchange (OSI) v1.0
osi_version: "1.0"
semantic_model: name: sales-analytics description: Revenue and order analytics owner: analytics-team tier: gold trust_status: verified
glossary: - term: Revenue definition: Total completed transaction amount related_fields: - orders.total_amount
datasets: - name: orders description: Customer orders primary_key: [order_id] fields: - name: total_amount semantic_role: measure aggregation: SUM # ... all fields with full metadata
relationships: - name: orders_to_customers from: { dataset: orders, columns: [customer_id] } to: { dataset: customers, columns: [id] } cardinality: many_to_one
metrics: - name: total_revenue expression: SUM(total_amount)
business_rules: - name: completed_orders_only definition: Only include completed orders in revenue calculations applied_always: true
guardrail_filters: - name: exclude_test_orders filter: "status != 'test'" tables: [orders]
golden_queries: - question: "Top customers by revenue last quarter" sql: | SELECT customer_id, SUM(total_amount) ...How to use AI Blueprints
Section titled “How to use AI Blueprints”- Share them — hand a blueprint to any team or tool that needs to understand your data
- Serve via MCP — the
context://data-product/{name}resource exposes blueprints to AI agents - Import them — any OSI-compliant tool can consume the YAML directly
- Version them — commit blueprints to git alongside your code
Next steps
Section titled “Next steps”- Serve blueprints to agents:
context serve - Check what’s missing for Gold:
context tier - Create more data products:
context new