ADR-0001 · phases 1–2 implemented · phases 3–4 proposed · 2026-11-18

From ask to release: humans decide, agents do the work

A delivery workflow for Precursor where every request becomes an issue, an agent specifies it, another builds it, a different one reviews it, and a human makes the call at a few gates, set by risk. It runs the same from the Claude app, the Copilot app, or Copilot on GitHub, because the shared contract is GitHub state plus shared prompt files, not the tool that runs them.

Principles

Five rules. Every later choice follows from them.

1 · GitHub is the bus

Workflow state lives in issue/PR labels, assignees and linked PRs. Any agent, local or hosted, reads and moves the same state with gh. Nothing depends on one tool's memory.

2 · Runner-agnostic roles

Each role is one skill file, written once (today's ship-change and release prompts are the start). Claude, Copilot and hosted Actions all load the same file.

3 · Separation of duties

The run that writes a PR never reviews or approves it. A separate, read-only run reviews it against the same written rules.

4 · Gates scale with risk

Docs and minor dependency bumps merge on green. Features need a human click. Auth, telemetry, migrations and workflows get a human review of the diff.

5 · Bounded & reversible

Review loops have a round limit, agents have concurrency and budget caps, two kill switches stop agents and releases, and an agent can open a revert PR at any time.

Rules, skills, tools, agents

The contributor setup has four layers: rules that are always loaded, skills loaded when a task needs them, tools, and an agent, with a human who decides. Each cell shows what is in the repo today, then (→) what this proposal adds.

Development cyclecontributors & their agents
Rulesalways loaded
CLAUDE.md, copilot-instructions.md, ARCHITECTURE.md, CONTRIBUTING.md; quality ratchet limits
Skillson demand, by function
6 skills: triage · spec · ship-change · review · changelog · release
Methodsoptional
PR template checklists, docs-impact table
Toolswhat agents act with
make check (lint, mypy, tests, ratchet, API types, build); 5 workflows: CI, nightly, release, relock, pages; Dependabot
Agentswho runs it
Claude Code and Copilot, run locally: change → PR → human merge

The flow, lane by lane

Columns are stages; rows are who acts. Purple outlines are human gates. Hover a card for its details. The release column already exists (release.yml, nightly, CI-gated). Today, merging is the decision to ship.

HumanAgent (local app: Claude / Copilot) Copilot, GitHub-native Deterministic automationHuman gate EXISTS already in repo

↻ Ops loops back to Intake: failed runs, flaky tests, Dependabot majors and sanitised telemetry error reports become new issues, triaged like any other ask.

State machine: labels are the source of truth

One status:* label at a time on the issue. Agents only start work from the state that is theirs. A GitHub Project board can show the same data as a view, but it never holds the state.

Side exits: status:needs-info (triage asked a question; returns to triage when the author answers) · status:needs-human (deadlock, R2, or an agent hit a limit) · wontfix / duplicate (closed with reason).
Orthogonal labels: risk:r0|r1|r2 · agent:build / agent:docs (opt-in triggers for hosted runs) · runner:local|hosted (who has claimed it) · type:*, surface:* (from the issue form).
Claiming: an agent assigns the issue and sets runner:* before it starts. A second agent that finds it claimed backs off, which keeps local and hosted runs from colliding.

Agent roster

Eight roles. Each is a prompt file plus a trigger. “Both” means the same prompt runs from a local app session or a hosted workflow.

RoleTriggerRuns onReadsWritesToken scope

Each role is written once (format: see D13). Claude and Copilot load it locally; .github/workflows/agent-<role>.yml passes the same file to the hosted engine.

Review debate: contributor ↔ reviewer

Contributor agentauthor model (e.g. Claude)
⇄≤ 3 rounds
Reviewer agentCopilot code review, or another session
Converged
Reviewer approves → status:ready
Disagreement
3 rounds or a blocker is disputed → needs-human
Out of scope
Reviewer files a follow-up issue rather than growing the PR

Rules of engagement

  • Reviewer findings carry a severity: blocker, should or nit. Only blockers hold the merge.
  • For each finding, the contributor either fixes it (commit linked in the reply) or argues against it with evidence (a test, a doc, an ARCHITECTURE.md rule). It never stays silent and never resolves the reviewer's thread itself.
  • The reviewer re-checks only what changed and resolves its own threads.
  • The reviewer checks the repo's own rules: reuse map, ratchet limits, generated API types, docs-impact checklist, no lockfile edits.
  • On escalation, the human reads a one-comment summary (the dispute, both positions, and a recommendation), not the whole thread.

Risk classes and merge authority

The triage agent proposes the risk class from the issue, and a path-based labeler sets it from the diff. When the two differ, the higher class wins.

ClassWhat falls in itSpec gateReviewMerge
R0 routinewebsite/, docs/, tests-only, typos, Dependabot minor/patch, changelog fragmentsSkipped1 agent reviewerAuto-merge on green CI + agent approval
R1 standardFeatures and fixes in precursor/ and frontend/ outside the R2 pathsHuman approves spec1 agent reviewer (separate run)Human click after reading the PR summary and review verdict
R2 sensitiveAuth/tokens, services/telemetry/, Alembic migrations, .github/workflows/, release, MCP permissions, major dependencies, a raise of quality_baseline.jsonHuman approves specAgent reviewer + human diff reviewHuman, with a CODEOWNERS review request

Human / agent share of effort, per stage

Proposed split of effort per stage, once P3 is in place

HumanAgent
StageHuman (proposed)Agent (proposed)What the human still does

Merge is its own stage because, with nightly releases, it is where the ship decision is made. These are targets to check against the P1–P4 metrics, not commitments.

Guardrails

Untrusted input

  • Issue and PR text from anyone other than a maintainer is data. Hosted agents with write access run only after a maintainer sets status:accepted or an agent:* label.
  • Never use pull_request_target with a checkout of the PR head. Review jobs on fork PRs are read-only and post comments through a separate, minimal job.
  • Agents don't follow links or run commands they find in issue bodies.

What agents may never do

  • Push to main, create tags, publish, or approve their own PR.
  • Edit uv.lock / package-lock.json (the Relock workflow owns them), raise quality_baseline.json, or hand-edit apiTypes.ts.
  • Change .github/workflows/ unless the issue is R2, and with a human-approved spec.

Limits & kill switches

  • Copilot code review: switched off in the main ruleset.
  • RELEASE_HOLD repo variable: release.yml skips publishing and reports why.
  • At most N open agent PRs (start at 5), at most 3 review rounds, and a turn/time budget per hosted run.

Traceability

  • Every agent comment and commit trailer names the role · runner · model (e.g. reviewer · hosted · gpt-x).
  • The PR body links its issue, spec comment and risk class, and holds the docs-impact assessment already required by copilot-instructions.md.
  • Weekly metrics: lead time (issue→release), review rounds, % escalated, % auto-merged, reverts, agent PRs closed without merging.

Decisions to take

Each decision has a recommended option. Your picks are saved in this browser. Export them as Markdown to paste into an issue or ADR.

Rollout: earn autonomy in stages

Each phase widens what agents do on their own only after the previous phase's metrics hold.

P1 · Observe done

  • Labels, risk labeler, CODEOWNERS
  • Triage agent (comments + labels only)
  • Reviewer agent comments on every PR (advisory)
  • Docs-impact check comment
  • Kill-switch variables
Exit when: triage labels are accepted ≥ 80% unchanged, and review findings are rarely noise.

P2 · Specify & build done

  • Spec agent + status:* machine
  • Contributor runs from Claude / Copilot apps, starting at spec-approved
  • Changelog fragments + changelog agent
  • Claiming protocol (runner:*)
Exit when: specs need ≤ 1 human edit on average, and no CHANGELOG conflicts remain.

P3 · Hosted & debate ~3 wks

  • Hosted contributor on the agent:build label (R0/R1)
  • Review debate loop with escalation
  • Auto-merge for R0
  • Concurrency and budget caps
Exit when: revert rate ≤ the pre-agent baseline, and ≤ 20% of PRs escalate.

P4 · Close the loop ongoing

  • Ops agent: failed runs, flaky tests, telemetry reports → issues
  • Release-notes agent
  • Weekly metrics digest
  • Revisit the R0 scope with the data
Steady state: humans spend their time on intake, spec approval, merges and arbitration.

What exists vs what to build

Already in the repo

  • Issue forms adding needs-triage (.github/ISSUE_TEMPLATE/)
  • PR template with verification + reuse checklist
  • Skills: triage, spec, ship-change, review, changelog, release
  • Agent rules: CLAUDE.md, copilot-instructions.md, ARCHITECTURE.md
  • CI with quality ratchet, API-types freshness, sharded tests
  • Autonomous, CI-gated nightly release to PyPI (release.yml) + nightly build
  • Relock workflow (agents never resolve lockfiles), Dependabot
  • Opt-in, sanitised telemetry error reports (a source for the Ops agent)

To build

  • AGENTS.md, docs/adr/ (ADR-0001: this workflow), role skills
  • Label set (status:*, risk:*, agent:*, runner:*) + actions/labeler path rules
  • CODEOWNERS and a main ruleset (R1/R2 human review)
  • Hosted agent-*.yml workflows that load the same skills
  • changelog.d/ fragments + assembly step (done)
  • RELEASE_HOLD check in release.yml (done)
  • Spec comment template (done)
  • Website page contributing/workflow.md updated with the result