Files
ai-workflow-course/modules/26-orchestrating-multiple-agents/lab/fan-out.sh
T
claude 389ac2e460 style(no-slop): remove every em-dash + banned words across all modules + capstone
Apply the no-ai-slop standard (now binding in AGENTS.md): the em-dash character is
banned outright (restructured, not blind-replaced), plus the banned word/phrase
list (delve, leverage, robust, seamless, truly, unlock, etc.). 0 em-dashes remain
in modules + capstone; the only "robust" left is the planted M10 ai-change.patch
trap. Module H1 titles use a colon separator.

All deliberate teaching devices preserved; labs compile/parse (py/sh/yaml/json);
no junk. AGENTS.md updated with the hard no-slop rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
2026-06-22 23:21:09 -04:00

39 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# Module 26 lab: fan work out across a fleet of worktrees.
#
# Creates one worktree per issue, each on its own issue-named branch. main is left untouched
# and reserved as the integration point. Run from inside your tasks-app repo.
#
# This is Module 7's `git worktree add` repeated with a naming convention. The convention is the
# point: branch name carries the issue number, folder name mirrors the branch.
set -euo pipefail
# Each entry: "<worktree-folder> <branch>". Edit to match your coordination plan.
FLEET=(
"../tasks-app-42-count feature/42-count"
"../tasks-app-43-docs feature/43-docs"
"../tasks-app-44-clear feature/44-clear"
)
if [ ! -d .git ] && ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "error: run this from inside your tasks-app git repo." >&2
exit 1
fi
for entry in "${FLEET[@]}"; do
# shellcheck disable=SC2086
set -- $entry
path="$1"; branch="$2"
if git worktree list --porcelain | grep -q "branch refs/heads/$branch"; then
echo "skip: $branch already checked out in a worktree"
continue
fi
echo "fan-out: $path (branch $branch)"
git worktree add "$path" -b "$branch"
done
echo
echo "Fleet is up. main is reserved for integration; no agent works there."
git worktree list