Repository navigation
Conversation
Collaborator
Author
|
This change is part of the following stack: Change managed by git-spice. |
Drill scenario worktree-already-inside-spec-aware revealed a latent skill loophole: agents detecting existing isolation would correctly refuse to nest a worktree, but then offer options — including exiting to the main repo and creating a sibling worktree from there — and execute the sibling option when the actor accepted. The prior wording "Do NOT create another worktree" got read as "don't NEST another worktree," leaving sibling creation as an apparently-legal workaround that satisfied the agent's interpretation of the directive while violating the skill's actual intent (use the current workspace, period). Fix: tighten the already-inside block to be explicit: - Current workspace is the working environment, use it - No alternatives, no creation — not nested, not sibling, not anywhere - If the user genuinely needs different isolation for unrelated work, they have to exit the current workspace themselves Validation pending via drill reruns of worktree-already-inside and worktree-already-inside-spec-aware on this branch state. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
arittr
force-pushed
the
add-worktree-consent-step
branch
from
April 13, 2026 23:35
72dd30d to
884b1a5
Compare
arittr
force-pushed
the
fix-sibling-worktree-loophole
branch
from
April 13, 2026 23:35
d4bfea4 to
b8d9f06
Compare
This was referenced Apr 13, 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.
What problem are you trying to solve?
The
using-git-worktreesskill's "already in a linked worktree" detection branch had a subtle loophole: agents would correctly refuse to nest a new worktree, but would then offer alternatives to the user — including "exit to the main repo and create a sibling worktree for signup there" — and execute the sibling option when the user accepted.Drill scenario
worktree-already-inside-spec-awareintermittently surfaced this (1 failure in 5 recent runs). Session log from the failing run:The original directive "Do NOT create another worktree" was being read as "don't NEST another worktree." A sibling worktree created from the main repo is technically not nesting, so the agent considered itself compliant with the directive.
What does this PR change?
Tightens the already-inside-worktree block in
using-git-worktrees/SKILL.mdto be unambiguous about creation:Is this change appropriate for the core library?
Yes. This is a correctness fix to a core workflow skill. The loophole exists in the original
using-git-worktreestext and persists through theadd-worktree-consent-step(#1124) rewrite, so it applies regardless of which design iteration ships.What alternatives did you consider?
Does this PR contain multiple unrelated changes?
No. Single-paragraph edit to one block in one file, +5/-1.
Existing PRs
Environment tested
claude-opus-4-6Evaluation
Drill harness validation on the two
already-insidescenarios, 3 runs each:worktree-already-insideworktree-already-inside-spec-aware6 runs, 18/18 criteria passed. One post-fix run observed the agent still offering options, but the sibling-worktree option was gone — replaced by "exit and re-invoke from main repo" (the correct behavior per the new wording). Scenario passed because no worktree was created.
Rigor
superpowers:writing-skillsand completed adversarial pressure testing (drill harness)Human review