feat: Move specs and memory to git for multi-developer collaboration (v1.0.6)
BREAKING CHANGE: Specs, plans, and memory moved from .auto-build-data/ (gitignored) to .auto-build/ (git-tracked) to enable team collaboration. Changes: - Specs/plans now in .auto-build/specs/ (shared with team) - Memory (patterns, gotchas) now in .auto-build/memory/ (shared with team) - .auto-build-data/ now only contains local data (worktrees, cache) - Added /ab:migrate command for existing projects - Removed symlinks from worktree-create.sh (no longer needed) Benefits: - Any developer can continue a plan started by another - Patterns and gotchas shared across team - Works on Windows/Linux/Mac without symlinks - Full version history in git 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,30 +26,43 @@ Last updated: Never
|
||||
|
||||
(This file is automatically updated by /ab:memory-save)" > "$PROJECT_ROOT/.claude/rules/auto-build-memory.md"
|
||||
|
||||
# 4. Create .auto-build-data/ structure
|
||||
echo "Creating .auto-build-data/ structure..."
|
||||
mkdir -p "$PROJECT_ROOT/.auto-build-data"/{specs,worktrees,memory/sessions,cache/qa-iterations}
|
||||
# 4. Create .auto-build/ structure (COMMITTED TO GIT - shared with team)
|
||||
echo "Creating .auto-build/ structure (shared with team)..."
|
||||
mkdir -p "$PROJECT_ROOT/.auto-build"/{specs,memory/sessions}
|
||||
|
||||
# Initialize memory files
|
||||
echo '{"patterns": [], "updated": null}' > "$PROJECT_ROOT/.auto-build-data/memory/patterns.json"
|
||||
echo '{"gotchas": [], "updated": null}' > "$PROJECT_ROOT/.auto-build-data/memory/gotchas.json"
|
||||
echo '{"worktrees": []}' > "$PROJECT_ROOT/.auto-build-data/worktrees/worktree-registry.json"
|
||||
# Initialize memory files if they don't exist
|
||||
if [ ! -f "$PROJECT_ROOT/.auto-build/memory/patterns.json" ]; then
|
||||
echo '{"patterns": [], "updated": null}' > "$PROJECT_ROOT/.auto-build/memory/patterns.json"
|
||||
fi
|
||||
|
||||
# 5. Add .auto-build-data/ to .gitignore if not present
|
||||
if [ ! -f "$PROJECT_ROOT/.auto-build/memory/gotchas.json" ]; then
|
||||
echo '{"gotchas": [], "updated": null}' > "$PROJECT_ROOT/.auto-build/memory/gotchas.json"
|
||||
fi
|
||||
|
||||
# 5. Create .auto-build-data/ structure (GITIGNORED - local only)
|
||||
echo "Creating .auto-build-data/ structure (local only)..."
|
||||
mkdir -p "$PROJECT_ROOT/.auto-build-data"/{worktrees,cache/qa-iterations}
|
||||
|
||||
# Initialize worktree registry
|
||||
if [ ! -f "$PROJECT_ROOT/.auto-build-data/worktrees/worktree-registry.json" ]; then
|
||||
echo '{"worktrees": []}' > "$PROJECT_ROOT/.auto-build-data/worktrees/worktree-registry.json"
|
||||
fi
|
||||
|
||||
# 6. Add .auto-build-data/ to .gitignore if not present
|
||||
if [ -f "$PROJECT_ROOT/.gitignore" ]; then
|
||||
if ! grep -q "^\.auto-build-data/" "$PROJECT_ROOT/.gitignore" 2>/dev/null; then
|
||||
echo "" >> "$PROJECT_ROOT/.gitignore"
|
||||
echo "# Auto-Build runtime data (local only)" >> "$PROJECT_ROOT/.gitignore"
|
||||
echo "# Auto-Build local data (worktrees, cache)" >> "$PROJECT_ROOT/.gitignore"
|
||||
echo ".auto-build-data/" >> "$PROJECT_ROOT/.gitignore"
|
||||
echo "Added .auto-build-data/ to .gitignore"
|
||||
fi
|
||||
else
|
||||
echo "# Auto-Build runtime data (local only)" > "$PROJECT_ROOT/.gitignore"
|
||||
echo "# Auto-Build local data (worktrees, cache)" > "$PROJECT_ROOT/.gitignore"
|
||||
echo ".auto-build-data/" >> "$PROJECT_ROOT/.gitignore"
|
||||
echo "Created .gitignore with .auto-build-data/ entry"
|
||||
fi
|
||||
|
||||
# 6. Initialize or update CLAUDE.md
|
||||
# 7. Initialize or update CLAUDE.md
|
||||
if [ ! -f "$PROJECT_ROOT/CLAUDE.md" ]; then
|
||||
echo "Generating CLAUDE.md from template..."
|
||||
cp "$PLUGIN_DIR/templates/CLAUDE.md.template" "$PROJECT_ROOT/CLAUDE.md"
|
||||
@@ -75,7 +88,8 @@ echo ""
|
||||
echo "What was installed:"
|
||||
echo " ✅ .claude/rules/auto-build-patterns.md"
|
||||
echo " ✅ .claude/rules/auto-build-memory.md"
|
||||
echo " ✅ .auto-build-data/ structure"
|
||||
echo " ✅ .auto-build/ (specs & memory - shared with team)"
|
||||
echo " ✅ .auto-build-data/ (local worktrees & cache)"
|
||||
echo " ✅ CLAUDE.md (created or updated)"
|
||||
echo " ✅ .gitignore updated"
|
||||
echo ""
|
||||
@@ -84,3 +98,5 @@ echo " 1. Restart Claude Code to load CLAUDE.md"
|
||||
echo " 2. Run /ab:help for available commands"
|
||||
echo " 3. Create your first spec: /ab:spec \"My Feature\""
|
||||
echo ""
|
||||
echo "Note: Don't forget to commit .auto-build/ to share specs with your team!"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user