Skip to content

Early access · Open source

Find the sequence of API calls that breaks your business rules

Each call is valid on its own. Together they refund more than was paid, sell stock you don't have, or let a normal user into an admin page. Roook finds the smallest sequence that does it, proves it on your running app, and verifies the fix.

The same run on a phone: verification by the engine, fix verified. Before: paid 1, refunded total 2, rule broken. After: the rule held in 10/10 replays. Replay, project tests, regression test and fresh search all passed.
Recorded example runBob's answers are replayed from a saved real run; the engine still runs live against the real app.

One real case

The refund bug, end to end

Every value here comes from a recorded Roook run on minishop, Roook's own small test shop: one of the two example repos you can run with Try Roook.

Recorded example runBob's answers were replayed from a saved real run; the engine ran live against the real app.

1 · The rule

A rule you approved

Bob proposed it with evidence from the code. Each refund on its own looks valid, so no single request breaks it.

Total refunds on an order never exceed the amount paid

Must hold order.refunded_total <= order.paid

refunded_total_le_paid

2 · The smallest sequence

Four normal calls break it

The search broke the rule with paid 50 and refunded 60. The shrinker kept the 4 steps and cut the values to the smallest that still fail.

  1. admin: create_product(price=1, stock=1)
  2. customer: buy(quantity=1)
  3. customer: refund(amount=1)
  4. customer: refund(amount=1)

Observed after step 4

Rule broken

paid
1
refunded_total
2

3 · Replayed

Proved on the real app

The engine replayed the sequence on the running app and saved it as a counterexample plus a regression test.

Reproduced
10/10
Regression test
test_rook_cx_001.py

On the unfixed code: exit 1: 1 failed, 13 passed in 0.44s

4 · Diagnosis

One line is the cause

The Detective's diagnosis, checked by the Diagnosis Reviewer against the evidence:

app.py:214

On line 214, in buggy mode (is_fixed=False), already is set to 0 instead of order.refunded_total.

5 · The fix

A one-line fix, reviewed

Written by the Surgeon in a workspace copy after approval, checked by the Fix Reviewer.

Fix · app.py
--- a/app.py+++ b/app.py     @app.post("/orders/{order_id}/refunds")     async def refund(order_id: int, body: NewRefund, user: CurrentUser) -> dict[str, int]:         order = get_order(order_id, user)-        # BUG 1 (buggy mode): each refund is compared with the amount paid on its own.-        already = order.refunded_total if is_fixed else 0+        already = order.refunded_total         if already + body.amount > order.paid:             raise HTTPException(400, "refund exceeds amount paid")         order.refunds.append(body.amount)

6 · Verified

Four engine checks, all passed

Only the engine decides. The fix then landed on its own branch.

  • Exact replay passed

    The same 4 steps, replayed on the fixed app.

    rule refunded_total_le_paid held in 10/10 replays

  • Your project's tests passed

    The app's own test suite.

    exit 0: 13 passed in 0.37s

  • The generated regression test passed

    The new test, with the project's tests. It failed before the fix.

    exit 0: 14 passed in 0.44s

  • A fresh search, new seed passed

    New random sequences against the fixed app. This run's budget was 1,500; the CLI default is 20,000.

    no violation of 1 rules in 1500 sequences (seed 1:verify:1)

4/4 checks passedCommitted to branch rook/fix-cx-001

How it works

Six steps, from your repo to a verified fix

Bob agents read, propose and write. The deterministic engine searches, replays and verifies. You approve the rules and the fix.

  1. Step 1: Understand

    Bob agents read your repo, start the app in a sandbox and map its HTTP API.

    Bob

  2. Step 2: Rules

    Bob proposes business rules with evidence from the code, and you approve them.

    BobYou approve

  3. Step 3: Search

    The deterministic engine runs seeded sequences of valid actions against the real running app.

    Engine

  4. Step 4: Shrink and prove

    A failing sequence is shrunk to a minimal one and replayed on the real app.

    Engine

  5. Step 5: Diagnose and fix

    Bob finds the root cause, and after you approve, writes the fix in a workspace copy.

    BobYou approve

  6. Step 6: Verify and ship

    The fix counts only if four engine checks pass. Then it ships on its own branch, as a pull request for a GitHub repo.

    Engine

Inside a run

Watch the six steps in the product

The refund case again, drawn with the web app's own components: Bob agents read, propose and write; the engine searches, replays and verifies.

Product illustration — not a live run

minishopMAP
Scout ✓ done Python + FastAPI shop in app.py: products, orders and refunds
Mechanic ✓ done App running in a sandbox, no secrets needed
Mapper Mapping… (2.4s)
⎿ reading app.py
Runner✓ done 6/6 actions dry-ran OK, 2/2 state readers OK

What you get

Proof you can keep, not a prediction

Each finding is a sequence that ran on your app, and each fix is checked the same way.

Proof, not a guess

A bug counts only when the deterministic engine breaks an approved rule on your running app. No AI decides pass or fail.

The smallest reproduction

A failing sequence is shrunk to a minimal one, steps first and then values, and replayed on the real app, 10 times by default. Flaky results are reported as flaky.

A failing test you can keep

Each counterexample is saved as a JSON file plus a regression test in your repo. In the refund case, the test failed on the unfixed code and passed after the fix.

A fix that is checked, not trusted

A fix counts only if four engine checks pass: exact replay, your project's tests, the generated regression test, and a fresh search with a new seed.

Rules you approve, in your repo

Bob proposes business rules with evidence from your code and a critic rejects weak ones. Only the rules you approve are checked; they live in rook/rook.yaml.

The fix lands on its own branch

Never on your default branch: a rook/fix-* branch, as a pull request for a GitHub repo or a local branch for a folder.

In your terminal and your pull requests

An interactive rook terminal session, the web app, and a GitHub Action that fails the job if an approved rule breaks.

Any backend with an HTTP API

In any language. The example apps are written in Node.js, Python (FastAPI) and Go.

Guarantees

What Roook refuses to do

Each of these is enforced in code, not left to a prompt.

  • Let an AI decide pass or fail

    Only the deterministic engine marks a rule broken or a fix verified.

  • Execute AI-generated code

    Rules go through a safe expression evaluator and actions are declarative HTTP templates. Model output is never run with eval or exec.

  • Change your code without your approval

    Only the Surgeon edits, only in a workspace copy, only the approved files; any other change is reverted. --auto skips the questions, but the fix still lands on its own branch for review.

  • Push to your default branch

    Fixes go to a rook/fix-<id> branch; for a GitHub repo they arrive as a pull request from it.

  • Call anything but your sandboxed app

    The engine only sends requests to the sandbox's host and port, follows no redirects elsewhere, and stops at a 10 s timeout and a 1 MB response cap.

  • Hand your secrets to the app or the logs

    The sandbox gets none of Roook's environment, and a redaction filter scrubs keys and tokens from events and logs.

  • Run arbitrary repos for guests

    On the hosted site, guests run only allowlisted example repos, pinned by commit SHA.

Honest scope

Where Roook is today

Roook is in early access. Here is exactly what works today, and what doesn't yet.

  • No paid plans, no billing, no team accounts and no SSO.
  • Guest runs on the hosted site offer two example repos, shop-app (Node.js) and minishop (Python), with recorded IBM Bob answers labelled "recorded". Guests get 3 runs a day.
  • Hosted runs of your own repos are turned off on the hosted server for now. Run your own repos with the CLI on your machine.
  • HTTP APIs only: no libraries, pure frontends, mobile apps or ML notebooks.
  • Not on PyPI yet: install from GitHub. Live runs need Docker and your own IBM Bob key.
  • In the web app, editing a single rule, replaying a counterexample and downloading the test are not built yet.

FAQ

Questions

Does an AI decide whether my code is broken?

No. Bob agents read the code, propose rules and write fixes, but only the deterministic engine marks a rule broken (by running the sequence on your app) or a fix verified (by its four checks).

Which languages does it work with?

Any backend with an HTTP API, in any language. The example apps are Node.js, Python (FastAPI) and Go. Libraries, pure frontends, mobile apps and ML notebooks are out of scope.

Do I need an account?

Not for trying Roook on the hosted site, or for running the CLI on a folder on your machine. Signing in with Google is needed to work with your GitHub repos, from the web app or the CLI.

Will Roook change my code?

Only after you approve. The Surgeon edits a workspace copy, only in the approved files. The fix goes to a rook/fix-* branch (a pull request for a GitHub repo), never to your default branch.

Is my code sent to an AI?

In live runs, repo content and run data go to IBM Bob as prompts. Guest runs on the hosted site use recorded Bob answers. Bob is the only AI in Roook.

Who makes Roook?

Aayush Kumar, an individual developer in India. Roook is an early-access, open-source project under the MIT licence, built on IBM Bob.

What does it cost?

Hosted plans are not offered or priced yet. Trying Roook on this site is free and needs no account. The CLI is free and open source under the MIT licence; live runs need Docker and your own IBM Bob key.

See it break, then see it fixed

Try Roook on the hosted site in your browser, or install the CLI and point it at your own backend.

Install the CLI (Python 3.12+, Docker, IBM Bob Shell)
uv tool install git+https://github.com/tony19053000/rook

Read the security page

Roook · find the smallest sequence that breaks your software