# Agent Coordinator

> A coordination layer that puts available agent capacity to work across automatable software-development tasks and carries them to verified outcomes

- HTML version: https://robbiepalmer.me/projects/agent-coordinator
- Status: in_progress
- Started: 2026-09-04
- Updated: 2026-11-01
- Technologies: t3-code

Read the shorter [project pitch deck](https://robbiepalmer.me/projects/agent-coordinator/deck.md).

# Vision

Keep available agent capacity working on the most valuable automatable
software-development tasks, and carry each task through a verified outcome
without requiring a person to supervise every step.

The Agent Coordinator covers coordination across the software-development
lifecycle. It selects work that suits agents, allocates available reasoning
capacity, owns continuity across sessions, and decides when evidence proves the
outcome. It can coordinate planned work from the Work Graph or react to an
external event. It does not rebuild execution machinery that the chosen agent
runtime already provides.

# First product outcome

The first workflow resolves severe dependency vulnerabilities across my
projects. GitHub's Dependabot alerts provide the security signal. Renovate
remains the deterministic dependency-update layer. The coordinator adds the
judgment Renovate lacks when a safe update needs application changes, a broken
proposal needs repair, or the result must be deployed and checked.

For each admitted alert, the controller will:

* confirm the current alert, affected dependency, severity, and available fix;
* inspect open Renovate pull requests and decide whether one resolves the alert;
* launch a T3 Code worker thread in an isolated worktree when code changes are
  needed;
* repair, replace, or create the pull request required to resolve the alert;
* merge after the repository's required checks and review policy pass;
* follow the resulting deployment and run project-specific validation; and
* record enough evidence to explain the outcome and recover from failure.

Normal execution does not wait for a human approval. The agent may merge,
deploy through the repository's established delivery path, validate production,
and repair or revert a failed rollout. It asks for attention when authority is
missing, the safe outcome is genuinely ambiguous, or repeated recovery has not
worked.

This choice is recorded in
[PDR 001](/projects/agent-coordinator/pdrs/001-severe-vulnerability-resolution).

# Why the direction changed

The original plan treated
[advisory Work Graph routing](/projects/agent-coordinator/pdrs/000-advisory-work-graph-routing)
as the first release. A pilot showed that this eagerly picked up exploratory
architecture, prose, UX, and other work that still needed substantial human
judgment. The coordinator created a backlog of agent output to review instead
of completing outcomes on its own.

There is more immediate value in work that agents can perform well and verify
without routine human input. Dependency remediation is the first example.
Codebase analysis followed by bounded refactoring, failing delivery workflows,
and other tasks with machine-checkable outcomes can follow.

T3 Code can now receive signed webhooks, filter and deduplicate deliveries,
hold them while an environment is temporarily offline, bind an automation to a
controller thread, launch top-level threads with managed worktrees, monitor
subscription limits, resume work after limits reset, continue interrupted
threads after a restart, and wake threads for pull-request events. A capable
controller thread can also query the Work Graph for safe ready work and fan it
out directly. Rebuilding that machinery would create a weaker copy of the
product already running the agents.

The broader coordination goal remains. The project now starts with task classes
whose outcomes can be evaluated without creating another human review queue. It
supplies policy for choosing that work, deciding what outcome is required,
coordinating agents, and judging the resulting evidence.

# System boundary

```mermaid
flowchart TB
GitHub["GitHub security and delivery events<br/>Dependabot alerts, PRs, workflows, deployments"]
T3Connect["T3 Connect webhook relay<br/>Signature, filters, replay protection,<br/>offline holding"]
Controller["Security controller thread<br/>Admission, policy, correlation,<br/>recovery decisions"]
Workers["T3 Code worker threads<br/>Investigate, change, review,<br/>merge, deploy, validate"]
Renovate["Renovate<br/>Deterministic update proposals"]
WorkGraph["Work Graph<br/>Incident state and evidence,<br/>written on events"]
Systems["Repositories and deployed systems"]

GitHub --> T3Connect --> Controller
Controller -->|"launches and steers"| Workers
Renovate -->|"candidate pull requests"| Workers
Workers -->|"changes and delivery actions"| Systems
Systems -->|"observed results"| GitHub
Controller -->|"incident transitions"| WorkGraph
Workers -->|"PR and validation evidence"| WorkGraph

classDef managed fill:#2563eb,color:#fff,stroke:#1d4ed8
classDef owned fill:#7c3aed,color:#fff,stroke:#6d28d9
classDef external fill:#475569,color:#fff,stroke:#334155
class T3Connect,Workers managed
class Controller owned
class GitHub,Renovate,WorkGraph,Systems external
```

T3 Code is the execution control plane. It owns providers, authentication,
sessions, scheduled webhook delivery, thread lifecycle, worktrees, and native
pull-request watching. The Agent Coordinator is a project-specific controller
implemented through T3 Code threads and a small amount of integration code.

The Work Graph remains useful, but it is no longer the launch queue. It receives
incident transitions and observed GitHub evidence. The controller reads it when
correlation or recovery needs durable state. No process repeatedly polls Neon
for work. A low-frequency reconciliation may repair missed events, but normal
execution begins with a webhook.

[ADR 001](/projects/agent-coordinator/adrs/001-t3-code-orchestration-control-plane)
defines the T3 Code boundary. [ADR
002](/projects/agent-coordinator/adrs/002-event-driven-incident-ledger) defines
the event-driven Work Graph boundary.

# Authority model

Authority follows the owning repository and deployment target. The personal
projects have no external users today, so the initial policy favours completing
the outcome over waiting for routine review.

An admitted worker may modify code and dependencies, push branches, open or
replace pull requests, respond to review, merge, invoke established deployment
workflows, inspect production, and revert its change. It must still respect
branch protection and repository checks. It may not weaken those controls,
dismiss the security alert as a substitute for fixing it, or claim success from
a green pull request when the deployed system has not been checked.

Later repositories can narrow this authority. The coordinator should make the
active policy visible rather than encode one universal risk threshold.

# Controller and worker roles

The long-lived controller thread handles short decisions and coordination. It
validates the current external state, deduplicates incidents, records the owning
thread, and routes later workflow or deployment events. It should avoid doing
large implementation work in its shared checkout.

A worker thread owns one admitted outcome. It investigates the alert, chooses
between a Renovate proposal and an agent-authored change, runs the repository's
checks, settles the pull request, merges, and remains responsible until
deployment validation passes. It may launch focused research, review, or
recovery threads when parallel work shortens the path to the outcome.

The thread hierarchy records live operation. Work Graph and GitHub retain the
durable incident, pull request, commit, workflow, deployment, and validation
identities needed to reconstruct what happened.

# What remains to build

T3 Code supplies the public webhook URL and delivery controls. The project
still needs:

1. A controller prompt and policy that admits the configured repositories,
   severities, and alert states.
2. GitHub queries that retrieve the authoritative alert and identify Renovate
   pull requests that may resolve it.
3. A durable mapping between alert, controller decision, worker thread, pull
   request, merge commit, deployment, and validation result.
4. Repository-specific merge, rollout, smoke-test, and rollback contracts that
   agents can discover and execute.
5. Event routing that returns workflow and deployment outcomes to the worker
   responsible for the incident.
6. Evaluation records for successful fixes, unnecessary launches, failed
   rollouts, recoveries, human interventions, time, and model cost.

The existing Work Graph poller, custom launcher, and provider-session package
remain useful while the T3 Code control plane is being built. Do not extend
them with orchestration features that T3 Code already supplies. Remove them
after the replacement can admit, launch, resume, and complete real work. At
that point Git history is enough, and the project should not maintain two
orchestration paths as fallbacks for each other.

# First release

The first release will connect one personal repository and one always-on Vector
T3 Code environment. It will accept severe Dependabot alerts through a signed
T3 Code webhook, use one persistent controller thread, and allow one incident
worker at a time until the complete loop has survived real alerts.

Success means the system can take an admitted alert to one of three honest
outcomes:

* the existing Renovate change is merged, deployed, validated, and closes the
  alert;
* an agent-authored replacement reaches the same verified result; or
* the agent records why no safe fix can currently ship and requests the exact
  missing judgment or authority.

The first release is not successful merely because it creates pull requests.
Production validation and recovery behaviour are part of the product.

# Later expansion

Once vulnerability remediation works, expand across automatable
software-development tasks. Candidates include failing delivery workflows,
production regressions, stale high-value pull requests, dependency migrations,
codebase analytics followed by bounded refactoring, and ready Work Graph tasks
with objective completion checks.

General allocation remains part of the project. The coordinator should use
available capacity where it can finish or precisely evaluate the result. Work
that depends on open-ended product, design, architecture, or editorial judgment
should remain visible for human direction instead of being fanned out merely
because agents are idle.

# Non-goals

* Rebuilding T3 Code's provider, session, webhook, worktree, or PR-watch layers
* Maximising the number of active agents or consumed subscription tokens
* Replacing Renovate's deterministic dependency discovery and proposal engine
* Polling Work Graph as the normal way to discover security events
* Treating pull-request creation or merge as sufficient delivery evidence
* Granting every repository the same merge, deployment, or rollback authority
* Filling a human review queue with work that lacks an objective completion test

## Initiatives

- [Semi-autonomous Software Development](https://robbiepalmer.me/initiatives/semi-autonomous-software-development.md): A connected system that keeps useful work moving, asks for human judgment when it matters, and learns how to need less intervention next time

## Architecture Decision Records

- [ADR 000: Use provider-supported authentication for routed sessions](https://robbiepalmer.me/projects/agent-coordinator/adrs/000-provider-supported-session-routing.md) — Accepted, 2026-09-19
- [ADR 001: Use T3 Code as the orchestration control plane](https://robbiepalmer.me/projects/agent-coordinator/adrs/001-t3-code-orchestration-control-plane.md) — Accepted, 2026-10-30
- [ADR 002: Write incident state from events instead of polling for work](https://robbiepalmer.me/projects/agent-coordinator/adrs/002-event-driven-incident-ledger.md) — Accepted, 2026-10-30

## Product decisions

- [PDR 001: Own severe vulnerability remediation through production validation](https://robbiepalmer.me/projects/agent-coordinator/pdrs/001-severe-vulnerability-resolution.md) · Accepted
- [PDR 000: Start with advisory matching for ready Work Graph tasks](https://robbiepalmer.me/projects/agent-coordinator/pdrs/000-advisory-work-graph-routing.md) · Superseded

---

Markdown index of this site: https://robbiepalmer.me/llms.txt
