make-chess-episode22-demo.sh
bash
sha256:5472be4fece32b606c308fad9d57295ce327955fb2b87b8beec6ea1626050473
Add published YouTube URL to Episode 00
Sonnet 5
8 hours ago
| 1 | #!/usr/bin/env bash |
| 2 | # Builds chess-episode22/ for Episode 22 ("Build Something Weird With |
| 3 | # Muse") -- the season finale. Uses `muse-dev`, not plain `muse`: the |
| 4 | # chess domain plugin was built live for this episode and committed to |
| 5 | # muse's dev branch, but has not gone through a published release yet |
| 6 | # (see docs/agent-guide.md's muse-vs-muse-dev section). Re-run to |
| 7 | # regenerate; never hand-edit the repo directory directly. |
| 8 | set -euo pipefail |
| 9 | |
| 10 | HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 11 | REPO="$HERE/chess-episode22" |
| 12 | |
| 13 | rm -rf "$REPO" |
| 14 | mkdir -p "$REPO" |
| 15 | cd "$REPO" |
| 16 | |
| 17 | echo "=== Part 1: a brand new domain, zero special-casing ===" |
| 18 | muse-dev init --domain chess --json | python3 -m json.tool |
| 19 | |
| 20 | printf 'e4\ne5\n' > game.moves |
| 21 | muse-dev status --json | python3 -c "import json,sys; print('added:', json.load(sys.stdin)['added'])" |
| 22 | muse-dev commit -m "1. e4 e5 -- the open game" \ |
| 23 | --agent-id claude-code --model-id claude-sonnet-5 --sign |
| 24 | |
| 25 | echo |
| 26 | echo "=== Part 2: two real variations, diverging from the same position ===" |
| 27 | muse-dev checkout -b variation/italian --intent "explore 3. Bc4, the Italian Game" --resumable |
| 28 | printf 'e4\ne5\nBc4\n' > game.moves |
| 29 | muse-dev commit -m "3. Bc4 -- the Italian Game" \ |
| 30 | --agent-id claude-code --model-id claude-sonnet-5 --sign |
| 31 | |
| 32 | muse-dev switch main |
| 33 | muse-dev checkout -b variation/spanish --intent "explore 3. Nf3 heading toward the Ruy Lopez" --resumable |
| 34 | printf 'e4\ne5\nNf3\n' > game.moves |
| 35 | muse-dev commit -m "3. Nf3 -- heading toward the Ruy Lopez" \ |
| 36 | --agent-id claude-code --model-id claude-sonnet-5 --sign |
| 37 | |
| 38 | echo |
| 39 | echo "=== Part 3: the real structured delta -- position-addressed moves ===" |
| 40 | muse-dev read variation/italian --json --manifest | python3 -c " |
| 41 | import json, sys |
| 42 | d = json.load(sys.stdin) |
| 43 | print(json.dumps(d['structured_delta'], indent=2)) |
| 44 | " |
| 45 | |
| 46 | echo |
| 47 | echo "=== Part 4: fast-forward merge (spanish extends main cleanly) ===" |
| 48 | muse-dev switch main |
| 49 | muse-dev merge variation/spanish --json | python3 -m json.tool | head -12 |
| 50 | |
| 51 | echo |
| 52 | echo "=== Part 5: the real merge conflict -- a genuine 'variation' ===" |
| 53 | muse-dev merge variation/italian --json | python3 -m json.tool || true |
| 54 | echo "--- working tree conflict markers ---" |
| 55 | cat game.moves |
| 56 | |
| 57 | echo |
| 58 | echo "=== Part 6: not every conflict needs forcing -- both lines live on ===" |
| 59 | muse-dev merge --abort |
| 60 | muse-dev branch --json | python3 -c " |
| 61 | import json, sys |
| 62 | for b in json.load(sys.stdin): |
| 63 | print(b['name'], '--', b.get('intent') or '(no intent)') |
| 64 | " |
| 65 | |
| 66 | echo |
| 67 | echo "=== Part 7: chess, registered exactly like every other domain ===" |
| 68 | muse-dev domains --json | python3 -c " |
| 69 | import json, sys |
| 70 | d = json.load(sys.stdin) |
| 71 | print([x['domain'] for x in d['domains']]) |
| 72 | " |
| 73 | |
| 74 | echo |
| 75 | echo "Demo built at $REPO" |
File History
1 commit
sha256:5472be4fece32b606c308fad9d57295ce327955fb2b87b8beec6ea1626050473
Add published YouTube URL to Episode 00
Sonnet 5
8 hours ago