Architecture

The tier-3 model

The goatcs-harness runtime is classified as tier-3 in a harness maturity model:

Tier Name Characteristics
1 Raw prompt No scaffolding; direct model invocation
2 Context engineering Prompt templates, few-shot examples, hooks, MCP
3 LLM-as-runtime Explicit graph topology, typed state, deterministic checkpoints, machine-enforced routing, wave-parallel dispatch, verification batteries

Tier-3 means the LLM is not merely assisted by context engineering but is programmed by a graph: the harness reads graph.json, computes the ready-set at each step, dispatches nodes, evaluates gate conditions, runs no-llm nodes as code, and checkpoints after each node.

Inline drivability

Skills can be driven in three modes:

  • --provider inline — the orchestrator (you) reasons at each node. Deterministic nodes run as code; reasoning nodes pause at exit-11 for you to submit output, then resume. This is the primary mode for the epiphany pipeline.
  • --provider claude-cli — the harness spawns claude -p for each reasoning node.
  • --provider codex — the harness spawns Codex for each reasoning node.

The graph is identical across providers; only the live author differs.

Pipeline

The harness pipeline for a single run:

  1. Load — read graph.json, validate against graph.schema.json (PRC-1).
  2. Seed — load the seed file (initial state / inputs).
  3. Ready-set loop — compute which nodes are ready (all predecessors complete, scale gates satisfied, branch labels active), dispatch them, collect output, checkpoint.
  4. Gate evaluation — for forward-conditional edges, evaluate the gate_condition expression against the current signal state.
  5. Verificationno-llm verifier nodes run deterministic checks.
  6. Emit — atomic write of final artifacts (WAL + shadow-write + atomic rename).

Module map

Component Purpose
graph.json Topology declaration (nodes, edges, metadata)
graph.schema.json JSON Schema for graph validation
modules/*.md Per-node protocol documents
scripts/ Utility scripts (validate, emit, verify)
tests/ Smoke tests and regression suite
hats.json Cognitive-persona-to-model-tier mapping
wiring-contract.yaml Expected wiring for integration verification