Skip to content

post: The Spec Was the Program (engineers-notebook #11)#39

Open
Davidslv wants to merge 1 commit into
masterfrom
post/spec-was-the-program
Open

post: The Spec Was the Program (engineers-notebook #11)#39
Davidslv wants to merge 1 commit into
masterfrom
post/spec-was-the-program

Conversation

@Davidslv

@Davidslv Davidslv commented Jul 5, 2026

Copy link
Copy Markdown
Owner

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:

  • All six code chunk IDs byte-identical across languages; every query top-1 identical; scores matched to 6 dp.
  • Exactly one divergence — a fallback chunk's 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

  • File: _posts/2026-07-05-the-spec-was-the-program.markdown
  • Series: engineers-notebook, order 11 (follows Portfolio #10, Reading a Binary Game Format in Ruby)
  • ~1,700 words, in series voice; British spelling
  • Verified: bundle exec jekyll build succeeds and the post renders to _site/2026/07/05/the-spec-was-the-program.html

Notes for review

  • Date: dated 2026-07-05 (today) rather than the Tuesday cadence slot (2026-07-07) because future: false in _config.yml would exclude a future-dated post from the build. Rename the file to 2026-07-07-... if you'd rather keep the strict Tuesday rhythm and your deploy rebuilds on/after that date.
  • OG image: uses /img/og-default.png — every other series post has a custom og-<slug>.png. A bespoke card can be added later; I didn't want to ship a broken image reference.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant