Jump to content

Unreal.Shared/SPEC

From MindAttic Docs
Revision as of 08:21, 30 November 2026 by Docs Sync (talk | contribs) (md2wiki: sync from MindAttic.Docs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Unreal.Shared — Product specification

The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree. docs/RELEASE.md says which part of this the current milestone delivers.

1. Product definition

MindAtticShared, the shared Unreal Engine 5.8 plugin for every MindAttic Unreal game. It holds the code the games would otherwise copy; today that is one runtime module, MindAtticHeadless, an off-by-default --headless launch mode so a test or CI script can run the real game with no window and know when it is up. The finished product is that module at a stable, documented 1.0: no known bugs, a changelog, every consuming game wired the documented way, and a v1.0.0 tag. It is consumed from source by each game's .uproject; it is not published anywhere else.

2. Scope boundary

2.1 In the product

  • The MindAtticHeadless module: the switch rule, the engine flags, OnReady() and the ready line.
  • tools/Start-Headless.ps1, the launcher the games' run scripts call.
  • tests/HostProject and tests/Run-HostProjectTests.ps1, the contract harness.
  • The adoption guide, API reference, changelog and the list of consuming games.

2.2 Never in the product

  • Speculative shared modules no game consumes: a module joins only when a second game would otherwise copy the code, and then it goes through the owner as a new request.
  • Game-specific behaviour (skipping menus, scripted input): that stays in each game, bound to OnReady().
  • Editing the consuming games from here: fixes they need are filed in their own repos.
  • Unity parity: that is Unity.Shared, which follows the same headless contract.
  • Package-registry publishing (Fab, Marketplace): the plugin is consumed from source.

3. Users and roles

  • A MindAttic Unreal game (Unreal.Playground, SpaceGod.Unreal, Unreal.Eve and the SpaceGod copies): enables the plugin in its .uproject and optionally calls the API.
  • A test or CI script, or an agent: launches a game headless and waits for the ready line.
  • The owner: runs the harness on /test and signs off the release.

4. Requirements

Status is built (closed ticket, with evidence) or MS-n: the milestone in §7 that delivers it.

E1. Headless launch mode — UNRE-T17 — built

F1.1 MindAtticHeadless module — UNRE-T18 — built

  • Headless switch — UNRE-T2 — built. As a game, --headless (any case, as a whole argument) or MINDATTIC_HEADLESS=1 turns on a run with no window, and anything else leaves the plugin inert.
    • Given no switch, when the game starts, then the plugin adds no flags and logs nothing.
    • Given --headless, when the game starts, then -RenderOffScreen -unattended -nosplash -nosound are added early enough that no window ever opens. Evidence: e192c42.
  • Ready signal — UNRE-T19 — built. As a script, I see exactly one MINDATTIC_HEADLESS_READY <Project> line, right after OnReady() fires once the first map is loaded.
  • Test override API — UNRE-T20 — built. As a test, SetActiveOverride, IsRequested and GetSuppliedEngineFlags let me drive and inspect the rule.

F1.2 Launcher and harness — UNRE-T21 — built

  • Start-Headless launcher — UNRE-T22 — built. As a run script, I launch a .uproject or a built exe headless, get its log path and can wait for the ready line (tools/Start-Headless.ps1).
  • Host-project harness — UNRE-T23 — built. As the owner on /test, the off, flag, env and launcher runs check the contract against real launches (tests/Run-HostProjectTests.ps1).

E2. Headless plugin 1.0 — UNRE-T6 — MS-17

F2.1 Plugin correctness — UNRE-T8 — MS-17

  • Exhaustive bughunt — UNRE-T5 — MS-17. Every confirmed bug in the plugin, launcher and harness is found and fixed.

F2.2 Contract documented — UNRE-T9 — MS-17

  • Changelog and consumers — UNRE-T12 — MS-17. CHANGELOG.md has the 1.0 entry and the docs list the games that enable the plugin today.

E3. Adoption by the games — UNRE-T7 — MS-17

F3.1 Consumer check — UNRE-T10 — MS-17

  • Audit consuming projects — UNRE-T13 — MS-17. Each consuming .uproject points at the plugin directory as documented and its headless run script calls tools/Start-Headless.ps1; gaps are reported to the owner and filed in the game's repo.

F3.2 Release tag (polish and release) — UNRE-T11 — MS-17

  • Tag v1.0.0 — UNRE-T14 — MS-17. v1.0.0 is tagged on main with a GitHub release whose notes are the changelog entry.

5. Non-functional requirements

  • UE 5.8, Win64; the module depends on Core only and loads at EarliestPossible.
  • Off by default: without the switch the plugin changes nothing.
  • No credentials, no network access, no file writes outside the game's own log.

6. Interfaces and dependencies

  • Consumers: Unreal.Playground, SpaceGod.Unreal, Unreal.Eve, Unreal.SpaceGod (Cpp and CSharp), SpaceGod.Unreal.Cpp and SpaceGod.Unreal.CSharp; MindPuck.Unreal has not adopted it.
  • Contract: FMindAtticHeadless in MindAtticHeadless.h, the MINDATTIC_HEADLESS environment variable, the MINDATTIC_HEADLESS_READY log line, and Start-Headless.ps1's parameters and return object.
  • Sibling: Unity.Shared implements the same headless contract for Unity games.

7. Release sequence

  1. MS-17 — Unreal.Shared 1.0 headless plugin (active, last): E2 and E3, ending with F3.2 the v1.0.0 release. When it is reached, the product is finished; a new shared module would be a new request for the owner.

8. Change log

Date Change to scope Ticket
2026-11-30 Specification written from README, BIBLE, the code and the ticket history; built epic E1 recorded; MS-17 is the final milestone MAT-T373
Part of Unreal.Shared.
From Unreal.Shared/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.