#2630

subagent-driven-development: review-package and sdd-workspace fail once a plan task deletes the plan file

Openpius-hwangopened 4d ago

What happened

subagent-driven-development keys the plan workspace on the plan file's path, and both helper scripts require that file to exist:

  • scripts/sdd-workspace: [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
  • scripts/review-package: same check, then resolves the output directory through sdd-workspace "$plan"

If a plan task deletes or moves the plan file (a common convention: "the PR that finishes the work deletes the plan"), every later step that needs the workspace breaks:

  1. The review package for that last task fails with no such plan file: docs/superpowers/plans/<plan>.md.
  2. The final whole-branch review (review-package PLAN_FILE MERGE_BASE HEAD) fails the same way.
  3. The scoped re-review of the final fix wave fails the same way.

The workaround I used was to pass the task brief as PLAN_FILE. It works, but the package then lands in a different workspace (.superpowers/sdd/task-4-brief/) instead of the plan's own, beside the ledger. That is the cross-workspace drift the plan-path marker exists to prevent.

Repro

  1. Write a plan whose last task deletes the plan file, e.g. git rm docs/superpowers/plans/2026-10-26-x.md in the final commit.
  2. Execute it with subagent-driven-development.
  3. After the last task commits, run bash scripts/review-package docs/superpowers/plans/2026-10-26-x.md <BASE> HEAD.
  4. It exits 2 with no such plan file.

Expected

The workspace stays resolvable for the rest of the run (task review of the last task, final review, final fix re-review) even when the plan file is gone from the working tree.

Possible fixes

  • Resolve the workspace without requiring the file. The slug only needs basename "$plan" .md. The plan-path marker can be compared against the normalized path even when the file is missing, using the parent directory if it still exists.
  • Or let review-package / task-brief accept the workspace directory directly, and have the controller record that path in the ledger at setup time.
  • Or, in SKILL.md, tell the controller that a plan task deleting the plan must be the last commit after the final review. That only moves the problem, though, because the final fix wave can still need a package.

Environment

  • superpowers 7.0.0, Claude Code on macOS. The checks are unchanged on main (7.0.1).

Activity

0

No activity yet.