context build & context tier
The build command compiles all context files (.osi.yaml, .governance.yaml, etc.) into a single contextkit-manifest.json that MCP servers and other tools consume.
context buildOptions
Section titled “Options”| Option | Description | Default |
|---|---|---|
--context-dir <path> | Path to context files | ./context |
--output-dir <path> | Path to output directory | ./dist |
--format <type> | Output format: pretty, json | pretty |
Examples
Section titled “Examples”# Build with defaultscontext build
# Custom output directorycontext build --output-dir dist
# JSON format for CIcontext build --format jsonOutput
Section titled “Output”The manifest contains all models, columns, relationships, and metadata in a single structured file:
{ "version": "1.0", "generated_at": "2025-01-15T10:30:00Z", "sources": { "myapp": { "models": [ { "name": "users", "schema": "public", "description": "Registered user accounts.", "columns": [ ... ], "relationships": [ ... ] } ] } }}The tier command evaluates your context files and displays an OSI tier scorecard.
context tierOptions
Section titled “Options”| Option | Description | Default |
|---|---|---|
--context-dir <path> | Path to context files | ./context |
--format <type> | Output format: pretty, json | pretty |
Example output
Section titled “Example output”OSI Tier Scorecard==================
Source: myapp (23 models)
Overall Tier: Silver
Bronze (required) 23/23 ✓ Schema introspected 23/23 Primary keys defined 23/23 Column types present 23/23
Silver (required) 21/23 ✗ Descriptions 21/23 ← 2 models missing Semantic types 19/23 Relationships 23/23
Gold (optional) 8/23 Business logic 8/23 PII classification 12/23 Usage examples 5/23
To reach Silver: add descriptions to orders_archive, tmp_importsRun 'context enrich --target silver' for suggestions.Tier definitions
Section titled “Tier definitions”| Tier | Requirements |
|---|---|
| Bronze | Schema structure: table names, column names and types, primary keys |
| Silver | Bronze + descriptions, semantic types, relationship documentation |
| Gold | Silver + business logic, data classification, usage examples, quality rules |
CI usage
Section titled “CI usage”# Fail CI if not at Silver tiercontext tier --format json | jq -e '.overall_tier == "silver" or .overall_tier == "gold"'Next steps
Section titled “Next steps”- Serve the manifest with
context serve - Generate documentation with
context site