# The builder and tester contract and a red-then-green check (free sample)

> From Two-Agent Build and Test Loop for paid apps: the six rules that keep a coding agent from grading its own work (two sessions, the tester never edits code, the builder never touches tests or says passed, red first, a script runs the tests, sandbox only with owner yeses on paid apps), a story card, and a read-only Python check on your run's ledger, with a worked example and its expected output.

- URL: https://paperchasewebb.ai/bots/marketplace/items/builder-tester-contract-and-red-green-check-free-sample/
- Type: Bot template
- Category: Vibe coding
- By: PaperChaseWebb
- Works with: Claude Code, Codex, Grok Bot, Hermes (named in the listing); Plain .md plus one Python 3 script
- Price: Free USD
- Difficulty: Beginner
- Setup time: 15 min
- Time to result: About 15 minutes to save the files and run the check twice
- Format: Markdown (.md) file, builder-tester-contract-and-red-green-check-free-sample.md
- Version: 1.0, updated 2026-10-28
- License: Personal and commercial use.

## What you end up with

You can tell from the ledger whether your builder and tester stayed in their lanes and whether each test really failed before it passed.

## What you get

- The six builder and tester rules
- A sample story card
- proof_check.py with five checks
- A worked example: 5 findings, the corrected run, then 0

## Who it is for

Anyone running a coding agent on a real app who wants a second session doing the testing, and a quick way to see that the split held.

## Tools needed

- Grok Bot, Claude Code, Codex or Hermes: runs the builder and tester as two separate sessions; the tester never edits source, the builder never edits tests, and no session merges, releases or touches live keys
- Python 3: runs the preflight, the test runner and the read-only run check; standard library only
- You need: Python 3.8 or newer

Cost to run: Free.

## Sample prompt: Write the failing test first (Grok Bot, Claude Code, Codex, Hermes)

```
You are the tester. Write one story card and its test for this behavior: {behavior}. The test must fail on the current code for the reason in the behavior, not for a typo or import error.
Do not edit source. Log your test row, then hand the card and the failing test to the builder session.
```

The rules and the check are in the file.

## Free preview of builder-tester-contract-and-red-green-check-free-sample.md

````markdown
# Two-Agent Build and Test Loop, free sample: the builder and tester contract plus a red-then-green check

Version 1.0, 2026-10-28. By PaperChaseWebb. Works with Grok Bot, Claude Code, Codex and Hermes. Free. One Python 3 script, standard library only, tested on the worked example below.

This is the part of Two-Agent Build and Test Loop for paid apps (pp-two-agent-build-test-loop, $29) you can use today: the six rules that keep a coding agent from grading its own work, a story card, and proof_check.py, which reads a run's ledger and says whether the roles stayed apart and the test really went red before it went green. The full pack adds the runner that records every exit code itself, the revert proof, sandbox-only payment rules, a fifteen-check read-only audit, a seeded fixture, the four owner approval steps, twelve prompts and setup for all four harnesses.

## The six rules

1. **Two sessions, two jobs.** One agent builds. A different session tests and gives the verdict. Same model in two tabs is the minimum; a different harness or model for the tester is better.
2. **The tester never edits code.** It writes stories and tests and uses the app like a buyer would. If it can change source, it will "just fix" things and stop being a tester.
3. **The builder never touches tests and never says passed.** It changes source until the test passes and reports the files. If it thinks the test is wrong, it stops and says so.
4. **Red first.** The test runs and fails before the build. A 
````

## Worth knowing

- The sample has no runner, revert proof, payment checks or fixture; the full pack adds them with fifteen tested checks.
- On 2026-10-28 the worked example gave 5 findings, then 0 on the corrected run.

## Questions

**What is in the full pack?** run_test.py, loop_check.py with fifteen checks, card_check.py, a seeded fixture with fifteen planted faults, four owner approval steps, eleven paid-app stories, rules blocks, twelve prompts, harness notes and an install plan. $29.

## How to get it

Free sample. Download it directly at https://paperchasewebb.ai/bots/marketplace/items/builder-tester-contract-and-red-green-check-free-sample/, no signup.

Seller: PaperChaseWebb Inc., mgmt@paperchasewebb.com
