jev-harness (Rust)
Zero-overhead System One decision harness & token optimizer for AI coding agents and Tauri applications.
jev-harness wraps TypeSafe Jev System One micro-decisions with local fast heuristics (< 500µs) and remote sub-second inference (70-300ms). It prevents catastrophic token waste ($10-$50/M frontier reasoning calls) by detecting dependency errors, circular failure loops, and deterministic routing locally.
🌐 Multi-Provider Support & OpenCode Zen (Free Tier)
Configure your preferred provider via environment variables or .env:
# Option A: OpenCode Zen Free Tier (No API key required!)
# Option B: TypeSafe Direct API
# Option C: OpenRouter
⚡ Key Capabilities
-
Test & Process Failure Triage (
triage_test_failure):- Detects missing modules (
TS2307,Cannot find module,ModuleNotFoundError,E0463), flaky network timeouts (ETIMEDOUT,ECONNRESET), and syntax errors in < 500µs locally. - Tells your agent or process runner to install dependencies or retry without invoking expensive frontier LLMs (
skip_llm: true).
- Detects missing modules (
-
Loop & Doom Prevention (
should_abort_trajectory):- Evaluates consecutive identical test failures and repetition loops to kill runaway agentic runs before burning budget.
-
Dynamic Model Routing (
route_model_tier):- Routes simple tasks, typos, and lint errors to fast deterministic models, and reserves expensive 2026 reasoning models (GPT-6 Astra, Claude Fable 5.1 / Claude Opus 5) only for complex architectural asks.
-
Step Completion Verification (
verify_step_completion):- Confirms criteria satisfaction before concluding multi-step workflows.
📦 Installation
Add to your Cargo.toml:
[]
= "0.2.0"
= { = "1", = ["full"] }
Or add via cargo add:
Or install the standalone CLI:
🚀 Usage
1. Test Failure Triage
use triage_test_failure;
async
2. Trajectory Loop Abort Guard
use should_abort_trajectory;
async
3. Model Tier Routing
use route_model_tier;
async
4. Dynamic Reasoning Effort Modulation (Astra-Jev)
use modulate_reasoning_effort;
async
5. CLI Usage
# Run triage on a traceback
# or alias
# Trajectory abort check
# Route model tier
# Check reasoning effort (Astra-Jev)
# Check system status
📊 Offline Heuristic Latency Benchmarks (< 500µs Guarantee)
When operating in offline simulation mode (--mock or network disconnected), jev-harness executes local System One decision gates with zero external network overhead ($N = 1,000$ iterations measured):
| Runtime | Decision Gate | $p50$ | $p95$ | $p99$ | Mean | Contract |
|---|---|---|---|---|---|---|
Rust (packages/rust) |
triage_test_failure |
10.3 µs | 22.0 µs | 37.5 µs | 13.5 µs | ✅ PASS (< 38 µs) |
should_abort_trajectory |
6.2 µs | 10.0 µs | 22.9 µs | 7.0 µs | ✅ PASS (< 23 µs) | |
modulate_reasoning_effort |
5.1 µs | 7.1 µs | 15.3 µs | 5.6 µs | ✅ PASS (< 16 µs) | |
pure simulate_system_one |
0.7 µs | 0.9 µs | 1.3 µs | 1.0 µs | ✅ PASS (< 2 µs) |