> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diffraction.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Run locally

> Review a trusted checkout with the local Codex and Playwright harness.

## Prepare Diffraction

Use Node.js 24.x, pnpm 11, an authenticated Codex CLI, and GitHub CLI authentication
for PR lookup. From the Diffraction checkout:

```bash Prepare the workspace theme={"theme":"css-variables"}
pnpm install --frozen-lockfile
pnpm exec playwright install chromium firefox
pnpm dev
```

The dashboard runs at `http://localhost:3000`. Local dashboard access requires
WorkOS authentication. Contributors need access to the configured staging
workspace and must follow the [repository's local authentication setup](https://github.com/jstEagle/Diffraction/blob/main/README.md#local-development).
Credentials go in the ignored `web/.env.development.local`; public identity
configuration remains in the auth slice's versioned config.

## Review a pull request

Prepare a trusted application checkout containing
[diffraction.yml](/docs/site/configuration). For PR mode, that checkout must be
clean and match the pull request's exact head SHA.

In another terminal, replace the example path and PR number:

```bash Run a local review theme={"theme":"css-variables"}
pnpm local:review -- --repo ../your-web-app --pr 1
```

Open `http://localhost:3000/reviews` to follow real progress, then inspect target
recordings, screenshots, traces, and findings. Runs are stored under
`.diffraction/local-reviews/`, which is ignored by Git.

An exit code of `1` can mean a recorded flow failed or findings were found. Inspect
the run evidence and command output before treating it as a tool failure.

## Local execution boundaries

Local execution is for trusted checkouts. It runs application commands on your
machine and does not provide the production sandbox boundary for hostile PR code.

This mode uses Codex planning and deterministic analysis. It does not call
OpenRouter, perform Stagehand exploration or multimodal analysis, or publish
GitHub results. Local artifact routes are limited to loopback development access.

To preview this documentation site separately, run `pnpm docs:dev` from the
Diffraction root and open `http://localhost:3001`.
