From d92e1754ca7d2f56f3c1eae1c0c8ce57a3840761 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Tue, 3 Mar 2026 00:32:53 +0200 Subject: [PATCH] feat: check for breaking changes after update-nanoclaw After validation, the update skill now diffs CHANGELOG.md against the backup tag to detect [BREAKING] entries. If found, it shows each breaking change and offers to run the referenced migration skill. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/update-nanoclaw/SKILL.md | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.claude/skills/update-nanoclaw/SKILL.md b/.claude/skills/update-nanoclaw/SKILL.md index ea74e3a..e548955 100644 --- a/.claude/skills/update-nanoclaw/SKILL.md +++ b/.claude/skills/update-nanoclaw/SKILL.md @@ -32,6 +32,8 @@ Run `/update-nanoclaw` in Claude Code. **Validation**: runs `npm run build` and `npm test`. +**Breaking changes check**: after validation, reads CHANGELOG.md for any `[BREAKING]` entries introduced by the update. If found, shows each breaking change and offers to run the recommended skill to migrate. + ## Rollback The backup tag is printed at the end of each run: @@ -180,12 +182,38 @@ If build fails: - Do not refactor unrelated code. - If unclear, ask the user before making changes. -# Step 6: Summary + rollback instructions +# Step 6: Breaking changes check +After validation succeeds, check if the update introduced any breaking changes. + +Determine which CHANGELOG entries are new by diffing against the backup tag: +- `git diff ..HEAD -- CHANGELOG.md` + +Parse the diff output for lines starting with `+[BREAKING]`. Each such line is one breaking change entry. The format is: +``` +[BREAKING] . Run `/` to . +``` + +If no `[BREAKING]` lines are found: +- Skip this step silently. Proceed to Step 7. + +If one or more `[BREAKING]` lines are found: +- Display a warning header to the user: "This update includes breaking changes that may require action:" +- For each breaking change, display the full description. +- Collect all skill names referenced in the breaking change entries (the `/` part). +- Use AskUserQuestion to ask the user which migration skills they want to run now. Options: + - One option per referenced skill (e.g., "Run /add-whatsapp to re-add WhatsApp channel") + - "Skip — I'll handle these manually" +- Set `multiSelect: true` so the user can pick multiple skills if there are several breaking changes. +- For each skill the user selects, invoke it using the Skill tool. +- After all selected skills complete (or if user chose Skip), proceed to Step 7. + +# Step 7: Summary + rollback instructions Show: - Backup tag: the tag name created in Step 1 - New HEAD: `git rev-parse --short HEAD` - Upstream HEAD: `git rev-parse --short upstream/$UPSTREAM_BRANCH` - Conflicts resolved (list files, if any) +- Breaking changes applied (list skills run, if any) - Remaining local diff vs upstream: `git diff --name-only upstream/$UPSTREAM_BRANCH..HEAD` Tell the user: