cmp-validate
v0.1.0
Published
Validate Cognitive Model Protocol (CMP) documents and hunchful.refinement payloads — the conformance checker for the CMP spec.
Maintainers
Readme
cmp-validate
Conformance checker for the Cognitive Model Protocol (CMP) — an open protocol for explicit, evidence-based, uncertainty-aware, revisable collaboration models between humans and AI.
# validate a CMP document (file or URL) against the official JSON Schema
npx cmp-validate https://hunchful.io/m/<id>/cmp.json
npx cmp-validate ./my-model.json
# validate a hunchful.refinement payload (the pointers-only write contract)
npx cmp-validate --refinement ./refinement.json
# machine-readable output / custom schema
npx cmp-validate --json ./my-model.json
npx cmp-validate --schema ./cmp.schema.json ./my-model.jsonExit codes: 0 valid · 1 invalid · 2 usage or I/O error.
What it checks
- CMP documents — validated against the vendored copy of the spec's
cmp.schema.json(JSON Schema 2020-12). Override with--schemato test against a newer draft. hunchful.refinementpayloads — structural checks for the pointers-only refinement contract: envelope shape, direction enum, source format (self_stated/agent:<name>), and rejection of any extra field — no transcripts, quotes, or free text ever.
Pattern-membership (is this patternId actually on the target model?) requires
the model's own cmp.json (contribution.patternIds); the CLI checks structure
and formats, the server enforces membership.
Part of the CMP toolchain
- Spec, schema, examples: cognitive-model-protocol
- Reference deployment: hunchful.io
- MCP connector:
hunchful-mcp
