@bitmagic/cli 0.1.26 → 0.1.28

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/README.md CHANGED
@@ -18,13 +18,18 @@ bitmagic --version
18
18
  bitmagic login # device-code auth in your browser
19
19
  bitmagic init my-game # scaffold a new project into ./my-game
20
20
  cd my-game
21
+ bitmagic dev & # FIRST, and in the background — it never exits
22
+ # then open http://localhost:3011/ and leave it open
21
23
  bitmagic cover # generate cover art from GAME-DESIGN.md
22
24
  bitmagic check # typecheck against the vendored engine
23
- bitmagic dev # build, then serve the game + editor, and leave it running
24
- bitmagic verify # boot the game in a real browser and report what broke
25
- bitmagic publish # verify-gate, build, and ship — private by default
25
+ bitmagic verify # boot the game in a real browser and report what broke
26
+ bitmagic publish # verify-gate, build, and ship private by default
26
27
  ```
27
28
 
29
+ **Start `bitmagic dev` first, not last.** It is a long-running server, so an agent working through
30
+ a list tends to leave it until the end — and then nobody saw the game get built. Started first, the
31
+ browser reloads itself on every change and the assets panel shows each generation as it runs.
32
+
28
33
  ## Commands
29
34
 
30
35
  | Command | What it does |
@@ -52,10 +52,19 @@ function installDependencies(dir) {
52
52
  return true;
53
53
  }
54
54
  /**
55
- * `bitmagic cover` is listed BEFORE `bitmagic check`, and that order is the point: the cover is
56
- * generated from GAME-DESIGN.md, so it exists while the agent's first implementation pass runs
57
- * rather than arriving after it. Generating one afterwards works identically — it is simply no
58
- * longer something to look at during the wait.
55
+ * The order here is the whole content of this function, and every entry is placed by when it stops
56
+ * being useful rather than by when it is convenient to run.
57
+ *
58
+ * `bitmagic dev` is first, and annotated as long-running, because agents were reliably starting it
59
+ * LAST — after the game was already built. Read as a list of commands to work through, a
60
+ * never-exiting server is the one you defer, and deferring it means the person waiting saw none of
61
+ * the build: no reloads, no assets panel, no way to steer. Naming it as a background task is what
62
+ * makes it startable at step one.
63
+ *
64
+ * `bitmagic cover` is listed before `bitmagic check` for the same reason: the cover is generated
65
+ * from GAME-DESIGN.md, so it exists while the agent's first implementation pass runs rather than
66
+ * arriving after it. Generating one afterwards works identically — it is simply no longer something
67
+ * to look at during the wait.
59
68
  */
60
69
  function printNextSteps(output, dir, gameId, installSucceeded, hasIdea) {
61
70
  output.info('');
@@ -66,6 +75,8 @@ function printNextSteps(output, dir, gameId, installSucceeded, hasIdea) {
66
75
  if (!installSucceeded) {
67
76
  output.info(' npm install');
68
77
  }
78
+ output.info(' bitmagic dev # IN THE BACKGROUND — it never exits. Open http://localhost:3011/');
79
+ output.info(' # Start it FIRST: it is how the human watches the game get built.');
69
80
  if (!hasIdea) {
70
81
  output.info(' # write GAME-DESIGN.md — the cover art is generated from it');
71
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.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,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,IAAI,GAAG;IACX,KAAK,EA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K;oBACrB,QAAQ,EAAE,QAAQ,CAAC,EAAE;iBACtB;gBACD,WAAW;gBACX,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxD,CAAC,CAAC;YAEH,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;YACxD,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;YAC7F,MAAM,CAAC,MAAM,CAAC;gBACZ,EAAE,EAAE,IAAI;gBACR,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,QAAQ,CAAC,EAAE;gBACrB,KAAK,EAAE,QAAQ,CAAC,KAAK;gBACrB,aAAa,EAAE,QAAQ,CAAC,OAAO;gBAC/B,uFAAuF;gBACvF,qBAAqB,EAAE,gBAAgB;gBACvC,2FAA2F;gBAC3F,eAAe,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;aACzC,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"}
@@ -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,MAAM,gCAAgC,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAiD,MAAM,gCAAgC,CAAC;AACjH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAEjF,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,KAAK,EAAE,CAAC,EAAU,EAAE,E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,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -41,6 +41,7 @@
41
41
  */
42
42
  import * as fs from 'fs';
43
43
  import * as path from 'path';
44
+ import { readDevHandle } from './dev-handle.js';
44
45
  export const JOBS_DIR = path.join('.bitmagic', 'jobs');
45
46
  /** Failed records are kept so the creator can see why nothing appeared — but not forever. */
46
47
  const FAILED_RECORD_TTL_MS = 24 * 60 * 60 * 1000;
@@ -204,6 +205,31 @@ export function pruneJobs(root, now = Date.now()) {
204
205
  }
205
206
  return removed;
206
207
  }
208
+ /**
209
+ * Said at most once per process, and only when a generation starts with nothing watching.
210
+ *
211
+ * The docs tell an agent to start `bitmagic dev` first; agents skim docs. This fires at the one
212
+ * moment the advice is unarguable — a paid, minutes-long generation is about to run and produce no
213
+ * visible sign anywhere — and it is the cheapest place to catch the mistake, because the fix
214
+ * (start it now) still salvages the rest of the session.
215
+ *
216
+ * A stale handle from a `dev` that was SIGKILLed means this stays quiet when it could have spoken.
217
+ * That is the right direction to fail: a missed nudge costs a little visibility, while telling
218
+ * someone to start a server they are already running teaches them to ignore the line.
219
+ */
220
+ let nudgedAboutDev = false;
221
+ function nudgeIfNothingIsWatching(root, log) {
222
+ if (nudgedAboutDev)
223
+ return;
224
+ nudgedAboutDev = true;
225
+ // A running dev server writes this handle; the HQ generation the sidecar itself runs therefore
226
+ // never reaches the message below, which is correct — that one is being watched by definition.
227
+ if (readDevHandle(root) !== null)
228
+ return;
229
+ log('Note: no `bitmagic dev` is running, so nobody can see this happen. Start one in the '
230
+ + 'background — it shows each generation\'s progress while it runs and reloads the game when '
231
+ + 'it lands.');
232
+ }
207
233
  export function startJob(options) {
208
234
  const now = new Date().toISOString();
209
235
  const record = {
@@ -249,6 +275,7 @@ export async function withJobRecord(options, body) {
249
275
  catch {
250
276
  // See above: no record is a worse dev view, not a failed generation.
251
277
  }
278
+ nudgeIfNothingIsWatching(options.root, options.log);
252
279
  const log = (message) => {
253
280
  options.log(message);
254
281
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/project/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAwB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,OAAO,CAAC,IAAY,EAAE,KAAa;IAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAS,QAAQ,CAAC,IAAa;IAC7B,QAAQ,IAAI,CAAC,CAAC;IACd,OAAO,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAY,EAAE,MAAiB;IAClD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,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IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7E,IAAI,QAAQ,KAAK,IAAI;YAAE,OAAO;QAC9B,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACnG,CAAC;IAAC,MAAM,CAAC;QACP,8EAA8E;IAChF,CAAC;AACH,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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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;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D,yFAAyF;AACzF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAkBrD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IA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,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,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAczD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,WAAwB,EACxB,WAAmB,EACnB,IAAa;IAEb,OAAO,MAAM,CAAiB,WAAW,EAAE,6BAA6B,EAAE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AC"}
@@ -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
  }
@@ -292,6 +298,34 @@ export function renderBitmagicJson(metadata) {
292
298
  export function renderAgentsMd() {
293
299
  return `# Working on this Bitmagic game
294
300
 
301
+ ## Start \`bitmagic dev\` before you build anything
302
+
303
+ **This is the first command you run in a session, not the last.**
304
+
305
+ \`\`\`
306
+ bitmagic dev # long-running — start it IN THE BACKGROUND and leave it up
307
+ \`\`\`
308
+
309
+ \`bitmagic dev\` never exits: it builds, then serves the game and the editor at
310
+ \`http://localhost:3011/\` until it is interrupted. **Run it as a background task.** Run it in the
311
+ foreground and you will block until the session is killed, which is the mistake worth naming
312
+ because the way to avoid it is to defer the command — and deferring it is the failure this section
313
+ exists to prevent.
314
+
315
+ The point is not the server. The point is that the person who asked for this game is sitting in
316
+ front of that page, and everything below assumes they can see what you are doing:
317
+
318
+ - The game reloads by itself every time you change it, so they watch it take shape.
319
+ - The assets panel lists every generation while it runs, with your prompt and progress. A forge
320
+ takes twenty minutes; started with no dev view up, those twenty minutes look identical to a
321
+ crash.
322
+ - They can move objects in the Editor tab and screenshot a problem straight to you.
323
+
324
+ Started at the end, all of that is a server nobody needed. A game that appeared in one silent hour
325
+ is worth less than a rough one they watched arrive, because they could not steer the first.
326
+
327
+ If you are unsure whether one is already running, \`bitmagic reload\` says so and costs nothing.
328
+
295
329
  ## Layout
296
330
 
297
331
  - \`src/work/\` — **your game.** Everything you write lives here. \`Game.ts\` is the entry
@@ -301,12 +335,23 @@ export function renderAgentsMd() {
301
335
  directory breaks the game at runtime even though it still typechecks.
302
336
  - \`engine/\` — **the Bitmagic engine, read-only.** It is vendored by the CLI and replaced
303
337
  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.
338
+ - \`engine/agent-docs/\` — **the engine's documentation, and the fastest thing in this project.**
339
+ \`engine-api/\` is a generated signature digest covering every public engine class, method and
340
+ type; the ~83 \`*.md\` files are the per-subsystem guides, including \`mechanic-*.md\` genre
341
+ recipes and \`archetype-*.md\` world recipes; \`samples/\` holds compile-checked reference code.
342
+ See **Finding an engine API** below. Reading \`engine/\` source to find out what exists is the one
343
+ habit that turns a ten-minute change into an hour.
305
344
  - \`GAME-DESIGN.md\` — **what this game is.** Yours to write and keep current. Nothing compiles it,
306
345
  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.
346
+ - \`mechanics-plan.md\` — **how the game gets built, and in what order.** Yours to write and rewrite
347
+ each slice: \`GAME-DESIGN.md\` says what the game *is*, this says what ships next and what is
348
+ deliberately deferred. Nothing reads it but you and the human, and it is excluded from the publish
349
+ fingerprint, so revising it never invalidates a passing \`bitmagic verify\`.
350
+ - \`.claude/skills/\` — **shipped by the CLI, re-rendered by \`bitmagic upgrade\`:**
351
+ \`planning-a-game/\` (what to build first and in what order), \`finding-engine-apis/\` (where the
352
+ engine's APIs are documented), and \`generating-assets/\` (the CLI's own generation commands).
353
+ They document the CLI and the engine, so they stay current with both; edits to them are lost.
354
+ Skills you add yourself are never touched.
310
355
  - \`.claude/settings.json\` — **yours**, seeded with one Stop hook that runs \`bitmagic reload\` so
311
356
  the owner's browser refreshes when you finish a turn. \`upgrade\` adds that hook if it is missing
312
357
  and changes nothing else, so your permissions and your own hooks are safe here.
@@ -322,6 +367,80 @@ imports your game. Renaming or removing the \`VoxelGame\` export from \`src/work
322
367
  typechecks against that declaration — it only fails at runtime, when the engine actually loads
323
368
  the module and finds the export missing.
324
369
 
370
+ ## Build the smallest playable thing first
371
+
372
+ Do not build the whole game in one pass. Build **slice 1** — the smallest thing that is genuinely
373
+ playable — put it in front of the person waiting, then iterate with them. They are watching
374
+ \`bitmagic dev\` in a browser while you work: a slice they can play in ten minutes is worth more than
375
+ a finished game in an hour they could not see, and it is the only way you find out you misread the
376
+ idea before you have built an hour on top of it.
377
+
378
+ Slice 1 is done when all five are true:
379
+
380
+ 1. The player spawns and can move. The genre baseline already does this — do not rebuild it.
381
+ 2. **One** verb from the core loop works — the jump, the shot, the pickup, the lap. One, not the loop.
382
+ 3. One win and one lose exist and actually fire. The numbers being wrong is fine; not firing is not.
383
+ 4. Something on screen says how the player is doing — a score, a timer, a health bar.
384
+ 5. \`bitmagic check\` and \`bitmagic verify\` both pass.
385
+
386
+ Everything else is slice 2 and later: a second weapon, enemy variety, tuning, menus, sound, more
387
+ levels, polish. Write them down in \`mechanics-plan.md\`; do not build them.
388
+
389
+ **If the idea names a genre, read the recipe before you decide anything.** Racing, combat, tower
390
+ defense, platformer, shooter, driving, soccer and skiing each have
391
+ \`engine/agent-docs/mechanic-<genre>.md\`, and its contract — camera mode, whether the player is a
392
+ walking character at all, core systems, win/lose shape — is binding unless the human asked
393
+ otherwise. Read it, then write \`mechanics-plan.md\`, then write code. Skip the plan only for a
394
+ single-mechanic edit ("raise jump height", "add a sword"); in doubt, write it.
395
+
396
+ Then **stop and report**: what plays now, what you deliberately left out, and the two or three
397
+ things you would do next, in order. Let them choose. Do not publish unless they ask.
398
+
399
+ The full contract — what counts as a core verb, what the engine already ships so you never build it,
400
+ the \`mechanics-plan.md\` skeleton, and the loop after slice 1 — is in the \`planning-a-game\` skill.
401
+
402
+ ## Finding an engine API
403
+
404
+ The vendored engine is ~240,000 lines. Reading it to discover what exists is the most expensive
405
+ mistake available in this project, and it is almost never necessary. Three tiers — go down them in
406
+ order and stop at the first that answers you.
407
+
408
+ 1. **\`engine/agent-docs/engine-api/\`** — a generated digest of every public engine class, method,
409
+ function, interface and type, signatures only, bodies omitted. Grep it for the symbol you want —
410
+ \`rg -n "spawnAsset" engine/agent-docs/engine-api/\` — and read the group doc it lands in.
411
+ \`engine-api.md\` is the index of the 45 groups. One grep here replaces a dozen searches in
412
+ \`engine/\`.
413
+ 2. **\`engine/agent-docs/*.md\`** — the prose guides, one per subsystem (\`npc-system.md\`,
414
+ \`vehicle-system.md\`, \`collectible-objects.md\`, \`end-game.md\`, \`HUD_ELEMENTS.md\`, …). Read
415
+ one when you need to know how a subsystem is *meant to be used*, which a signature cannot tell
416
+ you. The \`finding-engine-apis\` skill carries the feature-to-doc table — use it instead of
417
+ guessing filenames.
418
+ 3. **\`engine/\` source** — last resort, for an implementation detail neither of the above answers.
419
+
420
+ Two conventions in those docs, because they are shared with Bitmagic's hosted agent:
421
+
422
+ - \`@docs foo.md\` means the file \`engine/agent-docs/foo.md\`, and \`samples/foo\` means
423
+ \`engine/agent-docs/samples/foo.ts\`. Just read the file.
424
+ - Where a doc tells you to run \`node bin/voxel.mjs\` or \`bin/world-edit.mjs\`, or to call
425
+ \`configure_game\`, \`generate_character\` or \`runWorldForger\`, those are the hosted agent's
426
+ tools and **do not exist here**. The equivalents are editing \`src/work/world.json\` directly, and
427
+ \`bitmagic generate\` / \`bitmagic forge\`. Everything else in the doc still applies.
428
+
429
+ Two counterweights, and they matter as much as the tiers:
430
+
431
+ - **Stop searching, start writing.** Do not pre-verify every API you intend to touch. Once you know
432
+ roughly what exists, write the code and run \`bitmagic check\` — a compiler error is cheaper and
433
+ far more precise than another search. If two searches for the same concept turn up nothing new,
434
+ that concept does not exist under that name.
435
+ - **A \`check\` error naming a symbol is a lookup, not a retry.** \`Cannot find name\`,
436
+ \`Property … does not exist on type\`, \`has no exported member\` and \`Cannot find module\` all
437
+ mean the NAME is wrong — not that the types need coaxing. Grep
438
+ \`engine/agent-docs/engine-api/\` for the real name before your next edit, and never widen a type,
439
+ cast, or add \`?.\` to make a wrong name compile: that ships a feature that type-checks and
440
+ silently never runs. Guessing a second time is how one bad symbol becomes a twenty-minute loop.
441
+
442
+ Batch it: issue independent greps and reads in one turn rather than one per turn.
443
+
325
444
  ## Imports
326
445
 
327
446
  Engine code is reached through path aliases, not relative paths:
@@ -354,18 +473,19 @@ the game has moved on from its artwork. It costs the creator real money each tim
354
473
 
355
474
  ## Before you change movement, cameras or rotation
356
475
 
357
- Read \`engine/docs/coordinate-system.md\`. Gameplay faces **+Z** while cameras face **−Z**, and
476
+ Read \`engine/agent-docs/coordinate-system.md\`. Gameplay faces **+Z** while cameras face **−Z**, and
358
477
  the two yaw conventions differ. Guessing produces code that compiles and moves the wrong way.
359
478
 
360
479
  ## Checking your work
361
480
 
362
481
  \`\`\`
363
482
  bitmagic check # typecheck against the vendored engine
364
- bitmagic dev # build, then serve the game + editor with auto-reload (leave this running)
365
483
  bitmagic reload # tell the open browser you have finished a round of edits
366
484
  bitmagic verify # boot the game in a real browser and report what broke
367
485
  \`\`\`
368
486
 
487
+ (\`bitmagic dev\` belongs at the START of the session — see the top of this file.)
488
+
369
489
  The engine is large; \`check\` is the fast way to find out whether an edit holds together.
370
490
 
371
491
  **Run \`bitmagic reload\` when you finish a round of edits.** \`bitmagic dev\` watches the project
@@ -562,8 +682,343 @@ Five things worth knowing:
562
682
  message says when resuming is worth it, and when the failure is deterministic and you should
563
683
  change the prompt instead.
564
684
 
565
- Afterwards run \`bitmagic dev\` and actually walk the level — one that loads is not necessarily
566
- one you can move through.
685
+ Afterwards actually walk the level in the dev view — one that loads is not necessarily one you can
686
+ move through. (You should already have \`bitmagic dev\` running; a forge takes twenty minutes, and
687
+ its progress shows there.)
688
+ `;
689
+ }
690
+ /**
691
+ * `.claude/skills/planning-a-game/SKILL.md` — the slice contract and the mechanic-recipe routing.
692
+ *
693
+ * These are one skill rather than two on purpose: you route to a recipe *in order to* scope slice
694
+ * 1, and slice 1 is the first section of the plan file the recipe tells you to write. Split, the
695
+ * first instruction of each half would be "now invoke the other half" — and the hosted lane already
696
+ * paid for that hop (see game-play-agent's mechanic-recipe-router.ts: the batch's slowest game read
697
+ * the right recipe twice and still shipped with no plan file, because the plan step sat above the
698
+ * table rather than inside it).
699
+ *
700
+ * They are also deliberately NOT in AGENTS.md, which carries only the trigger and a compressed
701
+ * version. `bitmagic upgrade` refreshes AGENTS.md only while it is byte-identical to what the CLI
702
+ * wrote, but overwrites shipped skills unconditionally — so a creator who has customised their
703
+ * AGENTS.md still receives every word of this.
704
+ */
705
+ export function renderPlanningSkill() {
706
+ return `---
707
+ name: planning-a-game
708
+ 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.
709
+ ---
710
+
711
+ # Planning a Bitmagic game
712
+
713
+ Two rules govern everything below. **Build the smallest playable thing first, then iterate with the
714
+ human.** And **plan on paper before you touch \`Game.ts\`** — planning after the code is written is
715
+ worthless.
716
+
717
+ Skip the plan for a single-mechanic edit ("raise jump height", "make the enemies faster", "add a
718
+ sword"), or when the human says it is just one thing. In doubt, write it.
719
+
720
+ ## Step 1 — read the design, then the recipe
721
+
722
+ \`GAME-DESIGN.md\` says what the game is. Read it first; if it is empty, write it (or ask), because
723
+ \`bitmagic cover\` generates the cover art from it and that art is the only thing the human has to
724
+ look at while you build.
725
+
726
+ If the idea names a genre, read its recipe **before you decide anything else**:
727
+
728
+ | The idea mentions… | Read |
729
+ |---|---|
730
+ | race, racing, lap, drift, circuit, derby, kart, F1, rally | \`engine/agent-docs/mechanic-racing.md\` |
731
+ | combat, fight, battle, arena, deathmatch, royale, gladiator, boss | \`engine/agent-docs/mechanic-combat.md\` |
732
+ | tower defense, TD, waves, defend, base | \`engine/agent-docs/mechanic-tower-defense.md\` |
733
+ | platformer, parkour, jumping, platforms | \`engine/agent-docs/mechanic-platformer.md\` |
734
+ | shooter, FPS, top-down shooter, twin-stick, guns | \`engine/agent-docs/mechanic-shooter.md\` |
735
+ | driving, GTA, open-world driving, traffic, cars | \`engine/agent-docs/mechanic-driving.md\` |
736
+ | soccer, football, kick a ball, penalty shootout, free kick | \`engine/agent-docs/mechanic-soccer.md\` |
737
+ | ski, skiing, snowboard, downhill, slope, piste, slalom, carve | \`engine/agent-docs/mechanic-skiing.md\` |
738
+
739
+ For the shape of the PLACE the game happens in, also read the matching
740
+ \`engine/agent-docs/archetype-*.md\` — \`arena\`, \`castle\`, \`city\`, \`dungeon\`, \`racetrack\`,
741
+ \`ruins\`, \`soccer\`, \`village\`, \`wilderness\`.
742
+
743
+ **The recipe's contract is binding** unless the human explicitly asked for something else: camera
744
+ mode, whether the player is an embodied walking character at all, the core systems, the win/lose
745
+ shape. First-person phrasing in a request ("I defend my castle", "I place towers") is how everyone
746
+ describes a game — it is NOT a request for a walking avatar with weapons.
747
+
748
+ If no recipe matches — survival, sandbox, a puzzle, something new — that is normal. Do not force the
749
+ nearest one; plan from the design doc.
750
+
751
+ ## Step 2 — do not build what the engine already ships
752
+
753
+ Check this before you plan a single asset or a single system. Most first slices need **no generated
754
+ assets at all**.
755
+
756
+ | The idea needs… | The engine already has | Read |
757
+ |---|---|---|
758
+ | A melee weapon — sword, axe, katana, spear, staff, lightsaber | 12 built-in procedural weapons | \`combat-system.md\` |
759
+ | A ranged weapon — pistol, rifle, bow, crossbow, bazooka, laser | Built-in set; aiming adapts to the camera mode | \`combat-system.md\` |
760
+ | Punching, kicking, martial arts | \`UnarmedMeleeSystem\`, animations pre-loaded | \`combat-system.md\` |
761
+ | Enemies that patrol, chase, attack, follow, flee, trade | NPC behaviours; NPCs use the built-in weapons too | \`npc-system.md\` |
762
+ | Animals, snakes, fish, birds, dragons | Procedural creature systems | \`animal-instructions.md\`, \`snake-instructions.md\` |
763
+ | Score, timers, health bars, game-over and win screens | HUD + end-game systems | \`HUD_ELEMENTS.md\`, \`end-game.md\` |
764
+ | A start screen — cover image, title, Play-button label | Start-screen system | \`START_SCREEN.md\` |
765
+ | Collectibles, pickups, checkpoints, markers | Dedicated systems | \`collectible-objects.md\`, \`markers-system.md\` |
766
+ | Doors, locked doors and their keys | \`worldProfileData.doors[]\` + \`keyItems[]\` | \`doors-and-locks.md\` |
767
+ | Moving platforms, elevators, crushers, conveyors, spinners | \`mechanisms[]\` in world.json | \`moving-platforms.md\` |
768
+ | Enterable buildings — bases, spawn rooms, shops | \`building\` hotspots, built at load time on any terrain | \`environment-objects.md\` |
769
+ | Achievements and XP | Real per-game achievements; never hand-build a tracker | \`achievements.md\` |
770
+ | Mining, chopping, digging | \`PlayerToolSystem\` + auto-wired block mining | \`voxel-mining.md\` |
771
+ | Skiing or snowboarding | A full descent motor, enabled by one world.json flag | \`mechanic-skiing.md\` |
772
+ | Save points, checkpoints, persistence | Persistence system | \`persistence-system.md\` |
773
+ | Multiple levels or arenas | \`levels[]\` registry + \`engine.loadLevel()\` | \`level-system.md\` |
774
+ | Voice input, speaking to NPCs | \`engine.enablePushToTalk()\` | \`voice-input.md\` |
775
+ | The default player and its animation set | Already there | — |
776
+
777
+ A built-in still covers the request when the human names a style ("a katana" → the built-in katana).
778
+ Only a clearly custom look ("a flaming katana with a skull hilt") justifies generating anything.
779
+ **Generation costs the creator real money** — see the \`generating-assets\` skill.
780
+
781
+ Drivable vehicles are the one exception worth knowing: the physics and AI are built in, but a
782
+ good-looking car comes from \`bitmagic generate vehicle\`, and \`--preset VAN\` builds a standard one
783
+ for free. Spawn it with \`engine.getVehicleSpawner().spawnAndEnterFromAsset(...)\`.
784
+
785
+ ## Step 3 — write \`mechanics-plan.md\`
786
+
787
+ At the project root, before you edit \`Game.ts\`, HUD code or engine wiring. Copy this and fill it in:
788
+
789
+ \`\`\`markdown
790
+ # Build plan — <game name>
791
+
792
+ ## Genre / archetype
793
+ 1–2 sentences: the loop. Recipe read: \`engine/agent-docs/mechanic-<genre>.md\` (or "none — planned
794
+ from GAME-DESIGN.md").
795
+
796
+ ## Contract from the recipe
797
+ Camera mode. Is the player an embodied walking character? Terrain form. Anything the recipe fixes
798
+ that I would otherwise have defaulted differently.
799
+
800
+ ## Slice 1 — the smallest playable thing
801
+ - Core verb: the ONE thing the player does
802
+ - Win: fires, even if the number is wrong
803
+ - Lose:
804
+ - On-screen feedback: score / timer / health
805
+ - Engine systems: one line each, naming the doc — \`engine/agent-docs/…\`
806
+ - Assets to generate: usually none. Justify every entry.
807
+ - Level: procedural baseline terrain, unless the terrain IS the mechanic
808
+
809
+ ## Deferred — the backlog
810
+ Numbered, roughly best-first. Everything the design implies that slice 1 does not do.
811
+ 1.
812
+ 2.
813
+ 3.
814
+
815
+ ## Open questions
816
+ Anything I had to guess. Ask after they have played slice 1, not before.
817
+ \`\`\`
818
+
819
+ Keep it current: after each slice, move what shipped out of the backlog and re-rank the rest. The
820
+ file is excluded from the publish fingerprint, so rewriting it never invalidates a passing verify.
821
+
822
+ ## Step 4 — build slice 1, in this order
823
+
824
+ 1. \`bitmagic dev\`, **in the background, before anything else.** It never exits, so it has to be a
825
+ background task — and everything below is worth more when they can watch it happen. Last in this
826
+ list it is just a server; first, it is the whole reason the rest is visible.
827
+ 2. \`GAME-DESIGN.md\` written or confirmed.
828
+ 3. \`bitmagic cover\` — **now**, not later. It is the one paid generation slice 1 is allowed, it
829
+ takes minutes, and it is what the human looks at while you work. It writes \`world.json\`, so it
830
+ must come before any \`bitmagic verify\`.
831
+ 4. \`mechanics-plan.md\`.
832
+ 5. Write the code. Look up APIs with the \`finding-engine-apis\` skill; do not read engine source to
833
+ find out what exists.
834
+ 6. \`bitmagic check\` until green.
835
+ 7. \`bitmagic reload\` (the Stop hook in \`.claude/settings.json\` does this for you).
836
+ 8. \`bitmagic verify\` — it boots the game in a real browser and clicks Play. A clean \`check\` is
837
+ not evidence the game runs.
838
+ 9. Report (below). Publish only if they ask.
839
+
840
+ **One forge, and only when the terrain IS the mechanic.** \`bitmagic forge\` runs for many minutes
841
+ and costs considerably more than any single generation. It belongs in slice 1 only for a game that
842
+ cannot be played without its shape — skiing, racing on a real circuit, open-world driving, an
843
+ enclosed dungeon interior. For everything else the baseline's procedural voxel terrain is a fine
844
+ slice-1 world and the forge is backlog item 1, run once the loop is proven.
845
+
846
+ ## Step 5 — hand it back
847
+
848
+ Short, concrete, and honest. Three parts:
849
+
850
+ - **Playable now** — one sentence, plus the literal control. "You can drive the kart and complete a
851
+ lap. It is already reloaded in your browser — W to accelerate, A/D to steer."
852
+ - **Not in yet, on purpose** — three to five items from the backlog, so they know it is a choice and
853
+ not a bug.
854
+ - **Next I would do** — two or three, numbered, in order. Then ask which.
855
+
856
+ Name every downgrade in the same breath: a generation that failed and left a placeholder, a forge
857
+ you skipped, a mechanic the recipe wanted that you deferred. They waited for it and cannot tell a
858
+ fallback from the real thing by looking.
859
+
860
+ Claim only what you actually built. A passing \`check\` is not a working feature, and a class you
861
+ constructed but never called is not wired. Trace each new behaviour from a live entry point —
862
+ \`load()\`, the update loop, an event handler — before you call it done.
863
+
864
+ ## After slice 1
865
+
866
+ Same loop, smaller: pick ONE backlog item (theirs if they chose, otherwise the top of your list),
867
+ build it, \`check\`, \`reload\`, \`verify\`, report. Re-rank the backlog each time. Resist bundling
868
+ three items into one pass — you lose the ability to tell them which change caused what they see.
869
+
870
+ **Green means stop.** Once the slice does what it said and \`check\` passes, write the report and
871
+ end. No renaming, restyling or unrequested polish: every edit after green risks breaking working
872
+ code.
873
+ `;
874
+ }
875
+ /**
876
+ * `.claude/skills/finding-engine-apis/SKILL.md` — the discovery protocol in full.
877
+ *
878
+ * The problem this exists to solve is measured, not hypothetical. game-play-agent's
879
+ * engine-api-digest.ts opens with it: session analysis showed the hosted coding agent spending most
880
+ * of its wall-clock reconstructing the engine's public API through dozens of sequential searches,
881
+ * and one digest lookup replaced several code searches. A scaffolded project had the same 240k
882
+ * lines and none of the digest until the corpus started shipping — so an external agent had no
883
+ * option but the expensive one.
884
+ */
885
+ export function renderEngineApiSkill() {
886
+ return `---
887
+ name: finding-engine-apis
888
+ 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.
889
+ ---
890
+
891
+ # Finding an engine API
892
+
893
+ \`engine/\` is ~240,000 lines across ~780 files. It is documented; read the documentation instead.
894
+
895
+ ## Tier 1 — the signature digest, first, always
896
+
897
+ \`engine/agent-docs/engine-api/\` holds a generated digest of the engine's entire public surface —
898
+ every class, method, function, interface and type, with signatures, bodies omitted, in the form
899
+ \`Class.method(params): ReturnType\`. \`engine-api.md\` is the index: it lists the 45 group docs and
900
+ every symbol each one contains.
901
+
902
+ \`\`\`
903
+ rg -n "spawnAsset" engine/agent-docs/engine-api/ # find a method
904
+ rg -n "class VehicleSpawner" engine/agent-docs/engine-api/ # find a class
905
+ rg -n "unlockAchievement|getSpawnPoints" engine/agent-docs/engine-api/ # several at once
906
+ \`\`\`
907
+
908
+ One grep here replaces a dozen searches in \`engine/\`, and it answers the question you usually
909
+ actually have: *does this exist, and what does it take?* Each group doc keeps its
910
+ \`## engine/<path>.ts\` headers, so a hit also tells you which source file to open if you need more.
911
+
912
+ The digest is generated from the engine, so it cannot be wrong about a signature — and it
913
+ deliberately contains no prose. When you need to know how something is *meant* to be used, go to
914
+ tier 2.
915
+
916
+ ## Tier 2 — the subsystem guides
917
+
918
+ ~83 prose docs in \`engine/agent-docs/\`. Find the row, read the doc.
919
+
920
+ | What you are doing | Read |
921
+ |---|---|
922
+ | Coordinates, forward direction, yaw, rotation, lookAt, spawn offsets | \`coordinate-system.md\` |
923
+ | NPCs, enemies, creatures, companions, pets, followers | \`npc-system.md\` (routes to the four \`npc-*\` docs) |
924
+ | NPC looks — block vs highres GLB, recolouring, animation packs | \`npc-appearance.md\` |
925
+ | NPC combat and death — HP, damage, ragdoll, exploding | \`npc-combat-death.md\` |
926
+ | Respawning or bulk NPC populations, \`NpcManager\` | \`npc-managers.md\` |
927
+ | NPC pathing, walkable targets, navmesh cell size | \`npc-navigation.md\` |
928
+ | Four-legged animals | \`animal-instructions.md\` |
929
+ | Snakes and other legless creatures | \`snake-instructions.md\` |
930
+ | Controls and input — mobile buttons, joystick, touch-to-move, fire buttons, key/button parity | \`control-system.md\` |
931
+ | Combat — weapons, damage, hit detection | \`combat-system.md\` |
932
+ | Any win / lose / you-died / victory / time-up / game-over screen | \`end-game.md\` |
933
+ | Achievements and XP — \`engine.unlockAchievement('<id>')\` | \`achievements.md\` |
934
+ | HUD elements — bars, scores, counters, timers | \`HUD_ELEMENTS.md\` |
935
+ | HUD visual style and themes | \`HUD_STYLE_GUIDE.md\`, \`HUD_THEMES.md\` |
936
+ | Start screen — cover image, title, Play-button label | \`START_SCREEN.md\` |
937
+ | Collectibles and interactables | \`collectible-objects.md\` |
938
+ | Placed scenery / \`environmentObjects\` — gameplay near props, harvesting, occupancy | \`environment-objects.md\` |
939
+ | Doors, locked gates, keycards | \`doors-and-locks.md\` |
940
+ | Custom voxel block types, block palettes, resolving block names | \`custom-block-types.md\` |
941
+ | Moving platforms, elevators, crushers, conveyors | \`moving-platforms.md\` |
942
+ | Multiplayer and networking | \`networking-system.md\` (routes to the six \`multiplayer-*\` docs) |
943
+ | Characters and animation | \`character-system.md\` |
944
+ | Playing custom motion clips — flips, kicks, punches | \`animation-assets.md\` |
945
+ | Using an uploaded animation as the player's run/idle | \`locomotion-assignment.md\` |
946
+ | Vehicles and driving | \`vehicle-system.md\`, \`vehicle-ai.md\` |
947
+ | A non-humanoid player — spacecraft, vehicle-only, custom controller | \`custom-player.md\` |
948
+ | Hiding / showing the player — i-frames, ghost mode, flicker | \`player-visibility.md\` |
949
+ | Spawning entities | \`spawning-system.md\` |
950
+ | Markers | \`markers-system.md\` |
951
+ | A top-down camera fitting the whole map | \`topdown-fit-camera.md\` |
952
+ | Save / load / checkpoints | \`persistence-system.md\` |
953
+ | Leaderboards, submitted scores, shared non-realtime data | \`game-data-service.md\` |
954
+ | Persistent shared multiplayer state, mini-MMO | \`world-persistence.md\` |
955
+ | JSON config assets | \`json-assets.md\` |
956
+ | Custom images via CSS \`background-image\` or \`<img>\` — must go through \`resolveAssetUrl\` | \`image-assets.md\` |
957
+ | Writing text onto a model's texture — jersey numbers, decals | \`texture-text.md\` |
958
+ | Audio playback | \`audio-system.md\`, \`audio-assets.md\` |
959
+ | Runtime AI — text, vision, image generation inside the game | \`ai-service.md\` |
960
+ | Voice input, speech-to-text, push-to-talk | \`voice-input.md\` |
961
+ | Physics and Three.js | \`physics-best-practices.md\` |
962
+ | Custom shaders and materials (WebGPU and WebGL paths both required) | \`custom-shaders.md\` |
963
+ | Lighting — many lamps, dynamic lights, WebGPU stutter | \`lighting-best-practices.md\` |
964
+ | Performance | \`performance-best-practices.md\` |
965
+ | Terrain foliage, ground cover, voxel terrain | \`voxel-terrain-foliage.md\` |
966
+ | Mining and block breaking | \`voxel-mining.md\` |
967
+ | Multiple levels, level select, switching worlds at runtime | \`level-system.md\` |
968
+ | Skyboxes | \`skybox-system.md\` |
969
+ | Weather and snow | \`weather-snow.md\` |
970
+ | 2D side-on physics games | \`physics2d-genre.md\` |
971
+
972
+ \`engine/agent-docs/samples/\` holds compile-checked reference implementations — a doc that cites
973
+ \`samples/raycast-ground-check\` means \`engine/agent-docs/samples/raycast-ground-check.ts\`, and it
974
+ compiles against this engine.
975
+
976
+ ## Tier 3 — the source
977
+
978
+ Only for an implementation detail a signature and a guide cannot answer. Search, do not browse:
979
+ \`rg -n "class VoxelObject" engine/\`, narrowed with a path. Never read a large engine file end to
980
+ end.
981
+
982
+ ## Two conventions in the docs
983
+
984
+ These docs are shared with Bitmagic's hosted agent, so two things read oddly here:
985
+
986
+ - **\`@docs foo.md\` means \`engine/agent-docs/foo.md\`.** Just read the file.
987
+ - **Tools that do not exist here.** Where a doc says to run \`node bin/voxel.mjs\` or
988
+ \`bin/world-edit.mjs\`, or to call \`configure_game\`, \`generate_character\`,
989
+ \`manage-achievements\` or \`runWorldForger\`, those belong to the hosted agent. Your equivalents:
990
+
991
+ | The doc says | You do |
992
+ |---|---|
993
+ | \`configure_game\`, \`manage-achievements\`, \`manage-levels\`, \`spawnpoint upsert\` | edit \`src/work/world.json\` directly |
994
+ | \`node bin/voxel.mjs\` / \`bin/world-edit.mjs\` | edit \`src/work/world.json\` directly |
995
+ | \`generate_character\`, \`design-vehicle\`, skybox/sound/image/animation generation | \`bitmagic generate <type>\` |
996
+ | \`runWorldForger\` / \`run-world-forger\` | \`bitmagic forge\` |
997
+
998
+ Everything else in the doc — the engine APIs, the world.json shape, the gotchas — still applies.
999
+
1000
+ ## The two rules that keep this cheap
1001
+
1002
+ **Stop searching, start writing.** Do not pre-verify every API you plan to touch. Once you know
1003
+ roughly what exists, write the implementation and run \`bitmagic check\` — compiler errors are
1004
+ cheaper and more precise than more searching. If two searches for the same concept return nothing
1005
+ new, the concept does not exist under that name: check the digest index or move on.
1006
+
1007
+ **A symbol error is a lookup, not a retry.** When \`bitmagic check\` says \`Cannot find name X\`,
1008
+ \`Property X does not exist on type Y\`, \`has no exported member X\` or \`Cannot find module\`, the
1009
+ name is wrong and your recall is wrong. That is not a type mismatch. Grep
1010
+ \`engine/agent-docs/engine-api/\` for the real name — or confirm it is gone and delete the call —
1011
+ **before** your next edit. Do not re-edit from memory, do not churn the import path, and above all
1012
+ do not widen the type, cast, or add \`?.\` to make a wrong name compile: that ships a feature that
1013
+ type-checks and silently never runs.
1014
+
1015
+ **Batch it.** Issue independent greps and reads in one turn, not one per turn.
1016
+
1017
+ ## What the docs do not cover
1018
+
1019
+ Your own game, \`src/work/\`. And \`world.json\` — its shape is documented per-feature in the guides
1020
+ above, but the file itself is shared with the human, who may be dragging objects in the editor while
1021
+ you work. Re-read it before editing it.
567
1022
  `;
568
1023
  }
569
1024
  export function renderGenerateSkill() {
@@ -691,9 +1146,16 @@ project root for the guidance an agent should read before editing this game.
691
1146
 
692
1147
  ## Which of these are yours
693
1148
 
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.
1149
+ \`planning-a-game/\`, \`finding-engine-apis/\`, \`generating-assets/\` — and this README — are
1150
+ shipped by the Bitmagic CLI and **re-rendered by \`bitmagic upgrade\`**. They describe what the CLI
1151
+ and the engine can do, so they have to stay current with both; edits to them are lost on the next
1152
+ upgrade.
1153
+
1154
+ | Skill | Use it when |
1155
+ |---|---|
1156
+ | \`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\` |
1157
+ | \`finding-engine-apis/\` | you need an engine API and do not know its name or signature, or \`bitmagic check\` cannot resolve a symbol |
1158
+ | \`generating-assets/\` | the game needs a skybox, sound, image, character, animation or vehicle |
697
1159
 
698
1160
  Every other directory here is yours. \`upgrade\` never opens a skill it does not ship, and never
699
1161
  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,wBAAw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;GAcG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKR,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,YAAo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wBAAwB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,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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AAS,CAAC;IACzF,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,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.28",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "type": "module",
6
6
  "bin": {