Fuse
Scenarios

Cut tokens for a .NET project

Render a .NET solution, or a known set of files, into a token-efficient payload and cap output to a budget when needed.

Goal: take a .NET solution, or a set of files you already have, and produce a smaller payload with a measured fidelity profile. When the result must fit a model window, cap it with a hard token limit.

Reduce a Known Set of Files

When you already know which files you want, fuse reduce compacts them without indexing a directory:

fuse reduce --files src/OrderService.cs --files src/Order.cs --level aggressive

--level aggressive applies the full C# structural reduction: it removes comments, usings, namespaces, and regions, then compresses aggressively. The levels run from none (lossless cleanup) to skeleton and publicApi (signature-focused views). See Reduction levels for the full ladder.

Reduce an Area to a Budget

When you want an area of the solution rather than named files, plan context to a token budget and let Fuse choose the render tier per file:

fuse context ./src --seed OrderService --max-tokens 25000

fuse context reduces the seed neighborhood to fit the budget: it keeps the must-keep seeds in full and renders peripheral files more aggressively (compressed, or skeleton) so the whole set fits. The output opens with a manifest listing each file and its token cost, then the bodies, with per-file provenance.

Cap a Review the Same Way

fuse review ./src --changed-since origin/main --max-tokens 25000

fuse review honors the same budget. The changed files are always kept, so when the budget is tight the cut falls on the periphery of the blast radius first, never on the diff itself.

What Survives the Cut

Because the plan fills by weight-per-token, the files closest to the seeds survive and the least relevant drop. The single most relevant entry is always kept, so a budgeted call never emits nothing. The manifest lists each emitted file and its token cost, so you can see exactly what fit.

Suggested Budgets

WorkflowCommand shapeBudget
Architecture viewfuse context --seed ... --max-tokens15k to 50k
Focused areafuse context --seed ...15k to 50k
Change reviewfuse review --changed-since ...15k to 50k

The Measured Cut

Across the four repositories in reduce.json, standard reduction removes 11 to 41 percent of tokens and aggressive removes 16 to 46 percent. Skeleton removes 38 to 44 percent, while public API removes 47 to 60 percent. An independent Roslyn parse checks declaration-name fidelity at skeleton level: every public and protected type-name key survives, and 96.3 to 99.4 percent of public and protected method-name keys survive. These measurements do not claim complete API preservation.

Choose the Current Cut

For known files whose bodies matter, run fuse reduce --level aggressive. For a named area, run fuse context --seed ... --max-tokens 25000. For a branch, run fuse review --changed-since origin/main --max-tokens 25000. Read the manifest and lower the budget or narrow the seeds if peripheral files consume space needed by the task.

On this page