phionyx_response_gate
Validates AI responses against per-action-type thresholds to decide pass, hedge, regenerate, or block, ensuring claims are grounded in evidence and within knowledge boundaries.
Instructions
Response revision gate with action-type-specific thresholds. Call before committing.
Directives: pass | hedge | regenerate | block | require_tool (P1). Different action types trigger different threshold profiles:
claim_fixed: strictest (entropy_reject=0.90, phi_min=0.08)
deploy: very strict (entropy_reject=0.85, phi_min=0.10)
default: standard pipeline thresholds
require_tool (P1): for factual action_types (claim_fixed/claim_working/deploy) with no externally-bound evidence, the result carries require_tool{triggered}; with PHIONYX_GATE_REQUIRE_TOOL_ENFORCE=1 an otherwise-passing directive becomes 'require_tool' — bind real evidence (run a tool) before the claim can pass.
continuity_binding (P2): the result carries continuity_binding{bound,stale,dds} from the session constraint ledger. compute_dds(confidence, continuity_score) flags "confident while binding unbound/stale"; with PHIONYX_GATE_CONTINUITY_ENFORCE=1 an otherwise-passing directive is downgraded to 'hedge' (re-bind constraints).
ask_question / make_claim (Block 15 short-circuit): each identifier in
artifact_referencesis scored against the read-knowledge boundary by phionyx_core's KnowledgeBoundaryDetector; any source not present inartifact_paths_readis assessed outside the boundary → directive='regenerate' with the ungrounded set + the core's reasoning surfaced. Use 'ask_question' BEFORE asking about a named artifact; use 'make_claim' BEFORE asserting what a named source (file, paper, theory, config) says/contains.
Args: action_type: claim_fixed | claim_working | deploy | refactor | investigate | ask_question | make_claim confidence: Your confidence 0.0-1.0 evidence_count: Number of independent test/verification points evidence_type: Type of evidence (see phionyx_verify_claim for options) affects_user_facing: Whether this change is visible to end users artifact_references: Comma-separated artifact identifiers mentioned in the question/claim (file paths, URLs, issue numbers, named sources). Only meaningful when action_type in {'ask_question', 'make_claim'}. artifact_paths_read: Comma-separated artifact identifiers actually opened this turn (Read tool results, gh issue view output, WebFetch URLs). Only meaningful when action_type in {'ask_question', 'make_claim'}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confidence | Yes | ||
| action_type | Yes | ||
| evidence_type | No | code_review | |
| evidence_count | Yes | ||
| affects_user_facing | No | ||
| artifact_paths_read | No | ||
| artifact_references | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||