Skip to content

The Three Loops as One System

Dependency Order

The loops are not peers. They exist in a deliberate dependency order that reflects the purpose of the Material Entity:

LoopExists ForDepends OnServes
DATAAccumulating what the CK knows and has producedTOOL (to produce instances), CK (for schema + rules)Other CKs via ck:isAccessibleBy; the web/ surface; llm/ memory
TOOLExecuting the CK's capabilityCK loop (for ontology.yaml, rules.shacl, identity)DATA loop -- every tool execution writes to storage/
CKDefining and sustaining the Material EntityNothing -- this is the rootTOOL loop (schema, rules, identity) and DATA loop (schema, rules)

What Cannot Cross Loop Boundaries

The Separation Axiom

A storage write (DATA) must never cause a CK loop commit. A tool execution (TOOL) must never rewrite ontology.yaml or rules.shacl. A CK loop commit must never write directly to storage/. These boundaries are enforced by write authority rules on each filesystem volume -- not by convention.

BoundaryWhat Is ForbiddenWhy
TOOL -> CK loopTool execution writing to any file in the CK root volumeCK identity is operator-governed -- runtime cannot alter who the CK is
DATA -> CK loopStorage writes causing commits to conceptkernel.yaml or schemaIdentity and schema are design-time artifacts -- not derived from outputs
DATA -> TOOLInstance data retroactively modifying tool source or configTools are versioned independently -- instances are their outputs, not inputs to their definition
CK -> DATA directA CK loop commit writing an instance into storage/Instances are produced by tool execution -- they require the full tool-to-storage contract
CK B -> CK A writesAny kernel writing to another kernel's CK or TOOL volumeVolumes are sovereign -- another CK may only read DATA loop outputs via declared access

Cross-CK Cooperation -- SPIFFE Identity Model

Cross-kernel cooperation is governed by SPIFFE workload identities, not binary role flags. Every CK is assigned a stable SPIFFE SVID at mint time. Access grants are action-scoped -- a calling kernel can be permitted to invoke the tool without being permitted to read storage, and vice versa.

Cooperation PatternSPIFFE MechanismEnforced By
Read another CK's storageSPIFFE grant: action=read-storage, caller SVID verifiedSPIRE mTLS + filesystem ACL
Invoke another CK's toolSPIFFE grant: action=invoke-tool, caller SVID verifiedSPIRE cert + CKI-Spawner identity check
Read CK identity filesSPIFFE grant: action=read-identity (explicit, audited)SPIRE mTLS on CK loop volume read
React to schema changesNATS subject requires SVID-bound NATS credentialSPIRE JWT-SVID on NATS connection
Compose predicate instancesEach leg of handshake verified by SVID chainSPIRE trust bundle across predicate CK

Action Composition via Edges

A kernel's effective action set includes not only its own declared actions but also the actions of kernels it references through outbound edges:

effective_actions(CK) = own_actions(CK) + SUM own_actions(edge.target) for edge in CK.edges.outbound

Edge PredicateComposition StyleContext AssemblyExample
COMPOSESParent calls child actions directlyLoad target SKILL.md into parent contextAcme.Visualizer COMPOSES Acme.UI.Layout
EXTENDSChild adds capabilities to parentChild SKILL.md extends parent's action catalogAcme.AdvancedEditor EXTENDS Acme.Editor
TRIGGERSParent fires child after own action completesSequential -- child context loaded after parentTask.Kernel TRIGGERS ComplianceCheck on task.complete
LOOPS_WITHBidirectional -- both can call each otherBoth SKILL.md files loaded; circular guard neededGoal.Kernel LOOPS_WITH Task.Kernel
PRODUCESEvent-driven, no request/replyNo direct context sharing -- NATS event onlyAcme.Cymatics PRODUCES event.Acme.Cymatics

LOOPS_WITH Circular Guard

When assembling context for an operate action that follows a LOOPS_WITH edge, mark the source CK as visited before walking the edge. Do not load the same SKILL.md twice. A visited set prevents infinite context recursion.

The Three Loops as Enterprise Business Engine (v3.4)

The CK three-loop model is the implementation substrate for the enterprise's autonomous business organism. Every enterprise operational pattern maps to a specific CKP mechanism:

Enterprise PatternCKP ImplementationStatus
Unlimited autonomous directionsCK.Goal instances -- each goal is a direction; tasks distributed across kernelsImplemented
Formal task descriptions (machine-executable)task.yaml in CK.Task storage/ with typed inputs, outputs, quality_criteria, acceptance_conditionsPartial
Capability advertisement to registriesspec.actions + capability: block in conceptkernel.yaml; CK.Discovery fleet.catalogImplemented
Audience profile accumulationi-audience-{session}/ instances in web-serving kernel storage/Future
Provenance for all autonomous actionsPROV-O fields in every manifest.json; GPG+OIDC+SVID three-factor audit chainPartial
Deployment as ontological eventi-deploy-{ts}/ instance with manifests, probe result, operator identityImplemented
SHACL reactive business rulesrules.shacl reactive logic layer; SHACL Advanced Rules for trigger conditionsFuture -- stubs only
Economic events (ValueFlows/REA)Sealed instances with vf:EconomicEvent typing; Commitment = amendable instanceFuture

Released under the MIT License.