SIFR-<FAMILY>-dddd. Whether you are reading terminal output, wiring up a CI pipeline, or integrating an editor extension, the same structured information is always available — you only choose how it is rendered. This page explains the diagnostic system from end to end: output formats, severity levels, the --diagnostic-format flag, the JSON envelope schema, exit codes, and how to suppress lint rules when needed.
Severity Levels
Every diagnostic carries one of three severity levels.Only
Error-severity diagnostics block a successful build. Warning and Note diagnostics are emitted alongside the build result and do not prevent artifact generation on their own.Output Formats
Compiler-facing commands (sifr build, sifr run, sifr check, sifr emit) accept the --diagnostic-format flag with three values: human, json, and compact. The default is human.
Human Format (default)
Thehuman format is designed for developer terminals. It renders source file locations, code snippets, caret highlights, related spans, notes, help text, code-action suggestions, and documentation URLs whenever span data is available. Spanless internal diagnostics fall back to an explicit location: <unavailable> line.
Compact Format
Thecompact format is a stable, line-oriented format suited for CI pipelines, agents, and quick terminal scanning. It emits a one-line summary followed by one line per diagnostic after recovery limiting. The first four fields on each diagnostic line are stable: severity abbreviation, code, location (or <unknown>), and message.
JSON Format
Thejson format emits a DiagnosticEnvelope object to stdout. It is the canonical format for editor integrations, language servers, and any tool that needs to consume structured diagnostic data. Successful builds in json mode emit no human progress text on stdout or stderr.
JSON Diagnostic Schema
TheDiagnosticEnvelope wraps a versioned array of RenderedDiagnostic objects.
DiagnosticEnvelope field reference
DiagnosticEnvelope field reference
RenderedDiagnostic fields
DiagnosticSpan fields
SuggestionApplicability values
Exit Codes
Sifr commands use consistent exit codes across all subcommands.Looking Up Error Details
You can get detailed documentation for any diagnostic code directly in your terminal using eithersifr --explain or the sifr explain subcommand:
sifr --explain SIFR-PACKAGE-0105 redirects you to the replacement code SIFR-PACKAGE-0101.
Suppressing Lint Diagnostics
Sifr’s policy-rule engine (sifr lint) emits suppressible Warning-level diagnostics. You can silence a specific rule on a single line using an inline comment:
rule-id with the exact Sifr rule identifier such as todo-comment, trailing-whitespace, or boolean-positional-argument.
Suppressions apply only to policy diagnostics from
sifr lint. Hard compiler errors (Error-severity diagnostics from sifr check or sifr build) cannot be suppressed with inline comments.SIFR-LINT-0001— the rule ID in a suppression comment does not match any known policy rule.SIFR-LINT-0002— the suppression comment is present but did not actually suppress any diagnostic on that line.
sifr lint --ignore-suppressions. This flag does not affect per-file ignores or hard compiler diagnostics.