Files
Lap Tran d325963644
CI / build (push) Has been cancelled
Flatten model-divergence subtasks into 3 independent tasks
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.
2026-06-25 07:25:10 -04:00

48 lines
2.0 KiB
Markdown

# SPEC — mde-manifest-detection
## Problem
The framework has no model manifest system. Model-divergence enforcement (conflict
matrix, per-role model binding, loop enforcement) requires knowing which models are
available and whether the system is in single-LLM or multi-LLM mode.
## Design
Full design in `design/framework/functional.md` §4 and `design/framework/technical.md` §§2-3.
### Key decisions
- **Manifest**: `models.json` with `{default, advised, models:[{name, provider, context_window, location}]}`.
- **Mode detection**: 0-1 models → single-LLM (advisory once, then silent). 2+ → multi-LLM (hard block). Missing file → single-LLM (backward compatible).
- **Detection**: `scripts/detect_models.py` probes opencode.json providers + localhost endpoints (8080/11434/1234/8000).
## Scope
1. `scripts/detect_models.py` — probe opencode.json providers + localhost endpoints, emit candidate manifest as JSON to stdout
2. `scripts/status.py` — add `_load_models_manifest()` and `_get_mode()` helpers
3. `scripts/install.sh`, `update.sh`, `upgrade.sh` — call detect_models after vram_detect
4. `config.md` — `## Available Models` section template
5. `prompts/onboarding.md` — Step 2d model config check
6. `tests/test_model_divergence.py` — manifest loading, single vs multi mode, missing file
## Out of scope
- Conflict matrix enforcement (subtask `mde-interactive-enforcement`)
- Loop model binding (subtask `mde-loop-enforcement`)
- Rule agents (FW-2, FW-3) — separate backlog items
- Agent tab redesign (FW-1)
## Success criteria
1. `models.json` missing → `_get_mode()` returns `"single"`, all model commands are no-ops
2. `models.json` with 0-1 models → `"single"` mode
3. `models.json` with 2+ models → `"multi"` mode
4. `detect_models.py` probes localhost and prints candidate JSON
5. `pytest tests/ -q` green
## References
- `design/framework/functional.md` §4 (Model-Divergence Enforcement)
- `design/framework/technical.md` §§2-3 (manifest schema, state schemas)
- `design/framework/README.md` (locked decisions F4, F5)