From f324b43a85fd11f39d51c9fc743ff56a4c97e86a Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Mon, 22 Dec 2025 16:15:06 +0200 Subject: [PATCH] fix: Symlink .auto-build-data/ and .claude/rules/ in worktrees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .claude-plugin/marketplace.json | 2 +- CHANGELOG.md | 10 ++++++++++ plugin/.claude-plugin/plugin.json | 2 +- plugin/commands/build.md | 6 +++++- plugin/scripts/worktree-create.sh | 13 +++++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 7c2a909..17de205 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -11,7 +11,7 @@ "name": "ab", "source": "./plugin", "description": "Spec-driven build orchestration with git worktree isolation and session memory", - "version": "1.0.4", + "version": "1.0.5", "keywords": ["build", "spec", "automation", "worktree", "qa"] } ] diff --git a/CHANGELOG.md b/CHANGELOG.md index acd9c75..be250df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to Auto-Build plugin. +## [1.0.5] - 2024-12-22 + +### Fixed +- Worktree now creates symlinks to `.auto-build-data/` and `.claude/rules/` from main repo +- This ensures specs, plans, status, and memory are shared across worktrees +- `/ab:build` in worktree will correctly detect `PLANNING_COMPLETE` status and continue + +### Improved +- Clarified in build.md that `PLANNING_COMPLETE` skips planning phase + ## [1.0.4] - 2024-12-22 ### Improved diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index caf67e5..39704bd 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "ab", "description": "Auto-Build: Spec-driven build orchestration with worktree isolation and session memory", - "version": "1.0.4", + "version": "1.0.5", "author": { "name": "ROA2WEB Team" } diff --git a/plugin/commands/build.md b/plugin/commands/build.md index cec388b..62a62d7 100644 --- a/plugin/commands/build.md +++ b/plugin/commands/build.md @@ -71,7 +71,11 @@ To work in the isolated worktree, you need a new session there. ### 3. Planning Phase -If status is `SPEC_COMPLETE`: +**If status is `PLANNING_COMPLETE`** (plan already exists): +- Skip directly to Implementation Loop (step 4) +- This happens when resuming in a worktree after plan was created in main repo + +**If status is `SPEC_COMPLETE`**: 1. Load memory context (if exists): - Read `.auto-build-data/memory/patterns.json` diff --git a/plugin/scripts/worktree-create.sh b/plugin/scripts/worktree-create.sh index 031a992..a20c2c5 100644 --- a/plugin/scripts/worktree-create.sh +++ b/plugin/scripts/worktree-create.sh @@ -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")