Pokayoke adds deterministic guardrails for agentic coding conventions
Pokayoke is a new TypeScript/Bun library that lets developers define deterministic, AST-aware guardrails to enforce repo conventions that AI coding agents frequently miss or regress on.
Score breakdown
Enforce repo-specific conventions that AI coding agents routinely miss by codifying them as deterministic, AST-aware checks rather than relying on agent instruction-following alone.
- 01Pokayoke is a TypeScript/Bun library for defining deterministic guardrails in codebases.
- 02It was created by sarreph to address gaps left by convention-only approaches like `AGENTS.md`.
- 03AI coding agents frequently regress on or forget repo-specific rules, motivating the tool.
Pokayoke is a new open-source library introduced by sarreph that addresses a practical pain point in agentic coding: the unreliability of convention adherence when relying solely on declared agent rules. While tools like `AGENTS.md` provide a shared space for documenting codebase conventions, the author notes that agents — much like human developers — don't always consistently respect every rule, leading to regressions or overlooked constraints during a piece of work.
The library is designed for TypeScript and Bun workspaces and focuses on enabling deterministic guardrails — checks that go beyond what standard linters and code analysis tools typically support.
The library is designed for TypeScript and Bun workspaces and focuses on enabling deterministic guardrails — checks that go beyond what standard linters and code analysis tools typically support. The motivating example given is enforcing that `package.json` dependencies in a workspace only reference a catalog, a rule that requires AST-level inspection or complex string matching. Rather than maintaining a fragile, ad-hoc collection of scripts, Pokayoke provides a structured way to define and run such checks. The author frames agents themselves as well-suited to generating these kinds of complex, arbitrary rules, positioning Pokayoke as a layer that makes those agent-generated rules durable and reusable.
Key facts
- 01Pokayoke is a TypeScript/Bun library for defining deterministic guardrails in codebases.
- 02It was created by sarreph to address gaps left by convention-only approaches like `AGENTS.md`.
- 03AI coding agents frequently regress on or forget repo-specific rules, motivating the tool.
- 04Standard linters don't support all custom rules — e.g., enforcing `package.json` dependencies only reference a catalog.
- 05The library targets rules requiring AST analysis or large-scale string matching.
- 06The author previously managed such checks via a personal 'script-cupboard', which proved unwieldy.
- 07Pokayoke is scoped to TypeScript/Bun workspaces.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 8, 2026 · 15:36 UTC. How this works →