deploy-previewlisted
Install: claude install-skill a-canary/arc-agents
# deploy-preview — Preview-URL Probe
Per ADR 0007, dev-quest's FOCUS pane wants to show a "Preview ready" badge for issues whose PR has a live deploy. We don't want to spawn a daemon for this — instead, this skill runs on a cron and probes GitHub for preview URLs.
## When to use
- Cron-scheduled, every ~5 minutes.
- One-shot: lists candidate issues, probes each, emits events, exits.
- Re-runnable: skips issues that already have a successful `deploy_preview` event.
## Contract
```
bun ~/repos/arc-agents/bin/deploy-preview.ts [--db <path>] [--limit N] [--dry] [--once]
```
Inputs (all optional):
| Flag | Default | Notes |
|---|---|---|
| `--db` | `~/vault/ledger.db` | path to ledger sqlite |
| `--limit` | `20` | max candidates per run |
| `--dry` | off | log what would be emitted but don't write |
| `--once` | (no-op) | reserved; the script is already one-shot |
Output: one JSON line per run.
```json
{"candidates":3,"emitted":2,"dry":false}
```
In `--dry` mode, also logs one JSON line per candidate:
```json
{"id":"feat-quest-pane-a1b2","would_emit":"provider: vercel\nurl: https://feature.vercel.app"}
```
## Candidate selection
A row is a candidate iff:
- `issues.pr_url IS NOT NULL`
- `issues.state NOT IN ('merged','cancelled')` — terminal rows are skipped (the preview is moot once merged, and we never want to keep probing dead PRs).
- No prior `issue_events` row exists where `kind='deploy_preview'` AND `payload_md LIKE 'provider:%'`. The `provider:%` filter is what