Skip to content

Vox diagnostic UX taxonomy (research)

Naming: Planned slug vox-diagnostic-ux-ssot-2026; not B-canon until registered in contracts/documentation/canonical-map.v1.yaml.

Parent context: Vox Language Rules & Enforcement — Top-Level Plan (2026), Phase 2 (--for-llm, LintFix), Phase 4 (idiom telemetry hooks).

ConsumerNeed
Human in IDEStable severity, actionable spans, optional related information.
LLM agentStable machine-readable codes, minimal repro, symmetric fix hints (Phase 2).
CISame codes as local vox check; no duplicate conflicting rules without documented precedence.
LevelTypical use
ErrorProgram rejected or unsound boundary crossed.
WarningCorrectness or policy risk; may become error after deprecation window.
Note / infoOptional style, migration nudges, education (map carefully to LSP Hint vs Information).

The language server maps TypeckSeverity to LSP DiagnosticSeverity and attaches structured fix data (crates/vox-lsp/src/lib.rs). Gaps to track:

  • Whether every compiler diagnostic intended for authors appears in LSP validation.
  • Whether code_description URLs (--explain) exist per Phase 2 plan.

Shipped shape: vox check <file>.vox --for-llm prints a single JSON object (CheckForLlmEnvelope in crates/vox-cli/src/pipeline.rs):

FieldMeaning
envelope_versionInteger schema revision (currently 1).
file_pathLabel passed to check_file (usually the .vox path).
oktrue only when zero error-severity diagnostics are present.
error_count / warning_countAggregates over machine payloads (parse + typecheck + HIR validation).
diagnosticsArray of VoxCompilerDiagnosticPayload structs (same JSON shape as legacy --json diagnostic arrays, wrapped).

Golden lock: crates/vox-cli/tests/check_for_llm_envelope.rs.

  1. Precedence: When vox-code-audit and vox-compiler disagree, which wins in CI vs IDE?
  2. Formatting: Can vox fmt change spans such that diagnostics shift — see formatter findings doc.
  3. Privacy: Which diagnostic payloads are safe for default telemetry vs opt-in — telemetry-trust-ssot.md.