Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ The generated skill drives a 10-phase loop: triage → work selection → implem
/create-dev-loop
```

Run this from inside any git repository. If a skill already exists for the repo, you'll be asked whether to overwrite it.
Run this from inside any git repository. If a skill already exists for the repo, you'll be asked to choose:

- **update** *(default)* — re-derive the skill from the current template and current repo state, then show a diff before overwriting. Use this to pull in template improvements without re-creating the GitHub repo or `my-claude-skills` entry. Aborts if the local skill directory has uncommitted changes.
- **overwrite** — full regeneration, idempotently re-asserting the repo and registry entry.
- **cancel** — exit without changes.

The skill reports the command name and a summary of the choices made (build system, test runner, doc sources, reviewer, branch prefix) when it finishes.

Expand Down
1 change: 1 addition & 0 deletions RESEARCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ Last reviewed: 2026-05-25.

**Implementations.**
- PR #33 (Template-version header for drift detection): shipped 2026-05-25. Observed effect: pending — needs N cycles of data. Adds `<!-- template-version: SHA -->` and `<!-- generated-at: ISO-timestamp -->` HTML comments to the top of every newly generated skill, plus `{{TEMPLATE_VERSION}}` and `{{GENERATED_AT}}` rows to the Step 4 substitution table. Implements the second bullet of this finding's implications; the periodic regression-check (third bullet) is a separate future change. The drift-detection step in `cdl-dev-loop` Phase 9 is also deferred — it belongs in the cdl-dev-loop repo, not here.
- PR #35 (Update mode — re-derive existing skills from current template): shipped 2026-05-25. Observed effect: pending — needs N cycles of data. Adds an `update` mode to `/create-dev-loop` so the retrofit work that CLAUDE.md's promotion checklist currently mandates can be driven by the skill itself rather than by hand. Complements PR #33's drift detection — #33 detects drift; PR #35 is the remediation channel.

---

Expand Down
24 changes: 23 additions & 1 deletion create-dev-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,25 @@ ls ~/local-skills/<slug>-dev-loop/ 2>/dev/null
ls ~/.claude/commands/<slug>-dev-loop.md 2>/dev/null
```

If one exists, ask the user whether to overwrite it before continuing.
**If no skill exists**, set `MODE=fresh` and proceed to Step 2. All subsequent steps run.

**If a skill already exists**, ask the user to choose:

- **update** *(default)* — re-derive the skill from the current template and current repo state, producing a fresh skill file. Set `MODE=update`. Steps 2–5 run; Steps 6 (create GitHub repo) and 7 (record in `my-claude-skills`) are skipped because those artifacts already exist.
- **overwrite** — re-derive and replace as in fresh generation. Set `MODE=overwrite`. Steps 6–7 still run, idempotently re-asserting the repo and registry entry.
- **cancel** — exit without changes.

Before proceeding in **update mode**, abort if the local skill directory has uncommitted changes:
```bash
cd ~/local-skills/<slug>-dev-loop && git status --porcelain
```
If the output is non-empty, stop and ask the user to commit or stash their edits — the update would otherwise overwrite in-progress work.

In **update mode**, after Step 4 completes, show the user a diff between the existing skill file and the freshly generated content *before* overwriting:
```bash
diff -u ~/local-skills/<slug>-dev-loop/<slug>-dev-loop.md /tmp/<slug>-dev-loop.new.md
```
Get explicit confirmation before replacing the file.

---

Expand Down Expand Up @@ -534,6 +552,8 @@ repo-specific choices made (build system, test command, doc sources, reviewer, b

### 6 — Create a private GitHub repo for the skill

**Skip this step if `MODE=update`** — the repo already exists from the initial generation. (Run only when `MODE=fresh` or `MODE=overwrite`.)

```bash
gh repo create <slug>-dev-loop --private --description "Autonomous dev loop skill for {{PROJECT_NAME}}"
```
Expand Down Expand Up @@ -571,6 +591,8 @@ done

### 7 — Record the skill in my-claude-skills

**Skip this step if `MODE=update`** — the entry already exists from the initial generation. (Run only when `MODE=fresh` or `MODE=overwrite`.)

Open `~/my-claude-skills/README.md` and append a new row to the skills table using the GitHub repo created in Step 6:

```
Expand Down