Files
ai-workflow-course/modules/26-orchestrating-multiple-agents/lab/fan-out.sh
T
claude fbec36cb67 feat(course): build out all 27 modules, capstone, scaffold, and conventions
Scaffold the course repo and author the full curriculum in dependency-chain
order, following the settled build decisions in handoff.md.

- Scaffold: course README, vendor-neutral AGENTS.md (dogfoods Module 5),
  _TEMPLATE.md (the fixed 9-section module shape), root .gitignore, ship config.
- Modules 1-2: reference exemplars (locked for tone/depth/lab style).
- Modules 3-27: full lessons + runnable labs, each following the template,
  respecting the chain, vendor/model-agnostic, with "feel the pain" labs.
- Module 8 hosting comparison web-researched and date-stamped (as of 2026-06-22),
  not written from memory; expansion-zone modules carry Verify-before-publish.
- Capstone: the full loop end to end on the running tasks-app example.

Lab code syntax-checked (Python/shell/YAML); every module has the 7 core
template sections.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
2026-06-22 12:18:30 -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