Documentation Get started / Your first mission

Site

Docs Get started

Your first mission

About 15 minutes from an empty repository to a verified, scoped change. Every step has a headless variant for CI and IDE agents. Use a throwaway branch if the repository is not empty.

The steps

#GoalInteractiveHeadless
1Install the CLInpm install -g @jeger-ai/opengantrynpx @jeger-ai/opengantry --version
2Scaffoldgantry init --tutorialgantry init --yes --no-ci
3Planner identitygantry planner set "$(git config user.email)"same (needs git config user.email)
4Health checkgantry doctorgantry doctor --json, exit 0
5Legislategantry legislate "First change" --msn MSN-0001 --skill-key logic --gate-command "npm test"same, plus --yes
6Planner commitReview the YAML, then git commit -m "[MSN-0001] legislate mission"same
7Executor enveval "$(gantry runtime env --mission .gitagent/missions/MSN-0001.*.yaml)"gantry runtime env --mission … --json
8Make the changeEdit inside the mission’s tmvc_rootsgantry runtime exec --mission … -- <agent command>, so the agent runs inside the process boundary
9Record evidenceAppend the gate output as a unique line to EXECUTOR_LOG.mdsame
10Verifygantry verify --mission …gantry verify --mission … --json
11Auditgit log --grep='MSN-0001' --onelinesame

Use the mission id and file name that step 5 wrote.

The same graph, day to day

# 1. The Planner reviews the mission before any executor runs
gantry legislate "Fix login spinner" --msn MSN-0001 --skill-key ui --gate-command "npm test"
git add .gitagent/missions/MSN-0001.<slug>.yaml
git commit -m "[MSN-0001] legislate mission"

# 2. Pin the mission and load the executor environment
gantry mission pin .gitagent/missions/MSN-0001.<slug>.yaml
eval "$(gantry runtime env)"

# 3. Verify and audit
gantry verify --fix
gantry verify --json | jq -r '.error_code // "passed"'
git log --grep='MSN-0001' --oneline
gantry doctor

gantry legislate --from-intent "<story>" proposes the scope from the repository and asks you to approve it (Missions).

Pinning is optional but saves typing: gantry mission pin <file> makes verify and runtime env default to that mission, gantry mission pin with no argument shows the pin, and gantry mission unpin clears it.

What success looks like

  • gantry verify exits 0, with the gate and every trace row PASS.
  • git log --grep='MSN-' shows the legislation commit from an allowlisted Planner email.
  • gantry mission pin with no argument prints the pinned mission.

When a step fails

Capture what happened. It is the most useful adoption feedback there is:

step: <number>
expected: <what should happen>
actual: <what happened>
error_code: <GXT_* from --json, if any>

Look the code up in Troubleshooting, then file an issue or add it to your team runbook.

Compare it yourself

The repository ships a contrast benchmark: an improvised agent orchestrator script next to the same task under OpenGantry. Clone the repository, run npm ci && npm run build, then npm run examples:benchmark (-- --json for machine output). The specimens live in examples/contrast-agent-script/ and examples/gantry-minimal/. The raw script compresses common anti-patterns into one file; most teams do not ship a monolithic orchestrator, but without a Git-native protocol, structure and auditability are improvised.

Next, wire your agent.