Note: Refactor Plan

The refactor-plan feature is implemented across two modules with distinct responsibilities.

workflows.refactor_plan contains RefactorPlanWorkflow, which orchestrates three specialized subagents — debt-scanner, impact-analyzer, and plan-generator — using the Agent SDK. Each subagent focuses on a separate domain; the workflow synthesizes their output into a unified roadmap covering a summary, prioritized refactoring opportunities, and actionable next steps.

workflows.refactor_plan_report handles output formatting and CLI access. format_refactor_plan_report(result, input_data) converts the raw workflow result into a human-readable report. main() is the CLI entry point that runs the full planning workflow from the command line.

The two modules are complementary but separate: RefactorPlanWorkflow.execute() produces the result dict, and format_refactor_plan_report() consumes it. Neither module inherits from the other.

Source files

Tags: refactor, tech-debt, complexity