CLAUDE.md@scripts/agent_compile · git:20260725.1d299f1 · 2026-07-25 · sha256 10090aa6a9c5de4f
CLAUDE.md@scripts/agent_compile git:20260725.1d299f1A
Immutable. This exact content never changes and is served at /api/v1/blob/10090aa6a9c5de4f.
# scripts/agent_compile/ — rules Tooling for the **agent-compile RFC (#133)**: does selecting a per-scenario *subset* of skills (Compile → Agent → Route) change cost/accuracy vs a plain agent? Start from [`README.md`](./README.md) — it maps every script to its RFC phase. Findings: [`docs/experiments/agent_compile.md`](../../docs/experiments/agent_compile.md); design: [`docs/agent_compile_design.md`](../../docs/agent_compile_design.md). ## Things to know before editing - **Phase names skip 0 → 2 on purpose.** Scripts exist only for phases that run data; Phase 1 (`classify()`) is code + a doc, not a sweep. `run_sweep.py` + `aggregate.py` drive Phase 0; `run_sweep.py` + `aggregate_phase2.py` drive the Phase 2 subset sweep. Don't "fix" the numbering. - **Indexes reach the agent through `RepoManifest`.** `IndexCompiler.compile_repo()` (in `codenib/compiler/`) builds `bm25` / `vector` / `symbol_graph` and writes `repo_manifest.json` — the source of truth for what exists, its freshness, and status. Skill contexts load either JIT (`build_skill_contexts`, builds missing indexes) or AoT (`load_contexts_from_manifest`, trusts a prebuilt manifest). `AgentRunner` also uses the manifest for a `ResourceGuard` preflight that excludes skills whose indexes are missing/stale. - **The cost/ablation study runs on a separate, simpler track** (prebuilt indexes + reps), not the full subset sweep — see the README before assuming a script belongs to the main sweep. ## Verified findings live in memory, not here Sweep results, env specifics (model endpoints, embedding model, prebuilt-index paths) and known measurement bugs are recorded in the project memory notes on agent-compile — consult those for "what the numbers were", and keep this file to *how the code is structured*.