fix: Allow polecat/* branches, remove hanoi test formulas
- Update pre-push hook to allow polecat/* branches (Refinery merges these) - Remove towers-of-hanoi formulas (test fixtures, not production) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,29 +1,30 @@
|
||||
#!/bin/bash
|
||||
# Block pushes to non-main branches from internal clones
|
||||
# External contributors use forks, so this only affects Gas Town agents
|
||||
# Block PRs by preventing pushes to arbitrary feature branches.
|
||||
# Gas Town agents push to main (crew) or polecat/* branches (polecats).
|
||||
# PRs are for external contributors only.
|
||||
|
||||
# Allow: main, beads-sync
|
||||
# Block: feature branches, polecat/* branches, etc.
|
||||
# Allowed patterns:
|
||||
# main, beads-sync - Direct work branches
|
||||
# polecat/* - Polecat working branches (Refinery merges these)
|
||||
|
||||
while read local_ref local_sha remote_ref remote_sha; do
|
||||
branch="${remote_ref#refs/heads/}"
|
||||
|
||||
case "$branch" in
|
||||
main|beads-sync)
|
||||
main|beads-sync|polecat/*)
|
||||
# Allowed branches
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Gas Town agents push directly to main."
|
||||
echo "ERROR: Invalid branch for Gas Town agents."
|
||||
echo ""
|
||||
echo "Blocked push to: $branch"
|
||||
echo ""
|
||||
echo "If you're working on a fix:"
|
||||
echo " git checkout main"
|
||||
echo " git merge $branch"
|
||||
echo " git push origin main"
|
||||
echo " git branch -d $branch"
|
||||
echo "Allowed branches:"
|
||||
echo " main - Crew workers push here directly"
|
||||
echo " polecat/* - Polecat working branches"
|
||||
echo " beads-sync - Beads synchronization"
|
||||
echo ""
|
||||
echo "See CLAUDE.md: 'Crew workers push directly to main. No feature branches.'"
|
||||
echo "Do NOT create PRs. Push to main or let Refinery merge polecat work."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,812 +0,0 @@
|
||||
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"]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,105 +0,0 @@
|
||||
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