pi-reversa
v0.3.0
Published
Pi Coding Agent package for the Reversa reverse-engineering framework
Maintainers
Readme
pi-reversa
Pi Coding Agent package for Reversa, the reverse-engineering framework that turns legacy systems into executable specifications for AI agents.
It bundles Reversa 1.3.5 as a native Pi engine:
- all 77 Reversa agents as Pi skills (
/skill:reversa,/skill:reversa-scout, …); - a
/reversa-*command alias for every agent (/reversa,/reversa-scout,/reversa-migrate, …); /reversa-init, a Pi-native port ofnpx reversa install;/reversa-status, the project progress summary;- the Reversa legacy-edit policy injected into the system prompt;
- a hard guard that blocks
write/editcalls violating.reversa/reversa-config.json.
Install
pi install npm:pi-reversaUpdate with pi update npm:pi-reversa (or pi update --extensions). Do not run npx reversa install/update in Pi projects; the package replaces them.
Usage
- Open Pi in the legacy project.
- Run
/reversa-initand answer the prompts (project name, your name, languages, output folder, git strategy, answer mode). Existing files are never overwritten; running it again only creates missing files and registerspinext to engines already in.reversa/state.json. - Run
/reversato start the discovery. Any agent can be called directly with/reversa-<agent> [args]. - Run
/reversa-statusto see the current phase and pending steps.
The first /reversa run also works without /reversa-init: the orchestrator creates the state itself.
Legacy-edit policy
Whenever .reversa/ exists in the working directory:
- The Reversa non-destructive policy is added to the system prompt as a
<reversa>section. - Pi's built-in
writeandedittools are blocked outside the Reversa folders (.reversa/, the output folder,_reversa_docs/, the forward folder,_reversa_bugs/,_reversa_refactor/) unless.reversa/reversa-config.jsonallows it. The decision logic and messages match Reversa's Claude CodePreToolUsehook. .reversa/reversa-config.jsonitself can only be changed by you.
To allow edits to legacy code, edit the config yourself:
{ "version": 1, "allowLegacyEdits": true, "allowedPaths": ["src/**"] }An empty allowedPaths with allowLegacyEdits: true allows every path. The guard covers Pi's built-in write/edit tools only; bash and third-party edit tools are governed by the system-prompt policy alone.
Development
git clone --recurse-submodules <repo> && cd pi-reversa
npm install
npm test # generates packaged/ from the reversa/ submodule, then runs the tests
npm run typecheck
pi install ./ # local installpackaged/ is generated by npm run prepare-skills (also run on prepack) and is not committed.
License
MIT. Reversa is © its authors under the MIT license; see packaged/LICENSE-reversa.
