Repository navigation
Make Steps 6 and 7 safe to re-run under overwrite mode - #175
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-review rubric (head Universal items:
Repo-specific items:
Points for the maintainer's review, none of which were changed:
Summary: the change reads correctly and CI is green, but the two FAIL items hold it for a real overwrite run, so it is not being merged by this dispatch. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
There was a problem hiding this comment.
🟡 Changes recommended
The existing-repository check can publish sensitive generated content to a public repo, while overwrite runs can misdirect repository references and create unwanted timestamp-only commits.
3 open issues
What changed in this PR
This PR updates the skill generator’s repository and catalog setup to support repeated overwrite runs without recreating existing resources.
Changes:
- Guard repository and remote creation, update existing labels, and stop on rejected pushes without force-pushing.
- Replace existing catalog rows and skip commits when staged content is unchanged.
- Clarify that template-version metadata belongs directly below the generated skill’s H1 heading.
| File | Description |
|---|---|
create-dev-loop.md |
Adds rerun guards to Steps 6–7 and clarifies metadata placement in Step 4. |
Review effort: Balanced
| gh repo view "$(gh api user -q .login)/<slug>-dev-loop" >/dev/null 2>&1 || \ | ||
| gh repo create <slug>-dev-loop --private --description "Autonomous dev loop skill for {{PROJECT_NAME}}" |
| git remote get-url origin >/dev/null 2>&1 || \ | ||
| git remote add origin https://github.com/$(gh api user -q .login)/<slug>-dev-loop.git |
| git remote add origin https://github.com/$(gh api user -q .login)/<slug>-dev-loop.git | ||
| git add <slug>-dev-loop.md | ||
| git commit -m "Initial commit: <slug>-dev-loop skill" | ||
| git diff --cached --quiet || git commit -m "<commit message for this MODE>" |
…nd 7 Stop when an existing skill repo is public, use the existing origin's owner and name for labels, the catalog row, and SKILL_REPO_OWNER, and ignore the generated-at comment when deciding whether a regenerated skill changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The three Copilot findings on
The self-review rubric was not re-run, as Phase 4 caps it at one pass. Its earlier maintainer note on CI passed on This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |


Summary
Overwrite mode is documented as "idempotently re-asserting the repo and registry entry" (Step 1 and
README.md:57), but the commands in Steps 6 and 7 failed or duplicated work on a second run. The documented behavior is kept and the commands are brought into line with it.gh repo viewbefore anything is pushed. A missing repo is created, a private one is reused, and a public one stops the run, so a generated skill cannot be published to a same-named public repo.git remote addis run only when nooriginexists. This deviates from the add-or-set-urlform suggested in Overwrite mode is documented as idempotent, but Steps 6 and 7 are not #172, becauseset-urlwould rewrite the remote of a skill repo that was transferred. The skill repo for this project was moved that way.originis resolved into<skill-repo>, which is used for the visibility check, the labels, and the catalog row.SKILL_REPO_OWNERin Step 4 follows the same remote, so a transferred skill repo is not pointed back at its old owner.Regenerate <slug>-dev-loop skillis used underMODE=overwrite, and theMODE=freshmessage is unchanged.generated-atdiffers on every run, so it is ignored when deciding whether the skill changed. If nothing else changed, the committed file is restored and no commit is made. This comparison does not usegit diff -I, which requires git 2.30 and is not available in the 2.25.1 used by this dispatch environment.--forceis passed togh label create.create-dev-loop.mdhalf of Step 4 and CLAUDE.md still place the version comments at the top of the generated skill #173): theTEMPLATE_VERSIONrow now says "directly below the H1 heading" instead of "at the top". TheCLAUDE.md:53half of that issue is untouched because editingCLAUDE.mdrequires separate authorization, so Step 4 and CLAUDE.md still place the version comments at the top of the generated skill #173 stays open.Closes #172
gardener interface: where the skill is written, what it is named, and what Step 6 creates are all unchanged.
MODE=freshagainst a repo that does not exist produces the same repo, remote, commit message, and labels as before, so this is not a breaking change for gardener. The new stop on a public repo replaces a case in whichgh repo createalready failed.Retrofit: none is needed. Steps 4, 6, and 7 run at generation time and their text does not reach generated skills.
Research grounding
No
RESEARCH.mdfinding applies. This corrects a mismatch between documented and prescribed behavior, with no empirical claim behind it, so no Implementations entry is added.Doc sync check
README.md's "What it does" Step list still matchescreate-dev-loop.md's Steps 1:1{{placeholder}}added or changed has a corresponding Step 4 substitution-table row (none were added or changed;<skill-repo>is an execution-time value, like<slug>)Test plan
python3 scripts/check_docs.pypassed on81882b6.python3 -m unittest discover -s testsran 42 tests, all OK, on81882b6./create-dev-loopunderMODE=freshandMODE=overwriteagainst a real low-stakes repo. This was not run, because Step 6 creates a GitHub repo and Steps 3 and 5 write outside the checkout, neither of which is authorized in a headless dispatch ([self-audit] The repo's own validation anchor is structurally unrunnable in a headless dispatch, so template changes can never merge autonomously #109).Nothing automated covers Steps 6 and 7, so a green
doc-consistencyjob says nothing about these commands. None of the fiveCLAUDE.mdchecklist items was exercised. In particular:gitcommands against a local bare repo was written but not run, since the dispatch's permission rules refused it. Thegitbehavior in this PR therefore rests on the documented behavior ofgit.gh label create --forcewas taken from theghmanual.gh label create --helpwas refused in this dispatch, as it was when Overwrite mode is documented as idempotent, but Steps 6 and 7 are not #172 was filed.git branch -m mainwhen already onmain, which Step 6 now reaches on a re-run, was not tested either. A probe of it was refused.gh repo view --json isPrivatewere not observed.The overwrite run should confirm those points, including a stop against a public repo. A second overwrite with no change in between should then produce no new commit, no duplicate catalog row, and a clean working tree in the skill directory.
Issues not picked this cycle
CLAUDE.mdhalf and CLAUDE.md still links gardener under the old dmccoystephenson owner #106:CLAUDE.mdedits require explicit authorization.create-dev-loop.mdwould be held for the same validation gate.A Stage A sweep of the non-template docs was also performed this cycle.
RESEARCH.mdship dates were checked againstmergedAtand matched, and no new drift was found inREADME.md,CONTRIBUTING.md,SECURITY.md, or the GitHub templates. The labels used by the issue templates could not be checked, sincegh label listwas refused.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson