2026-11-27 16:22 UTC

Promptcheckup adds paired, confidence-interval prompt gates for CI

state: expiredheat: mediumuncertainty: mediumrelevance: mediumprompt-evaluation statistical-testing agent-developmentgael55x

What is this?

Promptcheckup is an Apache-2.0-licensed Python tool by GitHub user gael55x, presented on its repository and PyPI as available for Python 3.11+. The Nov. 7, 2026 Show HN post links to the project. It runs old and new prompts on the same cases, compares per-case scores, and returns “better,” “worse,” or “not sure yet” using a paired t-test confidence interval; its CLI can gate CI changes. It also offers drift checks and prompt-edit proposals, but does not merge or deploy them. The evidence is primarily the developer’s own documentation and simulations; independent adoption or validation is not shown.

Why it matters

This makes statistical prompt regression testing more practical for agent developers: paired runs can control for shared variation, while an explicit inconclusive verdict discourages treating noisy score changes as wins. If adopted, CI gating could make prompt changes more disciplined and reproducible. The claimed error rates come mainly from simulations under stated assumptions, not broad independent or production validation; case quality, independence, judge bias, and repeated experimentation remain important limits.

Current assessment

Newly surfaced as an available, lightweight tool: the repository says it has no dependencies beyond Python’s standard library, supports Python 3.11+, and provides adapters for Python, OpenAI and Anthropic SDKs, and Node.js. Its `gate` command compares prompt versions on the same cases and exits with separate codes for better, worse, inconclusive, or error, enabling CI use. The project also describes weekly drift checks and proposed prompt edits, with edits gated but left for human review rather than merged automatically. The developer reports seeded simulations in which paired replay reduced false wins versus comparing different weeks, but these are project-reported results, not independent benchmarks; saved real-model examples predate the stated release and do not validate the current version. Effectiveness depends on representative, sufficiently numerous and independent cases; small improvements may require many cases, and repeated tests can increase false-positive risk. Search results corroborate the project and PyPI listing but provide no independent adoption evidence.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p20momentum: steady2 platformsage 336h
points/hour across evidence · reading as of 2026-11-21 15:21:19.170016+11:00 · deterministic, not a model opinion

How the heat travelled

11-07 04:22 (minted)⭐ origin echo-reconstructedThe repository README presents the project itself as the source: “A pass/fail check for prompt changes. Runs your old and new prompt on the
Gael (GitHub user gael55x) on github (echo) · attributed from hn.story.50401468 · published time unknown
—
11-07 03:52first on hacker news · published · lag ?Show HN: Promptcheckup – pass/fail check for prompt changes, with 95% intervals
gael55x
—
11-07 03:52amplified on hacker news 👑hn.story.50401468
gael55x
peak 1 · 0 comments · 104% of case engagement
11-07 04:20our radar first saw it · lag ?discovery anchor: hn.story.50401468—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Promptcheckup – pass/fail check for prompt changes, with 95% intervals
Retrieved article excerpt

Open article · Retrieved 2026-11-07T04:21:26.412559+00:00

# promptcheckup

**Your prompt change looked better. Was it better, or was it just an easier week?**

A pass/fail check for prompt changes. Runs your old and new prompt on the same cases and says **better**, **worse** or **not sure yet**, with a 95% confidence interval. Works in CI. No dependencies.

[CI](https://github.com/gael55x/promptcheckup/actions/workflows/ci.yml)
[PyPI](https://pypi.org/project/promptcheckup/)
[Python 3.11 | 3.12](https://github.com/gael55x/promptcheckup/blob/main/pyproject.toml)
[License: Apache-2.0](https://github.com/gael55x/promptcheckup/blob/main/LICENSE)

[Terminal demo: comparing two different weeks picks the worse prompt; running both prompts on the same days finds the better one; a real support-bot run reports B is better, 28 of 30 cases, with a reliable judge self-check.](https://raw.githubusercontent.com/gael55x/promptcheckup/main/docs/assets/demo.svg)


|  |  |  |  |
| --- | --- | --- | --- |
| 41.3% of the time, comparing last week's prompt with this week's picked the **worse** one [simulation, 2,000 runs](https://github.com/gael55x/promptcheckup#results) | 0 of 2,000 runs where paired replay picked the worse one [same simulation](https://github.com/gael55x/promptcheckup#results) | 2.2–2.7% false "better" when both prompts are equal [target 2.5%](https://github.com/gael55x/promptcheckup#results) | 0 dependencies outside the Python standard library any agent language |

## Try it in 30 seconds (no API key)

```
git clone https://github.com/gael55x/promptcheckup && cd promptcheckup
PYTHONPATH=src python3 examples/planted/planted.py
```

```
Naive comparison (different weeks): B - A = -1.56  -> picks A
Paired replay (same days): mean B - A = +0.36, 95% CI [+0.17, +0.55] -> better
```

Prompt B really is better. Comparing it with last week's run of prompt A says the opposite, because the week changed, not the prompt. Running both prompts on the same days cancels the week out.

## Use it on your agent

```
pip install promptcheckup        # Python 3.11+
promptcheckup init               # config, example cases, two GitHub workflows
promptcheckup doctor             # checks the wiring and says what to fix
promptcheckup gate --old-ref origin/main --out report.md
```

```
B is better: 28 of 30 cases improved (95% CI +0.78 to +0.99).
```

`gate` exits 0 for better, 1 for worse, 2 for not sure yet, so a pull request that makes the agent worse fails CI. Your agent can be a Python function or any program that reads JSON on stdin and writes JSON on stdout. See the [connection guide](https://github.com/gael55x/promptcheckup/blob/main/docs/connect-your-agent.md) for plain Python, OpenAI and Anthropic SDKs, and Node.js.

## Why not just compare the scores?

- **Last week isn't a control.** Model updates, market moves and traffic mix shift every answer. promptcheckup runs both prompts back to back on the same inputs, so those shifts cancel.
- **20 cases can lie.** It gives an interval, not a single score, and says *not sure yet* instead of guessing. It also catches a few large losses hidden among many small wins.
- **LLM judges have favourites.** Before a judge's verdict counts, the judge is checked on old prompt versus old prompt, which should come out even, and sees each pair in both orders.

[Bar chart comparing naive and paired replay in the constructed weekly-noise scenario described below.](https://raw.githubusercontent.com/gael55x/promptcheckup/main/benchmarks/results/naive_vs_paired.svg)

In this simulation, each week's conditions shift every answer by the same amount, and that shift cancels when both prompts run on the same inputs. Comparing last week's prompt with this week's picked the worse prompt in 41.3% of runs. Running both on the same inputs picked the better one in 91.7%, never picked the worse one in 2,000 runs, and said not sure yet in the other 8.4%.

## Setup in detail

```
promptcheckup init
```

This writes `promptcheckup.toml`, a few example cases and two GitHub workflows. Edit the config so it points at your agent, your prompt files and your cases. The agent can be a Python function `run(case, prompts)` or any program that reads JSON on stdin and writes JSON on stdout. The [connection guide](https://github.com/gael55x/promptcheckup/blob/main/docs/connect-your-agent.md) has adapters for plain Python, the OpenAI and Anthropic SDKs, and Node.js.

Check the setup, then compare your working tree with `main`:

```
promptcheckup doctor
promptcheckup gate --old-ref origin/main --out report.md
```

The first line of the report is the verdict:

```
B is better: 28 of 30 cases improved (95% CI +0.78 to +0.99).
```

`gate` exits with 0 for better, 1 for worse, 2 for not sure yet and 3 for errors, so it can run in CI. Before it starts, it shows how many agent and judge calls it plans to make and asks for confirmation. Pass `--yes` to skip the question.

### Other commands

Each runs as `promptcheckup <command>`.

| Command | What it does |
| --- | --- |
| `checkup` | The weekly check. Compares this week's answers with the latest saved snapshot to catch silent model or provider changes, groups failing cases, and proposes one small prompt edit. The edit is written from some of your cases and kept only if it passes the gate on the rest. |
| `evolve` | Repeats the proposal step for several rounds, learning on one part of your cases and gating on a held-out part, at a stricter confidence than a single gate. |
| `propose` | Proposes and gates one edit, without the drift check. |
| `doctor` | Checks the config, prompts, cases, agent, scoring, judge and budget, and says what to fix. |

`checkup` and `propose` hold out half of your cases by default (`run.holdout`). A gate needs 20 cases by default, so a proposal needs about 40 cases before it can be tested. With fewer, the report shows the proposed edit without testing or writing it, and `doctor` warns you. Which cases are held out depends only on a hash of their IDs.

The check-up report says "Stable" only when the drift comparison ran without errors. If every agent call fails, the report says so and the command exits with 3.

None of these merge anything. Edits that pass are written to your prompt files, and the workflow templates open a pull request for you to review.

### In your tests

```
from promptcheckup.testing import assert_better, assert_no_lookahead

def test_new_prompt_is_better():
    assert_better(run, cases, old_prompts, new_prompts, score=score)

def test_agent_cannot_see_the_future():
    assert_no_lookahead(build_input, history, decision_times, time_key="date")
```

`assert_no_lookahead` is for agents that work on time series. For each decision time it rescales the later numbers, changes each one at random, and removes the later rows, and it fails if the agent's input changes. It catches common leaks; it is a check, not a proof.

### Scoring

If you can compute how good an answer is, pass a `score(case, output)` function. For a trading agent that might be next-day profit and loss. Otherwise, write criteria and let a model judge pairs of answers. The judge sees both answers in both orders, and before its verdict counts it is checked against itself on old prompt versus old prompt, which should come out even. The gate report also shows how often the judge gave the same answer in both orders.

## How the verdict is made

For each case, promptcheckup subtracts the old prompt's score from the new prompt's score. It then computes a 95% confidence interval for the average difference using a paired t-test.

- If the whole interval is above zero, the verdict is better.
- If the whole interval is below zero, the verdict is worse.
- Otherwise the verdict is not sure yet. It also says not sure yet with fewer than 20 cases (`run.min_pairs`, at least 5), when a few large losses are hidden among many small gains, or when any run failed.

Both prompts run on each case back to back, each with its own copy of the input. Cached answers are reused only when the cache holds both prompts' answers for that case.

More detail is in [DESIGN.md](https://github.com/gael55x/promptcheckup/blob/main/DESIGN.md).

## Results

These come from seeded simulations of the shipped code and a few runs against real models. The commands to reproduce them are at the end of this section.

**False "better" verdicts.** When the two prompts were equally good, the gate said better 2.2–2.7% of the time on normal, heavy-tailed and judge-score noise, against a 2.5% target. On trading-style P&L with rare crashes, a plain t-test said better 8.9–12.7% of the time. With the skew guard it was 2.0% at 20 cases and almost never at 50 or more. The worst case we know of is a judge that calls every case a clear win or loss: at 50 cases it gives a false "better" 3.2% of the time, computed exactly in the test suite.

[False better rate by method, noise type and number of cases](https://raw.githubusercontent.com/gael55x/promptcheckup/main/benchmarks/results/false_positive.svg)

**How many cases you need.** The chance of detecting a real improvement depends on its size, measured in standard deviations of the per-case noise. The table assumes normally distributed, independent per-case differences, with 2,000 simulations per cell.

| Improvement | 20 cases | 50 cases | 120 cases |
| --- | --- | --- | --- |
| Large (0.8 SD) | 82.3% | 94.7% | 98.2% |
| Medium (0.5 SD) | 49.8% | 88.1% | 99.1% |
| Small (0.2 SD) | 10.8% | 27.6% | 58.5% |

[Detection rate by improvement size and number of cases](https://raw.githubusercontent.com/gael55x/promptcheckup/main/benchmarks/results/power.svg)

**A simulated year of weekly check-ups.** This ran 200 repeats of 52 weeks through the real check-up code, with 50 fixed cases, 2 samples and five planted incidents; proposals were gated on 25 held-out cases. It assumes Gaussian noise, fixed cases, scripted proposals and effects of known size, with no real model.

| Incident | Result in that week |
| --- | --- |
| Provider change that made answers worse (0.5 SD) | flagged in 87.5% of years |
| Provider change with no effect on quality | flagged in 2.0% |
| Unreviewed regression after the real fix was kept (2 SD drop) | flagged in 100.0% (181/181 years) |
| Unreviewed regression when the real fix was not kept (1 SD drop) | flagged in 84.2% (16/19 years) |
| Real fix proposed (+1 SD) | kept in 90.5% (181/200) |
| Useless edit proposed | rejected in 97.5% (195/200) |

An unreviewed regression is a bigger drop when the real fix had been kept earlier that year, so the table splits it by size. Quiet weeks raised 216 false alarms in 9,200 assessable weeks (2.3%), about one a year; the 9,400 quiet weeks include 200 first weeks without a baseline. That is this simulation's result, not a production expectation. The useless-edit row comes from one week per year, so it is noisy. Gating that same edit another 2,000 times on the 25 held-out cases wrongly kept it 48 times (2.4%).

[Weekly drift flags and proposal outcomes over 200 simulated years](https://raw.githubusercontent.com/gael55x/promptcheckup/main/benchmarks/results/checkup_timeline.svg)

**Real models.** The saved reports were made with promptcheckup 0.0.1, before this release; they show how the judges behaved, and do not validate 1.1.0. In the support-bot example, Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5 each judged the same 30 cases, and each passed the self-check with 100.0% order consistency. A full gate with Haiku as the judge took 180 judge calls (58,330 input and 40,108 output tokens).

**Trading example.** A model-driven trader compared a trend-following policy with the same policy plus a risk rule, on 60 cases from a synthetic market. The new policy won 26 cases and lost 13, but the gate said not sure yet (+12.76 bp per case, 95% CI −11.04 to +36.57). Applying both policies to all 2,085 eligible ticker-days in this generated market gives a mean of +1.37 bp, still too small to tell apart from zero. An inconclusive verdict does not show that the policy has no ed
gael55x10
🟧 echo.github ⭐The repository README presents the project itself as the source: “A pass/fail check for prompt changes. Runs your old and new prompt on the Gael (GitHub user gael55x)——

Interpretation history

Decision trace