#!/usr/bin/env bash set -euo pipefail # The todo domain (muse/plugins/todo) ships on muse's dev branch as of this # recording but hasn't gone out in a released muse tarball yet -- this demo # uses muse-dev (the editable install of ~/ecosystem/muse) rather than plain # muse. Swap MUSE_BIN to "muse" once a release includes it. MUSE_BIN="${MUSE_BIN:-muse-dev}" DEMO_DIR="${1:-todo-episode06}" command -v "$MUSE_BIN" >/dev/null 2>&1 || { echo "error: $MUSE_BIN not found on PATH" >&2; exit 1; } rm -rf "$DEMO_DIR" mkdir -p "$DEMO_DIR" cd "$DEMO_DIR" "$MUSE_BIN" init --domain todo echo "Write episode 06 script" > todo.txt "$MUSE_BIN" commit -m "Add first task" "$MUSE_BIN" checkout -b feature/alice echo "Buy milk" >> todo.txt "$MUSE_BIN" commit -m "Alice adds a task" "$MUSE_BIN" checkout main "$MUSE_BIN" checkout -b feature/bob echo "Fix the bug" >> todo.txt "$MUSE_BIN" commit -m "Bob adds a different task" "$MUSE_BIN" checkout main "$MUSE_BIN" merge feature/alice "$MUSE_BIN" merge feature/bob echo echo "Ready in: $(pwd)" echo "todo.txt now has all three tasks, merged with zero conflicts:" cat todo.txt