f925fd9645
Phase 2 sweep — all modules are post-pivot, so the learner directs the AI agent
(Claude Code as the worked example) to do the git/setup work and verifies, instead
of typing commands by hand; no re-teaching basics. Lesson sections are theory with
example output; all execution lives in the labs. De-slopped ("prose" etc. gone
course-wide, em-dash density thinned). /path/to placeholders -> ~/ai-workflow-course.
Every deliberate teaching device verified intact: M10 ai-change.patch trap,
M12 bad-clear-snippet, M13/M27 planted pending_count bug, M15 secret+typosquat+MD5,
M18 BREAK=1, M21 absent-.gitignore, M22 poisoned skill, M24 no-op patch, M25 --simulate.
Labs compile/parse (py/sh/yaml/json); no junk.
Closes #83
Closes #86
Closes #89
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
32 lines
1.2 KiB
Bash
32 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
#
|
|
# Module 7 lab — tear down the two worktrees created by setup-worktrees.sh.
|
|
# The tool the coordinating AI session runs to clean up. Hand it to your agent, or copy it into
|
|
# tasks-app and let the agent run it:
|
|
#
|
|
# cp ~/ai-workflow-course/modules/07-worktrees-running-agents-in-parallel/lab/cleanup-worktrees.sh .
|
|
# bash cleanup-worktrees.sh
|
|
#
|
|
# `git worktree remove` deletes the folder AND clears Git's record of it; `prune` mops up any
|
|
# worktrees whose folders were deleted by hand (which leaves a stale record otherwise).
|
|
#
|
|
# NOTE: --force discards UNCOMMITTED work in a worktree. Commit (or merge) before cleaning up.
|
|
# This script assumes you already merged feature/wipe and feature/remaining back into main.
|
|
#
|
|
set -euo pipefail
|
|
|
|
ROOT="$(git rev-parse --show-toplevel)"
|
|
PARENT="$(cd "$ROOT/.." && pwd)"
|
|
|
|
git worktree remove "$PARENT/tasks-app-wipe" --force 2>/dev/null || true
|
|
git worktree remove "$PARENT/tasks-app-remaining" --force 2>/dev/null || true
|
|
git worktree prune
|
|
|
|
echo
|
|
echo "Cleanup done. Remaining worktrees:"
|
|
git worktree list
|
|
|
|
echo
|
|
echo "If you merged both branches you can also delete them:"
|
|
echo " git branch -d feature/wipe feature/remaining"
|