Skip to content

About

Helps maintainers run GitHub repositories with coding agents: reviews, priorities, CI, merges, and a dashboard; configured per repository by its maintainers.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

auto-maintainer logo

auto-maintainer

An AI maintainer for GitHub repositories. It triages, ranks, and reviews pull requests, explains failed CI, reruns flaky jobs, and merges what is ready, using the coding agents installed on its host. Nothing public happens until a maintainer allows it.

Python 3.11+ Node 20+ License: Apache-2.0 Status: early

Try it · Run it · Configure it · Agents · How it works · Design

Home: what agents are doing for you, the PRs to review, and every decision waiting on you

What it does

  • Reviews pull requests. Select PRs on Home, pick an agent, and press Review. The agent follows the repository's own review skill when it has one and may ask you questions; a second agent verifies the findings; the draft waits for you to edit and post, as the service or as yourself. Two people never run the same agent on the same commit. Reviews can also run every few hours or on every update, and re-review PRs that get new commits.
  • Fixes what a review found. One click hands the findings to an agent, which changes the PR's code. You read the diff, and the fix opens as your PR into the PR's branch, signed off by you.
  • Reproduces what a PR claims. Pick a test machine; an agent writes a script that checks the claim. You read and approve it, it runs on the machine before and after the change, and you get a draft report to post. The service's maintainers add the machines; each repository chooses which ones it uses and sets up its own environment on them.
  • Shows agents at work. Every review, fix, and reproduction opens as a live view: what the agent reads and runs, the questions it waits on, and what it produced. Stop it if it goes the wrong way.
  • Ranks the queue. Every open PR gets an internal priority from a rubric your maintainers own. Scores never appear on GitHub. Overrides teach the rubric.
  • Keeps CI moving. Failed jobs are diagnosed as flaky, infrastructure, or caused by the PR; flaky ones are rerun.
  • Merges what is ready. A maintainer arms a merge; the service merges once every check, approval, and rule in the repository's profile passes.
  • Checks conventions. PR titles, commit messages, sign-offs, templates, CODEOWNERS coverage, license headers, or any check the repository adds.
  • Learns and remembers. Lessons from maintainers' edits and overrides go to a private memory repository on GitHub, as reviewable changes.
  • Improves itself. Ask for a feature in a conversation; the service changes its own code, runs the tests, and opens a PR that a maintainer of its repository merges and deploys.

It adapts to each repository through a profile its maintainers approve, and it starts in shadow mode: it records what it would do and posts nothing until you raise an action to propose or auto.

A look at the dashboard

Watch the agent work. Each job shows its steps as they happen, and what it produced lands right there: here, a review draft rendered the way GitHub will show it, with its comment under the line it is about.

A review, live

The agent on every page. Press Ctrl/⌘+J on any page and ask about what is on it. It sees what you can see; anything it suggests changing waits for your approval.

The agent beside a pull request

Every list sorts, filters, and groups. Saved views, filters by any facet, sorting by any column, grouping, bulk actions, and keyboard navigation (j k Enter x /). The view lives in the URL, so you can share it.

Pull requests ranked by internal priority

Settings by asking. Say what should change ("run Claude Code on DeepSeek"). The agent drafts the edit, you see the diff, and a maintainer applies it. API keys go only into their own fields and stay on the host.

Settings changed through the agent

Command palette
Go anywhere. Ctrl/⌘+K finds pages, repositories, and PRs, runs commands, or hands your text to the agent.
Dark theme
Light or dark, 中文 or English. It follows your system's theme, or pick one. The dashboard starts in Chinese; the globe button in the top bar switches to English.

Try it in two minutes

The demo runs the whole service on fakes with sample data. Nothing leaves your machine.

git clone https://github.com/RLinf/auto-maintainer.git
cd auto-maintainer
uv sync
uv run am serve --demo

Open http://127.0.0.1:7777/auth/dev?login=maria to sign in as a sample maintainer. The first start builds the dashboard, which needs Node 20 or newer.

Run it on your repositories

There are no configuration files to write. Start the service, open the link it prints, and answer a few questions in the browser.

1. What you need

  • Python 3.11+ with uv, Node 20+, and git.
  • At least one agent CLI, signed in: Claude Code, Codex, OpenCode, Gemini CLI, or Antigravity.
  • A GitHub account for the service to act as, through the GitHub CLI. The setup page logs it in with a one-time code on github.com, and installs the GitHub CLI into the service's data folder when the host has none.

2. Start it and set it up in the browser

git clone https://github.com/RLinf/auto-maintainer.git
cd auto-maintainer
uv sync
uv run am start           # in the background: HTTPS on :443, restarts after deploys, rolls back a bad one
uv run am logs -f         # follow its log (also on the dashboard: Service → Logs)
uv run am status          # is it running, where, and the last lines
uv run am stop            # stop it; running jobs get 20 s to finish

Open the service's address in a browser (for example https://192.168.1.20). Until it is set up, every page is the setup page, and it asks:

  1. The address people use to reach the service.
  2. Connect GitHub, the account the service acts as. You enter a one-time code on github.com to authorize the GitHub CLI, and the service works as the account you authorize; for a team, authorize an account made for the service, so what it posts is not under your name. If the host has no GitHub CLI, an Install the GitHub CLI button downloads GitHub's own release into the service's data folder first. Authorizing also proves that you maintain the service's repository (the one your checkout came from): only its maintainers can set the host up.
  3. The memory repository, a private repository created or chosen with your GitHub account, or memory kept on the host.
  4. The service's own repository, filled in from your checkout.

The terminal also prints a one-time setup link (uv run am setup prints it again). Opening it proves you are at the host instead, and also offers the GitHub CLI login already on the host.

The service serves HTTPS on port 443, with a certificate from a private authority it makes on its first start, since a host reached by an IP address gets none from a public one. The log prints the authority's file and fingerprint: everyone who opens the dashboard installs it once as a trusted root (it is also at /tls/ca.crt; until then the browser warns). If the service's user may not listen on port 443, am serve prints the one sysctl setting that allows it. am serve --port 7777 serves plain HTTP instead; any port other than 443 does. Design 4.7 has the details, including a certificate of your own.

First-run setup

Finish saves everything and starts the service without a restart, and signs you in. The answers are kept in ~/.config/auto-maintainer/ (local.yaml, and the service's GitHub CLI login in gh/), which you never need to open. To change them later, go to Settings → System → Change host setup.

A host set up earlier with a GitHub App or a pasted token opens the setup page on its next start, with its other answers kept: connect the GitHub CLI there, and the service acts as that account from then on. Comments the old App's bot posted count as the service's own only if you list the bot in the repository profile's people.review_identities.

am start runs am supervise in the background, which runs am serve and keeps it running; closing the terminal does not stop it. Its log is service.log in the data folder (~/.local/share/auto-maintainer/logs/ by default), rotated at 20 MB with five old files kept, and maintainers of the service's repository can read it on the Service page. Run am supervise instead to keep it in the foreground, or am serve directly when you develop; press Ctrl+C once to stop either. To try it against GitHub without touching real repositories, run uv run am serve --dev: it holds every repository action in shadow.

3. Sign in

Everyone signs in by entering a one-time code on github.com, which authorizes the GitHub CLI for them. On the host itself, this prints a link that signs you in once:

uv run am login           # a one-time link, valid for 10 minutes, as the GitHub account logged in on the host

4. Add a repository

On the dashboard, open Repositories → Add repository, or run uv run am repo add your-org/your-repo. An agent reads the repository and drafts its profile; a maintainer of that repository approves it. From then on the service works in shadow. Raise actions to propose (you approve each one) or auto when the agreement scores on the repository page say it is ready.

Why GitHub is involved twice

The service needs two things from GitHub, and they are different:

  • An account to act as. It polls pull requests and posts what maintainers approve, around the clock, whether or not anyone is signed in. That is the GitHub CLI login made on the setup page.
  • To know who you are when you sign in. Every approval and configuration change is checked against the signer's GitHub permission on that repository. Each person signs in by entering a one-time code on github.com; that token reaches every repository the person can, so posting a review or opening a fix PR as yourself works wherever you have access. Each sign-in uses a folder of its own, never the host's gh login, and the service keeps the token on the host under your login only, for what you approve as yourself, until you sign out. Agents run as the same system user as the service and could read those tokens; on a shared host, give each agent a command_prefix that confines it (Settings → Agents, design 5.7).

Configure it

There are three kinds of configuration, and each belongs to the people it affects:

What Where Who changes it
Service settings: which agents run, model providers and their keys, budgets, the default agent per task, polling and write limits Settings page, by asking the agent or editing config/service.yaml Maintainers of the service's repository (code_repo)
Repository profile: scope, labels, checks, review template, rubric, merge rules, autonomy per action, routing Each repository's page, by asking the agent or editing its settings layer; public conventions can live in .github/auto-maintainer.yml in the repository Maintainers of that repository
Host: address, the service's GitHub account, sign-in, memory repository The setup page; later Settings → System → Change host setup Whoever holds the setup code on the first run; then maintainers of the service's repository

Every change is checked against the user's GitHub permission at the moment it is made (maintain by default). Others can propose a change, and it waits for a maintainer. The service can never approve its own changes. Each change is a commit in the memory repository, so there is a history and a diff.

Custom model providers. Any agent that supports it can use an OpenAI-compatible or Anthropic-compatible endpoint instead of its CLI's own sign-in. Ask on the Settings page ("add an OpenAI-compatible provider at https://… for Codex"), then paste the key into the provider's key field. Test connection lists the endpoint's models without spending tokens.

Supported agents

Agent CLI How the service talks to it Questions reach reviewers Custom providers
Claude Code stream-json with the CLI's permission prompts yes Anthropic-compatible
Codex codex app-server (JSON-RPC) yes OpenAI-compatible (Chat Completions or Responses)
OpenCode ACP (opencode acp) yes both
Gemini CLI ACP yes no
Antigravity ACP (agy acp) yes no
pi, dsh, others a command template (generic adapter) no both, through environment variables

Agents run in their CLI's own auto mode. Whatever the CLI would ask a person goes to Agent questions on the dashboard (and a toast for whoever is online); an unanswered question is denied when it expires. Agents never receive GitHub write credentials: the service alone writes to GitHub, after policy allows it.

How it works

GitHub ──poll/webhooks──▶ events ──▶ engine ──▶ playbooks ──▶ agents (Claude Code, Codex, …)
                                                     │
                                                     ▼
                                   actions ──▶ policy: shadow │ propose │ auto
                                                     │              │
                                         maintainer approves ◀──────┘
                                                     ▼
                                          actuator ──▶ GitHub, memory repo, labs

Playbooks (triage, review, follow-up, priority, CI diagnosis, hygiene, merge, onboarding, …) ask agents for judgment and return actions. They never write. The policy decides, per repository and action kind, whether an action is only recorded, proposed to a maintainer, or executed. Every action has an idempotency key, so retries post once.

Some limits hold whatever the configuration says:

  • The service never approves PRs, and its own account never pushes to target repositories. A fix is pushed only when a maintainer opens it as themselves.
  • It posts at most one review per head commit.
  • It mentions only the PR's author and CODEOWNERS.
  • Internal priorities never reach public text.

The full design is in docs/design.md.

Keyboard shortcuts

Keys Does
Ctrl/⌘+K Search, go anywhere, run a command, ask the agent
Ctrl/⌘+J Open or close the agent
g then h / p / r / i / q / m / s Home, Pull requests, Repositories, Proposals, Questions, Memory, Settings
/ Search the list on the page
j k Enter x Move, open, select in a list
? All shortcuts

Development

uv sync                                     # Python environment with dev tools
uv run pytest                               # unit and flow tests on fakes: no network, no agent CLIs
uv run pytest -m live_agent                 # contract tests against installed CLIs (costs money)
uv run ruff check . && uv run ruff format --check .
uv run am serve --demo --port 7788         # in one terminal: the API the dev server proxies to
cd ui && npm ci && npm run dev              # in another: the dashboard with hot reload on :5173
Path Holds
src/auto_maintainer/domain/ Types, pure rules, and ports. No I/O.
src/auto_maintainer/playbooks/ One module per playbook
src/auto_maintainer/policy/, actuator/ Decisions, and the only code that writes
src/auto_maintainer/agents/ One adapter per agent CLI, the router, and permission answers
src/auto_maintainer/web/ The API, sign-in, chat, and settings
ui/ The dashboard (React, TypeScript, Vite)
config/defaults/, packs/, skills/ Default profile, packs, and skills for the agents

Read AGENTS.md before you change anything: it lists the rules reviewers enforce (layering, the configuration gate, typed public text, hard limits). Commits follow Conventional Commits with a Signed-off-by trailer (git commit -s).

Status

Early. Everything above runs and is tested on fakes. The GitHub reads, sign-in, and every agent CLI except OpenCode and Gemini have been checked live. Not built yet: the MCP server for the chat agent, replay evaluations, issue triage, and the release assistant. See section 11 of the design for the full list.

License

Apache-2.0

About

Helps maintainers run GitHub repositories with coding agents: reviews, priorities, CI, merges, and a dashboard; configured per repository by its maintainers.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages