Commit 98d304a
feat: redesign context retrieval agent as ContextBench-aligned curator
Unify 6 contradictory system prompts (SDK x3 + CLI x3) into a single
CURATOR_SYSTEM_PROMPT that aligns with ContextBench's human-annotated
gold context methodology — identifying both modification AND understanding
files, not just patch targets.
Key changes:
- Single curator prompt with {tool_description} parameterization
- Phase 0 task parsing (test.sh diff targets, multi-repo detection)
- Schema converters: IR pipeline (files as strings) + oracle (files as dicts)
- 3-file output: ground_truth.json + oracle_answer.json + ground_truth_meta.json
- Balanced-brace JSON extraction (fixes nested array parsing)
- Overwrite safety: writes to _agent.json variants by default
- Chunk-level metrics in validate_on_contextbench.py calibration
- Updated docs/CONTEXT_RETRIEVAL_AGENT.md with new architecture
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 090401e commit 98d304a
File tree
3 files changed
+1076
-438
lines changed- docs
- scripts
3 files changed
+1076
-438
lines changed
0 commit comments