Pattern: gap-trap installs a CI job that runs every new test against the old code and fails if it passes
GitHub·medium signal
gap-trap (created 2026-09-13, 168 stars, pushed 2026-09-17) runs once in a repo, reads the code, writes rules that fit it, and installs a gate per rule that fails the commit or CI run. Its four primitives are Contracts (one entry per area with one right way, naming what to use, what never to use, and the check that finds bypasses), Proven red (a CI job that runs each new test against the pre-change code and fails when the test passes there), Ratchets (counts of known problems such as lint backlog or files over 400 lines, allowed to fall but never rise), and Playbooks. Node and Python repos get gates inside the test suite; Go, Rust, Java, Ruby, .NET, PHP, Swift and C++ get shell versions needing only git, grep, awk and a test command.