| Age | Commit message (Collapse) | Author |
|
make one
Git Bash copies a file for ln -s unless native symlinks are enabled,
and a shell may lack mkfifo. Each case now probes for the thing it
needs and prints a [SKIP] line when it cannot be made, so the file
still runs on Windows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
#2611's staging writes the brief to a temporary file beside OUTFILE and
renames it into place. The rename replaced whatever OUTFILE was: a FIFO
or a symlink became a regular file, and as root a device such as
/dev/null would be replaced too. task-brief now exits 2 unless OUTFILE
is absent or a plain regular file, as it already did for a directory.
Nothing in the skills passes such an OUTFILE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
The `pyproject.toml` line in using-git-worktrees' Step 2 runs `poetry
install` only beside a poetry.lock or for a [tool.poetry] table (#1108),
and no test ran it. poetry_install_only_for_poetry_projects extracts
Step 2's setup fence and runs it in three directories with a stub poetry
first on PATH that records each call: a pyproject.toml with neither the
table nor a lock does not call it; one with the table does; a
poetry.lock beside a pyproject.toml without the table does. Each
directory holds only those files, so no other installer line runs.
In a throwaway copy of the skill with dev's line put back,
if [ -f pyproject.toml ]; then poetry install; fi
the first check fails: the stub is called as `poetry install`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Nothing in the skill's prose sets LOCATION, and a shell variable set in
one tool call is gone in the next. Run as written, the Safety
Verification check became `git check-ignore -q "/"`, which exits 128 with
git's "outside repository" message in every layout, including one where
`.worktrees/` is ignored. An agent can read that non-zero exit as "not
ignored", add a duplicate .gitignore entry and commit it. The fence now
starts with a `${LOCATION:?}` guard, so the check stops with a message
that says to set LOCATION to the directory selected above.
The mechanics test gains ignore_check_needs_location: it runs the fence
with LOCATION unset in a repository whose `.worktrees/` is ignored and
expects a non-zero exit with that message. Against the one-line fence it
fails with exit 128 and git's message. The two existing ignore-check
cases still pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Two #2630 cases ran task-brief on a deleted plan without capturing its
stderr, so every run printed "task-brief: warning: deleted-plan.md not
found; serving cached brief" twice between PASS lines. Both now send
stderr to a file and check that the warning is there, as the review's
F16 proposed, so the suite's output is clean and a lost warning fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The final-task bound keeps a plan's trailing Self-Review and Execution
Handoff out of the last brief (#2406). It also keeps out a closing
"Final verification" or "Done criteria" section, and no step told the
executor to read one: Final Review went straight to the review package,
and task-brief's only trace was a stderr line that read like a
truncation error.
executing-plans' Final Review now opens by telling the executor to run
the checks in those sections first, and task-brief's message says the
plan from that heading on is in no brief. Both texts are the review's
F4. The message's apostrophe is written '\'' so the single-quoted awk
program still parses; pasted as is, it is a syntax error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
A brief opened with everything above the plan's first Task heading and
nothing to mark where that context ends and the task begins, yet the
task reviewer reads the whole brief as what was requested. In a plan
grouped by chunk or phase, every task also got Chunk 1's heading and
intro.
The header now sits under a label saying its Global Constraints bind
the task and the rest is context, and it ends at the header's last ---
rule, so chunk and phase intros stay out; a header with no rule gets
one. The comment above the scan describes this. The code is the
review's F1/F2 patch (#2493).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
dev's text where no issue requires a change
task-brief keeps what its issues need: the brief is staged in a temp
file beside OUTFILE and moved into place only after a clean scan, so a
missing task or a failed rerun never empties an existing brief (#2611);
a deleted plan serves the brief already cached in its workspace
(#2630); and the two-pass CommonMark scan bounds the final task and
carries the plan header (#2406, #2493).
No cited issue asks for the rest, so it reads as on dev again:
- the task number passed through ENVIRON; -v n is back, and so is the
comment on why only the plan path goes through ENVIRON;
- the not-found message and exit 3 moved into awk, and the close of the
stderr pipe at the end of awk's END; the shell check is back, on the
staged file, and stderr prints in the same order as before;
- the line count kept in a variable; the "wrote" line counts the
committed file again;
- creating a missing OUTFILE directory: an explicit OUTFILE in a missing
directory fails, as on dev;
- the /dev/null OUTFILE branch, which served only the task-id check
that left task-done, with its two test cases.
Two cases now create OUTFILE's directory before the call.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
where no issue requires a change
sdd-workspace keeps what #2619 and #2630 need: the writable-directory
guard, the mkdir claim lock, the bounded claim loop, an empty PLAN_FILE
refused, a missing plan resolved lexically to the workspace that
already claimed it, and a .lock slug, in any case, kept off the lock
directory. review-package keeps its deleted-plan resolution (#2630),
its ^{commit} checks (#2620) and commit bodies (#2298).
Neither issue needs a new plan identity, so dev's rule is back: the
plan-path marker is repo-relative in the repo, absolute outside it.
These read as on dev again, because no cited issue asks for them:
- the worktree-prefix plan_id loop, which merged one plan's workspaces
across worktrees and left in-flight workspaces behind at upgrade;
- the .markdown slug, the .gitignore and .plan-path reserved slugs, and
the "root" parent fallback; the slug comes from basename again;
- the comments the rewrite deleted ("Physical path...", "Invoke via
bash...", "Normalize the plan path...", and the ownership rule now
above claim_candidate), and the reordered usage check;
- review-package reusing the deleted-plan lookup's directory;
- the test fixture's git_id refactor.
The three cross-checkout identity cases go with the loop, the
absorbed-submodule case goes because it passes on dev and no issue asks
for it, and the reserved-slug case keeps .lock.md and .LOCK.md only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
to dev's text where no issue requires a change
task-done keeps what its issues need: BASE is peeled to a commit
(#2620), sdd-workspace runs through bash (#2642), and the ledger
records "exit 0, log: task-<N>-tests.log", or "exit 0 (no output), ..."
when the command printed nothing, in place of a scraped last line
(#2342).
No cited issue asks for the rest, so it reads as on dev again:
- the task-id guard and the validation through task-brief (#2342 never
mentions task ids), with its two test cases and the deleted-plan
assertion that pinned it;
- the .failed.log staging with its EXIT trap and temp log, the stderr
warning for a silent pass and its aside in SKILL.md, the ledger header
read from the plan-path marker, and the repair of an unterminated
ledger line, with the five test cases that pinned them;
- the skills/*/scripts/* LF rule in .gitattributes, with its check-attr
case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
status.showUntrackedFiles=no
With status.showUntrackedFiles=no in a user's config,
`git status --porcelain --ignored=matching` stops with "fatal:
Unsupported combination of ignored and untracked-files arguments" and
lists nothing. An agent could read that as no ignored files, and the
removal that follows would delete them. #2707's listing is not
affected, because its -uall overrides the setting.
Pass -unormal, which is what the command uses when nothing is
configured. A mechanics fixture with the setting failed on .env.local
before this change and passes after it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Plain `git worktree remove` refuses for untracked files but deletes
ignored ones without refusing. Step 6 ran it before reaching the stop
for listed files, so a worktree holding only ignored files, or one left
after its untracked files were committed, lost them (#2207).
Above the removal block, one sentence: run it only when both Step 2
listings, run again in the worktree, list no files. After #2707's
refusal recipe, one paragraph: an ignored file is never committed or
force-added, so only options 2 to 4 apply to it; after options 1 to 3,
both listings run again, anything still listed is asked about, and the
worktree goes once they list nothing. #2707's "No answer means option 4"
covers an unanswered question. None of #2707's lines move or change.
Two mechanics cases pin the git behavior this depends on: with
NOTES.md committed, the listings still name an ignored .env.local, and
Step 6's block exits 0 and deletes it; with an untracked file present,
the block refuses with the message Step 6 quotes and leaves the file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The Step 2 listing from #2707, `git status --porcelain -uall`, does not
show ignored files, and Step 6's plain `git worktree remove` deletes
them without refusing. An ignored .env.local, or a plan workspace that
SDD's self-ignoring .gitignore hides, was lost at cleanup (#2207).
A separate paragraph after #2707's listing runs
`git status --porcelain --ignored=matching` and counts each `!!` entry
as a listed file, leaving out .superpowers/sdd/.gitignore,
brainstorming's port and token files, and dependency and build caches.
A plan workspace still present stays listed: it is an unfinished run.
Where the root .gitignore ignores .superpowers/, as the visual
companion asks users to do, git status shows it as one entry: the
exclusions cannot apply, and the plan workspace is named only as
.superpowers/. A second command,
`git ls-files --others --ignored --exclude-standard -- .superpowers`,
names the files inside it.
The new mechanics case runs both listings from the skill's own fences
on a worktree in each layout. Before this paragraph it failed: #2707's
listing alone named only NOTES.md and build/out.txt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
where no issue requires a change
These parts of the PR go back to dev's text in executing-plans and
subagent-driven-development: the `finish` ledger marker and the kept
workspace, so Finish deletes the plan's workspace as on dev and both
process graphs keep that step; the three-list Finish restructure; the
resume rewrite in executing-plans' Setup and in references/resuming.md;
the paraphrased main/master guard in both Setups; and `git log --oneline`
in SDD's no-bash review fallback. references/final-review.md and
references/resuming.md read as on dev.
In the SDD integration test, the trap quoting, `claude_rc` and Test 2's
count line go back to dev. Only the todo check keeps its change: it
reports instead of failing.
The PR's removal of the scattered todo steps stays. The conditional todo
sentence for #2177 and the edits that #2706, #2253 and #2344 need are made
on dev's text in the commits that follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The first #2515 fixture needs `.worktrees/` to be unignored. On a machine
whose global excludes file lists `.worktrees/` (through core.excludesFile,
or the default ~/.config/git/ignore), it is ignored there too, so the
skill's check correctly exits 0 and the case reports a failure. The
fixture's repository now sets core.excludesFile to /dev/null, which
overrides both. The second fixture expects the directory to be ignored,
which a global excludes file cannot change.
Reproduced with GIT_CONFIG_GLOBAL pointing at a config whose excludes
file lists `.worktrees/`, and with an XDG_CONFIG_HOME whose git/ignore
lists it: the case failed before this change and passes after it.
Against dev's skill text, and with 8881e52b's check reverted, it still
fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The mechanics test's fence extractor used `[[:space:]]`, which older mawk
releases do not support. task-brief, the repository's other awk code that
reads fences, spells whitespace `[ \t]`. The extractor now does the same,
and still finds indented fences.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
worktree_path
In zsh, the `path` array is tied to PATH, so running the snippet as
written set PATH to the new worktree's directory: `git worktree add`
itself failed with "command not found: git", and so did every later
command in that shell. The variable is renamed in its three places, and
nothing else in the snippet changes.
The mechanics test gains creation_snippet_keeps_path_under_zsh. It runs
the snippet under `zsh -f`, then `git --version` in the same shell, and
checks that the worktree exists. Against dev's snippet it fails with
"command not found: git". Without zsh, the case reports a skip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
starting commit
A native tool may create the worktree from origin's default branch, not
from the commit the work started on, so an unpushed plan is missing from
the new worktree (#2245, item 1). Step 0 now records and prints the
starting commit as START_HEAD, with the branch, so the values survive a
shell that does not keep variables between commands.
Step 1a takes the base check from the review (finding F1, which also
carries F2 and F9). After the tool runs, the agent works in the path the
tool returned, and runs four commands there. Their output picks one of
four actions: continue when the worktree is at the start commit;
fast-forward when the start commit is ahead, on any branch; continue when
only the remote was ahead; otherwise stop and ask which commit to build
on. The check is skipped when START_HEAD is `unborn`. Dev's paragraph on
what native tools handle stays as it is.
The tool-name examples lose `WorktreeCreate`, which is a settings hook
name, not a tool, and gain Codex's `create_worktree`.
The mechanics test gains base_check_states. It takes START_HEAD and the
branch from the Step 0 snippet's output, creates worktrees at, behind,
ahead of and diverged from the start commit, and checks what the Step 1a
commands print in each. Against dev's text it fails: Step 1a has no check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
trailing slash
Safety Verification passed when either `.worktrees` or `worktrees` was
ignored, so with both present and only `worktrees/` ignored, the worktree
went into an unignored `.worktrees/` (#2515). The check now covers only the
directory Directory Selection chose, using the same `$LOCATION` as the
creation snippet. The trailing slash lets a directory-only pattern such as
`.worktrees/` match before the directory exists, which the reporter's
follow-up showed fails without it.
The mechanics test starts with this case: it extracts the fence under
Safety Verification and runs it on both reported repositories. Against
dev's check, both fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
requires a change
Every hunk of this PR in using-git-worktrees/SKILL.md goes back to dev's
text: the sandbox paragraph and its Quick Reference row, the placeholder
rewrite of the creation snippet and --no-track, the self-ignoring
.gitignore, the one-sentence replacement of the setup block, the reworded
rationalization row, and the rewritten Step 0 lines. No cited issue needs
them. The edits that #2515, #2245 and #1108 do need, and the correction of
the false submodule sentence, are made on dev's text in the commits that
follow.
The 1,213-line mechanics test pinned about 180 strings of the rewritten
prose. It is removed here and replaced, at the same path, by a short test
that extracts the skill's snippets and runs them in throwaway repositories.
Its line in run-skill-tests.sh stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
record exit status in ledger
|
|
commits
|
|
and clean owned worktrees safely
|
|
and drop dead todo steps
|
|
The two "does NOT send reload" tests waited for the barrier file's
screen-added line on stdout, then counted reloads on the WebSocket. The
server logs and broadcasts in the same tick, but stdout and the socket
are separate channels, and on Linux stdout usually won: the socket had
0 reloads when the barrier fired and 1 reload 300ms later, so the tests
failed in 8 of 10 runs.
They now ping the server after the barrier and wait for the pong. The
server writes it on the same socket after the reload, so every reload
sent before it has arrived. 30 consecutive clean runs; with the server's
.html filter removed, both tests still fail.
|
|
fix(systematic-debugging): ship pressure scenarios under tests/, not in the skill (#2277)
|
|
fix(codex): accept linked git worktrees in the package and sync scripts
|
|
fix(brainstorming): resolve a relative --project-dir before start-server.sh cds (#2524)
|
|
skills(sdd, executing-plans): run helpers by absolute path from the working tree (#2429, #2525)
|
|
fix(sdd): helpers act on the current directory's repo like git, with -C to override (#2429)
|
|
fix(sdd): task-brief refuses a brief that an unclosed code fence would run to EOF (#2436)
|
|
fix(sdd): task-brief finds alphanumeric task IDs and explains non-English headings (#2459, #2496)
|
|
fix(sdd): print a Windows-readable workspace path (#2307)
|
|
Drew requested resolution of the merge conflict in obra/superpowers PR
#2601. Merge current dev into the existing PR branch without rewriting its
history.
Resolve the V2 bootstrap hunk by keeping #2601's shared handler registered
on context, compaction, and generate, and incorporating #2600's exact
BOOTSTRAP_MARKER prefix guard. This preserves injection for prompts that
merely mention EXTREMELY_IMPORTANT while preventing duplicate bootstrap
parts. All other dev changes merge without manual edits.
Validation: bash tests/opencode/run-tests.sh passed all five suites,
including hook registration, tag-mention regression coverage, child-session
suppression, caching, and skill registration. git diff --cached --check
passed and the index contains no unresolved paths. Live OpenCode
integration sessions were not rerun for this conflict-only repair.
Tracking: PRI-3674
|
|
fix(opencode): don't mistake a prompt that mentions EXTREMELY_IMPORTANT for the bootstrap
|
|
fix(opencode): tell the model skill ids are bare names (#2583)
|
|
fix(hermes): skip the controller bootstrap for delegate_task children (#2536)
|
|
skill (#2277)
systematic-debugging installed CREATION-LOG.md and four pressure-test
scenarios next to SKILL.md. Nothing in the skill links them, but agents
read and grep installed skill directories, and the scenarios open with
"This is a real scenario. You must choose and act".
Move all five, unchanged, to tests/systematic-debugging/pressure-scenarios/,
and add tests/skill-layout/test-no-dev-files-in-skills.sh, which fails if
any skill directory ships a CREATION-LOG.md or a test-*.md file.
|
|
package-codex-plugin.sh and sync-to-codex-plugin.sh checked for a
checkout with [[ -d .git ]]. In a linked worktree .git is a file, so
both scripts died with "not a git checkout" there, and
tests/codex/test-package-codex-plugin.sh failed 9 checks when run from
any worktree. Test that .git exists instead: it covers both layouts
and still requires the path to be the root of a checkout, which
matters for sync's user-supplied --local path. The scripts' later git
commands already work in worktrees.
Regression tests run the package script from a linked worktree of the
repo, and a sync preview from a linked upstream worktree into a linked
destination worktree. The package test is adapted from #1910.
Co-authored-by: tianma-if <tianma-if@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
start-server.sh built SESSION_DIR, PID_FILE, LOG_FILE and BRAINSTORM_DIR
from --project-dir as given, then ran `cd "$SCRIPT_DIR"` before using
them. A relative project dir like `.` was re-rooted at the scripts
directory, so the log and pid redirects failed and the server never
reported server-started: "Server failed to start within 5 seconds".
Resolve the project dir to an absolute path with `mkdir -p` + `cd && pwd`
right before deriving the session paths. mkdir -p keeps the existing
behavior of creating a project dir that doesn't exist yet (the Windows
lifecycle test relies on it), CDPATH is cleared so a relative name can't
resolve to some other directory, and `--` covers names starting with a
dash. Works on bash 3.2 without realpath or readlink -f.
Fixes #2524.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief ignores Task headings inside fenced code blocks by toggling a
flag on every ``` line. When a plan leaves a fence open (an edit deletes a
closing fence), the flag stays set for the rest of the file, every later
Task heading is invisible, and the requested task's brief runs to EOF.
The script then reported success: #2436 saw a 177-line task come back as
a 1159-line brief holding tasks 6 through 10, handed to an implementer as
its requirements.
The awk now notes whether a Task heading line appears inside the fence
that is still open at EOF. If one does while the requested task is being
captured, the task's end cannot be found, so task-brief deletes the
partial output and exits 4, naming the line where the fence opened. If
the open fence hides the requested heading itself, it names the fence
before the existing not-found error (exit 3), and suppresses the
"use the English word Task" hint, which would otherwise blame the
plan's English headings for what the fence did.
A fence left open that hides no Task heading changes nothing about the
brief, so it is still written, with a warning on stderr. Real plans do
this: in a corpus of 1,288 plans, refusing on any fence left open at EOF
blocked three correct briefs in two plans, each ending in a stray ``` that
hides no task. With this rule every brief in that corpus matches dev's.
An unclosed fence in a later task leaves an earlier task's brief alone.
The plan path reaches awk through the environment rather than -v, which
would interpret the backslashes of a Windows path as escapes. The fence
rule itself is unchanged, so this composes with #2304's CommonMark fence
tracking: a correct parser still cannot close a fence the author never
closed.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief recognizes only the English word `Task` in a task heading.
writing-plans' template shows `### Task N:` but never says the word is
machine-read, so a model writing a plan in Spanish writes `## Tarea 1:`.
task-brief and task-start then report "task 1 not found in plan-es.md
(no heading matching 'Task 1')", which reads as "this plan has no task 1"
and sends the controller looking for a task that is on line 3 (#2496).
When a plan has no Task headings at all, task-brief now prints, before the
existing not-found line, that task headings must use the English word
"Task" whatever the plan's language, and lists up to five headings shaped
like tasks (`<word> <id-with-a-digit>`). A plan that has Task headings,
just not the requested one, still gets only the not-found line, so asking
for Task 9 of an eight-task plan stays quiet.
This deliberately does not accept other words. Plans commonly carry
`Phase 1`, `Chunk 2` and `Step 1` headings, and a word-agnostic rule
would turn them into tasks. Keeping the word fixed in the plans
themselves is a writing-plans wording change, which needs evals.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief only treated `Task` followed by digits as a task heading, and
found the requested task by splicing TASK_NUMBER into a regex followed
by `([^0-9]|$)`. Plans that number tasks by lane (`### Task A1`,
`### Task B2`) could not be extracted at all: `task-brief plan.md A1`
exits 3 "task A1 not found" (#2459). Among 1,288 distinct plans in Jesse's
own repositories, 19 plans have such headings (262 headings, IDs like A1,
M3a, F.2, W0), and none of those tasks could be briefed.
The same splice made the match a prefix match: Task 6 also took a sibling
Task 6b (#2175), Task 1 took Task 1.1 and 1.2, Task 2.1 took Task 201
because `.` is any character, and an ID like `6(` crashed awk (#2405).
A task heading is now `Task` followed by an ID made of letters and digits,
optionally dot-separated, that contains at least one digit. The digit is
what keeps `## Task Overview` or `#### Task notes` from becoming a task
boundary. awk extracts the heading's ID and compares it to TASK_NUMBER as
a whole string, so TASK_NUMBER never reaches awk as a regex.
A deeper Task heading whose ID extends the requested one with a letter or
dot is a sub-task and stays in the parent's brief, as the prefix match
happened to do before: plans in that corpus nest `#### Task 1a` under
`### Task 1`, and a Task 1 brief without its sub-tasks would lose most of
its requirements. A sub-task's own brief ends at its next sibling. Depth
alone is not the test, because plans also drift from `## Task 1` to
`### Task 2`, and those are siblings.
The heading word stays the English literal `Task`, which is what
writing-plans' template uses. Widening it to any word would turn the
`Phase 1`, `Chunk 2` and `Step 1` headings that plans commonly carry
(308, 182 and 56 of them in the same corpus) into tasks.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
The SKILL.md change left skill-relative helper calls elsewhere under
skills/: final-review.md (the final whole-branch review package and its
re-review), fix-loop.md (the scoped re-review), the reviewer prompt
templates' placeholder descriptions, and executing-plans' task-start and
task-done. Each now carries the same qualifier: run the script by its
absolute path, from the working tree you're executing in. Nothing else
in those files changes.
tests/sdd-helper-paths/test-sdd-helper-paths.sh is a structural test
that fails when any skills/ markdown names a helper (sdd-workspace,
task-brief, review-package, task-start, task-done) by a relative
scripts/ path without "by its absolute path" within the next few lines.
It failed on 8 references before this change and passes on all 14
after.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo ran git with stderr discarded, so every git failure became
"must run from inside the git working tree ... run 'git init'". Where
git refuses a working tree the caller is actually inside (dubious
ownership on another owner's, FAT, network or WSL /mnt/c checkout; git
missing from PATH; the cwd inside .git), that message is false, points
at git init in an existing project, and hides the one line naming the
real fix. dev printed git's fatal, so this was a diagnostic regression.
The shared message stays, and git's first stderr line from whichever
check failed now always follows it as "git said: <line>", with no
per-case branches:
SDD scripts must run from inside the git working tree ... then rerun.
git said: fatal: detected dubious ownership in repository at '/r'
Tests: every no-repo assertion now requires the second line (a plain
non-repo dir gives "git said: fatal: not a git repository"), and a new
test simulates dubious ownership with git's GIT_TEST_ASSUME_DIFFERENT_OWNER
knob (no root or second uid needed; it skips if the installed git
ignores the knob).
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo fell back to the plan file's repository when the current
directory was outside any repository. That made the plugin-cache case
silently succeed somewhere: an agent that cd'd into the skill directory
and passed an absolute plan path got whichever checkout that path
pointed into. With the plan in the main checkout (where writing-plans
leaves it) and execution in a linked worktree, that is the #2429
wrong-worktree bug again, with exit 0. A real session (sdd-cwd-eval
sdd-A-5) took exactly this path and only landed in the right place
because its plan path happened to be the worktree's.
The SDD and executing-plans helpers now pick their repository the way
git does: the current directory's working tree, or DIR when given -C
DIR. Outside any working tree, sdd-workspace, task-brief,
review-package, task-start and task-done all stop with the shared
message and write nothing, even when the plan's absolute path is inside
a repository. sdd-repo no longer takes PLAN_FILE, since the plan has no
say.
The two "outside any repository ... uses the plan's repository" tests
and the task-start/task-done fallback tests become assertions that the
shared message comes out and nothing is written, in the cwd or the
plan's repository.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo's no-repository message told every caller to run 'git init'.
That is the right fix for a new project, but the other way to reach it
is standing in the wrong directory, such as the plugin's own skill
directory after reading "from this skill's directory" literally. There,
'git init' would turn the plugin cache into a repository and hide the
real mistake.
task-start and task-done were worse. They still read HEAD and BASE in
the bare cwd while the brief and ledger went through sdd-repo. From a
non-repo cwd with the plan in a repo that has commits, task-start wrote
the brief into the plan's repo, then printed git's fatal plus "HEAD has
no commit yet ... make an initial commit first" and exited 2. task-done
printed git's fatal. review-package in a repo with no commit said
"bad BASE: HEAD~1".
Every helper that can hit this (sdd-workspace, task-brief,
review-package, task-start, task-done) now stops with the same message
from sdd-repo, naming the current directory and offering init-and-commit
only as the new-project case:
SDD scripts must run from inside the git working tree you're
executing in, with at least one commit (current directory: <PWD>).
If this is a new project, run 'git init' and make a first commit,
then rerun.
sdd-repo gains --with-commit, which also refuses a repository whose HEAD
has no commit. review-package, task-start and task-done pass it because
they need HEAD as a BASE or a review range; sdd-workspace and task-brief
do not, so a brief can still be written right after git init.
task-start and task-done now read HEAD and BASE with git -C in the
repository sdd-repo names. Resolution is otherwise unchanged: the cwd's
repo, else the plan's, else exit 2. sdd-repo is now executable like its
siblings.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
missing repo
The SDD helpers found their repository with a bare
`git rev-parse --show-toplevel` in the caller's cwd, and review-package ran
every git command there too. Three reports trace back to that one line:
- #2429: outside any repository (the skill's own directory in a 7.0
package has no .git), sdd-workspace fed `cd` an empty path. bash 5.2
treats that as a no-op and wrote the workspace into the cwd after
printing git's bare fatal; Git Bash failed with "cd: null directory".
A controller working on worktree B from worktree A had no way to name B.
- #1799: the only way to aim review-package at a worktree was a
`cd <worktree> ; review-package ...` compound, which harnesses cannot
allowlist because the path and BASE change on every run.
- #2242: in a greenfield directory with no repository, task-brief and
sdd-workspace printed git's fatal and then carried on in the cwd (or
crashed, depending on bash), review-package said "bad BASE: HEAD~1", and
task-start printed an empty BASE with exit 0.
A new sdd-repo helper is the single place that picks the repository:
the cwd's working tree (or -C DIR's), exactly as git does. Anywhere else
it stops with exit 2 and one shared message.
sdd-workspace and review-package both use it, so they cannot disagree.
The cwd still wins over the plan's location on purpose: writing-plans
leaves the plan uncommitted in the main checkout, so an executor working
in a linked worktree passes the main checkout's plan path, and its
workspace and commits belong to the worktree. Resolving from PLAN_FILE
first (draft #2439) breaks exactly that flow: review-package then diffs
the main checkout and fails with "empty commit range".
sdd-workspace, task-brief and review-package take an optional leading
`-C DIR` that runs them as if started in DIR, as git -C does, so a caller
can name another worktree in one allowlistable command. Each script
resolves its own directory before the cd, so the documented
`bash scripts/review-package` form from the skill directory keeps
working with -C. PR #1809's version cd's first and then fails to find
sdd-workspace (exit 127) in that form.
task-start now refuses (exit 2) to print a BASE when HEAD has no commit,
instead of printing "base: HEAD" or "base: " with exit 0.
Co-authored-by: citizen204 <citizen204@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|