fix(subagent-driven-development): namespace SDD scratch workspace by plan#1949
Open
natem1095 wants to merge 1 commit into
Open
fix(subagent-driven-development): namespace SDD scratch workspace by plan#1949natem1095 wants to merge 1 commit into
natem1095 wants to merge 1 commit into
Conversation
…plan scripts/task-brief and scripts/review-package wrote to a fixed per-repo path (.superpowers/sdd/task-N-brief.md, .superpowers/sdd/progress.md) scoped only by task NUMBER, not by plan. Two unrelated orchestrator sessions running the skill concurrently in the same working tree, each numbering tasks from 1, silently overwrote each other's briefs, reports, and progress ledger — observed live: a task-1-report.md was clobbered by two unrelated task sequences before a third session's own Task 1 overwrote it again. sdd-workspace now takes an optional --ns NAMESPACE that scopes the returned directory to a subdirectory. task-brief derives NAMESPACE automatically from PLAN_FILE's basename, so its own call sites need no change. review-package and the progress ledger path in SKILL.md now take an explicit --ns, with SKILL.md instructing the controller to compute NAMESPACE once from the plan and reuse it. Omitting --ns preserves the prior flat-directory behavior for backward compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/task-briefandscripts/review-packagewrite SDD's scratchartifacts to a fixed per-repo path (
.superpowers/sdd/task-N-brief.md,and — per
SKILL.md's Durable Progress section —.superpowers/sdd/progress.md),scoped only by task number, not by plan/epic/session.
Two unrelated orchestrator sessions running
subagent-driven-developmentconcurrently in the same working tree, each numbering their tasks from 1,
collide on the same filenames and silently overwrite each other's briefs,
reports, and progress ledger. Observed live: a
task-1-report.mdat thatpath was overwritten by two unrelated task sequences before a third
session's own Task 1 implementer overwrote it a third time.
Fix
sdd-workspacegains an optional--ns NAMESPACEthat scopes thereturned directory to a subdirectory of
.superpowers/sdd/. Omitting itpreserves the exact prior behavior (flat
.superpowers/sdd/), so this isfully backward compatible.
task-briefderivesNAMESPACEautomatically fromPLAN_FILE'sbasename (minus extension) and passes
--nsinternally — no change totask-brief's own call sites.review-packageaccepts--ns NAMESPACE(parsed as a flag so it canappear anywhere relative to
BASE/HEAD/OUTFILE, preserving theexisting positional contract).
SKILL.mdnow definesNAMESPACEonce (right after reading the plan)in the Durable Progress section, and threads it through every
review-packageinvocation and the progress ledger path(
scripts/sdd-workspace --ns NAMESPACE), so briefs, reports, reviewpackages, and the ledger all land in the same per-plan subdirectory.
Testing
Extended
tests/claude-code/test-sdd-workspace.shwith a new scenario:two unrelated plans (
plan-a.md,plan-b.md), each with a "Task 1",run through
task-briefin the same repo — asserts the two briefs landin different files with the correct per-plan content, that
sdd-workspace --nsresolves the namespaced subdirectory, and thatreview-package --nswrites under it too.All 8 pre-existing assertions still pass unmodified, confirming the
no-
--nspath is unchanged.