Skip to main content

Gates reference

Gates are the truth source for "done" in Midcore. They are defined in `.maestro/gates.yaml` and run via `midcore gates run`. Each gate produces a result (pass, fail, warn) and evidence is recorded in the evidence ledger.

Quick reference

In plain language, gates typically do: lint (code style and quality), test (unit and integration tests), contract check (API and schema validation), security (secrets, RBAC, tenancy), and build & deploy readiness (build integrity, rollback, rehearsal). Your `gates.yaml` defines the exact commands and order.

Concepts

  • Gate — A single check (e.g. lint, tests, contract validation). Defined by an ID and a command or script.
  • Evidence ledger — Append-only log of gate runs (when, scope, command hash, result). Used for audit and compliance.
  • Delivery tier — Your intent.yaml tier (prototype, pilot, production) can affect which gates are required. Stricter tiers require more gates to pass.

Running gates

bash
# Run all gates defined for the current project
midcore gates run

# Run a single gate by ID (see your gates.yaml for IDs)
midcore gates run --gate <gate-id>

Gates typically run in dependency order. If a required gate fails, downstream gates may be skipped. Check your project’s `.maestro/gates.yaml` for the exact list and IDs.

Gate categories

Gates are often grouped by purpose. Common categories (names may vary in your repo):

CategoryPurpose
IntakeValidate intent and scope before work starts
ContractAPI and schema contracts are defined and met
SecuritySecrets, RBAC, and security invariants
TenancyNo cross-tenant data access
Capability passportProof that a capability ships with contracts, tests, and evidence
Build & deployBuild integrity, rollback, rehearsal

Your project

The exact gate IDs and commands are defined in your repository’s `.maestro/gates.yaml`. Open that file to see which gates apply and how to run them individually.

Evidence

Each gate run can write an evidence entry: gate ID, timestamp, scope, command hash, and result. The ledger is append-only. Use it to prove that gates passed at release time for compliance and audit. See Gates & evidence for the concept overview.

Gates & evidence · gates.yaml · CLI reference · intent.yaml