Skip to content

DR-006 — One MMDEP

Converted from docs/decisions/DR-006-one-mmdep.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

Models and tools (Atul, 14 Oct)

Local models are deferred. The controller runs on GenAI Flash-Lite (Flash only for escalations; see docs/registers/capacity.md). Development goes to Claude online through GitHub issues the controller files, and partly to the GenAI API. The tool set and agents are in docs/registers/tools-and-agents.md.

Terminal jobs for agents (Atul, 14 Oct)

Agents must be able to run tests and scripts without a person, through MMDEP:

  • GitLab projects (API, MM-Cron, sandbox, webapp-sakai): pipelines and scheduled pipelines on the laptop runner (laptop,docker). Agents trigger pipelines on their branches; recurring jobs run on a schedule; on-request jobs (for example MWMC's route crawler, run after major releases) are manual pipeline jobs. CI changes are merged by Atul.
  • Other projects (MMDEP, PE, MCRM on GitHub, or anything needing the laptop): mmdep jobs, a small allow-listed job runner. An agent asks with an issue labelled run-job naming a registered job and its inputs; MMDEP runs it on the laptop (isolated, time-limited, no secrets in output) and posts the result and files back to the issue. Only jobs in the register run; adding a job is a reviewed MR.
  • Every job is recorded in the hub ledger and appears in the capacity register (runner time).

Options

Not stated separately in the original record.

Decision

Direction (Atul, 14 Oct)

  1. The hourly collector and the CLI-era MMDEP orchestrator are parallel work: bring them together.
  2. The MMDEP Actions panel (Claude artifact) and the MMDEP inbox (hub items) are parallel work: bring them together.
  3. MMDEP needs its controller for automatic orchestration, using the Google GenAI (Gemini) API, as demonstrated in the PE controller/worker pilot.
  4. No Claude CLI for coding in this phase: Claude (chat) codes directly in the repository, pushes, and runs it on Atul's desktop through the device link. A web version of the MMDEP inbox with the panel's features follows.

Target shape

             +------------------------------------------+
             |  MMDEP hub (SQLite store, mmdep.db)      |  one truth for items, answers,
             |  items · answers · ledger · summary log  |  ledger, achievements, milestones
             +------------------------------------------+
               ^            ^              ^           ^
   mmdep collect      mmdep control    mmdep run    web inbox (later)
   (was collector)    (Gemini triage)  (dispatcher) (panel features)
   hourly on laptop   after each       per project  read/answer from phone
   probes, CI, issues collect          pass
  • mmdep collect: the collector moves into the mmdep package as a command; it writes its findings to the hub as well as latest.md.
  • mmdep control: a Gemini-backed controller for routine work: classify findings into items, route question-atul / ask-<project> requests, append achievements, keep "meanwhile" lines, draft the executive summary. It never approves, merges or touches production. Claude handles judgment items in batches.
  • Panel ↔ hub, short term: the artifact stays the UI; Claude syncs it with the hub in each session (ArtifactData ↔ hub). Long term: a web inbox reading the hub directly, with the panel's features (summary, search, purple replies, Submit).
  • Hosting the web inbox: decided later (laptop with a tunnel, Bluehost behind a password, or the AWS tools server from DR-004).

Rules that change (need Atul's approval)

  • Claude may code on iter-NN/<slug> branches in MMDEP, push to GitHub, and run tests and commands on the desktop through the device link. Merge to main still needs Atul's approval, now given as a panel item instead of a hub approve item.
  • The runtime (mmdep_runtime) and the hub database stay untouched until a release is approved; phase 1 runs from the repository checkout (ai-sandbox\mmdep).
  • Gemini receives only programme coordination data (titles, statuses, findings); never client data or secrets.
  • DR-005 (Google Sheet + Apps Script) is withdrawn; its delegation table moves to mmdep control.

Consequences

Inbox sources (Atul, 14 Oct)

The MMDEP inbox brings together three sources:

Source Covers Direction
GitHub issues of moneymarche-dev/MMDEP The MMDEP project itself (its own tasks, questions, approvals) Two-way: inbox items link to issues; the controller creates and updates issues (also the route for Claude-online development tasks)
Collector output All other projects (API/MM-Cron, MWMC, MCRM, WPDev, PE): probes, CI, MRs/PRs, question-atul and ask-<project> issues One-way into the inbox; answers go back through answers.md and the agents
MMDEP Actions panel Atul's decisions, answers, summary, search Two-way, synced with the hub

Phases (small iterations, each tested on the desktop)

Phase Deliverable Claude effort
1 Collector moved into mmdep (mmdep collect), still writing latest.md; scheduled task points to it 1 session
2 Hub tables for summary log and milestones; collector findings become hub items; Claude syncs panel ↔ hub; mmdep jobs with the first registered jobs 2 sessions
3 mmdep control with Gemini (free-tier key already on the laptop): triage, routing, summary 2 sessions
4 Web inbox (read and answer), hosting decided 2–3 sessions