singularity-forge/src/resources
Tom Boucher eb40f74cfe fix: detect worktree basePath in gsdRoot() to prevent escaping to project root (#3083)
When gsdRoot() is called with a basePath inside .gsd/worktrees/<name>/,
the git-root probe and walk-up logic can escape to the project root's .gsd
directory. This causes ensurePreconditions() to create slice directories
in the wrong location and deriveState() to read stale project-root state
instead of worktree-local state.

Add isInsideGsdWorktree() guard that detects the .gsd/worktrees/<name>/
pattern in the basePath before the git rev-parse probe runs. When detected,
return the worktree-local .gsd path immediately. Also check the
symlink-resolved path for the pattern (handles macOS /tmp -> /private/tmp).

Closes #2594

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 14:39:15 -06:00
..
agents fix: replace web_search with search-the-web in prompts and agent frontmatter (#2920) (#3245) 2026-03-30 14:30:01 -06:00
extensions fix: detect worktree basePath in gsdRoot() to prevent escaping to project root (#3083) 2026-03-30 14:39:15 -06:00
skills fix(docs): use ~/.pi/agent/extensions/ for community extension install path (#3131) (#3259) 2026-03-30 13:50:25 -06:00
GSD-WORKFLOW.md feat: meaningful commit messages from task summaries (#803) 2026-03-16 23:30:33 -06:00