MMDEP Cloud Layer (MCL)
1. Purpose
A layer of MMDEP that runs entirely on services we don't operate, so it never sleeps. It does four jobs:
- Review and sort: review documents and code, decide what is within delegated authority, and park the rest with its dependency named.
- Move projects: find each project's blockers and move work in order of relative priority.
- Run the resources: watch performance and usage limits, balance load across projects and agents, rearrange roles and fallbacks, and flag orphan activity that wastes resources.
- Plan the next cycle: write the triage and the action plan.
Cadence: once a day normally; hourly while Atul is away (idle mode).
2. Design rules
- Deterministic first. Scripts collect facts: issues, PRs, labels, CI state, ages, usage counters. A model never "looks around" to find facts.
- Cheapest capable engine. Rules → Gemini Flash-Lite (paid tier) → ChatGPT or Gemini Flash → Claude. Claude is used only for judgement.
- Claude is protected. Claude chat, Claude Code and the desktop app draw on one shared usage allowance, with a 5-hour window and a weekly cap. Scheduled cloud runs are assumed to draw on it too. Unattended jobs therefore use Claude sparingly and never during Atul's working hours (§7).
- Nothing irreversible. MCL labels, comments, opens issues and drafts plans. It never merges, deploys, closes another person's work, spends money or changes priorities: those stay Atul's decisions.
- Two homes of truth. Content stays in repositories. MCL's state is versioned files in a control repository. When the MMDEP hub is hosted, the same records sync into it (§9).
- The same rules in both modes, daily and hourly. Only the cadence and the budget change.
3. Services used (none to operate)
| Service |
Role in MCL |
Cost |
Notes |
| GitHub Actions (private control repo) |
Scheduler and runner: collectors, rules, Gemini calls, label actions |
Free plan includes 2,000 minutes a month for private repos (secondary source, June 2026; check GitHub's billing page) |
Hourly idle mode ≈ 720 runs × ≈ 1 min plus daily jobs ≈ 150 min; fits. Self-hosted runners now carry a per-minute fee |
| GitHub and GitLab REST APIs |
Facts for all 12 repositories |
Free |
GitLab through a read-only token (read_api), so GitLab visibility no longer depends on Atul's laptop |
| GitLab CI |
Project tests and pipelines for GitLab projects only |
400 compute minutes a month per namespace on Free |
Tight (the governance repo ran out in September); MCL itself doesn't run there |
| Gemini API (paid tier) |
Bulk reading: PR and document summaries, classification, task shaping, the AC-1 audit |
Cents per run with Flash-Lite |
Paid terms (not used for training) once billing is enabled |
| ChatGPT (scheduled and event tasks, Codex cloud, GitHub connector) |
Project work, its own triage tasks, second-vendor review |
Existing plan |
5 active scheduled tasks on Plus |
| Claude (this chat; scheduled cloud sessions) |
Daily judgement, the PM role, independent review where Claude is the different vendor |
Existing plan, shared allowance |
Capped by §7 |
| Google Workspace (Sheets, Apps Script, Drive) |
Dashboard view for Atul's phone; optional |
Free |
Read only; fed from the control repo |
| MongoDB Atlas (free cluster) |
Not needed now |
Free tier |
Only if the state outgrows files; another account and secret to manage |
| Claude artifact dashboard |
Atul's workplace view, updated by the daily Claude run |
Included |
Shows state even when Claude's allowance is used up |
4. Architecture
┌──────────── control repo: moneymarche-dev/mmdep-control (private) ─────────────┐
schedules │ config/ projects.yaml (priority, repos, roles, fallbacks, WIP limits) │
(Actions) │ resources.yaml (agents, tools, budgets, working hours) │
│ │ policy.yaml (authority matrix §5) │
▼ │ state/ YYYY-MM-DD/HH snapshots (JSON), ledger.jsonl, triage.md, plan.md │
S1 Collect ─► S2 Rules ─► S3 Classify (Gemini) ─► S4 Judge (Claude, daily) ─► S5 Act ─► S6 Report
GitHub blockers, summaries, decide- confirm decisions, labels, digest issue,
GitLab review debt, or-park, shaping, priorities within comments, dashboard,
CI status WIP, orphans, draft triage delegation, action plan work-request phone
usage rule breaks issues notification
└──────────────────────────────────────────────────────────────────────────────┘
Work itself is done by the project agents (ChatGPT, Codex cloud, Claude cloud sessions, Gemini audits, people);
MCL assigns and watches. Atul decides in GitHub/GitLab (PR reviews, labels) and in the MMDEP hub when at his desk.
Stages
| Stage |
Engine |
Normal mode |
Idle mode |
Output |
| S1 Collect |
Python script in Actions |
Daily, 05:30 IST |
Hourly |
state/<date>/<hour>.json: issues, PRs, labels, CI runs, commits to main, ages; usage counters |
| S2 Rules |
Python |
Daily |
Hourly |
Blockers, review debt, WIP breaches, label-rule breaks, orphans, priority scores |
| S3 Classify |
Gemini Flash-Lite, then Flash |
Daily |
Every 3 hours |
Per item: summary, decidable or park (with dependency), shaped work requests, draft triage |
| S4 Judge |
Claude (cloud session) |
Daily, before 07:00 IST |
Daily, plus at most 2 escalations a day |
Decisions within delegation, priorities, action plan, items for Atul |
| S5 Act |
Python, bounded writes |
After S2/S4 |
After S2 (rule actions only), after S4 |
Labels, comments, work-request issues, fallback reassignments |
| S6 Report |
Python + Claude summary |
Daily digest |
Daily digest plus hourly alerts only for red items |
Pinned digest issue (phone notification), dashboard update |
5. Decision authority
| Class |
Examples |
Who decides |
Reversible |
| A. Automatic (rules) |
State labels; WIP enforcement (state:paused on new work beyond the limit); request a review from the role's reviewer; mark orphan candidates; order queues by priority |
MCL, S5 |
Yes; logged |
| B. Delegated (within policy) |
Move a task to the role's fallback agent when the primary is out of capacity; split an oversized request; re-run a failed CI job once; recommend batch-merge of documentation PRs that passed independent review |
MCL, S4 (Claude) |
Yes; logged and in the digest |
| C. Park with dependency |
A decision missing, a cross-project dependency, missing access, a spec conflict, an unclear acceptance criterion |
MCL labels state:blocked and adds blocked-by: with the link |
— |
| D. Escalate to Atul |
Approvals, merges, releases, deployments, spend, priority or role changes, anything touching production, security findings, deleting or closing others' work |
Atul (state:needs-atul) |
— |
Reviews follow the same classes. A documentation PR with consistency fixes that passed an independent review is class B: a batch-merge is recommended, and Atul approves the batch. A code PR is always class D.
6. Priority and load balancing
Priority score for each open work item:
score = project_weight × (1 + blocks_others) × age_factor × readiness
project_weight : set by Atul in projects.yaml (for example Website 5, MCRM 5, MMDEP 4, PE 3, TEA 3)
blocks_others : number of items in other projects waiting on it (cross-project dependencies)
age_factor : 1.0, rising 10% a day after 3 days in the same state, capped at 2.0
readiness : 1 if the issue is self-contained (context pack, acceptance), 0.3 if it needs shaping
Capacity for each resource, per day, in resources.yaml:
- Claude units (§7);
- ChatGPT task slots;
- Gemini spend (USD);
- Actions minutes;
- GitLab CI minutes;
- review slots per reviewer.
Allocation: highest score first, to the role's primary agent if it has capacity, otherwise to the next in its fallback list. The §5C staffing rule always holds: one coder per code repo, and the reviewer from a different vendor than the author.
Orphans: activity that uses resources with no owner or purpose, flagged in the digest and never deleted automatically:
- PRs or branches idle for more than 14 days;
- CI pipelines failing three times in a row;
- issues in-progress for more than 3 days without commits;
- duplicate work on the same issue;
- scheduled tasks with no output.
7. Protecting Claude credits and Atul's workplace
| Rule |
Detail |
| Claude does judgement only |
Collection, rules, summaries, shaping and bulk review go to scripts, Gemini or ChatGPT. Claude does S4, the PM work in this chat, and reviews where Claude is the only different vendor available |
| A reserve for Atul and the PM chat |
Unattended Claude use is capped at about 15–20% of the weekly allowance in normal mode and 40% in idle mode. Measured as runs per day, because no usage API exists; Atul reads the usage page weekly and the cap is adjusted |
| Working hours are protected |
No unattended Claude runs between 09:00 and 22:00 IST on days Atul works. The daily judge runs at about 06:00 IST |
| Hard stop |
If a Claude run fails because of the usage limit, unattended Claude pauses until the next weekly reset, and the work falls back to ChatGPT or Gemini; the digest says so |
| The workplace doesn't depend on Claude |
The digest issue and the dashboard are plain data, readable even when Claude's allowance is used up. A ChatGPT project can read the same state as a fallback workplace |
8. Atul's workplace
- Primary: this chat (the PM role) plus the dashboard: a Claude artifact or a Google Sheet, fed by the control repo.
- On the phone: the pinned digest issue (GitHub notifications), plus PR reviews and labels in the GitHub and GitLab apps.
- At the desk: the MMDEP hub for items and releases.
9. Two cases: with and without a hosted MMDEP and MCP
|
Without (now) |
With a hosted hub and MCP (phase 2: Bluehost; or a Lightsail VM) |
| State |
Files in the control repo, plus issues and labels |
The hub's store (projects, items, tasks, ledger); the control repo keeps the configuration |
| Approvals |
PR reviews and labels; MMDEP items when Atul is at the desk |
The same, plus MMDEP items approved from chat through MCP (Atul's identity only, OAuth) |
| Chats |
Read GitHub directly (Claude, ChatGPT connector) |
Call MMDEP tools: list items, raise items, see the board |
| Real time |
Daily or hourly snapshots |
Live |
| Single inbox |
No: GitHub, GitLab and the hub |
Yes |
| What it needs |
Nothing new beyond tokens |
Hosting, OAuth, a security review (§15B phase 2; DR-003 B2) |
Designed to switch, not to be rebuilt: MCL's records (projects, items, tasks, ledger) use the hub's fields. Hosting the hub later changes where MCL writes, not how it works.
10. Security
| Risk |
Control |
| Tokens in Actions |
Actions secrets (readable only by workflows): a GitHub token for the agent account, scoped to the repos and to issues and PRs (no contents write for MCL); the GitLab read_api token; the Gemini key. Never in files, the state or logs |
| MCL acting as Atul |
MCL uses an agent account, not Atul's. Every write carries a header and trailers naming MCL and the stage |
| Prompt injection |
Issue and PR text is data: S3 and S4 output proposals, and S5 executes only actions on the policy's allowlist |
| Data class |
The state holds metadata (titles, labels, ages, links), not file contents. Paid Gemini for private content. No client data anywhere |
| Runaway |
Caps per run (items, writes, model calls); a kill switch: the repo variable MCL_ENABLED=false |
11. Cost estimate (monthly)
| Item |
Cost |
| GitHub Actions |
0, within the free minutes (check) |
| Gemini API (paid tier) |
A few USD (Flash-Lite at our volumes) |
| GitLab read token, Google Sheet |
0 |
| Claude, ChatGPT |
Existing plans (Claude capped by §7) |
| Total new spend |
About USD 5 a month, plus GitHub Pro (≈ USD 4) if chosen for repository protection |
12. The PM role in three layers (as Atul set it)
| Layer |
Work |
Cadence |
Outputs |
| Foundation and research |
Tool and vendor evaluation, limits and prices, decision records, the horizon scan |
Weekly, plus on demand |
docs/research/, DRs |
| Architect and designer of MMDEP |
Spec, workflows, controllers, the label and role scheme; making sure projects actually use them (AGENTS.md, templates, checks) |
Per iteration |
Spec changes by approve item; designs; Work Requests to Claude Code |
| Oversight |
Daily triage (S4), decision review, dependencies and blockers, resource deployment, Atul's daily brief |
Daily |
Digest, action plan, items for Atul |
13. Gaps this design fills (from earlier discussions)
- GitLab visibility without the laptop (read token).
- Agent accounts for honest identity and real protection.
- An independent-review capacity (MCRM's backlog) as a scheduled, budgeted process.
- Orphan detection (duplicate clones are local: the gatekeeper script covers those; MCL covers forge-side orphans).
- A usage view across vendors.
- A kill switch.
- The same records as the hub, so hosting the hub later is a switch, not a rebuild.
14. Plan
| Step |
What |
Who |
When |
| 0 |
Atul's decisions (§15) |
Atul |
11–12 Oct |
| 1 |
Control repo, projects.yaml and resources.yaml first draft |
Reviewer (docs and config), Atul approves |
12 Oct |
| 2 |
S1 and S2 collectors and rules, S5 rule actions, S6 digest, as GitHub Actions workflows (story MCL-1 [H], approve item) |
Claude Code |
12–14 Oct |
| 3 |
S3 Gemini classification (after the paid key) |
Claude Code |
14 Oct, or after the vacation |
| 4 |
S4 daily judge as a Claude scheduled session, with the §7 caps |
Reviewer drafts the prompt; Atul approves the scheduled task |
14 Oct |
| 5 |
Dry run in normal mode; switch to idle mode on 16 Oct |
Atul checks |
15 Oct |
| 6 |
Review after the vacation: usefulness, cost, Claude usage, misses |
Atul and reviewer |
31 Oct |
15. Decisions for Atul
- Accept MCL as the cloud layer, with GitHub Actions as its runner and a private control repo
mmdep-control?
- Project weights for the priority score: Website, MCRM, MMDEP, Portfolio Engine, TEA, WPDev, others?
- The Claude reserve: unattended Claude capped at about 15–20% normally and 40% while you're away, with no unattended Claude runs 09:00–22:00 IST on your working days?
- Dashboard: a Claude artifact (your workplace in Claude) or a Google Sheet (phone-friendly, independent of Claude), or both?
- A GitLab read-only token and a GitHub agent account, created by you before 14 Oct?
- Build steps 1–5 before 16 Oct (tight; Claude Code needs about 2–3 days), or run the vacation on the simpler plan (cloud review sessions plus the digest) and build MCL after?