Skip to main content

issue-to-merge

test License: MIT Python 3.8+

Leer en castellano

Guarded delivery for coding agents. From an issue to a merged pull request, behind controls that fail closed and that no agent can talk its way around.

itm in a terminal: a work branch, a commit the hooks refuse because it has a token, the fixed commit, the push with its pull request, a merge refused while the CI runs, the green CI and the merge

Recorded from the real itm, against a local remote and a fake GitHub API: python docs/demo/demo.py draws it again, and a test keeps it up to date.

Why

Coding agents already write good code. The risky part is everything after the code: the branch, the commit, the push, the pull request, the CI and the merge. A rule written in a prompt is a suggestion; a long session forgets it, and a confident model argues past it.

issue-to-merge moves those rules out of the prompt and into git hooks and a command line tool. The tool decides whether the next step is allowed, not the model. The same controls hold for every agent and every person, every time.

What it does

  • Fail-closed git hooks. Identity, work branches only (never a commit on main), no credentials and no local machine paths in the content, the commit messages or the text of a pull request. When a check cannot decide, it refuses.
  • A guarded merge. itm merge only merges a pull request that is yours, whose head is the commit you pushed, with every CI run green and the branch up to date. Changes to .github/, permissions, secrets or infrastructure are merged by a person.
  • Credential custody. The GitHub token lives in the operating system store (Windows Credential Manager, the macOS Keychain, systemd-creds on Linux) and is read inside the tool's own process. No command prints it; the agent never sees it.
  • Secret masking. Configuration files, pull request diffs and Terraform state are shown through an allow-list mask: the agent reads the shape, not the secrets.
  • Mutation checks. itm mutate proves that a test catches the change it is meant to catch, then restores the file byte for byte.
  • Parallel sessions. One worktree per issue and, if the repo has one, one instance of the local environment per worktree (database, ports), so several agents work on the same repo without stepping on each other. See docs/instances.md.
  • Evidence. itm verify captures an interface change in a real browser (with an accessibility check), itm measure the page load of a site, and itm usage the tokens each model consumed.

It works with any agent that reads AGENTS.md: Claude Code, Codex, Cursor, Copilot and others. Python 3.8+ with the standard library only: nothing to install besides git and Python. The CI tests it on Linux, macOS and Windows.

Install

From PyPI:

pipx install issue-to-merge
# or
uv tool install issue-to-merge

You get two commands: issue-to-merge and its short form, itm.

It runs on Linux, macOS and Windows. The GitHub token is kept by the operating system: on Linux it needs systemd 256 or newer (systemd-creds); on macOS it goes to your login Keychain; on Windows, to the Credential Manager. Trying it on a Mac for the first time: docs/macos.md.

Quick start

itm init my-work
cd my-work
itm setup                          # your git identity and GitHub account
itm credentials set github-pat     # in your own terminal, never from an agent
itm clone my-repo                  # into repos/, with identity and hooks
itm doctor                         # the state of everything, without network

Then open your agent in my-work and bring it an issue.

itm init creates your work folder: the place where you and your agents operate your repos. It holds your local rules (AGENTS.md), the catalog of your repos, what you know about them and a journal of requests; the repos are cloned inside it, in repos/. The tools and the base rules come from the package; the work folder is yours and stays private.

The base rules are what your agent follows: how a request is handled (understand, classify, record, execute, close), the branches, what needs your confirmation before acting outside, what the hooks control, how credentials are kept and how the work folder learns from its mistakes. itm init copies them to .itm/rules/ and your AGENTS.md points to them; run it again after an upgrade. Your own rules go in AGENTS.md.

Commands

Work folder init, setup, credentials, doctor, hooks, catalog, clone, update-repos
The circuit branch, commit, push, sync-main, ci, merge
GitHub issue, comment, review, read, api
Checks audit, mutate, test, verify, measure
Local environment instance, seed, local
Reading safely show-config, terraform-state, pdf, usage

itm --help lists them and itm <command> --help explains each one.

Roadmap

The first version is complete: the hooks, the whole circuit, the GitHub commands, the checks and parallel sessions with their instances, published on PyPI. Next:

  • an autopilot that takes the issues you open to merge on its own, one session per issue, behind the same controls.

Built with agents

This project is developed with coding agents, under the same rules it ships: every change after the first commit arrived through an issue, a work branch, a pull request with a green CI and a guarded merge. Contributions made with agents are welcome: see CONTRIBUTING.

License

MIT © Juan Sosa

Metadata

Release files for issue-to-merge 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for issue-to-merge 0.1.1
File Size Uploaded Provenance Actions
issue_to_merge-0.1.1.tar.gz 282.2 kB With provenance Details for issue_to_merge-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for issue-to-merge 0.1.1
File Interpreter ABI Platform Actions
issue_to_merge-0.1.1-py3-none-any.whl Python 3 none any Details for issue_to_merge-0.1.1-py3-none-any.whl

Total release size: 503.9 kB

Release files / issue_to_merge-0.1.1.tar.gz

Download URL issue_to_merge-0.1.1.tar.gz
Size 282.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b7d07853326b2a2f399b39d273c87ec4a50b87597a93bc15eb1f0406014b9f9d
BLAKE2b-256 checksum
How to use checksums
3171090b5ec3abd857becfa4ecdaebad0be655bb7fc735bf1152dd2b2a76c376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / issue_to_merge-0.1.1-py3-none-any.whl

Download URL issue_to_merge-0.1.1-py3-none-any.whl
Size 221.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
865ca617a1a4034b8d849787c276bbe8a7d311c448060a33f131504afc66fe05
BLAKE2b-256 checksum
How to use checksums
c78ebe2e392c27ee7330c5a7abac91a58d2a9caa67e1c73b8ff23f1fd368915f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for issue-to-merge 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for issue_to_merge-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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