heedless siblings literate maintenance essay · browser lisp · js · service worker · iphone
for vibe-coders who must later maintain what they built

Make the whole stack say its own name.

Suppose the application is a small, strange machine: a Lisp-flavored authoring layer over JavaScript, running in an iPhone browser, sheltered by a service worker, decorated by a WebGL side-channel, and asked to preserve human work across interruption. Then the architecture should be stated without shame. The shell must be distinct from the data, the cache distinct from the truth, the compiled behavior distinct from the prose that authored it, and the ornament distinct from the meaning. Once those distinctions are held cleanly, the stack stops being a makeshift trick and becomes a maintainable instrument.

A Fresh Account of the Small Browser Machine

The correct explanation begins with a refusal: do not describe the system by framework names or by developer mood. Describe it by the transitions the operator depends on. A request arrives. A shell appears. A versioned worker mediates assets. A durable local state is restored. Authored forms become inspectable behavior. Meaning is rendered in the DOM. Optional GPU light is added. Checkpoints are written. Re-entry remains possible. If each transition is clean, the application is trustworthy. If any transition is muddled, the application becomes a rumor sustained by luck.

I
First distinguish presence from readiness.

A visible page is not yet a ready tool. The shell may be present while the worker is stale, the state invalid, or the compiler still loading its forms. Therefore readiness must be earned, not assumed from first paint.

Asevanā ca bālānaṃ, paṇḍitānañca sevanā.
"Non-association with fools, association with the wise." Source: Access to Insight · Khp_utf8
II
Then separate authorities.

The worker has authority over asset versioning, not domain truth. Local persistence has authority over resumable drafts, not canonical records. The compiler has authority over behavior generation, not business meaning. Most bugs in clever browser software are not logic errors but confused authorities.

III
Compilation must shorten thought, not erase accountability.

A Lisp layer over JavaScript is justified only if it makes repeated patterns smaller while leaving generated behavior inspectable. The maintainer must still be able to trace event to state transition to render effect without joining a priesthood.

Appamādo amatapadaṃ, pamādo maccuno padaṃ.
"Heedfulness is the path to the deathless; heedlessness is the path to death." Source: Access to Insight · Dhp_utf8
IV
Render truth in the most survivable layer.

That layer is the DOM. CSS may refine it. WebGL may deepen it. But the canonical visible meaning should survive when animation is reduced, when the GPU path fails, and when the tab resumes in a half-awake state. Reliability prefers survivable substrates.

V
Finally, architect for interruption as the normal case.

The phone sleeps. Memory is pressured. Networks fade. New shells arrive. Storage schemas evolve. A serious browser application is therefore a re-entry machine: it can explain its current version, migrate a saved draft once, rebind event handlers cleanly, and continue without pretending the interruption never happened.

Sabbapāpassa akaraṇaṃ, kusalassa upasampadā; sacittapariyodapanaṃ.
A concise line on restraint, skill, and purification. Source: Access to Insight · Dhp_utf8

The Named Pipeline

The architecture is simple once spoken plainly: boot is not restore, restore is not compile, compile is not render, render is not ornament, and none of them are persistence. The machine becomes reliable when these acts are performed in order and never allowed to counterfeit one another.

request -> shell -> service-worker version gate -> cache or fetch -> restore state -> read form -> evaluate behavior -> render DOM -> optional WebGL pass -> persist checkpoint -> announce reloadability -> stamp provenance
01 Shell

Boot into a declarative shell.

The initial document should explain version, required assets, and pending recovery work. Footgun: treating first paint as full readiness. Defense: publish a distinct ready state after restore and bind complete.

02 Worker

Constrain the service worker.

Let it version assets, serve offline, and announce upgrades. Footgun: sneaking business logic into the worker until it becomes a second application. Defense: keep worker responsibilities narrow and inspectable.

03 State

Restore state before trust.

Validate schema, migrate once, and only then let the interface speak authoritatively. Footgun: rendering stale or unversioned payloads as if they were current truth. Defense: explicit migration and invalidation paths.

04 Forms

Compile forms into inspectable behavior.

The authored layer should collapse repetition, not obscure control flow. Footgun: macro cleverness that hides lifecycle edges. Defense: stable intermediate output, named hooks, and grep-friendly generated code.

05 Render

Render the canonical meaning in DOM.

The interface should remain readable with animation off and GPU absent. Footgun: binding core truth to visual flourish. Defense: keep DOM text and controls authoritative, with enhancement layered on top.

06 Shade

Use WebGL as subordinate ornament.

Shaders may visualize rhythm, latency, or touch. Footgun: moving state meaning into the canvas because the effect is seductive. Defense: ensure the GPU path can disappear without destroying comprehension.

07 Persist

Persist with explicit store boundaries.

Cache Storage for shell assets, IndexedDB for real payloads, localStorage only for tiny session hints. Footgun: one blob to rule them all. Defense: separate stores, versioned payloads, reset/export paths, and timestamps.

08 Reload

Stage reload as managed re-entry.

New code should announce itself, checkpoint local work, and swap by consent or at a deliberate quiet point. Footgun: surprise refresh during active work. Defense: visible update state and resumable reload.

Typical Footguns and Their Defenses

A wise engineer assumes the browser will do exactly what browsers do: cache too well, suspend at bad moments, preserve ambiguous state, flatter ornamental code, and make partial success look like total success. The defense is not paranoia. It is specific structure.

Worker footgun

Stale shell masquerading as fresh deploy.

Defense: immutable asset names, explicit worker version display, and an upgrade banner that stages reload instead of springing it.

Persistence footgun

Anonymous blobs surviving longer than their schema.

Defense: version every payload, migrate once, and give the operator visible reset and export controls rather than silent corruption.

Shader footgun

Canvas glamour consuming legibility and battery.

Defense: capability checks, pause paths, reduced-motion respect, and a rule that canonical text never lives only in the GPU path.

Lifecycle footgun

Tab suspension destroying mental continuity.

Defense: idempotent restore, rebind-on-resume, and UI language that tells the operator exactly what was recovered and what needs revalidation.

Reload footgun

Developer convenience externalized as operator pain.

Defense: checkpoint before swap, defer reload during active editing, and expose "new build available" as a state instead of detonating the page.

Compiler footgun

Elegant authoring layer, inscrutable runtime.

Defense: deterministic generated output, one stable vocabulary for lifecycle events, and traces that map authored forms back to emitted behavior.

Reference Contract

A maintainable stack is easier to keep when its obligations can be written as a contract. Not framework law, just a small set of promises the code can be checked against.

boot() shows shell only -> restore() validates versioned local state -> compile() emits inspectable behavior -> render() writes canonical DOM -> decorate() adds optional WebGL -> checkpoint() persists draft + timestamp -> resume() re-enters idempotently
Promise 01

Boot never claims more than shell readiness.

The first screen may announce version and pending recovery work, but it must not imply trusted state before restore and validation complete.

Promise 02

Restore is deterministic and idempotent.

The same saved payload should produce the same resumed state, and a second restore pass should not duplicate handlers, records, or effects.

Promise 03

Compiled behavior remains inspectable.

The authored layer may compress repetition, but emitted runtime behavior must preserve stable names for lifecycle, events, and state transitions.

Promise 04

Canonical meaning is DOM-addressable.

If a human cannot recover the core state from the DOM alone, too much authority has drifted into style, shader, or hidden in-memory structures.

Promise 05

Enhancement is optional and losable.

GPU effects, network sync, and live reload improve the tool when present, but their absence should degrade atmosphere or convenience, not truth.

Promise 06

Reload is a managed handoff.

A new build stages itself, checkpoints local work, and offers a clean re-entry. It never silently rewrites the operator's current world.

Appendix Drill · keep the stack unembarrassing

The essay above states the architecture. This drill tests whether its discipline survives contact with temptation.

Signal
74
Slop Pressure
26
pass 1 of 5

Loading scenario...

Status Choose the move that names the layer and reduces the blast radius.

Practical Maxims

  • Readiness must be earned: first paint, bound handlers, restored state, and trusted data are four different moments.
  • Each layer gets one authority: worker for assets, storage for resumable local state, DOM for visible truth, compiler for emitted behavior.
  • Recovery is architecture: if the app cannot explain how it returns after sleep or swap, it is unfinished.
  • Enhancement must be losable: remove animation, network, or GPU and the tool should remain intelligible.
  • Persistence is a contract: schemas, migrations, export, reset, and timestamps belong in the first draft, not the postmortem.
  • Provenance is part of maintenance: artifacts should carry enough origin to keep future debugging from becoming folklore.

Artifact Provenance

{
  "project_name": "landings",
  "repo_path": "/Users/uprootiny/landings",
  "git_remote": "https://github.com/uprootiny/landings.git",
  "git_branch": "main",
  "git_commit": "40cd78c86a3dcc64bde687541081cd7d074a5fa8",
  "generated_at": "2026-05-17T07:55:22+03:00",
  "generator": "OpenAI Codex GPT-5",
  "session_source": "codex",
  "session_locator": "/Users/uprootiny/.codex/sessions/2026/05",
  "artifact_path": "heedless-siblings/index.html"
}