@bitmagic/cli 0.1.26 → 0.1.27

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.
@@ -143,6 +143,13 @@ export function reportAgentsMd(output, outcome) {
143
143
  output.info(` Current template: ${outcome.templatePath}`);
144
144
  output.info(' Diff it against your AGENTS.md and merge what you want to keep.');
145
145
  }
146
+ // Said unconditionally on the `kept` path, because the anxiety it answers is unconditional: a
147
+ // creator reading "left alone" reasonably concludes their agent is stuck on old guidance. It is
148
+ // not. The depth lives in the skills, which upgrade rewrites whether or not AGENTS.md moved —
149
+ // this diff is worth merging, not urgent.
150
+ output.info(' Your agent is not stuck on old guidance either way: the engine-API lookup protocol and ' +
151
+ 'the build-a-slice-first contract live in the planning-a-game and finding-engine-apis ' +
152
+ 'skills, which upgrade DID refresh.');
146
153
  }
147
154
  /**
148
155
  * Tell a project scaffolded before GAME-DESIGN.md existed that it is missing one, and return
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MA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wF;gBACxF,qCAAqC;gBACrC,mBAAmB,EAAE,UAAU;gBAC/B,2FAA2F;gBAC3F,gCAAgC;gBAChC,gBAAgB,EAAE,cAAc;gBAChC,4FAA4F;gBAC5F,gEAAgE;gBAChE,QAAQ,EAAE;oBACR,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;oBAC9B,eAAe,EAAE,MAAM,CAAC,QAAQ,CAAC,eAAe;oBAChD,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,IAAI,IAAI;iBACnD;aACF,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -23,6 +23,13 @@ import * as path from 'path';
23
23
  * mechanism, because a false "fresh" ships an unverified bundle while a false "stale" only costs
24
24
  * one `bitmagic verify`.
25
25
  *
26
+ * `mechanics-plan.md` earns its place the same way, and for a sharper version of the reason: the
27
+ * agent is told to rewrite it after every slice — moving shipped items out of the backlog and
28
+ * re-ranking the rest is the whole point of the file. Left in, the ordinary
29
+ * `bitmagic verify` → update the backlog → `bitmagic publish` sequence exits 3 over prose, which
30
+ * teaches agents to reach for `--force`, the one flag that also waves through a genuinely stale
31
+ * verify. Nothing imports it and `vite.publish.config.js` cannot put prose in the bundle.
32
+ *
26
33
  * `GAME-DESIGN.md` earns its place on the same "no build tool reads it" test: nothing imports it,
27
34
  * `vite.publish.config.js` cannot put prose in the bundle, and it exists to be REWRITTEN as the
28
35
  * game evolves — it is the input `bitmagic cover` reads. Left in, the ordinary
@@ -33,7 +40,7 @@ import * as path from 'path';
33
40
  */
34
41
  const EXCLUDED_DIRS = new Set(['.bitmagic', 'node_modules', 'dist', '.vite-cache', '.git']);
35
42
  /** See EXCLUDED_DIRS: files that can never change what the bundle contains. */
36
- const EXCLUDED_FILES = new Set(['.DS_Store', 'GAME-DESIGN.md']);
43
+ const EXCLUDED_FILES = new Set(['.DS_Store', 'GAME-DESIGN.md', 'mechanics-plan.md']);
37
44
  /**
38
45
  * A relative path as the fingerprint hashes it: always forward-slashed.
39
46
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../../src/publish/fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5F,+EAA+E;AAC/E,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,YAAoB,EAAE,MAAc,IAAI,CAAC,GAAG;IACtE,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,IAAI,CAAC,GAAW,EAAE,IAAY,EAAE,GAAa;IACpD,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI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,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACxB,KAAK,CAAC,IAAI,EAAE,CAAC;IAEb,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -29,7 +29,13 @@ export interface ReloadHookMerge {
29
29
  /** Present only when `contents` is null *because* the file could not be merged. */
30
30
  skipped?: string;
31
31
  }
32
- /** The settings a project with no `.claude/settings.json` at all gets. */
32
+ /**
33
+ * The settings a project with no `.claude/settings.json` at all gets.
34
+ *
35
+ * Note the asymmetry with `mergeReloadHook` below: an existing settings file gains the Stop hook
36
+ * and nothing else. Permissions are the creator's own security posture, and adding entries to a
37
+ * file they already own is a different kind of act from seeding one that does not exist yet.
38
+ */
33
39
  export declare function renderClaudeSettings(): string;
34
40
  /**
35
41
  * Add the Stop hook to an existing settings file, preserving everything else in it.
@@ -33,9 +33,41 @@ function stringify(settings) {
33
33
  function reloadMatcher() {
34
34
  return { hooks: [{ type: 'command', command: RELOAD_HOOK_COMMAND }] };
35
35
  }
36
- /** The settings a project with no `.claude/settings.json` at all gets. */
36
+ /**
37
+ * The `bitmagic` commands a new project pre-approves, so the agent is not prompted for them.
38
+ *
39
+ * Every entry is free, local and idempotent, and every one is something AGENTS.md tells the agent
40
+ * to run repeatedly — `check` after each edit, `reload` at the end of each turn, `verify` before
41
+ * declaring anything done. A prompt on those is pure friction.
42
+ *
43
+ * What is deliberately ABSENT is the point of the list. A blanket `Bash(bitmagic:*)` would also
44
+ * cover `generate`, `forge` and `cover`, which spend the creator's sparks, and `publish`, which
45
+ * with `--visibility public` lists their game on bitmagic.ai. The permission prompt is currently
46
+ * the only human gate on that spending — AGENTS.md leans on it explicitly ("Generation costs the
47
+ * creator real money. Do not call these in a loop to explore options"), so widening this list
48
+ * removes a safeguard rather than a nuisance. `upgrade` is out too: it replaces `engine/`
49
+ * wholesale, which the creator should see coming.
50
+ */
51
+ const ALLOWED_COMMANDS = [
52
+ 'Bash(bitmagic check:*)',
53
+ 'Bash(bitmagic dev:*)',
54
+ 'Bash(bitmagic reload:*)',
55
+ 'Bash(bitmagic verify:*)',
56
+ 'Bash(bitmagic build:*)',
57
+ 'Bash(bitmagic whoami:*)',
58
+ ];
59
+ /**
60
+ * The settings a project with no `.claude/settings.json` at all gets.
61
+ *
62
+ * Note the asymmetry with `mergeReloadHook` below: an existing settings file gains the Stop hook
63
+ * and nothing else. Permissions are the creator's own security posture, and adding entries to a
64
+ * file they already own is a different kind of act from seeding one that does not exist yet.
65
+ */
37
66
  export function renderClaudeSettings() {
38
- return stringify({ hooks: { Stop: [reloadMatcher()] } });
67
+ return stringify({
68
+ permissions: { allow: ALLOWED_COMMANDS },
69
+ hooks: { Stop: [reloadMatcher()] },
70
+ });
39
71
  }
40
72
  /**
41
73
  * Does this `Stop` group already run our command?
@@ -1 +1 @@
1
- {"version":3,"file":"claude-settings.js","sourceRoot":"","sources":["../../src/scaffold/claude-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;A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C;IACnG,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IAC7D,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,oBAAoB,2CAA2C,EAAE,CAAC;IACzG,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IACxD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,oBAAoB,gDAAgD,EAAE,CAAC;IAC9G,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;QAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAErD,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC;YAClB,GAAG,MAAM;YACT,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE;SACtD,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -15,13 +15,18 @@ export interface DownloadDeps {
15
15
  */
16
16
  export declare function downloadAndVerify(tarballUrl: string, expectedSha256: string, targetPath: string, deps: DownloadDeps): Promise<void>;
17
17
  /**
18
- * The tarball stores three prefixes at different depths — game/src/<root>, game/docs (plus the
19
- * sibling game/sw-cache-buster.js, which shares game/docs's strip depth) and templates — so it
20
- * takes three passes. A single pass cannot express them: `strip` is a fixed depth, and stripping
21
- * 2 would turn game/docs/x.md into a bare x.md.
18
+ * The tarball stores three prefixes at different depths — game/src/<root>, game/agent-docs (plus
19
+ * the sibling game/sw-cache-buster.js, which shares its strip depth) and templates — so it takes
20
+ * three passes. A single pass cannot express them: `strip` is a fixed depth, and stripping 2 would
21
+ * turn game/agent-docs/x.md into a bare x.md.
22
22
  *
23
- * Result: <engineDir>/{engine,types,bundle,debug,editor,genres}, <engineDir>/docs,
23
+ * Result: <engineDir>/{engine,types,bundle,debug,editor,genres}, <engineDir>/agent-docs,
24
24
  * <engineDir>/sw-cache-buster.js, and templates unpacked separately so the scaffolder can read
25
25
  * templates/index.json.
26
+ *
27
+ * `game/docs` is deliberately absent: those are engine-CONTRIBUTOR docs (how to edit the engine),
28
+ * which is noise in a project where engine/ is read-only. Tarballs published before the corpus
29
+ * moved still carry it, and the second pass simply does not match it — an old tarball produces a
30
+ * project without agent-docs rather than a failure. See OPTIONAL_VENDORED_DIRS in project.ts.
26
31
  */
27
32
  export declare function extractEngine(tarballPath: string, engineDir: string, templatesDir: string): Promise<void>;
@@ -39,14 +39,19 @@ export async function downloadAndVerify(tarballUrl, expectedSha256, targetPath,
39
39
  fs.writeFileSync(targetPath, body);
40
40
  }
41
41
  /**
42
- * The tarball stores three prefixes at different depths — game/src/<root>, game/docs (plus the
43
- * sibling game/sw-cache-buster.js, which shares game/docs's strip depth) and templates — so it
44
- * takes three passes. A single pass cannot express them: `strip` is a fixed depth, and stripping
45
- * 2 would turn game/docs/x.md into a bare x.md.
42
+ * The tarball stores three prefixes at different depths — game/src/<root>, game/agent-docs (plus
43
+ * the sibling game/sw-cache-buster.js, which shares its strip depth) and templates — so it takes
44
+ * three passes. A single pass cannot express them: `strip` is a fixed depth, and stripping 2 would
45
+ * turn game/agent-docs/x.md into a bare x.md.
46
46
  *
47
- * Result: <engineDir>/{engine,types,bundle,debug,editor,genres}, <engineDir>/docs,
47
+ * Result: <engineDir>/{engine,types,bundle,debug,editor,genres}, <engineDir>/agent-docs,
48
48
  * <engineDir>/sw-cache-buster.js, and templates unpacked separately so the scaffolder can read
49
49
  * templates/index.json.
50
+ *
51
+ * `game/docs` is deliberately absent: those are engine-CONTRIBUTOR docs (how to edit the engine),
52
+ * which is noise in a project where engine/ is read-only. Tarballs published before the corpus
53
+ * moved still carry it, and the second pass simply does not match it — an old tarball produces a
54
+ * project without agent-docs rather than a failure. See OPTIONAL_VENDORED_DIRS in project.ts.
50
55
  */
51
56
  export async function extractEngine(tarballPath, engineDir, templatesDir) {
52
57
  fs.mkdirSync(engineDir, { recursive: true });
@@ -58,14 +63,15 @@ export async function extractEngine(tarballPath, engineDir, templatesDir) {
58
63
  strip: 2,
59
64
  filter: (entryPath) => entryPath.startsWith('game/src/'),
60
65
  });
61
- // game/docs/coordinate-system.md -> <engineDir>/docs/coordinate-system.md
66
+ // game/agent-docs/npc-system.md -> <engineDir>/agent-docs/npc-system.md, and the same for its
67
+ // engine-api/ signature digest and samples/ subdirectories.
62
68
  // game/sw-cache-buster.js -> <engineDir>/sw-cache-buster.js (rides this pass because it needs
63
- // the same strip depth as game/docs/, even though it isn't under game/docs/ itself)
69
+ // the same strip depth as game/agent-docs/, even though it isn't under it)
64
70
  await tar.extract({
65
71
  file: tarballPath,
66
72
  cwd: engineDir,
67
73
  strip: 1,
68
- filter: (entryPath) => entryPath.startsWith('game/docs/') || entryPath === 'game/sw-cache-buster.js',
74
+ filter: (entryPath) => entryPath.startsWith('game/agent-docs/') || entryPath === 'game/sw-cache-buster.js',
69
75
  });
70
76
  // templates/index.json -> <templatesDir>/index.json
71
77
  await tar.extract({
@@ -1 +1 @@
1
- {"version":3,"file":"engine-download.js","sourceRoot":"","sources":["../../src/scaffold/engine-download.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MA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,OAAO,CAAC;QAChB,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;KAClE,CAAC,CAAC;AACL,CAAC"}
@@ -41,6 +41,33 @@ export interface ProjectMetadata {
41
41
  }
42
42
  export declare function renderBitmagicJson(metadata: ProjectMetadata): string;
43
43
  export declare function renderAgentsMd(): string;
44
+ /**
45
+ * `.claude/skills/planning-a-game/SKILL.md` — the slice contract and the mechanic-recipe routing.
46
+ *
47
+ * These are one skill rather than two on purpose: you route to a recipe *in order to* scope slice
48
+ * 1, and slice 1 is the first section of the plan file the recipe tells you to write. Split, the
49
+ * first instruction of each half would be "now invoke the other half" — and the hosted lane already
50
+ * paid for that hop (see game-play-agent's mechanic-recipe-router.ts: the batch's slowest game read
51
+ * the right recipe twice and still shipped with no plan file, because the plan step sat above the
52
+ * table rather than inside it).
53
+ *
54
+ * They are also deliberately NOT in AGENTS.md, which carries only the trigger and a compressed
55
+ * version. `bitmagic upgrade` refreshes AGENTS.md only while it is byte-identical to what the CLI
56
+ * wrote, but overwrites shipped skills unconditionally — so a creator who has customised their
57
+ * AGENTS.md still receives every word of this.
58
+ */
59
+ export declare function renderPlanningSkill(): string;
60
+ /**
61
+ * `.claude/skills/finding-engine-apis/SKILL.md` — the discovery protocol in full.
62
+ *
63
+ * The problem this exists to solve is measured, not hypothetical. game-play-agent's
64
+ * engine-api-digest.ts opens with it: session analysis showed the hosted coding agent spending most
65
+ * of its wall-clock reconstructing the engine's public API through dozens of sequential searches,
66
+ * and one digest lookup replaced several code searches. A scaffolded project had the same 240k
67
+ * lines and none of the digest until the corpus started shipping — so an external agent had no
68
+ * option but the expensive one.
69
+ */
70
+ export declare function renderEngineApiSkill(): string;
44
71
  export declare function renderGenerateSkill(): string;
45
72
  /**
46
73
  * `GAME-DESIGN.md` — the project's design document, and the input `bitmagic cover` builds its
@@ -144,6 +144,12 @@ export function renderTsconfig() {
144
144
  'src/**/*.test.ts',
145
145
  'src/**/__tests__/**/*',
146
146
  'engine/bundle/**/*',
147
+ // The docs corpus ships runnable reference samples as real .ts, and `include` above sweeps
148
+ // all of engine/. They are compile-checked upstream against game/tsconfig.docs-samples.json,
149
+ // whose settings are not these — so left in, a divergence between the two configs surfaces
150
+ // as a red `bitmagic check` in a creator's project over a file they never wrote and cannot
151
+ // fix. Documentation must not be able to break someone's build.
152
+ 'engine/agent-docs/**/*',
147
153
  ],
148
154
  });
149
155
  }
@@ -301,12 +307,23 @@ export function renderAgentsMd() {
301
307
  directory breaks the game at runtime even though it still typechecks.
302
308
  - \`engine/\` — **the Bitmagic engine, read-only.** It is vendored by the CLI and replaced
303
309
  wholesale by \`bitmagic upgrade\`. Edits here are lost on upgrade and ignored on publish.
304
- - \`engine/docs/\` — the engine's deep-dive documentation. Read it before guessing.
310
+ - \`engine/agent-docs/\` — **the engine's documentation, and the fastest thing in this project.**
311
+ \`engine-api/\` is a generated signature digest covering every public engine class, method and
312
+ type; the ~83 \`*.md\` files are the per-subsystem guides, including \`mechanic-*.md\` genre
313
+ recipes and \`archetype-*.md\` world recipes; \`samples/\` holds compile-checked reference code.
314
+ See **Finding an engine API** below. Reading \`engine/\` source to find out what exists is the one
315
+ habit that turns a ten-minute change into an hour.
305
316
  - \`GAME-DESIGN.md\` — **what this game is.** Yours to write and keep current. Nothing compiles it,
306
317
  but \`bitmagic cover\` generates the cover art from it, so it is not decoration.
307
- - \`.claude/skills/generating-assets/\` — **shipped by the CLI, re-rendered by \`bitmagic upgrade\`.**
308
- It documents the CLI's own commands, so it stays current with them; edits to it are lost. Skills
309
- you add yourself are never touched.
318
+ - \`mechanics-plan.md\` — **how the game gets built, and in what order.** Yours to write and rewrite
319
+ each slice: \`GAME-DESIGN.md\` says what the game *is*, this says what ships next and what is
320
+ deliberately deferred. Nothing reads it but you and the human, and it is excluded from the publish
321
+ fingerprint, so revising it never invalidates a passing \`bitmagic verify\`.
322
+ - \`.claude/skills/\` — **shipped by the CLI, re-rendered by \`bitmagic upgrade\`:**
323
+ \`planning-a-game/\` (what to build first and in what order), \`finding-engine-apis/\` (where the
324
+ engine's APIs are documented), and \`generating-assets/\` (the CLI's own generation commands).
325
+ They document the CLI and the engine, so they stay current with both; edits to them are lost.
326
+ Skills you add yourself are never touched.
310
327
  - \`.claude/settings.json\` — **yours**, seeded with one Stop hook that runs \`bitmagic reload\` so
311
328
  the owner's browser refreshes when you finish a turn. \`upgrade\` adds that hook if it is missing
312
329
  and changes nothing else, so your permissions and your own hooks are safe here.
@@ -322,6 +339,80 @@ imports your game. Renaming or removing the \`VoxelGame\` export from \`src/work
322
339
  typechecks against that declaration — it only fails at runtime, when the engine actually loads
323
340
  the module and finds the export missing.
324
341
 
342
+ ## Build the smallest playable thing first
343
+
344
+ Do not build the whole game in one pass. Build **slice 1** — the smallest thing that is genuinely
345
+ playable — put it in front of the person waiting, then iterate with them. They are watching
346
+ \`bitmagic dev\` in a browser while you work: a slice they can play in ten minutes is worth more than
347
+ a finished game in an hour they could not see, and it is the only way you find out you misread the
348
+ idea before you have built an hour on top of it.
349
+
350
+ Slice 1 is done when all five are true:
351
+
352
+ 1. The player spawns and can move. The genre baseline already does this — do not rebuild it.
353
+ 2. **One** verb from the core loop works — the jump, the shot, the pickup, the lap. One, not the loop.
354
+ 3. One win and one lose exist and actually fire. The numbers being wrong is fine; not firing is not.
355
+ 4. Something on screen says how the player is doing — a score, a timer, a health bar.
356
+ 5. \`bitmagic check\` and \`bitmagic verify\` both pass.
357
+
358
+ Everything else is slice 2 and later: a second weapon, enemy variety, tuning, menus, sound, more
359
+ levels, polish. Write them down in \`mechanics-plan.md\`; do not build them.
360
+
361
+ **If the idea names a genre, read the recipe before you decide anything.** Racing, combat, tower
362
+ defense, platformer, shooter, driving, soccer and skiing each have
363
+ \`engine/agent-docs/mechanic-<genre>.md\`, and its contract — camera mode, whether the player is a
364
+ walking character at all, core systems, win/lose shape — is binding unless the human asked
365
+ otherwise. Read it, then write \`mechanics-plan.md\`, then write code. Skip the plan only for a
366
+ single-mechanic edit ("raise jump height", "add a sword"); in doubt, write it.
367
+
368
+ Then **stop and report**: what plays now, what you deliberately left out, and the two or three
369
+ things you would do next, in order. Let them choose. Do not publish unless they ask.
370
+
371
+ The full contract — what counts as a core verb, what the engine already ships so you never build it,
372
+ the \`mechanics-plan.md\` skeleton, and the loop after slice 1 — is in the \`planning-a-game\` skill.
373
+
374
+ ## Finding an engine API
375
+
376
+ The vendored engine is ~240,000 lines. Reading it to discover what exists is the most expensive
377
+ mistake available in this project, and it is almost never necessary. Three tiers — go down them in
378
+ order and stop at the first that answers you.
379
+
380
+ 1. **\`engine/agent-docs/engine-api/\`** — a generated digest of every public engine class, method,
381
+ function, interface and type, signatures only, bodies omitted. Grep it for the symbol you want —
382
+ \`rg -n "spawnAsset" engine/agent-docs/engine-api/\` — and read the group doc it lands in.
383
+ \`engine-api.md\` is the index of the 45 groups. One grep here replaces a dozen searches in
384
+ \`engine/\`.
385
+ 2. **\`engine/agent-docs/*.md\`** — the prose guides, one per subsystem (\`npc-system.md\`,
386
+ \`vehicle-system.md\`, \`collectible-objects.md\`, \`end-game.md\`, \`HUD_ELEMENTS.md\`, …). Read
387
+ one when you need to know how a subsystem is *meant to be used*, which a signature cannot tell
388
+ you. The \`finding-engine-apis\` skill carries the feature-to-doc table — use it instead of
389
+ guessing filenames.
390
+ 3. **\`engine/\` source** — last resort, for an implementation detail neither of the above answers.
391
+
392
+ Two conventions in those docs, because they are shared with Bitmagic's hosted agent:
393
+
394
+ - \`@docs foo.md\` means the file \`engine/agent-docs/foo.md\`, and \`samples/foo\` means
395
+ \`engine/agent-docs/samples/foo.ts\`. Just read the file.
396
+ - Where a doc tells you to run \`node bin/voxel.mjs\` or \`bin/world-edit.mjs\`, or to call
397
+ \`configure_game\`, \`generate_character\` or \`runWorldForger\`, those are the hosted agent's
398
+ tools and **do not exist here**. The equivalents are editing \`src/work/world.json\` directly, and
399
+ \`bitmagic generate\` / \`bitmagic forge\`. Everything else in the doc still applies.
400
+
401
+ Two counterweights, and they matter as much as the tiers:
402
+
403
+ - **Stop searching, start writing.** Do not pre-verify every API you intend to touch. Once you know
404
+ roughly what exists, write the code and run \`bitmagic check\` — a compiler error is cheaper and
405
+ far more precise than another search. If two searches for the same concept turn up nothing new,
406
+ that concept does not exist under that name.
407
+ - **A \`check\` error naming a symbol is a lookup, not a retry.** \`Cannot find name\`,
408
+ \`Property … does not exist on type\`, \`has no exported member\` and \`Cannot find module\` all
409
+ mean the NAME is wrong — not that the types need coaxing. Grep
410
+ \`engine/agent-docs/engine-api/\` for the real name before your next edit, and never widen a type,
411
+ cast, or add \`?.\` to make a wrong name compile: that ships a feature that type-checks and
412
+ silently never runs. Guessing a second time is how one bad symbol becomes a twenty-minute loop.
413
+
414
+ Batch it: issue independent greps and reads in one turn rather than one per turn.
415
+
325
416
  ## Imports
326
417
 
327
418
  Engine code is reached through path aliases, not relative paths:
@@ -354,7 +445,7 @@ the game has moved on from its artwork. It costs the creator real money each tim
354
445
 
355
446
  ## Before you change movement, cameras or rotation
356
447
 
357
- Read \`engine/docs/coordinate-system.md\`. Gameplay faces **+Z** while cameras face **−Z**, and
448
+ Read \`engine/agent-docs/coordinate-system.md\`. Gameplay faces **+Z** while cameras face **−Z**, and
358
449
  the two yaw conventions differ. Guessing produces code that compiles and moves the wrong way.
359
450
 
360
451
  ## Checking your work
@@ -566,6 +657,338 @@ Afterwards run \`bitmagic dev\` and actually walk the level — one that loads i
566
657
  one you can move through.
567
658
  `;
568
659
  }
660
+ /**
661
+ * `.claude/skills/planning-a-game/SKILL.md` — the slice contract and the mechanic-recipe routing.
662
+ *
663
+ * These are one skill rather than two on purpose: you route to a recipe *in order to* scope slice
664
+ * 1, and slice 1 is the first section of the plan file the recipe tells you to write. Split, the
665
+ * first instruction of each half would be "now invoke the other half" — and the hosted lane already
666
+ * paid for that hop (see game-play-agent's mechanic-recipe-router.ts: the batch's slowest game read
667
+ * the right recipe twice and still shipped with no plan file, because the plan step sat above the
668
+ * table rather than inside it).
669
+ *
670
+ * They are also deliberately NOT in AGENTS.md, which carries only the trigger and a compressed
671
+ * version. `bitmagic upgrade` refreshes AGENTS.md only while it is byte-identical to what the CLI
672
+ * wrote, but overwrites shipped skills unconditionally — so a creator who has customised their
673
+ * AGENTS.md still receives every word of this.
674
+ */
675
+ export function renderPlanningSkill() {
676
+ return `---
677
+ name: planning-a-game
678
+ description: Use before writing code for a new Bitmagic game, a new genre, or any change touching more than one gameplay feature — scoping the first playable slice, deciding what to defer, choosing which engine systems to use, or routing a genre (racing, shooter, tower defense, platformer, combat, driving, soccer, skiing) to its mechanic recipe. Produces mechanics-plan.md.
679
+ ---
680
+
681
+ # Planning a Bitmagic game
682
+
683
+ Two rules govern everything below. **Build the smallest playable thing first, then iterate with the
684
+ human.** And **plan on paper before you touch \`Game.ts\`** — planning after the code is written is
685
+ worthless.
686
+
687
+ Skip the plan for a single-mechanic edit ("raise jump height", "make the enemies faster", "add a
688
+ sword"), or when the human says it is just one thing. In doubt, write it.
689
+
690
+ ## Step 1 — read the design, then the recipe
691
+
692
+ \`GAME-DESIGN.md\` says what the game is. Read it first; if it is empty, write it (or ask), because
693
+ \`bitmagic cover\` generates the cover art from it and that art is the only thing the human has to
694
+ look at while you build.
695
+
696
+ If the idea names a genre, read its recipe **before you decide anything else**:
697
+
698
+ | The idea mentions… | Read |
699
+ |---|---|
700
+ | race, racing, lap, drift, circuit, derby, kart, F1, rally | \`engine/agent-docs/mechanic-racing.md\` |
701
+ | combat, fight, battle, arena, deathmatch, royale, gladiator, boss | \`engine/agent-docs/mechanic-combat.md\` |
702
+ | tower defense, TD, waves, defend, base | \`engine/agent-docs/mechanic-tower-defense.md\` |
703
+ | platformer, parkour, jumping, platforms | \`engine/agent-docs/mechanic-platformer.md\` |
704
+ | shooter, FPS, top-down shooter, twin-stick, guns | \`engine/agent-docs/mechanic-shooter.md\` |
705
+ | driving, GTA, open-world driving, traffic, cars | \`engine/agent-docs/mechanic-driving.md\` |
706
+ | soccer, football, kick a ball, penalty shootout, free kick | \`engine/agent-docs/mechanic-soccer.md\` |
707
+ | ski, skiing, snowboard, downhill, slope, piste, slalom, carve | \`engine/agent-docs/mechanic-skiing.md\` |
708
+
709
+ For the shape of the PLACE the game happens in, also read the matching
710
+ \`engine/agent-docs/archetype-*.md\` — \`arena\`, \`castle\`, \`city\`, \`dungeon\`, \`racetrack\`,
711
+ \`ruins\`, \`soccer\`, \`village\`, \`wilderness\`.
712
+
713
+ **The recipe's contract is binding** unless the human explicitly asked for something else: camera
714
+ mode, whether the player is an embodied walking character at all, the core systems, the win/lose
715
+ shape. First-person phrasing in a request ("I defend my castle", "I place towers") is how everyone
716
+ describes a game — it is NOT a request for a walking avatar with weapons.
717
+
718
+ If no recipe matches — survival, sandbox, a puzzle, something new — that is normal. Do not force the
719
+ nearest one; plan from the design doc.
720
+
721
+ ## Step 2 — do not build what the engine already ships
722
+
723
+ Check this before you plan a single asset or a single system. Most first slices need **no generated
724
+ assets at all**.
725
+
726
+ | The idea needs… | The engine already has | Read |
727
+ |---|---|---|
728
+ | A melee weapon — sword, axe, katana, spear, staff, lightsaber | 12 built-in procedural weapons | \`combat-system.md\` |
729
+ | A ranged weapon — pistol, rifle, bow, crossbow, bazooka, laser | Built-in set; aiming adapts to the camera mode | \`combat-system.md\` |
730
+ | Punching, kicking, martial arts | \`UnarmedMeleeSystem\`, animations pre-loaded | \`combat-system.md\` |
731
+ | Enemies that patrol, chase, attack, follow, flee, trade | NPC behaviours; NPCs use the built-in weapons too | \`npc-system.md\` |
732
+ | Animals, snakes, fish, birds, dragons | Procedural creature systems | \`animal-instructions.md\`, \`snake-instructions.md\` |
733
+ | Score, timers, health bars, game-over and win screens | HUD + end-game systems | \`HUD_ELEMENTS.md\`, \`end-game.md\` |
734
+ | A start screen — cover image, title, Play-button label | Start-screen system | \`START_SCREEN.md\` |
735
+ | Collectibles, pickups, checkpoints, markers | Dedicated systems | \`collectible-objects.md\`, \`markers-system.md\` |
736
+ | Doors, locked doors and their keys | \`worldProfileData.doors[]\` + \`keyItems[]\` | \`doors-and-locks.md\` |
737
+ | Moving platforms, elevators, crushers, conveyors, spinners | \`mechanisms[]\` in world.json | \`moving-platforms.md\` |
738
+ | Enterable buildings — bases, spawn rooms, shops | \`building\` hotspots, built at load time on any terrain | \`environment-objects.md\` |
739
+ | Achievements and XP | Real per-game achievements; never hand-build a tracker | \`achievements.md\` |
740
+ | Mining, chopping, digging | \`PlayerToolSystem\` + auto-wired block mining | \`voxel-mining.md\` |
741
+ | Skiing or snowboarding | A full descent motor, enabled by one world.json flag | \`mechanic-skiing.md\` |
742
+ | Save points, checkpoints, persistence | Persistence system | \`persistence-system.md\` |
743
+ | Multiple levels or arenas | \`levels[]\` registry + \`engine.loadLevel()\` | \`level-system.md\` |
744
+ | Voice input, speaking to NPCs | \`engine.enablePushToTalk()\` | \`voice-input.md\` |
745
+ | The default player and its animation set | Already there | — |
746
+
747
+ A built-in still covers the request when the human names a style ("a katana" → the built-in katana).
748
+ Only a clearly custom look ("a flaming katana with a skull hilt") justifies generating anything.
749
+ **Generation costs the creator real money** — see the \`generating-assets\` skill.
750
+
751
+ Drivable vehicles are the one exception worth knowing: the physics and AI are built in, but a
752
+ good-looking car comes from \`bitmagic generate vehicle\`, and \`--preset VAN\` builds a standard one
753
+ for free. Spawn it with \`engine.getVehicleSpawner().spawnAndEnterFromAsset(...)\`.
754
+
755
+ ## Step 3 — write \`mechanics-plan.md\`
756
+
757
+ At the project root, before you edit \`Game.ts\`, HUD code or engine wiring. Copy this and fill it in:
758
+
759
+ \`\`\`markdown
760
+ # Build plan — <game name>
761
+
762
+ ## Genre / archetype
763
+ 1–2 sentences: the loop. Recipe read: \`engine/agent-docs/mechanic-<genre>.md\` (or "none — planned
764
+ from GAME-DESIGN.md").
765
+
766
+ ## Contract from the recipe
767
+ Camera mode. Is the player an embodied walking character? Terrain form. Anything the recipe fixes
768
+ that I would otherwise have defaulted differently.
769
+
770
+ ## Slice 1 — the smallest playable thing
771
+ - Core verb: the ONE thing the player does
772
+ - Win: fires, even if the number is wrong
773
+ - Lose:
774
+ - On-screen feedback: score / timer / health
775
+ - Engine systems: one line each, naming the doc — \`engine/agent-docs/…\`
776
+ - Assets to generate: usually none. Justify every entry.
777
+ - Level: procedural baseline terrain, unless the terrain IS the mechanic
778
+
779
+ ## Deferred — the backlog
780
+ Numbered, roughly best-first. Everything the design implies that slice 1 does not do.
781
+ 1.
782
+ 2.
783
+ 3.
784
+
785
+ ## Open questions
786
+ Anything I had to guess. Ask after they have played slice 1, not before.
787
+ \`\`\`
788
+
789
+ Keep it current: after each slice, move what shipped out of the backlog and re-rank the rest. The
790
+ file is excluded from the publish fingerprint, so rewriting it never invalidates a passing verify.
791
+
792
+ ## Step 4 — build slice 1, in this order
793
+
794
+ 1. \`GAME-DESIGN.md\` written or confirmed.
795
+ 2. \`bitmagic cover\` — **now**, not later. It is the one paid generation slice 1 is allowed, it
796
+ takes minutes, and it is what the human looks at while you work. It writes \`world.json\`, so it
797
+ must come before any \`bitmagic verify\`.
798
+ 3. \`mechanics-plan.md\`.
799
+ 4. \`bitmagic dev\`, left running, so they can watch.
800
+ 5. Write the code. Look up APIs with the \`finding-engine-apis\` skill; do not read engine source to
801
+ find out what exists.
802
+ 6. \`bitmagic check\` until green.
803
+ 7. \`bitmagic reload\` (the Stop hook in \`.claude/settings.json\` does this for you).
804
+ 8. \`bitmagic verify\` — it boots the game in a real browser and clicks Play. A clean \`check\` is
805
+ not evidence the game runs.
806
+ 9. Report (below). Publish only if they ask.
807
+
808
+ **One forge, and only when the terrain IS the mechanic.** \`bitmagic forge\` runs for many minutes
809
+ and costs considerably more than any single generation. It belongs in slice 1 only for a game that
810
+ cannot be played without its shape — skiing, racing on a real circuit, open-world driving, an
811
+ enclosed dungeon interior. For everything else the baseline's procedural voxel terrain is a fine
812
+ slice-1 world and the forge is backlog item 1, run once the loop is proven.
813
+
814
+ ## Step 5 — hand it back
815
+
816
+ Short, concrete, and honest. Three parts:
817
+
818
+ - **Playable now** — one sentence, plus the literal control. "You can drive the kart and complete a
819
+ lap. It is already reloaded in your browser — W to accelerate, A/D to steer."
820
+ - **Not in yet, on purpose** — three to five items from the backlog, so they know it is a choice and
821
+ not a bug.
822
+ - **Next I would do** — two or three, numbered, in order. Then ask which.
823
+
824
+ Name every downgrade in the same breath: a generation that failed and left a placeholder, a forge
825
+ you skipped, a mechanic the recipe wanted that you deferred. They waited for it and cannot tell a
826
+ fallback from the real thing by looking.
827
+
828
+ Claim only what you actually built. A passing \`check\` is not a working feature, and a class you
829
+ constructed but never called is not wired. Trace each new behaviour from a live entry point —
830
+ \`load()\`, the update loop, an event handler — before you call it done.
831
+
832
+ ## After slice 1
833
+
834
+ Same loop, smaller: pick ONE backlog item (theirs if they chose, otherwise the top of your list),
835
+ build it, \`check\`, \`reload\`, \`verify\`, report. Re-rank the backlog each time. Resist bundling
836
+ three items into one pass — you lose the ability to tell them which change caused what they see.
837
+
838
+ **Green means stop.** Once the slice does what it said and \`check\` passes, write the report and
839
+ end. No renaming, restyling or unrequested polish: every edit after green risks breaking working
840
+ code.
841
+ `;
842
+ }
843
+ /**
844
+ * `.claude/skills/finding-engine-apis/SKILL.md` — the discovery protocol in full.
845
+ *
846
+ * The problem this exists to solve is measured, not hypothetical. game-play-agent's
847
+ * engine-api-digest.ts opens with it: session analysis showed the hosted coding agent spending most
848
+ * of its wall-clock reconstructing the engine's public API through dozens of sequential searches,
849
+ * and one digest lookup replaced several code searches. A scaffolded project had the same 240k
850
+ * lines and none of the digest until the corpus started shipping — so an external agent had no
851
+ * option but the expensive one.
852
+ */
853
+ export function renderEngineApiSkill() {
854
+ return `---
855
+ name: finding-engine-apis
856
+ description: Use when you need a Bitmagic engine API and do not know its exact name or signature — does class X have method Y, what parameters does it take, which engine system handles NPCs, HUD, vehicles, doors, multiplayer, collectibles or shaders. Also use when \`bitmagic check\` reports "Cannot find name", "Property does not exist", "has no exported member" or "Cannot find module" for an engine symbol.
857
+ ---
858
+
859
+ # Finding an engine API
860
+
861
+ \`engine/\` is ~240,000 lines across ~780 files. It is documented; read the documentation instead.
862
+
863
+ ## Tier 1 — the signature digest, first, always
864
+
865
+ \`engine/agent-docs/engine-api/\` holds a generated digest of the engine's entire public surface —
866
+ every class, method, function, interface and type, with signatures, bodies omitted, in the form
867
+ \`Class.method(params): ReturnType\`. \`engine-api.md\` is the index: it lists the 45 group docs and
868
+ every symbol each one contains.
869
+
870
+ \`\`\`
871
+ rg -n "spawnAsset" engine/agent-docs/engine-api/ # find a method
872
+ rg -n "class VehicleSpawner" engine/agent-docs/engine-api/ # find a class
873
+ rg -n "unlockAchievement|getSpawnPoints" engine/agent-docs/engine-api/ # several at once
874
+ \`\`\`
875
+
876
+ One grep here replaces a dozen searches in \`engine/\`, and it answers the question you usually
877
+ actually have: *does this exist, and what does it take?* Each group doc keeps its
878
+ \`## engine/<path>.ts\` headers, so a hit also tells you which source file to open if you need more.
879
+
880
+ The digest is generated from the engine, so it cannot be wrong about a signature — and it
881
+ deliberately contains no prose. When you need to know how something is *meant* to be used, go to
882
+ tier 2.
883
+
884
+ ## Tier 2 — the subsystem guides
885
+
886
+ ~83 prose docs in \`engine/agent-docs/\`. Find the row, read the doc.
887
+
888
+ | What you are doing | Read |
889
+ |---|---|
890
+ | Coordinates, forward direction, yaw, rotation, lookAt, spawn offsets | \`coordinate-system.md\` |
891
+ | NPCs, enemies, creatures, companions, pets, followers | \`npc-system.md\` (routes to the four \`npc-*\` docs) |
892
+ | NPC looks — block vs highres GLB, recolouring, animation packs | \`npc-appearance.md\` |
893
+ | NPC combat and death — HP, damage, ragdoll, exploding | \`npc-combat-death.md\` |
894
+ | Respawning or bulk NPC populations, \`NpcManager\` | \`npc-managers.md\` |
895
+ | NPC pathing, walkable targets, navmesh cell size | \`npc-navigation.md\` |
896
+ | Four-legged animals | \`animal-instructions.md\` |
897
+ | Snakes and other legless creatures | \`snake-instructions.md\` |
898
+ | Controls and input — mobile buttons, joystick, touch-to-move, fire buttons, key/button parity | \`control-system.md\` |
899
+ | Combat — weapons, damage, hit detection | \`combat-system.md\` |
900
+ | Any win / lose / you-died / victory / time-up / game-over screen | \`end-game.md\` |
901
+ | Achievements and XP — \`engine.unlockAchievement('<id>')\` | \`achievements.md\` |
902
+ | HUD elements — bars, scores, counters, timers | \`HUD_ELEMENTS.md\` |
903
+ | HUD visual style and themes | \`HUD_STYLE_GUIDE.md\`, \`HUD_THEMES.md\` |
904
+ | Start screen — cover image, title, Play-button label | \`START_SCREEN.md\` |
905
+ | Collectibles and interactables | \`collectible-objects.md\` |
906
+ | Placed scenery / \`environmentObjects\` — gameplay near props, harvesting, occupancy | \`environment-objects.md\` |
907
+ | Doors, locked gates, keycards | \`doors-and-locks.md\` |
908
+ | Custom voxel block types, block palettes, resolving block names | \`custom-block-types.md\` |
909
+ | Moving platforms, elevators, crushers, conveyors | \`moving-platforms.md\` |
910
+ | Multiplayer and networking | \`networking-system.md\` (routes to the six \`multiplayer-*\` docs) |
911
+ | Characters and animation | \`character-system.md\` |
912
+ | Playing custom motion clips — flips, kicks, punches | \`animation-assets.md\` |
913
+ | Using an uploaded animation as the player's run/idle | \`locomotion-assignment.md\` |
914
+ | Vehicles and driving | \`vehicle-system.md\`, \`vehicle-ai.md\` |
915
+ | A non-humanoid player — spacecraft, vehicle-only, custom controller | \`custom-player.md\` |
916
+ | Hiding / showing the player — i-frames, ghost mode, flicker | \`player-visibility.md\` |
917
+ | Spawning entities | \`spawning-system.md\` |
918
+ | Markers | \`markers-system.md\` |
919
+ | A top-down camera fitting the whole map | \`topdown-fit-camera.md\` |
920
+ | Save / load / checkpoints | \`persistence-system.md\` |
921
+ | Leaderboards, submitted scores, shared non-realtime data | \`game-data-service.md\` |
922
+ | Persistent shared multiplayer state, mini-MMO | \`world-persistence.md\` |
923
+ | JSON config assets | \`json-assets.md\` |
924
+ | Custom images via CSS \`background-image\` or \`<img>\` — must go through \`resolveAssetUrl\` | \`image-assets.md\` |
925
+ | Writing text onto a model's texture — jersey numbers, decals | \`texture-text.md\` |
926
+ | Audio playback | \`audio-system.md\`, \`audio-assets.md\` |
927
+ | Runtime AI — text, vision, image generation inside the game | \`ai-service.md\` |
928
+ | Voice input, speech-to-text, push-to-talk | \`voice-input.md\` |
929
+ | Physics and Three.js | \`physics-best-practices.md\` |
930
+ | Custom shaders and materials (WebGPU and WebGL paths both required) | \`custom-shaders.md\` |
931
+ | Lighting — many lamps, dynamic lights, WebGPU stutter | \`lighting-best-practices.md\` |
932
+ | Performance | \`performance-best-practices.md\` |
933
+ | Terrain foliage, ground cover, voxel terrain | \`voxel-terrain-foliage.md\` |
934
+ | Mining and block breaking | \`voxel-mining.md\` |
935
+ | Multiple levels, level select, switching worlds at runtime | \`level-system.md\` |
936
+ | Skyboxes | \`skybox-system.md\` |
937
+ | Weather and snow | \`weather-snow.md\` |
938
+ | 2D side-on physics games | \`physics2d-genre.md\` |
939
+
940
+ \`engine/agent-docs/samples/\` holds compile-checked reference implementations — a doc that cites
941
+ \`samples/raycast-ground-check\` means \`engine/agent-docs/samples/raycast-ground-check.ts\`, and it
942
+ compiles against this engine.
943
+
944
+ ## Tier 3 — the source
945
+
946
+ Only for an implementation detail a signature and a guide cannot answer. Search, do not browse:
947
+ \`rg -n "class VoxelObject" engine/\`, narrowed with a path. Never read a large engine file end to
948
+ end.
949
+
950
+ ## Two conventions in the docs
951
+
952
+ These docs are shared with Bitmagic's hosted agent, so two things read oddly here:
953
+
954
+ - **\`@docs foo.md\` means \`engine/agent-docs/foo.md\`.** Just read the file.
955
+ - **Tools that do not exist here.** Where a doc says to run \`node bin/voxel.mjs\` or
956
+ \`bin/world-edit.mjs\`, or to call \`configure_game\`, \`generate_character\`,
957
+ \`manage-achievements\` or \`runWorldForger\`, those belong to the hosted agent. Your equivalents:
958
+
959
+ | The doc says | You do |
960
+ |---|---|
961
+ | \`configure_game\`, \`manage-achievements\`, \`manage-levels\`, \`spawnpoint upsert\` | edit \`src/work/world.json\` directly |
962
+ | \`node bin/voxel.mjs\` / \`bin/world-edit.mjs\` | edit \`src/work/world.json\` directly |
963
+ | \`generate_character\`, \`design-vehicle\`, skybox/sound/image/animation generation | \`bitmagic generate <type>\` |
964
+ | \`runWorldForger\` / \`run-world-forger\` | \`bitmagic forge\` |
965
+
966
+ Everything else in the doc — the engine APIs, the world.json shape, the gotchas — still applies.
967
+
968
+ ## The two rules that keep this cheap
969
+
970
+ **Stop searching, start writing.** Do not pre-verify every API you plan to touch. Once you know
971
+ roughly what exists, write the implementation and run \`bitmagic check\` — compiler errors are
972
+ cheaper and more precise than more searching. If two searches for the same concept return nothing
973
+ new, the concept does not exist under that name: check the digest index or move on.
974
+
975
+ **A symbol error is a lookup, not a retry.** When \`bitmagic check\` says \`Cannot find name X\`,
976
+ \`Property X does not exist on type Y\`, \`has no exported member X\` or \`Cannot find module\`, the
977
+ name is wrong and your recall is wrong. That is not a type mismatch. Grep
978
+ \`engine/agent-docs/engine-api/\` for the real name — or confirm it is gone and delete the call —
979
+ **before** your next edit. Do not re-edit from memory, do not churn the import path, and above all
980
+ do not widen the type, cast, or add \`?.\` to make a wrong name compile: that ships a feature that
981
+ type-checks and silently never runs.
982
+
983
+ **Batch it.** Issue independent greps and reads in one turn, not one per turn.
984
+
985
+ ## What the docs do not cover
986
+
987
+ Your own game, \`src/work/\`. And \`world.json\` — its shape is documented per-feature in the guides
988
+ above, but the file itself is shared with the human, who may be dragging objects in the editor while
989
+ you work. Re-read it before editing it.
990
+ `;
991
+ }
569
992
  export function renderGenerateSkill() {
570
993
  return `---
571
994
  name: generating-assets
@@ -691,9 +1114,16 @@ project root for the guidance an agent should read before editing this game.
691
1114
 
692
1115
  ## Which of these are yours
693
1116
 
694
- \`generating-assets/\` — and this README — are shipped by the Bitmagic CLI and **re-rendered by
695
- \`bitmagic upgrade\`**. They describe what the CLI can do, so they have to stay current with it;
696
- edits to them are lost on the next upgrade.
1117
+ \`planning-a-game/\`, \`finding-engine-apis/\`, \`generating-assets/\` — and this README — are
1118
+ shipped by the Bitmagic CLI and **re-rendered by \`bitmagic upgrade\`**. They describe what the CLI
1119
+ and the engine can do, so they have to stay current with both; edits to them are lost on the next
1120
+ upgrade.
1121
+
1122
+ | Skill | Use it when |
1123
+ |---|---|
1124
+ | \`planning-a-game/\` | starting a game, a genre, or anything touching more than one gameplay feature — scoping the first playable slice and writing \`mechanics-plan.md\` |
1125
+ | \`finding-engine-apis/\` | you need an engine API and do not know its name or signature, or \`bitmagic check\` cannot resolve a symbol |
1126
+ | \`generating-assets/\` | the game needs a skybox, sound, image, character, animation or vehicle |
697
1127
 
698
1128
  Every other directory here is yours. \`upgrade\` never opens a skill it does not ship, and never
699
1129
  deletes anything under \`.claude/\`. Put project-specific guidance in a skill of your own, or in
@@ -1 +1 @@
1
- {"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,2BAA2B,EAAE,SAAS;IACtC,2BAA2B,EAAE,SAAS;IACtC,kBAAkB,EAAE,QAAQ;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,kCAAkC,EAAE,QAAQ;IAC5C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,UAAU;IACzB,cAAc,EAAE,UAAU;IAC1B,8FAA8F;IAC9F,cAAc,EAAE,QAAQ;IACxB,4FAA4F;IAC5F,mFAAmF;IACnF,eAAe,EAAE,SAAS;IAC1B,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,QAAQ;IACd,wBAAwB,EAAE,QAAQ;CACnC,CAAC;AAEF;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqKR,CAAC;AACF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuER,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC9C,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3B,OAAO;;EAEP,KAAK;QACH,CAAC,CAAC,8GAA8G;QAChH,CAAC,CAAC,0KAA0K;;;;EAI9K,KAAK,IAAI,iEAAiE;;;;;;;;;;;;;;CAc3E,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AACF,CAAC"}
@@ -15,6 +15,23 @@ export interface TemplateEntry {
15
15
  * parallel copy that silently goes stale when an entry is added here.
16
16
  */
17
17
  export declare const VENDORED_DIRS: string[];
18
+ /**
19
+ * Vendored the same way as VENDORED_DIRS, but copied only when the extracted tree actually has
20
+ * them — a missing one is not a corrupt tarball.
21
+ *
22
+ * That distinction is not stylistic. The engine tarball is built by the NIGHTLY workflow, while
23
+ * the CLI publishes to npm on its own schedule, so there is always a window in which a freshly
24
+ * published CLI runs against the previous night's tarball. A required entry would turn that window
25
+ * into a hard `CliError` on every single `bitmagic init` and `bitmagic upgrade` — the whole
26
+ * product, down, over a directory of markdown. `sw-cache-buster.js` already carries this reasoning
27
+ * for the same reason; this is the directory-shaped version of it.
28
+ *
29
+ * `agent-docs` is the shared docs corpus: the generated engine-api/ signature digest, ~83 feature
30
+ * and genre guides, and compile-checked samples/. It is what stops an agent reading 242k lines of
31
+ * engine source to find out what exists, so a project without it is degraded — but degraded is
32
+ * survivable and a hard failure is not.
33
+ */
34
+ export declare const OPTIONAL_VENDORED_DIRS: string[];
18
35
  /**
19
36
  * The subset of the generated files that are pure platform output: regenerated byte-for-byte
20
37
  * from these renderers with no creator content ever entering them. `bitmagic upgrade` overwrites
@@ -2,7 +2,7 @@ import * as fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import { CliError } from '../errors.js';
4
4
  import { aliasSourceDir } from './aliases.js';
5
- import { renderPackageJson, renderTsconfig, renderIndexHtml, renderViteConfig, renderVitePublishConfig, renderGitignore, renderBitmagicJson, renderAgentsMd, renderGameDesignMd, renderClaudeMd, renderSkillsReadme, renderGenerateSkill, } from './project-files.js';
5
+ import { renderPackageJson, renderTsconfig, renderIndexHtml, renderViteConfig, renderVitePublishConfig, renderGitignore, renderBitmagicJson, renderAgentsMd, renderGameDesignMd, renderClaudeMd, renderSkillsReadme, renderGenerateSkill, renderPlanningSkill, renderEngineApiSkill, } from './project-files.js';
6
6
  import { hashAgentsMd } from './agents-md.js';
7
7
  import { CLAUDE_SETTINGS_FILE, renderClaudeSettings } from './claude-settings.js';
8
8
  /**
@@ -22,10 +22,26 @@ export const VENDORED_DIRS = [
22
22
  'debug',
23
23
  'editor',
24
24
  'genres',
25
- 'docs',
26
25
  'utils',
27
26
  'core',
28
27
  ];
28
+ /**
29
+ * Vendored the same way as VENDORED_DIRS, but copied only when the extracted tree actually has
30
+ * them — a missing one is not a corrupt tarball.
31
+ *
32
+ * That distinction is not stylistic. The engine tarball is built by the NIGHTLY workflow, while
33
+ * the CLI publishes to npm on its own schedule, so there is always a window in which a freshly
34
+ * published CLI runs against the previous night's tarball. A required entry would turn that window
35
+ * into a hard `CliError` on every single `bitmagic init` and `bitmagic upgrade` — the whole
36
+ * product, down, over a directory of markdown. `sw-cache-buster.js` already carries this reasoning
37
+ * for the same reason; this is the directory-shaped version of it.
38
+ *
39
+ * `agent-docs` is the shared docs corpus: the generated engine-api/ signature digest, ~83 feature
40
+ * and genre guides, and compile-checked samples/. It is what stops an agent reading 242k lines of
41
+ * engine source to find out what exists, so a project without it is degraded — but degraded is
42
+ * survivable and a hard failure is not.
43
+ */
44
+ export const OPTIONAL_VENDORED_DIRS = ['agent-docs'];
29
45
  /**
30
46
  * The subset of the generated files that are pure platform output: regenerated byte-for-byte
31
47
  * from these renderers with no creator content ever entering them. `bitmagic upgrade` overwrites
@@ -61,6 +77,8 @@ export const PLATFORM_GENERATED_FILES = [
61
77
  ['index.html', renderIndexHtml],
62
78
  ['.claude/skills/README.md', renderSkillsReadme],
63
79
  ['.claude/skills/generating-assets/SKILL.md', renderGenerateSkill],
80
+ ['.claude/skills/planning-a-game/SKILL.md', renderPlanningSkill],
81
+ ['.claude/skills/finding-engine-apis/SKILL.md', renderEngineApiSkill],
64
82
  ];
65
83
  export function resolveTemplate(templatesDir, requestedId) {
66
84
  const indexPath = path.join(templatesDir, 'index.json');
@@ -106,6 +124,12 @@ export function scaffoldProject(options) {
106
124
  }
107
125
  fs.cpSync(source, path.join(engineDir, dir), { recursive: true });
108
126
  }
127
+ for (const dir of OPTIONAL_VENDORED_DIRS) {
128
+ const source = path.join(extractedEngineDir, dir);
129
+ if (fs.existsSync(source)) {
130
+ fs.cpSync(source, path.join(engineDir, dir), { recursive: true });
131
+ }
132
+ }
109
133
  // The game: the genre baseline, then the template overlaid on top. Contents are copied, not
110
134
  // the directory itself — a nested src/work/<genre>/ would break every relative import in
111
135
  // Game.ts. This is a second copy of the same baseline vendored above as engine/genres/: that
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAYlF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;CACP,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAkC;IACrE,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,wBAAwB,EAAE,uBAAuB,CAAC;IACnD,CAAC,YAAY,EAAE,eAAe,CAAC;IAC/B,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;IAChD,CAAC,2CAA2C,EAAE,mBAAmB,CAAC;CACnE,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,YAAoB,EAAE,WAAoB;IACxE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE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,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC,eAAe,EAAE,kBAAkB,CAAC,EAAE,GAAG,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5F,CAAC,WAAW,EAAE,QAAQ,CAAC;QACvB,0FAA0F;QAC1F,6EAA6E;QAC7E,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;QAC/B,CAAC,YAAY,EAAE,eAAe,EAAE,CAAC;QACjC,8FAA8F;QAC9F,+FAA+F;QAC/F,mCAAmC;QACnC,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,CAAC;KAC/C,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC5C,wFAAwF;QACxF,+EAA+E;QAC/E,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import * as fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import { CliError } from '../errors.js';
4
- import { VENDORED_DIRS, PLATFORM_GENERATED_FILES } from './project.js';
4
+ import { VENDORED_DIRS, OPTIONAL_VENDORED_DIRS, PLATFORM_GENERATED_FILES } from './project.js';
5
5
  import { reconcileAgentsMd, AGENTS_MD_FILE } from './agents-md.js';
6
6
  import { CLAUDE_SETTINGS_FILE, mergeReloadHook } from './claude-settings.js';
7
7
  /**
@@ -52,6 +52,14 @@ export function upgradeProject(options) {
52
52
  for (const dir of VENDORED_DIRS) {
53
53
  fs.cpSync(path.join(extractedEngineDir, dir), path.join(engineDir, dir), { recursive: true });
54
54
  }
55
+ // Copied only when present — see OPTIONAL_VENDORED_DIRS. Upgrading onto a tarball that predates
56
+ // the docs corpus must leave a working project, not a half-replaced engine/ and an error.
57
+ for (const dir of OPTIONAL_VENDORED_DIRS) {
58
+ const source = path.join(extractedEngineDir, dir);
59
+ if (fs.existsSync(source)) {
60
+ fs.cpSync(source, path.join(engineDir, dir), { recursive: true });
61
+ }
62
+ }
55
63
  replaced.push('engine/');
56
64
  // Same "missing is not corrupt" allowance as scaffoldProject: a tarball published before this
57
65
  // feature shipped simply won't have it, and upgrade must not fail a project onto that tarball.
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-project.js","sourceRoot":"","sources":["../../src/scaffold/upgrade-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAwB,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAyB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,cAAc,CAAC,OAAuB;IACpD,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAC5D,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;QAClD,IAAI,CAAC,EAAE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CAAC;IACrD,IAAI,QAAQ,CAAC,WAAW,KAAK,SAAS;QAAE,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC;IACjF,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW;QAAE,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAEpG,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACzE,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAE/B,OAAO;QACL,aAAa;QACb,qBAAqB;QACrB,QAAQ;QACR,QAAQ;QACR,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;KACvF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "type": "module",
6
6
  "bin": {