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!