Expand description
Rule-tagged messages for type errors (#306 slice 2).
Every TypeError variant maps to a stable rule_tag (a kebab-
case identifier) and a rule_explanation (plain-language
description of what the rule enforces). LLM repair flows that
reference the rule_tag get measurably better repair attempts
because the model can cross-reference the rule across many
prior examples.
The tag is stable across releases — once shipped, a rule_tag never changes meaning. New rules get new tags; existing variants that split into more specific sub-rules will be handled by adding new sibling tags, not by repurposing existing ones.
Structs§
- Rule
Info - Catalog entry for one rule.
Functions§
- all_
rules - The full rule catalog, in stable order. Used by
lex docs --rulesand by tooling that wants to enumerate every supported rule (e.g. an LSP server building a code-actions registry). - suggested_
transform_ for - Static (rule_tag → suggested_transform) table for #306 slice 3.