chore: regenerate formulas and fix lint warnings
- Regenerate formulas to sync with source templates - Fix unparam lint warnings in status.go (unused townRoot parameters) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -734,7 +734,7 @@ func formatMQSummaryCompact(mq *MQSummary) string {
|
||||
}
|
||||
|
||||
// renderAgentCompactWithSuffix renders a single-line agent status with an extra suffix
|
||||
func renderAgentCompactWithSuffix(agent AgentRuntime, indent string, hooks []AgentHookInfo, townRoot string, suffix string) {
|
||||
func renderAgentCompactWithSuffix(agent AgentRuntime, indent string, hooks []AgentHookInfo, _ string, suffix string) {
|
||||
// Build status indicator (gt-zecmc: use tmux state, not bead state)
|
||||
statusIndicator := buildStatusIndicator(agent)
|
||||
|
||||
@@ -774,7 +774,7 @@ func renderAgentCompactWithSuffix(agent AgentRuntime, indent string, hooks []Age
|
||||
}
|
||||
|
||||
// renderAgentCompact renders a single-line agent status
|
||||
func renderAgentCompact(agent AgentRuntime, indent string, hooks []AgentHookInfo, townRoot string) {
|
||||
func renderAgentCompact(agent AgentRuntime, indent string, hooks []AgentHookInfo, _ string) {
|
||||
// Build status indicator (gt-zecmc: use tmux state, not bead state)
|
||||
statusIndicator := buildStatusIndicator(agent)
|
||||
|
||||
|
||||
@@ -62,8 +62,7 @@ Polecat is actively working. Monitor for stuck or completion.
|
||||
|
||||
**Periodic checks:**
|
||||
- Use standard nudge protocol from Witness CLAUDE.md
|
||||
- Watch for POLECAT_DONE mail (primary completion signal)
|
||||
- Check tmux session: `gt session status {{rig}}/polecats/{{polecat}}`
|
||||
- Watch for POLECAT_DONE mail or agent_state=done
|
||||
|
||||
**Signs of progress:**
|
||||
- Git commits appearing
|
||||
@@ -74,12 +73,11 @@ Polecat is actively working. Monitor for stuck or completion.
|
||||
- Idle >15 minutes
|
||||
- Repeated errors
|
||||
- Explicit "I'm stuck" messages
|
||||
- Agent bead shows stuck state: `bd show <agent-bead-id>`
|
||||
|
||||
**If POLECAT_DONE mail received:**
|
||||
**If POLECAT_DONE received or agent_state=done:**
|
||||
Proceed to verifying step.
|
||||
|
||||
**Exit criteria:** Polecat signals completion via POLECAT_DONE mail."""
|
||||
**Exit criteria:** Polecat signals completion (POLECAT_DONE mail or state=done)."""
|
||||
|
||||
[[steps]]
|
||||
id = "verifying"
|
||||
|
||||
@@ -20,7 +20,7 @@ needs = ['process-cleanups']
|
||||
title = 'Ensure refinery is alive'
|
||||
|
||||
[[steps]]
|
||||
description = "Survey all polecats using tmux (discover, don't track).\n\n**Principle**: Agent liveness is discovered from tmux, not recorded in beads.\nOnly non-observable states like 'stuck' are stored in beads.\n\n**Step 1: List polecat sessions**\n\n```bash\n# Find all polecat tmux sessions for this rig\ntmux list-sessions -F '#{session_name}' 2>/dev/null | grep \"^gt-<rig>-\"\n```\n\nFor each session, check if Claude is actively running:\n```bash\n# Check if Claude process is running in the session\ngt session status <rig>/polecats/<name>\n```\n\n**Step 2: For each polecat, assess state**\n\n| Observation | Meaning | Action |\n|-------------|---------|--------|\n| Session exists, Claude running | Actively working | Check progress (Step 3) |\n| Session exists, Claude not running | Zombie session | Kill and respawn if work hooked |\n| No session | Not running | Check if should exist |\n\nAlso check the agent bead for non-observable state:\n```bash\nbd show <agent-bead-id> # Check for stuck, awaiting-gate, etc.\n```\n\n**Step 3: For running polecats, assess progress**\n\nCheck hook_bead to see what they're working on:\n```bash\nbd show <agent-bead-id> # Look at hook_bead field\n```\n\nCapture pane to assess activity:\n```bash\ntmux capture-pane -t gt-<rig>-<name> -p | tail -20\n```\n\nLook for:\n- Recent tool activity → making progress\n- Idle at prompt → may need nudge\n- Error messages → may need help\n\n**Step 3a: For idle polecats (no hook_bead), auto-nuke if clean**\n\nWhen a polecat has no hook_bead, it has no assigned work. Check if safe to nuke:\n\n```bash\n# Check git status in the polecat's worktree\ncd polecats/<name>\ngit status --porcelain # Should be empty (clean)\ngit log origin/main..HEAD # Should have no unpushed commits\n```\n\n**If clean** (no uncommitted changes, no unpushed commits):\n```bash\n# Safe to nuke - no work to lose\ngt polecat nuke <name>\n```\nLog the auto-nuke for audit purposes. No escalation needed.\n\n**If dirty** (uncommitted or unpushed work):\n```bash\n# Escalate to Mayor - polecat has work that might be valuable\ngt mail send mayor/ -s \\\"IDLE_DIRTY: <polecat> has uncommitted work\\\" \\\n -m \\\"Polecat: <name>\nState: no work hooked\nGit status: <uncommitted-files>\nUnpushed commits: <count>\n\nPlease advise: recover work or discard?\\\"\n```\n\n**Rationale**: Idle polecats with clean git state are pure overhead. They have\nno work and no state worth preserving. Nuking them immediately frees resources\nand reduces noise. Only escalate when there's actual work at risk.\n\n**Step 4: Decide action**\n\n| Observation | Action |\n|-------------|--------|\n| Running, recent activity | None |\n| Running, idle 5-15 min | Gentle nudge |\n| Running, idle 15+ min | Direct nudge with deadline |\n| Bead shows stuck | Assess and help or escalate |\n| POLECAT_DONE mail received | Verify cleanup (see Step 4a) |\n\n**Step 4a: Handle POLECAT_DONE**\n\nIn the ephemeral model, POLECAT_DONE triggers immediate cleanup:\n\n1. **Check cleanup_status** in agent bead\n2. **If clean**: Auto-nuke immediately\n ```bash\n gt polecat nuke <name>\n ```\n3. **If dirty**: Create cleanup wisp for manual intervention\n\n**Step 5: Execute nudges**\n```bash\ngt nudge <rig>/polecats/<name> \"How's progress? Need help?\"\n```\n\n**Step 6: Escalate if needed**\n```bash\ngt mail send mayor/ -s \"Escalation: <polecat> stuck\" \\\n -m \"Polecat <name> reports stuck. Please intervene.\"\n```\n\n**Parallelism**: Use Task tool subagents to inspect multiple polecats concurrently.\n\n**Discovery Principle**: Derive state from tmux. Only trust bead state for\nnon-observable conditions like 'stuck' or 'awaiting-gate'."
|
||||
description = "Survey all polecats using agent beads (ZFC: trust what agents report).\n\n**Step 1: List polecat agent beads**\n\n```bash\nbd list --type=agent --json\n```\n\nFilter the JSON output for entries where description contains `role_type: polecat`.\nEach polecat agent bead has fields in its description:\n- `role_type: polecat`\n- `rig: <rig-name>`\n- `agent_state: running|idle|stuck|done`\n- `hook_bead: <current-work-id>`\n\n**Step 2: For each polecat, check agent_state**\n\n| agent_state | Meaning | Action |\n|-------------|---------|--------|\n| running | Actively working | Check progress (Step 3) |\n| idle | No work assigned | Auto-nuke if clean (Step 3a) |\n| stuck | Self-reported stuck | Handle stuck protocol |\n| done | Work complete | Verify cleanup triggered (see Step 4a) |\n\n**Step 3: For running polecats, assess progress**\n\nCheck the hook_bead field to see what they're working on:\n```bash\nbd show <hook_bead> # See current step/issue\n```\n\nYou can also verify they're responsive:\n```bash\ntmux capture-pane -t gt-<rig>-<name> -p | tail -20\n```\n\nLook for:\n- Recent tool activity → making progress\n- Idle at prompt → may need nudge\n- Error messages → may need help\n\n**Step 3a: For idle polecats, auto-nuke if clean**\n\nWhen agent_state=idle, the polecat has no work assigned. Check if it's safe to nuke:\n\n```bash\n# Check git status in the polecat's worktree\ncd polecats/<name>\ngit status --porcelain # Should be empty (clean)\ngit log origin/main..HEAD # Should have no unpushed commits\n```\n\n**If clean** (no uncommitted changes, no unpushed commits):\n```bash\n# Safe to nuke - no work to lose\ngt polecat nuke <name>\n```\nLog the auto-nuke for audit purposes. No escalation needed.\n\n**If dirty** (uncommitted or unpushed work):\n```bash\n# Escalate to Mayor - polecat has work that might be valuable\ngt mail send mayor/ -s \\\"IDLE_DIRTY: <polecat> has uncommitted work\\\" \\\n -m \\\"Polecat: <name>\nState: idle (no hook_bead)\nGit status: <uncommitted-files>\nUnpushed commits: <count>\n\nPlease advise: recover work or discard?\\\"\n```\n\n**Rationale**: Idle polecats with clean git state are pure overhead. They have\nno work and no state worth preserving. Nuking them immediately frees resources\nand reduces noise. Only escalate when there's actual work at risk.\n\n**Step 4: Decide action**\n\n| Observation | Action |\n|-------------|--------|\n| agent_state=running, recent activity | None |\n| agent_state=running, idle 5-15 min | Gentle nudge |\n| agent_state=running, idle 15+ min | Direct nudge with deadline |\n| agent_state=stuck | Assess and help or escalate |\n| agent_state=done | Verify cleanup triggered (see Step 4a) |\n\n**Step 4a: Handle agent_state=done**\n\nIn the ephemeral model, polecats with agent_state=done and cleanup_status=clean\nshould already be nuked by HandlePolecatDone. Finding one here indicates:\n\n1. **Stale agent bead** - polecat was nuked but bead remains\n ```bash\n # Verify polecat doesn't exist anymore\n ls polecats/<name> 2>/dev/null || echo \"Already nuked\"\n ```\n If nuked, the agent bead is stale. Clean it up or ignore.\n\n2. **Cleanup wisp exists** - polecat has dirty state needing intervention\n ```bash\n bd list --wisp --labels=polecat:<name> --status=open\n ```\n Process in process-cleanups step.\n\n3. **No wisp, polecat exists** - POLECAT_DONE mail was missed\n Try auto-nuke directly (ephemeral model):\n ```bash\n # Check cleanup_status and nuke if clean\n gt polecat nuke <name> # Will fail if dirty\n ```\n If nuke fails (dirty state), create cleanup wisp for investigation.\n\n**Step 5: Execute nudges**\n```bash\ngt nudge <rig>/polecats/<name> \"How's progress? Need help?\"\n```\n\n**Step 6: Escalate if needed**\n```bash\ngt mail send mayor/ -s \"Escalation: <polecat> stuck\" \\\n -m \"Polecat <name> reports stuck. Please intervene.\"\n```\n\n**Parallelism**: Use Task tool subagents to inspect multiple polecats concurrently.\n\n**ZFC Principle**: Trust agent_state from beads. Don't infer state from PID/tmux."
|
||||
id = 'survey-workers'
|
||||
needs = ['check-refinery']
|
||||
title = 'Inspect all active polecats'
|
||||
|
||||
6188
internal/formula/formulas/towers-of-hanoi-10.formula.toml
Normal file
6188
internal/formula/formulas/towers-of-hanoi-10.formula.toml
Normal file
File diff suppressed because it is too large
Load Diff
812
internal/formula/formulas/towers-of-hanoi-7.formula.toml
Normal file
812
internal/formula/formulas/towers-of-hanoi-7.formula.toml
Normal file
@@ -0,0 +1,812 @@
|
||||
description = """
|
||||
AGENT EXECUTION PROTOCOL - Towers of Hanoi (7 disks, 127 moves)
|
||||
|
||||
PURPOSE: This is a durability proof, not computation. Steps are pre-computed.
|
||||
Your job is to execute them mechanically, proving crash-recovery at scale.
|
||||
|
||||
EXECUTION LOOP:
|
||||
1. Find current state: bd mol current <mol-id>
|
||||
2. Find the next ready (unblocked) step
|
||||
3. Close it: bd close <step-id>
|
||||
4. Repeat until no ready steps remain
|
||||
|
||||
ON RESUME (after crash/restart/handoff):
|
||||
- Same as fresh start. The molecule IS the state.
|
||||
- Query `bd mol current <mol-id>`, continue from there.
|
||||
- No memory of previous session needed.
|
||||
|
||||
DO:
|
||||
- Close steps as fast as possible (they're trivial mechanical moves)
|
||||
- Use `gt handoff` when context fills (proactive cycling)
|
||||
- Trust the pre-computed solution - every move is already correct
|
||||
|
||||
DO NOT:
|
||||
- Try to solve Hanoi yourself - moves are already computed
|
||||
- Mark steps in_progress - just close them directly
|
||||
- Ask for permission - this is GUPP territory, just execute
|
||||
- Stop for human input - run autonomously until complete
|
||||
|
||||
MONITORING:
|
||||
- Progress: Count closed children of the molecule
|
||||
- For mega-molecules: Use convoy dashboard when available
|
||||
- Completion: All steps closed = molecule complete
|
||||
|
||||
This proves Gas Town can execute arbitrarily long workflows with
|
||||
nondeterministic idempotence - different sessions, same outcome.
|
||||
"""
|
||||
formula = "towers-of-hanoi-7"
|
||||
version = 1
|
||||
|
||||
[[steps]]
|
||||
id = "setup"
|
||||
title = "Verify initial state"
|
||||
description = "All 7 disks stacked on peg A. Largest on bottom."
|
||||
|
||||
|
||||
[[steps]]
|
||||
id = "move-1"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 1/127)"
|
||||
needs = ["setup"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-2"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 2/127)"
|
||||
needs = ["move-1"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-3"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 3/127)"
|
||||
needs = ["move-2"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-4"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 4/127)"
|
||||
needs = ["move-3"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-5"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 5/127)"
|
||||
needs = ["move-4"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-6"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 6/127)"
|
||||
needs = ["move-5"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-7"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 7/127)"
|
||||
needs = ["move-6"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-8"
|
||||
title = "Move disk 4: A → B"
|
||||
description = "Move disk 4 from peg A to peg B. (Move 8/127)"
|
||||
needs = ["move-7"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-9"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 9/127)"
|
||||
needs = ["move-8"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-10"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 10/127)"
|
||||
needs = ["move-9"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-11"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 11/127)"
|
||||
needs = ["move-10"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-12"
|
||||
title = "Move disk 3: C → B"
|
||||
description = "Move disk 3 from peg C to peg B. (Move 12/127)"
|
||||
needs = ["move-11"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-13"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 13/127)"
|
||||
needs = ["move-12"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-14"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 14/127)"
|
||||
needs = ["move-13"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-15"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 15/127)"
|
||||
needs = ["move-14"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-16"
|
||||
title = "Move disk 5: A → C"
|
||||
description = "Move disk 5 from peg A to peg C. (Move 16/127)"
|
||||
needs = ["move-15"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-17"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 17/127)"
|
||||
needs = ["move-16"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-18"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 18/127)"
|
||||
needs = ["move-17"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-19"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 19/127)"
|
||||
needs = ["move-18"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-20"
|
||||
title = "Move disk 3: B → A"
|
||||
description = "Move disk 3 from peg B to peg A. (Move 20/127)"
|
||||
needs = ["move-19"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-21"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 21/127)"
|
||||
needs = ["move-20"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-22"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 22/127)"
|
||||
needs = ["move-21"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-23"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 23/127)"
|
||||
needs = ["move-22"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-24"
|
||||
title = "Move disk 4: B → C"
|
||||
description = "Move disk 4 from peg B to peg C. (Move 24/127)"
|
||||
needs = ["move-23"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-25"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 25/127)"
|
||||
needs = ["move-24"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-26"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 26/127)"
|
||||
needs = ["move-25"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-27"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 27/127)"
|
||||
needs = ["move-26"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-28"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 28/127)"
|
||||
needs = ["move-27"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-29"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 29/127)"
|
||||
needs = ["move-28"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-30"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 30/127)"
|
||||
needs = ["move-29"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-31"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 31/127)"
|
||||
needs = ["move-30"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-32"
|
||||
title = "Move disk 6: A → B"
|
||||
description = "Move disk 6 from peg A to peg B. (Move 32/127)"
|
||||
needs = ["move-31"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-33"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 33/127)"
|
||||
needs = ["move-32"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-34"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 34/127)"
|
||||
needs = ["move-33"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-35"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 35/127)"
|
||||
needs = ["move-34"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-36"
|
||||
title = "Move disk 3: C → B"
|
||||
description = "Move disk 3 from peg C to peg B. (Move 36/127)"
|
||||
needs = ["move-35"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-37"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 37/127)"
|
||||
needs = ["move-36"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-38"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 38/127)"
|
||||
needs = ["move-37"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-39"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 39/127)"
|
||||
needs = ["move-38"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-40"
|
||||
title = "Move disk 4: C → A"
|
||||
description = "Move disk 4 from peg C to peg A. (Move 40/127)"
|
||||
needs = ["move-39"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-41"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 41/127)"
|
||||
needs = ["move-40"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-42"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 42/127)"
|
||||
needs = ["move-41"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-43"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 43/127)"
|
||||
needs = ["move-42"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-44"
|
||||
title = "Move disk 3: B → A"
|
||||
description = "Move disk 3 from peg B to peg A. (Move 44/127)"
|
||||
needs = ["move-43"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-45"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 45/127)"
|
||||
needs = ["move-44"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-46"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 46/127)"
|
||||
needs = ["move-45"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-47"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 47/127)"
|
||||
needs = ["move-46"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-48"
|
||||
title = "Move disk 5: C → B"
|
||||
description = "Move disk 5 from peg C to peg B. (Move 48/127)"
|
||||
needs = ["move-47"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-49"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 49/127)"
|
||||
needs = ["move-48"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-50"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 50/127)"
|
||||
needs = ["move-49"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-51"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 51/127)"
|
||||
needs = ["move-50"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-52"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 52/127)"
|
||||
needs = ["move-51"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-53"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 53/127)"
|
||||
needs = ["move-52"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-54"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 54/127)"
|
||||
needs = ["move-53"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-55"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 55/127)"
|
||||
needs = ["move-54"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-56"
|
||||
title = "Move disk 4: A → B"
|
||||
description = "Move disk 4 from peg A to peg B. (Move 56/127)"
|
||||
needs = ["move-55"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-57"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 57/127)"
|
||||
needs = ["move-56"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-58"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 58/127)"
|
||||
needs = ["move-57"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-59"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 59/127)"
|
||||
needs = ["move-58"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-60"
|
||||
title = "Move disk 3: C → B"
|
||||
description = "Move disk 3 from peg C to peg B. (Move 60/127)"
|
||||
needs = ["move-59"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-61"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 61/127)"
|
||||
needs = ["move-60"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-62"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 62/127)"
|
||||
needs = ["move-61"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-63"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 63/127)"
|
||||
needs = ["move-62"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-64"
|
||||
title = "Move disk 7: A → C"
|
||||
description = "Move disk 7 from peg A to peg C. (Move 64/127)"
|
||||
needs = ["move-63"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-65"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 65/127)"
|
||||
needs = ["move-64"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-66"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 66/127)"
|
||||
needs = ["move-65"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-67"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 67/127)"
|
||||
needs = ["move-66"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-68"
|
||||
title = "Move disk 3: B → A"
|
||||
description = "Move disk 3 from peg B to peg A. (Move 68/127)"
|
||||
needs = ["move-67"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-69"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 69/127)"
|
||||
needs = ["move-68"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-70"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 70/127)"
|
||||
needs = ["move-69"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-71"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 71/127)"
|
||||
needs = ["move-70"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-72"
|
||||
title = "Move disk 4: B → C"
|
||||
description = "Move disk 4 from peg B to peg C. (Move 72/127)"
|
||||
needs = ["move-71"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-73"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 73/127)"
|
||||
needs = ["move-72"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-74"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 74/127)"
|
||||
needs = ["move-73"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-75"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 75/127)"
|
||||
needs = ["move-74"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-76"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 76/127)"
|
||||
needs = ["move-75"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-77"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 77/127)"
|
||||
needs = ["move-76"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-78"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 78/127)"
|
||||
needs = ["move-77"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-79"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 79/127)"
|
||||
needs = ["move-78"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-80"
|
||||
title = "Move disk 5: B → A"
|
||||
description = "Move disk 5 from peg B to peg A. (Move 80/127)"
|
||||
needs = ["move-79"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-81"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 81/127)"
|
||||
needs = ["move-80"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-82"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 82/127)"
|
||||
needs = ["move-81"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-83"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 83/127)"
|
||||
needs = ["move-82"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-84"
|
||||
title = "Move disk 3: C → B"
|
||||
description = "Move disk 3 from peg C to peg B. (Move 84/127)"
|
||||
needs = ["move-83"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-85"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 85/127)"
|
||||
needs = ["move-84"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-86"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 86/127)"
|
||||
needs = ["move-85"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-87"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 87/127)"
|
||||
needs = ["move-86"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-88"
|
||||
title = "Move disk 4: C → A"
|
||||
description = "Move disk 4 from peg C to peg A. (Move 88/127)"
|
||||
needs = ["move-87"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-89"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 89/127)"
|
||||
needs = ["move-88"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-90"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 90/127)"
|
||||
needs = ["move-89"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-91"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 91/127)"
|
||||
needs = ["move-90"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-92"
|
||||
title = "Move disk 3: B → A"
|
||||
description = "Move disk 3 from peg B to peg A. (Move 92/127)"
|
||||
needs = ["move-91"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-93"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 93/127)"
|
||||
needs = ["move-92"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-94"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 94/127)"
|
||||
needs = ["move-93"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-95"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 95/127)"
|
||||
needs = ["move-94"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-96"
|
||||
title = "Move disk 6: B → C"
|
||||
description = "Move disk 6 from peg B to peg C. (Move 96/127)"
|
||||
needs = ["move-95"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-97"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 97/127)"
|
||||
needs = ["move-96"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-98"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 98/127)"
|
||||
needs = ["move-97"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-99"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 99/127)"
|
||||
needs = ["move-98"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-100"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 100/127)"
|
||||
needs = ["move-99"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-101"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 101/127)"
|
||||
needs = ["move-100"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-102"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 102/127)"
|
||||
needs = ["move-101"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-103"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 103/127)"
|
||||
needs = ["move-102"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-104"
|
||||
title = "Move disk 4: A → B"
|
||||
description = "Move disk 4 from peg A to peg B. (Move 104/127)"
|
||||
needs = ["move-103"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-105"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 105/127)"
|
||||
needs = ["move-104"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-106"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 106/127)"
|
||||
needs = ["move-105"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-107"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 107/127)"
|
||||
needs = ["move-106"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-108"
|
||||
title = "Move disk 3: C → B"
|
||||
description = "Move disk 3 from peg C to peg B. (Move 108/127)"
|
||||
needs = ["move-107"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-109"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 109/127)"
|
||||
needs = ["move-108"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-110"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 110/127)"
|
||||
needs = ["move-109"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-111"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 111/127)"
|
||||
needs = ["move-110"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-112"
|
||||
title = "Move disk 5: A → C"
|
||||
description = "Move disk 5 from peg A to peg C. (Move 112/127)"
|
||||
needs = ["move-111"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-113"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 113/127)"
|
||||
needs = ["move-112"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-114"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 114/127)"
|
||||
needs = ["move-113"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-115"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 115/127)"
|
||||
needs = ["move-114"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-116"
|
||||
title = "Move disk 3: B → A"
|
||||
description = "Move disk 3 from peg B to peg A. (Move 116/127)"
|
||||
needs = ["move-115"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-117"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 117/127)"
|
||||
needs = ["move-116"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-118"
|
||||
title = "Move disk 2: C → A"
|
||||
description = "Move disk 2 from peg C to peg A. (Move 118/127)"
|
||||
needs = ["move-117"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-119"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 119/127)"
|
||||
needs = ["move-118"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-120"
|
||||
title = "Move disk 4: B → C"
|
||||
description = "Move disk 4 from peg B to peg C. (Move 120/127)"
|
||||
needs = ["move-119"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-121"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 121/127)"
|
||||
needs = ["move-120"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-122"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B. (Move 122/127)"
|
||||
needs = ["move-121"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-123"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B. (Move 123/127)"
|
||||
needs = ["move-122"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-124"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move disk 3 from peg A to peg C. (Move 124/127)"
|
||||
needs = ["move-123"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-125"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A. (Move 125/127)"
|
||||
needs = ["move-124"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-126"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C. (Move 126/127)"
|
||||
needs = ["move-125"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-127"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C. (Move 127/127)"
|
||||
needs = ["move-126"]
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Verify final state"
|
||||
description = "All 7 disks now on peg C. Tower intact, all moves were legal."
|
||||
needs = ["move-127"]
|
||||
3116
internal/formula/formulas/towers-of-hanoi-9.formula.toml
Normal file
3116
internal/formula/formulas/towers-of-hanoi-9.formula.toml
Normal file
File diff suppressed because it is too large
Load Diff
105
internal/formula/formulas/towers-of-hanoi.formula.toml
Normal file
105
internal/formula/formulas/towers-of-hanoi.formula.toml
Normal file
@@ -0,0 +1,105 @@
|
||||
description = """
|
||||
AGENT EXECUTION PROTOCOL - Towers of Hanoi
|
||||
|
||||
PURPOSE: This is a durability proof, not computation. Steps are pre-computed.
|
||||
Your job is to execute them mechanically, proving crash-recovery at scale.
|
||||
|
||||
EXECUTION LOOP:
|
||||
1. Find current state: bd mol current <mol-id>
|
||||
2. Find the next ready (unblocked) step
|
||||
3. Close it: bd close <step-id>
|
||||
4. Repeat until no ready steps remain
|
||||
|
||||
ON RESUME (after crash/restart/handoff):
|
||||
- Same as fresh start. The molecule IS the state.
|
||||
- Query `bd mol current <mol-id>`, continue from there.
|
||||
- No memory of previous session needed.
|
||||
|
||||
DO:
|
||||
- Close steps as fast as possible (they're trivial mechanical moves)
|
||||
- Use `gt handoff` when context fills (proactive cycling)
|
||||
- Trust the pre-computed solution - every move is already correct
|
||||
|
||||
DO NOT:
|
||||
- Try to solve Hanoi yourself - moves are already computed
|
||||
- Mark steps in_progress - just close them directly
|
||||
- Ask for permission - this is GUPP territory, just execute
|
||||
- Stop for human input - run autonomously until complete
|
||||
|
||||
MONITORING:
|
||||
- Progress: Count closed children of the molecule
|
||||
- For mega-molecules: Use convoy dashboard when available
|
||||
- Completion: All steps closed = molecule complete
|
||||
|
||||
This proves Gas Town can execute arbitrarily long workflows with
|
||||
nondeterministic idempotence - different sessions, same outcome.
|
||||
"""
|
||||
formula = "towers-of-hanoi"
|
||||
version = 2
|
||||
|
||||
[vars]
|
||||
[vars.source_peg]
|
||||
default = "A"
|
||||
description = "Starting peg"
|
||||
[vars.target_peg]
|
||||
default = "C"
|
||||
description = "Target peg"
|
||||
[vars.auxiliary_peg]
|
||||
default = "B"
|
||||
description = "Helper peg"
|
||||
|
||||
# 3-disk solution: 7 moves (2^3 - 1)
|
||||
# Each step is a simple acknowledgment - the agent just closes it.
|
||||
|
||||
[[steps]]
|
||||
id = "setup"
|
||||
title = "Verify initial state"
|
||||
description = "All 3 disks stacked on peg A. Largest on bottom."
|
||||
|
||||
[[steps]]
|
||||
id = "move-1"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move the smallest disk from peg A to peg C."
|
||||
needs = ["setup"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-2"
|
||||
title = "Move disk 2: A → B"
|
||||
description = "Move disk 2 from peg A to peg B."
|
||||
needs = ["move-1"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-3"
|
||||
title = "Move disk 1: C → B"
|
||||
description = "Move disk 1 from peg C to peg B."
|
||||
needs = ["move-2"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-4"
|
||||
title = "Move disk 3: A → C"
|
||||
description = "Move the largest disk from peg A to peg C."
|
||||
needs = ["move-3"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-5"
|
||||
title = "Move disk 1: B → A"
|
||||
description = "Move disk 1 from peg B to peg A."
|
||||
needs = ["move-4"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-6"
|
||||
title = "Move disk 2: B → C"
|
||||
description = "Move disk 2 from peg B to peg C."
|
||||
needs = ["move-5"]
|
||||
|
||||
[[steps]]
|
||||
id = "move-7"
|
||||
title = "Move disk 1: A → C"
|
||||
description = "Move disk 1 from peg A to peg C."
|
||||
needs = ["move-6"]
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Verify final state"
|
||||
description = "All 3 disks now on peg C. Tower intact, all moves were legal."
|
||||
needs = ["move-7"]
|
||||
Reference in New Issue
Block a user