fix: skip ai-superpower repo itself during project scan

apply.sh was scanning its own directory and creating a recursive .ai
symlink inside .ai/, causing infinite folder nesting in VS Code.

- Skip $SCRIPT_DIR in scan_projects() to prevent self-symlinking
- Remove incorrectly created .ai/.ai symlink and .ai/.gitignore
- Add -root session reset command to ai-root-instructions.md
- Document -root command in README
This commit is contained in:
moilanik 2026-03-12 10:29:55 +02:00
parent ff01403312
commit 0e6c748374
2 changed files with 1 additions and 1 deletions

1
.ai/.gitignore vendored
View File

@ -1 +0,0 @@
.ai

View File

@ -180,6 +180,7 @@ scan_projects() {
while IFS= read -r gitdir; do
project="$(cd "$(dirname "$gitdir")" && pwd)"
if [[ -f "$project/.ai-superpower" ]]; then continue; fi
if [[ "$project" == "$SCRIPT_DIR" ]]; then continue; fi
setup_project "$project"
(( projects_found++ )) || true
done < <(find "$dev_root" -mindepth 2 -maxdepth 4 -name ".git" -type d 2>/dev/null || true)