ALPHAThis is an early alpha preview — features may change. We appreciate your feedback!
>QLOOD-CLI

[AUTO-REFACTOR REPORT]

Dedicated documentation for the /refactor command.

// Scan the project, identify large/complex files, and produce a refactor plan.
$ /refactor
This command analyzes your repository to find oversized or complex files, components, or pages. It then generates a concise, actionable plan to split them into smaller, reusable parts while preserving behavior.
How it works
  • Scans source directories (e.g., src/) and measures file size and basic complexity signals.
  • Flags candidates like long React components, pages with many responsibilities, or utility files doing too much.
  • Outputs a prioritized list with suggested extractions and proposed component/function names.
What is considered a 'big file'
  • High line count or many nested blocks.
  • Multiple responsibilities (rendering + data fetching + state + side effects).
  • Duplicated patterns that could be abstracted into shared components/hooks.
Report format
  • File: path and quick metrics.
  • Issues: why it was flagged (size, complexity, cohesion).
  • Proposed plan: step-by-step extractions into smaller components, hooks, or modules.
  • Reusability targets: where new pieces can be shared (e.g., src/components/ui).
Usage
  • Open QLOOD-CLI and run /refactor.
  • Review the generated AutoRefactor report and follow the suggested steps.
  • Iterate: extract small pieces, re-run to validate improvements.