# v0.42.0: leaner tool output and configurable backups

This release focuses on the cost of every tool call — how much context AFT's navigation and search tools spend to answer a question — and adds configurable file backups behind undo. The output changes were measured against an external head-to-head benchmark suite and cut AFT's per-task tool-context cost substantially at unchanged answer quality.

## Leaner navigation and search output

The navigation and search tools were dumping more than the agent needed: a whole class body when only a menu of its methods was wanted, every standard-library call in a call tree, the same callee repeated once per call site. This release trims each of these to what's actually useful, with no loss of information.

- **`aft_zoom` on a large container returns a member menu, not the whole body.** Zooming a class, struct, impl, trait, or enum larger than ~150 lines now returns its members listed with their signatures and line ranges — the same shape `aft_outline` gives a file — instead of the entire body. Zooming a specific method still returns its full body; a small container is still returned whole. This stops one zoom of a large class from spending tens of thousands of characters the agent then bypasses to zoom the method it actually wanted.
- **`aft_search` expands only the top match, within a budget.** The top result is shown as full symbol source (so it can be edited without a re-read); ranks 2-3 are short previews; the rest are headers only. If the top match is itself a large symbol, it is rendered within a budget — a member menu for a big container, a head slice for a big function — rather than dumped whole.
- **`aft_callgraph` collapses standard-library noise.** In `call_tree`, unresolved external/stdlib calls (`len`, `Some`, `clone`, …) are folded into one summary line per caller instead of one line each. These made up over half of call-graph output and can't be navigated anyway. Resolved, project-internal edges are unchanged. Pass `includeUnresolved=true` to see every edge individually.
- **`aft_zoom` call lists are deduplicated.** `calls_out` / `called_by` now list each callee once with a count, instead of repeating a line per call site.
- **Ambiguous name zooms return candidate signatures** to choose from, instead of an error.
- **Generated documentation trees are down-ranked in search.** Committed jazzy/javadoc/sphinx output (`.html`/`.css`/`.json` artifacts) no longer crowds real source out of `aft_search`'s top results. `grep` stays exhaustive and unchanged; hand-written docs are unaffected.
- **`aft_search` invites natural-language questions** for conceptual queries (its semantic lane is tuned for intent), and hides test files by default.

## Configurable backups behind undo

`aft_safety`'s undo is backed by per-file snapshots on disk. This release makes that configurable and removes write amplification from the edit hot path:

- **New settings:** `backup.enabled` (default `true`), `backup.max_depth` (default `20`), and `backup.max_file_size` — control whether backups are kept, how deep the per-file history goes, and a size ceiling above which a file isn't snapshotted.
- **Faster edits.** Each edit now appends a single backup file instead of rewriting the entire backup stack, so backup cost no longer grows with history depth.
- **Rollback safety is preserved.** Internal transactional rollback for failed multi-file refactors and renames stays active regardless of the `backup.enabled` setting.

## Search ranking

Semantic search adds ranking priors that lift exact-name definitions and "type + concept" matches, improving retrieval on identifier and concept queries without changing the index format or requiring a re-index.

## Fixes

- **Editing Rust code containing `&raw`** (a variable named `raw` passed by reference, e.g. `handle(&raw)`) no longer fails validation and silently rolls back. Bumped `tree-sitter-rust` and several other grammars to current releases.
- **Editing files whose paths contain `[brackets]` or `{braces}`** — e.g. Next.js dynamic routes like `app/[id]/page.tsx` — now resolves the literal path first instead of treating it as a glob pattern. Thanks to @tobwen.
- Dependency bumps: `zod`, `@opencode-ai/*`, the Pi SDK, and `@clack/prompts`.

## Under the hood

- Lower peak memory and CPU during indexing: cold semantic builds and the Tier-2 code-health scan are serialized so they don't pile onto the same cores at once.
