Files
Vincent 9a403e230c feat!: consolidate test/scan/env/prompt/performance commands behind skills (#127)
* feat!: consolidate test/scan/env/prompt/performance commands behind skills

- merge /tests into /test run (scope tokens forwarded; /tests retired)
- retire /performance; /refactor perf is the sole performance front door
- rewire /scan as a thin security front door (security-audit + dependency-audit)
- add env-setup skill; /env becomes a thin router to it
- move the Lyra 4-D framework into prompt-engineering references; /prompt goes thin
- document intentional command shortcuts (/qa, /deslop, PR-flow trio) in README
- regenerate bundles + marketplace (185 skills, 30 commands, 198 plugins)

* fix(test-dispatch,env-setup): correct router contract and env discovery scan

Three CodeRabbit findings on #127, all verified against the source before
fixing.

test-dispatch understated what it routes into. Its Creates/Modifies claimed the
router mutates "nothing directly" and its Confirmation Required listed only
e2e/coverage/init as mutating — but `run` delegates to test-runner, whose
auto-fix loop edits the code under test and its tests until green. A reader
picking a route from the contract would have believed `/test run` was safe.

The fix corrects the documentation rather than adding a gate: test-runner's
unprompted edit of the file under test IS `/test run`, and `--no-fix` is the
existing, designed way to ask for a report with no edits. Bolting a blanket
confirmation onto the auto-fix loop would contradict both. The contract now
names which routes mutate, and points at `--no-fix` instead of a gate
test-runner does not have.

env-setup's discovery command had a filter that silently filtered nothing:
`grep -oh` prints only the matched text with the filename suppressed, so the
downstream `grep -v node_modules` had no path to match against and dependency
hits stayed in the inventory. Exclusion is now directory-scoped
(`--exclude-dir`), the pattern also covers bracket access
(`process.env["X"]`), and the surrounding prose states what the scan cannot
see — helper functions, destructures, dynamic keys, and non-JS services in the
same repo — so the output reads as a starting inventory, not an answer.

`/test run unit | integration | e2e` sat inside a bash fence, where copy-paste
runs a pipeline instead of picking a scope. Split into three commands in both
the skill and commands/test.md.

Verified: validate-changed-skills 0 errors/0 warnings, markdownlint 0 issues,
biome clean, catalog regenerated to 186 skills / 199 plugins. The discovery
grep was run against this repo and returns real variable names.
2026-08-30 12:10:34 -07:00

2.4 KiB

Refactor - One Front Door for Improving Existing Code

Point it at what you want improved and it routes to the right engine: strip AI slop, safely refactor, pay down debt, optimize, review structure, or modernize the stack — frontend and backend.

Usage

/refactor deslop [--changed|all|dry-run]  # strip AI slop — code + product (copy/UI/UX)
/refactor code [target]                   # safe, behavior-preserving refactor (test-locked)
/refactor debt                            # inventory + prioritize tech debt into a register
/refactor perf [target]                   # optimize: a component, an API, or the whole monorepo
/refactor structure [target]              # read-only structural/maintainability review
/refactor stack                           # modernize deps + framework-pattern drift
/refactor                                 # show what this repo most needs, then Usage

Modes

  • deslop → the deslop skill. Removes AI artifacts (console logs, any, dead code, over-nesting), product slop (marketing-filler copy, default-shadcn UI, half-wired flows), and prose tells. Edits code. Default scope is the current package; --changed keeps it to the branch diff.
  • code → the refactor-code skill — behavior-preserving refactor with tests locked first, drawing on typescript-refactor / react-refactor for language specifics.
  • debt → the tech-debt skill — quantifies and ranks debt into a register, and files it as issues on request.
  • perf → performance-expert, or react-component-performance for one slow component, or workspace-performance-audit for a whole monorepo. Diagnoses; you apply via code. This is the sole performance front door — the retired /performance command folded in here.
  • structure → the structural-review skill — read-only structural lens (also reachable as /review --structural).
  • stack → the stack-modernization skill — outdated dependencies, dead packages, and framework-pattern drift (v3 patterns in a v4 repo, and the like).

Gates

  • deslop, code, and stack edit source — prefer --changed on a branch so the change stays reviewable; whole-tree edits are confirmed first.
  • debt, perf, and structure report only; they never touch source. debt files issues only after confirmation.
  • To find bugs (not improve structure), use /review — this command improves code, it does not gate correctness.