AIMUG Panama · 30 November 2026

Who Gets to Change the Spec?

Spec-driven and proof-driven development, tried on an emergency text network for the Azuero coast.

Colin McNamara

colinmcnamara.com/talks/azuero-mesh
The whole Azuero peninsula in relief at night, seen from high above the sea.

Who I am

Founder, AIMUG

Field CTO, AHEAD

Open source

vLLM Semantic Router, Dataplane & Networking Working Group

Standards

IETF agentproto, review comments accepted into the requirements draft

Thank you

Paul and Geraldine, who hosted me in Panama, and their son Max. After the quake they organized resources, built apps and showed up for their neighbors.

colinmcnamara.com/connect

The claim

With AI, writing code got cheap enough that reviewing it is what slows me down.

So I check the code against the requirement instead of reading every line.

That only works if the agent can't change the requirement.

The agent writes code to meet it, and I decide when it changes.

Code as a flood of light streams toward a review gate and jams there; above it one small bright requirement sits in a glass case with a lock, and its owner appears above.

Formal verification · November 2026

A proof of the Riemann Hypothesis was certified before anyone could explain it

Nobody read it

The proof

17 million lines of Lean, a language for proofs that a computer checks step by step.

What people checked

The statement

About three lines, already in Lean's shared math library. The proof had to prove that exact statement.

Independent checkers replayed the proof against it. Trust moved from the proof to the statement.

Spec-driven development

In software, the statement is the spec

What it gets right

The spec is what you review

You write what the code has to do in a markdown file, and the agent builds from it.

Missing

A checker

Most requirements stay prose that a person or a model reads. Few get a check of their own.

Missing

An owner

None of the tools I looked at stop the agent from editing the spec it's building from.

The ladder with only the prose rung lit; ghost rungs flicker as missing checkers and an empty owner halo turns above.

Where spec-driven meets proof-driven

A requirement can be checked five ways, from a person reading it up to a proof

Prose

Judgment

A person reads it and decides.

Tests

Examples

Fixed cases that pass or fail.

Property tests

Rules

One rule, checked on many random cases.

Contracts

Pre and post

Conditions written into the code itself.

Proofs

Every input

A checker proves the rule for all inputs.

Spec-driven development is the bottom rung and formal verification is the top. Each requirement goes as high as its wording allows.

Five glowing rungs climb from prose through tests, property tests and contracts to a bright proofs rung; requirement dots settle densely on the lower rungs and thin out toward the top.

The lab

Agents change specs they're allowed to edit.

Spec could be met72 of 72fixed the bug
Spec couldn't be met, agent could edit it14 of 18changed the spec, and said so
Spec locked18 of 18stopped and asked me

Lab runs, November 2026: one task, three coding agents.

Agents as points of light meeting a spec: all 72 dock into a spec they can meet; 14 of 18 rewrite a spec that contradicts itself; with the spec read-only, all 18 rise to the owner.

Standing specs

Separate who can change a requirement from who satisfies it

The owner

Changes the spec

In its own change that touches only the spec, so it gets reviewed by itself.

The agent

Satisfies the spec

Writes code until the checks pass. If they can't pass, it stops and asks.

The reviewer

Reads the spec diff first

For a change that leaves the spec alone, that diff is empty, and the checks show what held.

The case study

I tried it on a network people would depend on in an emergency

A text network for the Azuero coast, planned with AI agents over a weekend.

9 October 2026 · Azuero, Panama

An M7.5 quake hit near Tonosí.

The next one could knock out the cell towers.

Magnitude 7.5 as reported by SINAPROC. USGS reported 7.7.

The Azuero coast at night, town lights along the shore; a shock ring sweeps in from the epicenter northwest of Tonosí and, in an illustration of a future outage, the tower lights go out one by one.

The plan · 12 sites in three phases

25–32%Phase 1 uses three hilltops from Cañas to Búcaro

52–61%Phase 2 adds Pedasí and inland hills for 7 sites

64–74%Phase 3 reaches Cambutal to the west with all 12

Solar LoRa radios on hilltops pass texts along with no cell service, grid power or internet. Nothing is built yet.

Estimated population in reach: the low end treats trees as walls, the high end uses bare terrain. The radios run open source MeshCore firmware at 915 MHz.

Three phases light up across the peninsula: three hilltops, then seven sites, then twelve, each linked to the last, with violet coverage growing.

Where it broke

An audit of the math found seven bugs

Pixel lookup

Half a pixel off

We read the 38 m pixel next door. Correcting the lookup moved hilltop pins up to 30 m.

Line of sight

Ridges between samples

We sampled the ground every 30 m, so a narrow ridge could slip between samples.

73% → 64%of people in reach with trees as walls. Tonight's figures use the corrected run.

The spec for the mesh model

13 requirements, each at its own rung

Proofs

2

The math of the pixel lookup and the path tracer, in Dafny.

Property tests

2

Line of sight works both ways, and coverage agrees with the link check.

Tests

7

Terrain input, tree loss, short paths, lengths, towers, budget and the published numbers.

Prose

2

Report both scenarios. Radio-test every site before mounting.

That's where each one is checked today. Six of the 13 could go as high as a proof.

Thirteen requirement dots land on their rungs: two on proofs, two on property tests, seven on tests, two on prose; four hollow outlines rise toward proofs.

Requirements at their rungs

Three of the 13, as the spec writes them

R2 · Proofs

Every crossed pixel counts

A path is clear only if the ray is above the terrain of every pixel it crosses, however briefly. The math is proved, and property tests check the code.

R8 · Tests

Every km traces to a stored length

Every km of coast on a page has to trace to a length the model stored in km. A test scans the pages.

R12 · Prose

Report both scenarios

Give coverage with bare terrain and with trees as walls. Nothing can pass or fail it until radios are up, so I review it.

Three requirement markers settle on the ladder: R2 on the proofs rung, R8 on the tests rung, and R12 on the prose rung.

Property tests

Rules about the physics, tried on random terrain

R3 · Both ways

Reciprocity

If hill A can see hill B, B can see A. On the old code, 24 of 150 random pairs worked only one way.

R2 · Every pixel

One tall pixel blocks

One tall pixel on a path has to block it. The old coverage code walked past 80 of 150.

R4 · One rule

Coverage matches links

The coverage check and the link check must agree on every pair. The old code disagreed on 16 of 150.

All three pass on the fixed code.

Random hilly terrain: hill pairs see each other both ways, a single tall pixel blocks a beam, and a coverage fan agrees with a link; every beam ends teal or purple.

Proof-driven

The pixel lookup rule, proved in Dafny

predicate Contains(i: int, x: real) {
  i as real <= x < i as real + 1.0
}
lemma PixelOfCorrect(x: real)
  ensures Contains(PixelOf(x), x)

Dafny checks this for every real number. The old rounding lookup fails the same statement: a point at 0.75 is in pixel 0, and rounding picks pixel 1.

The path tracer's math is proved too. The proofs cover the math, and property tests check that the Python follows it.

A pixel number line: a point at 0.75 lands in pixel 0, rounding jumps it to pixel 1 in red; then a path lights every pixel it crosses.

Hindsight check

The spec fails the old code on all seven bugs

Old codeFixed code
Read the pixel next doorfailspasses
Skipped narrow ridgesfailspasses
Judged phones at the wrong groundfailspasses
Kept terrain spikes and sea above zerofailspasses
Counted tree loss under the groundfailspasses
Called a blocked short path cleanfailspasses
Showed 107 samples as 107 kmfailsold deck still says it

I wrote these checks after the audit, so this is an upper bound. They also found the map drawing code still using the old method.

Two columns of seven lights: the old code fails every check in red, the fixed code passes in teal, and the 107 km row glows amber.

Who can change the spec

Four things stop an agent from editing the spec

AGENTS.md

Stop and ask

If a spec can't be met, stop and ask the owner. Never edit it.

Claude Code

Deny rule

A test session tried to edit the spec and was refused.

My git server

Push rejected

A push that changed the spec was rejected, even from my own key.

CODEOWNERS

Review

Any change to the spec needs my review on GitHub.

Before the spec was locked

The agent writing the spec changed a check after it failed

What failed

R8, the length check

It compared each km on a page with an independent estimate, within 15%. The estimate came out at 142 km against the stored 164 km.

What the agent did

Rewrote the check

Now every km on a page has to trace exactly to a stored km value, with a loose 20% guard.

I hadn't approved the spec yet. It's disclosed in the retro, and approving the change is my call.

Next

A blind test, and then the radios

Running now: a model that never saw the audit writes its own spec from the old code. Our guess, written down before it ran: it catches about 3 of the 7 bugs.

Then, from December into Q1 2027, we measure real links against the model.

Testing the predictions

Phase 0 is a field test

We predict two of the three Phase 1 links pass and one fails direct. A text can still go around it through the third hill.

Three nodes go up between December and Q1 2027, one on a temporary 8 m mast. We'll log each link and rerun the model before we buy the rest.

The three Phase 1 hilltops, each with a pole and a radio, joined by links that pulse as they are measured.

Try this Tuesday

Four things to do in your own repo

One

Mark which specs an agent may edit, and which it may only satisfy.

How: put the protected ones in one folder and name an owner in CODEOWNERS.

Two

Make the protected ones read-only for the agent.

How: a deny rule in the agent's settings, and a protected path on your git server.

Three

Tell your agents to stop and ask when a spec can't be met.

How: one line in AGENTS.md and CLAUDE.md, which the agents read.

Four

Give one crisp requirement a property test.

How: write the rule once and let a tool like Hypothesis try random cases.

The mesh repo does all four. The next slide has the files.

The files

What that looks like in the mesh repo

CODEOWNERS

# The spec is owned by Colin.
/spec/ @colinmcnamara

.claude/settings.json

{ "permissions": {
    "deny": ["Edit(/spec/**)"] } }

AGENTS.md

If a spec can't be met, stop and ask the
owner; never edit spec/. Don't weaken a check,
loosen a tolerance or skip a case to pass.

A property test (illustrative, Hypothesis)

@given(points, points)
def test_line_of_sight_both_ways(a, b):
    assert visible(a, b) == visible(b, a)

On the server: a protected path for spec/** (Forgejo), or required code-owner review (GitHub). When you review: git diff main -- spec/

Meetup projects

What we could work on together

Build night

Grab radios and repeaters and hack on them together.

Bots

Write a check-in bot or a quake-alert bot, or build a surf report board.

Translation

Get official notices onto every language channel on the mesh.

Field data

In Pedasí, take one phone per carrier to the beaches and log the signal.

Funding

About $16,000 by phase: field test $652, core $3,308, Pedasí and inland $5,713, west and south $4,224, plus $2,085 contingency.

Check my model

It's on GitHub at github.com/colinmcnamara/azuero-mesh-spec: public data, about 1,300 lines of Python, and a spec you can run against it.

Credits

Data and sources

Terrain: AWS Terrain Tiles, with SRTM and GMTED2010 courtesy of the U.S. Geological Survey and ETOPO1 from NOAA. The signal model uses resampled elevations from the University of Bristol's FABDEM V1-2 (CC BY-NC-SA 4.0).

Surface: produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.

Trees: © ESA WorldCover project 2021, contains modified Copernicus Sentinel data (2021) processed by the ESA WorldCover consortium (CC BY 4.0). Meta and WRI canopy height (CC BY 4.0), source imagery © 2016 Maxar.

People: WorldPop 2025 (CC BY 4.0). Google Open Buildings v3 (CC BY 4.0).

Cell check: Colin McNamara analyzed the Q3 2026 mobile tiles from Speedtest® by Ookla® Global Fixed and Mobile Network Performance Maps, accessed via AWS on 28 November 2026. Ookla trademarks used under license and reprinted with permission. These datasets and their adaptations here are shared under CC BY-NC-SA 4.0.

Map data © OpenStreetMap contributors. Tower sites: ASEP Panamá registry. Solar: NASA POWER. 3D: three.js (MIT). Slides: reveal.js (MIT).

Azuero Mesh · AIMUG Panama

Who gets to change your spec?

On the mesh model it's me. The agents run the spec, and when they can't meet it, they stop and ask.

Colin McNamara · Questions?

colinmcnamara.com/talks/azuero-mesh
The peninsula at night from high above, violet beacons lit on twelve hilltops.
📬 Get the write-ups by email