Audit of 574 + 151 + 141 commits from gastown:upstream/main since Gas City
was created (2026-02-22). Delta 1: 574 commits through 2026-03-01. Delta 2:
151 non-merge, non-backup commits 977953d8..04e7ed7c (2026-03-01 to
2026-03-03). Delta 3: 141 non-merge commits 04e7ed7c..e8616072 (2026-03-03
to 2026-03-06). Organized by theme so we can review together and decide
actions.Legend:[ ] = pending review, [x] = addressed, [-] = skipped (N/A), [~] = deferred
The biggest change in Gas Town: polecats no longer die after completing work.
“Done means idle, not dead.” Sandboxes preserved for reuse, witness restarts
instead of nuking, completion signaling via agent beads instead of mail.
[~] c410c10a — gt done sets agent state to “idle” instead of self-nuking
worktree. Sling reuses idle polecats before allocating new ones.
[~] 341fa43a — Phase 1: gt done transitions to IDLE with sandbox preserved,
worktree synced to main for immediate reuse.
[~] 0a653b11 — Polecats self-manage completion, set agent_state=idle directly.
Witness is safety-net only for crash recovery.
[~] 63ad1454 — Branch-only reuse: after done, worktree syncs to main, old
branch deleted. Next sling uses git checkout -b on existing worktree.
Action: Update mol-polecat-work.formula.toml — line 408 says “You are
GONE. Done means gone. There is no idle state.” Change to reflect persistent
model. Update polecat prompt similarly.
[~] 330664c2 — Nuke no longer deletes remote branches. Refinery owns
remote branch cleanup after merge.
[~] 4bd189be — Nuke checks CommitsAhead before deleting remote branches.
Unmerged commits preserved for refinery/human.
Action: Update polecat prompt if it discusses cleanup behavior.
Deferred — requires sling, gc done, idle state management, and
formula-on-bead (attached_molecule) infrastructure that Gas City
doesn’t have yet. The persistent polecat model is hidden inside
upstream’s compiled gt done command; Gas City needs explicit
SDK support before this can be ported.
Major restructuring from 10 steps to 7, removing preflight tests entirely.
[~] 12cf3217 — Drop full test suite from polecat formula. Refinery owns
main health via bisecting merge queue. Steps: remove preflight-tests, replace
run-tests with build-check (compile + targeted tests only), consolidate
cleanup-workspace and prepare-for-review.
[~] 9d64c0aa — Sleepwalking polecat fix: HARD GATE requiring >= 1 commit
ahead of origin/base_branch. Zero commits is now a hard error in commit-changes,
cleanup-workspace, and submit-and-exit steps.
[~] 4ede6194 — No-changes exit protocol: polecat must run bd close <id> --reason="no-changes: <explanation>" + gt done when bead has nothing to
implement. Prevents spawn storms.
Action: Rewrite mol-polecat-work.formula.toml to match v7 structure.
Add the HARD GATE commit verification and no-changes exit protocol.
Deferred — formula v7’s submit step runs gt done (compiled Go).
The HARD GATE and no-changes exit protocol can be ported independently
as prompt-level guidance, but the full v7 restructuring depends on
the persistent polecat infrastructure from S1.
177606a4 — “Communication Hygiene: Nudge First, Mail Rarely” sections
added to deacon, dog, polecat, and witness templates. Dogs should NEVER send
mail. Polecats have 0-1 mail budget per session.
a3ee0ae4 — “Dolt Health: Your Part” sections in polecat and witness
prompts. Nudge don’t mail, don’t create unnecessary beads, close your beads.
Action:Add Communication Hygiene + Dolt Health sections to all four
role prompts in examples/gastown. DONE.
7a578c2b — Six mail sends converted to nudges: MERGE_FAILED,
CONVOY_NEEDS_FEEDING, worker rejection, MERGE_READY, RECOVERY_NEEDED,
HandleMergeFailed. Mail preserved only for convoy completion (handoff
context) and escalation to mayor.
Done: All role prompts updated with role-specific comm rules. Generic
nudge-first-mail-rarely principle extracted to operational-awareness
global fragment. MERGE_FAILED as nudge in refinery. Protocol messages
listed as ephemeral in global fragment.
5872d9af — LIFECYCLE:Shutdown, MERGED, MERGE_READY, MERGE_FAILED
are now ephemeral wisps instead of permanent beads.
Done: Listed as ephemeral protocol messages in global fragment.
98767fa2 — WORK_DONE messages from gt done are ephemeral wisps.
Done: Listed as ephemeral in global fragment.
655620a1 — Witness patrol v8: gt mail drain step archives stale
protocol messages (>30 min). Batch processing when inbox > 10 messages.
Done: Added Mail Drain section to witness prompt.
9fb00901 — Overhauled mail instructions in crew and polecat templates:
--stdin heredoc pattern, address format docs, common mistakes section.
Done:--stdin heredoc pattern in global fragment. Common mail mistakes
address format in crew prompt.
8eb3d8bb — Generic names (alice/) in crew template mail examples.
Done: Changed wolf → alice in crew prompt examples.
[-] 55c90da5 — Verify MR bead exists before sending MERGE_READY.
Disposition: N/A — we don’t use MR beads. Polecats assign work beads
directly to refinery with branch metadata. The failure mode doesn’t exist.
70c1cbf8 — Track bead respawn count, escalate on threshold.
Disposition: Implemented as exec order spawn-storm-detect in
maintenance pack. Script tracks reset counts in a ledger, mails mayor
when any bead exceeds threshold. Witness sets metadata.recovered=true
on reset beads to feed the detector.
[-] b5553115 — Three-verdict recovery model.
Disposition: N/A — our reset-to-pool model covers this. Work bead
assignment to refinery IS submission. Witness already checks assignee
before recovering. No intermediate MR state to verify.
977953d8 + 3bf979db — Remove hardcoded escalation policy.
Disposition: Replaced “In ALL cases: notify mayor” with judgment-based
notification table in witness formula and prompt. Routine pool resizes
no longer generate mayor mail. Witness decides severity.
Root-only wisps: --root-only flag added to all bd mol wisp calls
in patrol formulas (deacon, witness, refinery) and polecat work formula.
Formula steps are no longer materialized as child beads — agents read step
descriptions directly from the formula definition. Reduces Dolt write churn
by ~15x.
All bd mol current / bd mol step done references removed from
shared templates (following-mol, propulsion), all role prompts, and all
formula descriptions. Replaced with “read formula steps and work through
them in order” pattern.
Crash recovery: agents re-read formula steps on restart and determine
resume position from context (git state, bead state, last completed action).
No step-tracking metadata needed on the wisp bead.
Disposition: No new gc command needed (upstream’s gt prime with
showFormulaSteps() is unnecessary — the LLM reads formula steps directly).
We keep the explicit bd mol wisp/bd mol burn dance but with --root-only.
d2f9f2af — JSONL Dog: spike detection + pollution firewall. New
verify step between export and push. spike_threshold variable.
Done: mol-dog-jsonl.formula.toml created with verify step.
37d57150 — Reaper Dog: auto-close step for issues > 30 days
(excluding epics, P0/P1, active deps). stale_issue_age variable.
Done: mol-dog-reaper.formula.toml created. ZFC revert noted (no
auto-close decisions in Go).
bc9f395a — Doctor Dog: structured JSON reporting model (advisory).
Then 176b4963 re-adds automated actions with 10-min cooldowns.
Then 89ccc218 reverts to configurable advisory recommendations.
Done: mol-dog-doctor.formula.toml uses advisory model. References
gc dolt cleanup for orphan detection.
1123b96c — Surgical rebase mode for Compactor. mode config
(‘flatten’|‘surgical’), keep_recent (default 50).
Done: Included in mol-dog-compactor.formula.toml vars.
3924d560 — SQL-based flatten on running server. No downtime.
Done: mol-dog-compactor.formula.toml uses SQL-based approach.
b4ed85bb — gt dog done auto-terminates tmux session after 3s.
Dogs should NOT idle at prompt.
Done: Dog prompt updated with auto-termination note.
427c6e8a — Lifecycle defaults: Wisp Reaper (30m), Compactor (24h),
Doctor (5m), Janitor (15m), JSONL Backup (15m), FS Backup (15m),
Maintenance (daily 03:00, threshold 1000).
Done: 7 order wrappers in maintenance/formulas/orders/mol-dog-*/
dispatch existing dog formulas on cooldown intervals via the generic order
system. No Go code needed — ZFC-compliant.
Dolt health formulas extracted from gastown into standalone reusable
pack at examples/dolt-health/. Dog formulas + exec orders.
Fallback agents (fallback = true) — pack composition primitive.
Non-fallback wins silently over fallback; two fallbacks keep first loaded.
resolveFallbackAgents() runs before collision detection.
Dolt-health pack ships a fallback = true dog pool so it works
standalone. When composed with maintenance (non-fallback dog), maintenance wins.
pack.requires validation at city scope via validateCityRequirements().
Hybrid session provider (internal/session/hybrid/) — routes sessions
to tmux (local) or k8s (remote) based on name matching. Registered as
provider = "hybrid" in providers.go.
12cf3217 — Identity clarification: “You are the AI agent (crew/…).
The human is the Overseer.”
Done: Added explicit identity line to crew prompt.
[-] faf45d1c — Fix-Merging Community PRs section.
N/A — not present in Gas Town upstream crew template either.
9fb00901 — Improved mail instructions with --stdin heredoc pattern,
common mistakes section.
Done: Added --stdin heredoc pattern and common mail mistakes to crew
prompt. Generic example names (alice instead of wolf).
(batch 3) Template paths changed from ~/gt to {{ .TownRoot }}.
Done: All ~/gt references replaced with {{ .CityRoot }} in mayor,
crew, and polecat prompts.
[-] 67b0cdfe — Formula parser now supports: Extends (composition), Compose,
Advice/Pointcuts (AOP), Squash (completion behavior), Gate (conditional
step execution), Preset (leg selection). Previously silently discarded.
N/A — Gas City’s formula parser is intentionally minimal (Name, Steps with
DAG Needs). Advanced features (convoys, AOP, presets) are spec-level concepts
to be added when needed, not ported from Gas Town’s accretion.
[-] 330664c2 — GatesParallel=true by default: typecheck, lint, build,
test run concurrently in merge queue (~2x gate speedup).
N/A — Gas City formulas use Needs for DAG ordering. Gate step types
don’t exist yet. When added, parallelism would be the default.
Go code making decisions that belong in prompts — moved to prompts.
[-] 915f1b7e + f61ff0ac — Remove auto-close of permanent issues from
wisp reaper. Reaper only operates on ephemeral wisps.
N/A — Gas City wisp GC only deletes closed molecules past TTL. No
auto-close decisions in Go.
977953d8 — Witness handlers report data, don’t make policy decisions.
Done in Section 6d.
3bf979db — Remove hardcoded role names from witness error messages.
Done in Section 6d.
[-] 383945fb — Remove boot triage decision engine from Go.
N/A — Gas City reconciler is purely mechanical. Triage is data collection;
all decisions driven by config (max_restarts, restart_window,
idle_timeout) and agent requests.
89ccc218 — Doctor dog: advisory recommendations, not automated actions.
Done in Section 8a.
[-] eb530d85 — Restart tracker crash-loop params configurable via
patrols.restart_tracker.
N/A — Gas City’s [daemon] config has max_restarts and restart_window
fully configurable since inception. Crash tracker disabled if max_restarts ≤ 0.
Remaining:roleEmoji map in tmux.go is a display-only hardcode
(see 12a — deferred, low priority).
[-] bd8df1e8 — Dog recognized as role in AgentEnv(). N/A — Gas City
has no role concept; per-agent config via [[agent]] entries.
[-] e060349b — worker_agents map. N/A — crew members are individual
[[agent]] entries with full config blocks.
[-] 2484936a — Role registry (autonomous, emoji). N/A — autonomous
is prompt-level (propulsion.md.tmpl). emoji field on Agent would remove
the hardcoded roleEmoji map in tmux.go (ZFC violation) — deferred, low priority.
95eff925 — auto_start_on_boot per-rig config. Gas City already has
rig.Suspended. Added gc rig add --start-suspended for dormant-by-default.
Sling enforcement deferred (prompt-level: mayor undocks rigs).
d2350f27 — Polecat pool: pool-init maps to pool.min (reconciler
pre-spawns). Local branch cleanup added to mol-polecat-work submit step
(detach + delete local branch after push, before refinery assignment).
N/A — Gas City was designed config-first; thresholds were never hardcoded.
[session], [daemon], [dolt], [orders] cover all operational
knobs. JSON schema (via genschema) documents all fields with defaults.
6ab5046a — Town-root CLAUDE.md template with operational awareness
guidance for all agents.
Done:operational-awareness global fragment with identity guard + Dolt
diagnostics-before-restart protocol.
b06df94d — --to flag for mail send. Accepts well-known role addresses.
Done:--to flag added. Recipients validated against config agents (ZFC).
[-] 9a242b6c — Path references fixed: ~/.gt/ to $GT_TOWN_ROOT/.
N/A — Gas Town-only path fix. Gas City uses {{ .CityRoot }} template vars.
[~] 9 new formula files identified: idea-to-plan pipeline + dog formulas.
Dog formulas done (Section 8). Idea-to-plan pipeline blocked on Section 1
(persistent polecat pool changes dispatch model).
[~] Witness behavioral fixes: persistent polecat model, swim lane rule.
Blocked on Section 1 (persistent polecat pool).
[~] Polecat persist-findings.
Blocked on Sections 1/2 (polecat lifecycle).
[-] Settings: skipDangerousModePermissionPrompt.
N/A — Gas Town doesn’t have this setting either. Gas City already handles
permission warnings via AcceptStartupDialogs() in dialog.go.
[-] Dangerous-command guard hooks.
N/A — prompts already describe preferred workflow (push to main, use
worktrees). Hard-blocking PRs and feature branches limits implementer
creativity. The witness wisp-vs-molecule guards remain (correctness),
but workflow guards are prompt-level guidance, not enforcement.
Extends Section 11. Go code making decisions that belong in prompts or
formulas — refactored or removed.
[-] ee0cef89 — Remove IsBeadActivelyWorked() (ZFC violation). Go was
deciding whether a bead was “actively worked” — a judgment call that belongs
in the agent prompt via bead state inspection.
N/A — Gas City never had this function. Witness prompt already handles
orphaned bead recovery and dedup at the prompt layer (lines 85-104).
[-] 7e7ec1dd — Doctor Dog delegated to formula. 565 lines of Go decision
logic replaced with formula-driven advisory model. The Go code only provides
data; the formula makes decisions.
N/A — Gas City was formula-first for Doctor Dog. mol-dog-doctor.formula.toml
in dolt-health/ topology already uses the advisory model upstream is
converging toward. No imperative Go health checks ever existed.
[-] efcb72a8 — Wisp reaper restructured as thin orchestrator. Decision
logic (which wisps to reap, when) moved to formula; Go code only executes
the mechanical reap operation.
N/A — Gas City has no wisp reaper Go code. Our mol-dog-reaper.formula.toml
already has the 5-step formula (scan → reap → purge → auto-close → report)
that upstream’s Go is converging toward.
[-] 1057946b — Convoy stuck classification. Replaced Go heuristics for
“is this convoy stuck?” with raw data surfacing. Agent reads convoy state
and decides.
N/A — Gas City has no convoy Go code. Convoys are an open design item
(FUTURE.md). When built, will surface raw data per ZFC from the start.
[-] 4cc3d231 — Replace hardcoded role strings with constants. Removes
string literals like "polecat", "witness" from Go logic paths.
N/A — Gas City has zero hardcoded roles by design. Upstream centralizes
role names as Go constants; Gas City eliminates them entirely. The
roleEmoji map remains a known deferred item from S11.
[-] a54bf93a — Centralize formula names as constants. Formula name
strings gathered into a single constants file instead of scattered literals.
N/A — Gas City discovers formula names from TOML files at runtime.
Formula names live in config, not Go constants.
[-] 1cae020a — Typed ZombieClassification replaces string matching.
Go switches on typed enum instead of if classification == "zombie".
N/A — Gas City has no compiled zombie classifier. Witness handles
zombie/stuck detection via prompt-level judgment.
376ca2ef — Compactor ZFC exemption documented. Compactor’s Go-level
decisions (when to compact, threshold checks) explicitly documented as
acceptable ZFC exceptions with rationale.
Done: mol-dog-compactor.formula.toml updated to v2 — added surgical mode,
ZFC exemption section, concurrent write safety docs, mode/keep_recent
vars, dolt_gc in compact step, pre-flight row count verification.
Also updated mol-dog-reaper.formula.toml to v2 — added anomaly detection,
mail purging, parent-check in reap query, mail_delete_age/alert_threshold/
dry_run/databases/dolt_port vars.
Extends Section 12c. More hardcoded thresholds moved to config.
[-] f71e914b — Witness patrol thresholds config-driven (batch 1).
Heartbeat staleness, idle detection, and escalation thresholds now read
from config instead of Go constants.
N/A — Gas City was config-first from inception. [daemon] section has
max_restarts, restart_window, idle_timeout, health_check_interval
all configurable. Thresholds were never hardcoded.
[-] a3e646e3 — Daemon/boot/deacon thresholds config-driven (batch 2).
Boot triage intervals, deacon patrol frequency, and daemon restart windows
all configurable.
N/A — same as above. Gas City daemon config covers these knobs.
Extends Sections 8 and 10. New formula capabilities and molecule lifecycle
improvements.
ecc6a9af — pour flag for step materialization. When set, formula
steps are materialized as child beads (opt-in). Default remains root-only
wisps per Section 7.
Done: Added Pour and Version fields to Formula struct in
internal/formula/formula.go. Parser preserves the field; schema
regenerated. Behavioral use (creating child beads) deferred until
molecule creation supports it.
8744c5d7 — dolt-health step added to deacon patrol formula.
Deacon checks Dolt server health as part of its regular patrol cycle.
Done: Added gc dolt health command (--json for machine-readable output)
to internal/dolt/health.go + cmd/gc/cmd_dolt.go. Checks server status,
per-DB commit counts, backup freshness, orphan DBs, zombie processes.
Added dolt-health step to deacon patrol formula with threshold table
and remediation actions (compactor dispatch, backup nudge, orphan cleanup).
Existing system-health step (gc doctor) retained as a separate step.
[~] f11e10c3 — Patrol step self-audit in cycle reports. Patrol formulas
emit a summary of which steps ran, skipped, or errored at end of cycle.
Deferred: requires gc patrol report --steps (no patrol reporting CLI yet).
Concept is valuable — implement when patrol reporting infrastructure exists.
3accc203 — Deacon Capability Ledger. Already at parity: all 6 role
templates include shared/capability-ledger.md.tmpl (work/patrol/merge
variants). Hooked/pinned terminology also already correct in propulsion
templates. Gas City factored upstream’s inline approach into shared fragments.
117f014f — Auto-burn stale molecules on re-dispatch. Confirmed Gas
City had the same bug: stale wisps from failed mid-batch dispatch blocked
re-sling. Fixed: checkNoMoleculeChildren and checkBatchNoMoleculeChildren
now skip closed molecules and auto-burn open molecules on unassigned beads.
[-] 9b4e67a2 — Burn previous root wisps before new patrol. Gas City’s
controller-level wisp GC (wisp_gc.go) handles accumulation on a timer.
Upstream needed per-cycle GC because Gas Town lacks controller-level GC.
[-] 53abdc44 — Pass --root-only to autoSpawnPatrol. Gas City is
root-only by default (MolCook creates no child step beads). Already at parity.
[-] 5b9aafc3 + 5769ea01 — Wisp orphan prevention. Gas City’s
formula-driven patrol loop (agent pours next wisp before burning current)
avoids the status-mismatch bug that caused duplicate wisps in Gas Town’s
Go-level autoSpawnPatrol.
Extends Section 6. Witness patrol behavioral improvements and health
monitoring enhancements.
[-] cee8763f + 35353a80 — Handoff cooldown. Gas Town Go-level patrol
logic. In Gas City, anti-ping-pong behavior is prompt guidance in the
witness formula, not SDK infrastructure (ZFC principle).
ac859828 — Verify work on main before resetting abandoned beads.
Added merge-base check to witness patrol formula Step 3: if branch is
already on main, close the bead instead of resetting to pool.
[-] a237024a — Spawning state in witness action table. Gas Town
Go-level survey logic. Gas City witness checks live session state via CLI;
spawning agents have active sessions visible to the witness.
[-] c5d486e2 — Heartbeat v2: agent-reported state. Requires Go changes
to agent protocol. Gas City uses inference-based health (wisp freshness,
bead timestamps). Self-reported state deferred to heartbeat SDK work.
[-] 33536975 — Witness race conditions. Gas Town-internal fix for
concurrent witness patrol runs conflicting on Dolt writes. N/A — Gas City
uses filesystem beads with atomic writes.
[-] 1cd600fc + 21ec786e — Structural identity checks. Gas Town
internal validation that agent identity matches expected role assignment.
N/A — Gas City agents are identified by config name, not role.
Extends Section 12b. Dispatch improvements and error handling.
[-] a6fa0b91 + 5c9c749a + 65ee6d6d — Per-bead respawn circuit
breaker. Already covered by Gas City’s spawn-storm-detect exec
order in maintenance pack (ported in S6b).
[-] 783cbf77 — --agent override for formula run. Gas City sling
already takes target agent as positional arg. N/A.
[-] d980d0dc — Resolve rig-prefixed beads in sling. Already at parity:
findRigByPrefix, beadPrefix, checkCrossRig in cmd_sling.go.
18f. Convoy parity gaps (discovered during S18.2 review)
Gas Town convoys are a cross-rig coordination mechanism with reactive
event-driven feeding. Gas City has convoy CRUD/status/autoclose but is
missing the coordination layer:
Reactive feeding — feedNextReadyIssue triggered by bead close
events via CheckConvoysForIssue. Without this, convoy progress depends
on polling (patrol cycles finding stranded work).
tracks dependency type — convoys use tracks deps to link
issues across rigs. Gas City beads use parent-child only.
Cross-rig dependency resolution — isIssueBlocked checks
blocks, conditional-blocks, waits-for dep types with cross-rig
status freshness.
Staged convoy statuses — staged_ready, staged_warnings
prevent feeding before convoy is launched.
Rig-prefix dispatch — rigForIssue + dispatchIssue routes
each convoy leg to its rig’s polecat pool based on bead ID prefix.
Gas City sling has prefix resolution but convoy doesn’t use it.
[-] 9f33b97d — Nil cobra.Command guard. Gas Town internal defensive
check. N/A.
[-] 5d9406e1 — Prevent duplicate polecat spawns. Gas Town internal
race condition in spawn path. N/A — Gas City’s reconciler handles this
via config-driven pool sizing.
Extends Section 4. Adds a pre-verification step before merge queue entry.
[~] 2966c074 — Pre-verify step in polecat work formula. Concept is
sound (polecat runs build+test before submission to reduce refinery
rejects). Deferred: add pre-verify step between self-review and
submit-and-exit in mol-polecat-work when we tune the pipeline.
[-] 73d4edfe — gt done --pre-verified flag. Gas Town CLI flag.
Gas City can use bead metadata (--set-metadata pre_verified=true)
directly. N/A.
[~] 5fe1b0f6 — Refinery pre-verification fast-path. Deferred with
S20 pre-verify step above — refinery checks metadata.pre_verified
and skips its own test run.
[-] 07b890d0 — MRPreVerification bead fields. Gas Town MR bead
infrastructure. N/A — Gas City uses work beads directly.
[-] b24df9ea — Remove “reject back to polecat” from refinery template.
Gas Town template simplification. Our refinery formula already handles
rejection cleanly via pool reset.
[-] 33364623, 45541103, e2695fd6 — Gas Town internal MR/refinery
fixes. Bug fixes in MR state machine. N/A.
Extends Section 1. Incremental improvements to the persistent polecat model.
[-] 4037bc86 — Unified DoneIntentGracePeriod constant. Gas Town Go
daemon code. N/A.
[-] e09073eb — Idle sandbox detection matches actual cleanupStatus.
Gas Town Go witness code. N/A.
[-] 082fbedc + 5fa9dc2b — Docs: remove “Idle Polecat Heresy”.
Gas Town moved to persistent polecats where idle is normal. Gas City
polecats are still ephemeral (spawn, work, exit) — the Heresy framing
is correct for our model. Update when/if we add persistent polecats.
[-] c6173cd7 — gt done closes hooked bead regardless of status.
Gas Town gt done CLI code. N/A — Gas City polecats use bd update
directly in the formula submit step.
Bulk N/A items grouped by sub-theme for fast scanning. These are Gas Town
implementation details that don’t affect Gas City’s architecture or
configuration patterns.
[-] ~7 commits fixing time-of-check/time-of-use races in compiled Go code.
Gas Town-specific concurrency bugs in daemon, witness, and sling hot paths.
N/A — Gas City’s architecture avoids these patterns (filesystem beads with
atomic rename, no concurrent Dolt writes).
[-] ~10 commits for Dolt SQL admin operations, server restart logic,
connection pool tuning, and query optimization. Gas City uses filesystem
beads, not Dolt. N/A.
[-] ~7 commits improving daemon PID file handling, process discovery,
and graceful shutdown sequencing. Gas City’s controller uses flock(2)
for singleton enforcement and direct process table queries. N/A.
[-] ~3 commits for sandbox proxy mTLS certificate rotation and proxy
health checks. Gas Town infrastructure for isolated polecat networking.
N/A — Gas City sandboxes are local worktrees.
[-] ~6 commits adding themed name pools (e.g., mythology, astronomy) for
agent naming. Gas Town-specific flavor. N/A — Gas City uses config-defined
agent names.
Extends Section 11 and 14. Go code making decisions that belong in prompts
or formulas.
[-] 037bb2d8 — Remove ZFC-violating dead pane distinction from Go.
Deacon Start() had cognitive branching (IsPaneDead vs zombie shell, magic
500ms sleep). Replaced with uniform kill+recreate; auto-respawn hook
handles clean exits.
N/A — Gas City’s reconciler is purely mechanical. No dead-pane-vs-zombie
logic exists. Kill+recreate is already the only path.
[-] a5c5e31d — Replace hardcoded help-assessment escalation heuristics
with keyword-based classification. Go-level HelpCategory/HelpSeverity types
for structured triage of HELP messages.
N/A — Gas City has no Go-level escalation logic. Witness handles HELP
assessment at the prompt layer.
[-] 777b9091 — Replace hardcoded isKnownAgent switch with
config.IsKnownPreset. Removes brittle switch statement over agent names.
N/A — Gas City has zero hardcoded role/agent names by design.
[-] b5229763 — Consolidate GUPP violation threshold into single
constant (30 min, defined in 3 files → 1).
N/A — Gas City’s GUPP timeout is per-agent config (idle_timeout),
never hardcoded.
[-] f3d47a96 — Daemon killed witness/refinery sessions after 30 min
of no tmux output, treating idle agents as “hung.” But idle agents waiting
for work legitimately produce no output. The deacon patrol’s health-scan
step already does context-aware stuck detection.
SDK: Gas City’s health patrol should be audited to ensure it never
kills agents for being idle. Currently health patrol uses idle_timeout
config — verify the semantics are “idle since last prompt response” not
“no tmux activity.”
[-] 3f699e7d — Replace IsAgentAlive process-tree probing with
GT_AGENT_READY tmux env var. Agent’s prime hook sets the var; WaitForCommand
clears it on entry then polls for it. Pure declared-state observation
instead of ZFC-violating process tree crawling.
SDK: Gas City already has ready_prompt_prefix in config for prompt-
based readiness detection. The env var pattern is a useful complement for
agents that wrap the actual CLI process (e.g., bash → claude). Consider
adding GC_AGENT_READY support to WaitForRuntimeReady.
6bc898ce — Change default nudge delivery from immediate (tmux
send-keys) to wait-idle (poll for idle prompt before delivering).
Immediate mode interrupted active tool calls — the agent received nudge
text as user input mid-execution, aborting work. Wait-idle falls back to
cooperative queue (delivered at next turn boundary via UserPromptSubmit
hook). --mode=immediate preserved for emergencies.
SDK: Gas City’s NudgeSession currently uses direct tmux send-keys
(immediate mode). Should add WaitForIdle as the default delivery path
with immediate as opt-in override. Also update nudge command help text.
dfd945e9 — WaitForIdle returned immediately when it found a ❯
prompt in the pane buffer, but during inter-tool-call gaps the prompt
remains visible in scrollback while Claude Code is actively processing.
Fix: (1) check Claude Code status bar for “esc to interrupt” — if present,
agent is busy; (2) require 2 consecutive idle polls (400ms window) to
confirm genuine idle state.
SDK: Gas City’s WaitForIdle (tmux.go:1947) has exactly this bug —
single-poll prompt detection without status bar check or confirmation
window. Port the 2-poll + status bar check.
[-] 51549973 — Consolidate 7 per-agent hook installer packages into a
single generic InstallForRole() function. Templates live in a centralized
directory; adding a new agent requires only a preset entry + template files.
No Go boilerplate.
N/A — Gas City already has the generic install_agent_hooks config field
[-] 730207a0 + 4c9767a1 — Remove old HookInstallerFunc registry and
per-agent packages. Cleanup of the old system.
N/A — Gas City never had per-agent hook packages.
86e3b89b — Add Cursor hooks support for polecat agent integration.
SupportsHooks = true for Cursor preset, dedicated hook config files for
autonomous and interactive modes.
Done: Added Cursor hook support to internal/hooks/. Moved cursor
from unsupported to supported, added config/cursor.json with Cursor’s
native hook format (sessionStart, preCompact, beforeSubmitPrompt, stop)
calling gc prime / gc mail check —inject / gc hook —inject.
install_agent_hooks = ["cursor"] now works.
[-] fa9dc287 — Remove hook_bead slot from agent beads. The work bead
itself already tracks status=hooked and assignee=<agent>. The slot was
redundant and caused cross-database warnings. updateAgentHookBead is now
a no-op; done.go uses issueID param directly; unsling.go queries by
status+assignee instead of agent bead slot.
Gastown: Our polecat work formulas reference hook_bead at
mol-polecat-work.formula.toml:95 and mol-polecat-work-reviewed.formula.toml:136.
Verify bd hook show still works the same way (it should — the slot
removal is internal to gt, not bd). The formula text “The hook_bead is
your assigned issue” is still accurate terminology since the concept
exists — only the internal storage slot was removed.
[-] 38bc4479 — Add --cascade flag to bd close / gt close.
Recursively closes all open children depth-first before closing the parent.
Automatic reason noting the cascade.
Gastown: Update formulas and prompts that close parent beads (epics,
molecules) to use --cascade where appropriate. Currently formulas use
plain bd close; --cascade saves agents from manually closing children.
Add to quick-reference tables alongside bd close.
[-] b45d1e97 — Add cycle guard (visited set) and depth limit (50) to
cascade close. Prevents infinite recursion from dependency cycles.
N/A — Safety fix for the cascade implementation above.
[-] fdae9a5d — Deprecate CreateOptions.Type in favor of Labels.
N/A — Gas City beads already use labels as primary taxonomy.
[-] d27b9248 — Migrate ListOptions.Type caller to Label filter.
N/A — Gas Town internal API migration.
2dd21003 — Shorten reaper TTLs: auto-close stale issues 30d → 7d,
purge closed wisps 7d → 3d, purge closed mail 7d → 3d.
Gastown: Update mol-dog-reaper.formula.toml vars to match new
defaults: stale_issue_age = "7d", purge_age = "3d",
mail_delete_age = "3d". Our formula already has these as configurable
vars — just update the default values.
[-] 2af747fb — Derive tmux socket from town name instead of defaulting
to “default”. Fixes split-brain where daemon creates sessions on wrong
socket after restart without env var.
N/A — Gas City already has [session] socket config field. Socket name
flows through all tmux operations. Already at parity (S12d).
[-] 3a5980e4 — Fix lock.go to query correct tmux socket; gt down
cleans legacy sessions on “default” socket.
N/A — Gas Town split-brain cleanup. Gas City doesn’t have the legacy
socket migration problem.
[-] b1ee19aa — Refresh cycle bindings when prefix pattern is stale.
N/A — Gas Town tmux keybinding fix.
[-] f339c019 — Reload prefix registry on heartbeat to prevent ghost
sessions.
N/A — Gas Town daemon internal. Gas City discovers sessions from config.
[~] 56eb2ed6 — Add bd close to command quick-reference tables in all
role templates (crew, mayor, polecat, witness). Agents frequently guessed
wrong commands (bd complete, bd update --status done). Also adds
“valid statuses” reminder line.
Gastown: Verify all role prompts in examples/gastown/ have bd close
in their quick-reference tables. Currently only crew prompt has it at
line 328. Add to mayor, polecat, witness, and refinery prompts. Add valid
statuses line.
[~] 330aec8e — Context-budget guard as external bash script (not
compiled Go). Threshold tiers: warn 75%, soft gate 85%, hard gate 92%.
All thresholds configurable via env vars. Sets precedent that new guards
don’t need Go PRs.
Deferred: interesting capability for maintenance pack. Would be a hook
script or exec order that monitors agent context usage and triggers
handoff/restart. Requires GC_CONTEXT_BUDGET_TOKENS env var plumbing.
[-] dafcd241 — Set POLECAT_SLOT env var for test isolation. Unique
integer (0, 1, 2, …) based on polecat position among existing polecat
directories. Enables port offsetting: BACKEND_PORT = 8100 + POLECAT_SLOT.
Gastown: Add POLECAT_SLOT documentation to polecat prompt and/or
polecat work formula. Currently referenced only in witness prompt. Polecats
need to know the env var exists so they can use it for port isolation.
[-] a4cb49d7 — Add branch contamination preflight to gt done. Checks
that the worktree is on the expected branch before pushing.
N/A — Gas Town gt done internal. Gas City polecats use git push
directly in the formula submit step; branch verification is prompt-level.
[~] 0516f68b — Add 30-minute TTL to sling contexts. Orphaned sling
contexts (from failed spawns) permanently blocked tasks from re-dispatch.
Deferred: when Gas City implements sling scheduling, include context TTL
from the start. Design note captured.
[-] 65c0cb1a — Cap stale patrol cleanup at 5 per run, break early on
active patrol found. Prevents Dolt query explosion under load.
N/A — Gas City wisp_gc handles patrol cleanup differently (timer-based).
[-] 72798afa — 5-minute grace period before auto-closing empty convoys.
Created convoys were closed before sling’s bd dep add propagated.
N/A — Gas Town convoy fix. Already captured in S18f convoy parity gaps.
[-] 366a245d — Increase convoy ID entropy (3 → 5 base36 chars).
N/A — Gas Town convoy ID format.
[-] 7539e8c5 — Resolve tracked external IDs in convoy launch collection.
N/A — Gas Town convoy fix.
[-] 64bd736e + a9270cd9 + e34ac7c5 + 1fc9804e +
35929e81 + 480f00f0 — Docker-compose and Dockerfile for Gas Town.
N/A — Gas Town deployment infrastructure.
Raw graph delta since the previous cut point is 433 non-merge commits. 78
of those SHAs were already covered in earlier sections because side branches
merged later. Delta 4 therefore reviews the remaining 355 unique SHAs once,
bucketed into SDK gaps, Gastown example gaps, or no-action items.
[~] 63ebe645 + 3998fee1 + 39812adc + b03c4bb9 + 3430fc42 + 7e5dbf59 + de818831 — Hook/runtime parity for non-Claude agents.
Upstream moved Copilot to executable hooks, added Codex hook profiles, and fixed non-Claude prime --hook behavior. Gas City still treats Codex as no-hook and still installs Copilot via .github/copilot-instructions.md. This is a real SDK parity gap for Gastown users on Codex/Copilot.
[~] 7228d543 + 2abc36d7 + 3d5c721d + efb16615 + 7f3a8130 + daad4c90 + 6a0f4988 — Queued/deferred nudge delivery for non-Claude agents.
Upstream now has a queue/poller path, deferred delivery, and reply-reminder nudges for runtimes without prompt detection. Gas City still has wait-idle plus immediate fallback only. This is an SDK gap, and the current Gastown prompt already documents queue/wait-idle modes we do not implement.
[~] 8da798be + 43c2253c + 712c5b5f + ec99d68e + e502a90c + c11da4d8 + c889e513 + 3324f10b + 77092bb2 + 61b88b0e — Crew targeting and gt assign ergonomics.
Upstream added town-level crew_agents, gt sling --crew, and a one-shot gt assign flow with crew-name inference and validation. Gas City has neither gc assign nor crew-targeting equivalents today. This is a user-facing SDK gap for people dispatching work through Gastown crews.
[~] bfa4696c + 5850beaa + 96008270 + 560a2c5c + 7eb47927 + 897e42df + bfa042aa + 30a91067 + 5f9493fc + 3fde5616 + d0404d40 + 65445cd9 + da32d2c9 + f451959f + 24654548 + cffa8b40 — ACP propulsion parity.
Gas City already has ACP transport, but it does not have upstream’s propulsion stack: output suppression while propelled, trigger detection, larger buffering, event-driven propeller handoff, or the follow-up safety/test coverage. Treat this as an SDK follow-up gap rather than a missing first implementation.
[~] a6e349b8 + e9c4c65f + 64fc8ccf + 56e6ddf3 — Formula/runtime support needed by newer Gastown flows.
These commits push base-branch and formula-var context through sling/done and make no_merge interact correctly with polecat completion checks. Gas City currently has merge_strategy metadata and formula layering, but not this newer variable propagation path. This is an SDK gap if we want the newer Gastown formulas to behave correctly.
[~] 2e69cdfb + 716302d4 + 58fcf69d + 4b118101 + 48aeff95 + f09a1ddd — Event-driven polecat/refinery lifecycle.
Current examples/gastown still uses the older merge-failure/retry loop. It does not have FIX_NEEDED, awaiting_verdict, event-driven wake-up, or persisted merge-failure context. This is an example-pack drift, not a new SDK primitive.
[~] 77c6683f + 48ed9983 + 07a89fcf — /review and merge-strategy workflow changes.
Upstream added a review command with A-F grading and taught refinery patrol to read merge strategy from config. Our Gastown example does not ship that command or the updated refinery formula. This belongs in the example pack.
[~] 6c300d48 + 67cffe50 — mol-idea-to-plan v2.
Upstream replaced the older idea-to-plan flow with an iterative review-round variant. We do not have that workflow in examples/gastown today.
[~] 35a2697b + adee1fa6 — Crew/workspace ignore hygiene.
Upstream now ignores state.json in crew workspaces. Our Gastown worktree bootstrap script still appends the older ignore block, so provider runtime state can still dirty worktrees. This is an example-pack cleanup item.
[-] 7fcfe8e8 — Already covered in Gas City.
Gas City already has formula extends and layered composition. The
wait-idle default delivery items from this same upstream window were
already closed in Delta 3 and are intentionally not duplicated here.
[-] 551582a1 + 8137131d + ac4b65d1 — Docker / sandbox deployment work.
Container/sandbox packaging work for upstream GT deployments. Not part of the Gas City Gastown migration target.
[-] d9a72a5a + 04b347a2 + 482e20ff + b9b873ac + 3bfb3b71 + 00910d79 — Wasteland-only features.
These are for the Wasteland domain, not Gastown-on-Gas-City.
[-] 5a5deaac + 7a4ac8f7 + 879ea531 + 7478fd2b + f428b4f5 + 4369ae3f + 0f33903b + 94cd895d + 2fc2bab2 + 37346f36 + 7b322036 + a246a57f + 380fc9c2 + 59783678 + 44fe386a + d5b5d209 + c7cfa2d6 + d852cd4c + b38e8755 + a5feda45 — Plugin and dog ecosystem changes we are not porting.
This whole cluster assumes upstream’s plugin-oriented dog system (plugin.md, run.sh, gt plugin sync, exec-wrapper plugins, dolt-snapshots, git-hygiene, github-sheriff). Our current Gastown example uses formula/order scripts instead, so these are outside the migration scope.
[-] b3e154ca + 60743cb3 + 53567e64 + 4db877a0 + cf565d0b + a3fb88a4 + 630e879b + c1b25f94 + 3bf8a66e + 039f8dae + 1a568fb1 + 014bb428 + 2721ca2e + 6202ffc0 + 5e0d1c33 + fcb8f0e0 + 274f83b1 + dc1d11db + 8eea55bb + 554f4e92 + b965060d + aac5cfca + 67af59b3 + 309e0b08 + 3164aad7 — Beads routing / parser hardening.
Upstream spent a lot of commits hardening bd JSON parsing, route/prefix lookup, hook-bead plumbing, and rig-db selection. Gas City already has tolerant bd parsing and route files, and the remaining fixes are tightly coupled to upstream’s internal beads layer. Treat as no-action unless we later rebase onto that exact implementation.
[-] e78cad1e + 4a8cfa6d + 85b6309a + 252f12aa + 8278b1dc + 67d9b897 + a42a0323 + c0a06a67 + b734d532 + 6bdd92f7 + f6935ac4 — Upstream-only formula rendering polish.
These are mostly prime_molecule and refinery-formula rendering improvements inside upstream GT. Our current example does not use that same compiled rendering path, so these are not direct parity blockers.
Raw graph delta since the previous cut point is 130 commits: 86 non-merge
commits plus 44 merge commits on top of 67cffe50. I reviewed the window
against current Gas City SDK code and the examples/gastown pack/config.
Delta 5 only lists new carry-forward items that still appear relevant after
the Delta 4 landing work; already-landed Delta 4 parity items are not repeated.
1d4ba3f8 + b91fdace + f3183e6a — Gemini hook compatibility and stale-template auto-upgrade.
Landed in Gas City via 0b7e7ec2 (internal/hooks/hooks.go): Gemini hooks now render an install-time absolute gc path, and the installer upgrades known-stale generated Gemini settings instead of preserving broken export PATH=... && gc ... templates indefinitely.
305f9ee0 — Codex workspace trust dialog handling on startup.
Landed in Gas City via 2fcb0952 (internal/runtime/dialog.go): startup dialog acceptance now recognizes Codex’s “Do you trust the contents of this directory?” prompt alongside the existing Claude trust/bypass dialogs, so first-run Codex sessions no longer wedge at trust confirmation.
894049af + 829c1510 — Shell-quote provider args when building runtime commands.
Landed in Gas City via bdbbf43c (internal/config/provider.go): provider args now use shared shell-quoting before command-string assembly, and the session/dashboard parsing path was updated to round-trip those quoted commands correctly instead of misparsing metacharacters or spaced args.
aecdc21c + e6516e5c — Keep worktree ignores local and cover modern runtime files.
Landed in Gas City via f9e7205f (examples/gastown/packs/gastown/scripts/worktree-setup.sh): polecat worktree bootstrap now writes runtime ignore patterns to the git exclude file resolved by git rev-parse --git-path info/exclude instead of mutating tracked .gitignore, and the local ignore block now covers modern runtime paths including .claude/, .codex/, .gemini/, .opencode/, .runtime/, .logs/, and state.json.
[~] 1916b730 — Polecats should consult repo CLAUDE.md / AGENTS.md when gate vars are unset.
Upstream stopped treating empty setup_command / typecheck_command / lint_command / build_command / test_command vars as a silent skip and explicitly told polecats to read project CLAUDE.md / AGENTS.md for the real Definition of Done. Gas City’s cmd/gc/formulas/mol-polecat-base.formula.toml still tells polecats to skip empty commands silently, which can bypass project-specific gates in Gastown rigs that rely on repo instructions instead of pack config.
[-] 754eb0cb + 7035b013 — Non-Claude attach liveness env plumbing.
This was a bug in upstream’s gt crew at flow. Gas City does not have that same path, and its reconciler already passes config-derived ProcessNames directly when checking live sessions.
[-] cfa46f61 + 728e5123 — Rig default_formula resolution.
Gas City uses agent-level default_sling_formula, not rig-level workflow settings. Gastown’s polecat pack entry already sets default_sling_formula (examples/gastown/packs/gastown/pack.toml).
[-] f613ef14 — Prior-attempt context injection when re-dispatching to polecat.
Gas City’s direct-bead workflow already preserves metadata.branch and metadata.rejection_reason on the same work bead, which gives the next polecat the equivalent resume context without separate MR lookup.
[-] 2d70c434 — Missing refinery worktree auto-repair.
Gas City’s worktree-setup.sh (examples/gastown/packs/gastown/scripts/worktree-setup.sh) already recreates missing worktrees on session start. Upstream’s corrupted .git repair case is narrower, and not a distinct carry-forward parity item yet.
[-] 6c737acc — Idle polecat reuse with live sessions.
Relevant to the open same-session polecat recovery design issue, but Gas City does not yet implement idle-polecat reuse. Keep this bundled with the broader pooled-slot / same-session recovery work rather than treating it as an independent parity item now.
[-] ee2d0ea1 + cba12f34 + a4f99b59 — Repo-sourced rig settings via .gastown/settings.json.
This is upstream-specific config architecture. Gas City’s pack/config model is different, so there is no direct port.
[-] bb36a57f + 7335e05b + e36fb88c — Promptless role-agent startup wording.
The specific upstream prime_output.go wording change does not map 1:1 to Gas City’s prompt-template + hook-beacon startup path. Keep watching this area, but there is no concrete port item from these commits alone.
[-] 0ea67982 + d2fb7f92 + 3fa6d9e2 — Auto-supersede stale MR attempts.
Real upstream fix, but tightly coupled to upstream’s MR-bead queue and repeat-attempt lifecycle. Revisit only if Gas City’s merge_strategy=mr flow grows an equivalent repeated-attempt contract.