Output Specification
The exact structure of the three Fuse output formats and the manifest, including how metadata, provenance, and git statistics appear.
fuse context, fuse review, and their MCP equivalents emit semantic context as XML, Markdown, or JSON. Compact output and the general emission flags belong to the legacy directory-fusion pipeline and are documented separately below.
This page is for engineers writing parsers against Fuse output, agents consuming a fusion, and anyone who needs to know exactly what a flag adds to the result.
Purpose and Scope
This page specifies the current semantic-context envelope first. The current commands always include the semantic manifest and provenance; they expose no metadata, git-statistics, pattern-summary, compact, report, or manifest-disable options.
File Entries
Semantic-context entries preserve the context plan's ranked order. The planner assigns each file a role, render tier, score, token estimate, and provenance chain before emission.
XML (Default)
Each file is wrapped in a file element whose path attribute holds the normalized path. The reduced content sits between the tags:
<file path="src/Services/OrderService.cs" role="exact-seed" tier="FullSource" tokens="7">
public class OrderService { }
</file>The role, tier, and tokens attributes are always present for emitted bodies. A provenance comment appears inside the element when the plan recorded an inclusion chain:
<!-- included via: OrderService -> IPaymentGateway -> StripeGateway -->With a sessionId, an unchanged file is represented as <file path="..." role="..." unchanged="true" />; its body is omitted.
Markdown
With --format markdown, each file uses a level-two heading containing its path, role, and render tier:
## src/Services/OrderService.cs [exact-seed/FullSource]
```
public class OrderService { }
```Non-seed entries include an _included via ..._ line. Session-elided entries state that the body was omitted.
JSON
With --format json, the result is one JSON document. Top-level fields are mode, root, changedSince, files, estimatedTokens, entries, notes, apiDelta, and claims. Each entries item contains:
| Field | Type | Present when |
|---|---|---|
| path | string | Always |
| role | string | Always |
| tier | string | Always |
| score | number | Always |
| content | string | Always |
| tokens | number | Always |
| provenance | array of strings | Always |
| unchanged | bool | Session elision only |
{"mode":"context","files":1,"estimatedTokens":7,"entries":[{"path":"src/Services/OrderService.cs","role":"exact-seed","tier":"FullSource","score":1,"tokens":7,"provenance":[],"content":"public class OrderService { }"}],"notes":[]}Semantic Manifest
XML starts with an HTML comment containing fuse:semantic-context. Markdown places the same manifest body in the opening fenced block. It records:
mode,root, optionalchangedSince, file count, and estimated tokens- must-keep seed paths and roles
- semantic-impact paths with role and provenance summary
- review API delta and graded claims when present
- planner notes
JSON carries these values as top-level fields and entry properties instead of a text preamble.
Legacy Directory-Fusion Output
The sections below describe the retained general emission pipeline. Current fuse context, fuse review, and fuse reduce commands do not accept the named flags.
Compact
With --format compact, each file is introduced by a single header line and has no closing marker; the next header line or the end of output bounds the body. This drops the per-file closing tag and attribute syntax that XML carries, so the envelope costs fewer tokens, a saving that grows with the number of files. XML remains the default.
=== src/Services/OrderService.cs ===
public class OrderService { }With --include-metadata, the header gains a trailing | <size>b <modified> segment. With --provenance, an @via line precedes the header under the same more-than-one-entry rule as the other formats.
Deduplicated Headers
With --dedup-headers, an identical leading comment header (for example a license banner) shared by two or more files is emitted once in a preamble at the top of the output and replaced in each file by a marker line // fuse:header[N]. Only leading comment blocks are moved; preprocessor directives and code are never touched, so the API surface is unchanged. The preamble opens with === fuse:deduplicated-headers === and lists each shared header once with its marker and the number of files that referenced it. Files with no shared header are left as is.
Legacy Manifest
The manifest is on by default and prepended before the file entries. It lists every included file with its token cost so that a reader can judge the shape and size of a fusion before reading any file body. Disable it with --no-manifest.
Token counts in the manifest are abbreviated: a count of 1000 or more is shown as Nk (for example 1.5k), and smaller counts are shown in full.
XML and Markdown Manifest
In both formats the manifest is an HTML comment block. It opens with <!-- fuse:manifest, lists the file count, then one line per file, and closes with -->:
<!-- fuse:manifest
files: 3
src/Program.cs (~420 tokens)
src/Services/OrderService.cs (~1.2k tokens)
src/Services/PaymentService.cs (~890 tokens)
-->With --git-stats, each file line gains a trailing churn summary in the form [commits:N last:YYYY-MM-DD]:
src/Services/OrderService.cs (~1.2k tokens) [commits:14 last:2026-05-30]With --pattern-summary, one summary line per detected pattern is appended after the file list. The Pattern Detectors reference documents what each line reports.
JSON Manifest
In JSON the manifest is an object with type "manifest". Its files array holds one object per file with path and tokens, plus commits and lastModified when git statistics are available. A patterns array carries detected patterns, and a git availability field reports whether git statistics could be produced:
{
"type": "manifest",
"files": [
{"path": "src/Services/OrderService.cs", "tokens": 1200, "commits": 14, "lastModified": "2026-05-30"}
],
"patterns": [],
"git": "unavailable"
}Compact Manifest
The compact format cannot use an HTML comment, so its manifest opens with the marker # fuse:manifest followed by the same file lines, each prefixed with #:
# fuse:manifest
#files: 3
# src/Program.cs (~420 tokens)Legacy Run Report
The --report flag writes a separate machine-readable JSON object summarizing the run, independent of the fusion body. With --report <path> it is written to that file; with --report - it is written to stdout. The report has type "report" and always names the tokenizer used for its counts:
{
"type": "report",
"tokenizer": "o200k_base",
"format": "xml",
"totalTokens": 18432,
"processedFiles": 42,
"totalFiles": 57,
"durationSeconds": 0.83,
"cacheHits": 40,
"cacheMisses": 2,
"outputPaths": ["project_2026-06-20_1430_18k.txt"],
"files": [{"path": "src/Program.cs", "tokens": 420}],
"patterns": null
}What This Does Not Cover
This page does not explain the reduction that produces the content inside each entry, nor the token budget and part-splitting that govern how much is written. It documents structure only. For staying inside a budget, see Cut tokens for a .NET project. For the flags named here, see Options.
Next
Read Pattern Detectors for the content of pattern summary lines, or Options for the --format flag and its values.