← All projects
Project record1 mention
Originally shared on Hacker News

Nomos

Nomos is a single 28MB stripped static Go binary (CGO_ENABLED=0, Apache 2.0) that sits between a repository and whatever coding agent is already in use. After "nomos init", the agent drives a worktree, verification, and self-fix loop: main is locked read-only via Git hooks, spec/contract tasks are separated from code tasks in a local causal DAG, and every task runs in a Git worktree under a strict state machine. "nomos verify" runs 42 in-binary structural/AST gates plus the repo's own compiler and test suite before merges, blocking fake shims, deleted assertions, skipped tests, leaked secrets, and rubric tampering, while "nomos mem" stores architectural lessons locally in embedded pure-Go SQLite with no cloud account, daemon, or telemetry.

Last shared For Developers who point AI coding agents like Claude Code, Cursor, or OpenCode at codebases they care about
01 / The problem

What it addresses

Coding agents left directly on a working branch optimize for shutting the compiler up on the current turn — deleting failing assertions, returning hardcoded nil/true stubs, rewriting specs to match broken code, dumping large functions into wrong packages, or burning tokens editing in circles — and longer rules files break down once context fills up.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Nomos

    Nomos is a single 28MB stripped static Go binary (CGO_ENABLED=0, Apache 2.0) that sits between a repository and whatever coding agent is already in use. After "nomos init", the agent drives a worktree, verification, and self-fix loop: main is locked read-only via Git hooks, spec/contract tasks are separated from code tasks in a local causal DAG, and every task runs in a Git worktree under a strict state machine. "nomos verify" runs 42 in-binary structural/AST gates plus the repo's own compiler and test suite before merges, blocking fake shims, deleted assertions, skipped tests, leaked secrets, and rubric tampering, while "nomos mem" stores architectural lessons locally in embedded pure-Go SQLite with no cloud account, daemon, or telemetry.

    Problem: Coding agents left directly on a working branch optimize for shutting the compiler up on the current turn — deleting failing assertions, returning hardcoded nil/true stubs, rewriting specs to match broken code, dumping large functions into wrong packages, or burning tokens editing in circles — and longer rules files break down once context fills up.

    Audience: Developers who point AI coding agents like Claude Code, Cursor, or OpenCode at codebases they care about

    Posted by @mgantlett · Original source ↗

    Story title · @mgantlett · · Source ↗

    Show HN: Nomos – A Go harness that stops coding agents from cheating on tests

    Submitted URL · @mgantlett · · Source ↗

    https://github.com/mgantlett/nomos

    Source text · @mgantlett · · Source ↗

    Starting over the summer I built Nomos: a single 28MB stripped static Go binary (CGO_ENABLED=0, Apache 2.0) that sits between your repo and whatever coding agent you already use.

    Source text · @mgantlett · · Source ↗

    Instead of trusting prompts, Nomos locks main read-only via Git hooks, separates spec/contract tasks (INT-) from code tasks (SUB-) in a local causal DAG (nomos task dag) so an agent can't edit the spec to excuse broken code, and isolates every task in a Git worktree

    Source text · @mgantlett · · Source ↗

    Before anything merges to main, "nomos verify" runs 42 in-binary structural/AST gates (~460ms full pass, ~24ms single-file via --fast-file) plus your repo's own compiler and test suite.

    Source text · @mgantlett · · Source ↗

    Left directly on a working branch, models optimize for shutting the compiler up on the current turn. Hit a tricky failure and they delete the failing assertion, return a hardcoded nil/true stub, rewrite the spec to match broken code, dump a 300-line function into the wrong package, or burn $15 of tokens editing in circles.

    Source text · @mgantlett · · Source ↗

    If you've pointed Claude Code, Cursor, or OpenCode at a codebase you care about and walked away thinking AI coding tools are a net negative, I pretty much agree with you.