-
-
Prereg: lock an A/B test's decision rule before launch, then let the data decide.
-
The problem: plans live in Atlassian, but nothing checks the conclusion against them.
-
How it works: one Forge app for Jira, with Rovo, MCP and Confluence. Code computes every verdict.
-
Atlassian MCP: the analyst's agent brings counts from the warehouse; Prereg keeps the locked plan.
Inspiration
Growth, marketing and pricing teams already plan experiments in Atlassian: the Confluence template gallery has an "Experiment plan and results" template, with a hypothesis, metrics and targets, and a free-text conclusion. Nothing checks that the conclusion follows from the data under the plan the team agreed. That matters because most ideas fail: at Bing, fewer than a third of ideas improved the metric they were designed to improve. Microsoft found a sample ratio mismatch, a broken split that invalidates the test, in about 6% of its A/B tests, and LinkedIn in about 10% of zoomed-in tests. Checking results before the planned sample size ("peeking") inflates false positives far above the nominal 5%. And now AI agents read out tests, and they can try metrics faster than any analyst. We wanted the decision rule locked before launch and the verdict computed, not argued.
What it does
- Lock the decision rule at launch. On the experiment's Jira work item, the team states the arms, one primary metric with its minimum detectable effect, guardrails with their margins, secondary metrics and the minimum duration. Prereg computes the sample size per arm. Lock & launch freezes plan v1 with a fingerprint. Later changes are amendments: recorded, labelled "after launch", and never used for the official verdict.
- Accept results only as counts in the plan's columns. A results CSV must have exactly
arm,unitsand the plan's metric keys. An extra column is rejected with "open_rateis not in the locked plan v1 of EXP-5", and nothing is stored. Every accepted submission becomes an immutable readout. - Compute the verdict in code. Five outcomes, each with its reasons:
- Invalid when the split does not match the plan (chi-squared sample ratio check). No effects are shown at all, only the usual causes to check. In the demo, the AI analyst's readout claimed +4.2% activation; Prereg found a 51.10% / 48.90% split against 50/50 (p = 4.0e-12). With bot sign-ups removed from the control arm, the "lift" became −0.15% [−2.48%, +2.19%], p = 0.9025: Inconclusive.
- Not ready before the planned sample and minimum days. Lifts, p-values and even directions stay hidden, in the UI and in every tool response, and each early look is counted. An early stop is allowed only for harm on a guardrail.
- Don't ship when a guardrail fails its non-inferiority test, even if the primary metric improved. In the demo, a $14 price raised revenue per visitor by 5.00% (p = 0.0049) but cut checkout conversion by 10.00% against a 5% margin.
- Inconclusive when there is no detectable effect, with Holm's correction across treatments. Two subject lines with raw p = 0.0327 and 0.0448 become 0.0653 each: no winner.
- Ship the winning arm when the primary metric is significant in the planned direction and every guardrail is OK, for example the one-page checkout at +10.24% [+4.40%, +16.08%], p = 0.000308.
- Let AI analysts bring the data, not the conclusions. The data lives in the warehouse; Prereg runs entirely on Atlassian and cannot reach it. Through Atlassian's MCP server, an analyst's own agent reads the locked plan (
get-experiment-planreturns the exact CSV header), runs the query where the data is, and submits counts (submit-results). Prereg returns the verdict. The agent cannot pick metrics or thresholds after the fact. - The Prereg agent in Rovo answers "Can we ship this?" by quoting the computed verdict, explains an invalid split, submits a pasted CSV unchanged after the user confirms Rovo's review card, drafts plans and writes the decision record.
- Jira and Confluence fit. The verdict is an indexed issue property (
preregVerdict = invalidin JQL) and a glance on the work item. Closing a work item without a Ship verdict adds one comment. The decision record page in Confluence carries plan v1, the numbers, looks and amendments.
How we built it
- Forge for Jira, Confluence optional: a global page (portfolio and settings), an issue panel with the plan editor, the readout form and the full result tables, an issue glance, an indexed
jira:entityProperty, a trigger on work item updates, arovo:agentwith ten actions, arovo:skillfor experiment readouts, and arovo:mcpmodule exposing five of the actions as MCP tools. - A pure statistics engine (no Forge imports): chi-squared goodness of fit for the sample ratio check (regularized incomplete gamma), two-sample z-tests with unpooled variances and a delta-method interval for the relative lift, Holm–Bonferroni across treatments, one-sided non-inferiority tests for guardrails (absolute or relative margins), an early harm stop, the readiness rule and the sample size per arm. p-values come from erfc computed through the incomplete gamma function, so tiny values such as 4.0e-12 keep their precision.
- Two independent implementations. Before writing any app code, we wrote the expected numbers with a separate Python oracle using only the standard library. The Node engine's golden tests compare every number with the oracle at a relative error of 1e-6, plus edge cases for the CSV contract, readiness boundaries, Holm, guardrail boundaries and sample size: 13 test groups, all passing.
- Locked means locked: the plan's canonical JSON is hashed with SHA-256 at launch; the verdict always uses version 1; amendments store their changed fields and a reason, and the amended result is shown only as "exploratory, not decision-grade".
- Withholding by construction: the engine's public result for a Not ready or Invalid readout contains no effect statistics at all; a test checks the action output, not only the UI.
- No external calls. The Forge CLI reports the production version as eligible for Runs on Atlassian. Prereg stores no account IDs, names or email addresses.
Challenges we ran into
- Action inputs cannot be arrays or objects. Plans travel as short spec strings (
refund_14d | proportion | increase is harm | margin 1.0pp) and results as a CSV string, both parsed strictly with error messages an agent can act on. - Would Rovo change the numbers? A CSV relayed by a language model could be reformatted. We hash every submitted CSV and show the hash; in our test, the readout created through the Rovo agent had exactly the SHA-256 of the CSV we pasted.
- Nothing may leak before readiness. Hiding effects in the UI is easy; making sure no tool response carries a lift, an interval or a p-value before the planned sample took a dedicated code path and a test.
- UI Kit forms and stale state. Our first readout form saved only the last field typed; callbacks saw an old state. Functional state updates fixed it.
Accomplishments that we're proud of
- A judge can break and fix a test: paste the corrected counts into the invalid experiment and watch a +4.2% "win" turn into −0.15% with an interval around zero.
- Every number in the app, the testing guide and the video comes from the engine, and the engine agrees with a second implementation.
What we learned
- The expensive part of experimentation is not the statistics; it is the freedom to change the rule after seeing the data. Taking that freedom away is mostly product design.
- MCP is a natural fit for "bring your own data": the agent has warehouse access, the Atlassian app has the agreed plan, and neither has to trust the other's conclusions.
What's next
- Sequential tests with always-valid p-values (mSPRT), so teams can monitor continuously without peeking penalties.
- CUPED variance reduction and ratio metrics with the delta method.
- A Teamwork Graph link from each experiment to the goal it serves.
How it meets the technology requirement
Prereg is built entirely on Atlassian Forge. It integrates:
- Jira: a global page, an issue panel, an issue glance, an indexed entity property for JQL, comments and a trigger;
- Confluence: decision-record pages written as the user, and experiment briefs read as the user;
- Rovo: an agent with ten actions (the CREATE and UPDATE ones go through Rovo's review card) and a skill;
- Atlassian MCP: a
rovo:mcpmodule with five tools.
It makes no external calls.
Bonus prize: Best app with Atlassian MCP
In most apps, MCP is an extra way in. In Prereg it is the main way data comes in: experiment results live in the customer's warehouse, outside Atlassian, and Prereg runs with zero egress. So the analyst's own agent does what Atlassian cannot (query the data), and Prereg does what the agent must not (choose metrics and thresholds after the fact).
Tools exposed through the Atlassian MCP server (rovo:mcp):
get-experiment-plan: the locked plan, including the exact CSV header, each metric's cell format and definition, planned units per arm and the launch date;submit-results: counts as a CSV; returns the readout, the CSV's SHA-256, the echoed units per arm and the verdict, with effects withheld until the test is ready and valid;get-verdict: the latest verdict and reasons, looks before readiness, amendments;list-experiments: every experiment with its verdict;compute-sample-size: planning for a new test.
External clients connect to https://mcp.atlassian.com/forge/c70cdc60-a22d-462e-a63c-b4a8180a232a after a site admin turns on Prereg's tools for external clients, and every call runs with the caller's own Jira permissions. Locking and amending are deliberately not tools: only people in Atlassian change a plan.
Open-source skill.md (Apache-2.0) for third-party agents:
---
name: prereg-readout
description: Read out an A/B test the way the team pre-registered it in Jira, using the Prereg MCP tools. Use it when asked to analyse, read out or decide an experiment that has a Prereg key (EXP-12) or a Jira work item with a Prereg plan.
license: Apache-2.0
---
# Prereg readout
1. Call `get-experiment-plan` with the experiment or work-item key. Read `csvHeader`, `arms`, `metrics`
(each metric's cell format and definition), `launchDate` and `plannedUnitsPerArm`.
2. Write the query in your own environment (warehouse, notebook) for exactly those columns and arms,
for units assigned from `launchDate` up to the as-of date. Do not add metrics. Do not drop arms.
3. Build the CSV with the exact header. Proportions: successes, or successes/denominator.
Means: mean|sd, or mean|sd|n.
4. Call `submit-results` with the CSV, the as-of date (YYYY-MM-DD) and a short `source`, such as your
query name. Never compute or send p-values. Prereg computes them.
5. Report the returned verdict and reasons verbatim:
- not_ready: report progress and the earliest decision day. Do not describe which arm is ahead.
- invalid: report the sample ratio mismatch and check the listed causes in your query
(bot filtering in one arm, redirects, logging loss, assignment bugs) before resubmitting.
- ship / dont_ship / inconclusive: quote the lift, the interval and the guardrail statuses.
6. If the user wants another metric or threshold, explain that a person must amend the plan in Jira.
The official verdict stays with the plan locked at launch.
Setup: install Prereg on your Atlassian site; a site admin enables its tools for external clients
(Atlassian Administration → Apps → Sites → your site → Connected apps → Prereg); connect your MCP client
to https://mcp.atlassian.com/forge/c70cdc60-a22d-462e-a63c-b4a8180a232a and sign in. Every call runs with
your own Jira permissions.
Privacy and support
- Prereg runs entirely on Atlassian Forge and makes no external calls.
- It stores experiments, plan versions and readouts (counts, a source label and a note) in Forge storage on the customer's site, and one issue property per experiment work item.
- It does not store account IDs, names or email addresses.
- Questions or problems: leave a comment on this Devpost page.
Try it yourself
- Source code: https://github.com/JINGJAYHUANG/prereg (Apache-2.0).
npm testruns the 13 offline test groups with Node.js 22 or later; no install is needed. The independent Python reference that the tests compare against is inresearch/. - To run the app on your own Jira site: install the Forge CLI, then run
npm install,forge register,forge deploy -e developmentandforge install -e development --site your-site.atlassian.net --product jira. Then followdocs/WALKTHROUGH.mdin the repository.
Credits and AI assistance
- Prereg was started on 2026-11-17. It is built on Atlassian Forge and its npm packages (@forge/api, @forge/bridge, @forge/kvs, @forge/react, @forge/resolver) and React. The statistics are written from standard methods (chi-squared sample ratio check, z-tests with a delta-method interval, Holm–Bonferroni, non-inferiority tests). It uses no third-party datasets or assets; the demo experiments are fictional.
- AI assistance: most of the code, tests and documentation, and the video script, were written with Claude Code (Anthropic's AI coding agent) under the entrant's direction. The narration is a synthetic voice (Kokoro-82M, Apache-2.0).
Built With
- atlassian-forge
- confluence
- javascript
- jira
- mcp
- node.js
- python
- react
- rovo