@genex-ai/cli-demo 1.31.2 → 1.32.0-dev.650

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.
Files changed (47) hide show
  1. package/README.md +18 -0
  2. package/dist/blender-mcp-Q6PSFYSE.js +241 -0
  3. package/dist/blender-serve-BF4FZ55Z.js +244 -0
  4. package/dist/chunk-2COG4P3T.js +968 -0
  5. package/dist/chunk-HYCSNWYX.js +126 -0
  6. package/dist/index.js +4759 -2830
  7. package/package.json +3 -3
  8. package/templates/blender-service/demo/castle.py +117 -0
  9. package/templates/blender-service/gpu_witness.py +245 -0
  10. package/templates/blender-service/ops.py +225 -0
  11. package/templates/blender-service/pool.py +910 -0
  12. package/templates/blender-service/server.py +611 -0
  13. package/templates/blender-service/supervisor.py +221 -0
  14. package/templates/blender-service/views.py +281 -0
  15. package/templates/controllers/character/follow-camera.ts +16 -1
  16. package/templates/controllers/character/meshy/meshy-loader.ts +3 -2
  17. package/templates/controllers/quality/deadline.ts +117 -0
  18. package/templates/controllers/quality/pick-asset.ts +49 -16
  19. package/templates/controllers/shared/physics-world.ts +6 -4
  20. package/templates/skills/genex-ai-character/SKILL.md +77 -15
  21. package/templates/skills/genex-ai-menu/SKILL.md +15 -11
  22. package/templates/skills/genex-ai-model/SKILL.md +45 -7
  23. package/templates/skills/genex-ai-texture/SKILL.md +1 -1
  24. package/templates/skills/genex-ai-video/SKILL.md +75 -17
  25. package/templates/skills/genex-blender-scene/SKILL.md +243 -0
  26. package/templates/skills/genex-game-director/SKILL.md +112 -46
  27. package/templates/skills/genex-game-director/references/design-contract.md +13 -5
  28. package/templates/skills/genex-game-director/references/routing-map.md +30 -45
  29. package/templates/skills/genex-getting-started/SKILL.md +2 -2
  30. package/templates/skills/genex-lane-card/SKILL.md +78 -0
  31. package/templates/skills/genex-monetization/SKILL.md +11 -17
  32. package/templates/skills/genex-threejs-adaptive-quality/SKILL.md +21 -0
  33. package/templates/skills/genex-threejs-character-controller/SKILL.md +17 -5
  34. package/templates/skills/genex-threejs-creatures/SKILL.md +8 -1
  35. package/templates/skills/genex-threejs-embed-auth/SKILL.md +12 -8
  36. package/templates/skills/genex-threejs-game-ui/SKILL.md +55 -6
  37. package/templates/skills/genex-threejs-procedural-assets/SKILL.md +17 -10
  38. package/templates/skills/genex-threejs-visual-validation/SKILL.md +12 -2
  39. package/templates/skills/genex-tool-audio/SKILL.md +3 -2
  40. package/templates/skills/genex-tool-character/SKILL.md +36 -5
  41. package/templates/skills/genex-tool-image/SKILL.md +4 -2
  42. package/templates/skills/genex-tool-model/SKILL.md +32 -6
  43. package/templates/skills/genex-tool-publish/SKILL.md +100 -0
  44. package/templates/skills/genex-tool-texture/SKILL.md +1 -1
  45. package/templates/skills/genex-tool-video/SKILL.md +28 -5
  46. package/templates/skills/genex-tool-workflow/SKILL.md +4 -1
  47. package/templates/skills/genex-updates/SKILL.md +1 -1
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: genex-blender-scene
3
+ description: Compose a level, arena, interior, building or map — a SPACE of rooms, lanes, walls and sites that must relate — in a live Blender with `npx genex blender`, then export one GLB the game walks through. Use for places to move through, floor plans, or explicit Blender authoring including standalone assets. Probe the lane first; code is the fallback only when Blender was not explicitly required.
4
+ ---
5
+
6
+ # Genex Blender · Scene
7
+
8
+ Build the game's SPACE in a real Blender that answers over HTTP: write a Python
9
+ script, run it, read the numbers, look at the four-view sheet, repeat — then
10
+ export one GLB and load it like any model. The scene persists between steps, so a
11
+ level grows the way a level is actually built: shell, then zones, then dressing.
12
+
13
+ ## When this lane owns the work
14
+
15
+ - An explicit request to author or edit **in Blender**, even one standalone
16
+ asset. This overrides the default single-object route below. Keep Python
17
+ source under `blender/`, export the requested GLB and show it in a simple
18
+ browser preview; add gameplay only when requested. In hosted creation use
19
+ the CLI through Bash and open contact sheets with Read: the Blender MCP
20
+ server is not registered in the hosted harness.
21
+ If Blender is unavailable, report that limitation and keep the authored
22
+ scripts; the code fallback below is for requests that did not require Blender.
23
+
24
+ - A **space**: a level, arena, interior, building, map, dungeon, station — several
25
+ rooms, lanes, walls or sites that must relate to each other, and a player who
26
+ moves through them.
27
+ - A **floor plan or reference** to trace (a sketch, an ASCII plan, a photo of a room).
28
+ - A **blockout**: the playable shape first, dressing later.
29
+
30
+ Default routes when the player did not explicitly request Blender:
31
+
32
+ - One recognisable object (a barrel, a cart, a statue) → `$genex-ai-model`.
33
+ - One parameterized object placed many times with variation, or a stylized shader
34
+ material → `$genex-threejs-procedural-assets`.
35
+ - The player's body, creatures, animation → `$genex-ai-character`,
36
+ `$genex-threejs-creatures`. Terrain from a heightmap → code.
37
+
38
+ Mixing all three in one scene is normal: the Blender level is the architecture, a
39
+ generated GLB is the hero piece, code is the repeated dressing.
40
+
41
+ ## Is the lane on? Probe by doing
42
+
43
+ ```bash
44
+ npx genex blender scene
45
+ ```
46
+
47
+ Read the answer literally — there are three:
48
+
49
+ 1. **A scene JSON prints** → the lane is on. Continue.
50
+ 2. `Warming up a Blender seat…` and then `The Blender seat is still warming up. Run
51
+ the same command again in a minute.` → **not done yet**, even though the command
52
+ exited cleanly. A GPU is booting for you (about 20 s on a warm pod, ~2 minutes
53
+ on a cold one, up to ~20 minutes on a host that has never pulled the image).
54
+ Between re-runs keep building everything that does not need Blender — the game
55
+ code, the markers plan, the scripts themselves — and run the command again every
56
+ couple of minutes; the wait never counts against you. Never read this line as
57
+ success, and never read it as failure.
58
+ 3. `The Blender lane is off on this stand`, `No Blender seat: fleet_full` or
59
+ `No Blender seat: pod_unavailable` → build
60
+ the same space **in code** with `$genex-threejs-procedural-assets`, say so in one
61
+ plain line to the player, and keep going. Do not wait, do not ask.
62
+
63
+ The seat, once granted, is remembered in `.genex/blender-seat.json` — later
64
+ commands are silent about it.
65
+
66
+ ## The loop
67
+
68
+ Scripts are the level's source. Keep them in the project, one per zone:
69
+
70
+ ```
71
+ blender/01-shell.py walls, floor, towers
72
+ blender/02-gatehouse.py
73
+ blender/03-courtyard.py
74
+
75
+ ```
76
+
77
+ Run one:
78
+
79
+ ```bash
80
+ npx genex blender exec --in blender/01-shell.py
81
+ ```
82
+
83
+ Every run prints two things and writes one file:
84
+
85
+ - **The numbers** — `objects N meshes N tris N materials N radius N`. This is
86
+ the gate. Before you run, know what the script should produce (twelve objects,
87
+ about 4k tris, radius ≈ 40); after, compare. A render judge is unreliable for
88
+ pass/fail; the numbers are not.
89
+ - **The sheet** — `assets/blender/contact-sheet.webp`, four fixed views (front,
90
+ side, TOP, hero) from cameras derived from the scene bounds, so two steps compare
91
+ pixel for pixel. **Open it with your file-reading tool after every step.** The
92
+ TOP view is the floor-plan check; the hero view is the mood check. Nothing shows
93
+ it to you unless you look.
94
+ - Script `print()` output comes back as stdout; a raised exception comes back with
95
+ its traceback AND the sheet of the half-built scene, which is usually where the
96
+ bug is visible.
97
+
98
+ The Python namespace **persists between runs** (`bpy`, `bmesh`, `mathutils`,
99
+ `math`, `random` are preloaded): define `mat()` and `box()` helpers once in the
100
+ first script and use them in every later one. If a run says the service restarted
101
+ and the scene was restored from a checkpoint, re-read the numbers — your last step
102
+ may be missing; re-run that one script.
103
+
104
+ Other verbs:
105
+
106
+ ```bash
107
+ npx genex blender snap --mode wireframe # topology; also normals | solid | lit
108
+ npx genex blender scene # the full graph as JSON, when a number surprises you
109
+ npx genex blender reset # empty scene (the namespace resets too)
110
+ ```
111
+
112
+ Keep each step under about 90 seconds of Blender time: a script that loops
113
+ hundreds of boolean cuts is killed at the deadline and the scene comes back from
114
+ the last checkpoint. Split heavy work across scripts. A level is 8–15 steps, not 50.
115
+
116
+ ## Craft rules that decide whether the export works
117
+
118
+ - **Metres.** Floor at `z = 0`, the map's centre at the origin. Blender is Z-up;
119
+ the export converts to Y-up, so the floor is the XZ plane in Three.js and a
120
+ Blender `(x, y, z)` lands at `(x, z, -y)`.
121
+ - **Name everything** `<zone>_<thing>` (`gate_portcullis`, `hall_table_1`). Names
122
+ survive the export and are how the game finds parts.
123
+ - **Materials: few and flat.** Six to eight for a whole level, one per surface
124
+ family (stone, dark stone, wood, roof, iron, glow). Set the Principled BSDF base
125
+ colour **and** `material.diffuse_color` — the sheet's fallback renderer reads the
126
+ second, and a scene that sets only the first exports with correct colours and
127
+ renders entirely grey. No image textures: they do not fit the export ceiling, and
128
+ an asset URL does not export.
129
+ - **Repetition by loop, never by an unapplied modifier.** Crenellations, columns,
130
+ pews: a Python `for`. An Array modifier that is not applied is not in the GLB.
131
+ - **Tri budget.** Keep the whole level under ~150k triangles and use 12–16 segments
132
+ on cylinders — phones load this file too. The export refuses above 6 MB; treat
133
+ that as "no longer a game asset", not as a limit to work around.
134
+ - **Markers.** Empties export as named nodes: `bpy.data.objects.new("spawn", None)`
135
+ placed and linked into the scene collection, likewise `key_1`, `door_crypt`,
136
+ `patrol_1`. The level tells the game where things go; the game reads them with
137
+ `scene.getObjectByName("spawn")`.
138
+ - **Lights stay in the game.** Blender lights do not export usefully; light the
139
+ level in Three.js (a hemisphere + a sun, point lights at torches and hearths).
140
+ - **Collision is the game's.** Static level geometry gets Rapier trimesh colliders
141
+ per mesh — `$genex-threejs-physics-rapier`. If a mesh is too dense to collide
142
+ against, add a simplified `col_<zone>` box in Blender and keep the visual one out
143
+ of physics.
144
+
145
+ A minimal first script, the shape every later one follows:
146
+
147
+ ```python
148
+ import bpy
149
+ bpy.ops.wm.read_factory_settings(use_empty=True)
150
+
151
+ def mat(name, rgb, rough=0.85):
152
+ m = bpy.data.materials.new(name)
153
+ m.use_nodes = True
154
+ b = m.node_tree.nodes["Principled BSDF"]
155
+ b.inputs["Base Color"].default_value = (*rgb, 1.0)
156
+ b.inputs["Roughness"].default_value = rough
157
+ m.diffuse_color = (*rgb, 1.0) # BOTH, or the sheet renders grey
158
+ return m
159
+
160
+ def box(name, loc, half, m):
161
+ bpy.ops.mesh.primitive_cube_add(size=2.0, location=loc)
162
+ o = bpy.context.active_object
163
+ o.name, o.scale = name, half
164
+ o.data.materials.append(m)
165
+ return o
166
+
167
+ STONE = mat("Stone", (0.46, 0.44, 0.41))
168
+ box("yard_floor", (0, 0, -0.25), (35, 35, 0.25), mat("Ground", (0.30, 0.28, 0.24)))
169
+ for sx, sy in ((1, 1), (1, -1), (-1, 1), (-1, -1)):
170
+ bpy.ops.mesh.primitive_cylinder_add(radius=3, depth=14, vertices=16,
171
+ location=(sx * 35, sy * 35, 7))
172
+ t = bpy.context.active_object
173
+ t.name = f"tower_{sx}_{sy}"
174
+ t.data.materials.append(STONE)
175
+ print("shell:", len(bpy.context.scene.objects), "objects")
176
+ ```
177
+
178
+ ## Hero pieces from `genex model`
179
+
180
+ ```bash
181
+ npx genex model "weathered stone knight effigy on a tomb, medieval" # prints a URL
182
+ npx genex blender import https://assets.genex.technology/generations/<id>/model-glb
183
+ ```
184
+
185
+ `import` prints the object names it added and renders a fresh sheet; place and
186
+ scale them in the next `exec` (`bpy.data.objects["…"].location = (…)`). Import
187
+ when the piece must be composed WITH the architecture (a gate in a wall, a statue
188
+ in a niche). When it is dressing, skip the import: drop a marker in Blender and
189
+ load the GLB in Three.js at that marker — it keeps the level file small.
190
+
191
+ ## Export and load
192
+
193
+ ```bash
194
+ npx genex blender export --out public/assets/level.glb
195
+ ```
196
+
197
+ Load it like any GLB. The quality kit's rung ladder applies only to generated
198
+ `/generations/` URLs, so this file loads as-is — the tri and material budgets
199
+ above are what keep it phone-safe.
200
+
201
+ ```ts
202
+ import { createGltfLoader } from "./controllers/quality/gltf-loader.ts";
203
+
204
+ const gltfLoader = createGltfLoader(renderer);
205
+ const level = await gltfLoader.loader.loadAsync("/assets/level.glb");
206
+ level.scene.traverse((o) => {
207
+ if ((o as THREE.Mesh).isMesh) { o.castShadow = true; o.receiveShadow = true; }
208
+ });
209
+ scene.add(level.scene);
210
+ const spawn = level.scene.getObjectByName("spawn");
211
+ ```
212
+
213
+ Then colliders (`$genex-threejs-physics-rapier`), the player
214
+ (`$genex-threejs-character-controller`), lights, and a real screenshot check
215
+ (`$genex-threejs-visual-validation`). Record the level in `DESIGN.md`'s Assets as
216
+ `local Blender build — scripts under blender/`, never a provider generation id.
217
+
218
+ ## Money
219
+
220
+ A **hosted session's** seat bills a few credits per minute while it is held, idle
221
+ or not, and ends with the session — there is no close command for it. So build
222
+ the level in one sitting: shell → zones → hero pieces → export, then move on to
223
+ the game. Batch changes into fewer, larger scripts; every step renders one sheet.
224
+
225
+ At a **terminal with no Blender installed**, `npx genex blender seat` rents the
226
+ same pooled GPU on your own credits (the price and the idle timeout print on
227
+ open); it ends itself after 15 idle minutes, or run `npx genex blender release`
228
+ when you are done. Prefer `npx genex blender serve` against your own Blender
229
+ when one is available — the measurements favour it, and it costs nothing.
230
+
231
+ ## Troubleshooting
232
+
233
+ - `payload_too_large` on export → fewer cylinder segments, delete faces the player
234
+ never sees, or export two GLBs (`--out public/assets/level-a.glb`).
235
+ - The sheet is grey → `material.diffuse_color` was not set (see above).
236
+ - `refused the seat token (401)` → the rejected cached grant has been removed.
237
+ In hosted creation, run `npx genex blender scene` to acquire a new seat and
238
+ inspect the restored scene before deciding whether to rerun the failed script.
239
+ At a terminal, run `npx genex blender seat` first. Recovery never automatically
240
+ replays scene changes; a replaced pod restores the latest saved checkpoint.
241
+ - `seat_not_ready` → the pod is still booting; run again shortly.
242
+ - The numbers are right but the top view is wrong → coordinates: `y` in Blender is
243
+ depth, and `scale` on a 2-unit cube is the half-size.
@@ -1,14 +1,19 @@
1
1
  ---
2
2
  name: genex-game-director
3
- description: The lightweight Genex request router. Read the latest game, tool, component, or focused-change request; ask only genuinely unresolved build forks; keep DESIGN.md current; and load only the Genex skills that the requested work actually needs. Use first for new work, resumed work, or whenever ownership is unclear.
3
+ description: The Genex request router. Read the latest game, tool, component, or focused-change request; ask only genuinely unresolved build forks; keep DESIGN.md current; and load each owning lane BEFORE the first file of the subsystem it owns — only the lanes the work touches, never the whole pack, and never fewer than the work needs. Use first for new work, resumed work, or whenever ownership is unclear.
4
4
  ---
5
5
 
6
6
  # Genex Game Director
7
7
 
8
8
  The player chooses what to build and in what order. You route that request;
9
- the owning Genex skills control how their lanes run. Load only skills that
10
- change the requested result—never the whole pack by default, and never
11
- commission unrelated work because an old workflow listed it.
9
+ the owning Genex skills control how their lanes run.
10
+
11
+ Routing binds in BOTH directions: load only the lanes the requested work
12
+ touches — never the whole pack by default, and never unrelated work because an
13
+ old workflow listed it — and load a lane BEFORE the first file of the subsystem
14
+ it owns. A matching row in the routing map is not a suggestion: each lane
15
+ exists because writing that subsystem without it ships a known defect.
16
+ Loading one lane never commissions another.
12
17
 
13
18
  **After any context compaction or session resume**, re-read the project's
14
19
  `AGENTS.md`, `DESIGN.md` when present, and the skill for the work you are
@@ -36,6 +41,13 @@ paths. Building, previewing, promoting and publishing use `genex preview` /
36
41
 
37
42
  Use the request in front of you, not the oldest description of the project.
38
43
 
44
+ - **Explicit Blender authoring**, including a standalone prop, owns the
45
+ `$genex-blender-scene` lane. Keep the requested scope: Python scripts, an
46
+ exported GLB and a browser preview for an asset request. Do not invent
47
+ gameplay, a character controller or a game concept to justify the hosted
48
+ workspace. Blender in this sentence names the authoring tool; a kitchen
49
+ blender requested as a prop follows the ordinary asset rows.
50
+
39
51
  - **Clear focused request**—“work on the UI,” “fix movement,” “add one enemy,”
40
52
  “make this prop,” “publish this”—read the touched implementation and
41
53
  `DESIGN.md`, load only the owning skills, update `Now:`, and start. Do not
@@ -54,6 +66,10 @@ Use the request in front of you, not the oldest description of the project.
54
66
  invent or propose game concepts for them.
55
67
  - **Existing project** respects its renderer, physics, file conventions, and
56
68
  working systems unless the player asks to change them.
69
+ - **A tagged reference** (source under `.genex/refs/<slug>/`) owns the
70
+ subsystem it was tagged for: read its `_map.md` and implementing files
71
+ before choosing a lane — it outranks the default lane, including the
72
+ vendored controllers, for that subsystem.
57
73
 
58
74
  Ask one decision at a time. Never ask the player to choose an SDK, engine,
59
75
  renderer, file layout, provider, or other implementation detail. Product
@@ -99,40 +115,69 @@ Never invent a provider generation ID for local code. Sections for gameplay,
99
115
  content, UI, world, assets, multiplayer, character/animation, tools, or
100
116
  modules are conditional on the request and existing project.
101
117
 
102
- ## 4. Route to the owning lane
103
-
104
- Use the [routing map](references/routing-map.md) for exact ownership. The main
105
- Genex asset and runtime lanes are:
106
-
107
- - `npx genex model "<prompt>"`—a generated GLB (also `--image` from a
108
- reference picture, `model segment` into named parts, `model rig` +
109
- `model animate` for non-biped bodies) `$genex-ai-model`
110
- - `npx genex texture "<prompt>"`—a generated surface → `$genex-ai-texture`
111
- - sky, horizon, time of day, weather mood—built in code, never generated; no
112
- command and no skill owns it, so pick what this game needs
113
- - `npx genex sfx "<prompt>"` / `music` / `voice`
114
- `$genex-ai-sfx`, `$genex-ai-music`, `$genex-ai-voice`
115
- - `npx genex image "<prompt>"` / `video`—2D and motion art
116
- `$genex-ai-image`, `$genex-ai-video`
117
- - UI, HUD, and menu requests `$genex-threejs-game-ui`,
118
- `$genex-ai-hud`, `$genex-ai-menu`
119
- - `npx genex character`, `creature`, and their motion commands →
120
- `$genex-ai-character`, `$genex-threejs-creatures`
121
- - movement and vehicles `$genex-threejs-character-controller`,
122
- `$genex-threejs-vehicle-controllers`
123
- - phone input and phone-survivable rendering
124
- `$genex-threejs-touch-controls`, `$genex-threejs-adaptive-quality`
125
- - structures, buildings, modular kits, repeated or varied environment pieces,
126
- and parameterized objects code is often the more efficient engine for
127
- these `$genex-threejs-procedural-assets`
118
+ ## 4. Routing map — load the owning lane before the first file
119
+
120
+ For every subsystem the current milestone touches, find its row below, load
121
+ that skill, and write the lane beside the work in `DESIGN.md` — a `Lane` cell
122
+ on the module's row in the Modules table, or a `Lane:` line under `Now:` in
123
+ focused or step-by-step work. `Lane: none <why>` is the only way to write a
124
+ subsystem with no lane. Then write the code. Never reconstruct a lane's API or
125
+ vendored code from memory of another engine.
126
+
127
+ | Work needed | Load |
128
+ | --- | --- |
129
+ | **your first `npx genex model` or `npx genex character` this session** — the command, what comes back, how to scale and ground it, and what to do when a lane is dead. One page, thirty seconds. The full lanes below are long; measured across 105 generation-lane invocations, 94% ran without the owning skill open, and placement is where that showed | `$genex-lane-card` |
130
+ | shot composition, chase/side/orbit rigs, camera handoffs, projection ownership, pointer look, mouse-aimed action, mouse-look, the screen-direction contract for hand-rolled steering/pan/look input signs, floating origins | `$genex-threejs-camera-direction` |
131
+ | on-foot player movement: walk/run/jump/crouch, third-person character, slopes, stairs, moving platforms, the player's body loader, directional locomotion, transitions, action motion | `$genex-threejs-character-controller` |
132
+ | **attacking, casting, aiming or reloading WHILE moving** — any action the legs must keep running under; a weapon carry stance over stock locomotion; a wind-up the character holds while walking | `$genex-threejs-character-controller` (`references/animations.md`, upper-body layering) |
133
+ | dash, dodge, roll, blink, backstep, a lunging attack — any burst that moves the character itself | `$genex-threejs-character-controller` (`references/tuning-and-presets.md`, dash recipe) |
134
+ | the game's own generated character—the player's body wherever a human body appears—or Meshy animation coverage beyond the stock pack: reference-informed A-pose concepts, exact action IDs, same-rig adapter | `$genex-ai-character` + `$genex-threejs-character-controller` (first time this session: `$genex-lane-card`) |
135
+ | a character/enemy needs motion the catalog lacks—a signature move, boss telegraph, death, full 8-way set, or the player's footage; free plan before spend | `$genex-ai-character` motion section + `references/motion-generation.md` |
136
+ | remote player bodies in multiplayer—never hand-built primitives: the game's generated character when it has one, otherwise the player's `p.avatarUrl` VRM | `$genex-threejs-multiplayer` + `$genex-threejs-character-controller` |
137
+ | enemies, NPCs, or creatures: rigged bipeds via `npx genex creature`; non-biped body plans (quadruped, flier, serpent, aquatic, multi-leg) via `npx genex model rig` + `model animate`; static plus procedural motion only for shapes with no body plan; collider, facing, hit reaction, death | `$genex-threejs-creatures` |
138
+ | cars, drones, vehicle physics, gearbox, character↔vehicle enter/exit | `$genex-threejs-vehicle-controllers` |
139
+ | playable on phones: joystick, virtual buttons, drag zones, genre touch recipes, rotate-device overlay | `$genex-threejs-touch-controls` |
140
+ | phone-survivable rendering: device tiers, DPR/shadow/post budgets, runtime governor, generated-asset rungs, Quality picker, dispose-on-swap | `$genex-threejs-adaptive-quality` |
141
+ | anything falls, collides, gets pushed, or needs colliders/events | `$genex-threejs-physics-rapier` |
142
+ | launch/docking timelines, authored transform phases, springs, convergence, deterministic prop/debris motion | `$genex-threejs-procedural-animation` |
143
+ | a level, arena, interior or map to walk through — the SPACE ITSELF: its ground plan, rooms, lanes, walls, paths and sites, from a description or a floor plan; a blockout. This row claims the space, never the things standing in it — the buildings, props, creatures and characters a player walks up to are separate rows below, and routing the space does not route them | `$genex-blender-scene` — probe the lane first (`npx genex blender scene`); when it is off, the same space is built as code via `$genex-threejs-procedural-assets` |
144
+ | rebuild a reference prop, hard-surface object, modular decoration, or structural environment piece (kits, fences, walls, paving) as editable parameterized Three.js code — held to the asset bar at the end of this section | `$genex-threejs-procedural-assets` |
145
+ | stylized/abstract shader-authored materials, the procedural/PBR material boundary | `$genex-threejs-procedural-assets` |
146
+ | particles, trails, plasma, shockwaves, pooled bursts, and event effects | `$genex-threejs-procedural-vfx` |
147
+ | stable large-world shadows, cascades, clipmaps, cached updates | `$genex-threejs-shadow-systems` |
148
+ | eye adaptation, tone mapping, output color, LUT grading, and proven static grain | `$genex-threejs-exposure-color-grading` |
149
+ | fixed-view screenshots, input direction, facing, temporal and budget evidence | `$genex-threejs-visual-validation` |
150
+ | **a model the player already has** — a `.glb` they exported, bought or made elsewhere: it is IMPORTED, never rebuilt. `npx genex model import <file.glb>` (free) for props and non-biped bodies (then `model rig`/`model animate`), `npx genex character import <file.glb>` for a humanoid that should walk (Uthana auto-rig, then `character animate --locomotion`) | `$genex-ai-model` · `$genex-ai-character` |
151
+ | the default for a concrete object the player looks at up close: a generated GLB for a prop, vehicle, building, or object — from text or a reference image (`--image`); split into named parts (`model segment`); rig + animate any mesh (`model rig` / `model animate`). A space routed to code above does NOT settle these: a village's ground plan can be code while the forge you walk up to is generated | `$genex-ai-model` (first time this session: `$genex-lane-card`) |
152
+ | generated surface or terrain texture with real-world UV scale | `$genex-ai-texture` |
153
+ | sky, skybox, horizon, time of day, weather mood, night or space backdrop | build it in code in the scene—there is no sky command and no owning skill, so pick the technique this game needs |
154
+ | poster, sign, sprite, decal, reference sheet, or other 2D art | `$genex-ai-image` |
155
+ | in-world motion art or another requested video | `$genex-ai-video` |
156
+ | sound effect, one looping music bed, or a short spoken line | `$genex-ai-sfx`, `$genex-ai-music`, or `$genex-ai-voice` |
157
+ | requested UI/HUD/menu/interface work, a visible UI problem, or an interface you decided this game wants built with generated art | `$genex-threejs-game-ui` |
158
+ | selling anything for platform coin: a shop, an item catalog, boosts, cosmetics, "make it earn"; also any request for a loot box, gacha, wager, casino mechanic or donation prompt, which that skill refuses and replaces | `$genex-monetization` |
159
+ | cinematic menu/title/pause/victory/defeat/lobby/credits video treatment | `$genex-ai-menu` |
160
+ | drawn HUD chrome the game's style wants—one element or a matched set of frames, masks, and icons | `$genex-ai-hud` |
161
+ | the game works but feels flat, floaty, or unresponsive: input response, camera, impacts, cooldowns, difficulty, fail/retry | `$genex-threejs-game-feel` |
162
+ | realtime multiplayer: movement sync, shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
163
+ | players talking to each other by TEXT — chat, room chat, "let them type to each other" (`room.chat` + `npx genex controller chat`) | `$genex-threejs-multiplayer` |
164
+ | players TALKING — voice chat, mic, "hear each other", proximity/positional voice (`room.voice` + `npx genex controller voice`; party-sized, max 6 per room — say that number out loud before building the feature) | `$genex-threejs-multiplayer` |
165
+ | player identity, sign-in, guests, saves/progress, per-player state, shared persistent world, leaderboards—mandatory for every game | `$genex-threejs-embed-auth` |
166
+ | the player EXPLICITLY asks to make an asset or publish something from their game as an asset for the free library | `$genex-asset-author` (`genex asset new`) — never offer this unprompted; no game duty routes here |
167
+
168
+ Request-shape rules, working modes and the protected-lane handoffs stay in the
169
+ [routing map](references/routing-map.md); read it when the request shape, not
170
+ the subsystem, is what is unclear.
128
171
 
129
172
  For “make this image 3D,” ask **one** route question only when both results
130
173
  honestly fit: a generated GLB built from the picture itself
131
174
  (`npx genex model --image <path>`), or editable parameterized Three.js code.
132
175
  If the request says procedural, parametric, code-built, reusable variations,
133
176
  or names a GLB, start the corresponding route directly. An image alone never
134
- auto-triggers the procedural lane. Player bodies, rigged characters/creatures,
135
- and animation stay with their protected owners.
177
+ auto-triggers the procedural lane. A floor plan, a room photo or a map sketch
178
+ is a SPACE, not an object: it goes to `$genex-blender-scene` with no route
179
+ question. Player bodies, rigged characters/creatures, and animation stay with
180
+ their protected owners.
136
181
 
137
182
  If a procedural request has a private reference, use it locally and do not
138
183
  upload, publish, or commit it without explicit permission. If no reference was
@@ -141,16 +186,36 @@ supplied and creating one is part of the requested work, use the existing
141
186
  Assets row.
142
187
 
143
188
  The request sets the floor for the asset plan, never the ceiling: a world
144
- should feel dressed and alive, so plan the detail its genre implies — and pick
145
- the more efficient engine per object. Paid generation buys hero pieces (the
146
- player's character, key props, music); procedural code is the
147
- unlimited detail engine for structures, buildings, modular kits, and repeated
148
- or varied dressing (`$genex-threejs-procedural-assets` owns that lane) and
149
- for the sky, which is never generated at all. Mixing
189
+ should feel dressed and alive, so plan the detail its genre implies — and
190
+ choose the engine per object, never per category. The bar is the same for both
191
+ engines: whatever the player looks at must read as the thing it is, in this
192
+ game's own style a building as that building, a person as a person, a prop as
193
+ that prop. A coloured box, a capsule or a flat grey block is not a finished
194
+ version of any of them. Generation is the default route to that bar wherever
195
+ code will not honestly reach it: the player's character, anything the request
196
+ names, anything the player walks up to, enters, or interacts with, and the
197
+ music and sound under it. Procedural code (`$genex-threejs-procedural-assets`)
198
+ is a first-class engine for what is structural, repeated, distant, or
199
+ parametric — terrain, sky (never generated), fences, paving, modular kits,
200
+ filler — and for anything else only when the result meets the same bar and you
201
+ have checked it in a capture before its row says `landed`. Write the route on
202
+ each Assets row: the paid flow for generated pieces, the procedural flow with
203
+ its local path for code-built ones — the table is where the per-object decision
204
+ lives, and a table with no generated row records
205
+ `Generation: none — <why code alone reaches the bar here>` beside it. Mixing
150
206
  both in one scene is the normal way to build, never a fallback. In focused
151
- work, stay inside the touched scope. Run independent planned generations with
152
- `--no-wait`, scaffold while they land, and preserve their IDs, URLs, and
153
- wiring state.
207
+ work, stay inside the touched scope. Generate in batches you can finish. The first
208
+ batch is the smallest set that makes the scene read — the player's body,
209
+ whatever the request names, and the first thing they walk up to — enqueued
210
+ together with `--no-wait` while you scaffold. Before a second batch starts,
211
+ every id in the first is collected with `npx genex wait --all`, loaded from a
212
+ file in `src/`, and seen in a capture. A batch begun while the previous one is
213
+ still uncollected is how a game ends up with an asset library and an empty
214
+ world. This is enforced, not merely advised: unshipped generations are counted
215
+ and the generate commands refuse past a ceiling, which `npx genex preview`
216
+ resets to zero. There is no total — preview between batches and generate as
217
+ much as the game needs. Preserve every id, URL and wiring state across a
218
+ compaction.
154
219
 
155
220
  ## 5. Execute by working mode
156
221
 
@@ -308,13 +373,14 @@ your pick. The announced pick carries the lane:
308
373
 
309
374
  `npx genex character preview <concept-id> --candidate <1|2|3> --user-approved`
310
375
 
311
- Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
376
+ Meshy 7 Image-to-3D first produces an unremeshed high-detail model. Show its
312
377
  front, back, left, and right views and report its measured face count.
313
- Preserve that model in R2. The 10,000-face triangle remesh—not the high-detail
314
- source—is rigged and animated. In the default lane, the pick authorizes that
315
- remesh:
378
+ Preserve that model in R2. A triangle remesh at the face budget you approve
379
+ (10000-100000; 10000 for crowds, 20000-30000 for a third-person player
380
+ body)—not the high-detail source—is rigged and animated. In the default lane,
381
+ the pick authorizes that remesh:
316
382
 
317
- `npx genex character finalize <preview-id> --user-approved --approve-remesh 10000 [--animation <action-id>…]`
383
+ `npx genex character finalize <preview-id> --user-approved --approve-remesh <faces> [--animation <action-id>…]`
318
384
 
319
385
  When the player explicitly requested a custom character, keep the existing
320
386
  two stops: wait for their explicit candidate selection before Image-to-3D,
@@ -37,11 +37,15 @@ so it survives a long pause, context compaction, handoff, and remix.
37
37
  status flow `proposed → planned → generating (id) → landed (URL) → wired`.
38
38
  A landed asset is unfinished until wired or visibly cancelled. Preserve
39
39
  generation IDs, permanent URLs, local outputs, and wiring state across
40
- compaction.
40
+ compaction. Every row shows its route: generated rows carry the paid flow;
41
+ code-built rows carry the procedural flow and a local path. A table with no
42
+ generated row at all carries `Generation: none — <why code alone reaches the
43
+ bar here>` beside it (build contract, law 22).
41
44
  - **Code-built procedural assets use their own truthful status flow:**
42
45
  `proposed → planned → building (blockout | detail | material | runtime) →
43
46
  landed (<local TypeScript path>) → wired`. They never invent a provider
44
- generation ID. A generated reference image is a separate normal Assets row.
47
+ generation ID. `landed` on a code-built row means a capture at gameplay
48
+ distance showed it reads as the thing it is. A generated reference image is a separate normal Assets row.
45
49
  - Sections are request-driven. Gameplay, content, UI, assets, world,
46
50
  multiplayer, character/animation, tools, modules, and procedural assets
47
51
  appear only when the request or existing project uses them.
@@ -73,6 +77,7 @@ or explicitly re-scope it.>
73
77
  Working mode: <whole coordinated build | step by step | focused change>
74
78
  Now: ▶ <number/name of the current milestone or focused task>
75
79
  Done when: <one plain, observable condition for the current work>
80
+ Lane: <$genex-… owning the current subsystem | none — why no row matches>
76
81
  1. <milestone> — ✅ → previewed
77
82
  2. <milestone> — ▶ in progress (<main agent | sub-agent>)
78
83
  3. <milestone> — ⏸ paused (<reason>)
@@ -121,7 +126,10 @@ Menu video: <generation id/URL, or the still standing in while it renders>
121
126
  | <asset> | <model/image/texture/…> | planned | — |
122
127
  | <asset> | <kind> | generating (<id>) | — |
123
128
  | <asset> | <kind> | landed → <URL> | yes/no |
129
+ | <asset> | procedural-code | building (blockout) | — |
124
130
  Status flow: proposed → planned → generating (id) → landed (URL) → wired.
131
+ Code-built rows: proposed → planned → building (…) → landed (<local path>) → wired.
132
+ Generation: none — <why code alone reaches the bar in this game> (only when no row is generated)
125
133
 
126
134
  **HUD pipeline state (only while the sprites lane is running) — keep this
127
135
  current; it is how that pipeline survives a context compaction.**
@@ -152,9 +160,9 @@ Play-button rule: nothing connects before the click when a Play screen exists.
152
160
  Verification still open: <two-identity/netcode evidence>
153
161
 
154
162
  ## Modules (whole coordinated mode or another useful split only)
155
- | Module | Owns files | Built by | Done when |
156
- |---|---|---|---|
157
- | <request-derived stream> | <disjoint paths> | <parallel/serial + reason> | <observable result> |
163
+ | Module | Lane | Owns files | Built by | Done when |
164
+ |---|---|---|---|---|
165
+ | <request-derived stream> | <$genex-… or none — why> | <disjoint paths> | <parallel/serial + reason> | <observable result> |
158
166
 
159
167
  ## Verification evidence
160
168
  - <preview URL/date and what it proves>
@@ -28,52 +28,23 @@ copy demo architecture.
28
28
  3D,” ask one plain question: normal generated GLB, or editable parameterized
29
29
  Three.js code? Explicit `GLB`, `procedural`, `parametric`, `code-built`, or
30
30
  `variations` language chooses directly.
31
+ - **Tagged reference:** source under `.genex/refs/<slug>/` owns the subsystem
32
+ it was tagged for — read its `_map.md` and implementing files before choosing
33
+ a lane; it outranks the default lane, vendored controllers included.
31
34
 
32
35
  ## Route by system
33
36
 
34
- | Work needed | Load |
35
- | --- | --- |
36
- | shot composition, chase/side/orbit rigs, camera handoffs, projection ownership, pointer look, mouse-aimed action, mouse-look, the screen-direction contract for hand-rolled steering/pan/look input signs, floating origins | `$genex-threejs-camera-direction` |
37
- | on-foot player movement: walk/run/jump/crouch, third-person character, slopes, stairs, moving platforms, the player's body loader, directional locomotion, transitions, action motion | `$genex-threejs-character-controller` |
38
- | **attacking, casting, aiming or reloading WHILE moving** — any action the legs must keep running under; a weapon carry stance over stock locomotion; a wind-up the character holds while walking | `$genex-threejs-character-controller` (`references/animations.md`, upper-body layering) |
39
- | dash, dodge, roll, blink, backstep, a lunging attack — any burst that moves the character itself | `$genex-threejs-character-controller` (`references/tuning-and-presets.md`, dash recipe) |
40
- | the game's own generated character—the player's body wherever a human body appears—or Meshy animation coverage beyond the stock pack: reference-informed A-pose concepts, exact action IDs, same-rig adapter | `$genex-ai-character` + `$genex-threejs-character-controller` |
41
- | a character/enemy needs motion the catalog lacks—a signature move, boss telegraph, death, full 8-way set, or the player's footage; free plan before spend | `$genex-ai-character` motion section + `references/motion-generation.md` |
42
- | remote player bodies in multiplayer—never hand-built primitives: the game's generated character when it has one, otherwise the player's `p.avatarUrl` VRM | `$genex-threejs-multiplayer` + `$genex-threejs-character-controller` |
43
- | enemies, NPCs, or creatures: rigged bipeds via `npx genex creature`; non-biped body plans (quadruped, flier, serpent, aquatic, multi-leg) via `npx genex model rig` + `model animate`; static plus procedural motion only for shapes with no body plan; collider, facing, hit reaction, death | `$genex-threejs-creatures` |
44
- | cars, drones, vehicle physics, gearbox, character↔vehicle enter/exit | `$genex-threejs-vehicle-controllers` |
45
- | playable on phones: joystick, virtual buttons, drag zones, genre touch recipes, rotate-device overlay | `$genex-threejs-touch-controls` |
46
- | phone-survivable rendering: device tiers, DPR/shadow/post budgets, runtime governor, generated-asset rungs, Quality picker, dispose-on-swap | `$genex-threejs-adaptive-quality` |
47
- | anything falls, collides, gets pushed, or needs colliders/events | `$genex-threejs-physics-rapier` |
48
- | launch/docking timelines, authored transform phases, springs, convergence, deterministic prop/debris motion | `$genex-threejs-procedural-animation` |
49
- | rebuild a reference prop, hard-surface object, modular decoration, or simple environment piece as editable parameterized Three.js code | `$genex-threejs-procedural-assets` |
50
- | stylized/abstract shader-authored materials, the procedural/PBR material boundary | `$genex-threejs-procedural-assets` |
51
- | particles, trails, plasma, shockwaves, pooled bursts, and event effects | `$genex-threejs-procedural-vfx` |
52
- | stable large-world shadows, cascades, clipmaps, cached updates | `$genex-threejs-shadow-systems` |
53
- | eye adaptation, tone mapping, output color, LUT grading, and proven static grain | `$genex-threejs-exposure-color-grading` |
54
- | fixed-view screenshots, input direction, facing, temporal and budget evidence | `$genex-threejs-visual-validation` |
55
- | a generated GLB for a concrete prop, vehicle, building, or object — from text or a reference image (`--image`); split into named parts (`model segment`); rig + animate any mesh (`model rig` / `model animate`) | `$genex-ai-model` |
56
- | generated surface or terrain texture with real-world UV scale | `$genex-ai-texture` |
57
- | sky, skybox, horizon, time of day, weather mood, night or space backdrop | build it in code in the scene—there is no sky command and no owning skill, so pick the technique this game needs |
58
- | poster, sign, sprite, decal, reference sheet, or other 2D art | `$genex-ai-image` |
59
- | in-world motion art or another requested video | `$genex-ai-video` |
60
- | sound effect, one looping music bed, or a short spoken line | `$genex-ai-sfx`, `$genex-ai-music`, or `$genex-ai-voice` |
61
- | requested UI/HUD/menu/interface work, a visible UI problem, or an interface you decided this game wants built with generated art | `$genex-threejs-game-ui` |
62
- | selling anything for platform coin: a shop, an item catalog, boosts, cosmetics, "make it earn"; also any request for a loot box, gacha, wager, casino mechanic or donation prompt, which that skill refuses and replaces | `$genex-monetization` |
63
- | cinematic menu/title/pause/victory/defeat/lobby/credits video treatment | `$genex-ai-menu` |
64
- | drawn HUD chrome the game's style wants—one element or a matched set of frames, masks, and icons | `$genex-ai-hud` |
65
- | the game works but feels flat, floaty, or unresponsive: input response, camera, impacts, cooldowns, difficulty, fail/retry | `$genex-threejs-game-feel` |
66
- | realtime multiplayer: movement sync, shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
67
- | players talking to each other by TEXT — chat, room chat, "let them type to each other" (`room.chat` + `npx genex controller chat`) | `$genex-threejs-multiplayer` |
68
- | players TALKING — voice chat, mic, "hear each other", proximity/positional voice (`room.voice` + `npx genex controller voice`; party-sized, max 6 per room — say that number out loud before building the feature) | `$genex-threejs-multiplayer` |
69
- | player identity, sign-in, guests, saves/progress, per-player state, shared persistent world, leaderboards—mandatory for every game | `$genex-threejs-embed-auth` |
70
- | the player EXPLICITLY asks to make an asset or publish something from their game as an asset for the free library | `$genex-asset-author` (`genex asset new`) — never offer this unprompted; no game duty routes here |
37
+ The ownership table lives in **SKILL.md §4** so it is in front of you the
38
+ moment the director loads, rather than behind a link you have to decide to
39
+ open. This file keeps the request-shape and working-mode rules; read it when
40
+ the shape of the request, not the owning subsystem, is what is unclear.
71
41
 
72
42
  ## Request-sized execution
73
43
 
74
44
  ### Focused work
75
45
 
76
- Load only the owning row or rows, preserve the current architecture, implement
46
+ Load the owning row or rows before the first file of each subsystem, and
47
+ none beyond the work — preserve the current architecture, implement
77
48
  the requested result, and run its relevant check. UI work routes directly to
78
49
  UI; movement routes directly to movement; publishing routes directly to the
79
50
  existing publish flow. Do not add a concept, unrelated asset batch, full-game
@@ -129,14 +100,28 @@ flow and state what remains.
129
100
 
130
101
  ## Procedural assets (code-built)
131
102
 
132
- Use `$genex-threejs-procedural-assets` whenever code is the more efficient
133
- engine for an objectstructures, buildings, modular kits, repeated or varied
134
- props, parameterized objects — or when the player asks for procedural,
135
- parametric, or code-built work. It is a first-class lane, not a fallback, and
136
- mixing it with generated GLBs in one scene is the normal way to build a
137
- detailed world. An image alone still doesn't decide the route (ask the one
103
+ Use `$genex-threejs-procedural-assets` whenever code will honestly make the
104
+ object read as the thing it is structural pieces, modular kits, repeated or
105
+ varied props, parameterized objects — or when the player asks for procedural,
106
+ parametric, or code-built work. It is a first-class lane, not a fallback, held
107
+ to the same bar as a generated GLB, and mixing it with generated GLBs in one
108
+ scene is the normal way to build a detailed world. An image alone still doesn't decide the route (ask the one
138
109
  route question when both honestly fit), and never use it for player bodies,
139
- rigged characters/creatures, or animation.
110
+ rigged characters/creatures, or animation. An OBJECT is this lane's unit; a
111
+ SPACE the player moves through — a level, an interior, a whole building — is
112
+ `$genex-blender-scene`'s, which falls back to this lane when the Blender lane
113
+ is off on the stand.
114
+
115
+ **That fallback claims the SPACE, never the things standing in it.** MEASURED
116
+ 2026-09-03: a village brief matched the space row, the Blender lane was off, and
117
+ the whole world — every house, the forge, the well, and five villagers — was
118
+ built as code with no Assets table written and not one generation run. Routing
119
+ the ground plan to this lane is not a decision about the forge the player walks
120
+ up to, the smith they talk to, or the props they pick up: those are their own
121
+ rows (`$genex-ai-model`, `$genex-ai-character`, `$genex-threejs-creatures`) and
122
+ they are still decided per object against the asset bar. A village's layout in
123
+ code with generated buildings and characters standing on it is the normal shape,
124
+ not a contradiction.
140
125
 
141
126
  - Prefer a supplied reference. A private attachment stays local unless the
142
127
  player explicitly permits upload, publication, or commit.