Sibling articles under this feature previously restated requirements in inconsistent forms.
Rules and diagnostics catalog
Platform spec feature
Rules and diagnostics catalog
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Rules and diagnostics catalog.
Context
Decision
This feature hub owns normative MUST/SHOULD contract text. Sibling articles must not redefine hub requirements and should link here for authority.
Consequences
Contract changes start on the hub or in linked ADRs, then propagate to articles and implementation anchors.
Verification anchors
site/website/src/content/docs/platform-spec/compiler/semantic-pipeline/rules-and-diagnostics-catalog/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Rules and diagnostics catalog.
Context
Implementation crates accumulated informal notes that diverged from published contracts.
Decision
Normative platform-spec prose and ADRs under this feature supersede informal comments in implementation crates until explicitly migrated into spec text.
Consequences
Engineers file spec/ADR updates when behavior changes; crate comments are non-authoritative for conformance arguments.
Verification anchors
compiler/crates/beskid_analysis/src/analysiscompiler/crates/beskid_analysis/src/analysis/rules/stagedcompiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rs
-
This feature defines how semantic rules are scheduled and how their findings map to stable diagnostic kinds. The primary
Context
This feature defines how semantic rules are scheduled and how their findings map to stable diagnostic kinds. The primary implementation roots are
beskid_analysis/src/analysis, staged rule modules underanalysis/rules/staged, and services that expose diagnostics to CLI/LSP consumers.Decision
The reference compiler must implement Rules and diagnostics catalog as documented in this feature hub and its article bundle.
Consequences
Changes require hub/ADR updates and verification anchor extensions.
Verification anchors
compiler/crates/beskid_analysis/src/analysiscompiler/crates/beskid_analysis/src/analysis/rules/stagedcompiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rs
- Contracts and edge cases Rule-level guarantees and high-risk semantic edge cases.
- Design model Mental model for staged semantic rules and diagnostic production.
- Examples Practical examples of semantic rule outcomes and diagnostic generation.
- FAQ and troubleshooting Common semantic-pipeline debugging questions and practical checks.
- Flow and algorithm End-to-end semantic rule flow from resolved items to user-facing diagnostics.
- Verification and traceability How semantic rule behavior is validated and traced to source modules.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
What this feature governs
Section titled “What this feature governs”This feature defines how semantic rules are scheduled and how their findings map to stable diagnostic kinds. The primary implementation roots are beskid_analysis/src/analysis, staged rule modules under analysis/rules/staged, and services that expose diagnostics to CLI/LSP consumers.
Core guarantees
Section titled “Core guarantees”- Semantic checks run on resolved project state and must produce deterministic diagnostic ordering.
- Diagnostic kind identity is anchored in
analysis/diagnostic_kinds.rs. - Error-severity diagnostics are compilation blockers in diagnostics-enabled paths.
- CLI and LSP surfaces may differ in rendering but must preserve diagnostic kind and source span identity.
Documentation diagnostics (snapshot)
Section titled “Documentation diagnostics (snapshot)”Documentation-only findings use stable warning codes W1610–W1615 and W1620–W1625 (see Diagnostic code registry design model). They are computed in beskid_analysis::doc::collect_doc_diagnostics and attached to DocumentAnalysisSnapshot::doc_diagnostics so editors can merge them with staged semantic diagnostics without re-running HIR-heavy rules on the hot path.
Implementation anchors
Section titled “Implementation anchors”compiler/crates/beskid_analysis/src/analysiscompiler/crates/beskid_analysis/src/analysis/rules/stagedcompiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rscompiler/crates/beskid_analysis/src/doc/validate.rscompiler/crates/beskid_analysis/src/services.rscompiler/crates/beskid_lsp/src/diagnostics.rs
Decisions
Section titled “Decisions”No open decisions. Closed choices are normative ADRs under adr/ (D-COMP-SEM-0007 … D-COMP-SEM-0009); use the reader ADRs tab for expandable detail.