CI / build (push) Has been cancelled
Replaced parent+subtask structure with 3 standalone tasks:
- mde-manifest-detection (foundational: models.json schema, detect_models.py)
- mde-interactive-enforcement (conflict matrix, --model args, audit, badges)
- mde-loop-enforcement (loop.json per-role model, {model} substitution, check-gate)
Parent archived to tasks/complete/ for history. Each task has its own
SPEC.md and is at research:awaiting_approval.
Rationale: subtasks are independently actionable with their own lifecycle.
Parent container added complexity without benefit.
2.3 KiB
2.3 KiB
SPEC — mde-loop-enforcement
Problem
Loops have no model-divergence enforcement. A loop could use the same model for
both implementation and verification, defeating the purpose of the loop verifier
gate. Loop runners need per-role model binding and {model} substitution in
harness commands.
Design
Full design in design/framework/functional.md §4 and design/framework/technical.md §§10, §13.
Key decisions
- Per-role model:
loop.jsonroles section with optionalmodelfield per role. Defaults tomodels.jsondefaultmodel if not specified. - Substitution:
{model}placeholder inloop.jsonharness.commandgets replaced with the assigned model for that role. - Check-gate: New model-divergence brake gate: loop-verify model must differ from loop-implement model in multi-LLM mode. Single-LLM mode: advisory only.
Scope
scripts/loop-runner.py:_invoke_harness(line 366-404):{model}placeholder substitution fromloop.jsonrole config
scripts/status.py:--check-gate: model-divergence brake gate (loop-verify ≠ loop-implement in multi-LLM mode)cmd_create_loop/cmd_install_schedule: validateloop.jsonper-rolemodelfields
templates/loops/: update loop templates withrolesschema exampledesign/loops/technical.md: document{model}substitutiontests/test_model_divergence.py: loop model binding,{model}substitution, check-gate halt
Dependencies
- Depends on
mde-interactive-enforcement(needsCONFLICT_MATRIXand_check_conflict)
Out of scope
- Interactive
--transition --model/--claim --model(already done inmde-interactive-enforcement) - Rule agents (FW-2, FW-3)
- Agent tab redesign (FW-1)
Success criteria
loop.jsonwithroles.implementer.model→_invoke_harnesssubstitutes{model}in harness commandloop.jsonwithout per-rolemodel→ defaults tomodels.jsondefaultmodel--check-gatein multi-LLM mode halts if loop-verify model = loop-implement model--check-gatein single-LLM mode does NOT halt (advisory only)pytest tests/ -qgreen
References
design/framework/functional.md§4 (Model-Divergence Enforcement)design/framework/technical.md§§10 (harness invocation), §13 (loop integration)design/loops/technical.md(loop runner architecture)