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
Several places where the design docs and README no longer match the code they specify — each small, but these documents are declared normative, so drift is costly:
Package layouts omit four real packages.docs/architecture.md §3 and README's layout table list only ir/ (+irtest), compilers/*, pass/, emitters/*, engine/, cmd/morphic/. Missing: cmd/morphic-harness/, internal/harness/, internal/archtest/, ir/irverify/. The code is well-placed (the archtest comment explains why internal/harness sits outside the layering) — the docs are what's stale. README's table also says cmd/morphic imports "engine", but it imports ir too.
§2.1 still shows the pre-rename contract.architecture.md §2.1 shows Parse(ctx, sources, Options); the method is Compile since the frontend→compiler rename (refactor(compilers)!: rename frontend→compiler and backend→emitter #5). engine/engine.go also retains front/fronts identifiers and an "engine: parse %q" error prefix — worth renaming while touching it.
emitter-design.md §2.1 contradicts the implemented registry philosophy. It prescribes a registry "populated by each target's init() — mirroring the compiler registry", but the actual compiler registry explicitly forbids init-time self-registration (compilers/compilers.go:46-47) and CLAUDE.md bans mutable globals. If uncorrected, Milestone 3 gets built against the wrong pattern citing "mirroring" as authority.
architecture.md §3 lists a future compilers/swagger/ directory whose job ("2.0 lift → openapi compiler") would require the sibling import the layering rules forbid — while Milestone 2's text says the lift lives inside the OpenAPI compiler. Drop the directory from the layout.
README documents one diagnostic format; the CLI prints three (path#pointer, bare IR ID, bare line:col). Document the fallback forms.
Proposed direction
One docs PR covering all five, plus the engine identifier rename if desired.
Acceptance
Layout listings match find . -type d; the compiler contract shown matches compilers.Compiler; emitter-design's registration section matches the engine-composed pattern; README's diagnostic-format section matches actual output.
Problem
Several places where the design docs and README no longer match the code they specify — each small, but these documents are declared normative, so drift is costly:
docs/architecture.md§3 and README's layout table list onlyir/(+irtest),compilers/*,pass/,emitters/*,engine/,cmd/morphic/. Missing:cmd/morphic-harness/,internal/harness/,internal/archtest/,ir/irverify/. The code is well-placed (the archtest comment explains whyinternal/harnesssits outside the layering) — the docs are what's stale. README's table also sayscmd/morphicimports "engine", but it importsirtoo.architecture.md§2.1 showsParse(ctx, sources, Options); the method isCompilesince the frontend→compiler rename (refactor(compilers)!: rename frontend→compiler and backend→emitter #5).engine/engine.goalso retainsfront/frontsidentifiers and an"engine: parse %q"error prefix — worth renaming while touching it.emitter-design.md§2.1 contradicts the implemented registry philosophy. It prescribes a registry "populated by each target'sinit()— mirroring the compiler registry", but the actual compiler registry explicitly forbids init-time self-registration (compilers/compilers.go:46-47) and CLAUDE.md bans mutable globals. If uncorrected, Milestone 3 gets built against the wrong pattern citing "mirroring" as authority.architecture.md§3 lists a futurecompilers/swagger/directory whose job ("2.0 lift → openapi compiler") would require the sibling import the layering rules forbid — while Milestone 2's text says the lift lives inside the OpenAPI compiler. Drop the directory from the layout.Proposed direction
One docs PR covering all five, plus the engine identifier rename if desired.
Acceptance
find . -type d; the compiler contract shown matchescompilers.Compiler; emitter-design's registration section matches the engine-composed pattern; README's diagnostic-format section matches actual output.