@genex-ai/cli-demo 0.48.0-dev.76 → 0.48.0-dev.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "0.48.0-dev.76",
3
+ "version": "0.48.0-dev.79",
4
4
  "description": "Set up your ~/.claude workspace, authorize, create a game project, generate AI assets, and publish (genex CLI).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-ai-hud
3
- description: Generate a production HUD sprite set — matched frames, masks, and icons in one coherent art style — via the mockup-then-deconstruct pipeline (`npx genex image` + `npx genex ui`), then wire it as a DOM overlay with channel-accurate masked fills. Use when the game wants a cohesive art-directed HUD (fantasy brass, sci-fi glass, racing carbon) rather than a clean minimal CSS HUD.
3
+ description: Generate a production HUD sprite set — matched frames, masks, and icons in one coherent art style — via the mockup-then-deconstruct pipeline (`npx genex image` + `npx genex ui`), then wire it as a DOM overlay with channel-accurate masked fills. Use for EVERY game, kicked off at `genex-threejs-game-ui`'s "Plan the UI first" gate: the sprite HUD is the production HUD of a Genex game; hand-written CSS is only the placeholder while the sprites render.
4
4
  ---
5
5
 
6
6
  # Genex AI · HUD
@@ -11,16 +11,46 @@ with masked fills that track the art's real channels. The result is an
11
11
  art-directed HUD (etched steel ammo strip, parchment HP bar, chrome minimap
12
12
  ring) that no hand-written CSS can fake.
13
13
 
14
- ## When to use this vs. a hand-coded CSS HUD
15
-
16
- - **Use `$genex-threejs-game-ui` alone** (clean CSS bars, text, plates) for
17
- most games — it's faster, crisper, and always readable. That skill also owns
18
- the overlay architecture this one plugs into.
19
- - **Use this skill** when the game's identity wants a *materially* art-directed
20
- HUD gothic filigree frames, rusted post-apocalyptic panels, carbon-fiber
21
- racing telemetry, hand-painted storybook plates where the frames themselves
22
- are illustrations. You'll spend ~10 image generations and real wiring effort;
23
- make sure the game deserves it.
14
+ ## This is the default HUD hand-coded CSS is the placeholder
15
+
16
+ - **Every game runs this pipeline.** Kick the Stage-1 mockup off at
17
+ `$genex-threejs-game-ui`'s "Plan the UI first" gate (`--no-wait`) and build
18
+ against that skill's plain-CSS placeholder while it renders — that skill
19
+ also owns the overlay architecture this one plugs into. The game is not
20
+ done until the sprites have landed and been wired in.
21
+ - The art direction comes from the shared style brief — gothic filigree
22
+ frames, rusted post-apocalyptic panels, carbon-fiber racing telemetry,
23
+ hand-painted storybook plates, or a restrained modern register for a clean
24
+ concept; restrained still means built from the generated set. ~10 image
25
+ generations is the normal price of a production HUD, not a premium to
26
+ justify.
27
+ - **The only exit:** the user explicitly declines the generated HUD — then
28
+ the CSS placeholder, finished to `$genex-threejs-game-ui`'s Tier-1 floor,
29
+ ships as the HUD.
30
+
31
+ ## Three layers — glass is CSS, chrome is sprites, data is DOM
32
+
33
+ - **Glass (DOM).** The translucent plate behind every widget is CSS —
34
+ `background: rgba(<brief's darkest hue>, 0.35–0.6)` plus
35
+ `backdrop-filter: blur(6–12px)` (and its `-webkit-` twin). Semi-transparency
36
+ physically cannot survive sprite extraction: a composited panel's pixels are
37
+ a blend of panel and background, and no cutout can un-blend them — so glass
38
+ is NEVER baked into a sprite. This is how AAA smoked-glass HUDs are built:
39
+ live glass panels, crisp art on top.
40
+ - **Chrome (sprites — what THIS pipeline generates).** Opaque frames, corner
41
+ brackets, ornaments, emblems, icons, medallions — hard-alpha art laid over
42
+ the glass. The Stage-2 sheet contains ONLY chrome; never a panel with its
43
+ fill or glass surface baked in.
44
+ - **Data (DOM).** Numbers, labels, and bar fills are DOM text and masked
45
+ fills (the fillBox pattern below) — always over the glass, never
46
+ rasterized into art.
47
+ - **Micro-elements are designed, not defaulted.** The sheet excludes
48
+ primitive-only shapes (plain crosshair ticks, dots, pips) because CSS
49
+ renders them crisper — but CSS never means default: the reticle and every
50
+ cue, toast, and counter still get the brief's treatment (stroke weight,
51
+ glow, state changes — hit, low-ammo, empowered). An ornamented,
52
+ identity-bearing reticle (engraved ring, sculpted brackets) is chrome —
53
+ put it on the sheet like any other asset.
24
54
 
25
55
  ## Framing rules — internalize before prompting
26
56
 
@@ -30,6 +60,10 @@ The HUD overlays a **live 3D scene**. The pixels between widgets show the game.
30
60
  fabric, wood board) as part of the HUD. Material aesthetics belong on the
31
61
  widget FRAMES — the HP bar frame is parchment, the minimap ring is leather —
32
62
  never on a screen-filling sprite.
63
+ - **No glass in sprites.** Translucent panel plates in the mockup are welcome
64
+ as the LOOK, but the Stage-2 asset list requests only their opaque chrome
65
+ (frame, brackets, ornament); the plate itself is rebuilt at runtime as CSS
66
+ glass matching the mockup's tint (see the three layers above).
33
67
  - **4–7 widgets.** Fewer doesn't read as a HUD; more clutters the screen and
34
68
  burns generations.
35
69
  - **Every widget needs internal contrast** — a panel fill, outline stroke, or
@@ -86,7 +120,10 @@ and [references/stage2-prompt-template.md](references/stage2-prompt-template.md)
86
120
  **Order of work: kick Stage 1 off as your FIRST action after the UI plan
87
121
  gate**, then write the widget layout and wiring code (placement, masked-fill
88
122
  scaffolding, plain-CSS placeholder bars) while it renders — the CSS HUD keeps
89
- the game playable until the sprites land. Generate 2 mockup candidates in one
123
+ the game playable until the sprites land. When the gate produced a concept
124
+ frame, anchor Stage 1 to it — `--edit <concept-url>` holds the game's
125
+ register far better than a text-only prompt; single-sprite regenerations
126
+ anchor the same way. Generate 2 mockup candidates in one
90
127
  call (`--candidates 2`) and pick the better one: a re-roll costs the whole
91
128
  serial chain, a second candidate costs nothing extra in wall-clock.
92
129
 
@@ -15,6 +15,10 @@ Fill `[ASSET_LIST]`, then pass the whole text as the prompt to
15
15
  identity labels);
16
16
  - **states what to REMOVE** (`runtime_static` labels and `runtime_dynamic`
17
17
  values, fills, items);
18
+ - **requests chrome only** — never a panel's translucent plate or glass
19
+ surface: plates are rebuilt at runtime as CSS glass (rgba +
20
+ backdrop-filter), so ask for the panel's frame/brackets/ornament, not the
21
+ panel surface itself;
18
22
  - **requests the annotated duplicate** for every bar/meter frame (the
19
23
  template's progress block below covers the mechanics — your item just says
20
24
  "output the clean frame + annotated duplicate pair").
@@ -61,7 +65,7 @@ DO NOT include in the output sheet:
61
65
  - Simple dot indicators, status pips, blip markers
62
66
  - Fills inside bars, items inside slots, map terrain inside minimap rings (these are added at runtime by CSS / game code)
63
67
 
64
- Those excluded elements will be recreated by runtime code (CSS shapes and DOM text) — much crisper than a downsampled PNG.
68
+ Those excluded elements will be recreated by runtime code (CSS shapes and DOM text) — much crisper than a downsampled PNG. Recreated does NOT mean default-styled: reticles, pips, and cues still follow the style brief (stroke weight, glow, state colors). An ornamented, identity-bearing reticle — an engraved ring, sculpted brackets — is NOT a simple primitive; include it in the asset list like any other chrome.
65
69
 
66
70
  Pure white #ffffff background everywhere except where the actual UI assets sit.
67
71
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-ai-menu
3
- description: Generate a cinematic game menu — one looping atmospheric video background plus animated DOM buttons — with `npx genex image` + `npx genex video --frame`. Use for main menus, title/start screens, pause, victory/defeat, lobby, and credits screens when the game deserves a filmic backdrop ("storm light over a lighthouse coast", "sun-drenched poppy meadow") rather than a plain CSS panel.
3
+ description: Generate a cinematic game menu — one looping atmospheric video background plus animated DOM buttons — with `npx genex image` + `npx genex video --frame`. Use for the main menu of every game (the default tier per `genex-threejs-game-ui`'s plan gate, enqueued there with `--no-wait`; declining it needs a stated reason) and for title, victory/defeat, lobby, and credits screens that should feel like the game's opening shot; plain CSS panels are only for utilitarian overlays like pause and settings.
4
4
  ---
5
5
 
6
6
  # Genex AI · Menu
@@ -12,14 +12,16 @@ real game events.
12
12
 
13
13
  ## When to use this vs. a plain CSS menu
14
14
 
15
- - **Use this skill** when the menu should feel like the game's opening shot —
16
- a title screen with weather and light, a defeat screen over smoldering ruins,
17
- a lobby with the arena breathing in the background.
15
+ - **Use this skill** for the main menu of every game — it should feel like the
16
+ game's opening shot: a title screen with weather and light, a defeat screen
17
+ over smoldering ruins, a lobby with the arena breathing in the background.
18
+ Enqueue it at `$genex-threejs-game-ui`'s plan gate with `--no-wait`.
18
19
  - **Use plain CSS** (`$genex-threejs-game-ui` alone) for utilitarian screens —
19
- a quick pause overlay, a settings list, a loading bar. A dark translucent
20
- panel is cheaper and often more readable. You can also get the best of both:
21
- reuse this skill's menu video under a darker overlay for pause/victory
22
- variants (see Tips).
20
+ a quick pause overlay or a settings list. A dark translucent panel is often
21
+ more readable there. (The loader is NOT utilitarian: it keeps its branded
22
+ key-art background per the game-ui spec "plain CSS" never means a bare
23
+ loading bar.) You can also get the best of both: reuse this skill's menu
24
+ video under a darker overlay for pause/victory variants (see Tips).
23
25
 
24
26
  ## Style brief first
25
27
 
@@ -46,6 +48,14 @@ might suggest. Two hard rules for the frame prompt:
46
48
  perches", "fog drifts left then back right", "candle flames flicker".
47
49
  Bad: "camera dollies forward into the gate" (one-way motion fights the
48
50
  identical endpoints and produces a visible hitch).
51
+ **The seam is YOUR job, not the model's:** in practice the clip lands
52
+ *near* frame 0, not exactly on it, and a bare `video.loop = true` shows a
53
+ visible hitch every cycle. Always wire the video with the DOM crossfade
54
+ below, and watch one full cycle before calling the menu done. (Do not
55
+ reach for `--loop` here: it routes to a different model with a first-class
56
+ loop param but NO frame conditioning — the video won't match your key art —
57
+ and server-side `--frame` overrides `--loop` anyway, so passing both does
58
+ nothing.)
49
59
  - **Two-frame** (`--first-frame` + `--last-frame`) only when the menu
50
60
  genuinely needs a state change (rain starts and persists, a figure walks in
51
61
  and stays). The loop will have a visible seam where the last frame snaps
@@ -69,6 +79,44 @@ npx genex wait <gen-id>
69
79
  # -> https://assets.genex.technology/generations/<gen-id>/video-mp4
70
80
  ```
71
81
 
82
+ ## Seamless in the DOM — the loop crossfade (mandatory wiring)
83
+
84
+ Never wire the clip as a bare `<video loop>` — the residual seam shows every
85
+ cycle. Two stacked `<video>` elements with the same src crossfade at the
86
+ cycle end; any seam disappears deterministically, no regeneration lottery:
87
+
88
+ ```ts
89
+ /** Deterministic seamless loop: two stacked <video>s crossfade at cycle end. */
90
+ export function seamlessLoop(holder: HTMLElement, url: string, fade = 0.6): void {
91
+ const mk = (): HTMLVideoElement => {
92
+ const v = document.createElement("video");
93
+ v.src = url; v.muted = true; v.playsInline = true; v.preload = "auto";
94
+ holder.appendChild(v);
95
+ return v;
96
+ };
97
+ let front = mk(), back = mk();
98
+ front.style.opacity = "1";
99
+ void front.play();
100
+ const tick = (): void => {
101
+ if (front.duration > 0 && front.currentTime >= front.duration - fade && back.paused) {
102
+ back.currentTime = 0;
103
+ void back.play();
104
+ front.style.transition = back.style.transition = `opacity ${fade}s linear`;
105
+ back.style.opacity = "1";
106
+ front.style.opacity = "0";
107
+ const old = front; front = back; back = old;
108
+ window.setTimeout(() => back.pause(), fade * 1000 + 50);
109
+ }
110
+ requestAnimationFrame(tick);
111
+ };
112
+ requestAnimationFrame(tick);
113
+ }
114
+ ```
115
+
116
+ Pause both videos when the menu phase hides (they're decode work), and
117
+ resume the front one when it returns. Watch ONE full cycle in the browser
118
+ before calling the menu done — that's the seam check.
119
+
72
120
  **Work async — the menu must never block the game.** Generate the frame right
73
121
  after the UI plan gate, enqueue the video with `--no-wait`, ship the CSS menu
74
122
  (buttons + title over the frame IMAGE as a static backdrop), and swap the
@@ -87,9 +135,8 @@ copy-pasteable example:
87
135
  ```html
88
136
  <div id="ui">
89
137
  <div id="screen-menu" class="screen" data-phase="menu">
90
- <video class="menu-bg"
91
- src="https://assets.genex.technology/generations/<id>/video-mp4"
92
- autoplay muted loop playsinline></video>
138
+ <!-- seamlessLoop() (above) injects two crossfading <video>s here -->
139
+ <div class="menu-bg" id="menu-bg"></div>
93
140
  <div class="menu-title stagger" style="--i: 0">EMBERFALL</div>
94
141
  <button class="menu-btn stagger" id="menu-play" style="--i: 1; left: 38%; top: 52%; width: 24%; height: 8%;">PLAY</button>
95
142
  <button class="menu-btn stagger" id="menu-options" style="--i: 2; left: 38%; top: 63%; width: 24%; height: 8%;">OPTIONS</button>
@@ -102,7 +149,9 @@ copy-pasteable example:
102
149
 
103
150
  ```css
104
151
  #screen-menu { position: absolute; inset: 0; overflow: hidden; background: #000; }
105
- .menu-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
152
+ .menu-bg { position: absolute; inset: 0; }
153
+ .menu-bg video { position: absolute; inset: 0; width: 100%; height: 100%;
154
+ object-fit: cover; opacity: 0; }
106
155
  .menu-title {
107
156
  position: absolute; left: 0; right: 0; top: 14%; text-align: center;
108
157
  font-family: "Cinzel", serif; font-size: 9vh; color: #f4e3b8;
@@ -23,19 +23,30 @@ in another.
23
23
  | Screen | When it exists | Default tier |
24
24
  | --- | --- | --- |
25
25
  | Loader | always | 1 — branded (see loader spec below) |
26
- | Main menu | always for a game headed to publish | 2 — cinematic (`$genex-ai-menu`); 1 for a quick prototype |
27
- | Pause | always | 1 — menu backdrop under a dark overlay |
26
+ | Main menu | always — the decision defaults to YES for every game; a "no" needs a one-line game-type reason (e.g. an instant-restart arcade toy), and "it's only a draft" is never a reason | 2 — cinematic (`$genex-ai-menu`) |
27
+ | Pause | always — opens on the Escape key | 1 — menu backdrop under a dark overlay |
28
28
  | Fail / retry | always | 1 — a *graded* variant of the menu screen |
29
29
  | Win / next | always | 1 — graded variant, warm |
30
30
  | Settings | when there is anything to set | 1 |
31
31
  | Lobby / waiting | multiplayer only | 1 over the menu backdrop |
32
- | HUD | always | 1 CSS; 2 (`$genex-ai-hud`) when the identity earns it |
32
+ | HUD | always | 2 generated sprite HUD (`$genex-ai-hud`), enqueued at this gate for EVERY game; plain CSS is the placeholder until the sprites land, never the final HUD |
33
33
 
34
34
  The lobby row is bound by `$genex-threejs-multiplayer`'s MANDATORY rule: the
35
35
  waiting overlay's visibility is re-read from `mm.matchmaking.status` every
36
36
  frame and closes the instant it flips to `playing` — verified in two browser
37
37
  windows. Plan the lobby as a styled screen (roster + count over the menu
38
- backdrop), not an afterthought `<div>`.
38
+ backdrop), not an afterthought `<div>`. When the menu decision is a reasoned
39
+ "no", every "menu backdrop" row above (pause, fail, win, lobby) grades over
40
+ the loader's key art instead.
41
+
42
+ The table lists screens; **elements are inventoried separately**. Walk the
43
+ whole loop in your head — loader → menu → spawn → action → pickup → damage →
44
+ death → retry → win — and write down EVERY on-screen element the player will
45
+ ever see: the reticle and each of its states, aim/interact cues, toasts,
46
+ damage numbers, kill feeds, timers, countdowns, pickup popups… Each element
47
+ gets a treatment from the brief. **Nothing ships looking like default
48
+ browser CSS** — an element styled like a bare `<div>` or a system button is
49
+ a bug wherever it appears, listed or not.
39
50
 
40
51
  **2. One shared style brief — for the WHOLE game, not just the UI.** Write it
41
52
  once — 4–5 named hues, materials, one display + one body font, mood — and
@@ -44,12 +55,25 @@ store it as a comment block near the UI code. `$genex-ai-menu`,
44
55
  verbatim — and so does the scene: the visual-direction plan (the router's
45
56
  next gate) derives its lighting mood, fog, grading, and post-stack choices
46
57
  from the same block. Two style briefs in one game is a bug; a scene graded in
47
- one world under a UI styled in another is the same bug.
58
+ one world under a UI styled in another is the same bug. The brief's font pair
59
+ is LOADED for real — a Google Fonts `<link>` (or `@font-face`) in
60
+ `index.html`, per `$genex-ai-menu`'s genre font table; a display font that
61
+ ships as a system-stack fallback (`Arial Black`, `Impact`) is the same bug in
62
+ type.
48
63
 
49
- **3. Name your references.** Pick the closest capsule in
64
+ **3. Name your references — AAA, by name.** Pick the closest capsule in
50
65
  [references/style-capsules.md](references/style-capsules.md), name 2–3 top
51
- games of the genre, and state in one line which structural conventions you're
52
- borrowing. Conventions only never logos, exact layouts, or trade dress.
66
+ AAA games of the genre, and state in one line which structural conventions
67
+ you're borrowing. The bar is what those games ship, not "good enough for a
68
+ demo". Conventions only — never logos, exact layouts, or trade dress. The
69
+ same 2–3 names carry into the router's visual-direction gate for the scene.
70
+ Then turn references + brief into ONE **concept frame** — a single generated
71
+ image of what THIS game should look like mid-play (scene, mood, lighting;
72
+ a UI impression is welcome but optional):
73
+ `npx genex image "<one-sentence game look from the brief>" --aspect 16:9 --quality high --no-wait`,
74
+ enqueued FIRST of all art. Its URL goes into the style-brief comment as the
75
+ game's north star: every later 2D generation that accepts `--edit` anchors
76
+ to it, and the scene's lighting/grading is judged against it.
53
77
 
54
78
  **4. Ask only when genuinely ambiguous.** If the concept pins the mood (a
55
79
  "gothic horror dungeon crawler" pins it), decide and state the plan in one
@@ -62,16 +86,41 @@ it derives from the game type.
62
86
  are examples, not defaults. Do not default to neon/cyberpunk/synthwave — or
63
87
  any other single register — unless the concept calls for it.
64
88
 
89
+ **6. Close the gate out loud — a fixed-format plan message.** Post this
90
+ message in chat, translated to the user's language, filling every line —
91
+ this exact structure, not a paraphrase (the scaffold's keep-it-short talk
92
+ rule explicitly does not apply to this one message):
93
+
94
+ ```
95
+ UI plan
96
+ • Screens: <list with tiers — loader / menu / pause (Esc) / win/lose / …>
97
+ • Style: <4–5 named hues> · fonts <display> / <body>
98
+ • References: <2–3 AAA games — one line on what's borrowed>
99
+ • Concept frame: <generation id>
100
+ • Queued: HUD chrome <id> · menu video <id or "no menu: reason">
101
+ ```
102
+
103
+ A message missing any line means the gate did not run — go back and run it.
104
+
65
105
  ## The tier ladder
66
106
 
67
107
  - **Tier 1 — instant baseline, every game.** Everything in this skill: planned
68
108
  screens, shared brief, branded loader, animated CSS menu with keyboard
69
109
  navigation, phase transitions, UI sounds, vignette. Zero generations — the
70
110
  game is playable immediately.
71
- - **Tier 2 — generated upgrades, async.** The cinematic menu video
72
- (`$genex-ai-menu`) and the sprite HUD (`$genex-ai-hud`). Enqueue with
73
- `--no-wait`, keep building, pick results up with `npx genex wait <id>`, swap
74
- them in as they land. **Tier 2 must never block a playable v0.**
111
+ - **Tier 2 — the production UI, generated, async mandatory, not an upsell.**
112
+ The sprite HUD (`$genex-ai-hud`) for EVERY game, and the cinematic menu
113
+ video (`$genex-ai-menu`) whenever the menu decision is yes (the default for
114
+ every game). Enqueue BOTH at the plan gate with `--no-wait`,
115
+ keep building, pick results up with `npx genex wait <id>`, swap them in as
116
+ they land. **Tier 2 must never block a playable v0 — but the game is NOT
117
+ DONE until its Tier-2 assets have landed and been wired in** (the only
118
+ exit: the user explicitly declines them — on their own initiative; never
119
+ solicit the decline by presenting these as optional, slow, or costly).
120
+ Run `npx genex wait` on every enqueued ID before any publish and before
121
+ the final handoff of a session — never park landed assets for "later".
122
+ Shipping the placeholder CSS HUD as the final HUD is a failure, not a
123
+ tier choice.
75
124
  - **Tier 3 — offer, don't build.** Video layers over the HUD, 9-slice panel
76
125
  sprites, a generated logotype, animated menu sprites. Offer in one line
77
126
  after the player has seen Tier 1+2 working; build on request.
@@ -111,9 +160,11 @@ edits scattered through the code:
111
160
  1. **Loading** — the branded loader below; players must never stare at a black
112
161
  screen or a bare percentage.
113
162
  2. **Playing HUD** — the minimal always-on layer (see hierarchy below).
114
- 3. **Pause** — freeze the loop, dim the scene, show resume/restart. (With the
115
- bundled physics pack, freezing is built in: `physics.paused = true` plus
116
- `anims.setPaused(true)` don't hand-roll a second clock.)
163
+ 3. **Pause** — freeze the loop, dim the scene, show resume/restart. Bound to
164
+ the **Escape key in every game** Escape pauses, Escape again (or Resume)
165
+ unpauses; on touch, a small pause button. (With the bundled physics pack,
166
+ freezing is built in: `physics.paused = true` plus `anims.setPaused(true)`
167
+ — don't hand-roll a second clock.)
117
168
  4. **Fail / retry** — what happened, the score, and a ONE-KEY instant restart
118
169
  (show which key). Restart must not reload the page.
119
170
  5. **Win / next** — celebrate, then offer the next thing to do.
@@ -133,7 +184,10 @@ black reads as a broken page. The branded version costs nothing:
133
184
  that image exists BEFORE the video does; show it dimmed
134
185
  (`filter: brightness(0.6)`) behind the progress. Menu-less game: one
135
186
  `npx genex image` key-art call in the house style, enqueued first thing.
136
- Until the image arrives, the flat darkest hue from the style brief.
187
+ Until the image arrives, the flat darkest hue from the style brief — a
188
+ placeholder with the same status as the placeholder CSS HUD: a loader
189
+ still without its key-art/menu-frame background at publish or session
190
+ handoff is the same failure.
137
191
  - **Progress:** a thin bar styled from the brief (its accent hue), driven by
138
192
  real asset counts — never an indeterminate spinner alone.
139
193
  - **Reveal:** when ready, fade the loader out (400–600 ms) into the menu or
@@ -224,15 +278,23 @@ timer in the game WILL drift apart). Buttons and menu keys emit the same
224
278
  intents the gameplay input path uses — a "Restart" button and the R key must
225
279
  run identical code.
226
280
 
227
- When the game deserves generated art in this layer: a cinematic menu (looping
228
- video backdrop behind the buttons) is `$genex-ai-menu`; an art-directed HUD
229
- built from a generated sprite set is `$genex-ai-hud`. Both slot into this
230
- exact `#ui` + `data-phase` architecture and consume the shared style brief.
281
+ The generated layer is the default, not a reward: every game's HUD is built
282
+ from a generated sprite set (`$genex-ai-hud`), and a cinematic menu (looping
283
+ video backdrop behind the buttons, `$genex-ai-menu`) backs every game whose
284
+ menu decision is yes. Both slot into this exact `#ui` + `data-phase`
285
+ architecture and consume the shared style brief.
231
286
 
232
287
  ## Failure modes to catch before the player does
233
288
 
234
289
  - No UI plan: screens invented one at a time, menu and HUD styled in two
235
290
  different worlds.
291
+ - HUD sprites never enqueued at the gate — the placeholder CSS shipped as the
292
+ final HUD.
293
+ - No pause screen, or a pause that isn't bound to Escape.
294
+ - A style brief whose fonts were never actually loaded (a system-stack display
295
+ font at runtime).
296
+ - A micro-element (reticle, cue, toast, damage number) left as default CSS
297
+ while the panels got the art treatment.
236
298
  - A generic stat dashboard (rows of labels + numbers) instead of a designed
237
299
  HUD — pick the 2–3 numbers that matter and style them by hierarchy.
238
300
  - Hard-cut phase swaps, a menu whose elements just appear, numbers that
@@ -58,17 +58,24 @@ leaderboards. Multiplayer auth (`getColyseusAuth`) comes from it too.
58
58
  (screen inventory, one shared style brief, tier decisions) right after the game
59
59
  concept is locked, before any UI code. Its Tier-2 generations (cinematic menu,
60
60
  sprite HUD) are enqueued async (`--no-wait` + `npx genex wait <id>`) so they land
61
- while the game is being built — they never block a playable v0.
61
+ while the game is being built — they never block a playable v0, and the game is
62
+ not done, published, or handed off until they've been picked up (`npx genex wait`)
63
+ and wired in.
62
64
 
63
65
  **The look is planned up front too:** right after the UI gate, lock the visual
64
66
  direction in the same plan block — the camera rig + pointer bucket
65
67
  (`$genex-threejs-camera-direction`), the renderer baseline (tone mapping,
66
68
  exposure, output color space — set deliberately at boot; stock three.js
67
69
  defaults are not a look, `$genex-threejs-exposure-color-grading`), the post
68
- stack this game ships and deliberately skips (bloom/AO/grade — justified by
69
- the shared style brief; `$genex-threejs-image-pipeline` owns ordering when 2+
70
- compose), and the lighting/atmosphere mood from that same brief. Planning is
71
- not building effects still land last in the execution order.
70
+ stack this game ships (bloom/AO/grade — at least ONE built render-pass effect
71
+ for EVERY game, justified by the shared style brief; the UI vignette div or a
72
+ CSS filter on the canvas does not count, and a plan that "deliberately skips
73
+ everything" is the stock default, not a look; `$genex-threejs-image-pipeline`
74
+ owns ordering when 2+ compose), one named **ambient-motion loop** that keeps
75
+ the scene alive at rest (emissive pulse, shimmer, drifting dust — shader
76
+ work, zero generations), and the lighting/atmosphere mood from that
77
+ same brief. Planning is not building — effects still land last in the
78
+ execution order.
72
79
 
73
80
  **Multiplayer is mandatory routing:** if the game has 2+ players sharing a world, loading
74
81
  `$genex-threejs-multiplayer` is **required** before any networking code — the SDK auto-smooths
@@ -141,7 +148,15 @@ concept-driven — a richer first build beats a grey-box one.
141
148
  - Use `$genex-threejs-visual-validation` before declaring graphics/procedural-system
142
149
  work done. **Game fast path:** for game tasks that loaded no procedural/visual-system
143
150
  skill, done = a screenshot plus an interaction smoke check (load the page, press each
144
- control, see the visible response) — don't run the full diagnostic gate.
151
+ control, see the visible response) — don't run the full diagnostic gate — PLUS the
152
+ floors from the routing-map's acceptance gate: the generated sprite HUD wired in
153
+ (not the CSS placeholder), pause on Escape, the branded loader with its key-art
154
+ background, the brief's fonts actually loaded, the renderer baseline + at least one
155
+ built render-pass effect, every placed 2D/media piece screenshot-verified in
156
+ situ, no UI element left as default browser CSS, and no placeholder primitive
157
+ left where a generated asset was planned. These floors gate `npx genex publish`
158
+ and the final handoff of a session the
159
+ same way — they do not wait for the word "done" to be said.
145
160
  - Entering an **existing or remixed project**: read before writing — learn the
146
161
  current renderer choice, physics setup, and file conventions first, then
147
162
  extend them. Don't rebuild working systems or switch renderers mid-project.
@@ -21,9 +21,17 @@ Three.js release or branch, and do not blindly copy demo architecture.
21
21
  mandatory for every game (`initEmbed(...)` + the `waitForPlayer()` gate) —
22
22
  saves, leaderboards, and multiplayer auth all come from it.
23
23
  3. Run `$genex-threejs-game-ui`'s "Plan the UI first" gate: screen inventory,
24
- one shared style brief, a tier per screen. Enqueue any Tier-2 UI
25
- generations now with `--no-wait` (pick them up later with
26
- `npx genex wait <id>`) — they render server-side while you build the game.
24
+ one shared style brief, a tier per screen stated visibly in chat, never
25
+ decided silently. Enqueue the Tier-2 UI generations now with `--no-wait`
26
+ (pick them up later with `npx genex wait <id>`) — they render server-side
27
+ while you build the game. FIRST of all art: the gate's **concept frame** —
28
+ the single image of the finished game's look that every later `--edit`-able
29
+ generation anchors to. Then the `$genex-ai-hud` Stage-1 mockup, enqueued
30
+ here for EVERY game; and the `$genex-ai-menu` video whenever the menu
31
+ decision is yes (the default for every game — "it's only a draft" is not a
32
+ reason to decide no). Skipping this enqueue is
33
+ the #1 way a finished game ships an ugly HUD — by step 12 there is nothing
34
+ to swap in.
27
35
  4. Lock the visual direction — the same plan-first logic as the UI gate, in
28
36
  the same plan block, before any rendering code:
29
37
  - **camera**: the rig type and the pointer bucket
@@ -32,9 +40,23 @@ Three.js release or branch, and do not blindly copy demo architecture.
32
40
  deliberately at boot (`$genex-threejs-exposure-color-grading` owns the
33
41
  staging — stock three.js defaults are not a look);
34
42
  - **the post stack**: which image effects THIS game ships (bloom? AO?
35
- grade?) and which it deliberately doesn't — each named and justified by
36
- the shared style brief; when 2+ effects compose,
37
- `$genex-threejs-image-pipeline` owns the pass ordering;
43
+ grade?) — each named and justified by the shared style brief. The floor
44
+ for EVERY game is the deliberate renderer baseline PLUS at least one
45
+ scene-serving render-pass effect (bloom, AO, or a LUT/shader grade — the
46
+ UI vignette div or a CSS filter on the canvas does not count); "no post
47
+ at all" is the stock default, not a plan, and "it's only a draft" is not
48
+ a lower floor. When 2+ effects compose, `$genex-threejs-image-pipeline`
49
+ owns the pass ordering;
50
+ - **references**: name 2–3 AAA games whose look this game borrows
51
+ (conventions, lighting mood, palette, post — never trade dress); the
52
+ same 2–3 the UI gate named, extended from the interface to the scene,
53
+ and embodied in the gate's concept frame — the image the scene is
54
+ judged against;
55
+ - **ambient motion**: name ONE subtle environmental motion loop that keeps
56
+ the scene alive at rest — an emissive pulse along edges, heat shimmer,
57
+ drifting dust, a slowly flowing texture. Shader/procedural, zero
58
+ generations, built with the scene — a world that is perfectly still
59
+ reads as a screenshot, not a place;
38
60
  - **lighting/atmosphere mood** from the SAME shared style brief the UI gate
39
61
  wrote — one art direction across scene and UI.
40
62
  Planning is not building: effects still land LAST (steps 10–11); this step
@@ -48,6 +70,19 @@ Three.js release or branch, and do not blindly copy demo architecture.
48
70
  architecture, planets, water, precipitation, clouds, or VFX. Show the
49
71
  planned loader from the very first asset load — a player must never stare
50
72
  at a black screen; the rest of the UI states come at step 12.
73
+ Then make the world-dressing DECISION — a judgment call, not a quota:
74
+ does THIS world's fiction support 2D art (posters, signs, graffiti,
75
+ decals, banners, in-world screens — `$genex-ai-image`; `$genex-ai-video`
76
+ for anything that should move)? Say the decision in one line in the
77
+ visual-direction block. Name only the pieces that genuinely belong — a
78
+ garage wants grease posters and warning decals; a pristine void wants
79
+ none — and anchor their prompts to the concept frame. **Zero is a valid
80
+ answer with a stated reason; art placed just to satisfy this step is the
81
+ failure mode, not skipping it.** Enqueue what you named with `--no-wait`
82
+ alongside the other assets. Every placed piece is
83
+ screenshot-checked in situ — right scale, not stretched, unlit material
84
+ where it must glow, readable at gameplay distance
85
+ (`$genex-threejs-visual-validation` owns the capture discipline).
51
86
  7. Add camera direction when framing, controls, transitions, or scale perception
52
87
  affect play — or the game aims with the mouse (shooter/FPS/turret): the
53
88
  step-4 bucket decision executes here.
@@ -56,12 +91,22 @@ Three.js release or branch, and do not blindly copy demo architecture.
56
91
  9. Add shared fields before writing multiple independent noise layers.
57
92
  10. Add lighting, atmosphere, and shadows only after the no-post baseline reads.
58
93
  11. Add image-pipeline, bloom, exposure, grading, or AO last — building out the
59
- step-4 post plan, not inventing one now.
94
+ step-4 post plan, not inventing one now. This is a completion gate: the
95
+ named post stack must be BUILT before the game is called done, published,
96
+ or handed off — a game rendering on stock three.js defaults is not done,
97
+ and the gate does not wait for the word "done" to be said.
60
98
  12. Once the loop is playable, build the planned interface states via
61
- `$genex-threejs-game-ui` (HUD, pause, fail/retry, win, and the full loading
62
- state grown from the step-6 loader), swap in any landed Tier-2 UI assets,
63
- and run a feel pass via `$genex-threejs-game-feel` (input response, camera,
64
- impact feedback, retry speed).
99
+ `$genex-threejs-game-ui` (HUD, pause on Escape, fail/retry, win, and the
100
+ full loading state grown from the step-6 loader), then `npx genex wait`
101
+ the step-3 UI generations and wire them in the sprite HUD replaces the
102
+ placeholder CSS, the menu video replaces the still frame (wired with the
103
+ menu skill's loop crossfade), and the scene's planned generated models
104
+ replace their placeholder primitives — a shipped wave of enemies may not
105
+ be untextured boxes. This swap is a
106
+ completion gate, not an option: a game still on the placeholder CSS HUD,
107
+ or without a working Escape pause, is not done. Then run a feel pass via
108
+ `$genex-threejs-game-feel` (input response, camera, impact feedback,
109
+ retry speed).
65
110
  13. Validate in a real browser with fixed seeds, captures, interaction checks,
66
111
  and performance evidence.
67
112
 
@@ -70,7 +115,16 @@ Three.js release or branch, and do not blindly copy demo architecture.
70
115
  **Game fast path:** for a game task that loaded no procedural/visual-system skill,
71
116
  done = a screenshot plus an interaction smoke check (load the page, press each
72
117
  control, assert a visible response — `$genex-threejs-visual-validation` has the
73
- procedure). The list below applies to routed *visual-system* scenes, and each
118
+ procedure), **plus the UI floor from `$genex-threejs-game-ui` (the generated
119
+ sprite HUD wired in — not the CSS placeholder — pause on Escape, the branded
120
+ loader with its key-art background, the brief's font pair actually loaded)
121
+ and the look floor (the step-4 renderer baseline + named post stack actually
122
+ built; every placed 2D/media piece — decals, posters, in-world screens —
123
+ screenshot-verified in situ; no UI element left as default browser CSS; no
124
+ placeholder primitive left where a generated asset was
125
+ planned)**. These floors gate `npx genex publish` and the
126
+ final handoff of a session the same way — "I never said it was done" is not
127
+ an exemption. The list below applies to routed *visual-system* scenes, and each
74
128
  system-specific item (debug views, seed manifests, tier knobs) applies only when
75
129
  the corresponding skill was loaded.
76
130
 
@@ -89,6 +143,12 @@ A routed Genex scene is incomplete until it exposes:
89
143
 
90
144
  ## Publish and multiplayer awareness
91
145
 
146
+ **Publishing IS calling it done.** Before `npx genex publish`, every completion
147
+ gate above must pass — sprite HUD wired, Escape pause working, branded loader
148
+ with its key art, fonts loaded, renderer baseline + one built post effect,
149
+ world dressing placed or validly waived. If any is still pending, say which
150
+ and publish only after an explicit go-ahead.
151
+
92
152
  Do not invent unavailable Genex service APIs. When preparing a game for Genex
93
153
  publishing or multiplayer, inspect the project first. Prefer clean boundaries:
94
154