This crate implements the following specs from the canonical context-specs repository:
- interfaces/cli_spec.md — Command list, arguments, exit codes, output format
- core/cli/context_resolve.md —
resolvecommand behavior, determinism contract, error categories
- core/context_cache.md — Cache structure, build process, verification
- core/context_selection.md — Selection algorithm, scoring, ordering, budgeting
- core/document_model.md — Document identity, versioning, metadata
- core/mcp/context.resolve.md — Normative output schema (CLI and MCP must match)
- core/mcp/error_schema.md — Error codes (mapped to CLI exit codes)
The CLI is the reference implementation for context resolution. MCP integrations must produce byte-identical output.
| Requirement | Enforcement |
|---|---|
| Determinism | tests/determinism.rs — diff test from spec |
| Exit codes | tests/exit_codes.rs — frozen mapping |
| Output schema | Serializes context-core::SelectionResult directly |
| Error mapping | exit_codes.rs — domain errors → frozen exit codes 2-7 |
build,resolve,inspectcommands implementedservedeferred — MCP server is a standalone binary (mcp-context-server)ingestremoved — ingestion is part ofbuild