Skip to content

M1A: playable visual graybox over the frozen M0 sim (do not merge — owner review) - #10

Open
HSpector1 wants to merge 3 commits into
fix/m0-human-gate-readinessfrom
m1a/graybox-ui
Open

M1A: playable visual graybox over the frozen M0 sim (do not merge — owner review)#10
HSpector1 wants to merge 3 commits into
fix/m0-human-gate-readinessfrom
m1a/graybox-ui

Conversation

@HSpector1

Copy link
Copy Markdown
Owner

M1A — Playable Visual Graybox (over the frozen M0 sim)

Owner-authorized bounded M1A: put the frozen M0 simulation behind a basic clickable interface so it feels like an actual game. Full M1 production remains unauthorized. main stays paused. Do not merge without owner review.

Base is the reviewed M0 head c360ebc (PR #9), so this PR is only the UI layer.

The one rule: the sim is frozen

src/RestaurantSim.Core is byte-identical to c360ebc and untouched. M1A is a read model over it: the UI builds a ServicePlan, calls Forecaster.Compute and ServiceSimulator.Run(..., CaptureLog:true), and renders the outputs. It computes no sim truth of its own.

Stack

Blazor WebAssembly (src/RestaurantSim.App), .NET 8, referencing RestaurantSim.Core verbatim — the authoritative C# sim runs unchanged in the browser (deterministic, single source of truth), delivered as a URL you open (and later a link for external testers). No re-implementation, no port.

The loop (your brief, all wired to the frozen core)

Choose a market → build a menu from recipe cards → adjust prices with buttons → assign crew to stations → set seating → see who the plan attracts (live per-segment pool / appeal / share-of-crowd / expected arrivals + plain-language notes + expected covers/revenue/profit) → Open Restaurantwatch a simplified service unfold (dining-room seat dots filling, queue, cooking, revenue, live service feed, replayed from the sim's sampled service log) → read a clear post-service report (profit/loss headline, causal "what happened & why", forecast-vs-actual, guest funnel, expected-vs-actual crowd, by-dish, crowd satisfaction, kitchen pressure) → revise & play again. Fixed seed, so any change in the result comes from what you changed.

Not in M1A (per your non-goals)

No city, campaign, decorations, final art, or advanced construction. No new content, save, audio, or any sim/balance change. Greybox interaction fidelity only.

Verification

  • RestaurantSim.Core + all tests unchanged: solution builds clean (0 warnings); 146 tests pass (61/61 Core scenario re-confirmed).
  • Full loop verified end-to-end in a real browser (Playwright driving system Chrome): plan → live forecast → Open → animated service → report → revise, with zero console/page errors. Deterministic result reproduced across runs (Balanced Competent in lunch → Loss −$127.00, Kitchen primary, Grill 77% peak-queue 20).

Run it

dotnet run --project src/RestaurantSim.App        # open the printed http://localhost:xxxx URL

Design lock: docs/design/M1A-GRAYBOX-CONTRACT.md. App notes: src/RestaurantSim.App/README.md.

Guardrails held

Sim frozen · main untouched · M1-full unauthorized · shipped as a PR you merge (no self-merge). Continue from any review authorizes the next bounded step, not full M1.

🤖 Generated with Claude Code

Restaurant Builder (Claude) and others added 3 commits July 31, 2026 09:17
Owner-authorized bounded M1A: a clickable Blazor WASM front-end over the
frozen M0 sim (c360ebc). Sim core stays byte-frozen; UI is a read model.
Full M1 production remains unauthorized; main stays paused.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Puts the frozen RestaurantSim.Core behind a clickable loop: choose a market,
build a menu from cards, price with buttons, assign crew, set seating, see who
the plan attracts (live forecast), Open Restaurant, watch a simplified service
unfold (seat dots / queue / revenue / feed replayed from the sim's service log),
read a clear post-service report (profit/loss, causal 'why', forecast-vs-actual,
guest funnel, expected-vs-actual crowd, by-dish, satisfaction, kitchen pressure),
then revise and play again. Deterministic (fixed seed).

- RestaurantSim.Core and all tests UNCHANGED (146 tests green; 61/61 Core scenario).
- New src/RestaurantSim.App references Core verbatim; added to Restaurant.sln.
- Verified end-to-end in a browser (Playwright + system Chrome): full loop renders
  with zero console/page errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Build-identity footer from wwwroot/build-info.json (commit / core baseline c360ebc / seed),
  stamped with the deployed commit by deploy/publish.sh.
- Report shows the authoritative ServiceResult checksum (proves the UI renders frozen-core
  truth; canonical run = 07A77B00212E4282) and labels service playback as a deterministic replay.
- Double-click Open / overlapping-playback guard (never changes sim results).
- Cloudflare Pages config: wwwroot/_redirects (SPA fallback), wwwroot/_headers (cache),
  deploy/publish.sh (reproducible Release publish), docs/deploy/M1A-CLOUDFLARE-DEPLOY.md runbook.

RestaurantSim.Core + all tests byte-identical to c360ebc; 146 tests green. UI is a read model
(only Forecaster.Compute / ServiceSimulator.Run / M0Content / M0Strategies).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant