Skip to main content

Crate visual_rubric

Crate visual_rubric 

Source
Expand description

Shared AI visual-rubric runner for screenshot review.

This crate owns the Codex ACP plumbing so browser screenshots, offscreen renderer captures, and VM/VNC screenshots can use one rubric path.

It also provides a two-stage pipeline: vision model extraction via an OpenAI-compatible HTTP API, then rubric scoring via ACP.

Re-exports§

pub use cli::Cli;

Modules§

cli
Command-line interface and audit report types.
presets
Question preset interface for standardized rubric questions.
vision
OpenAI-compatible vision API client for the vision extraction stage.

Structs§

AssetRubricReport
Per-asset report item.
AssetSnapshot
Content-hash snapshot for a caller-provided asset set.
BatchRubricConfig
Batch rubric runner configuration.
BatchRubricReport
Serializable batch rubric report.
BatchRubricRun
Generic batch runner around RubricPool.
IssueClassificationInput
Input passed to caller-provided issue classifiers.
IssueRecommendation
Caller-provided issue recommendation.
LogCaptureConfig
Directories used to capture logs produced by Codex ACP.
PoolConfig
Configuration for a crate::RubricPool.
PoolStats
Snapshot of pool execution counters.
RateLimitEvent
One observed ACP rate-limit event.
RubricEffort
Validated Codex ACP reasoning effort value.
RubricOptions
Optional model settings for one rubric request.
RubricPool
Reusable worker pool for evaluating screenshot rubrics through Codex ACP.
RubricRunConfig
Runtime configuration for direct ACP calls.
RubricVerdict
Parsed rubric verdict returned by ACP.
RubricVerdictStatus
Validated rubric verdict status.

Enums§

AggregateStatus
Overall status for a batch rubric report.
AssetChange
Content change for one asset between two snapshots.
AssetRubricResult
Per-asset rubric result.
LogPathMode
Path representation for copied ACP logs in batch reports.
PoolError
Errors produced by the ACP pool, worker runtime, or vision API.
RecommendationSeverity
Severity for a caller-provided recommendation.
RubricError
Errors returned by public one-shot rubric APIs.
SelectionMode
Asset selection mode for a batch rubric run.

Constants§

DEFAULT_CODEX_ACP_MODEL
Default Codex ACP model.
DEFAULT_CODEX_ACP_REASONING_EFFORT
Default Codex ACP reasoning effort.
DEFAULT_SYSTEM_PROMPT
Default system prompt used for screenshot rubric requests.
DEFAULT_VISION_PROMPT
Default prompt for the vision extraction stage.

Traits§

IssueClassifier
Optional caller hook for mapping failed/error assets to reusable recommendations.

Functions§

assert_image_rubric
Evaluates a PNG and returns an error when the verdict is not pass.
assert_verdict
Converts a verdict into an assertion-style result.
build_codex_acp_args
Builds the default CLI arguments for the codex-acp binary from a model name and reasoning effort.
default_codex_acp_binary
Returns the default Codex ACP executable name.
default_options
Returns the default rubric options.
diff_snapshots
Compares two asset snapshots.
encode_png
Reads and base64-encodes a PNG file.
evaluate_image_rubric
Evaluates a PNG with default options.
evaluate_image_rubric_pipeline
Two-stage pipeline evaluation: vision model → rubric model.
evaluate_image_rubric_with_config
Evaluates a PNG with caller-provided model and runtime configuration.
evaluate_image_rubric_with_options
Evaluates a PNG with caller-provided model options.
parse_verdict
Parses strict rubric JSON into a typed verdict.
run
Runs the CLI command.
select_changed
Selects the assets that should be evaluated from a snapshot diff.