From 14a63453fa299ecfb42d57639e57cbb96f7ae54d Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Mon, 17 Aug 2026 08:48:51 -0400 Subject: [PATCH] Do not mutate the user's working tree to do your work The skill changes files, installs tooling and commits, and nowhere says where that is allowed to happen. The invariant is the part worth writing down: isolation is declared in the SPEC, so the human vetoes the mechanism at approval rather than discovering afterwards which tree was rewritten. Twelve lines folded into the existing Setup section, no new reference file. It goes first in that section because it decides which tree everything after it happens in -- the toolchain install and the git init both land somewhere, and that somewhere is this decision. The trap is the reason this is not just a preference. A fresh worktree contains no gitignored content, so the gauntlet frequently cannot run there, and the tempting move is to report green from a tree that never ran the suite -- a mechanism reporting success while doing nothing, failing in the direction that looks good. Two outcomes are acceptable: rebuild and run there, or fall back to a branch and record why. The landing-tree caveat is the subtler half. An isolated tree and the tree the change lands in can differ by ignored or untracked content, so a green isolated run is not automatically evidence about the landing tree; EVIDENCE says so when it applies. The executable version of that check -- apply and revert in the landing tree -- is deliberately not here; it is heavier machinery than this skill wants, and stating the limit is worth more than half-enforcing it. Co-Authored-By: Claude Opus 5 --- skills/old-coder/SKILL.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/skills/old-coder/SKILL.md b/skills/old-coder/SKILL.md index a2b1351..d76c7c0 100644 --- a/skills/old-coder/SKILL.md +++ b/skills/old-coder/SKILL.md @@ -284,6 +284,20 @@ until that file has been read in full and executed; missing or unreadable → ## Setup +**Isolation — do not mutate the user's working tree to do your work.** Declare +the mechanism in the SPEC, with one line of why: a worktree, a branch, or none — +the last only at Tier 1, where the blast radius is a typo. The human vetoes the +mechanism at approval rather than discovering it afterwards. + +The trap: **a fresh worktree contains no gitignored content**, so the gauntlet +often cannot run there until dependencies are rebuilt. Two outcomes are +acceptable — rebuild and run there, or fall back to a branch and record why. +Never report green from a tree that never ran the suite. + +Where the isolated tree and the tree the change lands in differ by ignored or +untracked content, say so in EVIDENCE: a green run in a tree missing the landing +tree's `.env` or build outputs is not evidence about the landing tree. + If the project has no test runner, no linter, or no type checking, set up the minimal standard toolchain for the language **first** (see `references/gauntlet.md`). A gauntlet can't run on bare ground. Setup changes