Skip to main content

Module review

Module review 

Source

Structs§

AgentCliReviewLlm
Local agent-CLI ReviewLlm impl. Drives one of claude / codex / gemini / opencode through gate4agent and collects the streamed assistant text. Used when no HTTP provider is active.
DiffContextFile
One file-level diff record produced by an upstream merge-base diff.
DiffContextOptions
Packing options.
DiffContextSummary
Summary for a deleted, omitted, or truncated file.
HttpReviewLlm
Production ReviewLlm impl that dispatches to the Anthropic native Messages API when the provider base URL points at api.anthropic.com, and falls through to the OpenAI-compatible chat/completions path otherwise.
PackedDiffContext
Packed diff text plus bookkeeping for files that were not fully included.
PackedDiffFile
A file included in the packed context.
ReviewCheckInput
ReviewCheckResult
ReviewIssueRecord
ReviewStats
Review stats surfaced to the IDE.
SegmentedPrompt
System prompt split into a cacheable stable prefix and a per-review dynamic suffix. The stable prefix is intended to be reused across multiple reviews from the same team (identical perspective + rules + repo context) so providers that support prompt caching (e.g. Anthropic cache_control: ephemeral) can skip re-tokenising it.
TeamRuleDigest
A single team rule in the canonical form used when producing the cacheable team-rules digest. This is deliberately minimal: the point of the digest is to be deterministic / hash-stable across reviews so that an upstream Anthropic cache_control hint can reuse the prefix.

Enums§

DiffContextFileChange
Change kind for a diff record.
DiffContextMode
Caller intent for ordering records before fitting them into a budget.
DiffContextSummaryReason
Why a file appears in the summary list.
ReviewEngine
How run_review talks to the LLM: remote HTTP provider when one is configured, else a local agent CLI driven through gate4agent (Claude Code, Codex, Gemini, or OpenCode — whichever is installed). Resolved once per review by resolve_review_engine.
ReviewPerspective
Review perspective used to specialize the system prompt for a pass.

Constants§

AGENT_CLI_SCHEME
Sentinel scheme used to route a provider through a local agent CLI (Claude Code, Codex, Gemini, OpenCode) via gate4agent instead of any HTTP endpoint. The tool name follows the scheme: agent-cli://claude, agent-cli://codex, agent-cli://gemini, agent-cli://opencode. No real URL ever uses this scheme so collision with a legitimate HTTP provider is impossible.

Traits§

ReviewLlm
Thin seam around call_ai_provider used by verify_pass and run_review_summary so tests can inject canned responses without spinning up a real HTTP client.

Functions§

agent_cli_sentinel
Canonical sentinel string for a given tool — used by providers setup when persisting a freshly-picked agent CLI provider.
build_segmented_prompt
Build a SegmentedPrompt split into a hash-stable cacheable prefix and a per-review dynamic suffix. See SegmentedPrompt for layout.
complete_with_active_provider
One-shot completion against the user’s active LLM provider.
merge_perspective_issues
Merge issues from multiple perspective passes.
pack_diff_context
Pack file-level diff records into a deterministic context block.
run_review
run_review_multi
Multi-perspective review.
run_review_multi_with_trajectory
Trajectory-aware variant of run_review_multi.
run_review_smart
run_review_with_trajectory
Trajectory-aware variant of run_review.
select_review_mode
Stable label for the code path selected by run_review_smart.