Hey HN,
Something I've been tinkering with in the background is a system to manage the "messy-middle" of TypeScript toolchains. Quite often, when I'm using Biome or any of the other linter / formatters, there will be repo conventions that I want to enforce (especially with AI agents), but which aren't supported by them, such as:
- Enforcing lines-of-code limits in modules - Never using custom TailWind colors - Only using lowercase underscores in filenames
Like, this is quite "random" but also bread-and-butter stuff that it's easy to think or talk about when you're working by yourself or with a few other human teammates, but I've found that agents consistently miss these conventions if I put them in an AGENTS.md file for example.
I wanted to make my esoteric repo conventions less stochastic, and more deterministic. I realised that agents are adept at writing the kind of code needed to run arbitrary checks on the TypeScript AST or workspace environment -- the kind of code that is cumbersome to write as a human.
So, I've made Pokayoke (https://pokayoke.codes) and would like your feedback! It's a small library that gives agents a place to test and store rules for enforcing conventions, and provides a skill to create those rules super easily. So you can come up with any arbitrary rule you like, get your agent to write a piece of code that enforces it, and then have it be included in your Pokayoke checks that get done (with one command) next to your other linting and formatting checks!
Fun fact: the name comes from the Japanese term for "mistake-proofing" or "error-prevention"[0].
[0] - [https://en.wikipedia.org/wiki/Poka-yoke](https://en.wikipedia.org/wiki/Poka-yoke)
Comments URL: [https://news.ycombinator.com/item?id=48932314](https://news.ycombinator.com/item?id=48932314)
Points: 1