---
title: "Run doctor"
label: "Run doctor"
description: "Use SDK diagnostics to verify configuration, live reads, routes, SEO, and optional write probes."
publishedAt: 2026-07-10
updatedAt: 2026-09-27
order: 5
status: "published"
---

Run doctor after the application is wired and again against the deployed environment. It checks more than TypeScript can: board resolution, live API reads, route output, and production artifacts.

## Configure the target

Doctor reads the board key used by the setup flow. The production API origin is built in:

```bash
export PUBLIC_CAVUNO_BOARD=pk_0123456789abcdef0123456789abcdef
```

Run the static and deployed read checks:

```bash
npx @cavuno/board doctor --frontend https://jobs.example.com
```

The command exits non-zero when any check fails. Skipped checks remain visible and are counted separately.

```text
@cavuno/board doctor
  ✓ [tier 1] env.api-url — valid URL
  ✓ [tier 1] static.board — publishable key resolves the board
  ✓ [tier 2] read.home — home renders
  ✓ [tier 2] read.jobs — listing renders with job detail links
  ✓ [tier 2] read.jsonld — JobPosting JSON-LD present
  ✓ [tier 2] read.boardIdentity — serving this board (jobs.example.com)
  ✓ [tier 2] read.sitemap — sitemap entries resolve
  ✓ [tier 2] read.robots — present
  ✓ [tier 2] read.adsTxt — ads.txt matches dashboard
  ✓ [tier 2] read.indexNow — indexnow-key.txt matches dashboard
  ✓ [tier 2] read.googleVerification — google-site-verification meta present
  ✓ [tier 2] read.oauthCallback — callback paths reach the hosted app

… passed, 0 failed, … skipped, … warned
```

Your totals depend on which optional tiers apply. Use the individual check statuses—not a copied total—as the release signal.

Set `PUBLIC_CAVUNO_API_URL` only when Cavuno supplied a non-production override. The exact tier-one roster also checks API/OpenAPI reachability and installed agent-skill freshness.

## Understand the tiers

- **Tier 1—static and configuration:** validates environment values, OpenAPI reachability, board resolution, installed SDK skills, and a source scan for cookie writes that bypass the SDK server cookie codec.
- **Tier 2—deployed reads:** fetches the home page, follows a real job-detail link, parses `JobPosting` JSON-LD, descends the sitemap, samples a sitemap URL, validates `robots.txt`, and checks `ads.txt` / IndexNow / Google site-verification against the board SEO payload.
- **Tier 3—sandbox writes:** registers and logs in a probe identity, checks the email boundary when operator credentials are available, applies to a job, and creates a job alert.

Tier two is skipped without `--frontend`. A skip means the behavior was not verified.

The tier-one cookie scan reads your own `src/` files only. Generated output is exempt—directories such as `src/paraglide` and `src/generated`, files named `*.gen.ts`, and any file whose opening comment marks it generated—because a finding in a file your build rewrites is not actionable.

## Use write probes only on the platform sandbox

```bash
npx @cavuno/board doctor \
  --frontend https://sandbox.example.com \
  --sandbox
```

Doctor refuses tier-three writes unless the resolved board context has `sandbox: true`. A normal tenant or merely test-named board cannot pass this gate. The probes intentionally leave records behind because the platform sandbox is reset separately.

The optional email-delivery check requires the platform operator’s `RESEND_API_KEY`. Without it, that single check skips loudly; do not add this credential to a customer frontend project.

## Diagnose a failure

Fix the first failing dependency before interpreting downstream skips. For example, an unresolved board makes read and write results meaningless; a missing job-detail link causes the JSON-LD probe to skip because there is no detail page to inspect. Keep the complete output with the release record, but redact environment secrets before sharing it.

## Production notes

- A green typecheck does not prove the board key resolves.
- Run read-only probes in release verification and after routing, DNS, or framework changes.
- Re-run `npx @cavuno/board setup` after package upgrades when doctor reports stale skills.
- Doctor verifies representative behavior, not every feature enabled on the board. Complete the production checklist afterward.

Continue with the [Production checklist](/docs/sdk/production/production-checklist).
