Rule 11.19
Chapter 11, Targets and the oracle Test
The package root exports no IR builder. An author writes a program in "use typeshade"; the builder, its node classes and its declarators are typeshade/core/ir, a subpath for engines, tools and the compiler’s tests, with no stability promise before 1.0. The root keeps the IR’s types and the readers a tool needs to inspect what compile() returns.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
the root export is where a reader looks first (import { … } from 'typeshade', the editor’s completion list, the API reference’s first page). While the builder is there, the authoring guide, the site and every completion list keep teaching a second language beside "use typeshade". Code that builds IR (an engine’s generated shaders, the compiler’s tests, the registry examples) keeps one home for it, the subpath.
Derives from
change 0060 in changes/; docs/roadmap.md 0.8 item 24.
How it is verified
Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.
Where the rule says the compiler enforces it:
the explicit re-export list of src/index.ts; src/api-surface.test.ts, which holds the root to none of the builder’s values and typeshade/core/ir to all of them, and the baked src/__api__/surface.md (Rule 11.6).
The files that verify it at commit 91c2fe31, each at the first line that names the rule:
See also
Source
The rule at commit 91c2fe31:
docs/language-design.md:1395(the design document)reqs/rules/RULE-1119.md(its traceability item)