Plan the Gas Town port instead of rebuilding it in herdr #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "plan-gastown-herdr-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Planning only — no code. Two OpenSpec changes, landing together because the second supersedes the first.
Why
Running ~8 concurrent agents produced three failures in a day:
git log origin/mainafter building its own version.The operator's own memory was the only shared ledger, and it saturated.
What's here
add-town-scoped-coordination— towns, a provenance tree, a board, claims, and a per-town refinery, built as herdr plugins. Superseded, kept deliberately (see below).Its tell: it specifies Towns from first principles — a concept Gas Town already has, alongside Beads, the Refinery, Wasteland, Witness/Deacon/Dogs, Convoys, and Escalation. It was rebuilding a mature system badly.
port-gastown-to-herdr— fork Gas Town and replace its tmux coupling instead.Why the port is feasible
internal/tmuxis 4,149 lines and ~110 exported functions, called directly from 232 of 1,194 Go files with no interface between them. Sorted by what a second backend actually needs:config.tomlAcceptWorkspaceTrustDialog,DismissStartupDialogsBlind,IsAtPrompt,IsZombie)That third row is the argument the port is worth doing rather than merely possible: those functions exist only because tmux exposes no structured agent state. herdr answers those questions directly —
herdr agent startalready means "the expected agent was detected and is ready for input."The riskiest dependency has a verified analog. Gas Town injects every agent's identity as environment variables at session creation (
internal/polecat/session_manager.go:455notes that setting them afterward is too late), andherdr pane split --cwd <path> --env K=V --no-focuscovers it. Had it not, the port would have been blocked at the identity layer.Section 0 is a spike with a real stop condition
Kill-agent-keep-pane, respawn-in-place, and unresponsive-agent detection are unverified. Witness, Deacon, and the Dogs are built on them. Task 0.10 says stop rather than proceed hopefully — Gas Town without its watchdog tier is a weaker system than the one being adopted.
Two decisions worth reviewing
Upstream is proposed at §2a, not §8. Staying synced is preferred but not required. Too early is a stranger asking a busy maintainer to accept an abstraction on faith; too late means 232 files were migrated against a shape upstream might want differently — the one part that's expensive to redo. At §2a the pitch is a working second backend plus a conformance suite proving tmux's behavior is preserved. §4 proceeds regardless of the answer or silence.
A Gas Town rig maps to a herdr workspace, not to panes in one. At 25 agents, rigs-as-panes is a flat 25-entry sidebar — precisely the failure that started this. Navigability at 25 agents is a requirement with a scenario, not an afterthought.
Why the superseded change is kept, not deleted
herdr-mailandherdr-spawnstay in service, unchanged, until the port reaches parity. They're the working system in the meantime and must not be dismantled for a port that hasn't landed.Both changes pass
openspec validate --strict.🤖 Generated with Claude Code