The Second Time Is a Bug Releases Companion Code for Engineering with AI Coding Agents
Summary
The GitHub repository is companion code for The Second Time Is a Bug, a field workbook about engineering with AI coding agents. Its running example is Invoicer, a small invoicing application, alongside a deliberately tangled legacy exporter, executable guards, 26 drills based on common agent mistakes, templates, and an experiment kit for measuring whether the engineering harness is effective. The repository also includes a roughly two-dozen-line toy agent driven by a scripted fake model; it does not require an API key, model, or network after installation. The project is written in TypeScript for Node.js 22.18 or later, has zero runtime dependencies, and needs no build step. Its checks cover unit tests, type checking, a gate that compares the working tree with HEAD, browser and accessibility tests, mutation runs, and guard-audit logging. Two browser drills and end-to-end tests require Playwright's Chromium. The guards check issues such as floating-point money handling, deleted or skipped tests, destructive commands, secrets in diffs, irreversible migrations, dependency drift, legacy refactors, bounded loops, and merge readiness. Guard results are written for both people and agents, and each firing is recorded in `.harness/guard-log.jsonl`. The repository includes CI configuration for checking a branch against its base, while its code is licensed under MIT and the book text is excluded.