Skip to content

CK.ComplianceCheck -- Fleet Validator

CK.ComplianceCheck is the platform kernel that validates the entire fleet against the CKP specification. It runs 13 check types as BFO-typed IdentityCheck occurrents.

Check Types

Check TypeBFO BasisWhat It Validates
identityBFO:0000040apiVersion: conceptkernel/v3, is_a, kind, metadata, namespace_prefix, domain, project fields
awakeningCKPAll 8 awakening files present: yaml, README.md, CLAUDE.md, SKILL.md, CHANGELOG.md, ontology.yaml, rules.shacl, serving.json
structureBFO:0000040Directory layout -- llm/, tool/, web/, storage/ present
typesBFO:0000019qualities.type, governance_mode, deployment_state declared
edgesBFO:0000015Target exists, predicate valid (COMPOSES/EXTENDS/TRIGGERS/LOOPS_WITH/PRODUCES), no duplicates
toolBFO:0000015processor.py exists, valid syntax, entrypoint declared
webBFO:0000040index.html present if serve=true, no broken refs
grantsBFO:0000023grants block present with identity + actions declared
integrityBFO:0000144Files non-empty, YAML parses, no stale/deprecated fields
llmBFO:0000017CLAUDE.md at OPS root (not in llm/), SKILL.md sections valid, kernel name refs correct
versionsBFO:0000008metadata.version is valid semver, serving.json present and parses
natsBFO:0000015spec.nats with input/result/event topics declared
mutation_frequencyBFO:0000144Git commit count per file matches expected band for its type (v3.3)

Compliance Check Output

$ ckp compliance
  Running CK.ComplianceCheck against fleet...
  check.identity            N/N  PASS
  check.awakening           N/N  PASS  (8 required files)
  check.structure           N/N  PASS
  check.types               N/N  PASS
  check.edges               N/N  PASS
  check.tool                N/N  PASS
  check.web                 N/N  PASS
  check.grants              N/N  PASS
  check.integrity           N/N  PASS
  check.llm                 N/N  PASS  (CLAUDE.md at root, not llm/)
  check.versions            N/N  PASS
  check.nats                N/N  PASS
  check.mutation_frequency  N/N  PASS  (v3.3 -- commit bands match policy)
  ---------------------------------------------------------------
  ALL PASS  |  0 warns  |  0 fails  |  full v3.3 compliance

SHACL in the Protocol

SHACL plays three roles in CKP:

1. Tool-to-Storage Contract

The tool's only obligation toward the DATA loop is to write a conforming instance into storage/. The instance must conform to the CK's rules.shacl before the write is accepted:

json
{
  "instance_id":   "<short-tx>",
  "kernel_class":  "Finance.Employee",
  "kernel_id":     "7f3e-a1b2-c3d4-e5f6",
  "tool_ref":      "refs/heads/stable",
  "ck_ref":        "refs/heads/stable",
  "created_at":    "2026-03-14T10:00:00Z",
  "data": {}
}

2. Awakening Sequence

rules.shacl is the 7th file in the awakening sequence -- read after ontology.yaml and before serving.json. It defines the validation rules that instances must conform to.

3. SHACL Reactive Rules (v3.4)

Future Enhancement

v3.4 extends the compliance engine to execute SHACL Advanced Rules as part of governance: when conditions match in the knowledge graph, the compliance engine can materialise new triples and trigger governance actions (e.g., escalate overdue tasks, promote trust trajectories). Currently rules.shacl files are permissive stubs -- as kernels mature they accumulate domain-specific reactive rules.

Mutation Frequency Check (v3.3)

Git commit frequency maps predictably to loop membership. The check.mutation_frequency check cross-references commit counts against expected bands:

bash
# Commit count for a single file:
git log --follow --oneline -- storage/i-task-{id}/data.json | wc -l

# All files ranked by update frequency:
git log --name-only --format='' | sort | uniq -c | sort -rn
Frequency BandFilesExpectedIf Violated
Highstorage/ledger.json, storage/llm/context.jsonlAppend-only logsExpected
MediumCLAUDE.md, SKILL.md, CHANGELOG.mdIdentity evolves graduallyExpected
Lowconceptkernel.yaml, ontology.yaml, rules.shaclStable foundationFlag if >20 commits
Near-zerostorage/i-*/data.json (sealed)Sealed outputsFlag if >1-3 commits

Released under the MIT License.