Research-Stack/.opencode/skills/break-glass/SKILL.md
allaun 0a79e70ff3 feat(agent): break-glass MCP agent for novel problem attacks
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)
2026-06-22 15:33:16 -05:00

2.1 KiB
Raw Blame History

SKILL: break-glass

When to Use

Use this skill ONLY when a problem has resisted ALL other approaches:

  1. Local model (Hermes3 / default) — tried and failed
  2. Single frontier model (Claude Opus / GPT-5.5) — tried and failed
  3. Existing skills and tools — tried and failed

Trigger: break glass: <problem statement>

What It Does

Assembles a focused multi-model panel via OpenRouter Fusion:

  1. Diagnoses the problem type (lean_proof, code_bug, architecture, math_novel, infra_debug)
  2. Selects an optimal model panel for that problem type
  3. Assembles codebase context (relevant files, build logs, AGENTS.md constraints)
  4. Calls OpenRouter Fusion — sends the problem to multiple models in parallel
  5. Synthesizes — a judge model produces consensus, contradictions, blind spots
  6. 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:

  1. Auto-classify as lean_proof
  2. Read the relevant Lean files
  3. Pull build logs and AGENTS.md constraints
  4. Call Fusion with the Opus + DeepSeek + Gemini panel
  5. 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