Charlie Roffe

Principal Architect & Engineering Director · Cloud & AI

Madrid, Spain · LinkedIn · GitHub

ADR-028: AI-Assisted Engineering — Agents as Contributors, the Pipeline as the Trust Boundary

Context

Every other ADR governs the AI in the product — model selection (ADR-005), sandboxing (ADR-010), EU AI Act transparency (ADR-013), agentic orchestration (ADR-024/025). None records how the product itself is made, and the making is the more topical decision: this repository is substantially authored by AI coding agents. The git history shows it plainly — 167 mainline commits carry explicit Co-authored-by trailers naming a Claude model, across 300+ pull requests merged in roughly six weeks by a single accountable human. The question this raises is the one every engineering organization is currently wrestling with: not whether AI can write production code (it demonstrably does, here), but under what governance model AI-written changes can be trusted in production. That model has been in place since the first commits; this ADR records it.

Decision

Treat AI agents as first-class contributors under a governance model where trust attaches to verification, not to authorship — the delivery pipeline, not the author's identity, is the trust boundary.

1. Roles: agents implement; the human sets intent, makes the architectural decisions (this ADR library), reviews every diff, and merges. No agent change reaches main without human review — an agent cannot answer for a production incident, so it is never the last set of eyes.
2. Provenance on the record: agent-assisted commits carry Co-authored-by trailers naming the specific model, making git history a verifiable audit trail of which changes were agent-assisted and by what.
3. Identical gates for every author: agent changes pass exactly the gates human changes do — type-check, tests, production build, Playwright E2E, Semgrep, Trivy, npm audit, Gitleaks, and terraform plan for backend changes (ADR-012, ADR-020); the Docker image is built once, on the push to main. No softer path, no quarantine.
4. Agents hold no production power: deployment is keyless CI-only OIDC (ADR-008/009) so there are no credentials to leak, and production promotion is a human-only v* tag on a cosign-verified digest (ADR-021): the tag is created when a person clicks Publish on a draft release, since required reviewers on GitHub environments are not available on this plan. Agents open pull requests; merging stays with the human, and agents cannot publish a release or change cloud state. The failure domain of a misbehaving agent is a rejected pull request.
5. Context is engineered, not tribal: the ADR library doubles as durable agent context (with a sync guard keeping the public copy honest), the release runbook is a version-controlled agent skill, and agent permissions are reviewable configuration in the repository.

Amended 2026-10-16: releases are prepared by the "Prepare release draft" workflow, which an agent session may dispatch; only a person can publish the draft and so create the v* tag. Agent sessions also have read-only production telemetry through a dedicated read-only GCP service account (logging, monitoring, error reporting and Cloud Run viewer). Its token is injected by the session's egress proxy from a network secret, so no key is stored in the repository or on a development machine, and it cannot change cloud state. This is configured outside the repository.

Consequences

Benefits:
* Team-scale throughput under solo accountability: 300+ merged PRs in about six weeks, spanning application code, Terraform, CI, and a 30+-record decision library.
* The portfolio demonstrates the answer, not just the claim: a working, inspectable governance model for AI contributors — provenance trailers, identical gates, human-gated promotion — which is precisely what organizations adopting AI engineering are asking for.
* ADR discipline compounds: because decisions are recorded, agents reproduce them instead of re-deciding them; drift shows up as a reviewable contradiction, not silent divergence.

Trade-offs:
* Review concentrates on one human: the gates catch classes of defects, not design drift or plausible-but-wrong logic — small PRs and ADR discipline mitigate, they do not guarantee.
* Plausible-but-wrong is the characteristic failure mode: code that compiles, passes existing tests, and is subtly incorrect; tests and staging verification bound the risk without eliminating it.
* Provenance is self-reported: trailer coverage is a floor, not a ceiling — it understates agent involvement and cannot prove the absence of assistance.

Alternatives considered

1. Undisclosed AI assistance: Rejected — it would contradict the transparency posture this site applies to its own AI features (ADR-013) and forfeit the most relevant demonstration the portfolio can make.
2. Fully autonomous operation (agent-approved merges, agent-triggered releases): Rejected — accountability cannot be delegated to a tool; the two human gates (PR review, v* promotion) are deliberately where judgment and liability live.
3. Prohibiting AI authorship: Rejected — it would forfeit the central question this portfolio exists to answer, and the productivity delta is decisive at solo scale.
4. A quarantined pipeline for agent-authored changes: Rejected — trust must attach to verification, not authorship; if verification is inadequate for agent code, it is inadequate for human code too, and the remedy is strengthening the shared gates.

Architecture Decision Records