Skip to content

TOOL Loop: Executable Capability

TOOL Loop -- What can I do?

The TOOL loop is the capability organ of the Material Entity. It is the executable artifact the CK brings to the world -- independently versioned, independently deployable, and completely agnostic about what form it takes. A tool can be a shell script, a web service, a frontend project, or a Wasm binary. The only contract is that it lives under tool/ and has its own git history.

The Tool as Independent Repo

tool/ is a separately-mounted volume on the distributed filesystem with its own git history. This means the tool can be updated, branched, and versioned completely independently of the CK's identity files. A SKILL.md update does not require a tool recompile. A tool refactor does not require a new ontology.yaml. The two repos evolve on their own schedules.

Tool FormWhat lives in tool/Execution Context
Shell scriptrun.sh -- self-contained, may reference system binariesDirect shell execution; system PATH applies
Web serviceapp entry point, requirements, routers, modelsRuntime; runs as long-lived service process
Frontend projectentry point, package manifest, components, public assetsRuntime; built and served or SSR'd
Compiled / Wasmsource, build manifest -- compiled to .wasm artifactWasm runtime via Polyglot Matrix
System pointerpointer.json -- { "binary": "/usr/local/bin/ffmpeg" }System binary invoked directly; no compilation

The Tool-to-Storage Contract

The tool's only obligation toward the DATA loop is to write a conforming instance into storage/ when it produces an output. The instance must conform to the CK's rules.shacl before the write is accepted. Everything else -- proof generation, ledger entry, index update -- is handled by the platform after the tool writes data.json.

Minimum Output Contract

The tool writes to storage/instance-<short-tx>/data.json:

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": {
    "...": "instance payload -- must conform to ontology.yaml + rules.shacl"
  }
}

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 directly (module)Load 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.

TOOL Loop NATS Topics

ck.{guid}.tool.commit          # TOOL repo -- new commit (tool updated)
ck.{guid}.tool.ref-update      # Tool branch pointer moved
ck.{guid}.tool.promote         # Tool version promoted to stable
ck.{guid}.tool.invoked         # Tool execution started
ck.{guid}.tool.completed       # Tool execution finished successfully
ck.{guid}.tool.failed          # Tool execution failed

Released under the MIT License.