San Juan Riparian Watch
← back to the story
// the-other-method · how the work stays honest

Honesty you can't forget to enforce

This project was built fast, with heavy AI assistance. That is exactly where research quietly goes wrong, so the interesting engineering isn't only the model — it's the machinery that keeps an AI-accelerated codebase correct when nobody is watching every line.

The failure mode nobody catches

Hallucinated code is the easy failure: it doesn't compile, and a compiler catches it in seconds. The dangerous failures are semantic — they compile, they pass the tests, and they read beautifully, while being wrong. AI is very good at producing fluent, plausible, finished-looking output, which is precisely what makes a wrong result invisible.

Failure modeCaught by
Hallucinated API callthe compiler
Wrong logica unit test
A retracted result still published as factnothing
A model scored against 45%-wrong labelsnothing
A novelty claim already falsified by a 2018 papernothing
The thesis Exhortation ("be careful", "remember to update the docs") does not survive contact with a fast, AI-assisted week. The rule that holds is the one a machine enforces. Put plainly: every rule that was merely documented eventually drifted; every rule that was mechanized held.

The encoding loop

Each hard-won lesson is encoded across several surfaces (the canon file, agent + command definitions, review-bot rules, docs and diagrams) and backed by enforcement tiers — from an editor hint, to a pre-commit hook, to a CI gate that fails the build. A lesson learned once becomes a check that can't be un-learned.

learn
A regression or bad claim slips through once
encode
Write it into the canon + a machine rule
enforce
Hook / CI gate fails on any recurrence
compound
The guarantee holds for every future change

The critical move is the last one: because the rule is mechanical, it protects work done months later by someone (or some model) who never read the original lesson.

Drift gates — the checks a compiler can't do

Ordinary CI checks file shape: does it build, do tests pass, is formatting clean. None of that can see a doc presenting a withdrawn result as current, or a retired threshold living on in a docstring. Those are semantic drift, and they get their own gates:

GateWhat it makes impossible
tombstonesResurrecting a retired identifier or a killed metric threshold in any doc, comment, or config — CI fails.
retractionsStating a withdrawn claim unless the same doc also retracts it. A result can't quietly come back.
doc-orphansA spec or decision record that nothing links to — unreachable docs rot into lies, so they fail the build.
canon-refsA paraphrase of the canon that drifts from its source; stale cross-references after a file move.
Why this is unusual Most teams write these rules in a wiki and hope. Here they run identically on a laptop and in CI, so the completion criterion for a cleanup isn't "the docs someone remembered are updated" — it's the gate passes.

The receipts

A method is only as honest as its record of being wrong. Each gate exists because something real slipped through first — and those are kept in the record, not scrubbed:

// caught late, by reading

Extent was already solved

The novelty claim assumed no one had mapped basin-wide riparian extent. A 2018 paper (CO-RIP, κ 0.80) had. Found by reading the literature, not by a gate — which is exactly why a paper-audit command now exists to try to falsify the claim on demand.

// green check, no review

The merge gate was theatre

For 25 of the first 29 merged PRs, a skipped AI review still posted a green check — "no findings" was indistinguishable from "no review." Caught only when a reviewer asked a question that couldn't be answered without actually checking. Now the review, not the check, is the gate.

// $ ≠ end-of-string

A regex that let SQL through

A tile-layer name was validated with ^[a-z_]+$. In .NET, $ also matches before a trailing newline, so "wetlands\n" reached an interpolated SQL literal. The AI review caught what CI, static analysis, 20 unit tests and a careful human passed. Now \A…\z.

// retracted, still shown

A withdrawn result, presented as fact

A public review page kept presenting a retracted number as current; a retired NDVI threshold lived on in a component docstring; a decision record had nothing linking to it. All three real. All three now impossible to reintroduce without the build failing.


At scale, across two codebases

This isn't a toy. The same discipline runs the distributed-systems reference app and this geospatial + RAG project, with a substantial enforcement library behind it:

677
skill definitions in the scaffold
27
audit records (the receipts)
5
surfaces each rule is encoded across
3
enforcement tiers: hint · hook · CI
PreToolUse / PostToolUse hooks drift-gates in CI architecture-reviewer agent AI review must be green to merge tombstones + retractions registries paper-audit command
The point The deliverable isn't just a map or an agent — it's a way of doing AI-accelerated engineering where being fast and being honest aren't in tension, because the honesty is enforced by the same machinery that makes you fast.