fix: Symlink .auto-build-data/ and .claude/rules/ in worktrees

Worktrees now have symlinks to the main repo's:
- .auto-build-data/ - specs, plans, status, memory
- .claude/rules/ - auto-build patterns and learned memory

This ensures /ab:build can detect PLANNING_COMPLETE status when
running in worktree and continue with implementation.

Also clarified in build.md that PLANNING_COMPLETE skips planning.

Bumps version to 1.0.5.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 16:15:06 +02:00
parent fe30cc9eaa
commit f324b43a85
5 changed files with 30 additions and 3 deletions

View File

@@ -66,6 +66,19 @@ fi
echo "Creating worktree..."
git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
# Create symlink to .auto-build-data/ from main repo
# This ensures specs, plans, and status are shared across worktrees
if [ -d "$PROJECT_ROOT/.auto-build-data" ]; then
echo "Creating symlink to .auto-build-data/..."
ln -s "$PROJECT_ROOT/.auto-build-data" "$WORKTREE_PATH/.auto-build-data"
fi
# Also symlink .claude/rules/ for memory access
if [ -d "$PROJECT_ROOT/.claude/rules" ]; then
mkdir -p "$WORKTREE_PATH/.claude"
ln -s "$PROJECT_ROOT/.claude/rules" "$WORKTREE_PATH/.claude/rules"
fi
# Update registry
REGISTRY_FILE="$PROJECT_ROOT/.auto-build-data/worktrees/worktree-registry.json"
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")