The Second Time Is a Bug: Companion Code
github.com/second-time-is-a-bug-book/book-companion- Category
- Education
- Rank
- No. 2178Tools index
Previous survey · No. 2111 ·
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Research & Education
- GitHub
- 5 stars
- Date
About
Companion repository for a book on engineering with AI coding agents. It includes a sample invoicing app, guard scripts, 26 reproducible drills where an agent mistake is made in a scratch copy and a guard catches it, a toy agent loop with a scripted fake model, templates, and an experiment kit. Drills run without an API key, model or network.
At a glance
The Second Time Is a Bug companion repo is a set of hands-on drills for guarding code written by agents. It is worth opening if you want to see a check catch a specific mistake before adapting it to your own repo.
Good fit
Developers building practical checks for agent changes, such as detecting a deleted test or a new floating-point money calculation.
Consider something else when
If you need a ready-made policy for a different codebase, expect to adapt the checks and confirm they catch your own failure modes.
Start here
Run npm run drill D06 in the companion checkout. The exercise applies a money-handling mistake in a scratch copy. Check that the guard passes before the change and fails afterward with a file and line.
Cost and requirements
The MIT-licensed companion needs Git and Node.js 22.18 or later. The basic drills use scripted mistakes and require no model or API key. The two browser drills need Playwright Chromium.
Limits to know
Passing a drill shows that a check catches its seeded mistake in the example. Apply the same before-and-after test to your own code before relying on an adapted guard.
Sources checked 2026-11-05. Source-based assessment.
- github.com/second-time-is-a-bug-book/book-companion/blob/b0a04d5b584b7d1c6afc8b9c365c19073929b570/README.md
- github.com/second-time-is-a-bug-book/book-companion/blob/b0a04d5b584b7d1c6afc8b9c365c19073929b570/package.json
- github.com/second-time-is-a-bug-book/book-companion/blob/b0a04d5b584b7d1c6afc8b9c365c19073929b570/drills/D06-float-money/README.md
Similar tools
Tags
Tech Stack
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.