Analysis updated 2026-05-18
Force an AI coding agent to state its goal, alternatives considered, and risks before it can touch your codebase.
Require runnable acceptance checks with real output before an agent's change is considered done.
Scale how much justification an agent needs based on task risk, from a typo fix to an auth or payments change.
Install a shared gate machine-wide so every Claude Code or Codex project on a computer inherits the same rule.
| sihyeonjeon/why-was-fable-banned | coleam00/harness-engineering-demo | color4-alt/citecheck | |
|---|---|---|---|
| Stars | 31 | 31 | 31 |
| Language | Python | Python | Python |
| Setup difficulty | easy | moderate | easy |
| Complexity | 3/5 | 3/5 | 2/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires only Python 3 standard library, install script wires hooks into Claude Code or Codex.
This project creates a checkpoint for AI coding agents: before the agent can change any code, it must write a formal specification and have that spec pass a validation check. The system works with Claude Code (the command-line AI coding tool from Anthropic) and Codex (OpenAI's coding agent), blocking any file edits until the agent fills out a structured plan document called .forge/spec.json. The spec document requires the agent to state the goal in its own words, list what it will not do, explain the context, identify at least two alternatives it considered and rejected with reasons for each, flag risks, and provide runnable acceptance commands that produce real output. Only after all of these fields pass does the gate open and edits are allowed through. Installation is a single shell command that wires the gate into Claude Code's hooks system. You can install it machine-wide so every Claude Code project on the computer inherits the rule, or restrict it to a single repo. A toggle command lets you turn the gate off temporarily within a session, but the setting persists per project until reversed. The gate does not apply to agents like Cursor that operate outside Claude Code or Codex. The depth of the spec scales with the task. A small typo fix requires only a brief goal statement and one verification check. A change touching authentication, payments, or database migrations triggers the full checklist. The project also includes an optional LLM-based judge that checks whether the spec is meaningful rather than just formally complete, plus a benchmark suite of 35 adversarial edge cases, all of which the gate passes. The codebase is pure Python using only the standard library. The project was built by recording 42 real engineering sessions with hooks enabled, extracting the decision patterns into a schema, and cross-checking the generalization with a second model. Only observable artifacts were used, with no chain-of-thought data and no secrets.
A hook-based gate for Claude Code and Codex that blocks an AI agent from editing code until it writes and passes a formal spec document.
Mainly Python. The stack also includes Python.
MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.