mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-18 16:00:35 +00:00
Last-resort multi-model panel via OpenRouter Fusion. Only invoked when all other approaches (local model, single frontier, existing skills) have failed on the same problem. Architecture: - Problem classification (lean_proof, code_bug, architecture, math_novel, infra_debug) - Per-type model panel selection (Opus + DeepSeek + Gemini for proofs) - Context assembly (files, build logs, AGENTS.md constraints) - OpenRouter Fusion call (parallel panel + judge synthesis) - Structured output (diagnosis, solution, alternatives, risks, cost) Safety: - Explicit 'break glass:' trigger required - Cost gate: /usr/bin/bash.30-.50 per invocation, .00/session cap - Rate limit: 3 invocations per session - Audit trail via ContextStream Files: - 4-Infrastructure/shim/break_glass_mcp.py (MCP server) - 6-Documentation/docs/specs/break_glass_mcp_agent.md (design spec) - .opencode/skills/break-glass/SKILL.md (skill definition) - .mcp.json (server registration)
2.1 KiB
2.1 KiB
SKILL: break-glass
When to Use
Use this skill ONLY when a problem has resisted ALL other approaches:
- Local model (Hermes3 / default) — tried and failed
- Single frontier model (Claude Opus / GPT-5.5) — tried and failed
- Existing skills and tools — tried and failed
Trigger: break glass: <problem statement>
What It Does
Assembles a focused multi-model panel via OpenRouter Fusion:
- Diagnoses the problem type (lean_proof, code_bug, architecture, math_novel, infra_debug)
- Selects an optimal model panel for that problem type
- Assembles codebase context (relevant files, build logs, AGENTS.md constraints)
- Calls OpenRouter Fusion — sends the problem to multiple models in parallel
- Synthesizes — a judge model produces consensus, contradictions, blind spots
- Returns structured diagnosis + solution with confidence score
Cost
Each invocation costs 3-5× a single model call (~$0.30-$1.50 depending on problem type).
| Problem Type | Panel | Budget |
|---|---|---|
| lean_proof | Opus + DeepSeek V4 + Gemini 3.1 Pro | $1.00 |
| code_bug | GPT-5.5 + Opus + Kimi K2.6 | $0.75 |
| architecture | Opus + GPT-5.5 + Gemini 3.1 Pro | $1.50 |
| math_novel | DeepSeek V4 + Opus + Gemini 3.1 Pro | $1.00 |
| infra_debug | GPT-5.5 + Opus + DeepSeek V4 | $0.75 |
How to Use
break glass: cleanMerge_preservesGap sorry — List.zip/filter/all terms too large for simp
The agent will:
- Auto-classify as
lean_proof - Read the relevant Lean files
- Pull build logs and AGENTS.md constraints
- Call Fusion with the Opus + DeepSeek + Gemini panel
- Return structured diagnosis + code
Safety
- Rate limit: Max 3 invocations per session
- Cost cap: $5.00 per session
- Human gate: If estimated cost > $2.00, requires confirmation
- Audit trail: Every invocation logged to ContextStream
Files
| File | Purpose |
|---|---|
4-Infrastructure/shim/break_glass_mcp.py |
MCP server |
6-Documentation/docs/specs/break_glass_mcp_agent.md |
Full design spec |
.mcp.json |
MCP server registration |