Skip to content

cell-runner: walking-skeleton spike — runnable CC→PC→WC agentic loop (proof-of-life)#673

Draft
usurobor wants to merge 1 commit into
mainfrom
cell-runner/skeleton
Draft

cell-runner: walking-skeleton spike — runnable CC→PC→WC agentic loop (proof-of-life)#673
usurobor wants to merge 1 commit into
mainfrom
cell-runner/skeleton

Conversation

@usurobor

Copy link
Copy Markdown
Owner

CDD Trace

Step Artifact Skills loaded Decision
0 Observe the three-cell loop (CC→PC→WC) exists only as a hand-cranked bootstrap; no code turns it proceed
1 Select milestone: "cnos moves to three cells running" walking-skeleton first
4 Gap see below
5 Mode see below
6 Artifacts src/packages/cnos.cell-runner/** built
8 Review PR #this Pending (external β)
9 Gate Pending
10 Release Pending

Gap (step 4)

What: the three-cell agentic loop (CC→PC→WC) exists today only as a hand-cranked bootstrap (κ + external β + subagents). There is no runnable machinery that turns the loop.

Why it matters: the milestone — cnos running its own development through the three cells, and tsc adopting the same structure — needs code that runs the loop, not only a specification of it (the doctrine plan is PR #672; the implementation wave is #627). Designing forever without running hides the real integration seams.

What fails if skipped: we keep perfecting a plan and never discover, by running, where CM ⇄ CC ⇄ PC ⇄ WC actually breaks.

Mode + Active Skills (step 5)

  • Mode: MCA
  • Work shape: runtime (exploratory spike)
  • Level: L6
  • Active skills: reuse-house-idiom (declarative FSM table + generic evaluator, per cnos.issues/issues-fsm); fail-closed; honest-provenance (spike ≠ canonical doctrine)
  • Dominant risk: a spike quietly presenting itself as authored doctrine, or a validator that only looks mechanical — both explicitly guarded here.

Changes

Added

A runnable Go+CUE proof-of-life for the three-cell loop under src/packages/cnos.cell-runner/ (new go.work module cnos.dev/cnos/cell-runner; the only edit outside the package is adding it to the root go.work).

One loop turn, mechanically, git-native, no human in the machinery:

CC.measure → CM object + judgment{request_planning}   (incoherence detected)
  → PC.plan → wave{ one WC contract }                 (relation graph)
    → WC.execute → α produce · β review · γ close · V validate · δ decide · receipt
      → CC.re-measure → judgment{coherent}            (incoherence cleared)
loop terminates: incoherence 1 → 0, receipt chain closed.
  • The three cells are distinguished ONLY by output telos (WC→artifact, PC→relation_graph, CC→judgment) and run the same kernel.
  • Kernel is a declarative transition table (kernel/transitions.json) driven by a generic evaluator — mirroring the cnos.issues/issues-fsm idiom; never switches on a state name.
  • Judgment seams sit behind an Actor interface; v0 ships deterministic stub actors — agent-backed actors (the real α/β/CC judgment) drop into the same interface next.
  • The CM object (schema/cm.cue) is the runner/provider-produced measurement — the exact seam a tsc-provided TSC measurement plugs into (WC-2 of cnos#671: cell-runtime doctrine wave (CM-grounded) — PC plan under review #672); it is NOT the CC's judgment (the CC consumes it).
  • Receipts are computed at γ from transition evidence (not free-text), shaped after schemas/cdd/receipt.cue, and cue-vet green.

Built against the R12 cell-runtime doctrine design (PR #672).

Not in scope

Agent-backed actors; multi-WC / parallel waves; the full wave FSM (WC-3b) beyond one node; real CM scoring beyond defect-count; operator-authorization gate wiring; self-hosting on a real cnos change; tsc adoption. Each is a named next increment in DESIGN.md, not a silent gap. This spike is not canonical runtime — it is reconciled to the authored doctrine (#672 WCs / #627 S2–S8) when that lands, or discarded.

Acceptance Criteria

  • go run ./cmd/cell-runner --workspace <tmp> --task testdata/toy → exit 0, transcript shows incoherence 1 → 0 across CC→PC→WC→CC
  • every emitted CM / wave / receipt / judgment cue-vets against schema/*.cue
  • fault injection (--fail-injection=v-fail|beta-reject) drives the kernel to a fail-closed held state with a stop receipt and non-zero exit
  • go build ./..., go vet ./..., go test ./... green; gofmt -l empty
  • no Python (find … -name '*.py' empty)
  • CI green
  • external β review

Known Debt

v0 actors are deterministic stubs — the loop's judgment is not yet real (that is v1: agent-backed actors behind the same Actor interface). The runner receipt schema is a minimal spike shape reusing the cdd transmissibility gate, not the full cnos.cdd.receipt.v1. Emitted objects are JSON (stdlib-only; JSON is a YAML/CUE subset). All recorded in DESIGN.md §Build notes.

Pre-Review Gate (alpha/SKILL.md §2.6)

  • Rebased on current main (branched from main tip)
  • PR body carries CDD Trace through step 7
  • Every AC mapped to evidence (run transcript + cue-vet output)
  • Peer enumeration — n/a (single new isolated package)
  • Schema / shape audit — all emitted objects cue-vet against schema/*.cue
  • Harness audit — new module added to go.work; no existing surface changed
  • Known debt explicit
  • CI green on head commit (PR remains draft)

🤖 Generated with Claude Code


Generated by Claude Code

…(proof-of-life)

A runnable Go+CUE proof-of-life for the three-cell agentic loop, built against the R12
cell-runtime doctrine design (PR #672). EXPLORATORY SPIKE — not canonical runtime; it
learns from running and is reconciled to the authored doctrine (#672 WCs / #627 S2–S8)
when that lands. No policy invented.

What it proves — one loop turn, mechanically, git-native, no human in the machinery:
  CC.measure → CM object + judgment{request_planning}   (incoherence detected)
    → PC.plan → wave{one WC contract}                   (relation graph)
      → WC.execute → α produce · β review · γ close · V validate · δ decide · receipt
        → CC.re-measure → judgment{coherent}            (incoherence cleared)
  loop terminates: incoherence 1 → 0, receipt chain closed.

The three cells are distinguished ONLY by output telos (WC→artifact, PC→relation_graph,
CC→judgment) and run the SAME kernel. The kernel is a declarative transition table
(kernel/transitions.json) evaluated by a generic engine — mirroring the cnos.issues
issues-fsm idiom, never switching on a state name. Judgment seams sit behind an Actor
interface; v0 ships deterministic stub actors (agent-backed actors are the next
increment). The CM object is the shared cnos↔tsc seam (the slot a tsc/TSC measurement
plugs into behind schema/cm.cue). Receipts are computed at γ and cue-vet green.

Verified: go build/vet/test green; gofmt clean; the loop runs incoherence 1→0 (exit 0);
every emitted CM/wave/receipt/judgment cue-vets against schema/*.cue; fault injection
(--fail-injection=v-fail|beta-reject) drives the kernel to a fail-closed `held` state
with a stop receipt and non-zero exit. Go for code, CUE for schemas, no Python.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016t4N6DgAA8KaNCxn4wNgSb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants