Skip to content

Glyphrun × Cairntrace

A side-by-side for the two spec runners under the-lacanians. They look like siblings on purpose. Both are local-first, both speak intent + outcomes, both emit a self-contained artifact pack for humans and coding agents. They differ on the surface they drive — Glyphrun on terminals, Cairntrace on browsers.

Where the two overlap

Conceptcairntraceglyphrun
Behavior contractintent + outcomes in spec.ymlintent + outcomes in spec.yml
Repairable hintstyped steps: vocabularytyped steps: vocabulary
Agent interfaceCLI + MCP server + artifact packCLI + MCP server + artifact pack
Closed verifierstext, notText, url, network, noFailedRequests, console, count, xlsx, file, httpJson, script, processsame
Cold-start contractrequired; login/checkpoint/preconditionsrequired; login/checkpoint/preconditions
Artifact formatrun.{json,yaml,md}, report.html, outcomes/<id>.md, screenshots/, network/, console/, spec.resolved.ymlits own run pack, including terminal-only frames/frames.ndjson and raw/pty.raw.log
MCP toolscairn_* mirrors every CLI verbglyph_* mirrors every CLI verb

Where they diverge

Surfacecairntraceglyphrun
DriverHeadless Chrome (Playwright backend) or agent-browser adapterReal PTY (Unix PTY / Windows ConPTY)
DOM modelReal DOM, snapshots via Playwright accessibility treeVirtual terminal emulator (internal/terminal); deterministic, no display dependency
Locator strategySemantic locators (`rolelabel
Hydration waitsopen: { waitUntil: networkidle }not applicable — terminals hydrate synchronously
Mouse inputPlaywright click/hoverDEC mouse + SGR mouse; emits explicit MouseClick step type
Video captureoptional .webm with Playwright; agent-browser does not record videoterminal frames scrubbed with glyph replay <run> --tui (not browser video)

What is shared by design

  • The contract hash. Both runners mint a hash over intent + outcomes and refuse silent edits. Both expose cairn spec verify --stamp / glyph spec verify --stamp for re-stamping.
  • The artifact-pack pattern. Both keep a structured run record, event stream, outcome evidence, and agent context. Backend-specific evidence is intentionally different: Cairntrace writes browser snapshots/screenshots; Glyphrun writes terminal screens, frames, and PTY logs.
  • The MCP shape. Same *_explain, *_spec_verify, *_run, *_context tools, in the same order. An agent that learned one learned the other.
  • The repair engine. Both runners read failed-artifact packs and propose step rewrites that preserve the contract hash. The repair proposals are suggestions, not approvals.

When to choose which

  • GUI / SPA / form / accessibility tree / screenshots / video → cairntrace.
  • TUI / REPL / interactive shell / pipes / mouse-enabled terminal / SGR-styled output → glyphrun.
  • Mixed flows (CLI-driven install followed by a browser-based dashboard) → glyphrun for the CLI portion, cairntrace for the dashboard; share state via captures: and requests: handles, not by inventing a bridge.

What will not merge

  • The browsers and terminals do not share a VM model. cairntrace's accessibility-tree snapshots would be meaningless against glyphrun's cell model. We are not going to invent a common abstraction that one of them wants and the other doesn't.
  • Repair proposals and contract hashes follow the same design principles, but their schemas and backend-specific artifacts are versioned by each project.

Suggested reading

Local-first browser specs for coding agents. Released under the MIT License.