Skip to content

REQ-VISUALIZATION-009: publish the M4 one-region economy Milestone Preview #658

Description

@drevendev

Goal

Pass permanent REQ-VISUALIZATION-009 by publishing the M4 one-region closed-economy Milestone Preview on the existing static GitHub Pages surface.

Evidence

  • Live master is 4f63bae40df02dc4c0c46a31187380f180e3de96; MACHINE ledger: record the merge commits of requirements that landed #656 has recorded the integrated REQ-ACCEPTANCE-005 merge provenance, and there are no open implementation PRs.
  • The canonical registry marks REQ-VISUALIZATION-009 READY/P1 for M4 and requires a compact deterministic one-region story with 1–3 legible visuals covering production/output, employment or wages, needs satisfaction, and key inventory/capital evolution, with units/labels, plain-English explanation, desktop/narrow render smoke, and explicit unavailable/error handling.
  • docs/index.html is currently M3-first and already has a static, dependency-light Pages presentation pattern plus deterministic m0–m3 preview artifacts and browser/DOM smoke tests.
  • executeM4ClosedEconomyTick() is integrated and REQ-ACCEPTANCE-005 proves the one-region M4 loop for 240 ticks; this unit must expose that canonical behavior without adding an economic formula or a second simulation path.
  • OPEN_QUESTIONS.md has no unresolved M4 visualization blocker.

Scope

  • Add a deterministic one-way M4 preview generator under src/diagnostics/ that runs the existing canonical one-region M4 closed-economy path and projects only presentation facts.
  • Publish a checked-in docs/m4-preview.json artifact produced from the deterministic M4 fixture.
  • Make M4 the default GitHub Pages experience and retain M3/M0–M2 as collapsed earlier-milestone material.
  • Show 1–3 compact visuals/small multiples covering production/output, employment or wages, needs satisfaction, and key inventory/capital evolution, with explicit units and a short causal/plain-English explanation.
  • Add focused generator regressions for determinism, input-world immutability and non-vacuous M4 facts, plus real DOM/Chromium render smoke at desktop and narrow widths and explicit unavailable/error handling.
  • Mark REQ-VISUALIZATION-009 IMPLEMENTED in docs/spec/implementation_status.csv only after the exact branch revision earns the full acceptance evidence; keep merge provenance blank until integration.

Non-goals

  • No M5 trade/shipments/FX, M6 mutable fiscal/Clan institutions, M7 monetary dynamics, M8 demography/migration, M9 events, or M11 Worker/SimulationOutput architecture.
  • No economic formula/default/ownership/timing change and no second market, household, production or accounting path.
  • No server, framework migration, workflow change, or docs/spec/mirror/** edit.
  • No generic dashboard expansion beyond the bounded M4 Milestone Preview.

Acceptance criteria

  1. GitHub Pages visibly defaults to an M4 one-region closed-economy preview with 1–3 legible visuals that collectively cover production/output, employment or wages, needs satisfaction, and key inventory/capital evolution.
  2. Every plotted/readout value names its unit/time basis; unlike units are not silently overlaid, and exact values needed to understand the visuals remain available as text.
  3. The page includes a short plain-English explanation of the M4 causal loop and states that the preview is one-way observation, not a control surface.
  4. Preview generation uses the existing authoritative M4 runner, is deterministic for the fixed fixture, leaves its input WorldState unchanged, consumes no additional economic RNG, and cannot feed any value back into simulation state; replay/economic behavior is unchanged when preview generation is absent.
  5. The preview has explicit empty/unavailable/malformed/error states rather than rendering undefined or silently substituting data.
  6. Real browser render smoke passes at a desktop viewport and a narrow viewport without whole-page horizontal overflow or unreadable primary labels; the existing earlier-milestone disclosure remains reachable.
  7. Exact-head TypeScript install/typecheck/full tests/build, retained .NET restore/build/tests, policy-guard, and mergeability are green. IMPLEMENT stops at the producer→SLOPSTER boundary.

Verification

Run the focused M4 preview generator and Pages render tests, then the full TypeScript and retained .NET gates. Inspect the exact diff for one-way diagnostic projection only, a Pages-first M4 presentation, no mirror/workflow/M5+ change, truthful ledger evidence, and a checked-in preview artifact that matches the deterministic generator output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:visualizationThe docs/ run viewerpriority:normalDefault planned prioritytype:featureNew simulation capability or observable behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions