# Worktrees and browser verification

Each concurrent thread owns its branch, worktree, installed dependencies, outputs and preview tab. Shared pnpm/browser download stores are safe; mutable build/run directories and browser profiles are not shared between worktrees.

## Set up and serve

```sh
pnpm worktree:setup
pnpm workflow:context
pnpm dev:examples
```

The owned server allocates its port and prints the real URL, source-identity endpoint and run directory. Use that URL in the thread's preview tab. Do not guess a port or point at a different checkout. [Canonical worktree guidance](../../../contributing/worktrees.md) covers networking, command locks and supported recovery.

If preview runs remotely, terminal loopback may not be reachable. Use the explicitly configured accessible interface and record connectivity failures honestly. A host setting does not create a tunnel or firewall rule.

## Observe the correct revision

In T3, first inspect preview status and open a preview if needed. Own a tab and target its ID explicitly. Compare `/__snagbadger/identity` and the HTML `snagbadger-source` meta value with the owned run's source before counting evidence.

Exercise the affected behavior, relevant error states, keyboard controls and desktop/mobile layouts. Keep screenshots/recordings in the source-bound run directory and record observations in `preview.json`. The [reliability contract](../../../agents/reliability.md) supplies the exact fields and validation rules.

T3 review tabs sharing an origin also share storage. They are review surfaces, not proof of the product runtime's required isolated browser context per attempt. [Runtime requirements](../reference/agent-skills-and-runtime-requirements.md) covers that different workflow.

## Verify and hand off

Stop the server before mutation-heavy commands or `pnpm verify`. Commit clean final source, rerun the complete gate and observed review, then attach acceptance-to-evidence mapping and validated handoff. Every AI-assisted PR requires inline source-bound screenshot evidence in its description before readiness.

Preserve pending review/merge states in the issue tracker and affected maps. A pushed branch or passing screenshot does not authorize acceptance, merge or publication.
