SiftrCode V2.1 • Shadow JEV Benchmark • 100% Plan Invariance

Context optimization, outcome-aware

Discovers, ranks, and composes compiler-verified repository context bundles — maximizing coding-agent task success while eliminating 90% of token bloat under strict economic budget ceilings.

🎯 100% Plan Invariance ⚡ Sub-40ms Shadow JEV (p95 38ms) 🔬 3-Stage Resolution Lineage 🔒 Structured Zero-Egress Gateway
Explore Interactive Optimizer
$ npx siftrcode context "task prompt"
Local CPU Zero Network Egress
Task Prompt: 100% Recall@20
Budget Cap: 16k tok / $0.05 max
Presets:
cplan_9bf2a481 • ContextPlan
Submodular Synergy Bundle
EDIT TARGET (FULL IMPLEMENTATION BODY PROTECTED) RESOLUTION 5 (FULL)
src/webhooks/signature_verifier.ts
Identified via stack trace match & exact prompt symbols. Retained 100% body to allow editing without hallucination.
1,420 tok
100% Retained
DEPENDENCY INTERFACES (AST SKELETON SYNTHESIS) −92% TOKENS
src/auth/jwt.ts Interface skeleton: 4 types, 2 public methods
480 tok 4,120
src/db/session.ts Interface skeleton: SessionManager, TransactionClient
520 tok 5,800
src/queue/event_bus.ts Interface skeleton: EventPublisher, DeadLetterQueue
610 tok 6,400
SUPPRESSED DEADWEIGHT (ZERO CONTEXT POLLUTION) 14 Files Omitted
tests/e2e/legacy.test.ts, scripts/deploy.sh, docs/arch.md, src/frontend/Header.tsx, src/billing/tax.ts...
Raw Context
94,200 tok
V2 Bundle
3,030 tok
Turn Cost
$0.0091
−96.8% Tokens Save $0.273 / turn

Works with Claude Code & Cursor

Select your coding agent to view instant setup commands.

Connect to Claude Code

Guide →

Registers SiftrCode's Stdio MCP server to prune code before Claude reads it.

$ claude mcp add siftrcode -- npx -y siftrcode mcp
Or optimize context directly from terminal:
$ siftr context "task description"
Standard Model Context Protocol (MCP) Tools 8 NATIVE TOOLS
siftr_context

Primary context optimizer with 3-stage resolution lineage & budget solver.

siftr_expand

Progressive disclosure expanding discrete methods to BODY with sibling exclusion.

siftr_outcome

Reports tri-state verification (verifiedSuccess: true | false | null) closing the loop.

siftr_session

Initializes sessions with environment discovery and tracks execution lineage.

siftr_rank

Explainable candidate ranker with transparent multi-channel scoring breakdowns.

siftr_skeleton

AST interface extractor for TypeScript, Python, Go, and Rust source files.

siftr_audit

Audits codebase token footprint and calculates potential team ROI savings.

siftr_pack

Generates whole-directory pruned context packs for task-focused areas.

PIPELINE SPECIFICATION

The 6-Stage Optimization Engine

How SiftrCode V2 delivers 100% recall on critical edit targets while compressing token payloads by up to 90%.

STAGE 01 Recall@20: 100%

Multi-Channel Candidate Recall

Blends Exact symbol matches, BM25 text retrieval, Stack Trace log parsing, Semantic AST Context Graph, and Git Co-Change intelligence to never miss relevant code.

STAGE 02 ContextFeaturesV1

Point-in-Time Versioned Features

Extracts deterministic feature vectors with strict FeatureCutoff timestamps, strictly eliminating data leakage and lookahead contamination.

STAGE 03 ContextRank + Shadow JEV

Deterministic ContextRank • Shadow JEV

Scores candidates deterministically with inspectable component breakdowns. TypeSafe JEV runs concurrently in shadow mode (p95 38ms latency, $r = 0.75-0.78$ oracle alignment) with 100% bit-for-bit plan invariance.

STAGE 04 BundleComposer

Submodular Synergy Bundler

Assembles bundles with diminishing marginal returns. Maximizes task evidence coverage while suppressing same-file symbol redundancy and dead weight.

STAGE 05 3-Stage Resolution Lineage

3-Stage Lineage & Discrete Method BODY

Preserves canonical lineage (rankerbudgetedfinal). Isolates method bodies at discrete BODY resolution while strictly excluding sibling methods.

STAGE 06 BudgetSolver

Constrained Cost Optimization

Strictly enforces token caps (e.g. 16,000 max) and economic cost ceilings (e.g. $0.05/turn) with precise pricing models for Sonnet 3.7 and GPT-4o.

EMPIRICAL STUDY • SIFTRBENCH 140-TASK VALIDATION

SiftrBench: Shadow JEV Validation

Rigorous empirical evaluation across 140 real-world engineering tasks. ContextRank remains the active deterministic decision-maker while TypeSafe JEV runs asynchronously in shadow mode, establishing high ground-truth correlation with 100% plan invariance.

Sample Scale
140 Tasks
2,800 shadow evaluations across 4 stratified categories (35 tasks each).
P95 Latency
38.0ms
Mean 26.9ms, p99 39.0ms. Strictly bounded worker pool (peak concurrency 4).
Oracle Alignment
r = 0.78
$r = 0.75$ edit targets, $r = 0.77$ root cause, $r = 0.78$ relevance.
Plan Invariance
100%
Bit-for-bit plan identity. 0% fallback rate, zero production plan divergence.
Stratified SiftrBench Benchmark Matrix (N=140)
Deterministic Baseline vs Shadow Signal Fidelity
Task Stratum Tasks ContextRank NDCG@10 Recall@10 Shadow Oracle r Plan Invariance
BUG_FIX 35 tasks 1.000 1.000 0.772 100% Identical
TEST_FAILURE 35 tasks 1.000 1.000 0.780 100% Identical
FEATURE_ADDITION 35 tasks 1.000 1.000 0.747 100% Identical
REFACTOR 35 tasks 1.000 1.000 0.751 100% Identical
Shadow Safety & Lineage Integrity Policy
JEV operates in non-blocking SHADOW mode. Production ContextPlans remain 100% deterministic ContextRank outputs. Zero regression risk to active coding workflows.
Architecture Deep Dive →
Outcome-Aware Context Economics

Token Economics & ROI

Smarter context allocation, not naive stripping. SiftrCode V2 maximizes marginal agent utility per token—cutting typical context payloads by 60%–88% while guaranteeing 100% full implementation fidelity on direct edit targets.

Budget Profile: Balanced (Default) • Optimal Quality & Cost
Variable-Resolution Allocation (85,000 Raw Tokens) Stage 05 • ResolutionRank
100% BODY RESOLUTION 16.5% of raw
Edit & Failure Targets
14,000 tokens • 0% fidelity loss

Full function bodies preserved for files the agent modifies or inspects. Zero missing lines, zero hallucinated edits, zero re-try loops.

88% AST COMPRESSION 4.9% of raw
Structural Dependencies
4,200 tokens • Signatures & Types

Distant callers and imports synthesized into compiler-verified AST skeletons. Retains all interfaces, types, and docs while collapsing bodies.

100% PRUNED BLOAT 78.6% dropped
Transitive Distractors
66,800 tokens • 0 ingested

Unrelated services, test fixtures, and noise files omitted safely before prompt ingestion, shielding the LLM from distraction and context drift.

Context Window

Payload per Turn

−78.6% Tokens
85k
42k
85,000
raw tokens (100%)
Raw
−78.6%
18,200
optimized
V2
Without Siftr
SiftrCode V2

100% full bodies on edit targets • 88% AST skeletons on dependencies.

Claude Spend

Monthly Cost / Dev

Save $280 / mo
$357
$178
$357.00/mo
$4,284 / yr
$0.255/turn
Save $280
$76.44/mo
$917 / yr
$0.055/turn
Without Siftr
SiftrCode V2

Saves $0.20/turn • $3,367 net annual savings per engineer.

Multi-Model Impact per Turn (85k Raw → V2 Optimized) Current Frontier Pricing
Claude 3.7 Sonnet $3.00 / MTok
$0.255 $0.055 / turn
−78.6%
OpenAI GPT-4o $2.50 / MTok
$0.213 $0.046 / turn
−78.6%
Claude 3 Opus / o1 $15.00 / MTok
$1.275 $0.273 / turn
Save $1.00/t
Net ROI
+$3,367/ dev
Prompt Speed
4.7xfaster
10-Dev Team
+$33.7k/ yr
$ npx siftrcode optimize --profile balanced
Truthful Token Accounting • TokenizerRegistry Calibrated
Tracks estimatedRenderedTokens calibrated against Claude BPE (~3.7 chars/tok) and GPT cl100k/o200k (~3.6 chars/tok) with measured actualProviderInputTokens reconciliation. Zero hidden context overflow.
Audit telemetry →

* Modeled on typical 85k-token repository payload at 50 turns/day, 28 work days/mo (1,400 turns/mo per dev). Claude 3.7 Sonnet ($3.00/MTok in), GPT-4o ($2.50/MTok in), Claude 3 Opus ($15.00/MTok in).

Simple Licensing

Free open-source CLI for individuals. Paid caching for teams.

OPEN SOURCE
INDIVIDUAL DEVELOPERS

Community CLI

$0 Free forever (MIT)
  • V2 Context Engine (siftr context)
  • Multi-Channel Candidate Recall (100% Recall@20)
  • Safe Variable Degradation & Edit Target Protection
  • AST Interface Skeletons (TS, Py, Go, Rust)
  • Stdio & HTTP/SSE Model Context Protocol (MCP)
TEAM PRO
FOR STARTUPS & TEAMS

SiftrCode Pro

$19 / seat / mo
  • Everything in Community CLI
  • Team Cross-Repo Semantic Context Cache
  • Exposure-Aware Outcome Telemetry & Analytics
  • CI/CD PR Context Gates & Custom Budget Ceilings