Forge: catching bugs in agent-written code with checks beyond the tests
Reliant has open sourced Forge, a framework it uses to restrict what an AI coding agent can write, so that certain classes of bugs are caught before deployment. In the article's example, forge scaffold turns a Protocol Buffers file describing a Customer entity into a running customer admin app. The output includes a database migration[2], five CRUD[1] endpoints, typed React hooks, four pages, and a test that runs against a real Postgres database.
To add an archive action, the author adds archived and archived_at fields and writes two SQL statements, the first adding a NOT NULL[3] column with no default. The fast tests pass because each test database starts empty, but the same statement fails on a production table that already has rows. forge lint, a linter[4] that checks migrations, flags the statement with the rule unsafe-add-not-null-column, and the author fixes it with DEFAULT FALSE, which also keeps the previous release working during deployment.
Forge also checks for skipped tests, edits to generated files, and list filters that silently match everything. Its other linters cover migration safety, such as flagging a volatile DEFAULT like clock_timestamp() in ADD COLUMN, and frontend state management, such as a Zustand store that holds server data.
Read the original reliantlabs.ioDiscussion
Sources
-
Reliant
Forge: catching entire classes of bugs in agent-written code


