Repository navigation
fix(sdd): plan-scoped workspace — per-plan artifact dirs, self-identifying ledger, end-of-plan cleanup - #1943
Merged
Merged
Conversation
The .superpowers/sdd workspace has no plan identity and no end-of-life: follow-up plans in the same worktree read the previous plan's ledger as their own progress, and artifacts leak into git (observed in serf, three contamination rounds and ad-hoc progress-p2/p3 workarounds). Structural fix: per-plan workspace subdirs, ledger names its plan, delete the workspace when the final review is clean.
Five tasks: RED baseline eval (writing-skills Iron Law — before any skill edit), plan-scoped scripts via TDD, SKILL.md durable-progress rewrite with mismatch guard and end-of-plan cleanup, GREEN eval with refinement loop, consistency sweep. Eval = 5 fresh sonnet subagents per scenario per arm, hand-scored.
Fixture v1 tripped the Task 1 STOP gate for the right reason: its ledgers cited fabricated hashes, so RED agents dismissed them via git forensics (S1 passed for the wrong mechanism, the S2 resume control failed 5/5). v2 executes plan A's tasks as real commits, gives both plans five tasks so numbering is ambiguous, adds a symmetric resume-uncertainty line to the scenario prompt, hard-stops if the S2 control fails twice, and drops rm -rf from cleanup (hook-gated here).
…EEN measures cost Three RED rounds (25 reps, three framings incl. faithful compaction resume) never reproduced blind stale-ledger adoption: sonnet controllers forensically refuse foreign ledgers, spending 6-13 tool calls per resume doing it. Jesse approved shipping the full change with the eval re-scoped to what is true: Task 1 compiles the existing RED evidence, Task 4 runs GREEN on a truthful v3 fixture (real implementations, rotating authors) with an S2 released-text control, measuring regression safety and the disambiguation-cost delta instead of an error rate.
… claims narrowed 25/25 baseline reps refused the stale foreign ledger via git forensics; the spec's evaluation section now states the honest claims: structural fix + measured disambiguation-cost delta + same-plan-resume regression gate, shipping with explicit maintainer sign-off in place of a failing S1 baseline.
…r plan sdd-workspace now requires the plan file and resolves .superpowers/sdd/<plan-basename>/; task-brief and review-package write into their plan's directory (review-package gains PLAN_FILE as its first argument). Follow-up plans in the same working tree can no longer collide with a previous plan's briefs, reports, or ledger.
…space dies at plan end The start-of-skill ledger check is now scoped to the plan's own workspace and keyed to the ledger's first line. Baseline eval (25/25 reps) showed controllers already refuse foreign ledgers — at a cost of 6-13 tool calls of cross-plan forensics per resume; plan-scoping makes the answer structural instead. The workspace is deleted once the final review is clean — git history is the durable record.
This was referenced Jul 13, 2026
arittr
added a commit
to prime-radiant-inc/superpowers-evals
that referenced
this pull request
Jul 16, 2026
Two permanent full-tier scenarios pinning the reject-foreign/trust-own ledger discrimination that obra/superpowers#1943 builds, mirroring the PR's S1/S2 eval design. Hybrid checks: behavior-neutral core + layout- pinned mechanics. Co-Authored-By: Claude Fable 5 <[email protected]>
5 tasks done
Closed
4 of 5 tasks
This was referenced Jul 30, 2026
4 of 5 tasks
4 of 5 tasks
This was referenced Sep 19, 2026
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.
Who is submitting this PR? (required)
claude-fable-5) as the coordinating session; an Opus SDD controller subagent executed the plan; Sonnet subagents served as implementers and as the 40 eval scenario agents; the final whole-branch review ran on OpusWhat problem are you trying to solve?
SDD's durable-progress workspace (
.superpowers/sdd/, since v6.0.3) has no plan identity and no end-of-life. Every artifact is keyed by bare task number (progress.md,task-N-brief.md,task-N-report.md), and SKILL.md tells a starting controller to treat whatever ledger it finds as its own progress ("Tasks listed there as complete are DONE — do not re-dispatch them"). Nothing ever deletes the workspace.Observed failures from a real multi-plan project (forensic record in
docs/superpowers/specs/2026-07-06-sdd-plan-scoped-workspace.md, gathered from an actual repo where SDD ran plans P1→P2→P3 in one worktree between 2026-06-22 and 2026-07-05):progress-p2.mdandp2-task-N-report.mdto dodge the previous plan's ledger; the second plan's briefs silently overwrote the first plan's at the default paths; an abandonedprogress-p3.mdstub remains. 68 files accumulated across three plans.git statusnoise.progress.mdand silently skips the new plan's tasks #1936 — a second run reading the previous run'sprogress.mdand silently skipping the new plan's tasks, i.e. the ledger-adoption failure mode itself.One honesty note on #1936's failure mode: our controlled baseline could not reproduce blind ledger adoption — 25/25 fresh Sonnet controllers across three framings (including a faithful post-compaction resume with the skill's "trust the ledger" line active) forensically cross-checked the stale ledger against git history and refused it, spending 6–13 tool calls per resume doing so. The fix therefore does not claim an error-rate reduction with current-generation controllers; it removes the structural collision surface entirely so correctness stops depending on controller vigilance (and on model tier), and the forensic disambiguation work disappears. Full evidence:
docs/superpowers/specs/2026-07-06-sdd-plan-scoped-workspace-eval-results.md.What does this PR change?
sdd-workspacenow requires the plan file and resolves a per-plan directory (.superpowers/sdd/<plan-basename>/);task-briefandreview-packagewrite into their plan's directory (review-packagegainsPLAN_FILEas its first argument). SKILL.md's Durable Progress section scopes the ledger check to the plan's own workspace, requires the ledger's first line to name its plan, treats mismatched or flat-path ledgers as another plan's property, and deletes the workspace once the final whole-branch review is clean. The workspace test is rewritten for the plan-scoped layout (13 assertions, including negative cases and worktree isolation).Is this change appropriate for the core library?
Yes. It changes core SDD infrastructure (
skills/subagent-driven-development/) that every SDD user exercises, regardless of project type. No third-party services, no domain-specific behavior, no new dependencies.What alternatives did you consider?
Does this PR contain multiple unrelated changes?
No. One problem. The spec, plan, and eval-results documents committed alongside the code are this change's design and evidence record;
task-reviewer-prompt.mdgets a one-line signature alignment for the same script change.Existing PRs
progress.mdand silently skips the new plan's tasks #1936.All three PRs identified the same collision problem; none was mergeable as-is for the maintainer's requirements:
dev), and places its test outside the wired-in suite.This PR covers the union of what those attempt, plus ledger identity, the ownership guard, end-of-plan cleanup, and behavioral eval evidence, with no compatibility fallbacks. The maintainer plans to follow up on the three open PRs directly.
Environment tested
New harness support (required if this PR adds a new harness)
Not applicable — no new harness.
Evaluation
Raw tool-call counts did not drop (GREEN mean 9.6 vs RED 9.0, on a GREEN fixture that deliberately contains more stale litter); the change is in the kind of work — no rep needed to open commits and diff them against plan files. Two earlier fixture iterations were discarded by the plan's own STOP gates for measuring the wrong mechanism (fabricated hashes; stub implementations ruled "false records"); that history is documented in the results doc's Fixture iterations section.
Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)Pressure-testing summary: 40 fresh-session scenario reps total (25 RED / 15 GREEN+control), every reply read and hand-scored, verbatim quotes preserved in the two committed evidence docs; the RED baseline falsified the original blind-adoption hypothesis and the eval was re-scoped with explicit maintainer sign-off (recorded in the spec) rather than reframed — per writing-skills, no failing baseline means no error-rate claim, so this PR doesn't make one. The Red Flags table entry and review-package invocations were updated mechanically for the new signatures; the rewritten Durable Progress section passed 5/5 GREEN on both scenarios with zero loophole iterations. Deterministic gates at the branch tip, re-run independently three times (implementer, Opus final reviewer, coordinating session):
tests/claude-code/test-sdd-workspace.sh13/13 PASS;tests/claude-code/test-subagent-driven-development-integration.shexit 0;scripts/lint-shell.shclean on all touched shell files. Known pre-existing failure, unchanged by this branch:tests/claude-code/test-subagent-driven-development.shfails identically at the merge basec809093(case-sensitive greps over live-model paraphrase) — flagged for a separate fix.The final whole-branch review (Opus, adversarial, independently re-ran gates and byte-compared committed appendices against on-disk eval artifacts): ready to merge, 0 Critical, 0 Important, 4 Minor (all triaged defer/not-an-issue; the substantive one — an identity-less ledger inside a plan's own scoped directory falls between the guard's branches and fails safe toward a fresh start — is noted for a follow-up).
Release-note lines for the next release: (a)
review-packagenow takesPLAN_FILEas its first argument — old invocations fail loudly; (b) an SDD plan in flight across the upgrade (flat-path ledger) is deliberately treated as another plan's progress and starts fresh — safe direction, by design.Human review
Stated plainly rather than checked: Jesse (the maintainer) commissioned this change, made the two load-bearing decisions mid-flight (design direction; eval re-scope after the RED baseline falsified the hypothesis), and directed that the PR be opened for his review — this PR is his complete-diff review venue for work done in his own checkout. Nothing here has been merged; nothing lands without his review.