frame_check
Analyze document framing to reveal implicit perspectives, detect absent frames, and verify numerical claims against authoritative source material with divergence guidance.
Instructions
Deterministic structural framing analysis. Returns analysis (measurements) + agent_guidance (composition discipline, scope-regime guidance, faithfulness rules) + provenance (versions, license, citation). When source_text is provided, also runs Layer 4 source_fidelity and Layer 11 grounding_decomposition with a Monte-Carlo-verified scope regime. When include_divergence=true (default at 0.8.0), the response carries a top-level divergence block sorted by signal_strength. The agent's role is to compose ONE insight grounded in the cited measurements (a reading the user could not see by reading their own document), not to walk the measurements one by one. The measurements are Frame Check's; the reading is the agent's. Cite measurements as Frame Check's; frame the reading as a reading ('the pattern reads as X'), never as a verdict ('the document is X'). Repeated calls with identical inputs return identical measurements; the agent's insight is a composition over them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_text | Yes | The document to analyse. English. 300-10,000 words. Markdown accepted. This is the text whose framing you want named. | |
| source_text | No | Optional. The source material the document is supposed to ground in (research report, filing, primary source). Unlocks Layer 4 source_fidelity (digit-level match) and Layer 11 grounding_decomposition (sentence-level G/F/P) with a scope regime telling you which layer to trust on number-dense sources. Without this, only structural framing analysis runs. | |
| prefer_contract_version | No | Optional. Coverage contract version the client prefers. 1 (default): emit both v1 coverage and v2 coverage_v2 (Phase 1 compatibility window). 2: emit only coverage_v2 and omit v1 (for clients that have migrated and want to avoid payload duplication). See MCP_CONTRACT_V2_PROPOSAL.md and MCP_SERVER.md 'Contract versions' section. When Phase 3 activates, v1 will stop emitting regardless of this parameter. | |
| include_divergence | No | Optional. Frame divergence output per FRAME_DIVERGENCE_CONTRACT_v1 Part 2. When true (default at 0.8.0; was opt-in at 0.7.x), the response carries a top-level `divergence` block (absent_frames array sorted by signal_strength tier, FaithfulnessEnvelope with divergence_summary prose) and two `agent_guidance` additions (how_to_render_divergence, absence_is_not_prescription). MCP surface does not invoke any LLM for divergence; the caller's agent model completes the composition using the guidance + library resources. Set explicitly to false to receive the v0.7.x-shape response with no divergence block. Default: true. | |
| domain_hint | No | Optional. Hint about the document's domain used to filter absent frames for domain relevance. Only meaningful when include_divergence=true. If omitted, the envelope reports domain_inferred='unfiltered' and all absent frames are returned. Domain-metadata-based filtering is a future contract minor version; the current implementation echoes the hint to the envelope without field-level filtering (documented in envelope.limitations). | |
| divergence_rendering | No | Optional. How the caller wants absent-frame records decorated. Only affects AbsentFrameRecord decoration (teaching_question field present in 'teaching_questions' mode); all other modes return the same data. The caller's agent model renders per this preference with faithfulness guarantees from agent_guidance.how_to_render_divergence. Default: 'list'. | |
| catalog_version_pin | No | Optional. Pin the FVS catalog version used for absent-frame set difference. If omitted, the latest stable catalog version is used (currently library_v3 per commit 9abeb3d). Unsupported pins are coerced to library_v3 with a limitation note in envelope.limitations. | |
| user_context | No | Optional. The user's situation, role, or decision context in plain prose (e.g., 'I'm a startup founder making a hire decision in healthcare AI', 'reviewing a research paper on language model alignment', 'drafting a Substack post on agent safety'). When provided, agent_guidance.how_to_render_divergence is extended to instruct the caller's model to filter divergence relevance for this context. The MCP does NOT echo the value back into the response (privacy posture); the caller's agent has it from the call args. Discipline: the context personalizes RELEVANCE FILTERING; never PRESCRIPTION. The absence_is_not_prescription guarantee extends to contextual surfacing. Default: omitted (no contextual filtering). Maximum length 2000 chars. | |
| include_frame_opportunities | No | Optional. Opt-in flag for LLM-augmented frame-opportunity composition (Item 12 of the substrate-side composition roadmap). When true, divergence.frame_opportunities carries up to 3 document-specific questions composed by the LLM from absent-frame teaching questions plus the document's content. Each opportunity carries model_provenance with model name, cost_usd, and is_deterministic=false. The deterministic substrate (clusters, patterns, absences) is unchanged. Cost is bounded at ~0.001 USD per invocation (3 Gemini Flash calls max). Falls back to empty opportunities list with available=false if GEMINI_API_KEY is not set or the google.genai library is unavailable. Default: false (deterministic substrate only). | |
| user_goal | No | Optional. The user's stated goal for invoking Frame Check. One of 'decide', 'brainstorm', 'persuade', 'learn', 'audit'. When provided, absent_frames carry a goal_relevance dict for frames load-bearing for the chosen goal, and the absent_frames sort promotes goal-relevant entries within their signal_strength tier (goal precedes genre in the within-tier ranking). 'audit' is the default-equivalent posture: no goal-specific override is applied; the existing catalog/coverage/genre ranking stands. When omitted, behavior matches 'audit'. Substrate-side composition Item 11. | |
| compose_budget | No | Optional. Bound the substrate's output volume so an agent in a tight working-memory budget can request a compact reading without losing structural shape. 'minimal' = top-3 absent_frames, top-1 absence_cluster, top-1 frame_pattern. 'standard' = top-5 absent_frames, all clusters, all patterns. 'full' (default) = unfiltered. The envelope.tier_counts always reflects PRE-slice counts so the agent sees the truncation honestly; divergence.compose_budget_applied carries per-layer returned/total counts. Substrate-side composition L5 interface UX. Backwards-compatible: omit to preserve current behavior. |