Diagnostics and workspace analysis
Platform spec node
Diagnostics and workspace analysis
Spec standingStandard
No architecture decision records under adr/ for this feature yet. Standard features must
publish at least one ADR or keep a ## Decisions summary on the hub.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
scope | yes | yes |
features | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Normative platform contract
Section titled “Normative platform contract”- LSP document analysis shall support cached and cold diagnostic paths with equivalent semantic rule outcomes.
- Workspace scanning and symbol features shall use project graph context rather than isolated file parsing when available.
- Document analysis snapshots for
.bdIntelliSense shall be built with the sameCompilationContext/ProgramAssemblypath as project-aware diagnostics (build_document_analysis_with_contextinbeskid_lsp::session::lifecycle), not single-fileResolver::resolve_programalone. - Manifest diagnostics for
.projfiles shall be surfaced through project-specific diagnostic adapters. - LSP diagnostics shall preserve severity and code identity from compiler analysis diagnostics.
- Documentation diagnostics — For
.bdbuffers whereDocumentAnalysisSnapshotis available, the server shall mergedoc_diagnostics(documentation mini-language, codes W161x and W162x) with diagnostics fromanalyze_source_with_compilation_context/ semantic rules so editors show a single unified list per URI. - Meta diagnostics — Diagnostics emitted during mod analyze/rewrite phases must use the same transport, code strings, and severity mapping as semantic diagnostics from
beskid_analysisso CLI and LSP remain interchangeable for CI diffing. The LSP must refresh these diagnostics whenever the mod host invalidates a document generation (see Snapshot and refresh contract). - Workspace analysis with
Modprojects — When the resolved graph includesModnodes, analysis must schedule meta after the sameCompilationContextsnapshot rules as CLI; the server must not analyze host sources in a mode that skips attachedModunless a documented power-saving mode is enabled uniformly across commands.
Implementation anchors
Section titled “Implementation anchors”compiler/crates/beskid_lsp/src/diagnostics.rscompiler/crates/beskid_lsp/src/workspace_scan.rscompiler/crates/beskid_lsp/src/featurescompiler/crates/beskid_analysis/src/doc/validate.rs