Repository split: the editor and the showcases
Status: shipped (2026-12-06): phases 0–2c. Moved from docs/design/future/ when phase 2c landed; the design below
is the proposal as accepted on 2026-12-05, with “Changes from the proposal” at the end.
Milestone: none
The engine is this repository. The editor and its video library are in
mainframe-editor; Forest and Neon are in
mainframe-engine-showcase. Both have this repository as
a git submodule at engine/.
Problem
Section titled “Problem”One repository holds four things with different lives: the engine (the MainframeEngine package, its tools, the
Demo), the editor (MainframeEngine.Editor, MainframeEngine.Video), and two showcase games (Forest, Neon). The owner
sees the engine and the editor as separate products and may phase the editor out one day. Today that is hard:
- One
vX.Y.Ztag versions both the engine package and the editor. An editor-only fix needs an engine release, and the other way round. - The engine’s CI, release workflow,
justfile, docs site andAGENTS.mdcarry the editor and the showcases: the editor recipes, the Forest and Neon release jobs, 308 of the repo’s Git LFS files (Forest 229, Neon 79, 264 MB on disk). - Dropping the editor later would mean picking it out of a shared history, CI and release, instead of archiving a repository.
The engine itself has no dependency on either: nothing under MainframeEngine/ references the editor or the
examples, and the editor uses only the engine’s public API (the one InternalsVisibleTo is for
MainframeEngine.Editor.Tests).
Mainframe-Games/mainframe-editor: the editor, its video library, its tests and its release, with the engine as a git submodule atengine/.Mainframe-Games/mainframe-engine-showcase: Forest and Neon, with the engine as a git submodule atengine/.- The engine repo keeps the engine, its tools (
mfe,mf-export,mf-l10n,mf-symbolicate), the templates, the natives it ships, the Demo, and the docs site. - Each repository releases on its own. The editor has its own version line (owner decision, 2026-12-05).
- Installed editors keep updating themselves across the move.
- Moved files keep their history (
git log,git blame).
Non-goals
Section titled “Non-goals”- Removing editor history or showcase LFS objects from the engine repo’s history. That needs a force push to
main, which the repo rules forbid. The engine repo gets lighter going forward, not backwards. - Moving the Demo. It is tied to the engine (one scene per feature, README screenshots, the template smoke).
- Changing how games consume the engine (the
MainframeEngineNuGet package). - Phasing out the editor. This only makes it possible.
- A shared “Mainframe” monorepo tool or meta-repo.
Design
Section titled “Design”Who owns what
Section titled “Who owns what”Moves to mainframe-editor | Moves to mainframe-engine-showcase | Stays in mainframe-engine |
|---|---|---|
MainframeEngine.Editor/ | Examples/Forest/ | MainframeEngine/, .Generators/, .Steamworks/ |
MainframeEngine.Video/ + LICENSE-CUTBACK | Examples/Neon/ | Tools/ (all, incl. MainframeEngine.Export) |
Tests/MainframeEngine.Editor.Tests/, .Video.Tests/ | build/forest-*.sh, build/neon-screenshots.sh | Templates/, Native/ except PluginHost/ |
Tests/MainframeEngine.RenderTests/EditorRenderTests.cs + its goldens | Forest/Neon just recipes | Examples/Demo/, Tests/ (the rest) |
Tests/QA/*.qa that drive the editor (with demo-open.qa, demo-post.qa, which replaced the Forest’s) | build/macos/ (games use it), build/package-example.sh | |
Native/PluginHost/ (mfplughost) + MainframeEngine.Editor/runtimes/ | docs/design/forest.md, neon.md | docs-site/ (engine-only), engine design docs |
build/package-editor.sh, build/editor-icons/ | ADRs 0001–0288 (history stays) | |
docs/design/editor*.md, video-editor.md, future/music-editor.md, future/sound-designer.md | ||
SynthBenchmarks (needs the editor) |
Shared build files (Directory.Build.props, Directory.Packages.props, global.json, .editorconfig) are copied
into each new repo, which imports the engine’s where it can (engine/Directory.Packages.props for the engine’s own
package versions) and adds only its own packages (Whisper.net for the editor).
Submodule layout
Section titled “Submodule layout”Both new repos have engine/ as a submodule of mainframe-engine, pinned to a commit. Day to day it may sit on any
engine commit; a release must sit on an engine release tag (see Releases). Engine projects are ProjectReferences
through engine/, as today, so engine features are usable before an engine release.
- Editor:
MainframeEngine.Editor.csprojreferencesengine/MainframeEngine/…andengine/Tools/MainframeEngine.Export/…. Editor render tests referenceengine/Tests/MainframeEngine.RenderTests.Host. - Showcase:
MainframeEnginePathinExamples/{Forest,Neon}/Directory.Build.propschanges from../..to../../engine. Nothing else in the games changes. - The engine keeps
<InternalsVisibleTo Include="MainframeEngine.Editor.Tests" />: it matches by assembly name, so the editor repo’s tests still see engine internals through the submodule. - The editor never changes files under
engine/. An engine feature or fix the editor needs is an issue and a PR inmainframe-engine(themf-engine-bugflow), then a submodule bump in the editor.
Why not the MainframeEngine NuGet package (considered 2026-12-05): the editor also needs MainframeEngine.Export,
which no package ships; the package adds the generator as an analyzer, which would register the editor’s nodes (the
editor must stay unregistered); and the editor’s render tests run through Tests/MainframeEngine.RenderTests.Host,
which is not packaged. The submodule gives the editor all three without new packages.
Versions
Section titled “Versions”A single -p:Version cannot work any more: it is a global MSBuild property, so it would stamp the editor’s version on
the engine assembly it builds through the submodule, and EngineInfo.Version would lie. Instead:
- The engine’s
Directory.Build.propssetsVersionfromMainframeEngineVersionwhen given (else0.0.0-dev). The engine’s ownpublish.ymlpasses-p:MainframeEngineVersion=X.Y.Z(and keepspack-nuget.shworking). - The editor repo sets the editor assembly’s
VersionfromMainframeEditorVersion. A newEditorInfo.Versionreads it; the updater, About, crash reports and the user agent use it. - The editor release reads the engine version from the submodule’s exact tag (
git -C engine describe --tags --exact-match,vX.Y.Z→X.Y.Z) and passes it asMainframeEngineVersion, soEngineInfo.Versionin a released editor is the engine release it was built from. - New Project already defaults to
EngineInfo.Version, so a new game references the engine package the editor was built against. No change there beyond the stamp. - The editor’s version line continues above the last combined release (
v1.1.xtoday; first editor-only release is at leastv1.2.0). The updater compares versions, so a lower number would never be offered to installed editors.
Releases
Section titled “Releases”mainframe-enginepublish.yml: drops the editor build, the editor in the symbols zip, and the Forest and Neon jobs. Keeps NuGet, the Demo zip and the engine symbols.mainframe-editorpublish.yml: a copy of today’s editor jobs (build/package-editor.sh, macOS signing, symbols). A guard fails the release whenengine/is not exactly on avX.Y.Ztag.mainframe-engine-showcasepublish.yml: packages Forest and Neon withengine/build/package-example.sh, tagged with the engine version the submodule is on (vX.Y.Z= the engine release they run on).natives.ymlsplits: engine natives stay;mfplughostbuilds in the editor repo.
Example downloads in the editor
Section titled “Example downloads in the editor”The editor’s Download Demo/Forest/Neon (DemoRelease.AssetUrl) takes the zip from the engine release tagged with the
editor’s version. After the split:
- Demo:
mainframe-enginereleasev{EngineInfo.Version}. - Forest, Neon:
mainframe-engine-showcasereleasev{EngineInfo.Version}; when there is none (the showcase was not released for that engine version), the dialog says so, as it does today for a missing asset. - Development builds keep using “latest” of the matching repo.
Moving installed editors
Section titled “Moving installed editors”Installed editors read mainframe-engine/releases/latest. After the split, a newer engine release has no editor asset,
and UpdateChecker reports UnsupportedPlatform: the editor stops updating, silently.
- The last combined release (the bridge,
v1.1.x) ships an editor whoseReleaseFeedreadsmainframe-editor/releases/latest. - The bridge is released before the first engine release without the editor, so every editor that checks for updates in between moves over.
- An editor that misses the bridge shows
UnsupportedPlatform. Its message gains a link to the editor’s releases page in the bridge, and the engine README and site say where the editor went. Older editors need a manual download.
Docs and website
Section titled “Docs and website”Owner decision (2026-12-05): the editor repo gets its own docs/ and a small Pages site; the engine site keeps a short
Editor section linking to it and to the editor’s releases.
- Editor design docs move with history; their links into engine docs become absolute GitHub links.
- The engine’s landing page drops editor downloads and editor screenshots, keeps one Editor card that links out.
- The engine’s
AGENTS.md,docs/design/architecture-overview.md,testing.mdandrelease.mddrop the editor and showcase parts. - Each new repo is set up with
mf-new-project(workflow,AGENTS.md,memory/,docs/). Its decisions start at 0001 and link to the engine’s ADRs for the history.
History
Section titled “History”Each new repo is made with git filter-repo --path … over a fresh clone of the engine (the move lists above, with
--path-rename for the new layout), then git lfs push --all to the new remote. The engine side is one PR that
deletes the moved paths and adds nothing back.
The showcase goes first: it is small, has no users to migrate, and proves the submodule layout. The editor follows.
Scenarios
Section titled “Scenarios”Phase 1: showcase
Section titled “Phase 1: showcase”- Given a fresh
git clone --recurse-submodulesofmainframe-engine-showcase, whenjust forest-testandjust neon-testrun, then both pass againstengine/. Test: showcase CI jobtest. - Given the showcase repo, when
just forest -- --max-frames 120runs on a machine with a GPU, then the game opens and exits 0. Test: showcase CI jobsmoke(macOS),just forest-screenshots. - Given a Neon surface shader edited in the showcase repo, when
just shaders-checkruns there, then the shader is compiled and checked. Test: showcase CI jobshaders(today the engine’ssurface_shader_folderslistsExamples/Neon/Assets). - Given the engine repo after the move, when
just build,just testandjust test-renderrun, then they pass and nothing under the repo refers toExamples/ForestorExamples/Neon(outsidememory/). Test:build/check-moved-paths.shin the engine’s CIworkflowjob. - Given the engine’s
ForestMiniScenerender test, when it runs after the move, then it is unchanged (it uses engine assets only). Test:ForestFeatureTests. - Given an engine release
vX.Y.Zand the showcase submodule on that tag, when the showcase release runs, then it publishesForest/Neonzips under tagvX.Y.Zinmainframe-engine-showcase. Test: showcasepublish.ymldry run (just publish-local).
Phase 2: editor
Section titled “Phase 2: editor”- Given a fresh
git clone --recurse-submodulesofmainframe-editor, whenjust buildandjust testrun, then the editor, editor tests and video tests build and pass againstengine/. Test: editor CI jobbuild-test. - Given
engine/on tagv1.3.0and an editor releasev1.4.0, when the released editor starts, thenEditorInfo.Versionis1.4.0andEngineInfo.Versionis1.3.0. Test:VersionStampTests(editor repo, reads the stamped assemblies of a-p:MainframeEditorVersion=1.4.0 -p:MainframeEngineVersion=1.3.0build). - Given that editor, when the user creates a New Project with defaults, then its game references
MainframeEngine1.3.0. Test:NewProjectRequestTests(existing default-version test, now fed fromEngineInfo.Version≠ editor version). - Given
engine/on a commit that is not a release tag, when the editor’spublish.ymlruns, then it fails before building. Test: the guard step,build/check-engine-tag.shwith a unit check in the editor’s CI. - Given an installed bridge editor
v1.1.x, when it checks for updates andmainframe-editorhasv1.2.0, then it offersv1.2.0. Test:ReleaseFeedTests(the feed URI) and a manual check (Human checklist). - Given an installed editor older than the bridge, when the engine’s latest release has no editor asset, then it
shows
UnsupportedPlatform(unchanged behaviour). Test: existingUpdateCheckerTests. - Given a released editor with
EngineInfo.Version1.3.0, when the user downloads Forest, then the zip comes frommainframe-engine-showcasereleasev1.3.0; the Demo comes frommainframe-enginev1.3.0. Test:DemoReleaseTests(asset URLs per example). - Given the engine repo after the move, when its gates run, then they pass with no editor project in
MainframeEngine.slnx, and no project, workflow or recipe refers toMainframeEngine.EditororMainframeEngine.Video. Test:build/check-moved-paths.sh. - Given the engine’s
templateCI job, which runsMainframeEngine.Editor -- --validate-demo-zip, when the editor is gone, then the job validates the Demo zip without the editor. Test: thetemplatejob (the check moves intomfeor a small engine test; see Open questions).
Testing
Section titled “Testing”- Engine: all gates in
.agents/workflow.mdbefore the deletion PR. Render goldens forEditorRenderTestsmove with the editor; the engine’s remaining goldens must not change. - Editor: its own copy of the gates (
just build, Release-warnaserror,just test,just test-renderfor the editor render tests,just format-check) plusjust qa-editorandjust qa-projectson macOS. - Showcase:
just forest-test,just neon-test,just forest-screenshots,just neon-screenshots;just forest-benchon the baseline machine to confirm the move changed nothing. git log --followon a few moved files in each new repo, to confirm history survived.git lfs fsckin each new repo after the push.
Human checklist
Section titled “Human checklist”- Create
Mainframe-Games/mainframe-editorandMainframe-Games/mainframe-engine-showcase(public, LFS on,mainPR-only with a requiredci-successcheck, squash merges only), and NuGet/GitHub settings for the editor’s macOS signing secrets. - Forest and Neon look and sound the same after the move (screenshots side by side, a walk round each).
- An installed
v1.1.xeditor updates to the bridge, then to the firstmainframe-editorrelease, on macOS, Windows and Linux. - The editor’s Download Demo/Forest/Neon works from a released editor.
- The engine site’s Editor section and the new editor site read right.
Task list
Section titled “Task list”- Phase 0a: ADR 0289 for the split.
- Phase 0b: the
MainframeEngineVersionproperty in the engine, withEngineInfo.Versionunchanged for engine builds. - Phase 0c: the editor QA scripts that opened the Forest rewritten against the Demo (
Tests/QA/demo-open.qa,demo-post.qa), so no editor script depends on the showcases. - Phase 1: create
mainframe-engine-showcasewithfilter-repo(Forest, Neon, their scripts and docs), addengine/, repointMainframeEnginePath, itsjustfile, CI andpublish.yml,mf-new-project. Engine PR: delete the paths, the recipes, the release jobs,surface_shader_foldersentries,AGENTS.md/docs mentions. - Phase 2a (engine, before the split):
EditorInfo.Version; example downloads per repo; the bridgeReleaseFeedand theUnsupportedPlatformlink. Ship as the bridge release. (The Demo zip check,--validate-demo-zip, moves to the editor repo’s CI in Phase 2b: owner, 2026-12-06.) - Phase 2b: create
mainframe-editorwithfilter-repo, addengine/, itsjustfile, CI,publish.yml,natives.yml(mfplughost), docs site,mf-new-project. First editor releasev1.2.0or higher. - Phase 2c: engine PR deleting the editor, video library, editor tests, editor recipes and release jobs; landing page
Editor section;
AGENTS.md, architecture overview, testing and release docs.
Open questions
Section titled “Open questions”- Should the editor repo track engine
mainautomatically (a bot PR bumpingengine/after each engine merge), or only by hand? Owner, after Phase 2b. - Do the music-editor and sound-designer docs move whole, or does the adaptive-music runtime part (
adaptive-music.md, engineAudio/Music/) stay in the engine docs? Answered in Phase 2c: split by code ownership. The editor repo tookmusic-effects.md,future/music-editor.md,future/sound-designer.mdandfuture/wavetable-synth.md;adaptive-music.mdstays.
Changes from the proposal
Section titled “Changes from the proposal”- Demo zip check:
--validate-demo-zipruns in the editor repo’s CI (jobdemo-zip,just demo-zip-check: it packages the Demo fromengine/), not inmfeor an engine test (owner, 2026-12-06). The engine’stemplatejob dropped it. - NativeAOT export check: the editor test
NativeAotExportHasNoManagedAssembliesis replaced here bybuild/template-smoke.shwithNATIVE_AOT=1 HEADLESS_ONLY=1(symbols separate; no managed file, PDB or XML doc; native symbols in the symbols zip; a headless run). CI’snative-aotjob runs it on each OS. - Export library tests: the 111 that need no editor (
ExportCli,ExportLibrary,ExportPlanAndValidation,ExportRunnerand their fixture) stay in this repo, inTests/MainframeEngine.Tests/Export/, since the library does. The editor repo keepsExportEditorTestsandExportIntegrationTests, and still has copies of the others. - Editor render tests and benchmarks are projects of their own in the editor repo, with copies (not links) of the
render-test helpers (
Gates,ImageComparison,HostRunner,RenderTestEnvironment), soHostRunner.RunEditorleft this repo. - Finding the engine: the editor’s
TemplateLocatoralso looks for the checkout at<dir>/engine. - Release guard: the editor’s
publish.ymltakes the engine version frombuild/engine-version.sh(the exactvX.Y.Ztag ofengine/) and fails without one. There is nobuild/check-engine-tag.shor CI unit check for it. - Version stamps: no
VersionStampTests. A build with-p:MainframeEngineVersion=1.3.0 -p:MainframeEditorVersion=1.4.0was checked by hand (engine 1.3.0, editor 1.4.0);VersionTestschecksEditorBrandreadsEditorInfo.Version. - First editor version: the editor’s
build/next-version.shgives1.2.0while its repo has novX.Y.Ztag. - Natives:
mfplughostis built and locked in the editor repo; this repo’sNative/,natives.ymlandnatives.lockcover only the engine’s natives. Both locks were restamped (binaries unchanged) because the umbrellaNative/CMakeLists.txtchanged. - Engine release: NuGet packages and the Demo zip only; no symbols zip (it held the editor’s PDBs).
- Docs site: the landing page vendors the Tabler icons it uses in
docs-site/src/icons/(it read them from the editor’s folder).
Related
Section titled “Related”- ADR 0289: this split.
- ADR 0096: the editor’s app name, “Mainframe Editor”.
- ADR 0188: how games consume the engine.
- ADR 0218: Neon; ADR 0155: the Forest.
- ADR 0233: the shared workflow the new repos use.
- Editor updates, Release, Demo download.