Git
Creates isolated worktrees, commits controller-owned changes, and pushes with a lease.
git --version
A visual field guide for version 0.2
Set up AgentMachinist, choose who writes the spec, approve the exact plan you read, and let your coding harness build behind a test gate.
AgentMachinist 0.2.0 is available on PyPI. Install it directly below. If machinist --version still prints 0.1.0, run uv tool upgrade agentmachinist.
Station 01 / lay out the tools
AgentMachinist coordinates software you already use. Get these four checks green before asking it to touch an issue.
Creates isolated worktrees, commits controller-owned changes, and pushes with a lease.
git --version
Reads issues, opens PRs, records approvals, and reuses your authenticated GitHub session.
gh auth status
Installs AgentMachinist and provides its locked Python environment.
uv --version
Choose Claude Code, OpenCode, Pi, or Codex. Log in before your first automated run.
claude --version
Station 02 / install the controller
Already installed an earlier version? Run uv tool upgrade agentmachinist instead.
$ uv tool install agentmachinist $ machinist --version machinist, version 0.2.0 $ cd ~/code/your-project
Station 03 / choose the spec dispatcher
For a first run, keep planning local. GitHub Actions is useful later, but it needs a provider secret and still hands implementation back to your local watcher.
machinist init. The default config already selects local.machinist.yaml.machinist doctor, then start machinist watch.github.spec_source: github-actions.machinist sync-workflows and commit the generated spec workflow.ANTHROPIC_API_KEY as a repository secret. The bundled CI path is Claude-specific.Station 04 / initialize the project
machinist init creates the file. Your job is to choose a harness, leave spec ownership explicit, and give implementation a real test gate.
# machinist.yaml version: 1 harness: name: claude-code command: null timeout_minutes: 30 spec_timeout_minutes: 10 github: repo: null spec_source: local labels: trigger: agent-task approved: "machinist:approved" poll_interval_seconds: 60 workspace: root: ~/.machinist/workspaces strategy: worktree cleanup: on_success branch_prefix: agent/ tests: command: uv run pytest
claude-code, opencode, pi, or codex. Local runs reuse its provider authentication.
local is simplest for a first run. Changing ownership requires machinist sync-workflows.
A null command skips the gate. Use the same command you trust before merging a human PR.
$ machinist init # edit machinist.yaml, then: $ machinist doctor PASS repository /Users/you/code/your-project PASS GitHub authentication gh auth is active PASS harness /path/to/claude PASS test gate uv run pytest PASS workflows managed workflows match config PASS Task Runs no failed or abandoned runs $ machinist sync-workflows --check Managed workflows match machinist.yaml.
Stations 05–08 / run one real issue
Use a small issue with a visible test. Your first run should teach the workflow, not test the outer limit of your model or repository.
Give the issue a clear title, acceptance criteria, and the agent-task label. “Add CSV export for filtered rows” is a first run. “Improve reporting” is not.
watch --once picks up eligible work and exits. spec 42 is the direct route. Either way, the result is a draft PR containing only the plan.
Read the spec first. Then run machinist approve 18 for PR #18, or comment exactly /machinist-execute. Approval is bound to the current commit; edits make it stale.
The watcher or machinist run 42 provisions the approved branch, asks the harness to implement, runs your test command, pushes with a lease, and marks the PR ready. You review and merge.
The shop-floor board
Run machinist status. The wording tells you who moves next. Scroll the board horizontally on a small screen.
awaiting specThe trigger exists. Local watch or the configured CI owner must write the plan.
awaiting approvalA draft spec is ready. Read it before authorizing implementation.
approval pendingThe label exists without trusted SHA evidence. Approve again.
approval staleThe branch changed after approval. Review and approve the new head.
approvedThe exact head can execute. Run the watcher or the issue directly.
in reviewImplementation reached the ready PR. You own review and merge.
Know the safety boundary
AgentMachinist keeps Git custody and detects ordinary harness violations, but the harness still runs as your operating-system user.
.machinist/ edits.When the machine stops
Failures are parked instead of retried forever. Expand the symptom that matches what you see.
Fix that prerequisite before running a task. Common causes are missing gh auth, a missing harness executable, or workflow drift.
machinist doctorThe label exists, but no trusted marker names the current SHA. Approve the PR again with the CLI or exact comment.
machinist approve <pr>The spec branch changed after approval. Read the new diff, then approve the current head. This is a safety stop, not a synchronization bug.
machinist approve <pr>Inspect the retained workspace and error first. Fix the cause, mark the phase retryable, then restart a long-running watcher.
machinist retry <issue> --phase executeThat is usually retained evidence from a failure. Inspect it before removal. Worktrees should be removed with Git, not by blindly deleting directories.
git worktree listNothing new is pushed by the controller. Open the retained workspace, reproduce the test command, and decide whether the spec, implementation, or test needs correction.
machinist statusPocket checklist
Check these off as you go. The guide remembers your checks in this browser.