Post-Mortem ⏱️ 5 min read

We Ran Godmode on Godmode

TL;DR

💥 The setup: Godmode's pitch is a deterministic runner that stops the AI skipping steps. We audited that runner using its own standards.
🔬 The verdict: its gates scanned the whole repo instead of your change, layers could run in any order, and a green finish could hide five skipped layers.
🔧 The fix: v2.4.0 scopes every gate to the files you actually touched, enforces layer order, and makes the final verdict honest. Eight regression tests prove it.

Godmode sells one promise: maximum effort, verified. An 8-layer protocol, driven by a small command-line runner, so the model cannot quietly skip the boring steps.

This week we pointed that runner at itself. It did not go well, and that is exactly what made it useful.

📊 The Audit in Numbers

This was a two-round audit: first a full read of the runner's source, then live tests in a throwaway repo to prove every finding actually fires. Numbers below are from the real sessions, not estimates.

MetricValue
Skill audited/godmode v2.3.2 (runner v2.3.1)
Audit rounds2: source read, then live smoking-gun tests
Smoking-gun tests6 planned, 6 fired (tests A to F)
Evidence from a real run2,325 files scanned for a single landing-page task
Stale markers blocking the gate119, none of them from the task
Security findings on that run1,002 total, 912 from one over-eager rule
Fixes shipped14 file edits, runner and skill bumped to v2.4.0
Regression tests8 of 8 passing (T1 to T8)

🪞 Why Point the Auditor at Itself

The 8-layer protocol works because a deterministic program, not the model's mood, decides when a layer counts as done. Layer 2 is not done until a scanner finds zero leftover stubs; Layer 3 is not done until the test suite actually passes.

But if the enforcement itself is loose, every green tick it prints is decoration. We have audited our own tools before and it hurt in useful ways, so godmode's runner was next in line.

The analogy: imagine hiring a building inspector to sign off your kitchen renovation. He walks the entire street, writes up 119 defects in other people's houses, and tells you your kitchen fails until the whole street is fixed. That was godmode's completeness gate before v2.4.0.

v2.3.2: inspects the street v2.4.0: inspects your renovation gm gm
Same inspector, new scope. The gate now grades the work you did, not the neighborhood it lives in.

💥 What the Audit Found

Round 1 read every line of the runner. Round 2 built a small scratch repo and made each suspected failure happen for real.

Whole-repo scans

The completeness, security, and polish gates walked every file in the project instead of the files the task changed.

No ordering

Layer 4 ran straight after start with layers 1 to 3 skipped, then stamped "Layer 4 complete" like nothing happened.

The formatter rewrote history

Polish ran prettier --write . on the whole repo and reformatted a committed file the task never touched, then reported success.

Case-sensitive security

The weak-crypto rule only matched uppercase MD5. Real createHash('md5') password hashing produced zero findings.

Fake test runner

A fresh npm project's placeholder test script counted as a real suite, wedging runs in a "fix the failures" loop with nothing to fix.

Silent incomplete

The end command happily finalized a run with 5 of 8 layers missing. No warning, anywhere.

🔬 See the Worst One Yourself

The scratch repo had a committed legacy.js carrying a TODO from 2023, a Python helper, and two files the task actually touched. Click between the two versions to see what each one scans and flags.

legacy.jscommitted 2023, untouched[FLAG: TODO]
helper.pycommitted, untouched[FLAG: pass-stub]
math.jschanged by this task[FLAG: TODO]
vuln.jschanged by this task[scanned]
node_modules/thousands of files[walked too]
3 markers found. The gate demands zero across everything, so it is unreachable on any real repo.

On our live site repo the numbers were worse. One landing-page task triggered a scan of 2,325 files, surfaced 119 stale markers from old code, and demanded all of them reach zero before tests could start.

Core insight: a gate you can never pass does not raise quality. It trains the model, and you, to ignore gates.

🔧 What v2.4.0 Actually Changes

Every fix follows one rule: the gate must verify the thing it claims to verify. Scope by what changed, refuse to run out of order, and never stamp a layer that was not actually checked.

Findingv2.4.0 behavior
Whole-repo scanscheck, harden, and polish operate on files changed since the run started, using git. No git? It says so out loud in a warning.
No orderingCalling a gate early returns out_of_order and points at the missing step. State stays untouched.
Formatter rewrote historyPrettier and eslint receive an explicit list of your changed files. Repo-wide format scripts are skipped with a reason.
Case-sensitive securityCrypto rules now match any casing, and the innerHTML rule only fires on dynamic values, not static strings.
Fake test runnerThe npm placeholder script is recognized as a placeholder and reported as "no runner detected".
Silent incompleteend now certifies "All 8 layers verified complete" or shouts INCOMPLETE with the exact missing layers.

Here is the ordering guard as a run actually sees it. This envelope is copied verbatim from our regression test:

{"state":"out_of_order","run_id":"gm-1783343082-4e68f9",
 "narrate":"Cannot run harden yet: `test` has not been run
 for this run. The 8-layer protocol is ordered; run
 `node bin/godmode test` first.","next":"test"}

A fixed run now moves through the gates like this:

  1. start records the git commit you began from.
  2. discover maps the repo and stamps Layer 1.
  3. check scans only your changed files for leftovers, and stamps Layer 2 only when they are clean.
  4. test runs the real suite and stamps Layer 3 only on a pass.
  5. harden security-scans your diff and hands the findings to the model for triage.
  6. ripple and polish stay inside the files you touched.
  7. end compares the stamps against all 8 layers and tells the truth.

🎮 Try to Skip a Layer

This simulator runs the same guard logic as the real runner. Try clicking harden first, then walk the honest path.

run started. gates armed. click a command.

The Receipts: Eight Regression Tests

Fixes without proof would repeat the original sin. So v2.4.0 shipped only after eight regression tests, each targeting one audit finding, passed in the same scratch repo.

TestWhat it provesResult
T1 orderingPremature gates return out_of_order and mutate nothingpass
T2 clean treeAn untouched repo produces zero findings and no false stamppass
T3 diff scopeA new TODO in your file is the only thing flaggedpass
T4 scaffold sentinelThe npm placeholder script reads as "no runner"pass
T5 scanner qualityLowercase md5 caught, static innerHTML ignoredpass
T6 polish scopePrettier formats only changed files; committed files stay byte-identicalpass
T7 end verdictFull runs certify, partial runs shout INCOMPLETEpass
T8 no-git fallbackWhole-tree mode warns explicitly and respects .gitignorepass

🧠 What We Left Broken, On Purpose

Honesty section. The audit found more than this batch fixed, and the leftovers are logged for a second pass.

The ripple gate's caller search is expensive on big repos and matches bare words, the global active-run pointer can be clobbered by two parallel sessions (we watched it happen mid-audit), and the file-ranking in discover once scored a stale JSON report above the CSS file literally named in the task.

Why ship anyway: the fixed gates change what a green run means today. The leftovers make some runs slower or noisier, but they no longer make a passing run a lie.

Run the protocol that audits itself

Godmode v2.4.0 ships the diff-scoped gates, the ordering guard, and the honest end verdict from this post.

Get Godmode Read the 8-layer protocol