-
Notifications
You must be signed in to change notification settings - Fork 14
feat(aidd-dev): route deletions to refactor cleanup with orphan sweep #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Routing every Useful? React with 👍 / 👎. |
||
| - Never silently default to action 01. | ||
|
|
||
| ## Audit handoff (push, never pull) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ verification: <summary of test and type-check results confirming no behavioral r | |
| - Replace magic numbers and inline strings with named constants. | ||
| - Remove dead, misleading, or out-of-date comments; add a brief comment only where intent is genuinely non-obvious. | ||
| 3. **Apply tech-debt fixes** from the finding list: | ||
| - Delete dead code and unused exports. | ||
| - Delete dead code and unused exports, and sweep for the orphaned references a deletion leaves behind. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For a direct request such as “delete the unused Useful? React with 👍 / 👎. |
||
| - Reduce cyclomatic complexity by extracting early returns, guard clauses, and helper functions. | ||
| - Shorten oversized files and functions to a single responsibility. | ||
| - Flatten excessive nesting. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user says “drop X” without explicitly invoking this skill, the runtime only has the frontmatter description to decide whether to load
07-refactor, but this trigger text lists onlydelete/remove codewhile the new routing rule below handlesdrop thisafter the skill is already loaded. In that context the advertised “drop this” path can be unreachable or routed elsewhere; adddropto the description trigger wording if it is meant to be supported.Useful? React with 👍 / 👎.