OpenGantry is a local CLI that negotiates scope before agents touch your repo. Same loop for TypeScript imports and markdown copy. It is not Gantry.io and it does not chat on your behalf.
How the pieces fit
You scan what is already there, turn the findings into a contract, run work inside that contract, then prove pass with gantry verify. Discovery proposes. Blueprint commits rules. Perimeter and missions enforce them. Verify returns pass or structured findings.
Bootstrap a repo
npm install -g @jeger-ai/opengantry
gantry init --tutorialYou get .gitagent/, hooks, a manifest, and a walkthrough for the first mission.
Discover conventions
gantry init --discover --domain code
gantry init --discover --domain contentThe scanner writes .gitagent/discovery-proposal.json with file:line evidence. Nothing becomes law until you accept it or run blueprint.
Blueprint the contract
gantry blueprint --domain content --yesThat produces ARCHITECTURE.md, TARGET_ARCHITECTURE.yaml, and .gitagent/verification_plan.json. The verification plan lists gate commands and any skills you still need to wire up.
Perimeter checks
gantry arch check
gantry perimeter checkCode domains get import and layer rules. Content domains get forbid_pattern and require_pattern regex. Failures name the file and line.
Mission and verify
gantry legislate "add feature X" --msn MSN-0042 --skill-key gantry
eval "$(gantry runtime env --mission .gitagent/missions/MSN-0042.yaml)"
gantry verify --mission .gitagent/missions/MSN-0042.yaml --jsonOn failure you get machine-readable output instead of log scraping:
{
"failed_gate": "arch",
"offending_file": "content/ad-bad.md",
"line": 3,
"severity": "error",
"resolution_hint": "..."
}Domain adapters
| Domain | Corpus | Enforcement |
|---|---|---|
code | .ts, .js, … | Import layers, forbidden specifiers |
content | .md, .html, .txt, … | Regex forbid/require patterns |
List adapters with gantry domains.
Harness integration
MCP tools (gxt_draft_legislation, gxt_verify, gxt_pin_mission) work with any MCP-capable harness. Git hooks load the pinned mission and block unscoped writes to governed paths.
See the integration guide for Cursor, Claude Code, and other setups.