Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.
TypeScript ai-sdkclaude-codeclicode-searchcodexcoding-agentscontext-retrievaldeveloper-toolsjevsemantic-searchtypescriptvercel-ai-gateway
Select measured source allocation for frozen cohort confirmation
David Zhang935f735d73e5
diff --git a/apps/cli/src/render.ts b/apps/cli/src/render.tsindex 49fef0a..7fa7ca7 100644--- a/apps/cli/src/render.ts+++ b/apps/cli/src/render.ts@@ -7,7 +7,7 @@ function quote(value: string): string {);}-export const DEFAULT_MAX_SOURCE_BYTES = 0;+export const DEFAULT_MAX_SOURCE_BYTES = 1500;type Excerpt = FileEvidence["excerpts"][number];function containsLead(excerpt: Excerpt, range: FileEvidence["leads"][number]["range"]): boolean {diff --git a/specs/jevgrep/README.md b/specs/jevgrep/README.mdindex 7bd8688..13b47c6 100644--- a/specs/jevgrep/README.md+++ b/specs/jevgrep/README.md@@ -7,22 +7,18 @@ Jev classification through Vercel AI Gateway. This is the build plan; production## Next Agent PromptYou are implementing this spec. Status: **implementing**, updated **2026-09-25**.-Next: finish the single 1,500-byte source-output treatment on the saved Requests-task, then grade/account through its frozen runner and choose the output default. The installed Requests-checkpoint is complete: official solve passed, but Sol cost exceeded baseline.-See [the paired trace and billing report](assets/installed-requests-checkpoint.md).-The result proves integration, not the final quality gate.--Parser, filesystem, failure and cache gates pass, including reviewed-authentication-wait and pipeline cleanup corrections. See-[integrated verification](assets/integration-verification.md).--Priority: measure source allocation, freeze one-policy for all ten tasks, then complete supported-platform and release gates.-Never rerun saved baselines. Production source remains uncapped until slice 07-has official grade and full cost evidence. Jev API cost is reported separately-and excluded from scored Sol cost. See [contracts](contracts.md) and the-[decision map](map.md).+Next: freeze the final 1,500-byte package and run all ten official treatment+cells once, then grade/account/aggregate with the frozen runner. The smaller+Requests trial officially solved and reduced Sol cost against uncapped, but still+cost more than baseline. See [source-budget decision](assets/source-budget-decision.md)+and [the uncapped trace report](assets/installed-requests-checkpoint.md).++Slices 01–07 have their named evidence. Native macOS installed verification is+being completed independently. Remaining work: frozen cohort acceptance, supported+Linux architecture checks, release closeout, whole-spec review and close-spec.+Never rerun saved baselines or pool candidates. Report Jev API cost separately;+only full Sol task cost is scored. See [integrated verification](assets/integration-verification.md),+[contracts](contracts.md), and [decision map](map.md).No user decision blocks starting. External verification dependencies are a workingDocker daemon, explicit Gateway credentials for live tests, retained official task@@ -42,7 +38,7 @@ not claims about the current scaffold.- [x] [04 — Installed CLI + skill + first real task](slices/04-checkpoint.md)- [x] [05 — Faults, cancellation and partial results](slices/05-failures.md)- [x] [06 — Default-on fresh cache](slices/06-cache.md)-- [ ] [07 — Measured source budget](slices/07-output-policy.md)+- [x] [07 — Measured source budget](slices/07-output-policy.md)- [ ] [08 — Frozen quality and release verification](slices/08-release.md)## Product and scopediff --git a/specs/jevgrep/assets/source-budget-decision.md b/specs/jevgrep/assets/source-budget-decision.mdnew file mode 100644index 0000000..cb3ba2c--- /dev/null+++ b/specs/jevgrep/assets/source-budget-decision.md@@ -0,0 +1,49 @@+# Source-budget decision++Choose **1,500 source bytes** for the frozen production cohort. This is the one+bounded candidate required by slice 07, compared with the completed uncapped+installed Requests checkpoint. Both officially solved; the smaller candidate+lowered full Sol cost against the installed comparator. It did not beat baseline.++| Requests treatment | Sol cost USD | Official solved | Jev observed API cost USD |+| --- | ---: | --- | ---: |+| Saved baseline | 0.2685004 | yes | — |+| Installed uncapped | 0.3491436 | yes | 0.011889360 |+| Installed 1,500 source bytes | 0.2926056 | yes | 0.011987346 |++The candidate costs 16.19% less than uncapped and 8.98% more than baseline.+Jev stays excluded from scored Sol cost. All ten candidate Sol generations have+billing; all 85 Jev responses have observed cost metadata. Gateway reports 89+internal provider attempts. These API costs are not invoice reconciliation.++The candidate retains all six file locations and reading leads, includes the+994-byte method/auth excerpt and 214-byte test helper, and explicitly omits the+689-byte request-class scaffold. Selected source remains verbatim. Whole excerpts+are allocated by the strongest contained reading lead above 0.5, with stable ties;+class context has no such score and may therefore be undervalued. The default is+not a claim that 1,500 is optimal for arbitrary tasks or codebases.++Source allocation was the experimental retrieval-policy change. The newer package+also includes the intervening cancellation/authentication fixes and release notices;+those were absent from the earlier uncapped tarball. Benchmark task prompt,+skill, source and model/harness were frozen, but Sol chose a differently worded+initial query and live Jev judgments could vary. This single paired observation+cannot isolate the causal effect of bytes or establish generalization. The final+cohort must still preserve all eight baseline solves and obtain seven fully billed+solved cost wins under one policy. No baseline was rerun, and neither Requests+treatment is a baseline cost win.++The frozen study is `evals/runs/swebench/installed-jg-requests-budget1500-v1/plan.json`.+Its `runner/` archive owns reproduction. The attempt retains exact command/stdout,+raw rollout, events, patch, proxy and Jev traces, generation lookups/accounting,+and official grading receipt. Grade run+`jg-installed-psf__requests-1142-d53200025a3a` resolved one instance, with zero+unresolved, infrastructure-failure or error instances. See the+[uncapped checkpoint report](installed-requests-checkpoint.md) for its paired trace.++Installed verification passed on the exact candidate archive: Node runtime,+canonical skill, bounded-output preservation and `head -200`. Component renderer+checks cover UTF-8, partial-byte containment, whole-excerpt allocation, stable+ordering and exact unlimited output.++Candidate tarball SHA-256: `98bcf47e7de30ad82c8b452a86b958505c3befe6512d00f98486101c6a9fc802`. Returned stdout: 2,183 UTF-8 bytes; source allocation counts source only.diff --git a/specs/jevgrep/choices.md b/specs/jevgrep/choices.mdindex ce999e3..c91ef79 100644--- a/specs/jevgrep/choices.md+++ b/specs/jevgrep/choices.md@@ -149,9 +149,11 @@ snippet can be useful despite lacking such a score; this heuristic does notclaim to measure the value of all context.Gap: numerical source allocation and tie breaks were delegated. Reach: finite-budgets may omit useful surrounding context, so the default stays uncapped until-the official task and complete Sol bill support the candidate. Verdict: sound-as a reversible trial, not an accepted default. Confidence: medium.+budgets may omit useful surrounding context. The 1,500-byte trial preserved the+Requests solve and lowered full Sol cost against the uncapped treatment, so it+is selected for the frozen cohort; the cohort must still satisfy acceptance.+Verdict: sound as a measured provisional policy, not a universal optimum.+Confidence: medium.### Freeze one installed package across the official cohortdiff --git a/specs/jevgrep/contracts.md b/specs/jevgrep/contracts.mdindex 21ac55f..0d3b2e6 100644--- a/specs/jevgrep/contracts.md+++ b/specs/jevgrep/contracts.md@@ -192,11 +192,12 @@ source count. Then all qualifying file locations, roles and optional declarationranges, then source blocks. All-file directory evidence can exceed 200 lines;`head -200` must remain useful, not falsely claim exhaustive display. Escape pathswithout altering the quoted source. Source byte budget never caps files or leads.-Default budget is an evidence-backed implementation decision: compare accepted-output with one bounded allocation candidate while freezing prompts/selection.-Until evidence selects a cap, retain the accepted uncapped allocation (the spike-validated its budget flag but never enforced it); do not guess a small-budget and present it as optimized. `--max-source-bytes` overrides allocation only.+Default source allocation is 1,500 UTF-8 bytes, chosen from the bounded Requests+trial against the uncapped installed checkpoint. Whole excerpts containing the+strongest qualifying reading leads get priority; ties preserve original order.+This is a provisional cohort policy, not a universal optimum: full ten-task+acceptance remains required. See [the output trial](assets/source-budget-decision.md).+`--max-source-bytes` overrides allocation only; 0 returns all selected excerpts.Official acceptance preserves every fixed baseline solve and reaches at leastseven successful lower-cost solves out of the existing ten-task cohort with onediff --git a/specs/jevgrep/slices/07-output-policy.md b/specs/jevgrep/slices/07-output-policy.mdindex 4df51a1..2169242 100644--- a/specs/jevgrep/slices/07-output-policy.md+++ b/specs/jevgrep/slices/07-output-policy.md@@ -1,6 +1,6 @@# Choose source allocation using completed tasks-Status: measuring. Depends on: 06. Read [contracts](../contracts.md) first.+Status: verified; cohort acceptance remains open. Depends on: 06. Read [contracts](../contracts.md) first.## Contract and owner@@ -36,14 +36,8 @@ continue on the evidence if the user does not respond. Feedback that changes thepublic contract or acceptance measure requires updating this slice before broadeningimplementation. Record new choices and update the README handoff before ending.-Current candidate: 1,500 source bytes, with whole excerpts ranked by contained-reading leads scoring above 0.5; equal scores keep original order. It preserves-all admitted paths and leads. This is a heuristic because class-context snippets-have no reading-lead score. Production default remains 0 (uncapped) until measured.-On the retained Requests packet it keeps the decisive method and test helper-(1,208 source bytes) while omitting 689 bytes of scaffolding. Unlimited output-is byte-identical to the retained 2,852-byte stdout. This is packet evidence only.--The candidate package and skill are frozen in the single-task study-`evals/runs/swebench/installed-jg-requests-budget1500-v1/plan.json`.-No baseline execution is available in the maintained runner.+The 1,500-byte candidate officially solved and reduced Sol cost against the+uncapped installed checkpoint, while remaining more expensive than baseline.+It is the chosen default for the final frozen cohort, not a demonstrated universal+optimum. Exact artifacts, costs, confounders and rationale are in the+[source-budget decision](../assets/source-budget-decision.md).