Chapter 01 · 3 min
Trevo in three minutes
The whole arc — observe, propose, pull request, measure, ship — on one page.
Trevo is an experimentation platform that does the work engineers usually refuse to schedule. It connects to a GitHub repository, reads the code, proposes experiments that cite the files they would change, and — when you approve one — writes the variant as a pull request behind a feature flag. Your engineers review and merge like any other change. The experiment runs in production, the SDK reports what happened, and always-valid statistics call the result. Trevo then opens a second pull request that removes the losing arm and the flag. Nothing stays in the codebase that shouldn’t.
Five things happen, in order
Observe. The GitHub App snapshots the repo from a temporary clone: routes, components, API handlers, pricing rules, prompts. If the SDK is already installed, the funnel is built from the events it sends. If not, Trevo opens a PR that installs it.
Propose. The engine writes up to five proposals grounded in that snapshot. Each names a hypothesis, the evidence, the metric it moves, a guardrail, and code citations with line numbers. They rank by expected lift × confidence ÷ days to a decision. Server-side changes rank above surface tweaks because that is where the money usually is.
Pull request. Approving hands the proposal to Trevo Bot, which writes the variant on a trevo/* branch. On the client it gates with useExperiment(); on the server it resolves with getVariant(). The control path is untouched. It never merges.
Measure. Once merged and deployed, sessions are assigned by a hash of their identity, exposures and conversions flow in, and a mixture sequential probability ratio test (mSPRT) produces a p-value you can read at any moment without inflating your error rate. Guardrails and a sample-ratio check run on every tick.
Ship. When the test calls it, you decide. “Ship it” opens the cleanup PR that keeps the winner and deletes the flag; “reject” opens one that reverts. Revenue attributed to a shipped variant is baseline revenue per day × measured lift × days live, and the arithmetic is on the ledger.
What the demo workspace is
Terra & Twine is a small Next.js store with real files and genuine, findable weaknesses: a catalog grid with no action, a buy block below the fold on mobile, a cart that shows a bare subtotal, a shipping rule that lives on the server and is only revealed at checkout. The workspace carries 90 days of generated traffic and nine experiments across every state, three of them running. Every statistic on those pages is computed from the sessions by the stats engine — nothing is a number someone typed into a fixture.