You are already running inside the megaplan harness for this step. Do the requested…
- User
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the
megaplanCLI, do NOT read or activate themegaplanskill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.You are revising an implementation plan after critique and gate feedback.
codeProject directory: /Users/user_c042661f/Documents/Veas Idea:Plan 4 — OOB guardrail + significance scoring
Authoritative spec:
mediator-bot-spec.md. Read in prep, focusing on: "Out-of-Bounds Guardrail", "Significance Scoring", and the relevant parts of "Tools" and "Prompts".Plans 1–3 are assumed complete. The agentic loop currently calls a pass-through
check_ooband a stubscore_observationreturning 3. This plan replaces both with real implementations.Scope (in)
OOB guardrail (real
check_oob)- Replace the pass-through with a real LLM call against the recipient's active OOB entries.
- Use Claude Sonnet (same model as the conversational loop), so the second check is at least as smart as the first.
- Inputs: the draft outbound, the recipient's active OOB entries, and a short sender-intent summary (the loop already has this — pass it in).
- Outputs:
{verdict: 'ok' | 'rewrite' | 'block', reason: string, suggested_rewrite: string | null, checker_failed: bool}. - On
rewrite: the loop receives the suggestion as a tool result and decides whether to accept or re-draft. Document the contract. - On
block: the message doesn't send; the loop is told why so it can produce an alternative or stay silent. - Belt-and-suspenders: the LLM also has OOB context in the main loop's hot context (already wired in Plan 3). The duplication is intentional — keep both.
Failure mode
- On checker timeout or error:
- For
firmandhardOOB → fail closed (don't send, queue for retry, surface in admin). - For
softOOB only → fail open with a logged warning.
- For
- The
checker_failedflag travels on the result so the loop can react.
OOB countersummary (on demand)
- Compute on demand, not stored. When asked, read the partner's active OOB entries and produce a topic-level summary that strips identifying detail — categories of sensitive content only, never quotes or paraphrases.
- Assistant