Skip to content

Shared components register (MMDEP repo)

Use these instead of writing your own (DR-007 §3 reuse check; rules §15). The harness puts this list in every coding prompt. Add a line when a new shared helper is merged; refactoring moves duplicates here.

Need Use Module
Run a child process with a hard deadline, kill the process tree run_with_deadline, kill_tree, DeadlineExceeded, Stopped mmdep/procs.py
Run a short command (git, gh, pytest) with stdin closed, UTF-8, timeout, optional env, hidden window on Windows run, git mmdep/shell.py (PR #34/#35; job runner and jobs task since #38)
Read GitHub through gh (JSON) gh_json mmdep/collect.py (REST only where GraphQL is blocked)
Read GitLab API gitlab_get mmdep/collect.py
Hidden console window flag for Windows subprocesses NO_WINDOW mmdep/shell.py (tools/collector/setup_runner.py still has a copy)
Parse and check an issue routing block parse_routing, check_route, safe_rel mmdep/harness.py
Lint a routing block from the command line main tools/quality/route_lint.py (PR #36)
Label vocabulary LABELS, is_known, unknown_labels mmdep/labels.py (after PR #15)
Job register: load and validate the jobs MMDEP may run load_jobs, validate, Job, JobRegisterError mmdep/jobs.py, register docs/registers/jobs.yaml (PR #28)
Job runner: find run-job requests, CI gate, run in a worktree, return to the relay run_pass, parse_request, ci_verdict, GhClient mmdep/jobs_run.py, CLI mmdep jobs run (PR #32)
Hub state: projects, items, ledger, tasks Store, home() mmdep/store.py
Git worktree per task, merge, clean-up Workspaces, task_branch mmdep/workspaces.py
Role map, caps, workdir and tamper guards Isolation mmdep/isolation.py
Version and runtime-vs-dev check version_info mmdep/about.py
Windows scheduled task definition (hourly + logon/unlock/reconnect) task_xml tools/collector/setup.py

Refactoring backlog (found by tools/quality/dupes.py and reviews)

The collector runs the duplicate finder weekly over mmdep and tools (backlog B6). New groups appear in latest.md ("Duplicate code (weekly)", control branch) and as a flag on the MMDEP row. Whoever picks one up adds it below as an R-item.

ID Duplicate or smell Plan
R1 run/git/NO_WINDOW in harness, similar subprocess wrappers in collect and setup scripts Done: mmdep/shell.py used by all (#17, #22, #38); tools/collector/setup_runner.py still has its own