Skip to content

Maintainer

The automated development team is repo-steward: Claude and Codex work the Bugsink issues, the owner's requests from its console and the implementation plans, review each other's commits, open pull requests and merge them once CI passes. Its README describes how a session, the review, the plans, the sandbox and the ops tools work. The suite pins it in pyproject.toml (repo-steward==0.2.0) and only holds RetroSpeedLab's setup, in deploy/maintainer/:

File What it holds
steward.yaml The repository, the owner paths, the models, the lab window, the backend, the console and its colours, Bugsink and the ops verb table
brief.md What RetroSpeedLab is, what to measure first, what comes next, the ratings and the product rules
skills/ The product skills beside repo-steward's own: platform, lakehouse, speedrun, music-round, failure-patterns and servers
Dockerfile repo-steward with its agent sandbox and the suite's toolchain (Java for Spark, ffmpeg, Node, Codex)
Procfile, app.json repo-steward inbox as the worker with the console, repo-steward run every three hours, and the articles
console-setup.sh, console/ steward.retrospeedlab.com: the name and certificate on Main, the tunnel from the Home Lab and the unbuffered proxy

Only the owner merges a pull request that touches deploy/, src/retrospeedlab/backend/maintainer/, .github/, .agents/, .claude/, AGENTS.md or CLAUDE.md. The backend's maintainer routes take repo-steward's ops proposals and run records and hand out the signed approvals, its decision page signs the owner in before it signs, and /autonomy/switch holds the plans.

The ops gate

The maintainer never gets a shell on a server. Each server runs ops-gate (ops-gate serve) as the only command its SSH key may run, with the fixed verbs of deploy/ops/verbs.toml:

Class Verbs Limit
Read disk, docker-usage, containers, gate-table, app-status, app-logs, journal 60 an hour
Repair prune-builder, prune-images, prune-containers, restart, kafka-topics 3 an hour
Needs approval retire, vacuum-journal, restart-guarded 6 an hour

The maintainer can only propose an approval verb. The owner sees it as a card in the console with Approve and Deny. Both open the backend's decision page, GET /maintainer/decisions/{component}, which shows the step from the backend's own record and signs the owner in with Discord itself (a code with PKCE, the identify scope, consent asked every time); only when Discord's user id is the owner's does it decide and send the owner back to the console with ?decided=<component>. On Approve the backend signs a single-use approval for exactly those words on that server, valid for 14 minutes, and the gate checks the signature and the nonce before it runs. Deny means it never runs.

A new verb is one entry in verbs.toml, a line in deploy/maintainer/skills/servers/SKILL.md and tests; when it runs a program the gate does not run yet, that program also joins programs in verbs.toml. It reaches the servers only after the owner approves an "enable" card for that commit on the same decision page; a timer on each server installs the signed table.

The console

repo-steward inbox serves the owner's console on port 8000 of the worker container: requests, threads, plans, Bugsink alert cards, ops approvals and the cards other services put in through its producer API with CONSOLE_API_KEY, the articles and the backend's Pause switch and A/B winners. It is public at steward.retrospeedlab.com: deploy/maintainer/console-setup.sh gives the name and its certificate to the retro-speedlab-steward app on Main, whose nginx carries every request, the event stream unbuffered, through an ssh tunnel that the Home Lab opens to the worker's 127.0.0.1:18195. The console signs the owner in itself, so it sits behind no owner gate.

The console and the backend's decision page use the backend's Discord app. Its redirects are https://steward.retrospeedlab.com/auth/discord and https://api.retrospeedlab.com/maintainer/decisions/discord.

Configuration

The image sets REPO_STEWARD_CONFIG to /app/steward.yaml. Vaultwarden fills GITHUB_TOKEN, BACKEND_API_KEY (the value of UPLOAD_API_KEY), BUGSINK_API_BASE, BUGSINK_API_TOKEN, BUGSINK_TEAM_ID, BUGSINK_DSN, DISCORD_OWNER_ID, DISCORD_CLIENT_SECRET, CONSOLE_SESSION_SECRET, VAPID_PRIVATE_KEY, CONSOLE_API_KEY and CLAUDE_CODE_OAUTH_TOKEN; DISCORD_CLIENT_ID, the backend's, is set once with deploy/maintainer/setup.sh.