From d26ed9e4bd340593f257a27bc28384a58dfb529d Mon Sep 17 00:00:00 2001 From: alexsoyes Date: Wed, 24 Jun 2026 11:15:35 +0200 Subject: [PATCH] feat(aidd-dev): route deletions to refactor cleanup with orphan sweep When the user asks to delete or remove code, the refactor skill is now a trigger target and routes straight to the cleanup action. The cleanup action sweeps for orphaned references a deletion leaves behind, so removals also clean up imports, tests, docs, and config that pointed at the deleted symbol. Co-Authored-By: Claude Opus 4.8 (1M context) --- plugins/aidd-dev/CATALOG.md | 2 +- plugins/aidd-dev/skills/07-refactor/SKILL.md | 3 ++- plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/aidd-dev/CATALOG.md b/plugins/aidd-dev/CATALOG.md index f428707a..cb77c415 100644 --- a/plugins/aidd-dev/CATALOG.md +++ b/plugins/aidd-dev/CATALOG.md @@ -131,7 +131,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [03-cleanup.md](skills/07-refactor/actions/03-cleanup.md) | - | | `actions` | [04-architecture.md](skills/07-refactor/actions/04-architecture.md) | - | | `-` | [README.md](skills/07-refactor/README.md) | - | -| `-` | [SKILL.md](skills/07-refactor/SKILL.md) | `Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, or restructure code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill).` | +| `-` | [SKILL.md](skills/07-refactor/SKILL.md) | `Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, restructure, or delete/remove code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill).` | #### `skills/08-debug` diff --git a/plugins/aidd-dev/skills/07-refactor/SKILL.md b/plugins/aidd-dev/skills/07-refactor/SKILL.md index 52e66b60..3a8e05d4 100644 --- a/plugins/aidd-dev/skills/07-refactor/SKILL.md +++ b/plugins/aidd-dev/skills/07-refactor/SKILL.md @@ -1,6 +1,6 @@ --- name: 07-refactor -description: Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, or restructure code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill). +description: Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, restructure, or delete/remove code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill). argument-hint: performance | security | cleanup | architecture --- @@ -23,6 +23,7 @@ This skill is run-one-OR-run-all: - The user named an axis ("optimize this", "harden", "clean up", "restructure") -> run that ONE action. - Unscoped ("refactor this", "improve the code") -> ask ONE question: "all applicable axes, or a specific one (cleanup / performance / security / architecture)?" Then run the chosen one, or all applicable. +- The user asked to delete or remove code ("delete X", "remove this", "drop this") -> run the `cleanup` action directly; do not ask which axis. - Never silently default to action 01. ## Audit handoff (push, never pull) diff --git a/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md b/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md index 8a1997e7..3a4c4bd6 100644 --- a/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md +++ b/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md @@ -33,7 +33,7 @@ verification: