Block architectural drift before it merges
Agents shortcut through private modules, smuggle forbidden SDKs into core layers, and widen public surface area you never approved. The built-in code adapter turns your repo graph into binary perimeter rules — `gantry arch check` fails closed with offending_file, line, and resolution_hint.
- Forbid `src/cli/**` from importing `src/server/internal/**`
- Block `@aws-sdk/*` outside your infrastructure layer
- Pin a mission to `src/features/checkout/**` — nothing else moves
Stop off-brand copy from shipping
Docs, HTML, and release notes are attack surface. The content adapter applies forbid/require regex across your publishing tree — deterministic, byte-identical reruns, no statistical guessing that flips when unrelated files change.
- Forbid unsubstantiated health claims in `content/**`
- Require FDA disclaimer blocks on regulated product pages
- Reject agent drafts that drop your trademark or legal footer
Wire infra policy into the same verify contract
Terraform drift, K8s policy violations, and IaC hallucinations merge like code — unless you gate them. Point missions at `infra/**`, run `terraform validate` or your policy CLI as `gate_command`, and ship structured `findings[]` to the agent bus.
- `gate_command: terraform validate` scoped to `infra/terraform/**`
- Block agent edits to `k8s/production/**` without infra MSN pin
- Pair OPA or `conftest` output with trace quotes for audit replay
Your CI gates — now readable by agents
You already run tests and linters in CI. OpenGantry does not replace them — it scopes the mission, runs the same `gate_command` locally before commit, and returns structured `findings[]` so agents retry against a stable envelope instead of stderr soup. Structured producers fill `offending_file` and line; generic gates emit a coarse row plus `gate_log_path` on the context-feed.
- `gate_command: npm test` on a mission pinned to `src/features/**`
- `gate_command: npm run lint && npm run typecheck` before merge
- Trace verbatim PASS lines from the test gate in `EXECUTOR_LOG.md`
Block secrets and policy violations at the gate
Agents paste API keys, bump vulnerable deps, and bypass security review when nothing fails closed. Hang secret scanners and dependency policy on `gate_command` — same scope, trace, and structured verdict as every other domain.
- `gate_command: gitleaks detect` before any agent commit lands
- Fail missions that touch `secrets/**` without platform-security MSN
- `npm audit --audit-level=high` as gate on dependency bump missions
Lock API contracts before agents ship breaking changes
OpenAPI drift and broken client contracts are architectural failures. Scope missions to `api/**` or `contracts/**`, run schema diff or contract tests as `gate_command`, and reject merges when the public surface moves without approval.
- `gate_command: npm run openapi:diff` on public API MSNs
- Forbid handler edits outside `src/routes/public/**` during refactors
- Contract tests as gate before agent-generated SDK changes merge