@artale/pi-refactor
Iterative refactoring for Pi. Analyze → refactor → verify cycles with git commits per pass.
Package details
Install @artale/pi-refactor from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@artale/pi-refactor- Package
@artale/pi-refactor- Version
1.0.0- Published
- Mar 14, 2026
- Downloads
- 21/mo · 2/wk
- Author
- artale
- License
- MIT
- Types
- extension
- Size
- 7.4 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"src/extension.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-refactor
Iterative refactoring for Pi. Analyze → Refactor → Verify cycles with git commits per pass. Auto-reverts on failure.
Install
pi install npm:@artale/pi-refactor
How it works
Analyze → find improvement → Refactor → make changes → Verify → run tests
✅ passed → git commit → next pass
❌ failed → git revert → retry with different approach
Commands
/refactor <goal> [--passes N] [--verify "cmd"]
/refactor status
/refactor stop
Examples
/refactor extract helper functions --passes 3 --verify "npm test"
/refactor simplify error handling --passes 5 --verify "npm run typecheck"
/refactor improve naming --passes 10 --verify "npm run lint"
License
MIT