Repository navigation
Description
What's wrong
Step 1 of create-dev-loop.md tells the generator to show a diff before overwriting in update mode:
diff -u ~/local-skills/<slug>-dev-loop/<slug>-dev-loop.md /tmp/<slug>-dev-loop.new.mdThe right-hand path is a scratch file holding the freshly generated content, but no Step says how it gets there. The natural reading is shell redirection into /tmp — which is exactly the pattern PR #67 documented as unavailable in some harness sandboxes.
Why it matters
PR #67 added this Universal rule to the generated template's Phase 3:
Scratch-file handling in a sandboxed harness. When a step needs a scratch file for inspection or transformation [...] prefer the
Writetool over> fileshell redirection, and preferpython3 -c "import os; os.remove(path)"overrmto clean it up afterward. Some harness sandboxes statically block plain>redirection andrmoutright — even for files the same session just created inside the working directory.
So create-dev-loop.md teaches its generated children a lesson its own Steps don't follow. Two failure modes stack here:
- Plain
>redirection is statically blocked in some sandboxes, so the scratch file never gets written anddiff -ucompares against a nonexistent path. /tmpis outside the repo working directory. At least one sandbox permits in-repo writes via theWritetool while refusing out-of-repo scratch writes entirely — so even following PR Add Tests-fix CI-revert fallback ladder and scratch-file guidance #67's advice, the hardcoded/tmppath can fail.
The consequence is not cosmetic: the pre-overwrite diff is the only confirmation gate protecting a user's existing skill file from being replaced. If the scratch write silently fails, the generator either aborts mid-update or skips the gate.
Suggested fix
In Step 1, say explicitly how the scratch file is produced and pick a path that survives a sandbox:
- Name the
Writetool as the mechanism, matching the Phase 3 rule PR Add Tests-fix CI-revert fallback ladder and scratch-file guidance #67 added. - Prefer a path inside
~/local-skills/<slug>-dev-loop/(e.g.<slug>-dev-loop.md.new) over/tmp, so the write lands in a directory the generator already owns, and clean it up withpython3 -c "import os; os.remove(path)"after the diff is shown. - Alternatively, state that if the scratch write fails, the generator must abort rather than proceed to overwrite without showing the diff — the gate must fail closed.
How this was found
Stage A documentation-accuracy sweep (see PR #72). This is a behavioral gap in create-dev-loop.md, not doc drift, so it was filed rather than fixed under a docs cycle.
Research grounding
No RESEARCH.md finding applies — this is a harness/sandbox operational observation, the same class PR #67 explicitly declined to force a citation for. Stating that rather than reaching for one.
Note for whoever picks this up: create-dev-loop.md is on the do-not-auto-merge list, so the fix needs human review, and the Step 1 change should be validated by actually running MODE=update end-to-end per CLAUDE.md's "Testing changes" item 5.
Activity
Fix Step 1 update-mode scratch file and stale my-claude-skills refere…
Fix Step 1 update-mode scratch file and stale a-private-repo-3 refere…