Preflight & Mission Control
Preflight is CodeMantis's per-project capability gate — it verifies every service, secret, and CLI tool your project needs before you build or run Self-Drive.
Mission Control's entry points are temporarily disabled in this build. The title-bar Rocket button, Cmd/Ctrl+Shift+G, and the command-palette entry are hidden in this release, so you can't currently open the Mission Control overlay from the UI. Preflight verification itself still runs under the hood — Self-Drive continues to consult it — and the feature may be re-enabled in a future release. The rest of this article describes Mission Control as it behaves when its entry points are available.
Overview
Preflight is CodeMantis's per-project capability gate. Before you start coding — and before Self-Drive begins an autonomous run — Preflight verifies that every service, secret, and CLI tool your project actually needs is in place. You work with it through two surfaces: the always-visible PreflightTray strip and the full-page Mission Control setup wizard.
What You See
Mission Control is reachable for any open project — you don't need a preflight.yaml to open it:
| Entry point | Action |
|---|---|
| Title-bar Rocket button | Click the rocket in the top-right toolbar (disabled until a project is open). |
| Keyboard | Cmd/Ctrl+Shift+G opens Mission Control for the active project. |
| PreflightTray | When the project has a preflight.yaml, click View Mission Control (or Fix now when paused). |
PreflightTray
A compact status strip pinned below the title bar, shown only when the project has a manifest. It has three states:
| State | Color | Summary | Click |
|---|---|---|---|
| Ready | Green | X / X ready | View Mission Control |
| Attention | Yellow | X / Y ready · N needs attention | View Mission Control |
| Paused | Red | <capability> needs attention — Self-Drive paused | Fix now |
If the project has no manifest, the tray is hidden and Mission Control shows an empty state explaining that a preflight.yaml is generated when you save a spec in SpecWriter.
Mission Control
A full-screen overlay with three parts:
- Summary band — the project name, an
X / Y readycount, and a Start Building button that enables once every required capability is satisfied. In this release, Start Building simply closes Mission Control so you can get to work; it does not itself launch Self-Drive. - Grouped capability list — the capabilities from your
preflight.yaml, bucketed into Already on your system, Quick installs, Accounts & keys, and Optional. Each row is a CapabilityCard showing the name, a required/optional badge, the current state (Ready / Needed / Checking), short manual guidance derived from the capability's verification (for example, "Set theSTRIPE_KEYenvironment variable"), a Re-check button, and — for optional or non-blocking capabilities — a Skip for now link. - Catalog — 13 capability recipes ship in the app bundle under
catalog/system/*andcatalog/services/*. They back the verification rules a generated manifest uses.
How to Get a preflight.yaml
A manifest is generated automatically when SpecWriter saves a spec (Phase 4.5): the configured LLM extracts the capability requirements, resolves them against the catalog, and writes preflight.yaml to the project root. You can also hand-write or hand-edit the file — it is re-read when you switch to the project. There is no other in-app generator yet.
Re-checking and Skipping Capabilities
Re-check a capability — click Re-check on any row. The Rust verification engine re-runs that capability's probe and the row updates to its new state. Follow the row's guidance to satisfy it manually first (set the env var, add the secret to Settings → AI Providers or your environment, install the tool), then Re-check.
Skip a capability — for optional or non-blocking capabilities, click Skip for now. This is persisted, so the capability stops counting against the gate and Self-Drive no longer pauses on it. Hard required-and-blocking capabilities cannot be skipped — you must actually satisfy them.
Planned, not in this release: a guided setup stepper (open-url / paste-and-verify a secret / confirm-install), automatic shell-command installers, the encrypted per-project secret box UI, first-open environment detection prompts, a one-click Re-verify all, catalog-driven setup-time estimates, and AI-generated long-tail catalog recipes. The components exist but are not wired into this build. Until then, set capabilities up manually and use Re-check.
The Verification Engine
Four built-in verification kinds back each capability's state:
| Kind | Behavior |
|---|---|
shell_command | Runs a small probe (e.g. git --version) and regex-matches stdout. |
env_var_present | Checks whether a named environment variable is set. |
secret_present | Looks up a key in the project's secret store or configured provider keys. |
api_probe | Calls the service's own auth endpoint with the stored secret to confirm it actually works. |
Self-Drive Integration
This is the load-bearing reason Preflight exists. Self-Drive applies two gates:
- Whole-project pre-run gate. When you start Self-Drive, it refuses to begin if any required and blocking capability is unsatisfied, and shows a toast: "N setup items need attention before Self-Drive can start. Open Mission Control to fix."
- Per-session gate. Each guide session can declare the capabilities it
requires. Right before that session's build prompt is sent, Self-Drive verifies those capabilities. If one is missing, the run pauses on acapability-missingblocker instead of dispatching the prompt — nothing is executed. The PreflightTray turns red (Fix now) and a mid-run pause modal explains which session and which capability stalled, with a button that jumps straight to Mission Control. Set the capability up (or Skip it, if it's skippable) and click Resume to continue from that session.
A skipped capability is treated as satisfied by both gates.
States
| State | What you see |
|---|---|
| Ready (all satisfied) | Tray green; Start Building enabled. |
| Attention (some missing) | Tray yellow. |
| Checking | Per-row spinner while a Re-check probe runs. |
| Mid-run paused | Tray red; the pause modal is open. Click Fix now (or the tray) to open Mission Control, then Resume. |
| No manifest | Tray hidden; Mission Control shows the empty state pointing you to SpecWriter. |
Configuration
- Auto-generation on spec save (Phase 4.5). When SpecWriter saves a spec, it extracts capability requirements, resolves them against the catalog, and writes
preflight.yaml.system.*references become env/shell checks; service references become secret checks. - Settings → Self-Drive → Confirm capabilities (
selfDriveConfirmCapabilities, default on). Controls whether SpecWriter's live-fire handshake is required before a spec write. This is independent of Preflight verification itself.
Tips
- Open Mission Control any time with
Cmd/Ctrl+Shift+Gor the title-bar rocket — even on a project that has no manifest yet (you'll get a pointer to SpecWriter). - When the tray is green, Self-Drive has a clean runway. Yellow means expect a pre-run pause; red means a run is already paused on a missing capability.
- After you satisfy a capability outside CodeMantis (add a key, install a tool), come back and click Re-check rather than restarting — the row updates in place.
Related Articles
- Self-Drive: Autonomous Implementation — The autonomous runner that Preflight gates before and during a run
- MCP Servers — Connect the external services and secrets your capabilities verify
- Project Templates — Per-project setup that pairs with Preflight's capability gate
- Settings Reference — All Self-Drive and capability-confirmation options