Zum Inhalt springen

refactor

Type Command
Plugin awl-general · v0.0.51
Invoke /awl-general:refactor <file or code>
Source plugins/awl-general/commands/refactor.md

Refactor code using Fowler’s methodology

Refactor following Fowler’s “Refactoring” methodology + these principles:

  • KISS: Keep it simple
  • YAGNI: No unnecessary additions
  • Minimal Changes: Only what’s needed
  • Single Responsibility: One purpose per function

Rules:

  1. Behavior must stay identical
  2. Small, safe, verifiable transforms only
  3. No new features mixed with refactoring

Output:

  1. Smells: Code smells found
  2. Plan: Proposed changes + why
  3. Result: Refactored code
  4. Diff: Key changes summary

Target: $ARGUMENTS