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.
npx siftrcode context "task prompt"
Select your coding agent to view instant setup commands.
Registers SiftrCode's Stdio MCP server to prune code before Claude reads it.
siftr context "task description"
Primary context optimizer with 3-stage resolution lineage & budget solver.
Alias for siftr_context for outcome-aware context bundle optimization.
Progressive disclosure expanding discrete methods to BODY with sibling exclusion.
Reports tri-state verification (verifiedSuccess: true | false | null) closing the loop.
Initializes sessions with environment discovery and tracks execution lineage.
Explainable candidate ranker with transparent multi-channel scoring breakdowns.
AST interface extractor for TypeScript, Python, Go, and Rust source files.
High-throughput concurrent AST interface extraction across target files.
Audits codebase token footprint and calculates potential team ROI savings.
Generates whole-directory pruned context packs for task-focused areas.
How SiftrCode V2 delivers 100% recall on critical edit targets while compressing token payloads by up to 90%.
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.
Extracts deterministic feature vectors with strict FeatureCutoff timestamps, strictly eliminating data leakage and lookahead contamination.
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.
Assembles bundles with diminishing marginal returns. Maximizes task evidence coverage while suppressing same-file symbol redundancy and dead weight.
Preserves canonical lineage (ranker → budgeted → final). Isolates method bodies at discrete BODY resolution while strictly excluding sibling methods.
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.
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.
| 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 |
5 audited tasks × 5 calls/task. Concurrency ≤ 4.
Async shadow evaluation without agent blocking.
0 orphan signals, 0 environment ID discrepancies.
Zero source bodies or credentials transmitted.
AgentEnvironment.systemConfigurationHash is the authoritative single identity binding sessions, plans, decision observations, JEV signals, and SQLite durability.
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.
Full function bodies preserved for files the agent modifies or inspects. Zero missing lines, zero hallucinated edits, zero re-try loops.
Distant callers and imports synthesized into compiler-verified AST skeletons. Retains all interfaces, types, and docs while collapsing bodies.
Unrelated services, test fixtures, and noise files omitted safely before prompt ingestion, shielding the LLM from distraction and context drift.
100% full bodies on edit targets • 88% AST skeletons on dependencies.
Saves $0.20/turn • $3,367 net annual savings per engineer.
$
npx siftrcode optimize --profile balanced
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.
* 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).
Free open-source CLI for individuals. Paid caching for teams.
siftr context)