Restores while it runs
About once a second, cage puts back changes to CI configs, .env / .env.*, .git/config, git hooks and manifest forbidden_zones. Lockfile changes are listed and kept.
OpenGantry is a local CLI that scopes agent edits before they touch your repo. One verify contract for agentic graphs and IDE sessions — adapter rules differ, outcomes are always structured JSON. It is not Gantry.io and it does not chat on your behalf.
No manifest, no gantry init. Start your agent inside gantry cage exactly as you normally would; it restores a built-in protected set while the session runs and once more at exit.
About once a second, cage puts back changes to CI configs, .env / .env.*, .git/config, git hooks and manifest forbidden_zones. Lockfile changes are listed and kept.
Inside the session, git push is refused when outgoing commits touch protected paths, and the agent sees why. Nothing is written to your repo.
An agent that rewrites the same protected file after three restores is terminated with everything it spawned. Exit 4; tune with --contest-limit.
.cage.yaml adds paths and globs (migrations, IaC, key files). It can only add protection, protects itself, and fails closed on anything else. gantry cage suggest proposes entries for review.
SIGTERM or SIGHUP on cage terminates the agent's process tree, then restores. After a kill -9, the next cage run recovers from a hash-verified journal before it starts.
Quiet while the agent works: a bell per restore, events in a temp-dir log. At exit one summary, exit 3 if anything was restored, or --json for a digest-only report.
npx @jeger-ai/opengantry-cage -- claude gantry cage -- aider gantry cage suggest --write
Cage restores; it does not block. A change can be committed in the second before the next
check, git push --no-verify skips the push guard, and a committed change stays in
local history. Reads, network calls and writes outside the protected set are not seen. For
scope enforced on every write, use missions.
Scan what is already there, turn findings into enforceable rules, legislate each change, then prove pass at every gate. Discovery proposes — blueprint, perimeter, missions, and verify enforce.
Scan the repo and collect file:line evidence — nothing becomes law yet.
The scanner writes .gitagent/discovery-proposal.json with concrete anchors (imports, patterns, layer hints). Review or accept before blueprint turns findings into enforceable rules.
gantry init --discover --domain code|contentgantry init --discover --domain code gantry blueprint --domain code --yes
Composite scenes from how OpenGantry is used.
Staff engineer
I pinned MSN-0042 and let the session run. It tried to rewrite .gitagent/foreman/MANIFEST.json. Runtime failed closed. findings[] named the path. The next hop stayed in src/cli/.
gantry pin · TMVC deny
Tech lead
I will not rubber-stamp a chat transcript. The executor appends PASS rows to EXECUTOR_LOG.md. Those rows have to quote the gate output. gantry verify maps every claim. A missing quote fails the mission.
SOD · verbatim PASS quotes
Docs lead
The content adapter scopes src/content/. The agent drafted a changelog that sounded fine and failed the docs build. That build is the gate_command. Nothing publishes until verify is green.
content domain · docs build gate
Security lead
Review is a mission YAML, a quote in EXECUTOR_LOG.md, and an optional attest file under .gitagent/history/receipts/. I keep the verify JSON. I do not keep a screenshot of a model saying it was careful.
attest receipt · verify JSON
Legislate, pin, hit a forbidden zone, retry inside TMVC, then prove it with verify JSON.
{"ok": true,"trace": "mapped"}
One verify graph. Pluggable rules. Built-in code and content adapters
ship today; CI, security, infra, API contracts, and other stacks hang on the same mission
YAML plus gate_command — scope, trace, and structured pass/fail never change.
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.
src/cli/** from importing src/server/internal/**@aws-sdk/* outside your infrastructure layersrc/features/checkout/** — nothing else movesDocs, 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.
content/**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/**k8s/production/** without infra MSN pinconftest output with trace quotes for audit replayYou 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 mergeEXECUTOR_LOG.mdAgents 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 landssecrets/** without platform-security MSNnpm audit --audit-level=high as gate on dependency bump missionsOpenAPI 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 MSNssrc/routes/public/** during refactorsPass or fail, you get machine-readable output instead of log scraping. Agents can retry against findings[] without dumping broken code into your lap.
{
"status": "passed",
"envelope_schema_version": 3,
"phase": "full",
"msn_id": "MSN-0042",
"mission_file_path": ".gitagent/missions/MSN-0042.ship-feature.yaml"
} {
"envelope_schema_version": 3,
"failed_gate": "arch",
"offending_file": "content/ad-bad.md",
"line": 3,
"severity": "error",
"resolution_hint": "Import crosses layer boundary per TARGET_ARCHITECTURE.yaml"
}
After verify, gantry report is a read-only localhost triage view over the same snapshot — no re-running gates, no cloud upload.
gantry report gantry report --last gantry report --json
Execution stays on your machine (the spoke): missions, TMVC, gantry cage, org policy, ledger, and gantry verify run locally with no cloud required. A hub remains optional for digest-only aggregation — receipts and policy hashes, never source trees or gate stdout bodies.
Cold-path gantry::verify and hot-path gantry::middleware on buses like iii.dev — multi-worker graphs with promote-class gates. See examples/iii-integration/ on GitHub.
gantry pin [file], gantry unpin — active scope without stale branch drift.
flight_telemetry.body_mode: hash_only in .gitagent/config.json (default).
gantry attest, gantry verify --receipt — digest-only outcomes under .gitagent/history/receipts/.
gantry doctor --policy <expected-digests.json> offline against MANIFEST and config digests.
gantry policy pull pins a signed org ORG-POLICY.yaml. Merge is a floor — never loosens local law. Doctor/verify stay offline (ADR-0042).
Digest-only orphan chain. gantry ledger verify / export --format soc2-pack. Unsigned entries are checksums, not proofs (ADR-0043).
Cross-repo mission gates from fetched ledger refs. gantry deps fetch then offline deps check / release check (ADR-0044).
Deterministic gates cannot read your performance intent from docs. Ship PERFORMANCE.md +
PERFORMANCE_RUBRIC.md, wire a BYO llm_verifiers command, run
gantry scan, then gantry verify.
The judge checks structural strategies only — pooling, non-blocking I/O, memoization — never
guessed millisecond latency. Verdicts are advisory: they appear as warnings and structured
findings[] on PASS and never flip a failing gate to PASS.
See the
performance judge example
on GitHub. MCP tools (gxt_draft_legislation, gxt_verify,
gxt_pin_mission) work with any MCP-capable harness — see the
integration guide.
gantry contract preflight and MCP gxt_preflight_contract suggest a
skill_key and tmvc_roots before propose. They do not seal a contract.
The classifier reads every skill from MANIFEST.json — description and roots — with
no hard-coded skill list.
Jev is optional and fail-open. The fetch limit is 2000ms. A timeout, or any non-OK HTTP status
including 500, falls back to the offline heuristic and does not crash the agent loop. A missing
TYPESAFE_API_KEY is an explicit error before any fetch.
See the Jev preflight example and the capabilities doc. CI export flags are in CI / CD.