What problem does it solve?
A folder refactor turns a messy, single-directory code layout into a maintainable topology without changing behavior, while keeping validation green across the entire rename/move/extract process.
Core Features & Use Cases
- Behavior-preserving refactoring workflow: Refactor one explicitly named folder into coherent subfolders and shared modules using a move-only safety phase followed by controlled extraction and cleanup.
- Objective-driven continuation: Treat the refactor as an active, multi-slice objective, continuing autonomously through remaining safe slices until the target topology is complete or blocked by validation/risk.
- Safer engineering validation gates: Map the folder, identify public contracts, add or reuse focused tests when needed, and re-run narrow validation checkpoints after each slice to prevent regressions.
- Shared-code extraction with proof: Extract shared modules only when duplicate call sites are proven and covered by tests or direct public-interface checks.
Quick Start
Ask Pi to refactor the folder named "services" into well-scoped subfolders with shared modules while keeping existing behavior identical and staying green on the most relevant tests.