Files
automaton/tasks/model-divergence-enforcement/subtasks/mde-loop-enforcement/BRIEF.md
T

32 lines
1.4 KiB
Markdown
Raw Normal View History

# BRIEF — mde-loop-enforcement
**Parent:** model-divergence-enforcement
**Subtask:** 3 of 3 (depends on mde-interactive-enforcement)
**Spec ref:** `tasks/model-divergence-enforcement/SPEC.md` §Subtask 3
**Design ref:** `design/framework/technical.md` §§10, §13
## Objective
Add loop-level model-divergence enforcement: `loop.json` per-role `model` field,
`{model}` substitution in `_invoke_harness`, and `--check-gate` model-divergence
brake gate.
## Deliverables
1. `scripts/loop-runner.py`:
- `_invoke_harness` (line 366-404): `{model}` placeholder substitution from `loop.json` role config
2. `scripts/status.py`:
- `--check-gate`: model-divergence brake gate (loop-verify ≠ loop-implement in multi-LLM mode)
- `cmd_create_loop` / `cmd_install_schedule`: validate `loop.json` per-role `model` fields
3. `templates/loops/`: update loop templates with `roles` schema example
4. `design/loops/technical.md`: document `{model}` substitution
5. `tests/test_model_divergence.py`: loop model binding, `{model}` substitution, check-gate halt
## Acceptance
- `loop.json` with `roles.implementer.model` → `_invoke_harness` substitutes `{model}` in harness command
- `loop.json` without per-role `model` → defaults to `models.json` `default` model
- `--check-gate` in multi-LLM mode halts if loop-verify model = loop-implement model
- `--check-gate` in single-LLM mode does NOT halt (advisory only)
- `pytest tests/ -q` green