SDD scripts resolve repo and workspace from the cwd, not from PLAN_FILE — wrong workspace when called across worktrees

Author: abat-kekCreated Sep 30, 2026Updated Sep 30, 2026
  • I searched existing issues and this is not a duplicate (adjacent but different failure modes: #2242 greenfield crash, #2207 workspace deletion, #2307 Windows invocation)

Environment (required)

Field Value
Superpowers version observed on 6.3.0; the gap is still present on dev as of 2026-10-01
Harness (Claude Code, Cursor, etc.) Claude Code (desktop app, Code tab)
Harness version 2.1.272
Your model + version Claude Opus 5.5 (claude-opus-5-5)
All plugins installed superpowers, task-observer, claude-mem, context7, plus private skill plugins unrelated to this area
OS + shell Windows 11, Git Bash

Is this a Superpowers issue or a platform issue?

  • I confirmed this issue does not occur without Superpowers installed (it lives in skills/subagent-driven-development/scripts/)

What happened?

One controller session executed four feature plans in four git worktrees of the same repository. From inside worktree A it ran review-package <absolute path to a plan in worktree B> BASE HEAD. The script wrote the review package to <worktree A>/.superpowers/sdd/<plan-basename>/, creating a foreign workspace directory there, and computed the diff in the cwd repository. The diff happened to be right only because both worktrees share one object database; the workspace location was wrong. It was noticed only because the script prints the output path.

Cause, verified on dev: sdd-workspace takes the repo root from git rev-parse --show-toplevel in the cwd, and review-package runs git rev-parse / git diff / git log in the cwd. PLAN_FILE is used for the slug and the ownership marker, never for locating the repository.

Steps to reproduce

  1. git worktree add ../wt-b next to an existing checkout wt-a; put plan.md into wt-b/docs/.
  2. From wt-a: bash <skill>/scripts/review-package ../wt-b/docs/plan.md <base> <head>.
  3. Look at the printed output path.

Expected behavior

Workspace and diff belong to the repository that contains PLAN_FILE, or the script refuses because PLAN_FILE is not inside the cwd repository.

Actual behavior

The workspace is created under the cwd's repository, and the git commands run against the cwd.

Suggested fix

In sdd-workspace, derive root from git -C "$(dirname "$plan")" rev-parse --show-toplevel, and run the git commands in review-package and task-brief with -C "$root". Alternatively fail fast with a clear message when plan_abs is not under the cwd's top level — the script already computes both values.

Debug log or conversation transcript

No shareable transcript (private project). The mechanism is visible in the script source on dev.