Skip to content

tracking: a simpler architecture and contributor path for ir, pass, engine and the CLI #976

Closed
26 of 26 issues completed

Description

@OmarAlJarrah

The goal and context come first, then the ordered plan. Each step is a sub-issue, and the blocked-by relations are set on the issues themselves.

End goal

A contributor can change one layer without learning the others, and the rules that matter fail a test rather than a review. Done means all of the following:

  • each rule and fact has one home;
  • the engine holds the run policy, and the CLI is a thin shell over it;
  • passes can transform the IR;
  • the IR version is asserted once, against its shape;
  • the normative documents are layered like the code;
  • the engine and CLI boundaries are bounded and cancellable.

Context

#919's report measured the layers at c387e25c. The package layering is already enforced: the import-graph tests, the method cap, and no accidental package coupling. The cost sits elsewhere:

  • Duplicated work. irverify makes 17 whole-document walks, 14× the allocations of one traversal.
  • Version churn. A version bump touches a median of 146 files, 69% of them goldens changing one line.
  • Docs layering. A third of ir-design.md is one compiler's lowering rules, much of it on one 18,902-byte line.
  • Run policy in the CLI. The CLI holds the run policy (fatality, rendering, writing), and cmd/morphic is 3× the engine's size.
  • Passes cannot transform. Transform passes cannot replace types.
  • Unchecked contracts. A second compiler's output duties are unchecked, and the harness runs only the OpenAPI compiler.
  • Onboarding. The reading before a first change is about 5.4 hours, and 48% of the root guidance's rules are prose only.

The largest single simplification, owning OpenAPI schema resolution in the compiler, is #920's.

Plan

1. Contributor path

2. Layer contracts

3. Cost and boundaries

4. One home for a rule

Priority: P2, the tier of its highest open step (#970).

Activity

  1. added
    type:choreRefactor or cleanup, no behavior change
    priority:P2Rarer spec shapes, or an IR decision to settle before the emitter
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2Rarer spec shapes, or an IR decision to settle before the emittertype:choreRefactor or cleanup, no behavior change

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions