Virtually Real

Refactory - AI plans the splits. Engine copies the code. Refactor 4 free

by
Refactory splits monolith source files into clean modules. It uses an LLM to decide which functions group together, then a deterministic engine handles the routine extractions — the straightforward 80% that would waste AI time and tokens. The LLM still handles complex edge cases where judgment matters. JS and Python extractors are free and open source (AGPL). Tested against 15 monoliths, 32,000+ lines. Works with Claude Code, Cursor, Windsurf, or any MCP client. Also runs as a CLI.

Add a comment

Replies

Best
Virtually Real
I built Refactory because I kept watching AI refactoring tools rewrite my code with hallucinated imports and silently dropped functions. The output always looked right at first glance, then broke at runtime. The idea is simple: let the AI do what it's good at (understanding code structure and planning module boundaries) and keep it away from what it's bad at (faithfully copying code). A deterministic engine handles the boring moves, and the AI focuses on the parts that actually need intelligence.