← Back to archive

Repo of the Day

pierridotite/explore-compile-replay

Published: Nov 27, 2026

Open repository ↗

Explore once with an agent, compile to a standard test, replay in CI with no model. A pattern and an open contract for deterministic agent testing

Summary

Explore-Compile-Replay (ECR) is a TypeScript project that turns one exploratory agent run into a deterministic, reviewable test. The agent records typed actions and checks in a trace; ECR compiles that trace into a standard test file that can run in CI without calling a model.

What it is useful for

ECR is useful when an agent can find an important user flow but running the agent for every CI build is too slow, costly, and unpredictable. A typical workflow has three stages:

  1. Explore: An agent performs a flow once while its actions and checkpoints are recorded.
  2. Compile: The trace becomes a readable test file. The current mobile adapter produces a Maestro flow, while the reference adapter produces a test for an in-memory to-do application.
  3. Replay: The compiled test runs without ECR or a model, producing the same verdict on repeated runs.

The checks remain part of the test. For example, a trace that taps “Save” and expects “Buy bread” to be visible compiles into equivalent tap and visibility operations, with the item title stored as a parameter rather than a literal secret or fixed value.

ECR also distinguishes four replay outcomes: pass, bug, fixed, and FAIL. A recorded bug becomes a test that stays red until the bug is fixed, after which it becomes a regression guard. This makes the project useful for preserving findings from exploratory testing rather than relying on an agent to rediscover them.

The project also defines a trace format, adapter contract, seven laws, and a conformance kit. Teams can therefore build adapters for other systems rather than treating ECR as a mobile-only tool.

How engineers can use it

ECR requires Node 22.18 or later and pnpm. It is not published on npm, so the documented setup is to clone and run it locally:

git clone https://github.com/pierridotite/explore-compile-replay && cd explore-compile-replay
pnpm install
pnpm check

The repository includes a recorded trace that can be replayed against its in-memory to-do reference system:

export ECR_PARAM_ITEM_TITLE="Buy bread" ECR_PARAM_PRIVATE_NOTE="Door code 4821"
pnpm ecr replay packages/adapter-fixture/examples/anna-first-item.trace.json \
  --adapter packages/adapter-fixture/src/index.ts

For real work, use the documented ecr commands—validate, compile, replay, repair, and conformance—and consult docs/command.md for command details. The README’s quick start focuses on replaying an existing trace; it does not provide a complete general walkthrough for authoring new exploration traces, so teams should consult the command and adapter documentation before connecting their own system.

Several limitations matter. The mobile adapter currently targets Android through Maestro; web, API, and other adapters are presented as ideas rather than completed features. iOS support and an npm package are not yet available. Repairs are deliberately bounded to one failing step and cannot weaken checks, so multi-step interface changes are refused. The LocalSend evaluation also included one unstable trace, missed some delayed-target changes, and covered only one app, platform, and model.