post: The Spec Was the Program (engineers-notebook #11)#39
Open
Davidslv wants to merge 1 commit into
Open
Conversation
A clean-room experiment: one normative spec handed to two isolated AI agents (Ruby and Rust), both building test-first. They converged to byte-identical behaviour everywhere the spec was exact, and diverged only where it was ambiguous — a differential tester for the specification itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Engineers-notebook #11. A write-up of a clean-room experiment run this week: I read a real code-context engine, wrote a normative specification (exact tokeniser, chunk-ID hash, FNV-1a hashing embedder, BM25, RRF, confidence blend), and handed it cold to two isolated AI agents — one implementing in Ruby, one in Rust — both strictly test-first, neither allowed to see the original or each other.
The finding
They finished within nine seconds of each other (~25 min each). Diffing their
conformance.json:end_line(3 vs 2), traced to a trailing-newline ambiguity in my spec, not a bug in either implementation. A second, subtler ambiguity showed up in the benchmark corpus scope.Thesis: a specification is a program; its bugs are ambiguities; two diverse independent implementations are a differential tester for the spec. The Ruby-vs-Rust performance gap (Rust ~40× faster queries) is real but orthogonal — the spec was the variable under test.
Post details
_posts/2026-07-05-the-spec-was-the-program.markdownengineers-notebook, order 11 (follows Portfolio #10, Reading a Binary Game Format in Ruby)bundle exec jekyll buildsucceeds and the post renders to_site/2026/07/05/the-spec-was-the-program.htmlNotes for review
2026-07-05(today) rather than the Tuesday cadence slot (2026-07-07) becausefuture: falsein_config.ymlwould exclude a future-dated post from the build. Rename the file to2026-07-07-...if you'd rather keep the strict Tuesday rhythm and your deploy rebuilds on/after that date./img/og-default.png— every other series post has a customog-<slug>.png. A bespoke card can be added later; I didn't want to ship a broken image reference.