This directory contains standalone examples of Reflex Control policy and telemetry APIs. They use mock/synthetic inputs and are not production integration tests.
The verifier-gate example's dollar and latency figures are illustrative baseline assumptions, not measured savings.
The Verifier Gate demonstrates policy decisions from deterministic checks, atomic semantic signals, and risk thresholds.
cargo run -p example-verifier-gate- Policy Gate on Observations:
- A routine, low-risk documentation task is accepted by the configured policy.
- High/critical risk actions (
DROP COLUMN, privilege changes) trigger mandatory escalation to frontier reasoning regardless of high model confidence.
- Guarded Hybrid Architecture (Atomic Evidence):
- Evaluates an
EvidenceVectorcombining deterministic CI outputs (tests_passed,files_changed) with atomic semantic signals (security_risk,objective_satisfied). - Shows the configured risk policy escalating an example with security-sensitive changes despite passing tests. This fixture demonstrates code behavior; it is not evidence that every security defect is detected.
- Evaluates an
The Shadow Mode example records one mock prediction beside a sample orchestrator action. It uses MockProvider and an in-memory SQLite store; it does not connect to or evaluate a production orchestrator.
cargo run -p example-shadow-mode- Records the sample orchestrator action, Reflex's predicted action, latency, cost estimate, and an example outcome in memory.
- Illustrates the telemetry API; production shadow operation and traffic evaluation require a separate integration and validation effort.
Maps a runtime-style task result (exit status, timeout, verification pass/fail, changed files, retries left) onto DeterministicEvidence, runs the Guarded Hybrid composer and risk policy with the mock evidence provider, and collapses the result to Accept / Retry / Escalate. Anything other than a clean autonomous pass or a budgeted retry escalates. The result struct is local to the example; no agent runtime crate is linked, and the sensitive-path heuristic is illustrative.
cargo run -p example-agent-runtime-gate