Dev tools

gap-trap adds rules and gates to a repo so AI-written code fails the build when it breaks a rule

September 16, 2026 at 7:20 AM PT

gap-trap GitHub repository social card

Image: pliablepixels/gap-trap

Why it mattersWritten rules do not slow an agent down when nothing reads them, so teams that ship AI-written code need checks the agent cannot skip.

pliablepixels published gap-trap this weekend, an open-source skill for Claude Code and Codex that reads a repository, writes the rules that fit it, and installs a check for each rule so the build fails when the rule is broken. The repository is three days old and carries 153 stars, all MIT-licensed.

The problem the author names is drift. An agent writes most of a codebase, the team stops reading every diff, and quality falls without anyone noticing until something breaks. The agent writes a helper that already exists. It crosses a layer boundary because the shortcut compiles. It writes a test that asserts the code ran, not that it did the right thing. It follows a rule in AGENTS.md for a week and then forgets it. Nothing stops any of that when the only thing reading the rules is the agent that keeps breaking them.

What the skill installs

gap-trap sets up four pieces in the repository. Contracts name each part of the codebase that has one right way to do things, HTTP or logging or auth, and say what to use, what never to use, and which check finds bypasses. Proven red is a CI job that runs every new test against the old code and fails when the test still passes there, so a test that cannot fail proves nothing. Ratchets count known problems, such as the lint backlog or files over 400 lines, and those counts may go down but never up. Playbooks are the facts the project learned the hard way, written down so the next session does not learn them again.

Node and Python repositories get gates that run inside their test suite. Go, Rust, Java, Ruby, .NET, PHP, Swift and C++ get shell versions that need only git, grep, awk and the project's test command.

What it costs and what it does not do

The author's own repository has 4,400 unit tests and a full gate run finishes in about a minute locally, per the README. The instruction gate adds about a second. Proven red runs only in CI, because it is slow.

gap-trap ships a sibling skill called slop-mop that rewrites the agent's docs, commit messages and pull request bodies to read like a person wrote them. The setup step also lists existing violations by contract and rule, but the initial run changes no code: it writes the framework, proves each gate red, and commits, then asks whether to audit the repository against the new rules.

The rules and gates only bind future work. The size of the existing backlog is what a team sees the first time it runs the audit, and the ratchets stop it growing after that.

Source

Repository: pliablepixels/gap-trap (MIT, 153 stars in three days).

Source: pliablepixels/gap-trap

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

More from AI News

Ordewell turns one goal into an ordered plan of coding-agent tasks, one model per task

Ordewell is a new Apache-licensed task orchestrator for coding agents that turns one goal into an ordered plan of tasks, each with its own runner and model, and completes a task only when a unique marker appears in the runner output.

Source: Hacker NewsDev tools

OpenAI hires the Git AI founders to work inside Codex, and the standalone company will likely wind down

Aidan Cunniffe and Sasha Varlamov, the founders of the open-source Git AI tool that tracks how much code each AI coding agent writes and what it costs, are joining the OpenAI Codex team, and the standalone company they left Atlassian to build will likely wind down.

Source: PressDev tools

Graphify C# gives coding agents compiler-accurate Find Usages for C# projects

Graphify C# is a new MIT-licensed Roslyn indexer that emits a queryable JSON graph of every declaration and reference in a C# solution, so a coding agent can look up the exact overload a caller is bound to instead of guessing from a text match.

Source: Hacker NewsDev tools