ratchet-cli
The next task waits for the checks.
v0.1.0 · MIT
ratchet-cli gives an AI coding agent one task at a time. The queue advances when your validator rules allow submission.
pipx install git+https://github.com/pantagram1031/ratchet-cli@v0.1.0 Who decides
The agent writes the code. The tests and checks you already use decide whether the work is finished.
Try it
Choose an exit code for each validator, then submit. Try changing the rules to see when the queue advances.
- [1] implement /login
- [2] implement /logout
- [3] rewrite User model to use Pydantic v2
- DONE
Exit codes
Each exit code tells ratchet-cli how a validator finished. The rules below determine whether the item can advance.
| code | meaning | blocks submit? |
|---|---|---|
| 0 | pass, actually verified | no |
| 1 | fail | yes |
| 2 | warning, counted as advisory | only if warning_blocks= |
| 78 | skipped: could not verify, e.g. a tool is missing | when require_all_pass= and allow_skipped= |
| other | error: the validator itself is broken | yes |
A validator that exits 0 without actually checking anything is a false ratchet. Exit 78 is how it says “I couldn’t verify this.”
A session
Until submission succeeds, ratchet next returns the same item. You can resume it after an interruption.
Project files
Everything lives in .ratchet/ inside your project.
With Claude Code
The skill tells the agent to run ratchet next, complete one item and run ratchet submit. If a validator fails, the agent reads its output.
Credit
The reins idea comes from Park Jun-woo’s essay “Reins Engineering”. ratchet-cli was inspired by it; he was not involved in building it.