Skip to main content

Engineering notes

Tips, patterns and practice from building software with AI agents.

Measure the page the reader gets

4 November 2026 · Testing & verification

We measure contrast, touch targets, overdraw and horizontal scroll in a real browser, at phone and desktop sizes in light and dark, and fix the measure when it disagrees with what the reader gets.

Encode a CDN path only as much as it needs

3 November 2026 · Field notes

Encode each segment of a CDN invalidation path, and only the characters the API requires. Keep its reserved set literal, and pin the rule with a test of edge cases.

Carry an unfinished invalidation into the next run

2 November 2026 · Guardrails & fail-closed

When a deploy deletes keys and the CDN invalidation fails, the next deploy reads the failed record and invalidates the paths it left behind, before it uploads anything.

Record every key a partial delete removed

1 November 2026 · Guardrails & fail-closed

A delete that fails half way has still deleted something. The error must carry the keys already gone, or the record of the run cannot list them.

Prune only what no release names

31 October 2026 · Guardrails & fail-closed

A post-deploy prune is safe only if it keeps every release the edge may still serve, including one that a deploy uploaded and then recorded as failed.

Tell the CSS scanner what it may read

30 October 2026 · AI-built UI

Tailwind's automatic scan read the whole repo, docs and tests included, and shipped classes the fingerprint never saw. We named the sources explicitly and added a test that checks them.

Uncommitted changes are part of the build

24 October 2026 · Guardrails & fail-closed

A fingerprint built from the commit at HEAD ignores edits in the working tree. We added a hash of the diff and the untracked source files, and a test that edits, adds and reverts.

When git cannot answer, rebuild

22 October 2026 · Guardrails & fail-closed

A fingerprint that falls back to a plain string when git fails can match a stored release. We made an unknown fingerprint read stale and force a rebuild, and wrote tests for both outcomes.

Hand the designer what ships

20 October 2026 · AI-built UI

When a design tool needs to show your pages, export the build's own resolved output, not your templates and content. A versioned, deterministic directory of exactly what ships is the only preview that cannot drift from the site.

Preview with the gate's own code

16 October 2026 · Testing & verification

A preview that estimates what the gate will do is a second implementation of the gate, and it will drift. Make the preview call the gate's own function, so a clean preview is the build passing.

The default that failed open

16 October 2026 · Guardrails & fail-closed

An optional argument with a safe-looking default is a guard that a forgetful caller can skip. For anything that protects a boundary, make the argument required and let the compiler refuse the caller.

Two seats per task

15 October 2026 · Agentic workflows

One agent builds each task and a fresh one reviews it before the next task starts; one scoped re-review per fix; one whole-branch review at the end. The shape matters more than the model.

A plan the next session can run

13 October 2026 · Specs & planning

An implementation plan written for an agent with no memory of the design conversation needs exact code in every step, a brief per task and a ledger that outlives the session.

Refuse, don't warn

8 October 2026 · Guardrails & fail-closed

A build that warns about a leak will ship the leak. Make every check a refusal with a name, prove each one with a red case first, and let the build fail closed.