Fuse
Concepts

Scoping

Narrow a fusion to the files a task needs by name, by git change, or by query, expanding through the dependency graph.

Scoping selects a subset of the codebase relevant to a task instead of fusing everything. Each mode starts from a seed set of files and expands through the dependency graph to a configurable depth, so you get the relevant neighborhood whole rather than a single file in isolation.

There are three modes, and a single fusion uses at most one of them.

ModeFlagSeeds onUse when
Focus--focusA path, filename, type, or directoryYou know the area by name
Changes--changed-sinceFiles changed since a git ref, plus dependentsReviewing a branch or pull request
Query--queryThe top-ranked files for a search queryYou have a topic but not a file name

Focus: scope by name

fuse dotnet --directory ./src --focus OrderService --depth 2

The seed resolves in order: an exact relative path, then an exact filename, then the files that define a type of that name, then a directory prefix. --depth (1 to 10, default 1) sets how many hops out through the graph Fuse follows. Focus pulls both what the seed depends on and the files that depend on it.

Changes: scope by git diff

fuse dotnet --directory ./src --changed-since main --include-dependents

The seed is the set of files changed since a git ref, which can be a branch, a commit, or a relative reference like HEAD~5. --include-dependents (on by default) adds the first-degree dependents of each changed file, the code most likely to break. This mode needs git on your PATH. It is the strongest mode by measurement: 88 percent change recall on real merged pull requests.

Query: scope by topic

fuse dotnet --directory ./src --query "discount calculation at checkout" --query-top 5 --depth 2

Query ranks files by relevance, seeds on the top ones (--query-top, default 10), and expands through their dependencies. Ranking weights a file's declared type and member names and its path above the body, so a query lands on the file that declares a concept rather than one that merely mentions it.

Why expand through the graph

A changed file rarely stands alone. The type it calls, and the test that calls it, are part of the same task. Graph expansion brings that neighborhood in so the agent does not have to discover it with more round-trips. Per-hop scoring decays with distance and a token budget stops the expansion, so the seed neighborhood survives and distant files drop first.

A note on accuracy

The default dependency graph is regex-based and best-effort: it can miss edges from dynamic dispatch or reflection. For accurate edges and member-level scoping, the precision tier swaps in Roslyn. The ranking and traversal are detailed in Scoping internals.

Next

Put a mode to work: Scope a pull request or Ask one question.

On this page