Repository navigation
Add update mode: re-derive existing dev-loop skills from current template - #35
Conversation
…late Closes #16 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dmccoystephenson
left a comment
There was a problem hiding this comment.
Self-review rubric:
- Scope: PASS — 3 files; each change maps to one of #16's 7 AC items or a CLAUDE.md/Phase 7 rule. Net 29 LOC under the 400 ceiling.
- Tests-new: PASS-with-caveat — the update-mode flow is exercised by reading-through, not by running
/create-dev-loopend-to-end against a fixture repo (no fixture tooling exists). The guards (uncommitted-changes check, pre-overwrite diff, explicit confirmation) are described concretely enough that an agent following them produces verifiable shell output. - Tests-fix: N/A — not a bug fix.
- Sibling structure: PASS — Step 6 and Step 7 both prepend a
**Skip this step if MODE=update**line (siblings updated together); Step 1's three-way prompt uses the same bullet-with-bold-name shape as the existing CONVENTIONS-style identity prompt. - Sibling renames: PASS — Step 6 and Step 7 'Skip in update mode' annotations use identical phrasing.
- Docs: PASS — README "Usage" section updated to describe the three-way prompt; both Phase 7 sources (
create-dev-loop.md,README.md) modified together. RESEARCH.md §8 gets an Implementations entry. - Issue resolution: PASS — all 7 AC items met: (1) three-way choice with
updatedefault; (2) Steps 2–4 reused as-is; (3) pre-overwrite diff with confirmation; (4) uncommitted-changes abort; (5) Step 6 skipped in update; (6) Step 7 skipped in update; (7) flow documented in README + create-dev-loop.md. - Validation: PASS — placeholder count unchanged at 22; no new fenced blocks inside the outer template (the new fenced blocks in Step 1's update-mode section are outside the embedded markdown template, so no escape needed); phase numbering unchanged.
- {{EXTERNAL_SIGNAL_LABEL}}: N/A — no CI; manual validation against the diff served as the anchor.
- Placeholder-consistency: N/A — no new placeholders;
MODEis a control-flow variable not a template substitution. - Escaping: PASS — the new bash blocks (git status, diff, git rev-parse) live in Step 1, which is outside the embedded skill-template markdown block — they use plain triple-backticks without escape, which is correct for that location.
Adversarial probe — 'In update mode, the agent re-runs Step 2 (explore the repository) — what if the repo's CLAUDE.md / build files have changed since the original generation? Will the substituted values be correctly refreshed?' Yes — Step 2 reads current state; Step 4 substitutes current values. The whole point of update mode is to pick up repo-state drift as well as template drift. Concretely: if a repo added a CI workflow since first generation, update mode will set CLAUDE_MD and EXTERNAL_SIGNAL_LABEL/CMD based on the new state. Confirmed by reading Step 2 prose (unchanged) and Step 4 substitution descriptions (all read 'output of git rev-parse...' or similar — runtime queries, not stored values).
Summary
When a
<slug>-dev-loopskill already exists for the current repo,/create-dev-loopnow offers three modes instead of the previous binary overwrite/cancel:example-skills-catalog) since those artifacts already exist.example-skills-catalogentry.Recommends option A from #16's design notes (re-derive from evidence). Option B (section tagging for surgical updates) is deferred.
This closes the loop with PR #33 (template-version header): #33 detects drift via the embedded SHA; this PR is the remediation channel — re-run
/create-dev-loopin update mode to pull in template improvements.Closes #16
Test plan
git status --porcelaincheck with explicit abort messagediff -uagainst/tmp/<slug>-dev-loop.new.md) and explicit-confirmation requirementexample-skills-catalog) skips in update mode, runs in fresh/overwriteln -sf+mkdir -p) so no conditional needed — confirmed by re-reading the existing block{{placeholders}}introduced (MODEis a runtime control variable in the instructions, not a generation-time substitution)gh issue view 16and confirmed title/body matchREADME.md,RESEARCH.md,create-dev-loop.md; no matchesNote on option B (section tagging)
#16 recommends starting with option A and evaluating after a few cycles whether human customizations get lost during update. The
<!-- template-version -->header from PR #33 makes this observable: if a future cycle shows that customized skills lost manual tweaks during update, that's the trigger for revisiting option B.drafted by Claude on behalf of Daniel Stephenson