diagnose: step 4's checks have no worktree when none is open #194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Location
.agents/skills/diagnose/SKILL.md, steps 2 to 5 and the Overview, withthe "Reads and writes" of
docs/workflows/diagnose.md. Seen onmainat
1c87aae.Evidence
Step 2 opens a scratch worktree from
open-worktreeonly when areproduction is agreed with the user, and step 3 opens one only for a
bisect. When a failing test is the reproduction and the failure is not
a regression, no worktree is open. Step 4 still rules hypotheses in or
out "with the smallest check", and a check often edits code, such as
adding a log line or reverting a hunk.
AGENTS.mdputs every change tofiles in a worktree, and the Overview and the page say the skill works
in a scratch worktree it removes at the end. Step 5's "remove the
scratch worktree" also assumes one exists.
Scenario
A task in
execute-planmeets a failing test of unknown cause and runsdiagnose. The test is the reproduction, and the failure is not aregression, so no worktree is opened. To test a hypothesis, the agent
edits the code. No step says where: in the task's worktree, where the
edit mixes into the change, or in a scratch worktree the skill does not
open. At step 5 there is nothing to remove.
Smallest fix
In step 4, run checks that change files in the scratch worktree, opened
from
open-worktreewhen none is open, as step 3 already does for abisect. Other options were set aside: always opening it in step 1 adds
a step for diagnoses that only read, and saying that step 4's checks
only read does not match checks that run code.
https://claude.ai/code/session_012CBsgjdkRDt2uVUmT7bj64