AutoLoop – Let coding agents run optimization loops on real repos
Karpathy's autoresearch generalized to work with any coding agent and repo.

Enforces repo conventions deterministically when AGENTS.md files fail.
Developers using AI coding assistants and agents
Cursor · Continue · Sourcegraph Cody
AGENTS.md files only seem to get me so far these days. Just as with humans, relying on an agent to modulate its ability to respect all the various, nebulous rules and convention-based ideals in a codebase -- all by itself -- is generally ineffective. Most of the time, declared agent rules work, but often I will realise that a piece of work either regresses on one metric I'm trying to control for, or will forget to take into account another.
What I have tended to do in my own work in the past is to create a "script-cupboard" of checks, but it is often unwieldy and cumbersome to do this on things that require the AST or need to do awkward, large-scale string matching. These are things that existing linters and code analysis tools don't tend to support, such as mandating `package.json` dependencies in a workspace only reference a catalog.
One of the areas that agents excel at is doing exactly the above -- creating complex, arbitrary rules that can serve as deterministic guardrails for repository convention alignment. So I set out to create a library that makes it easy to instantiate such rules in any TypeScript / Bun workspace going forward.
Pokayoke is the result. I'm very keen to know what other people are using to solve this particular problem and am open to any and all feedback!
Thanks!
Karpathy's autoresearch generalized to work with any coding agent and repo.
Blocks terraform destroy and rm -rf in 2ms without LLM scoring commands.
Deterministic file selection beats embedding RAG with 37% faster time-to-acceptance.
Local rule engine blocks AI agents from nuking prod when prompts fail.
Git hooks that feed policy back into agent context via generated RIPSTOP.md files.
Blocks dangerous agent actions in real-time: secrets, force-pushes, untested changes.