fix(sdd): ownership markers stop same-basename plans sharing a workspace - #2138
Open
obra wants to merge 1 commit into
Open
fix(sdd): ownership markers stop same-basename plans sharing a workspace#2138obra wants to merge 1 commit into
obra wants to merge 1 commit into
Conversation
sdd-workspace slugged workspaces by basename alone, so docs/alpha/plan.md and docs/beta/plan.md resolved to one directory and task-brief silently overwrote the other plan's brief — the single gitignored source of task requirements, unrecoverable once clobbered. Each workspace now records its owning plan in a plan-path marker (repo-relative in-repo, absolute outside). Lookup keeps basename slugs and existing behavior for the common case: a markerless workspace is adopted in place (no migration break for in-flight plans), a marker naming this plan is a match, and a marker naming a different plan disambiguates with the plan's parent-directory name, then a counter. Plan paths are normalized (CDPATH-guarded physical cd) so relative, absolute, and ../ spellings of one plan share one workspace. task-brief and review-package delegate to sdd-workspace and need no changes. SKILL.md's workspace bullet no longer promises the exact <plan-basename> path, since disambiguated workspaces differ. Reported by @CRGDan; reproduction and test groundwork by @crisnahine in PR #2120. Fixes #2045
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 (#2045)
sdd-workspaceslugs bybasename "$plan" .md, sodocs/alpha/plan.mdanddocs/beta/plan.mdresolve to one workspace andtask-briefsilently overwrites the other plan's brief — the single source of task requirements, gitignored, unrecoverable. Reproduced live during triage and again in this PR's RED run (alpha's brief ends up containing beta's text).Design (settled on #2045 after closing PR #2120)
plan-path; repo-relative in-repo, absolute outside). Marker names a different plan → disambiguate to<slug>-<parent-dir>, then a counter.../spellings of one plan normalize (physical path) to one workspace. Allcds areCDPATH= cd --guarded (carried from fix(sdd): slug the workspace by plan path, not basename #2120's review findings).task-briefandreview-packageneed no changes — they delegate tosdd-workspaceand hold no slug logic (verified).TDD evidence
8 new assertions written first, RED against the unmodified script — including the live #2045 reproduction (both plans →
.superpowers/sdd/plan, brief clobbered) — then GREEN across the full suite with all 13 pre-existing assertions unmodified. One SKILL.md line updated because disambiguation makes the exact-path parenthetical false; ledger-check prose untouched.Note: this appends to
test-sdd-workspace.shalongside #2134 and #2136 — whichever lands later gets a trivial append-order rebase.Reported by @CRGDan in #2045; reproduction and test patterns credit @crisnahine's closed #2120. Fixes #2045.
Who is submitting
Claude Fable 5 on Claude Code 2.1.228 (implementation subagent + controller review of the full diff), working the triage build queue directed by @obra, who reviews the diff.
@arittr @ada-sen — review requested.