You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: move the OpenAPI lowering rules out of ir-design into a lowering spec beside the compiler, one rule per entry #963
docs/ir-design.md is the normative, format-agnostic description of the IR, and much of it is the OpenAPI compiler's lowering rules. At c387e25c, read section by section:
56% of its 208,670 characters is format-agnostic IR design;
33.9% is OpenAPI lowering;
5.9% covers the other six formats together.
Most of the OpenAPI share is one line: the §14 OpenAPI row, line 2608, is 18,902 bytes and holds about 71 rules. It was 2,345 bytes on 2026-07-20.
The cost shows up in review and in reading:
Edits. ir-design changed in 44 of the last 150 PRs. Every edit to that row shows the whole row as changed.
Restatement. Of ten rules sampled from the row, five are stated in ir-design nowhere else, and each is stated in a median of 7 places across docs, code and tests.
Reading. The documents a newcomer is asked to read before a first change come to 74,854 words, about 5.4 hours at 230 words a minute. ir-design alone is about 2.2 hours, and a third of it is OpenAPI rules a contributor to another layer does not need.
The other formats' rows are 586 to 2,060 bytes each.
Direction
A proposal:
A lowering spec for the OpenAPI compiler (for example docs/compilers/openapi.md), with one heading or list item per rule. Each rule names its conformance case and diagnostic code where it has one.
ir-design keeps the format-agnostic shapes and a one-line summary per format, linking to that spec.
The reading list in the root guidance names the lowering spec for compiler work only.
The first step is mechanical: split the row into a list without changing a word, so the move itself carries no content change.
Done when ir-design has no line over a few hundred characters and every OpenAPI rule has a single home.
Activity