Skip to content

Contract Preflight

Contract Preflight helps you answer a narrow question quickly: if a change touched a contract-shaped file, which checks are the minimum sensible replay?

The feature uses an embedded registry of repo surfaces such as schema.json, the generated config reference, the tool-descriptor manifest, and the root Taskfile.yaml. It matches a bounded path set against that registry and returns an ordered command matrix.

Maturity: Shared operator and agent-native read surface. Use it when you want a compact replay plan for contract files, not a broad substitute for CI.

The dry report contains:

  • normalized repo-relative paths
  • matched registry surfaces
  • matched paths per surface
  • suggested commands in deterministic order
  • optional capture metadata when capture rules are enabled

The same dry-report model powers:

  • bmo preflight repo
  • /preflight in the TUI
  • contract_preflight_report
  • bmo_contract_preflight_report

Only the CLI can execute the suggested commands:

Terminal window
bmo preflight repo --path schema.json --run

The TUI, agent tool, and MCP tool are read-only. They do not execute registry commands and they do not write workstream snapshots.

Inspect the current diff:

Terminal window
bmo preflight repo

Inspect explicit paths:

Terminal window
bmo preflight repo --path schema.json
bmo preflight repo --path Taskfile.yaml --format=json

Persist the last result on a workstream:

Terminal window
bmo preflight repo --path schema.json --workstream <id>

The TUI exposes /preflight and /repo-preflight as dry-report views.

Two compact status lines are related but distinct:

  • Session hint is the session-scoped status-bar summary derived from current session file paths and read-file paths. In the TUI it appears as the compact R3: line.
  • Workstream preflight line is the persisted last_contract_preflight_* snapshot for the active workstream, rendered as WS preflight:.

Implementation details live in the implementation reference: contracts.md.