{"_id":"@artale/pi-evolve","name":"@artale/pi-evolve","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@artale/pi-evolve","version":"1.0.0","description":"Evolutionary self-improvement for Pi. AlphaEvolve-inspired mutation, evaluation, and selection of prompts, skills, and extensions. Open-ended agent evolution.","keywords":["pi-package","evolution","alphaevolve","self-improving","genetic","mutation","sakana"],"license":"MIT","author":{"name":"artale"},"repository":{"type":"git","url":"git+https://github.com/arosstale/pi-evolve.git"},"pi":{"extensions":["src/extension.ts"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_id":"@artale/pi-evolve@1.0.0","gitHead":"4d7858c7f4255165dd70e3e980780e422296eb2a","bugs":{"url":"https://github.com/arosstale/pi-evolve/issues"},"homepage":"https://github.com/arosstale/pi-evolve#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-j3LxT/JxhPXjLQdpe7VgtNwp7R+UHqF9lJsAi4zQ3WYEXEYYV5CDDSxVG7feG4sD03IWosLT+w6UIy4/gainOQ==","shasum":"ba669d5424b8a2ab811648ece4ff550305279157","tarball":"https://registry.npmjs.org/@artale/pi-evolve/-/pi-evolve-1.0.0.tgz","fileCount":3,"unpackedSize":22002,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCIfKcbQRTuI81w06goOMaJF6YGYQF+ywV9dhF8oQ8cSQIgUqh87ZiWNGc726f/gO2E7OY9TFHb33ytIEPKRt3jE+8="}]},"_npmUser":{"name":"artale","email":"arosstale1@gmail.com"},"directories":{},"maintainers":[{"name":"artale","email":"arosstale1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-evolve_1.0.0_1773497562475_0.9316539317926702"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-14T14:12:42.400Z","1.0.0":"2026-03-14T14:12:42.618Z","modified":"2026-03-14T14:12:42.795Z"},"maintainers":[{"name":"artale","email":"arosstale1@gmail.com"}],"description":"Evolutionary self-improvement for Pi. AlphaEvolve-inspired mutation, evaluation, and selection of prompts, skills, and extensions. Open-ended agent evolution.","homepage":"https://github.com/arosstale/pi-evolve#readme","keywords":["pi-package","evolution","alphaevolve","self-improving","genetic","mutation","sakana"],"repository":{"type":"git","url":"git+https://github.com/arosstale/pi-evolve.git"},"author":{"name":"artale"},"bugs":{"url":"https://github.com/arosstale/pi-evolve/issues"},"license":"MIT","readme":"# pi-evolve\n\nEvolutionary self-improvement for Pi. Inspired by **AlphaEvolve** (DeepMind), **Sakana AI's ShinkaEvolve**, and the **Darwin Gödel Machine**.\n\nMutate → Evaluate → Select → Archive → Repeat.\n\n## Install\n\n```bash\npi install npm:@artale/pi-evolve\n```\n\n## What it does\n\nApplies evolutionary algorithms to anything the agent works with:\n- **Skills** (SKILL.md files) — compress, restructure, improve\n- **Prompts** — evolve system prompts for better output\n- **Extensions** — optimize code for size + quality\n- **Any text file** — evolutionary improvement of anything\n\n## Commands\n\n```\n/evolve <file>                    — quick evolution (3 variants)\n/evolve status                    — show evolution state\n/evolve archive                   — list all variants with scores\n/evolve restore <id>              — restore a variant\n/evolve compare <a> <b>           — diff two variants\n/mutate <file> [goal]             — single mutation pass (3 strategies)\n/darwin <file> [gens] [goal]      — full evolutionary loop\n```\n\n## Mutation strategies\n\n| Strategy | What it does |\n|----------|-------------|\n| **compress** | Reduce size 30-50% while preserving all functionality |\n| **quality** | Improve effectiveness at similar length |\n| **hybrid** | Both shorter AND better (Pareto optimization) |\n| **radical** | Completely reimagine structure (divergent exploration) |\n\n## Darwin mode\n\nFull evolutionary loop with multiple generations:\n\n```\n/darwin SKILL.md 10 optimize for token efficiency\n```\n\nThis runs 10 generations, each producing 3 variants (compress, quality, radical), evaluating fitness, selecting the best, and using it as the parent for the next generation.\n\n## Results (from our GEPA predecessor)\n\nTested on real Pi skills:\n- `canvas-design`: **−69% tokens**, same quality\n- `pptx`: **−60% tokens**, same quality\n- `xlsx`: **−63% tokens**, same quality\n\n## Tools\n\n- `evolve_archive` — save a variant with fitness score\n- `evolve_status` — show archive stats\n- `evolve_list` — list all variants\n- `evolve_restore` — restore a variant to its file\n\n## Architecture\n\n```\n/darwin SKILL.md 5\n  │\n  ├─ Gen 0: Archive original (baseline fitness 50)\n  │\n  ├─ Gen 1: Mutate × 3 strategies → Evaluate → Select best\n  │           compress: 65/100 (−40% tokens)\n  │           quality:  58/100 (better structure)\n  │           radical:  42/100 (too divergent)\n  │           → Winner: compress (65)\n  │\n  ├─ Gen 2: Mutate winner × 3 → Evaluate → Select\n  │           → Winner: hybrid (72)\n  │\n  └─ Gen 5: Converged at 78/100, −55% tokens\n```\n\nAll variants archived with fitness scores, token counts, and lineage tracking.\n\n## Inspired by\n\n- [AlphaEvolve](https://deepmind.google/discover/blog/alphaevolve/) — DeepMind's Gemini-powered evolutionary coding agent\n- [ShinkaEvolve](https://github.com/SakanaAI/ShinkaEvolve) — Sakana AI's sample-efficient program evolution\n- [Darwin Gödel Machine](https://sakana.ai/dgm/) — Self-improving coding agent via evolution\n- [OpenEvolve](https://github.com/codelion/openevolve) — Open-source AlphaEvolve reimplementation\n\n## Zero dependencies\n\nNode.js built-ins only. The LLM itself is the mutation operator.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-acbe99a4e217c7a08460611ea4f37e75"}