The TDD net: Popper mechanized
The motivating instance of vibe-linter. AI "forgets" to write tests first, or writes tautological tests that pass on creation. Encode TDD as locks:
- node T: run the new tests, and they must be red to issue the
Tkey — "red-before-token-issuance = forced falsifiability; Popper mechanized." This kills green-on-write tests. - writing source (W) needs the
Tkey. - node R: run tests after W; loop until green to issue the
Rkey. commit(C) needs theRkey.
Two holes the dialogue surfaced: the red must be the right red (target-behavior-missing, not assert False/syntax error); and the model can edit tests to go green → R's "green" = a three-way conjunction: new tests pass ∧ test-file hash matches the T-token ∧ ratchet holds (no green test turns red).
Loops aren't free — termination needs a proof: each iteration burns a fuel token (linear type); exhaustion = escalation to the human queue. Two token types: persistent (completion proofs) + linear (loop fuel). The byproduct — a certificate chain (red-cert → hash-freeze → green-cert → commit-cert) — is worth more than the discipline: it turns human review from "re-derive trust" into "check certificates." Precedent: CI branch protection / required status checks, but moved from merge-time forward to creation-time.
Up: vibe-linter · math home: lcf-for-labor