@bitmagic/cli 0.1.65-dev.19 → 0.1.65-dev.2

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 (62) hide show
  1. package/README.md +13 -127
  2. package/dist/assets/materials.d.ts +0 -9
  3. package/dist/assets/materials.js +2 -10
  4. package/dist/assets/materials.js.map +1 -1
  5. package/dist/cli.d.ts +0 -9
  6. package/dist/cli.js +0 -2
  7. package/dist/cli.js.map +1 -1
  8. package/dist/commands/forge.d.ts +0 -15
  9. package/dist/commands/forge.js +38 -143
  10. package/dist/commands/forge.js.map +1 -1
  11. package/dist/commands/generate.d.ts +13 -31
  12. package/dist/commands/generate.js +56 -48
  13. package/dist/commands/generate.js.map +1 -1
  14. package/dist/commands/trailer.js +1 -1
  15. package/dist/commands/trailer.js.map +1 -1
  16. package/dist/editor/asset-viewer.js +8 -31
  17. package/dist/editor/asset-viewer.js.map +1 -1
  18. package/dist/forge/run-pipeline.js +1 -5
  19. package/dist/forge/run-pipeline.js.map +1 -1
  20. package/dist/forge/stream.d.ts +1 -5
  21. package/dist/forge/stream.js +0 -4
  22. package/dist/forge/stream.js.map +1 -1
  23. package/dist/mobile/asset-hosts.d.ts +9 -7
  24. package/dist/mobile/asset-hosts.js +16 -7
  25. package/dist/mobile/asset-hosts.js.map +1 -1
  26. package/dist/scaffold/blender-level-skill-files.js +2 -3
  27. package/dist/scaffold/blender-level-skill-files.js.map +1 -1
  28. package/dist/scaffold/project-files.js +12 -16
  29. package/dist/scaffold/project-files.js.map +1 -1
  30. package/dist/scaffold/project.js +1 -4
  31. package/dist/scaffold/project.js.map +1 -1
  32. package/dist/scaffold/skill-files.d.ts +5 -32
  33. package/dist/scaffold/skill-files.js +63 -102
  34. package/dist/scaffold/skill-files.js.map +1 -1
  35. package/dist/telemetry/creator-prompt.d.ts +2 -18
  36. package/dist/telemetry/creator-prompt.js +3 -24
  37. package/dist/telemetry/creator-prompt.js.map +1 -1
  38. package/dist/telemetry/report.js +16 -31
  39. package/dist/telemetry/report.js.map +1 -1
  40. package/package.json +4 -4
  41. package/assets/skills/trailer-craft.md +0 -180
  42. package/dist/commands/character.d.ts +0 -18
  43. package/dist/commands/character.js +0 -268
  44. package/dist/commands/character.js.map +0 -1
  45. package/dist/forge/edit-target.d.ts +0 -30
  46. package/dist/forge/edit-target.js +0 -88
  47. package/dist/forge/edit-target.js.map +0 -1
  48. package/dist/forge/prune-store.d.ts +0 -46
  49. package/dist/forge/prune-store.js +0 -86
  50. package/dist/forge/prune-store.js.map +0 -1
  51. package/dist/forge/remote-store.d.ts +0 -36
  52. package/dist/forge/remote-store.js +0 -113
  53. package/dist/forge/remote-store.js.map +0 -1
  54. package/dist/generate/character-body.d.ts +0 -79
  55. package/dist/generate/character-body.js +0 -100
  56. package/dist/generate/character-body.js.map +0 -1
  57. package/dist/project/character-search.d.ts +0 -30
  58. package/dist/project/character-search.js +0 -82
  59. package/dist/project/character-search.js.map +0 -1
  60. package/dist/scaffold/asset-pipeline-skill-files.d.ts +0 -38
  61. package/dist/scaffold/asset-pipeline-skill-files.js +0 -202
  62. package/dist/scaffold/asset-pipeline-skill-files.js.map +0 -1
@@ -1,202 +0,0 @@
1
- /**
2
- * `<skills dir>/choosing-asset-pipelines/SKILL.md` — WHICH lane makes a given thing, before any
3
- * command runs.
4
- *
5
- * Exists because the GDK grew several ways to make the same thing — a level from the baseline
6
- * terrain, `bitmagic forge` (five modes), a Blender script or a Unity port; a character from the
7
- * free block default, a free library hit, a voxel forge or a low-poly forge at four times the
8
- * price — and the routing knowledge sat in five places: the per-command reference in
9
- * `generating-assets`, the "one forge" rule in `planning-a-game`, the Blender skill's §0 gate, the
10
- * hosted Creator agent's GLB-vs-voxel rules (which never reach a CLI project at all), and code
11
- * comments. An agent took the first lane it remembered, and a creator had to know Bitmagic's
12
- * internals to steer it. This file is the table by NEED: conditions (art style, model class,
13
- * local tooling, prototype vs polished), rough cost, rough time, recommended order — and the rule
14
- * for when the agent decides alone versus asks the creator with a recommendation.
15
- *
16
- * It is a shipped skill so that `bitmagic upgrade` re-renders it in every project with every CLI
17
- * release — that is the whole update mechanism; nothing here is hand-maintained in a creator's
18
- * project. Same file-layout contract as `skill-files.ts`: a pure function returning the markdown
19
- * as a template literal, every backtick inside escaped as \` and every `${` escaped, except the
20
- * `${PRIMARY_SKILLS_DIR}` interpolations, which are the point (sibling skills are cited by the
21
- * fixed path every agent's project has, never by a vendor path). Imports only `agent-targets.js`
22
- * so `project.ts` can import this without a cycle.
23
- *
24
- * What keeps it honest, and what does not:
25
- * - `__tests__/asset-pipeline-skill-files.test.ts` fails when a `bitmagic generate` subcommand
26
- * exists with no row here, when a row names a subcommand or a skill directory that does not
27
- * exist, or when one of the need sections or the two defaults (audio opt-in, block characters)
28
- * disappears. So a new generator cannot ship without a row.
29
- * - Prices and timings are NOT test-checked. Sparks come from `api-server/src/llm/llm_cost.json`
30
- * (`toolCosts`, 1 spark = $0.01): glb/model/prop 3, voxel character 15, low-poly character 60,
31
- * library-only 0, skybox and background 5, image 3, cover and reference 6, block-type 3, sound
32
- * 12, music 0.25/s, video 1.35/s, authored animation 1, video-to-motion 15; forge and vehicle
33
- * are usage-priced, presets free. Timings are observed. The CLI cannot import that file, so a
34
- * price, flag or backend change is invisible to the test — which is why the release checklist
35
- * (`.claude/skills/generate-release-checklist`) asks for this file to be re-read whenever a
36
- * generator or `toolCosts` changes. Every figure is written as approximate for the same reason.
37
- */
38
- import { PRIMARY_SKILLS_DIR } from './agent-targets.js';
39
- export function renderAssetPipelinesSkill() {
40
- return `---
41
- name: choosing-asset-pipelines
42
- description: Pick the lane that makes a given thing for this Bitmagic game — a whole level, a character, a building, a small prop, a vehicle, a weapon, the sky, block textures, an image or cover, an animation, audio, a cutscene — choosing between the free built-in, bitmagic generate, bitmagic forge, a Blender build, a Unity port and the creator's own files, with approximate sparks and wall-clock minutes per option and the rule for when to ask the creator first. Use before any generation, forge or Blender build, and whenever two routes could make the same thing.
43
- ---
44
-
45
- # Choosing an asset pipeline
46
-
47
- Most things this game needs can be made three or four ways, and the ways differ by a hundred
48
- sparks and by twenty minutes. This file is the routing table: find the need, take the first row
49
- whose conditions hold, say which you took. Flags and refusals for every command are in
50
- \`${PRIMARY_SKILLS_DIR}/generating-assets/SKILL.md\`; this file only decides.
51
-
52
- Costs are **approximate** — sparks are rounded and times are typical, not promised. \`bitmagic
53
- usage\` is the truth about what was actually spent.
54
-
55
- ## Know these four things first
56
-
57
- 1. **Art style** — \`artStyle\` in \`src/work/game.json\`: \`voxel\` (default) or \`low-poly\`. A declared
58
- switch, not a per-asset flag: in a low-poly game \`generate model|prop\`, \`assets add\` and
59
- \`generate character\` keep meshes instead of voxelizing (and a character costs four times more),
60
- the Blender level route opens, and built-in weapons should use their \`_lowpoly\` twins. Set it
61
- before the first cover.
62
- 2. **Your model class** — frontier (Claude Fable / Opus 5, GPT-6 class) or not. Only the Blender
63
- route depends on it; its §0 says "if you are not sure you are one, you are not".
64
- 3. **Local tooling** — Google Chrome (\`forge\`, \`generate model|prop|vehicle\`, \`assets add *.glb\` in
65
- a voxel game, \`verify\`); Blender 4.2+ (Blender levels); \`ffmpeg\` (\`trailer\`, video contact
66
- sheets); a Unity project to port. Probe once with the checks each skill gives.
67
- 4. **Purpose** — **prototype** (slice 1, prove the loop, the creator will iterate) or **polished**
68
- ("final", "ship it", "make it look great", publishing). Take it from their words. Unsaid:
69
- assume prototype for slice 1 and note the upgrade as a backlog item.
70
-
71
- ## Decide, say so, ask only when it is expensive
72
-
73
- Default: you decide, and state the assumption in one line before running anything:
74
-
75
- > Assuming *prototype*: using \`<route>\` (~N sparks, ~T). Say "polished" and I will use \`<alt>\`.
76
-
77
- Ask first only when BOTH hold: the recommended option is expensive — tens of sparks or many
78
- minutes (a forge, a low-poly character, a \`--video\` animation, a long music track, a Blender build)
79
- — AND the creator has not said prototype or polished. Recommended option first, answerable in a word:
80
-
81
- > \`<need>\`: I recommend \`<A>\` (~N sparks, ~T) because \`<why>\`; the alternative is \`<B>\` (~N, ~T).
82
- > Which — or just say prototype / polished and I will pick?
83
-
84
- Never ask about a free or seconds-long option, never ask twice for the same need, never run two
85
- paid options to compare. If the allowance is nearly gone
86
- (\`${PRIMARY_SKILLS_DIR}/checking-usage/SKILL.md\`), say so before an expensive one.
87
-
88
- ## By need
89
-
90
- Rows are in recommended order: take the first whose conditions hold.
91
-
92
- ### A whole level
93
-
94
- | Route | Conditions | ~Cost | Notes |
95
- |---|---|---|---|
96
- | The baseline's procedural voxel terrain (already there) | prototype, or the terrain is not the mechanic | free, instant | Slice 1's world unless the game cannot be played without its shape (planning skill) |
97
- | \`bitmagic forge --prompt "..."\` (\`--city\`, \`--dungeon\`, \`--platformer\`, \`--freeform\` or \`--vessel\`, at most one) | Chrome; terrain IS the mechanic (skiing, a circuit, open-world driving, an enclosed dungeon) or polished | usage-priced, tens of sparks; many minutes (the bake alone can take twenty) | One forge per game; \`--edit --level <id>\` changes a forged level, \`--resume <jobId>\` after a failure. AGENTS.md "Forging a whole level" |
98
- | \`${PRIMARY_SKILLS_DIR}/building-levels-in-blender/SKILL.md\` | frontier model AND Blender 4.2+ AND \`artStyle: "low-poly"\`; a DESIGNED place (interior, station, set), not natural terrain | free in sparks; an hour or more of your time | Its §0 is the gate; audited with ray casts, loaded by \`MeshLevel\` |
99
- | \`${PRIMARY_SKILLS_DIR}/converting-unity-levels/SKILL.md\` | the creator has a Unity scene to bring over | free in sparks; minutes to hours | Reuses their prefabs, FBX, colliders; not a way to make a level from nothing |
100
-
101
- ### A character (player or NPC)
102
-
103
- | Route | Conditions | ~Cost | Notes |
104
- |---|---|---|---|
105
- | A block character built in code (the default) | any; recolours, outfits, a blocky knight/robot/wizard | free, seconds | \`character-system.md\`, \`npc-appearance.md\`. Highres and block **never coexist** — going highres means the whole cast goes |
106
- | \`bitmagic generate character --name <id> --prompt "..."\` | the look is genuinely custom; the whole cast will be highres | free and seconds on a library match; else ~15 sparks, ~1.5–4 min (voxel) or ~60 sparks, ~3 min (low-poly) | Library-first by default. \`--head-scale\` / \`--mesh-model\` always forge. \`--apply-to-player\` sets the player |
107
- | \`... --library-only\` | prototype; a close-enough body will do | free, instant | Nearest stored body, or fails and charges nothing |
108
- | \`... --no-library\` | polished; exactly this one | ~15 (voxel) / ~60 (low-poly) sparks; minutes | The costly row: ask first if purpose is unknown |
109
-
110
- ### A building or landmark
111
-
112
- | Route | Conditions | ~Cost | Notes |
113
- |---|---|---|---|
114
- | A structure a forge already placed, or a \`building\` hotspot | the level was forged | free | \`environment-objects.md\` |
115
- | \`bitmagic generate model --prompt "..." --height <m>\` | a new named structure the code places | ~3 sparks; ~10 s voxel, minutes for a mesh | Chrome in a voxel game; above 6 m stays hollow |
116
- | \`bitmagic generate prop --asset <id> --prompt "..."\` | a placeholder or forge asset is already placed and looks bad | ~3 sparks; ~10 s | REPLACES that asset; every placed instance upgrades. Never for a new object |
117
- | \`bitmagic assets add <file.glb>\` (\`--keep-glb\` for a mesh) | the creator has the model | free; seconds to a minute | Chrome to voxelize in a voxel game |
118
-
119
- ### A small prop (a crate, a lantern, a pickup)
120
-
121
- | Route | Conditions | ~Cost | Notes |
122
- |---|---|---|---|
123
- | An asset already in \`assets[]\` (\`bitmagic assets list\`) | one fits | free | The same object twice is the commonest waste |
124
- | \`bitmagic generate model --prompt "..." --name <id>\` | a new object the code spawns or places | ~3 sparks; ~10 s voxel | Cheap enough not to ask. \`environmentObjects[]\` or \`engine.spawnAsset()\` — \`environment-objects.md\` |
125
- | \`bitmagic assets add <file>\` | the creator has a \`.glb\`/\`.vxl\` | free | |
126
- | Plain three.js geometry in code | a marker, trigger or debug prop nobody looks at | free, no browser | Do not hand-build what a 3-spark model makes better |
127
-
128
- ### A vehicle
129
-
130
- | Route | Conditions | ~Cost | Notes |
131
- |---|---|---|---|
132
- | \`bitmagic generate vehicle --preset <NAME>\` (\`--preset ?\` lists them) | no bespoke look needed; prototype | free; ~a minute (Chrome) | Physics, lights, AI built in either way; spawn via \`engine.getVehicleSpawner().spawnAndEnterFromAsset(...)\` |
133
- | \`bitmagic generate vehicle --prompt "..."\` | the look is the point | usage-priced, several sparks; several minutes | NEW asset each run; ask first when purpose is unknown |
134
-
135
- ### A weapon
136
-
137
- | Route | Conditions | ~Cost | Notes |
138
- |---|---|---|---|
139
- | A built-in id (\`sword\`, \`assault_rifle\`, \`bow\`…) or its \`_lowpoly\` twin via \`weaponStyleId(base, 'lowpoly')\` | any; match the twin to \`artStyle\` | free, instant | Wired into damage, animations, pickups, NPC use. \`weapon-visuals.md\`, \`combat-system.md\` |
140
- | \`bitmagic generate model --prompt "..."\` | a genuinely custom look | ~3 sparks; ~10 s | A mesh only — still wire it to a built-in's combat behaviour |
141
-
142
- ### The sky
143
-
144
- | Route | Conditions | ~Cost | Notes |
145
- |---|---|---|---|
146
- | The engine's default sky | prototype; no strong setting | free | |
147
- | \`bitmagic generate skybox --description "..."\` | a free-look or third-person camera | ~5 sparks; ~a minute | Usually earns its place in slice 1 |
148
- | \`bitmagic generate background --description "..."\` | a fixed sidescroller or top-down camera | ~5 sparks; ~a minute | SAME field as skybox; the second run silently replaces the first |
149
-
150
- ### Block textures
151
-
152
- | Route | Conditions | ~Cost | Notes |
153
- |---|---|---|---|
154
- | A built-in block name (\`stone\`, \`grass\`, \`sand\`, \`marble\`…) | one fits | free | \`custom-block-types.md\` |
155
- | A plain-colour \`customBlockTypes[]\` entry by hand | prototype; a colour is enough | free | snake_case, never a built-in's name |
156
- | \`bitmagic generate block-type --name <id> --description "..."\` | the surface needs a real texture (\`--side-description\` for a second) | ~3 sparks (~6 with sides); seconds to a minute | Same \`--name\` replaces the entry |
157
-
158
- ### Images, cover, reference
159
-
160
- | Route | Conditions | ~Cost | Notes |
161
- |---|---|---|---|
162
- | \`bitmagic assets add <png>\` | the creator has the picture | free | |
163
- | \`bitmagic generate image --name <id> --prompt "..."\` | a portrait, icon, poster, HUD art | ~3 sparks; ~30 s | |
164
- | \`bitmagic cover\` | always, early — after \`artStyle\` is set, before \`verify\` | ~6 sparks; minutes | Prompt comes from \`GAME-DESIGN.md\`; an unchanged design regenerates nothing |
165
- | \`bitmagic reference make\` / \`accept\` | the idea names a place or a look; the HUMAN accepts | ~6 sparks per candidate; ~a minute | Steers every later skybox, block, cover and forge |
166
-
167
- ### Animation
168
-
169
- | Route | Conditions | ~Cost | Notes |
170
- |---|---|---|---|
171
- | A built-in clip (\`mGenIdle01\`, \`mGenWalk01\`, \`mKicking01\`, \`mPunching01\`…) | one fits | free, instant | \`animation-assets.md\`; locomotion auto-plays |
172
- | \`bitmagic generate animation --family gait ...\` or \`--spec <file>\` | a gait variant, a melee move, a key-pose one-shot | ~1 spark; ~1 s | Solved locally; the cheapest generator |
173
- | \`bitmagic generate animation --video <clip>\` (\`--video-prompt "..."\` generates the clip first) | a motion only footage captures | ~15 sparks (plus video seconds with \`--video-prompt\`); minutes | Ask first when purpose is unknown |
174
-
175
- ### Audio
176
-
177
- | Route | Conditions | ~Cost | Notes |
178
- |---|---|---|---|
179
- | None | the creator has not asked for sound | free | Audio is added only on request — never by default |
180
- | Web Audio synthesis in code | ordinary SFX: a beep, a hit, a pickup | free | \`audio-system.md\` |
181
- | \`bitmagic assets add <file.mp3/.opus>\` | the creator has the track | free | |
182
- | \`bitmagic generate sound --prompt "..."\` | they asked for a premium or generated effect | ~12 sparks; ~30 s | One prompt, one effect |
183
- | \`bitmagic generate music --prompt "..." --duration <s>\` | they asked for original music | ~0.25 sparks/s (30 s ≈ 8, 120 s ≈ 30); ~a minute | Ask first for a long track when purpose is unknown; \`--out --no-world\` for a trailer bed |
184
-
185
- ### A cutscene or video
186
-
187
- | Route | Conditions | ~Cost | Notes |
188
- |---|---|---|---|
189
- | \`bitmagic generate video --prompt "..." --duration 5\` | a story beat played by \`engine.playVideo()\` | ~1.35 sparks/s (5 s ≈ 7); ~40 s | Read the frame sheet before wiring; needs a user gesture to play. \`video-cutscenes.md\` |
190
- | \`... --image <png>\` | animate a still you have (cover, reference) | same sparks; ~3 min | Comes back in the image's shape, not 16:9 |
191
- | \`bitmagic trailer\` (\`${PRIMARY_SKILLS_DIR}/making-a-trailer/SKILL.md\`) | a trailer or highlight reel of real gameplay | free apart from an optional music bed; \`ffmpeg\` | Cut from a recording, not generated |
192
-
193
- ## After you have chosen
194
-
195
- - Pass \`--original-prompt "<the creator's request, verbatim>"\` on every command.
196
- - Each generation writes \`src/work/world.json\`; re-read it if you hold a copy.
197
- - One generation per decision. Decide the prompt, run it once, use what comes back.
198
- - Flags, reference-image rules, refusals: \`${PRIMARY_SKILLS_DIR}/generating-assets/SKILL.md\`. What it
199
- cost: \`bitmagic usage\`.
200
- `;
201
- }
202
- //# sourceMappingURL=asset-pipeline-skill-files.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-pipeline-skill-files.js","sourceRoot":"","sources":["../../src/scaffold/asset-pipeline-skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,UAAU,yBAAyB;IACvC,OAAO;;;;;;;;;;IAUL,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCjB,kBAAkB;;;;;;;;;;;;MAYjB,kBAAkB;MAClB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA4FI,kBAAkB;;;;;;;8CAOA,kBAAkB;;CAE/D,CAAC;AACF,CAAC"}