The preflight command runs static manifest validation (schema resolution, $ref chains, skill lints, duplicate IDs) and — when --instance-checks is passed — extends with live or cached instance validators (action types exist, subflow publish invariants hold, referenced roles/tables/scopes are present). Use --offline to answer instance checks from the nearest sn pull cache instead of hitting the network.
preflight
Static + optional instance-aware validation before execute.
sn preflight <manifest.ts> [--target <name>] [--profile <name>] [--instance-checks] [--offline] [--no-collision-check] [--json] Validate a manifest before `sn execute`.
Arguments
| Name | Required | Description |
|---|---|---|
| manifest.ts | Yes | Path to the manifest. |
Flags
| Flag | Default | Description |
|---|---|---|
| --target <name> | — | Use this instance registry key for instance-aware checks and registry-scoped profile validation. |
| --profile <name> | — | Credential profile used when live instance checks are enabled. |
| --instance-checks | — | Also run live instance validators (action_type existence, subflow invariants, etc.). |
| --offline | — | Answer instance checks from the `.sn-pulls/` cache written by `sn pull`. Implies `--instance-checks`. Refuses when the cache is missing or older than 7 days. |
| --no-collision-check | — | Suppress cross-manifest collision warnings (on by default). |
| --json | — | Emit the result payload as JSON; no human-readable output. |
Examples
sn preflight manifests/payroll/manifest.ts --instance-checks✓ [sn-flow] action_type 'x_acme.send_slack' exists
✓ Preflight clean — 14 step(s) validated (static + instance)
| Exit code | Meaning |
|---|---|
| 0 | Manifest is clean (static + any requested instance checks) |
| 1 | Static or instance validation failed, or the manifest path is missing |
| 2 | `--offline` requested but the pull cache is missing or stale (>7 days) |
Preflight is wired into sn execute as a default-on TTY gate. Pass --no-preflight on execute to skip it — but every manifest is better with a clean preflight before it touches the instance.