Coding Agent Gate¶
Coding-agent reliability gate for G6 endpoint remediation.
Cluster: Uncategorised | Type: component | MCP Tools: None
Overview¶
Public API¶
CodingAgentGateDecisionError(ValueError)¶
The LLM did not produce a usable, validated coding_agent_gate decision.
GateReviewDecision¶
Outcome of an LLM safety review of a coding_agent_gate verdict.
| Field | Type | Default |
|---|---|---|
verdict | str | required |
added_findings | list[str] | field(default_factory=list) |
added_missing_evidence | list[str] | field(default_factory=list) |
added_required_actions | list[str] | field(default_factory=list) |
rationale | str | '' |
confidence | float | 0.0 |
degraded | bool | False |
raw_response | str | '' |
CodingAgentGateRuntime(Protocol)¶
The grounded safety-review surface coding_agent_gate gains.
Methods:
review(kind: str, deterministic_result: dict[str, Any], context_text: str) -> GateReviewDecision¶
LLMCodingAgentGateRuntime¶
Provider-neutral coding-agent safety reviewer backed by G6's LLM caller.
Constructor:
| Parameter | Type | Default |
|---|---|---|
llm | LLMCaller \| None | None |
Methods:
review(kind: str, deterministic_result: dict[str, Any], context_text: str) -> GateReviewDecision¶
CodingAgentGateReviewPlanner¶
Runtime-first facade with an honest deterministic fallback.
Constructor:
| Parameter | Type | Default |
|---|---|---|
runtime | CodingAgentGateRuntime \| None | None |
Methods:
review(kind: str, deterministic_result: dict[str, Any], context_text: str) -> GateReviewDecision¶
CodingAgentGatePatternRuntime¶
Stateless executable mechanisms for coding_agent_gate's applied patterns.
| Field | Type | Default |
|---|---|---|
context_char_limit | int | 1200 |
Methods:
minimize_review_context(deterministic_result: dict[str, Any], context_text: str) -> dict[str, Any]¶
Send only decision-relevant review fields to the LLM.
require_human_review(final_verdict: str, risk_tier: str) -> bool¶
Decide whether the final verdict warrants a human/domain reviewer.
CodingAgentGateSkill¶
| Field | Type | Default |
|---|---|---|
name | str | required |
pattern_slug | str | required |
description | str | required |
capabilities | tuple[str, ...] | required |
triggers | tuple[str, ...] | required |
risk_notes | tuple[str, ...] | required |
executable | bool | False |
Methods:
compact() -> dict[str, Any]¶
CodingAgentGateSkillCatalog¶
Methods:
list_skills() -> list[CodingAgentGateSkill]¶
get(slug: str) -> CodingAgentGateSkill | None¶
Functions¶
summarize_coding_agent_gate_agentic_evidence(planner_or_decision: Any, escalated: bool = False, n_added_findings: int = 0, source: str = '') -> dict[str, Any]¶
Return a path-redacted evidence record for a coding_agent_gate review.
agentic_planner_enabled(default_enabled: bool = True) -> bool¶
Decide whether the agentic coding_agent_gate reviewer should run.
stricter_of(verdict_a: str, verdict_b: str, vocabulary: str) -> str¶
Return the STRICTER of two verdicts within
vocabulary.
validate_gate_review(decision: GateReviewDecision, deterministic_verdict: str, vocabulary: str) -> None¶
Fail-closed validation of an LLM gate-review decision.
evaluate_coding_agent_gate(task: str, risk_tier: str = '', constraints: list[str] | None = None, observed_evidence: list[str] | None = None, proposed_action: str = '', domain: str = '', mode: str = 'advisory', llm: Any = None, planner: Any = None, agentic: bool = True) -> dict[str, Any]¶
Return an auditable verdict for a coding-agent task.
evaluate_coding_agent_answer(task: str, agent_answer: str, risk_tier: str = '', constraints: list[str] | None = None, files_inspected: list[str] | None = None, tests_run: list[str] | None = None, claims: list[str] | None = None, patch_summary: str = '', risk_indicators: list[str] | None = None, missing_context: list[str] | None = None, task_contract: str = '', verifier_result: str = '', lifecycle_blockers: list[str] | None = None, domain: str = '', llm: Any = None, planner: Any = None, agentic: bool = True) -> dict[str, Any]¶
Verify a drafted coding-agent answer before it is trusted.
applied_agentic_patterns() -> list[dict[str, Any]]¶
Return compact metadata for the coding_agent_gate-applied patterns.
list_patterns() -> dict[str, Any]¶
Return the coding_agent_gate applied-pattern + skill surface.