Skip to main content

AgentMachinist

AgentMachinist is a local-first, issue-to-reviewed-PR build pipeline for solo developers. It connects GitHub issues to Claude Code, OpenCode, Pi, or Codex, with a human-approved specification between planning and implementation.

issue + trigger label → spec commit → draft PR → SHA-bound approval
                    → implementation → test gate → ready PR → human merge

The controller—not the harness—owns commits, pushes, PR transitions, and task records. AgentMachinist never merges.

Current release: AgentMachinist 0.9.0 on PyPI.

Install

uv tool install agentmachinist

You also need git, an authenticated gh, and one supported harness executable (claude, opencode, pi, or codex). The core CLI is tested on macOS and Linux with Python 3.12–3.14. Managed background service commands are macOS-only; on Linux, schedule machinist watch --once with your existing service manager.

machinist update-check compares the installed release against PyPI and prints the upgrade command for how this copy was installed (uv tool, pipx, pip, or a source checkout). machinist doctor reports the same result as a diagnostic row. Set MACHINIST_NO_UPDATE_CHECK=1 to suppress both probes on offline or CI machines.

Upgrading the package is not always the whole upgrade. Managed workflows are projected files, so a workflow change only takes effect once you run machinist sync-workflows. machinist watch reports that drift at startup and machinist update-check reports it alongside the release comparison, so you do not have to run doctor to find out. The advisory never blocks a command and never appears in update-check --json.

Start

cd your-repository
machinist init
# Answer the setup questions, review the generated files, then:
machinist doctor --run-gates
machinist sync-labels --check
machinist sync-workflows --check
git status --short
git add machinist.yaml .machinist/specs/.gitkeep .gitignore
git add -p .github/workflows
git diff --cached
git commit -m "chore: configure AgentMachinist"
git push
machinist watch

In a terminal, machinist init asks a short set of setup questions — dispatch mode, managed workflows, harness, test gate, and notifications — each with a one-line explanation and a safe default. Flags such as --harness, --test-cmd, --spec-source, and --notifications pre-answer their questions; --no-input (or a non-interactive shell) skips the questions and uses safe defaults. A detected test command is reported as a suggestion but is not enabled non-interactively unless you pass --test-cmd.

Review the staged diff before committing. Managed workflows must be pushed before GitHub comment or label approval can record SHA-bound evidence. machinist init also adds /.machinist/runs/ to .gitignore. If you manage workflows yourself, machinist init --no-workflows records github.manage_workflows: false; doctor then reports that its drift check was intentionally skipped.

The default github.spec_source: local makes watch own spec generation. Choose github-actions and run machinist sync-workflows if CI should own that phase instead. Exactly one source is active, preventing duplicate spec runs.

Approval is bound to the exact PR head commit. Use either:

machinist approve --issue 57
# or: machinist approve --pr 18
# or post the SHA-bound comment shown in the Spec PR body:
# /machinist-execute <full-spec-commit-sha>

The positional target remains available when that number identifies only one Task; use --issue or --pr when GitHub numbers overlap.

Editing the spec after approval makes that approval stale and blocks execution until the new head is approved.

The CLI approval command submits the SHA-bound comment; the managed GitHub workflow independently verifies the current head and approver's write access, then records the marker and label. Until that workflow completes, status remains awaiting approval rather than pretending execution is authorized. approval pending specifically means the label is visible but trusted SHA Evidence has not arrived yet.

Revise or explicitly abandon a successful Spec by issue number:

machinist spec 42 --dry-run
machinist spec 42 --revise
machinist spec 42 --abandon --reason "requirements changed"

The dry run prints the proposed Spec without commits, pushes, or a PR. Revision regenerates the Spec on its existing branch and draft PR. Abandonment records the reason, removes the trigger and approval labels, and closes the open draft PR.

Commands

Command Purpose
machinist init Create config, spec storage, labels, and managed workflows; asks setup questions in a terminal (--no-input skips them).
machinist doctor Run read-only setup and workflow-drift diagnostics.
machinist update-check [--json] [--timeout <seconds>] Compare the installed release against PyPI, print how to upgrade, and report managed-workflow drift.
machinist sync-workflows [--check] Write or verify config-derived workflows.
machinist sync-labels --check|--apply Verify or create the two configured lifecycle labels.
machinist config validate|show|schema|set Validate, inspect, export, or atomically update configuration.
machinist spec <issue> [--dry-run] Preview a Spec, or generate it and open its draft PR.
machinist spec <issue> --revise Regenerate a successful Spec on its existing branch and PR.
machinist spec <issue> --abandon [--reason <text>] Record rejection and close the open draft PR.
machinist approve [--issue <issue>|--pr <pr>] Bind approval to the current PR head without number ambiguity.
machinist run <issue> Implement an approved spec and run the test gate.
machinist amend <issue> --feedback <text> Rework a ready PR from explicit feedback after fresh approval.
machinist cancel <issue> [--reason <text>|--clear] Cooperatively stop or block an issue's dispatch.
machinist watch [--once] [--dry-run] [--max-tasks <n>] Preview or dispatch eligible tasks continuously or once.
machinist queue pause|resume|defer|allow|show Persist operator controls over new watcher dispatches.
machinist service install|start|restart|stop|status|logs|uninstall Manage the repository's macOS launchd watcher; destructive lifecycle actions refuse active Claims unless forced.
machinist status [--local|--all] [--json] Show GitHub state, local Task Runs, or a registered portfolio.
machinist runs [--issue <issue>] [--json] Read current, historical, orphaned, and corrupt local run records.
machinist retry <issue> [--phase spec|execute] Re-enable one failed Task Run.
machinist retry <issue> --phase execute --run [--resume|--fresh] Reuse a retained workspace or start a fresh Execute attempt; fresh is the default.
machinist inspect <issue> [--offline] [--json] Show GitHub, workspace, and complete Task Run diagnostics.
machinist repo add|remove|list Maintain the optional local repository registry.
machinist clean [--issue <issue>|--all] List or remove retained workspaces.

Documentation

The trust model is deliberately narrower than “the agent cannot use git.” Harness flags, credential reduction, repository postconditions, and push leases reduce risk, but local harnesses still execute with the operating-system access of the user who launched them. Read the trust model before unattended use.

Releasing

Releases use PyPI Trusted Publishing. Bump pyproject.toml, update the changelog, and publish a GitHub Release tagged v<version>. The release job first checks tag/version equality, runs tests and workflow checks, builds both distributions, smoke-tests the installed wheel and sdist through a generated first-run project, and records SHA-256 hashes. A minimal job then publishes those verified artifacts. Only after publication do separate jobs attach the distributions and checksum file to the GitHub Release and verify that the exact version is visible and installable from PyPI.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentmachinist-0.9.0.tar.gz (306.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentmachinist-0.9.0-py3-none-any.whl (175.4 kB view details)

Uploaded Python 3

File details

Details for the file agentmachinist-0.9.0.tar.gz.

File metadata

  • Download URL: agentmachinist-0.9.0.tar.gz
  • Upload date:
  • Size: 306.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentmachinist-0.9.0.tar.gz
Algorithm Hash digest
SHA256 460ff375d2b3674e891daf2c157279c81b1d3894c337eb64382304ef873f4bb2
MD5 b032eb151a7379cddb6cc570f8544936
BLAKE2b-256 57defc5478ea76957099ca3bae7142d7db82049fccb60cc9e1a844216cd1106d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmachinist-0.9.0.tar.gz:

Publisher: release.yml on vscarpenter/AgentMachinist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentmachinist-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: agentmachinist-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 175.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentmachinist-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 155fe57ad1a02c001ab9fa93fd6911a039a6ed47c312967dcc0f47d7e96599e2
MD5 fe5eb7ba20148228132c4e598223a3b2
BLAKE2b-256 6bd5001898fa50c9ba996a61fb0e36dfa3c737c13af888237d743c9058c8def1

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmachinist-0.9.0-py3-none-any.whl:

Publisher: release.yml on vscarpenter/AgentMachinist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

This release

0.9.0 This release

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page