# Automated PR QA

Use Haystack to build, run, and exercise your application end-to-end on every pull request — automated QA in a cloud sandbox.

## The Problem

Unit tests pass and the diff looks fine, but nobody actually ran the app. Whole classes of bugs — broken flows, dead buttons, misconfigured routes, integration failures — only show up when something exercises the running application. Manual QA doesn't scale to agent-speed PR volume.

## How Haystack Solves It

- **Verification flows**: Haystack boots your app in a cloud sandbox on every PR and drives the flows you define — pages, interactions, API checks — and reports what actually happened.
- **Sandbox-ready config**: auth bypass/fixtures/tokens, mock data, and database strategies are all declarative in `.haystack.json`, so the sandbox sees a working app, not a login wall.
- **Results in the verdict**: verification results feed the PR's safe-to-merge verdict and show up as pass/fail evidence, not prose.

## Setup

In your coding CLI (Claude Code, Cursor, Codex), install the skills and run the guided setup:

```bash
npx -y @haystackeditor/cli@latest skills install
```

Then run `/setup-haystack` (configures build, dev server, flows, auth) and `/prepare-haystack` (adds test IDs). Full reference: [Verification Flow](/docs/verification-flow), [Authentication](/docs/authentication), [Fixtures](/docs/fixtures), [Database](/docs/database).

## Related

- [Catch bugs before merge](/use-cases/catch-bugs-before-merge)
- [Review AI-generated code](/use-cases/review-ai-generated-code)
