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 10 NATIVE TOOLS
siftr_context

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

siftr_optimize

Alias for siftr_context for outcome-aware context bundle optimization.

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_batch_skeleton

High-throughput concurrent AST interface extraction across target 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 PILOT STUDY • SIFTRBENCH 25-TASK REAL VALIDATION

SiftrBench: Shadow JEV Real-World Pilot

Audited empirical evaluation across 25 real-world engineering tasks on Express, FastAPI, and SiftrCode. ContextRank remains the active deterministic decision-maker while TypeSafe JEV runs asynchronously in shadow mode, establishing genuine continuous distributions across 500 bounded calls with 100% bit-for-bit plan invariance and zero synthetic substitutions.

Sample Scale
25 Real Tasks
500 bounded evaluations across Express (10), FastAPI (10), and SiftrCode (5).
Latency (P50 / P95)
4ms / 6ms
Strictly bounded calls (mean 20/task, max 20) with peak concurrency 4.
Continuous Distributions
Genuine JEV
Relevance 0.3445, Edit 0.2159, Root Cause 0.2042. Zero synthetic 0.0s.
Plan Invariance
100%
Bit-for-bit plan identity in shadow mode. Zero production plan divergence.
Stratified SiftrBench Pilot Matrix (N=25 Audited Real Tasks)
Real Codebase Evaluation • Bounded Shadow Invariants
Target Codebase Tasks Task Types Shadow Calls Latency (P50/P95) Plan Invariance
benchmarks/express-repo 10 tasks Bug Fix, Test Failure, Features, Refactor 200 calls 4ms / 6ms 100% Identical
benchmarks/fastapi-repo 10 tasks Async Generators, Security Scopes, Routing 200 calls 4ms / 6ms 100% Identical
src/ (SiftrCode) 5 tasks AST Skeleton, BudgetSolver, Candidate Retrieval 100 calls 4ms / 6ms 100% Identical
Semantic Relevance
0.3445 mean
[0.2106 – 0.6951]
Implementation Needed
0.2983 mean
[0.1605 – 0.6630]
Likely Edit Target
0.2159 mean
[0.0601 – 0.6225]
Likely Root Cause
0.2042 mean
[0.0609 – 0.5737]
Shadow Safety, Authoritative Retention & Lineage Integrity
JEV runs in non-blocking SHADOW mode. Production ContextPlans remain 100% deterministic ContextRank outputs. operationRights.*.retention.local is authoritative across all storage writes, and remote processing is strictly fail-closed.
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