@artale/pi-loop
v1.0.0
Published
Agent loop for Pi. Goal-driven, fixed-pass, and pipeline loops with [D]/[N] gates. Inspired by pi-stories Blueprint Engine.
Downloads
26
Readme
pi-loop
Agent loop for Pi. Goal-driven, fixed-pass, and pipeline loops with [D]/[N] deterministic gates.
Inspired by pi-stories Blueprint Engine.
Install
pi install npm:@artale/pi-loopThe [D]/[N] Pattern
Every pipeline alternates between:
- [D] Deterministic gates — shell commands that pass or fail (tests, lint, typecheck)
- [N] Non-deterministic steps — agent work (implement, fix, refactor)
If a gate fails, the pipeline retries the previous agent step automatically.
Commands
/loop goal <condition> — loop until done
/loop passes <N> <prompt> — repeat N times
/loop pipeline D:npm test | N:fix tests | D:lint — [D]/[N] pipeline
/loop status — show state
/loop stop — stopExamples
/loop goal all tests passing
/loop passes 5 improve test coverage
/loop pipeline D:npm test | N:fix failing tests | D:npm run lint | N:fix lint errors | D:npm run buildTools
loop_done— agent calls this when goal is achievedloop_status— check loop state
License
MIT
