Basic is a conformance suite for agent chat apps. It lists the behaviors every chat app must keep, written as Gherkin, and it comes with a runner that checks those behaviors in a real browser against a deployed app.
BASE=https://your.app node run.mjs --floor --app=<name>The command exits 0 when every floor scenario either passes or has a written reason why it does not apply.
| Path | What it is |
|---|---|
contract/chat.feature |
The contract: 12 rules and 81 scenarios. The 66 tagged @must are the floor. |
run.mjs |
Runs the scenarios in Chromium against BASE and writes reports/<app>.md. |
adapters/<app>.mjs |
Describes how to drive one app. There is one check for each scenario. |
reports/ |
The most recent result for each app. kernel-*.md files come from static source probes (kernel/), not from a browser. |
app/ |
basic-reference, the reference app that should pass the whole contract. It runs on Workers at basic.customer0.dev. app/gate.mjs is its production gate, and .github/workflows/gate.yml runs that gate. |
domain/ |
Rules 3 and 4 written as an @alchemy.run/domain model, with in-memory stories and a mutation check. See domain/RESULTS.md. |
kernel/ |
Static probes for server-side invariants T1 to T9 (owner, Durable Object state, payer, secrets, origin). |
diagrams/ |
SVG maps of the contract, made by diagram.mjs. |
POST.md |
A draft post that explains where each scenario comes from. |
BASE=https://your.app node run.mjs --floor --app=skin
BASE=https://your.app node run.mjs --app=reference --rule="conversation list"--floorruns only the@mustscenarios.--rule=<words>runs only the rules whose names contain those words. It prints the results and leaves the report unchanged.--app=<name>picks whichadapters/<name>.mjsto use. Without it, the runner usesskin.
On the office network, an interstitial page intercepts *.customer0.dev, so every check against production fails at sign-in. You can either let the GitHub gate workflow run the checks, or run the reference app locally:
cd app
npm ci
npm run build
npx wrangler dev --port 8841Then use BASE=http://localhost:8841.
Each scenario in an adapter has one of these values:
- A function that drives the page. It passes when it does not throw.
- An
n/areason string. The runner reports it as n/a, with that reason. - A
MISSING: <why>string. The runner counts it as a fail. Use it for checks that have not been written yet.
A check that returns SKIPPED: <reason> is reported as n/a, with that reason.
| App | Last run | Scope | Result |
|---|---|---|---|
| skin | 2026-10-14 | floor | 37 pass, 0 fail, 5 n/a |
| myax | 2026-10-19 | floor | 46 pass, 0 fail, 10 n/a |
| coil | 2026-10-18 | all | 30 pass, 12 fail, 28 n/a |
| reference | 2026-10-30 | all | 1 pass, 69 fail (run from the office network; see Run) |
| lab | 2026-11-19 | floor | 0 pass, 66 fail (adapter not written yet) |
porch has an adapter but no report yet. Porch mirrors Pi sessions and does not run turns itself, so many of its checks are n/a.
domain/ checks Rules 3 and 4 without a browser. It is a standalone npm package:
cd domain
npm test
npm run typecheck
node scripts/mutate.mjsnpm testruns 18 tests.node scripts/mutate.mjsapplies 21 deliberate breaks, one at a time. Each break must fail at least one test.
domain/src/rules/chatStatus.ts is plain TypeScript. The model's ChatList view and the reference app's sidebar dot both import it, so the two cannot disagree about whether a chat is working, idle, failed or needs you.
node diagram.mjs turns the Gherkin into SVG:
diagrams/contract.svgshows every rule and scenario on one page, coloured by tag.diagrams/rules/NN-<rule>.svghas one page per rule. Each scenario is a row: Given, When, Then.node diagram.mjs --app=skincolours the same map using the results inreports/skin.md.
- Scroll follows the reader, never the stream
- The composer keeps what I type
- A running turn is visible, timed, and stoppable
- The conversation list tells me what needs me
- Messages have actions where I need them
- The first paint is the real page
- Connection state is truthful
- Notices are placed in time, not pinned on top
- Side panels fit the reader's screen
- Signing in and out is plain and complete
- The page works for everyone
- The first screen invites a first message