@genex-ai/cli-demo 1.3.0 → 1.4.0

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/dist/index.js CHANGED
@@ -991,18 +991,20 @@ var CONTRACT_END = "<!-- genex:contract:end -->";
991
991
  var GENEX_CONTRACT_BLOCK = `${CONTRACT_BEGIN}
992
992
  # Genex build contract (always in effect for this game)
993
993
 
994
- Your capabilities (all via \`npx genex \u2026\`): generate \`model\` \xB7 \`skybox\` \xB7 \`sfx\` \xB7 \`music\` \xB7 \`voice\` \xB7 \`texture\` \xB7 \`image\` (\`--edit\` \xB7 \`--inpaint\` \xB7 \`--glass\` \xB7 \`--clean\` \xB7 \`--upscale\`) \xB7 \`video\` \xB7 rigged \`character\` / \`creature\` \xB7 \`character animate <id> "<verb>"\` (also \`creature animate\`; \`--locomotion\` for the 8-way movement set, \`--video\` for your own footage) \xB7 the pixel toolbox \`ui extract|masks|plate|text-color|trim|audit\` \xB7 vendored \`controller character|car|drone|touch|quality|chat\` \xB7 \`animations search\` \xB7 \`wait <id>\` / \`wait --all\` \xB7 \`preview\` / \`publish\` \xB7 \`rename <name>\` (move the game to a new address \u2014 keeps its plays and likes, kills the old link, needs \`--yes\` once published, and the game must be rebuilt after). Full options: \`npx genex --help\`. Task\u2192lane routing lives in the \`genex-game-director\` skill's routing map \u2014 re-load it whenever you're unsure which lane owns a task.
994
+ Your agentic capabilities that can boost your creation (all via \`npx genex \u2026\`): generate \`model\` \xB7 \`skybox\` \xB7 \`sfx\` \xB7 \`music\` \xB7 \`voice\` \xB7 \`texture\` \xB7 \`image\` (\`--edit\` \xB7 \`--inpaint\` \xB7 \`--glass\` \xB7 \`--clean\` \xB7 \`--upscale\`) \xB7 \`video\` \xB7 rigged \`character\` / \`creature\` \xB7 \`character animate <id> "<verb>"\` (also \`creature animate\`; \`--locomotion\` for the 8-way movement set, \`--video\` for your own footage) \xB7 the pixel toolbox \`ui extract|masks|plate|text-color|trim|audit\` \xB7 vendored \`controller character|car|drone|touch|quality|chat\` \xB7 \`animations search\` \xB7 \`wait <id>\` / \`wait --all\` \xB7 \`preview\` / \`publish\` \xB7 \`rename <name>\` (move the game to a new address \u2014 keeps its plays and likes, kills the old link, needs \`--yes\` once published, and the game must be rebuilt after). Full options: \`npx genex --help\`. Task\u2192lane routing lives in the \`genex-game-director\` skill's routing map \u2014 re-load it whenever you're unsure which lane owns a task.
995
+
996
+ Important note: put soul into your creations, with many details and love. Aim to make them realistic and feel real. Use genex capabilities as an extension, but never limit your imagination \u2014 you are a powerful agent. Use your built-in sub-agents and iteration loops (\`/loop\` or your platform's equivalent) where you need them to reach outstanding results. Verify yourself. Anything you put in front of the player should already feel alive and impressive \u2014 never a bare scene waiting for "later". Build what's still missing before polishing what already works.
995
997
 
996
998
  1. Load the \`genex-game-director\` skill before starting the requested work. Route from the player's latest clear request: a focused request starts directly without replaying discovery or commissioning unrelated lanes. After ANY context compaction or session resume, re-read this file and \`DESIGN.md\`, re-load the skill for the stage you are executing, and continue from the Build plan's \`Now:\` line \u2014 never from memory alone.
997
999
  2. Ask only when one unresolved answer materially changes the work. If the request is clear, do not repeat an interview, confirm the pitch, force a concept round, or ask whole-game-vs-one-part again. For a genuinely broad new game, ask one decision: whole coordinated build or one request-relevant part first. If there is no clear request \u2014 a setup prompt pasted with nothing of their own \u2014 ask in PLAIN CHAT what they want to make, in their own words, and never fill the blank by pitching concepts. That opening question stays in chat on purpose: their reply carries the whole request, including anything they say about HOW you should work, and a menu of options answers a narrower question than the one they need to answer. Once you know what you are building, ask one decision at a time with your built-in question tool with clickable answer options when you have one; use a short plain-chat question otherwise. If the player stays silent after a necessary question, proceed on stated assumptions where reasonable and record each as "assumed \u2014 player didn't answer" in DESIGN.md \u2192 Decisions.
998
1000
  3. \`DESIGN.md\` at the project root is the durable design contract AND build plan. Keep three truths distinct: the player's requested outcome, the current \`Now:\` focus, and open commitments. It must carry a \`## Build plan & status\` section with the working mode (\`whole coordinated build\`, \`step by step\`, or \`focused change\`), numbered milestones with status marks, and a \`Now:\` line naming the current one \u2014 a milestone is done only when its work reached a preview. The latest clear request may replace \`Now:\` immediately; it never silently shrinks the requested outcome or deletes unrelated commitments. Keep every decision, assumption, generation id/URL, local output, and wiring state current. When the plan first lands, tell the player in one plain line that you recorded what they asked for in \`DESIGN.md\` and will keep it current.
999
- 4. ALL generated art, audio, video, characters, and UI come from \`genex\` commands \u2014 never from any other generation tool your platform bundles, unless the player explicitly asks for that tool by name. A local reference image is not a reason to switch tools: pass its file path to genex (\`--edit\` and \`--inpaint\` accept local paths). The same exclusivity covers shipping: building, previewing, and publishing go only through \`genex preview\` / \`genex publish\` \u2014 never load your platform's own site-building, hosting, or deploy skills for this game.
1000
- 5. Generated UI art is a tool you reach for, not a pipeline you owe. A restrained interface built in clean CSS is a finished, legitimate HUD \u2014 not a placeholder. Reach for the sprite lane (\`genex-ai-hud\`) when the game's own style genuinely wants drawn chrome \u2014 ornate, painterly, comic, hand-made \u2014 or when the player asks for HUD art. Generating ONE element you decided the game needs \u2014 a frame, a mask, an icon, a wordmark, a menu backdrop, a menu video \u2014 is a normal use of these tools, never a half-run pipeline. There is NO global game-concept image and no UI plan recited in chat: the art direction lives in the game's brief in words. A lane's own concept step survives only where the player is choosing a concrete thing (a character's candidates). Whatever you do generate, run its quality steps in full \u2014 extraction, masks, wiring, \`npx genex ui audit\`.
1001
- 6. Never draw a rectangular backing plate behind bars, digits, or icons \u2014 in sprites or CSS. Ornament lives on the widget's own silhouette; a truly needed shaped plate comes from \`npx genex ui plate\`.
1002
- 7. Fonts: the brief's display + body pair comes from the menu skill's genre table (or carries a one-line stated reason) and is LOADED for real in \`index.html\`.
1001
+ 4. Use \`genex\` commands to generate art, audio, video, characters, and UI. A local reference image is not a reason to switch tools: pass its file path to genex (\`--edit\` and \`--inpaint\` accept local paths). Don't limit yourself: add details, and mix generated assets with procedural generation to make scenes and games detailed and lively.
1002
+ 5. When shipping your game / project: building, previewing, and publishing go only through \`genex preview\` / \`genex publish\` \u2014 never load your platform's own site-building, hosting, or deploy skills for this game.
1003
+ 6. Generated UI art is a tool you reach for, not a pipeline you owe. A restrained interface built in clean CSS is a finished, legitimate HUD \u2014 not a placeholder. Reach for the sprite lane (\`genex-ai-hud\`) when the game's own style genuinely wants drawn chrome \u2014 ornate, painterly, comic, hand-made \u2014 or when the player asks for HUD art. Generating ONE element you decided the game needs \u2014 a frame, a mask, an icon, a wordmark, a menu backdrop, a menu video \u2014 is a normal use of these tools, never a half-run pipeline. There is NO global game-concept image and no UI plan recited in chat: the art direction lives in the game's brief in words. A lane's own concept step survives only where the player is choosing a concrete thing (a character's candidates). Whatever you do generate, run its quality steps in full \u2014 extraction, masks, wiring, \`npx genex ui audit\`.
1004
+ 7. Never draw a rectangular backing plate behind bars, digits, or icons \u2014 in sprites or CSS. Ornament lives on the widget's own silhouette; a truly needed shaped plate comes from \`npx genex ui plate\`.
1003
1005
  8. Never park ready work behind a question, and never stall on an unanswered one \u2014 decide, state the decision in chat, record it, keep building.
1004
1006
  9. Before any publish and before ending a session: run \`npx genex wait\` on every generation you enqueued and wire in what landed \u2014 never park landed assets. Fonts the brief names are LOADED for real, Escape pauses, the loader shows something of the game rather than a black screen, and the player wears the game's own generated character (or DESIGN.md records why it doesn't).
1005
- 10. The player's body is the game's own generated character (\`npx genex character "<look>"\` \u2192 \`npx genex controller character --character <id>\`), enqueued with your first art actions, not after them. It applies wherever a human body appears on screen \u2014 first-person included, the moment remotes, a look-down body, a shadow, or a menu portrait shows one. The profile VRM avatar is the FALLBACK: a temporary body while the character renders (say in one plain line that it's temporary), or the stand-in when generation genuinely could not happen \u2014 out of credits, failed, unverified; record which in DESIGN.md as \`Player character: VRM \u2014 <reason>\`. Games whose player is not a person (car, ship, RTS cursor, board) generate that object with \`npx genex model\` instead. Characters: Meshy/Mixamo/VRM rigs rest facing +Z. Set yaw explicitly when placing a rig; never mirror a SkinnedMesh with negative scale. In any two-character scene, verify in a capture that they face each other, not the camera.
1007
+ 10. The player's body is the game's own generated character (\`npx genex character "<look>"\` \u2192 \`npx genex controller character --character <id>\`), enqueued with your first art actions, not after them. It applies wherever a human body appears on screen \u2014 first-person included, the moment remotes, a look-down body, a shadow, or a menu portrait shows one. Games whose player is not a person (car, ship, RTS cursor, board) generate that object with \`npx genex model\` instead, or build it procedurally. Characters: Meshy/Mixamo/VRM rigs rest facing +Z. Set yaw explicitly when placing a rig; never mirror a SkinnedMesh with negative scale. In any two-character scene, verify in a capture that they face each other, not the camera.
1006
1008
  11. Verify by looking: one smoke check per milestone, after that milestone's preview push, in local test mode (\`?genex_local_test=1\`) with a real gameplay screenshot. A claim without a capture is not verification. Local-test evidence proves visuals and controls ONLY \u2014 label it that way when you show the player, and never work around the draft sign-in gate any other way.
1007
1009
  12. Treat every \`genex\` warning line \u2014 preflight, \`ui audit\`, \`wait\` nudges \u2014 as work, not noise.
1008
1010
  13. Every finished Build-plan milestone ends with \`npx genex preview\` and the player's page link (\`<dashboard>/draft/<slug>\`, with \`<dashboard>\` from \`.genex/project.json\`) \u2014 never a localhost link, a file path, or the bare play origin presented as their game. That page shows the build you just previewed; \`preview\` never disturbs the build players are on. When the player is happy with it, \`npx genex promote\` makes that exact build live for everyone \u2014 no rebuild. After every round of player feedback, end with a preview push. After the first release, the game is two versions and the player only ever hears these two words for them: the **draft** (their working copy, updated by \`preview\`) and the **public version** (what everyone plays). Command names are yours, not theirs \u2014 never say "promote" to the player; ask directly: "Want me to update the public version?", one line, once per round, and keep building while you wait \u2014 updating the public version is the ONE action that waits for an explicit yes, and more change requests instead of a yes mean "not yet". The player's "publish it" / "publish the update" / "update it" / "yes" after the first release ALL mean \`genex promote\` \u2014 never \`genex publish\` again, which would ship an untried rebuild. \`promote\` ships the last previewed build, so if anything was edited since the last \`preview\`, preview again before promoting.
@@ -1010,8 +1012,7 @@ Your capabilities (all via \`npx genex \u2026\`): generate \`model\` \xB7 \`skyb
1010
1012
  15. Talk to the player in plain game language \u2014 what changed in the game and what to try; never code, file names, build output, or tool internals unless they ask. Short status lines while you work; long silent stretches are a failure.
1011
1013
  16. Never add debug-only code to the game to check your own work \u2014 no hidden test modes, no special URL parameters, no forced-visible flags, no auth mocks, no pixel-sampling hooks. \`?genex_local_test=1\` is the platform's own supported mode and is fine; your own bypass is not. (The multiplayer skill's small build identifier, token-free status line, and connected-quorum watchdog are production supportability, not a bypass \u2014 keep those.)
1012
1014
  17. Input directions match their labels: A/\u2190 moves or turns the player screen-LEFT, D/\u2192 screen-RIGHT, mouse-up looks up, and drag-pan axes share ONE convention. The cursor is either the gameplay tool (RTS, card, builder) or locked away during play \u2014 keyboard-only games included. Check it in every milestone's smoke pass.
1013
- 18. v0 is a milestone, not the destination. When the ask was bigger than one loop, every milestone after v0 grows back toward the FULL ask with DESIGN.md's content lines as the checklist \u2014 a slice that previewed well never quietly becomes the game. Cosmetics never jump the queue past promised content.
1014
- 19. NEVER delete, empty, move, rename, or overwrite anything you did not create yourself. This folder may hold the player's own reference images, notes, sketches, or an earlier attempt \u2014 files that exist nowhere else and have no undo, no trash, no backup. A non-empty folder is normal and is NEVER something to clean up, and "start clean" is never a reason. That rules out \`rm\`/\`rm -rf\`, \`git clean\`, \`git checkout -- .\`, \`git reset --hard\` over their work, deleting to resolve a conflict or a stuck interactive prompt, and every setup tool's offer to empty a directory (\`--force\`, \`--overwrite\`, "Remove existing files") \u2014 scaffold into a fresh subfolder and copy in instead. You may add files and edit the ones you wrote. If a step genuinely cannot continue without removing something of theirs, STOP and ask, naming the exact files, and wait for a yes \u2014 "it looks like junk" is never that yes. This binds hardest during setup, where it runs fast and automatically before the player has asked for anything at all.
1015
+ 18. NEVER delete, empty, move, rename, or overwrite anything you did not create yourself. This folder may hold the player's own reference images, notes, sketches, or an earlier attempt \u2014 files that exist nowhere else and have no undo, no trash, no backup. A non-empty folder is normal and is NEVER something to clean up, and "start clean" is never a reason. That rules out \`rm\`/\`rm -rf\`, \`git clean\`, \`git checkout -- .\`, \`git reset --hard\` over their work, deleting to resolve a conflict or a stuck interactive prompt, and every setup tool's offer to empty a directory (\`--force\`, \`--overwrite\`, "Remove existing files") \u2014 scaffold into a fresh subfolder and copy in instead. You may add files and edit the ones you wrote. If a step genuinely cannot continue without removing something of theirs, STOP and ask, naming the exact files, and wait for a yes \u2014 "it looks like junk" is never that yes. This binds hardest during setup, where it runs fast and automatically before the player has asked for anything at all.
1015
1016
  ${CONTRACT_END}
1016
1017
  `;
1017
1018
  var CLAUDE_IMPORT_LINE = "@AGENTS.md";
@@ -1115,6 +1116,8 @@ async function hasGenexSkills(skillsDir) {
1115
1116
  }
1116
1117
  var REMOVED_SKILLS = [
1117
1118
  "genex-explore",
1119
+ "genex-threejs-procedural-materials",
1120
+ // folded into genex-threejs-procedural-assets (AG-881)
1118
1121
  "genex-threejs-skill-router",
1119
1122
  "genex-threejs-bloom",
1120
1123
  "genex-threejs-screen-space-ambient-occlusion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Set up your project's agent workspace (.claude/.codex/.cursor in the game folder), authorize, create a game project, generate AI assets, and publish (genex CLI).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -80,12 +80,16 @@ pick the result up at the next natural pause with `genex wait --all`. Watching
80
80
  a character render in 30-second poll chunks stalls the whole build and is the
81
81
  single fastest way to make the player ask why nothing else is happening.
82
82
 
83
- Generate concept images first and show the actual images to the user. Do not
84
- start Image-to-3D until the user explicitly selects a candidate.
83
+ Generate concept images first and show the actual images to the user. In the
84
+ default player-body lane, pick the strongest candidate yourself, say which
85
+ and why in chat, record it in DESIGN.md, and proceed — the player can switch
86
+ by saying so. When the player explicitly requested a custom character, do not
87
+ start Image-to-3D until they explicitly select a candidate.
85
88
 
86
- Open or link all three real candidate images, then wait for the user's choice.
87
- Do not treat a text description, task ID, filename, or your own preference as
88
- approval. Continue with the selected candidate only:
89
+ Open or link all three real candidate images either way the player sees
90
+ what you chose from. In the custom lane, do not treat a text description,
91
+ task ID, filename, or your own preference as the player's choice. Continue
92
+ with the carried candidate:
89
93
 
90
94
  The candidate images are permanent and already paid for. Reuse them as game art
91
95
  instead of generating new pictures of the same character: a character-select or
@@ -98,15 +102,18 @@ npx genex character preview <concept-id> --candidate <1|2|3> --user-approved
98
102
  ```
99
103
 
100
104
  Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
101
- front, back, left, and right views and report its measured face count. Preserve
102
- that model in R2. Before rigging, ask the user to approve a separate
103
- 10,000-face triangle remesh. The 10k remesh—not the high-detail source—is
104
- rigged and animated. (For these approvals, use your question tool when you
105
- have one; if you have none, a short numbered list in chat.)
105
+ front, back, left, and right views and report its measured face count.
106
+ Preserve that model in R2. The 10,000-face triangle remesh—not the
107
+ high-detail source—is rigged and animated. In the default lane, proceed to
108
+ the remesh directly; when the player explicitly requested a custom character,
109
+ ask for their explicit approval first. (For the custom lane's approvals, use
110
+ your question tool when you have one; if you have none, a short numbered list
111
+ in chat.)
106
112
 
107
113
  The high-detail pre-rig generation stays in the selected neutral A-pose. There
108
- is no dynamic-pose concept and no silent T-pose fallback. After the user has
109
- seen the four views and face count, wait for explicit approval and finalize:
114
+ is no dynamic-pose concept and no silent T-pose fallback. Show the four views
115
+ and face count in chat either way, then finalize in the custom lane, only
116
+ after the player's explicit approval:
110
117
 
111
118
  ```bash
112
119
  npx genex character finalize <preview-id> \
@@ -145,9 +152,12 @@ npx genex wait <generation-id>
145
152
  `--no-controller-pack` is available only with the explicit `--direct-text`
146
153
  compatibility path. The guided parity workflow always installs neutral-v3.
147
154
  `--no-wait` returns a generation id for `genex wait`; it does not create a
148
- second paid request. Never add `--user-approved` until the user has actually
149
- seen and selected the candidate; never add `--approve-remesh 10000` until they
150
- have actually seen the four high-detail views and measured face count.
155
+ second paid request. In the default lane, `--user-approved` and
156
+ `--approve-remesh 10000` record the pick you made and announced after showing
157
+ the real images. When the player explicitly requested a custom character,
158
+ never add `--user-approved` until they have actually seen and selected the
159
+ candidate, and never add `--approve-remesh 10000` until they have seen the
160
+ four high-detail views and measured face count.
151
161
 
152
162
  Before handoff, capture idle, walk, run, crouch-idle, crouch-move, and jump.
153
163
  Inspect shoulders, elbows, wrists, and hands as well as the feet. Reject
@@ -2,7 +2,7 @@
2
2
 
3
3
  `npx genex character animate <character-id> "<verb>"` — one clip per verb, on
4
4
  this character's own rig. Read this before the first run; it is short, and the
5
- first two sections are where the credits go.
5
+ first two sections are where the quality is decided.
6
6
 
7
7
  ```bash
8
8
  npx genex character animate <id> "overhead slam" --no-wait
@@ -43,7 +43,7 @@ Three things make a verb generate well:
43
43
 
44
44
  ## What this cannot do
45
45
 
46
- Do not spend on these — pick a different approach instead:
46
+ These will not come back usable — pick a different approach instead:
47
47
 
48
48
  - **Fingers and fine manipulation** — picking a lock, typing, a trigger squeeze,
49
49
  threading a needle. Generated rigs have no finger bones, so the hand simply
@@ -629,13 +629,12 @@ subagent stalls or misses its window, wire what landed and say plainly which
629
629
  widgets are still waiting on their sprites — never present unfinished art as
630
630
  the finished look.
631
631
 
632
- ## Cost & latency honesty
632
+ ## Latency honesty
633
633
 
634
634
  A full sprite HUD is **~9 image generations** (mockup + deconstruct + clean +
635
635
  a few sprite re-rolls), a couple of minutes each at high quality — budget an
636
- hour end to end, not five minutes. A single element is a fraction of that:
637
- one generation plus free local steps. That fits comfortably inside the image
638
- rate limit; local `genex ui` steps are free and instant. One rule keeps the
636
+ hour end to end, not five minutes. A single element is one generation plus
637
+ local `genex ui` steps, which are free and instant. One rule keeps the
639
638
  clock honest: when the lane runs, it runs WHILE you build — enqueue with
640
639
  `--no-wait`, code the layout against plain CSS bars, swap sprites in as
641
640
  stages land, and never sit in a foreground wait.
@@ -657,8 +656,8 @@ stages land, and never sit in a foreground wait.
657
656
  - `npx genex image` — `--size <WxH>` exact pixels (multiples of 16, each side
658
657
  ≤ 3840, aspect at most 3:1); `--quality <low|medium|high>` (high for the
659
658
  mockup/sheet, medium for single sprites); `--candidates <2|3|4>` several
660
- variants in ONE call (only when the player asks for variants — one mockup
661
- is the default); `--edit <url|file>` image-to-image edit of an
659
+ variants in ONE call (one mockup is the default; use candidates when the
660
+ player asks for variants or you genuinely want options to judge); `--edit <url|file>` image-to-image edit of an
662
661
  R2 URL or a local image file (≤4 MB, inlined); `--clean <url>`
663
662
  background removal only; `--remove-bg` chains removal after a
664
663
  generation/edit; `--bg-mode <sprite|glyph|sheet>` picks the removal model
@@ -2,7 +2,8 @@
2
2
 
3
3
  Fill the placeholders, then pass the whole text as the prompt to
4
4
  `npx genex image "<filled prompt>" --size 2560x1440 --quality high`.
5
- ONE mockup no candidate variants unless the player asks for them. Every
5
+ One mockup is the default; generate candidate variants when the player asks
6
+ for them or you genuinely want options to judge. Every
6
7
  sprite the HUD ships is cut out of this frame, so the scene half deserves the
7
8
  same care as the HUD half: a HUD read against a flat grey plate looks nothing
8
9
  like the same HUD read against the game.
@@ -14,8 +14,8 @@ art on an in-game screen, or a decal/sticker.
14
14
  - **Use `npx genex image`** for a specific, recognizable picture you can describe —
15
15
  "vintage travel poster of Mars", "guild crest with crossed swords", "arcade
16
16
  marquee art". You get a real image.
17
- - **Use `$genex-threejs-procedural-materials`** for stylized/abstract or fully
18
- parametric surfaces authored in shaders. Use `$genex-ai-texture` for a *tiling*
17
+ - **Use `$genex-threejs-procedural-assets`** for stylized/abstract or fully
18
+ parametric surfaces authored in shaders (its procedural-materials section). Use `$genex-ai-texture` for a *tiling*
19
19
  PBR surface (floors, ground, walls) — this skill is for a single flat picture.
20
20
 
21
21
  ## Run
@@ -185,7 +185,7 @@ panel covering the video, or a video that never plays — only watching can.
185
185
 
186
186
  **Work async — the menu must never block the game.** The still is prompted
187
187
  from the brief, so it can go out the moment you know the look: enqueue it
188
- `--no-wait` and keep building. **The video is the slow, expensive item** —
188
+ `--no-wait` and keep building. **The video is the slow item** —
189
189
  generate it once you've decided the menu wants motion, or the player asks for
190
190
  it, and never while a style objection is open ("change the colors" waits
191
191
  until the look settles, or you pay for the loop twice). Ship the CSS menu
@@ -207,7 +207,8 @@ thin, low-opacity scrim strictly behind the button rail for legibility, and
207
207
  at most ONE subtle full-screen grade layer. NEVER a card/panel covering the
208
208
  art.
209
209
 
210
- **Two failed video attempts = ship the still. Hard stop.** Video is the one
210
+ **Two failed video attempts = ship the still and move on** (keep trying only
211
+ if the player asks). Video is the one
211
212
  generation that fails server-side with real frequency (render timeouts), and
212
213
  every attempt costs minutes of waiting. One retry is fair — shorten the clip
213
214
  (4–6 s) and simplify the motion prompt. After a SECOND failure, stop
@@ -11,9 +11,11 @@ Turn a text prompt into a real, game-ready **GLB** and drop it into the project.
11
11
 
12
12
  - **Use `npx genex model`** for a specific, recognizable object — a barrel, a chair, a
13
13
  sword, a spaceship, an animal. You get a real textured mesh.
14
- - **Use `$genex-threejs-procedural-assets`** for a reference-driven or
15
- explicitly parametric object you want to generate as editable code
16
- (controlled variations, no GLB file).
14
+ - **Use `$genex-threejs-procedural-assets`** when code is the more efficient
15
+ engine: structures and buildings, modular kits, and anything placed many
16
+ times with variation (editable, seeded, no GLB file). Mixing both in one
17
+ scene is the normal way to build a detailed world — generated hero pieces
18
+ over procedural dressing.
17
19
 
18
20
  **The output is a STATIC, unrigged mesh — no skeleton, no animation clips.**
19
21
  A "wolf" or "guard" from this command can be posed and moved as one object,
@@ -13,9 +13,9 @@ material on a primitive, a mesh, or terrain.
13
13
  - **Use `npx genex texture`** for a specific photoreal surface you can describe —
14
14
  "weathered Roman cobblestone", "cracked desert clay", "oak planks". You get a
15
15
  real raster image.
16
- - **Use `$genex-threejs-procedural-materials`** for stylized/abstract or
16
+ - **Use `$genex-threejs-procedural-assets`** for stylized/abstract or
17
17
  fully-parametric materials authored in shaders (instant, perfectly tiling, no
18
- files). The two are complementary.
18
+ files — its procedural-materials section). The two are complementary.
19
19
 
20
20
  ## Run
21
21
 
@@ -61,13 +61,12 @@ Pick ONE voice per character and stay with it — a guard who changes voice
61
61
  between barks breaks the character. The model is multilingual: text in the
62
62
  game's language comes back spoken in that language.
63
63
 
64
- ## Cost honesty
64
+ ## Limits
65
65
 
66
- Voice is billed **per character of the submitted text**, hard-capped at
67
- **1000 characters** per line (longer text is clamped, and the clamp is what
68
- bills). A one-sentence bark costs a fraction of a credit-priced generation
69
- but 30 speculative barks are 30 paid calls. Write the script first, generate
70
- once per line, and reuse lines (the same "Halt!" serves every guard).
66
+ Each line is hard-capped at **1000 characters** (longer text is clamped).
67
+ Write the script before you generate so every line is one you'll ship, and
68
+ reuse a line where reuse serves the game (the same "Halt!" can serve every
69
+ guard) or generate variety where variety is what the scene needs.
71
70
 
72
71
  ## Wire it in Three.js
73
72
 
@@ -126,8 +126,9 @@ Genex asset and runtime lanes are:
126
126
  `$genex-threejs-vehicle-controllers`
127
127
  - phone input and phone-survivable rendering →
128
128
  `$genex-threejs-touch-controls`, `$genex-threejs-adaptive-quality`
129
- - editable, parameterized reference objects or simple environment pieces
130
- `$genex-threejs-procedural-assets`
129
+ - structures, buildings, modular kits, repeated or varied environment pieces,
130
+ and parameterized objects — code is often the more efficient engine for
131
+ these → `$genex-threejs-procedural-assets`
131
132
 
132
133
  For “make this image 3D,” ask **one** route question only when both results
133
134
  honestly fit: a generated static GLB, or editable parameterized Three.js code.
@@ -142,11 +143,16 @@ supplied and creating one is part of the requested work, use the existing
142
143
  `npx genex image` lane unchanged and record that paid reference as its own
143
144
  Assets row.
144
145
 
145
- Plan and generate only assets the current request earns. In a whole coordinated
146
- game build, derive the set from the requested outcome and commitments; in
147
- focused work, do not create a default “core set” outside the touched scope.
148
- Run independent planned generations with `--no-wait`, scaffold while they
149
- land, and preserve their IDs, URLs, and wiring state.
146
+ The request sets the floor for the asset plan, never the ceiling: a world
147
+ should feel dressed and alive, so plan the detail its genre implies and pick
148
+ the more efficient engine per object. Paid generation buys hero pieces (the
149
+ player's character, key props, the skybox, music); procedural code is the
150
+ unlimited detail engine for structures, buildings, modular kits, and repeated
151
+ or varied dressing (`$genex-threejs-procedural-assets` owns that lane). Mixing
152
+ both in one scene is the normal way to build, never a fallback. In focused
153
+ work, stay inside the touched scope. Run independent planned generations with
154
+ `--no-wait`, scaffold while they land, and preserve their IDs, URLs, and
155
+ wiring state.
150
156
 
151
157
  ## 5. Execute by working mode
152
158
 
@@ -292,21 +298,18 @@ runs, or the stand-in when generation genuinely could not happen, recorded as
292
298
  a shipped human body. In multiplayer, every remote wears the generated game
293
299
  character when one exists.
294
300
 
295
- **The default lane has one user stop: the character concept review.** When the
296
- user names a visual reference, inspect references before writing the concept
297
- prompt. Generate exactly three concepts, all neutral A-pose; never use a
298
- dynamic concept pose or silently fall back to T-pose. Warn that held, slung,
299
- or overlapping props and straps can fuse into the body or obscure limbs, and
300
- recommend separate gameplay props. Show the actual images and wait for the
301
- player to explicitly select a candidate. Their pick carries the lane:
301
+ **The default lane has no user stop.** When the user names a visual
302
+ reference, inspect references before writing the concept prompt. Generate
303
+ exactly three concepts, all neutral A-pose; never use a dynamic concept pose
304
+ or silently fall back to T-pose. Warn that held, slung, or overlapping props
305
+ and straps can fuse into the body or obscure limbs, and recommend separate
306
+ gameplay props. Show the actual images, pick the strongest candidate
307
+ yourself, say which and why in chat, record the pick in `DESIGN.md`, and
308
+ proceed — the player can switch by saying so, and their word always outranks
309
+ your pick. The announced pick carries the lane:
302
310
 
303
311
  `npx genex character preview <concept-id> --candidate <1|2|3> --user-approved`
304
312
 
305
- If the player has not picked by the time the character blocks progress (or
306
- ~10 minutes), use the existing owner-ratified platform policy (2026-07-23):
307
- pick the strongest candidate, say which and why in chat, proceed, and record
308
- the decision in `DESIGN.md`.
309
-
310
313
  Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
311
314
  front, back, left, and right views and report its measured face count.
312
315
  Preserve that model in R2. The 10,000-face triangle remesh—not the high-detail
@@ -316,8 +319,8 @@ remesh:
316
319
  `npx genex character finalize <preview-id> --user-approved --approve-remesh 10000 [--animation <action-id>…]`
317
320
 
318
321
  When the player explicitly requested a custom character, keep the existing
319
- two stops: wait for candidate selection before Image-to-3D, then wait for
320
- explicit remesh approval before finalize. The `--direct-text` legacy path is
322
+ two stops: wait for their explicit candidate selection before Image-to-3D,
323
+ then wait for their explicit approval of the remesh before finalize. The `--direct-text` legacy path is
321
324
  not a substitute.
322
325
 
323
326
  Load `$genex-ai-character`, search actions with
@@ -47,7 +47,7 @@ copy demo architecture.
47
47
  | anything falls, collides, gets pushed, or needs colliders/events | `$genex-threejs-physics-rapier` |
48
48
  | launch/docking timelines, authored transform phases, springs, convergence, deterministic prop/debris motion | `$genex-threejs-procedural-animation` |
49
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
- | procedural/PBR material boundary, authored frame PBR, and the retained material craft | `$genex-threejs-procedural-materials` |
50
+ | stylized/abstract shader-authored materials, the procedural/PBR material boundary | `$genex-threejs-procedural-assets` |
51
51
  | particles, trails, plasma, shockwaves, pooled bursts, and event effects | `$genex-threejs-procedural-vfx` |
52
52
  | stable large-world shadows, cascades, clipmaps, cached updates | `$genex-threejs-shadow-systems` |
53
53
  | eye adaptation, tone mapping, output color, LUT grading, and proven static grain | `$genex-threejs-exposure-color-grading` |
@@ -125,12 +125,16 @@ Open commitments prevent a false “the full requested game is complete” claim
125
125
  They do not block an explicit preview or publish request: run the protected
126
126
  flow and state what remains.
127
127
 
128
- ## Reference-driven procedural assets
128
+ ## Procedural assets (code-built)
129
129
 
130
- Use `$genex-threejs-procedural-assets` only for explicitly requested editable,
131
- parameterized code-built objects or simple environment pieces. Do not trigger
132
- it merely because an image exists, and never use it for player bodies, rigged
133
- characters/creatures, or animation.
130
+ Use `$genex-threejs-procedural-assets` whenever code is the more efficient
131
+ engine for an object structures, buildings, modular kits, repeated or varied
132
+ props, parameterized objects or when the player asks for procedural,
133
+ parametric, or code-built work. It is a first-class lane, not a fallback, and
134
+ mixing it with generated GLBs in one scene is the normal way to build a
135
+ detailed world. An image alone still doesn't decide the route (ask the one
136
+ route question when both honestly fit), and never use it for player bodies,
137
+ rigged characters/creatures, or animation.
134
138
 
135
139
  - Prefer a supplied reference. A private attachment stays local unless the
136
140
  player explicitly permits upload, publication, or commit.
@@ -66,10 +66,12 @@ Before generating a Meshy character, discuss two or three visual directions.
66
66
  When the user names a visual reference, inspect references before writing the
67
67
  concept prompt. Recommend a neutral A-pose for characters that will be rigged.
68
68
 
69
- Generate concept images first and show the actual images to the user. Do not
70
- start Image-to-3D until the user explicitly selects a candidate. All three
71
- concepts and the selected high-detail pre-rig generation stay in a neutral
72
- A-pose; never use a dynamic concept pose or silently substitute a T-pose. Warn
69
+ Generate concept images first and show the actual images to the user. In the
70
+ default player-body lane, pick the strongest candidate yourself, say which
71
+ and why in chat, and proceed; when the player explicitly requested a custom
72
+ character, do not start Image-to-3D until they explicitly select a candidate.
73
+ All three concepts and the selected high-detail pre-rig generation stay in a
74
+ neutral A-pose; never use a dynamic concept pose or silently substitute a T-pose. Warn
73
75
  that held, slung, or overlapping props and straps can fuse into the body or
74
76
  obscure limbs, and recommend separate gameplay props.
75
77
 
@@ -83,10 +85,11 @@ npx genex controller character --character <character-id>
83
85
 
84
86
  Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
85
87
  front, back, left, and right views and report its measured face count. Preserve
86
- that model in R2. Before rigging, ask the user to approve a separate
87
- 10,000-face triangle remesh. The 10k remesh—not the high-detail source—is
88
- rigged and animated. (For these approvals, use your question tool when you
89
- have one; if you have none, a short numbered list in chat.)
88
+ that model in R2. The 10,000-face triangle remesh—not the high-detail
89
+ source—is rigged and animated. In the default lane proceed to it directly;
90
+ for a player-requested custom character, ask for their explicit approval
91
+ first (question tool when you have one; a short numbered list in chat
92
+ otherwise).
90
93
 
91
94
  The generated character is a **same-rig Meshy-native lane**. Its animation-only
92
95
  GLBs are accepted only when their skeleton signature matches the active
@@ -385,8 +385,8 @@ Order the HUD by what the player loses the game for ignoring:
385
385
  grade instead — see `$genex-threejs-exposure-color-grading` for why per-frame
386
386
  `vUv` grain shimmers.
387
387
  - **Desktop first.** Verify at desktop sizes and survive window resizes
388
- without clipping; don't design phone layouts or test mobile viewports unless
389
- the user asks. Two exceptions ship by default precisely BECAUSE you don't
388
+ without clipping; dedicated phone layouts and mobile-viewport testing are
389
+ only needed when the user asks. Two exceptions ship by default precisely BECAUSE you don't
390
390
  test on phones: touch *input* when a recipe fits — a bundled controller's
391
391
  built-in touch controls, or the touch kit + recipes in
392
392
  `$genex-threejs-touch-controls` — behind `navigator.maxTouchPoints > 0`,
@@ -1,17 +1,23 @@
1
1
  ---
2
2
  name: genex-threejs-procedural-assets
3
- description: Build editable, parameterized Three.js props from reference images or explicit procedural requests. Use when the user asks for a procedural, parametric, code-built, customizable, seeded, or variation-ready prop, hard-surface object, modular decoration, or simple structure. Do not trigger merely because an image exists.
3
+ description: Build editable, parameterized Three.js objects in code structures, buildings, modular kits, repeated or varied props whenever code is the more efficient engine for them, or the user asks for procedural/parametric work. A first-class lane alongside generated GLBs; mix both freely.
4
4
  ---
5
5
 
6
6
  # Genex Three.js Procedural Assets
7
7
 
8
- Build a recognizable asset as local, editable Three.js code when code is the
9
- requested product—not as a fallback for every object.
8
+ Build a recognizable asset as local, editable Three.js code. This lane is a
9
+ first-class engine, not a fallback: for structures, buildings, modular kits,
10
+ and anything placed many times with variation, code is often more efficient
11
+ than a generated GLB — and mixing procedural pieces with generated hero
12
+ pieces in the same scene is the normal way to build a detailed, lively world.
10
13
 
11
14
  ## Choose the route
12
15
 
13
16
  - Start directly when the user says procedural, parametric, code-built,
14
17
  customizable, seeded, or asks for controlled variations.
18
+ - Also start directly when code is plainly the efficient route: buildings and
19
+ structures, modular environment kits, fences, pipes, rails, and anything
20
+ placed many times with variation.
15
21
  - An attached or available image does not activate this skill by itself.
16
22
  - If “make this image 3D” could honestly mean either route, ask exactly one
17
23
  question: **“Do you want a generated textured GLB, or editable procedural
@@ -88,14 +94,67 @@ collider description only when gameplay needs collision, and let the game's
88
94
  existing physics owner create the real collider. Add destruction groups only
89
95
  for a destructible asset. A static decoration needs none of this ceremony.
90
96
 
97
+ ## Measured craft (from shipping real code-built assets)
98
+
99
+ These were learned by rendering, measuring, and being wrong — every check can
100
+ pass and the object can still read wrong. The fixes:
101
+
102
+ - **Look at it from every side before calling it done.** Render front,
103
+ three-quarter, side, rear, and below when the underside can be seen. The
104
+ defects that survive a clean build are visual: an invisible part, a slatted
105
+ surface that reads solid, a gap down a seam, a base that floats above y = 0.
106
+ - **Metalness 1.0 renders black in any scene without an environment map** — a
107
+ fully metallic surface has no diffuse term. Use ~0.4–0.55 with a brighter
108
+ base color; the metal read comes from roughness variation and the normal
109
+ detail anyway. Judge the material on the side the key light does NOT reach:
110
+ a surface lit only by fill shows you the fill's color, which is how bare
111
+ aluminium once shipped reading as blue-painted steel.
112
+ - **A mirrored basis is not something to eyeball.** Swapping two orthogonal
113
+ axes is always a reflection; flip a third to get back to a rotation. A
114
+ mirrored part renders fine and is silently inside-out — define named
115
+ right-handed bases as constants and reuse them.
116
+ - **Vertex colors multiply.** For wear that reveals a different substrate, put
117
+ the hue in the color buffer and leave `material.color` white — multiplying a
118
+ saturated red can never reach grey.
119
+ - **Where two sub-assemblies meet, terminate one inside the other's wall
120
+ thickness** (clearance math at the widest point, including any bow) —
121
+ butting them leaves a visible reveal from some angle.
122
+ - **Merging beats instancing for small repeats.** Merge everything static that
123
+ shares a material into one buffer and instance only genuine crowds — eight
124
+ moulded ribs cost a whole extra draw call as an `InstancedMesh` and nothing
125
+ at all merged.
126
+ - **Normal-map strength is measured, never reasoned.** The response is steeply
127
+ non-linear, so bisect toward the look (a moulded matte surface reads right
128
+ around a ~9° average tilt; a faceted one around ~22°), and re-check whenever
129
+ the noise frequency changes — a frequency-only edit once moved the required
130
+ strength 60%.
131
+
132
+ ## Procedural materials (shader-authored surfaces)
133
+
134
+ This lane also owns stylized, abstract, or fully-parametric materials authored
135
+ in shaders (instant, perfectly tiling, no files) — for a specific photoreal
136
+ surface you can describe in words, `npx genex texture` is usually the better
137
+ engine, and mixing the two on one asset is normal. One principle: color,
138
+ roughness, metalness, normal, and emission should all describe the SAME
139
+ surface and its causes — never unrelated noise per channel. The failure modes
140
+ worth checking before calling a material done:
141
+
142
+ - every PBR channel samples independent noise;
143
+ - roughness is a scalar afterthought;
144
+ - high-frequency normal detail survives below one pixel (shimmer — filter it
145
+ out with distance);
146
+ - triplanar projection shows orientation or scale seams;
147
+ - post-processing is being used to hide unstable highlights.
148
+
91
149
  ## Respect existing owners
92
150
 
93
151
  Consume the game's existing Three.js scene and runtime. Never replace or
94
152
  silently configure its renderer, camera, lighting, shadows, post-processing,
95
153
  physics, animation, adaptive-quality, or mobile systems. If the request grows
96
154
  from one asset into a general mesh library, building grammar, or world
97
- generator, pause and confirm that expanded deliverable instead of turning this
98
- skill into a catch-all runtime.
155
+ generator, say so in one plain line and keep building that growth is often
156
+ exactly what a detailed world needs; just don't silently rebuild the game's
157
+ runtime systems around it.
99
158
 
100
159
  Do not replace `$genex-ai-model`, the character or creature lanes, rigging,
101
160
  animation, or any protected platform pipeline.
@@ -32,9 +32,10 @@ Three answers, all legitimate, one forbidden:
32
32
  world does not react is not a style choice, it's an unfinished list.
33
33
 
34
34
  Then check the inverse, because the failure runs both ways: **an effect on a
35
- moment the player didn't cause and can't read is noise.** Ambient particles are
36
- the usual offender — they sell mood, not information. Budget **one** ambient
37
- layer for the whole scene, and only if the scene is visibly dead at rest.
35
+ moment the player didn't cause and can't read is noise.** Ambient particles
36
+ sell mood, not information add them deliberately (one layer is usually
37
+ enough) and keep them subordinate to the readable moment effects, so
38
+ atmosphere never drowns out what the player must see.
38
39
 
39
40
  **Shape is part of this gate.** For a moment made of energy — fire, a blast, a
40
41
  shockwave — the question is never "what texture goes on this box?" It is "what
@@ -24,24 +24,29 @@ Before generating a Meshy character, discuss two or three visual directions.
24
24
  When the user names a visual reference, inspect references before writing the
25
25
  concept prompt. Recommend a neutral A-pose for characters that will be rigged.
26
26
 
27
- Generate concept images first and show the actual images to the user. Do not
28
- start Image-to-3D until the user explicitly selects a candidate. Validation
29
- must show all three actual concept images, confirm that every candidate uses a
30
- neutral A-pose, and preserve the user's explicit candidate selection. A task
27
+ Generate concept images first and show the actual images to the user. In the
28
+ default lane the agent picks the strongest candidate and announces it; when
29
+ the player explicitly requested a custom character, do not start Image-to-3D
30
+ until they explicitly select a candidate. Validation must show all three
31
+ actual concept images, confirm that every candidate uses a neutral A-pose,
32
+ and preserve the recorded choice — the agent's announced pick in the default
33
+ lane, the player's explicit candidate selection in the custom lane. A task
31
34
  ID, filename, or agent summary is not visual evidence. Dynamic concept poses
32
35
  and silent T-pose fallbacks fail this checkpoint. Warn when held, slung, or
33
36
  overlapping props or straps can fuse into the character or hide a limb.
34
37
 
35
38
  Meshy Image-to-3D first produces an unremeshed high-detail model. Show its
36
39
  front, back, left, and right views and report its measured face count. Preserve
37
- that model in R2. Before rigging, ask the user to approve a separate
38
- 10,000-face triangle remesh. The 10k remesh—not the high-detail source—is
39
- rigged and animated. (For these approvals, use your question tool when you
40
- have one; if you have none, a short numbered list in chat.)
40
+ that model in R2. The 10,000-face triangle remesh—not the high-detail
41
+ source—is rigged and animated. In the default lane the remesh proceeds
42
+ directly; for a player-requested custom character, wait for their explicit
43
+ approval first (question tool when you have one; a short numbered list in
44
+ chat otherwise).
41
45
 
42
46
  The selected high-detail model remains in a neutral A-pose before animation.
43
- Record evidence that the user saw its four views and face count before
44
- `--approve-remesh 10000` was used. Historical Meshy characters remain valid;
47
+ Record evidence that the four views and face count were shown in chat before
48
+ `--approve-remesh 10000` was used and, in the custom lane, that the player
49
+ approved. Historical Meshy characters remain valid;
45
50
  do not demand a silent regeneration or upgrade.
46
51
 
47
52
  Meshy limb rotations play unchanged. Never freeze hand tracks or apply
@@ -51,7 +56,7 @@ translation may be normalized for Rapier.
51
56
  ## Interaction smoke check (the game fast path)
52
57
 
53
58
  For plain game tasks — nothing from the procedural/visual-system pack loaded —
54
- this is the whole acceptance gate, and it is also the *ceiling*: a smoke check,
59
+ this is the whole acceptance gate: a smoke check,
55
60
  not a certification. Run it ONCE per milestone, against that milestone's
56
61
  `genex preview` build. That build is on the preview URL, not the one players
57
62
  are on, so checking it disturbs nobody. Catch obvious
@@ -1,48 +0,0 @@
1
- ---
2
- name: genex-threejs-procedural-materials
3
- description: Author production procedural materials for Genex Three.js games. Use for PBR identity, terrain materials, atlas filtering, specular anti-aliasing, wetness, lava and hot emissive surfaces, raymarched material fields, biome surfaces, dissolves, procedural normals, roughness variation, and readable materials across gameplay distances.
4
- ---
5
-
6
- # Genex Three.js Procedural Materials
7
-
8
- Build a material from surface identity and causes. Color, roughness, metalness, normal, transmission, and emission should describe the same surface—not unrelated noise textures.
9
-
10
- ## Material graph order
11
-
12
- ```text
13
- stable coordinates
14
- → structural fields
15
- → material identity weights
16
- → causal modifiers
17
- → filtered microstructure
18
- → PBR channels
19
- → lighting/shadow extensions
20
- ```
21
-
22
- ## Required controls
23
-
24
- - real or perceptual texture scale;
25
- - material identity weights;
26
- - roughness range and micro-normal strength;
27
- - the causal fields required by the selected material pattern;
28
- - distance/derivative filtering;
29
- - specular antialiasing;
30
- - channel and mask debug modes;
31
- - emissive-material debug modes when the material owns glow or volumetric
32
- accumulation.
33
-
34
- ## Failure conditions
35
-
36
- - every PBR channel samples independent noise;
37
- - roughness is a scalar afterthought;
38
- - high-frequency normals survive below one pixel;
39
- - triplanar projection has visible orientation or scale seams;
40
- - atlas padding is ignored under mipmapping;
41
- - custom lighting removes energy conservation without an explicit stylized goal;
42
- - post-processing is used to hide unstable highlights.
43
-
44
- ## Routing boundary
45
-
46
- Keep shared scalar/vector causes and complete world or planetary bodies in the
47
- request's owning implementation. This skill owns the material response, not a
48
- general field library or world generator.