How it works
State the refactoring objective, pick the goal — Readability, Maintainability, Performance, Modernization, Simplification, or Architecture Cleanup — and set the risk level and code context. Each goal is a different transformation philosophy with its own priorities, known failure modes, and validation focus; contexts like Legacy or AI-Generated add real duties, and with the Modernization goal the language select sets a concrete modernization scope. Optionally paste the code (carried verbatim in a fenced block) and add hard constraints like "public API must not change". The live Refactor Preview shows the contract's shape before you commit. Click Generate Refactor Prompt for the full refactoring contract: behavior preservation requirements and seven safety rules that apply at every risk level, goal-specific transformation guidance, a validation strategy, and an assumptions discipline where uncertain behavior becomes a question — never a silent decision. Nothing leaves your browser.