Skip to main content

repo-steward

Two AI maintainers at a workbench: one tends the branches, the other reviews and gives a thumbs up, and the CI light is green

CI PyPI Python 3.12 License: MIT

An AI maintainer that runs your repository, and you talk to it in your own console, installed on your phone. You ask, it opens a pull request; it works your plans one pull request at a time, two models review each other, and CI decides what merges.

  • Your console, your phone. The steward serves its own web console on your domain. Install it as an app from the browser, sign in with your Discord account, and every request, answer, approval and alert is one card. A push reaches your phone when a request is answered, an approval waits or something fails.
  • You steer in one tap. Each request gets its own thread and a card with Work on it, Done, check again and Dismiss. A reply in the thread continues the work.
  • Your plans move while you sleep. Between requests it takes the next open step of your Kanso implementation plans, one session and one pull request per step, through kanso-runner.
  • Nothing merges on one model's word. Claude Code writes and Codex reviews the exact commit against a JSON verdict schema, the other way round for the alerts Codex fixes. A rejected commit is dropped, and its reason goes back to the next session.
  • CI decides. It squash-merges only a green pull request whose head commit was approved. A red one is closed, and its failed steps' logs feed the retry. Pull requests that touch your owner paths, such as .github/ or deploy/, wait for your merge.
  • It respects your limits. A Claude or Codex usage limit pauses the sessions until the reset. Quiet windows hold merges and plan sessions while other jobs run.
  • Your other services use the same console. A small API lets any service put a card in front of you and take your answer back, such as an article to publish or a video to post.
  • Optional: Bugsink alerts become cards it fixes, and server repairs run through ops-gate: read verbs at once, destructive ones only after you approve them on your backend.

Used in production by RetroSpeedLab

RetroSpeedLab is a game studio run by AI agents (suite). Its maintainer is repo-steward: it keeps the search, the stream, the website and the lakehouse running, fixes Bugsink alerts and works the suite's plans, and its console runs at steward.retrospeedlab.com. Its real configuration is the worked example here: steward.yaml and the product brief brief.md.

owner    → console: "The HUD clock is too small on the stream"
steward  → a new card: 🔧 Working on it
Claude   → commits the fix with a test on maintainer/2026-12-03T0910
steward  → runs every check of AGENTS.md again, as the agent user
Codex    → APPROVE: "the clock scales with the overlay and the test covers it"
steward  → 🔀 Opened …/pull/412, a push to the phone; once CI is green: 🔀 Merged

How it works

console ─┐                        ┌─ Claude Code session as the agent user, with the shipped and your own skills
Bugsink ─┼─▶ inbox ─▶ one queue ─┤        │ commit + report
plans   ─┘     │                  │        ▼
               │                  └─ checks from your rules file ─▶ the other model's review ─▶ pull request
               └─ every 2 minutes: CI green + approved head + no owner path + no quiet window ─▶ squash merge
  • repo-steward inbox is the long-running process: the console on port 8000, alerts, plans, cards and merges. Put it behind a reverse proxy that terminates TLS on the console's domain.
  • repo-steward run is one scheduled session on the most important work, for a cron.
  • repo-steward ask --message "…" is one session on a request.

Sessions run as a separate agent user through the deploy/sandbox wrappers, so the agent never sees the steward's tokens; the steward pushes the reviewed commit itself. The agent's git trusts only the steward's bare mirror it clones from. deploy/Dockerfile builds that image, the console included.

The console

The console is an installable web app (a manifest and a service worker) that the steward serves itself. Every screen is described as A2UI messages, protocol v1.0 with its basic catalog: the new-request form, the plans, a card per thread, the thread view with its notes and reply field, and the approval buttons. The steward builds them with a2ui-core 0.8.0 and streams them over Server-Sent Events, and the page renders them with the official Lit renderer, @a2ui/lit and @a2ui/web_core 0.17.0. The owner's button presses go back as A2UI action messages. The package's look is neutral; a theme in the config sets your colours.

Route Purpose
GET /login, GET /auth/discord Discord OAuth2 sign-in, authorization code with PKCE and the identify scope
GET /, GET /session the page, and the session's CSRF token and VAPID public key
GET /stream, GET /stream/{thread} the A2UI stream of the board or one thread
POST /actions the owner's A2UI actions
POST /decisions the decision the backend sends the owner back with
POST /push, POST /logout a Web Push subscription, and signing out

Security model

  • Only the owner signs in. Discord only proves who the person is: the steward compares the Discord user id with console.owner and answers everyone else with 403. The session is the steward's own signed cookie, Secure, HttpOnly and SameSite=Strict; every action needs the session's CSRF token and the console's own Origin. A strict Content-Security-Policy lets the page run only its own bundled script.
  • The steward never holds the approver's key. A destructive ops step runs only with a signature from ops_gate.approval.sign_run, and that key lives on your backend, never in the steward's process or container. The console's Approve opens the backend's own decision page, which signs in the owner itself with Discord, checks the user id against Discord's API and only then signs. So the agent's harness cannot approve its own commands, even if it took over the steward.
  • The agent never sees a secret. Sessions, checks and reviews run as the agent user, and the text the console shows or pushes is redacted.

Configure

One YAML file, passed with --config or REPO_STEWARD_CONFIG and validated once at start. Unknown keys and missing values stop the steward. ${NAME} reads an environment variable, so private ids stay in your vault:

repository:
  name: your-org/your-repo
  owner: your-github-login          # its open issues with the label become instructions
  issue_label: maintainer
  branch_prefix: maintainer/
  owner_paths: [.github/, deploy/, AGENTS.md]
  rules: AGENTS.md                  # its "## Checks" section lists the commands every commit must pass
  brief: docs/steward-brief.md      # what the product is and what matters most, in your words
  skills: null                      # or a folder of your product's own skills
git: {name: Your steward, email: steward@your-domain.example}
sessions: {model: opus, summary_model: haiku, minutes: 90, poll_seconds: 30, readable: []}
quiet: {starts: ["01:35"], minutes: 45}
backend: {url: https://api.your-domain.example, record_runs: false}
plans: {hold_url: null}
console:
  url: https://steward.your-domain.example   # the console's public URL, also the OAuth redirect's origin
  owner: "${DISCORD_OWNER_ID}"               # the only Discord user who may sign in
  theme: null                                # or {scheme: dark, accent, on_accent, background, surface, text}
bugsink: null                       # or {url, team, server_projects}
ops: null                           # or {table: deploy/ops/verbs.toml}

Secrets come from the environment:

Variable Purpose
GITHUB_TOKEN, BACKEND_API_KEY, CLAUDE_CODE_OAUTH_TOKEN GitHub, your backend and Claude Code
DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET the Discord OAuth2 application for sign-in, redirect {console.url}/auth/discord; no bot
CONSOLE_SESSION_SECRET signs the session cookies
VAPID_PRIVATE_KEY Web Push, the raw private key as npx web-push generate-vapid-keys prints it
CONSOLE_API_KEY the key other services send to the producer API
BUGSINK_API_TOKEN with Bugsink; BUGSINK_DSN reports the steward's own errors

Codex signs in once inside the container with codex-as-agent login --device-auth.

Backend. The backend holds the approver's signing key, so the steward needs a small one you host. Each call from the steward carries X-API-Key: $BACKEND_API_KEY:

Call Purpose
POST /maintainer/ops-proposals a destructive step a session proposes: {id, host, words}
GET /maintainer/decisions/{component} opened by the owner's browser, not the steward: approve_<id>, deny_<id> or enable_<commit>. The backend shows the step from its own record, signs the owner in with Discord (code and PKCE, identify), checks the user id, signs or records the decision, and redirects to {console.url}/?decided=<component>
GET /maintainer/ops-proposals/{id}/approval the signature of an approved step, {expiry, nonce, signature} from ops_gate.approval.sign_run
PUT /maintainer/runs/{name} run statistics, only with record_runs: true
GET <hold_url> answering {"paused": true} an optional switch that holds plan sessions back

RetroSpeedLab's backend implements it in its suite, in src/retrospeedlab/backend/maintainer.

Producer API. Other services put cards into the console and take the owner's answers back, with Authorization: Bearer $CONSOLE_API_KEY:

Call Purpose
PUT /api/cards/{card} {title, notify, components, data}: A2UI v1.0 basic-catalog components with a root, ids as identifiers; notify pushes it to the phone
DELETE /api/cards/{card} takes the card away
GET /api/actions?wait=20 long-polls the owner's actions on your cards: [{id, card, action}]
DELETE /api/actions/{id} marks an action as handled

Upgrading from 0.1. The Discord inbox is gone: remove discord: and DISCORD_BOT_TOKEN, add console: and the secrets above. The steward starts with a fresh inbox.json; the old sessions.json, cards.json and board.json are no longer read.

Claude Code plugin

The steward's generic skills (fix-a-bug, ci-triage, focused-tdd, systematic-debugging, ponytail-review, ops, owner-request and more) also work in your own Claude Code sessions:

/plugin install repo-steward --marketplace datenwissenschaften/repo-steward

Vendored skills keep their licences: superpowers (MIT, Jesse Vincent), ponytail (MIT, DietrichGebert) and caveman (Apache-2.0).

Development

uv sync && uv run ruff check && uv run mypy && uv run pytest
npm --prefix web ci && npm --prefix web run lint && npm --prefix web test && npm --prefix web run build

The acceptance scenarios in tests/features describe the configuration, the console and the merge gate in plain language. npm --prefix web run build puts the console into the package, which the wheel and the image carry.

MIT © Dr. Franke Datenwissenschaften OÜ. Built by Dr. Franke Datenwissenschaften: AI agents and data platforms that run in production.

Metadata

Release files for repo-steward 0.2.0

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

Source distribution (sdist)

Source distribution for repo-steward 0.2.0
File Size Uploaded Provenance Actions
repo_steward-0.2.0.tar.gz 312.9 kB With provenance Details for repo_steward-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for repo-steward 0.2.0
File Interpreter ABI Platform Actions
repo_steward-0.2.0-py3-none-any.whl Python 3 none any Details for repo_steward-0.2.0-py3-none-any.whl

Total release size: 658.4 kB

Release files / repo_steward-0.2.0.tar.gz

Download URL repo_steward-0.2.0.tar.gz
Size 312.9 kB
Tags Source
SHA-256 checksum
How to use checksums
08fb79bb6eccd7fdf5e6bf4571ab7e6bf6d8f6f2cfbc88792eed821e853ef55f
BLAKE2b-256 checksum
How to use checksums
9ab4bb2820dcd9be75c17aa6e7505808601cf78e9b14230b1c8834a4f50d4c83
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 3, 2026.

Transparency log

Release files / repo_steward-0.2.0-py3-none-any.whl

Download URL repo_steward-0.2.0-py3-none-any.whl
Size 345.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a430c2c93bdaaf996d0f9e1b77f6418a4472b80123e6451be486d00fb0a4370
BLAKE2b-256 checksum
How to use checksums
15c4aec9f258bb8efb2e6da6fb8bd14b99e26fe796a6aa234fc6f97d6c15f47c
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 3, 2026.

Transparency log

Security for repo-steward 0.2.0

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 repo_steward-0.2.0.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 3, 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.

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