Gas City But It’s Just Codex Repository Snapshot (2026-04-15)
This raw note preserves the current repo state as inspected from the live local worktree on 2026-04-15.
Branch and worktree state
- Repo:
/Users/ericfode/src/gas-city-but-its-just-codex - Branch:
main - HEAD at inspection:
0bc527d(Align policy routing runtime with Lean semantics) - Important honesty note: the worktree is dirty and appears to be mid-increment beyond HEAD.
cargo run -- development-snapshot --db state/workflows.redbreports:currentCheckpoint = recipe-policy-bridge-088nextTarget = phase-summary-workspace-coverage-089- two non-blocking due items:
formalize-after-runtime-changeandobserver-surface-sync
In other words, the repo’s operative self-description has already moved past the last committed Git history. That is not a contradiction; it is merely a live worktree refusing to pretend otherwise.
Current top-level structure
The important directories right now are:
src/— root runtime crate: app service, store, app-server adapter, MCP, gRPC, development/commentary/overlay servicescrates/workflow-core/— canonical workflow model typescrates/workflow-observer/— dispatch-watch observation state machinecrates/operator-daemon/— external operator over gRPCcrates/operator-ui/— sidecar-style runtime plus gRPC surface and autorun loopapps/operator-ui-macos/— native SwiftUI macOS clientformulas/— tracked recipes/fragmentsconfigs/— repo-loop state, operator-policy JSON specs, research configs, progression ladderstate/— defaultworkflows.redb, historical run artifacts, maintenance state, evolution logbenchmarks/— file-backed real app-server benchmark projects and blind verifierssandbox/— especially the activeresearch-triangulation-wikisandboxformal/— Lean model and related documentationdocs/architecture/,docs/specifications/,docs/implementation/,docs/evidence/,docs/usage/— current explanatory and operational surfaces
Canonical control-plane shape
The repo’s current architecture documents describe a five-layer control plane:
- formulas and schemas
WorkflowStoreinredbAppservice- interface surfaces (
gRPC,MCP, app-server dynamic tools, operator daemon, UI sidecar) - evidence layer (schemas, tests, benchmarks, runbooks, formal model, live artifacts)
Primary files inspected for this:
README.mddocs/architecture/current-control-plane-architecture.mddocs/requirements/control-plane-requirements.mddocs/specifications/workflow-ledger-specification.mddocs/implementation/implementation-map.mddocs/evidence/correctness-evidence.md
Runtime and model structure
Durable model and ledger
- The real model types now live in
crates/workflow-core/src/lib.rs, whilesrc/model.rsis just a re-export shim. WorkflowStoreinsrc/store.rsis authoritative for:- workflow metadata
- nodes and edges
- append-only events
- worker bindings
- shared-workspace entries
- allocation rounds and bids
- coalition records and transitions
- observer cursors and dispatch watches
- overlay-view definitions and saved projections
Formula layer
Tracked formulas are intentionally small and current:
formulas/recipes/repo-loop.jsonformulas/recipes/research-triangulation.jsonformulas/recipes/open-question-triangulation.jsonformulas/fragments/breakdown.json
The formula runtime in src/formula.rs now supports lineage, mutation, assessment, and active-family selection. Deterministic step settlement lives in src/deterministic.rs.
App service and execution kernel
src/app.rs is the policy/orchestration boundary between the ledger and Codex runtime operations. It resolves recipes/fragments, claims nodes, dispatches worker turns, handles recover/handoff/expand, and enriches workflow snapshots with thread state.
Codex remains the execution kernel through src/app_server.rs. The important design choice is still: threads and turns are execution containers, not the durable system of record.
Control surfaces
Three control surfaces matter most:
- top-level MCP tools in
src/mcp.rs - in-turn dynamic tools injected through the app-server adapter in
src/app_server.rs - the broad typed gRPC API in
crates/operator-ui/proto/operator_ui.protoplussrc/control_plane_grpc.rs
The gRPC surface now appears to be the richest contract in the system.
Operator, sidecar, and native UI
The intended same-host split in docs is:
- control-plane daemon owns
redb, app-server, and gRPC authority - operator daemon consumes gRPC and steers work
- UI sidecar serves projections over gRPC
- macOS app acts as a pure client of the sidecar
Relevant docs:
docs/architecture/application-stack.mddocs/architecture/same-host-three-service-architecture.mddocs/usage/three-service-stack.md
Important current implementation reality from inspected code:
crates/operator-ui/src/main.rsstill opensWorkflowStore, loadsFormulaRegistry, spawnsCodexAppServer, and starts an autorun loop.scripts/run-operator-ui-sidecar.shlaunches that binary directly with DB/formulas/codex arguments.
So the repo currently documents a cleaner three-service authority split than the code fully enforces. The sidecar is not merely a passive projection shim yet.
Operational center of gravity now
The files that best describe what is active right now are:
configs/repo-loop-state.jsonstate/evolution-log.mdconfigs/operator-policy/default-current.jsonconfigs/operator-policy/research-current.jsonconfigs/operator-policy/nomic-current.json
This is where the live operating loop, checkpoint, and next target actually reside. docs/plans/ is still useful archaeological history, but it is no longer the main planner of record.
Formal and evaluation surfaces
formal/is active, not decorative. The 2026-04-15 evolution-log entry addsformal/CodexGasCityFormal/RecipeWorkflowSemantics.leanand the new architecture notedocs/architecture/recipe-workflow-policy-semantics.md.benchmarks/remains the file-backed real-app-server evaluation harness.cargo run -- validate-formulaspassed at inspection time.
Most important current tensions
- The repo is preserving the original thesis — external durable control plane over Codex-native execution seams — while growing into a much larger runtime than the original tiny MCP spike.
- The control-plane gRPC contract has become central enough that multiple other surfaces orbit it.
- The sidecar/UI split is still partially duplicated in implementation.
- The active worktree is mid-increment and truthfully says so through
repo-loop-state.jsonandstate/evolution-log.md. - The next pressure point is not “invent more orchestration” but making the phase/barrier and workspace coverage read-models match the widened runtime and formal bridge.
Commands run during inspection
git status --short --branchgit log -5 --oneline --decoratecargo run -- validate-formulascargo run -- development-snapshot --db state/workflows.redb
Bottom line
The current repo is no longer a note about how one might rebuild Gas City over Codex. It is a live, layered control-plane implementation with a durable ledger, formula runtime, typed gRPC and MCP control surfaces, operator automation, a native UI path, benchmarks, and an active Lean bridge — but it still carries some honest structural tension between the clean split described in docs and the more entangled sidecar/runtime arrangement that exists in code today.