cell-runner: walking-skeleton spike — runnable CC→PC→WC agentic loop (proof-of-life)#673
Draft
usurobor wants to merge 1 commit into
Draft
cell-runner: walking-skeleton spike — runnable CC→PC→WC agentic loop (proof-of-life)#673usurobor wants to merge 1 commit into
usurobor wants to merge 1 commit into
Conversation
…(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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CDD Trace
src/packages/cnos.cell-runner/**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)
cnos.issues/issues-fsm); fail-closed; honest-provenance (spike ≠ canonical doctrine)Changes
Added
A runnable Go+CUE proof-of-life for the three-cell loop under
src/packages/cnos.cell-runner/(newgo.workmodulecnos.dev/cnos/cell-runner; the only edit outside the package is adding it to the rootgo.work).One loop turn, mechanically, git-native, no human in the machinery:
kernel/transitions.json) driven by a generic evaluator — mirroring thecnos.issues/issues-fsmidiom; never switches on a state name.Actorinterface; v0 ships deterministic stub actors — agent-backed actors (the real α/β/CC judgment) drop into the same interface next.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).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→CCschema/*.cue--fail-injection=v-fail|beta-reject) drives the kernel to a fail-closedheldstate with a stop receipt and non-zero exitgo build ./...,go vet ./...,go test ./...green;gofmt -lemptyfind … -name '*.py'empty)Known Debt
v0 actors are deterministic stubs — the loop's judgment is not yet real (that is v1: agent-backed actors behind the same
Actorinterface). The runner receipt schema is a minimal spike shape reusing the cdd transmissibility gate, not the fullcnos.cdd.receipt.v1. Emitted objects are JSON (stdlib-only; JSON is a YAML/CUE subset). All recorded inDESIGN.md §Build notes.Pre-Review Gate (alpha/SKILL.md §2.6)
main(branched frommaintip)schema/*.cuego.work; no existing surface changed🤖 Generated with Claude Code
Generated by Claude Code