Skip to content

DR-002: Agent platforms and automation

Converted from docs/decisions/DR-002-agent-platforms-and-automation.md to MADR (backlog B25). The text is unchanged; its sections are grouped under the MADR headings below, in their original order within each group.

Context

1. Question and trigger

Which AI tools, forge features and channels does MMDEP use, for which roles, and how do agents hand work to each other without a person relaying every step?

Trigger (5 Oct 2026): Copilot, Codex and Gemini CLIs and a working Gemini API key are all available on the desktop; local models are paused (memory); ChatGPT event-triggered tasks and Claude Remote Control were identified; the manual prompt relay between agents remains the main waste (golden rule 4).

2. Evidence

Tool Unattended Resume / steer Scheduling and triggers Forge integration
Claude Code claude -p, JSON output, permission flags --resume <session-id>; Remote Control from phone or browser Routines (cloud: schedule, API, GitHub events), desktop scheduled tasks, /loop GitHub Actions; gh/glab
Codex CLI codex exec codex exec resume via ChatGPT tasks; Codex cloud GitHub PR review, cloud tasks
ChatGPT Scheduled tasks with connectors (GitHub, Gmail, Slack, Drive) chat Hourly on paid plans; event-triggered on GitHub, Gmail, Slack activity (up to 30 runs/hour, Plus and above); 5 active tasks on Plus; push/email notifications connectors
Copilot copilot -p (CLI, GA) session via GitHub Coding agent: issue assigned → PR (Pro and above); credits per month
Gemini CLI / API gemini -p, JSON output limited GitHub Action run-gemini-cli; API from scripts GitHub Action
GitHub / GitLab (free, private) Actions / CI, webhooks, REST APIs — events, schedules —
SSH (AWS, Bluehost) scripts — cron / CI —

Constraints from the spec: data class is a hard block (§5B; free tiers = public and synthetic only); no agent holds deploy or production write credentials (§15.7); only a person approves, merges, deploys; one lead and one coder per project (§5C).

Options

3. Options considered

  1. MMDEP as the message bus (items only; MMDEP pushes to every agent itself). Full control, but rebuilds what forges and vendors already provide (against golden rule 2).
  2. Forge as the bus, MMDEP as the conductor. Issues, labels and PRs carry work between agents; vendor triggers (ChatGPT events, Copilot agent, Actions, routines) provide push; MMDEP defines workflows, enforces roles, budgets and gates, and records everything in the ledger. Chosen.
  3. One vendor's agent platform for everything. Simplest, but lock-in and a single point of failure (§16A routing stays in MMDEP).

Decision

4. Decision

  1. Forge as the shared bus; MMDEP as the conductor. Resolves experiment E1 (§19). MMDEP items remain for approvals, local-only work and anything that must not be on a forge.
  2. Sandboxes, not self-hosting. Two blank private sandbox repos (GitLab.com Free, GitHub Free) for workflow tests before any real repo. No self-hosted GitLab (memory) or GitHub (Enterprise only).
  3. Role and budget allocation:
Role Primary Backup Budget rule
MMDEP development (phase 1) Claude Code — Sonnet default
Project lead / architect Claude or ChatGPT/Codex, one per project (§5C) the other per-project weekly cap
Coding the project's coder; Copilot coding agent for scoped GitHub issues Codex Copilot credits monthly, with reserve
Programme manager / triage ChatGPT scheduled and event tasks Gemini 5 task slots: triage, digests, TEA reminders
Review (different vendor from author) Codex or Copilot Gemini (public/synthetic only) —
Bulk reading / drafting Gemini 3.5 Flash / Flash Lite (free quota) — public and synthetic data only
TEA collectors scripts over SSH and read-only APIs — no AI cost
  1. Relay rules for agent-to-agent work: structured records only (issue or item with a fixed format), never raw chat; a maximum number of turns per task; a budget check before each metered call; a person decides at merge, deploy or spend.
  2. Human relay: MMDEP inbox (dashboard or CLI) with phone push for approvals; email digests from ChatGPT tasks; Claude Remote Control to steer running Claude sessions. Slack later, only if needed.
  3. SSH: a dedicated read-only collector user per server, key restricted to forced commands (allowlisted scripts), for TEA. Deployment, testing and performance changes stay with CI or a person (§15.5, §15.7).
  4. First real use: weekly cross-project triage plus a TEA estate report, after H1. Real development (Portfolio Engine on GitHub) after the sandbox workflows are proven.

Consequences

5. Plan

Stage What runs Gate
0 H1 harness spike; combined release (Drive, worktree access, feedback) H1 shows fewer relay steps
1 (≈2 weeks) Sandbox forge bus: ChatGPT event task triages labelled issues; Copilot agent issue → PR; review by another vendor; MMDEP mirrors to the ledger every step in the ledger; no unapproved merge
2 Weekly triage + TEA report on real repos (read-only) 4 weekly cycles; Atul's relay time measured
3 One real development project through the harness phase 1 exit criteria (D6)
4 More projects; reallocation by priority; Claude freed from MMDEP —

6. Revisit triggers

  • A vendor changes plan limits, prices or data terms for a tool in the table.
  • Copilot credits or a ChatGPT task slot run out two months in a row.
  • A local model host or online server is provisioned (local models return to routing, §5B).
  • A forge feature replaces something MMDEP built (golden rule 2).
  • An agent-to-agent loop or unapproved change is observed (tighten relay rules).