Sonnet standing backlog¶
Rule: when no issue is model: sonnet, state: ready, take the top unblocked item below.
1. Open an issue for it yourself, with a full routing block (risk included).
2. Implement it, then merge by risk (DR-012 §5).
3. In the same PR, tick the item here ([x], plus the issue number).
Never wait for MMDEP-PM to route. If an item turns out bigger than cx 3, split it here and do the first part. You may add items you discover (tests, refactors, small tools) at the bottom, tagged (proposed by Sonnet). You may take low-risk proposed items yourself. Medium-risk proposed items wait for MMDEP-PM's tick.
Next PROCEED: order of work (PM, 24 Oct; replaces the 22 Oct order)¶
Work docs/prompts/sonnet/S2/QUEUE.md from the top:
1. T0: unstarve the harness. Not yet done: nine issues still sit in "review", so the harness skips everything.
2. T0b: B42 model roles and per-model limits.
3. T1–T5: the sprint 2 tools for API/MM-Cron and MWMC (plan: docs/plans/sprint-2-design-harness-api-mwmc.md).
Then B39, B40, B41 (agent inbox on GitHub, post-step jobs, Actions page), then B43, B44, B45.
Write the sprint metrics after each item: harness-merged PRs per week, first-pass CI rate, cost per merged PR.
Items (top first)¶
- [x] (#73) B1 Harness: default to
openrouter/free, and record the served model. Change theopenrouter-freemodel fromauto-freetoopenrouter/free(OpenRouter's Free Models Router). Write the response'smodelfield into the ledger, for exampleopenrouter/free > minimax/minimax-m3.1-flash. Keepauto-freeas an option. See the #65 comment of 19 Oct. Risk: low. - [x] (#75) B2 Harness: per-model pass-rate table. Add a table to
harness/LATEST.mdwith, per model (and per served model foropenrouter/free): runs, passes, pass rate, average attempts and USD, this month and all time. Reusemmdep/ledger_summary.py. Risk: low. - [x] (#77) B3 Sprint status page.
mmdep sprint statusreadsdocs/plans/sprints-2026-10-18.md(the sprint 1 table) and the issues/MRs labelledsprint-1across the collector's repositories. It writesdocs/status/sprint-1.mdon branchreports: per story, the state (not started, in progress, done or blocked) with links, plus the percentage done per project. The collector runs it daily. Risk: low. - [x] (#79) B4 Collector: open-MR trend. Keep a daily count of open MRs/PRs per project in the snapshot history, and show a 14-day trend line in
latest.md(text sparkline or numbers) with a WIP limit flag. Risk: low. - [x] (#81) B5 Collector: GitLab compute minutes per group (DR-011 §3.5). Show monthly usage per top-level group, where the API allows it with the collector's token, in
latest.mdanddocs/registers/capacity.md. Record "not visible" when it doesn't. Risk: low. - [x] (#83) B6 Weekly duplicate-code report. The collector runs
tools/quality/dupes.py --jsonweekly overmmdepandtools. New duplicate groups since last week go todocs/registers/components.md§Refactoring backlog (Atul asked for periodic refactoring). Risk: low. - [x] (#85) B7 Register MMDEP's own jobs. Add
chat-backup(thetools/chat_backuprun) todocs/registers/jobs.yaml, so the jobs task runs it when an export zip appears in Downloads. Add tests with the register. Risk: low. - [x] (#87) B10 Sync
integration/sprint-1with main (do first). Merge main into it, and resolve the conflict intests/test_harness.py(main gained #65/#73/#75 harness changes after #56 and #70). Full suite and CI must be green on the integration branch. Then comment on #56 that it is ready for Atul's sprint approval, with a 5-line summary of what merging it into main changes. Risk: medium (stays on the integration branch). - [x] (#89) B11 Chat backup for the real export format (Atul's export of 18 Oct). (a) Read every
conversations*.jsonin the zip (large accounts split intoconversations-000.json,-001.json, …). (b) Take the project from the conversation'sconversation_template_id(orgizmo_id), which holds the ChatGPT project IDg-p-…. The mapping from ID to name lives in<archive>/projects.csv(id,name); chats.csv stays as an override. (c) Chats with no project are not opened or written. Only their dates and titles go toUNSORTED-TITLES.md, because they may be personal. Match what MMDEP-PM produced by hand on 20 Oct inC:\Projects\_chat-archive(INDEX.md, per-project folders, and the## Atul · time/## Agent · timemessage headings). Tests use a small fake split export. Risk: low. - [x] (#104, PR #105 in integration/sprint-2) B8 Harness on GitLab, live config (unblocked 20 Oct: Atul approved integration/sprint-1, now in main): enable the
moneymarche/apisource withlane:stagingandrisk: low. Risk: medium. - [x] (#57, PR #96 in integration/sprint-1) B9
mmdep actions sync= #57. Unblocked: Atul approved actions in the repository (GitHub) on 20 Oct. Also gatherdecision-logissues as 'FYI, veto within 48 h' (DR-014 §3.3). Build it behind a smallActionsStoreinterface (GitHub backend now; a database backend later, DR-014 §6). Risk: medium. - [x] (#92) B14 Memory checks (DR-014 §3.2). In the collector, per repository:
- flag when
docs/sessions/hasn't changed within 24 h of other commits; - flag when
docs/knowledge/CURRENT.mdis older than the last code change; - list
decision-logandquestion-atulcounts. Risk: low. - [x] (#101, PR #102 in integration/sprint-1) B12
mmdep knowledge extract(DR-014 §3.1; the Gemini key is already paid tier, so it can run once built and tested). Per chat inC:\\Projects\\_chat-archive: - deterministic redaction (PAN, Aadhaar, phone, email, keys/tokens, passwords, connection strings, IPs);
- Gemini Flash-Lite paid key only (config
knowledge_model; refuse the free tier for internal data) fills the JSON schema in DR-014 §3.1; - merge per project into
docs/knowledge/<project>/*.md, with a citation on every line; - state per chat ID (incremental), with the cost written to the spend ledger;
- order: API/MM-Cron, PE, MCRM, WPDev, MWMC, the rest.
Output goes to a branch
knowledge/<date>and a PR. Risk: medium (internal data; check that the redaction tests cover every pattern). - [x] (#97) B13 TEA script library (DR-014 §3.4). Extract the shell and SQL command blocks from the TEA chats (
TEA Chat history 7 Sep Onwards.txtand account-B/A chats with NAV, server or stgapi in the title). For each: purpose (the text before the block), host, read-only or write (heuristic: rm, mv, kill, systemctl, ALTER, INSERT and similar mean write), and outcome if stated. Writetea/scripts/<nn>-<slug>.shplustea/INDEX.md. Redact secrets and IPs. Deterministic, no model needed. Risk: low. - [ ] B15 Documentation gap report (DR-014 §3.5; after B12), waits until B12 reaches main and has run once. Per project, compare
docs/knowledge/<project>/with that project's repository docs (fetch the file list and headings through gh/glab). Gemini lists what the repository lacks, and each gap becomes an issue in that repository labelleddocs-gap. Risk: low. - [x] (#99, PR #100 in integration/sprint-1) B16 Harness sources for PE and MCRM (GitHub),
risk: lowitems only, so their agents' epics get worked between PROCEEDs (DR-014 §3.6). Risk: medium (shared harness config).
Added 20 Oct (DR-015)¶
- [x] (#106, PR #107 in integration/sprint-2) B17 Model routing by data class.
- Each harness source gets
data_class(publicorinternal; defaultinternal). - Each model in
harness_config.jsongetsallowed_classes: Gemini [public, internal]; openrouter-free [public] plus anallow_internal_reposlist, which defaults to MMDEP only, pending MOD-1; local Ollama [all]. - The chain filters by class, the ledger records it, and tests cover each filter.
- Risk: medium, so it goes to
integration/sprint-1. - [x] (#108) B20
mmdep worktreeper agent.add <agent> <repo> [branch]createsC:\\Projects\\_worktrees\\<agent>\\<repo>on a branch prefix per agent.listandprune(removing merged ones) complete it. Reusemmdep/workspaces.py, with git calls throughmmdep/shell.py. Risk: low. - [x] (#110) B21 More CI checks, report-only. Add
coverage(a percentage in the CI summary),pip-auditandbandit -q -r mmdep toolsto.github/workflows/ci.yml, all withcontinue-on-error: true. Add one line to the README. Risk: low. - [x] (#112, PR #113 in integration/sprint-2) B18 Fabric prototype (new optional extra
[deploy]in pyproject, which needs a 'why' line in the PR). tools/fab/fabfile.pywith taskstea.stgapi_status,tea.disk,tea.ports(read-only, using scripts fromtea/scripts/) andstaging.status.- Output is saved to
C:\\Projects\\_mmdep-inbox\\<task>-<time>.txt. - No write or deploy tasks yet.
- Tests use a fake connection.
- Risk: medium, so it goes to
integration/sprint-1. - [x] (#114, PR #115 in integration/sprint-2) B19 Aider engine spike (DR-015 §3 and §7.3: include architect mode with Gemini as architect and a free or local model as editor, the repository map, a whole-file vs diff comparison per model,
--chat-history-fileintodocs/sessions/harness/, ZDR provider parameters, and a cap on inner attempts). engine: aideroption, off by default. The harness runsaider --no-auto-commits --yeswith only the scope files, in the worktree, with the model from the chain, then applies its usual gates.- The optional extra
[aider]is not installed in CI; tests use a fake aider command. - Risk: medium, so it goes to
integration/sprint-1. - [x] (#116, PR #117 in integration/sprint-2) B22 OpenRouter ZDR enforcement (DR-015 §7.1).
- Every OpenRouter request (harness, knowledge extraction) sends
provider: {zdr: true, data_collection: "deny"}. - "No endpoints" means falling through to the next model, never retrying without ZDR.
- The ledger records zdr and the serving provider.
- With ZDR on, internal sources may use openrouter-free; update B17's class filter.
mmdep harness checkmakes one tiny ZDR call and reports whetheropenrouter/freestill has a ZDR endpoint.- Risk: medium, so it goes to
integration/sprint-1. - [x] (#118) B23 MkDocs + Material documentation site (DR-015 §7.2).
- Add
mkdocs.ymlcoveringdocs/(decision records, registers, plans, runbooks, knowledge). - The optional extra
[docs]holdsmkdocs-material. - A CI job builds the site as an artefact; it is not published.
- Add a README line:
mkdocs serveto view it locally. - Risk: low.
- [x] (#120) B24 Harness 'no placeholders' rule and gate (DR-015 §7.3).
- Add the directive to the prompt.
- Reject model output containing
# rest of,# ... existing code, a line that is only..., orpass # TODOin new code, with feedback naming the line. - Tests cover each pattern, plus legitimate
...(in type stubs or Ellipsis use). - Risk: low.
Added 20 Oct night (DR-016)¶
- [x] (#123) B25 MADR ADRs plus index.
- Convert
docs/decisions/DR-*.mdintodocs/adr/NNNN-<slug>.mdwith MADR sections (Context, Options, Decision, Consequences) and YAML front matter:status(accepted, proposed or superseded, taken from each DR's status line),date,deciders,supersedes. - Keep the old paths as one-line stubs pointing to the new file, because links exist.
tools/docs/adr_index.pywritesdocs/adr/index.jsonanddocs/adr/README.md(table by status). CI checks the index is current.- Risk: low.
- [x] (#125) B26 C4 diagrams in the docs site. A CI job runs the Structurizr CLI (Docker image
structurizr/cli, or the jar with Java) to validatearchitecture/workspace.dsland export Mermaid. MkDocs (B23) shows the views on an 'Architecture' page. If the export isn't available, fall back to validating the DSL only. Risk: low. - [x] (#127, PR #128 in integration/sprint-2) B27 Rules files under 200 lines, plus skills.
- Extend
docs/agents/generate.py --checkto fail when a generated rules file goes over 200 lines. - Restructure
agent-instructions.mdinto a short map (where the architecture, ADRs, skills, runbooks and registers are) plusdocs/skills/<topic>/SKILL.mdplaybooks, moved out of the long sections. Start with: harness routing block, merge by risk, session logs (rule §21), data sources. - Risk: medium (affects every agent's instructions), so it goes to
integration/sprint-1.
Added 20 Oct late (DR-017)¶
- [x] (#133, PR #134 in integration/sprint-2) B28 Cross-project dependencies.
- Routing blocks may hold
depends_on: ["moneymarche/api#123", "moneymarche-dev/PE#330"]. - The collector resolves each one through gh or glab (open or closed). It writes
reports/dependencies.jsonplus a 'Dependencies' section inlatest.md: blocked items, and what they wait for. - The harness skips items with an open dependency (reason recorded).
tools/quality/route_lint.pyvalidates the format.- Risk: medium, so it goes to
integration/sprint-N. - [x] (#135) B29 ADR catalogue across repositories.
- The collector fetches each repository's
docs/adr/index.json(once B25 is adopted there), and itsdocs/decisions/file list as a fallback. - It writes
reports/adr-catalogue.json; MkDocs shows a 'Decisions — all projects' page grouped by status, proposed first. - Risk: low.
- [x] (#137, PR #138 in integration/sprint-2) B30 Impact analysis for contract changes.
- For items with
contract: yesor ac4:field, before coding, the harness sendsarchitecture/workspace.dslplus the ADR index plus the item to Gemini (paid). - Gemini lists dependent systems and containers, the affected contracts, the tests to run, and a risk class.
- The output goes in the PR body and as an issue comment. If it says high risk, the harness stops and labels the issue
workflow-design(DR-016 workflow i). - Tests use a fake model.
- Risk: medium.
- [x] (#139) B31 Local MCP filesystem server for local agents.
- A documented configuration (
docs/skills/program-hub-mcp/SKILL.md) runs@modelcontextprotocol/server-filesystemon a read-only hub worktree (C:\\Projects\\_worktrees\\hub\\MMDEP, from B20), with an Aider/Ollama configuration example. mmdep worktree add hub moneymarche-dev/MMDEP main --read-onlykeeps it updated, with no write access.- Risk: low.
Added 21 Oct (DR-018)¶
- [x] (#141) B32 LiteLLM backend.
- Harness models may point at a LiteLLM proxy (
backend: openai,base_url: http://<host>:4000/v1,key_env: LITELLM_API_KEY,model: <litellm model name>). - Add
docs/harness/litellm.mdwith an examplelitellm_config.yaml: Ollama machines by LAN address, Gemini, OpenRouter with ZDR provider settings, Claude; a budget per key. mmdep harness checkreports the LiteLLM health endpoint.- No new Python dependency in core (the proxy runs separately).
- Risk: low.
- [x] (#143, PR #144 in integration/sprint-2) B33 Escalate before flagging (DR-018 §4.2).
- After 2 failed runs on local or free models, the next run starts at
escalate_to(defaultgemini-flash, thenclaude-sonnetwhenallow_paidis set). - After the escalation fails, label the issue
needs-attentionand comment with the last failure. - The actions sync shows
needs-attentionto the owning project first. - Risk: medium, so it goes to
integration/sprint-N.
B35 Design check gate and docs-gap report (risk: low) — done (#145)¶
Add mmdep design check, run in CI on docs/adr and docs/design. It requires:
- the MADR sections, and an LLD template with: context, decision, C4 element, test plan, risk, work items;
- that the Structurizr model validates;
- that every new component is in the C4 model.
Add mmdep docs gaps <repo>, which reports AGENTS.md (under 200 lines), the ADR folder, C4, docs/knowledge/CURRENT.md, docs/sprint/ACTIVE.md, and open PRs over the WIP limit. It covers GitHub repos through REST and GitLab repos through the collector's token. Source: docs/plans/review-atul-items-2026-10-22.md §3–4.
B36 Design to issues (risk: low) — done (#147)¶
mmdep design issues <LLD> reads the "Work items" table of an approved LLD and opens one issue per row with a routing block (risk, model, scope, depends_on). Dry run by default.
B37 Knowledge extraction as a standing job (risk: low) — done (#166)¶
Add a knowledge-extract job to docs/registers/jobs.yaml, triggered by a new chat-archive INDEX.md. It runs mmdep knowledge extract --limit 60, then writes docs/knowledge/<project>/GAPS.md: missing designs, decisions without an ADR, and lost artefacts.
B38 Docs site deploy (risk: medium; blocked on DOCS-1)¶
A GitHub Actions workflow builds MkDocs and deploys to Cloudflare Pages behind Cloudflare Access. The token is a repository secret set by Atul's setup script.
B39 Agent inbox on GitHub (risk: low; replaces the old B39 digest) — done (#171)¶
Plan: docs/plans/direct-agents-design-harness-horizons-2026-10-22.md §A.
Actions sync (hourly):
- turns for-atul/<project>/*.md files (front matter: type decide/do/question, choices, blocking, risk, project) into MMDEP issues labelled for-atul, plus type and project labels;
- mirrors GitLab question-atul issues;
- closes the file's issue when it is answered.
Answers (a ticked choice in the issue body, or Atul's comment) go to docs/relay/answers.md and back to the source file or issue. Tests use fake GitHub and GitLab APIs.
B40 Prompt queue and post-step harness jobs (risk: low) — done for MMDEP (#187); MWMC needs its checkout path¶
Plan: §B.
- prompts/<project>/QUEUE.md format: steps with inputs, outputs, check and job.
- A commit under runs/ triggers the post-step job, either through the jobs runner (laptop, trigger on runs/) or a CI workflow. The job is one of: design check, design issues, harness run --issue, data checks.
- Write runs/step-N-feedback.md (check results, issues opened, PRs merged).
- Start with MMDEP and MWMC.
B41 Actions page on the docs site (risk: low) — done (#194); published once B38 deploys¶
Hourly: render open for-atul issues (MMDEP, plus mirrored GitLab ones) into docs/status/actions.md, grouped by project and sprint, with age, type and a link. It is published with the site (DOCS-1).
B42 Model roles and per-model limits (risk: low; TD-029, Atul 24 Oct) — done (#211)¶
Gemini quotas are per model (requests per minute, requests per day, tokens per minute), so a role should use its default model until that model's daily quota is spent, then the next.
harness_config.jsongetsroles:code,review,knowledge,triage,impact. Each role is an ordered list:[default, next, ...], for example code =gemini-flash-lite(3.5),gemini-2.5-flash-lite,openrouter-free,gemini-flash-lite-b,qwen-coder-7b.- Add a model
gemini-2.5-flash-lite(modelgemini-2.5-flash-lite, paid tier); Atul's test showed a large daily allowance. - Each model gets
rpmandrpd. Defaults: Gemini 30 rpm / 1,000 rpd until Atul reads the real values from AI Studio; OpenRouter free 20 rpm / 1,000 rpd now that 10 credits are bought. - Add
mmdep/ratelimit.py: - a per-model sliding 60-second window (sleep to respect rpm);
- a per-day counter in
<control>/harness/usage-<date>.json; - a model at its rpd, or answering 429 twice, is skipped until the next day (Pacific midnight for Gemini).
- The harness and
mmdep knowledgeboth call through it. The knowledge job uses roleknowledge. harness checkprints today's use per model.
Tests: fake clock and fake model.
B43 Design check requires the five-parameter evaluation (risk: low; TD-030)¶
mmdep design check fails a new or changed ADR or LLD without an "Evaluation" section naming V, S, C, D and L. It also fails when the decision has no row in docs/registers/technical-decisions.md (match by ADR id or title).
B44 Skills in the Agent Skills format (risk: low; TD-036)¶
Move docs/agents/skills/* to skills/<name>/SKILL.md (front matter: name, description, when_to_use, version), plus scripts/ and references/. The harness adds a skill to the prompt (or to Aider with --read) only when its when_to_use keywords match the issue. Update the generator and rules file links.
B45 Codex CLI as a harness engine (spike; risk: low; TD-037)¶
engine: codex runs codex exec (non-interactive) in the issue worktree, with the same gates as Aider (tests, exact-string guard, no placeholders). Off by default, enabled per issue. It records the plan credits used where the CLI reports them. Compare its pass rate with gemini-flash-lite on 5 issues.