Skip to content

Fix Step 1 update-mode scratch file and stale example-skills-catalog reference - #77

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/step1-update-scratch-file
Jul 27, 2026
Merged

Fix Step 1 update-mode scratch file and stale example-skills-catalog reference#77
dmccoystephenson merged 1 commit into
mainfrom
fix/step1-update-scratch-file

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Step 1's update-mode diff referenced /tmp/<slug>-dev-loop.new.md without ever saying how that file is produced. The natural reading was shell > redirection into /tmp -- exactly the pattern PR Add Tests-fix CI-revert fallback ladder and scratch-file guidance #67 documented as blocked in some harness sandboxes, and /tmp is outside the repo directory some sandboxes restrict even when in-repo writes succeed. If the scratch write silently failed, the pre-overwrite diff -- the only confirmation gate protecting an existing skill file -- could be skipped.
  • Now: names the Write tool as the mechanism, uses an in-repo scratch path (~/local-skills/<slug>-dev-loop/<slug>-dev-loop.md.new), and fails closed -- abort and report rather than overwrite without having shown the diff -- if the scratch write fails. Cleans up with python3 -c "import os; os.remove(path)" rather than rm, matching PR Add Tests-fix CI-revert fallback ladder and scratch-file guidance #67's rationale.
  • Fixed a second, smaller drift found while in this section: the MODE=update bullet still said "record in example-skills-catalog" after PR Make example-skills-catalog catalog recording optional #69 renamed Step 7 to an optional personal catalog and made it conditional on the directory existing.

Closes #73

Note on scope

create-dev-loop.md is on the do-not-auto-merge list -- issue #73 explicitly flagged that this needs human review before merge and validation via a MODE=update end-to-end run per CLAUDE.md's "Testing changes" item 5. Opening under the maintainer's direct, in-session request to polish the repo.

Research grounding

No RESEARCH.md finding applies -- this is the same class of harness/sandbox operational observation PR #67 explicitly declined to force a citation for (matches issue #73's own assessment).

Test plan

  • python3 scripts/check_docs.py passes
  • No {{placeholder}} added or changed; no Step count/numbering change
  • UNVERIFIED -- a full MODE=update end-to-end dry run against a fixture repo with an existing generated skill was not performed. This session has no fixture repo with a pre-existing <slug>-dev-loop skill to update against, and the sandbox restricts filesystem writes outside this repo's own working directory (the same constraint this PR documents). The change is prose-only inside an existing Step (no placeholders, no fence/escaping changes, no Step renumbering), which lowers risk, but a maintainer with a real fixture should confirm MODE=update still produces a reviewable diff and correctly cleans up the scratch file before treating this as fully verified.

drafted by Claude on behalf of Daniel Stephenson

Step 1 told the generator to diff against /tmp/<slug>-dev-loop.new.md
but never said how that file gets written -- the natural reading was
shell redirection, which is exactly what PR #67 documented as blocked
in some sandboxes, and /tmp is outside the repo directory some
sandboxes also restrict. Now names the Write tool and an in-repo
scratch path, and fails closed (abort, don't overwrite unreviewed) if
the write itself fails.

Also updated Step 1's MODE=update bullet, which still said 'record in
my-claude-skills' after PR #69 renamed Step 7 to an optional personal
catalog.

Closes #73
@dmccoystephenson
dmccoystephenson merged commit efa3071 into main Jul 27, 2026
1 check passed
@dmccoystephenson dmccoystephenson changed the title Fix Step 1 update-mode scratch file and stale my-claude-skills reference Fix Step 1 update-mode scratch file and stale example-skills-catalog reference Jul 27, 2026
@dmccoystephenson
dmccoystephenson deleted the fix/step1-update-scratch-file branch August 3, 2026 06:01
dmccoystephenson added a commit that referenced this pull request Aug 3, 2026
…nce (#77)

Step 1 told the generator to diff against /tmp/<slug>-dev-loop.new.md
but never said how that file gets written -- the natural reading was
shell redirection, which is exactly what PR #67 documented as blocked
in some sandboxes, and /tmp is outside the repo directory some
sandboxes also restrict. Now names the Write tool and an in-repo
scratch path, and fails closed (abort, don't overwrite unreviewed) if
the write itself fails.

Also updated Step 1's MODE=update bullet, which still said 'record in
a-private-repo-3' after PR #69 renamed Step 7 to an optional personal
catalog.

Closes #73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Step 1's update-mode diff needs a scratch file at /tmp but never says how to write it

1 participant