# Verification Flow

Set up automated PR verification in cloud sandboxes.

## Overview

Verification Flow builds, runs, and tests your code automatically on every PR. For web apps, it opens the result in a browser. For everything else, it runs tests.

**PRO Feature**: Requires a Pro subscription for cloud sandboxes.

## Quick Start

Run in your coding CLI (Claude Code, Codex, Cursor):

```
/setup-haystack
```

This analyzes your project and guides you through setup.

## Install Haystack

### Step 1: Install Skills

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

### Step 2: Run Setup

In your coding CLI:

```
/setup-haystack
```

Alternative (no AI):

```bash
npx -y @haystackeditor/cli@latest init
```

## Prepare Your Codebase

Run to add test IDs and aria-labels:

```
/prepare-haystack
```

## Create Metadata

The setup creates `.haystack.json` with:
- Build commands
- Dev server configuration
- Verification flows (pages to test)
- Auth configuration

## Push & Activate

```bash
git add .haystack.json
git commit -m "Add Haystack verification config"
git push
```

## Additional Skills

| Command | Purpose |
|---------|---------|
| `/setup-haystack` | Master setup - diagnoses and routes to sub-skills |
| `/prepare-haystack` | Add aria-labels and data-testid attributes |
| `/setup-haystack-secrets` | Configure API keys and secrets |

## Automatic Verification

With the GitHub App installed, every PR automatically:
- Creates a Haystack Review
- Runs verification flows
- Posts a comment when done
