# haystack verify

Verify a change by running it in matched cloud environments, seeded into the states it can land in, and see which ones broke.

## How a run works

A run builds two universes per test case, one on the base revision and one on the head revision, from the same seeded starting point. The only difference between them is the change under review, so any difference in behaviour is attributable to it.

Results land on a page you can open, and every verdict is backed by the output the run captured.

## Starting a run

```bash
haystack verify  # what you are changing right now
haystack verify --base main --head HEAD  # a specific range of commits
haystack verify posthog/posthog-js#3191  # a pull request
```

Run it from inside your repository. With no arguments it verifies what you are changing. `--base` and `--head` pin the exact commits to compare, and a pull request reference verifies that PR instead.

The run starts, prints its id and results URL, and opens the results page in your browser. Pass `--no-open` to skip that.

| Option | Purpose |
|---|---|
| --repo <path> | Repository to analyze, when you are not running from inside it |
| --base <ref> / --head <ref> | Revisions to compare for a repository run |
| --intent-transcript <file> | Coding-agent transcript, used as evidence of what the change intended |
| --server <url> | Server URL. Default `http://127.0.0.1:3000`, or `HAYSTACK_VERIFY_SERVER` |
| --token <token> | Bearer token when the server requires auth, or `HAYSTACK_VERIFY_TOKEN` |
| --no-open | Do not open the results page |
| --json | Wait for the verdict and print the summary and findings as JSON |

## Next

- [Working with runs](/docs/runs)
- [Agents](/docs/agents)
