picopilot 0.1.0 → 0.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,GAAG,EAAI,MAAM,OAAO,CAAC;AAClC,OAAO,EAIN,KAAK,YAAY,EAEjB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,KAAK,YAAY,CAAC;AAQ3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAC1B,GAAG,EAAE,GAAG,CAAC,GAAG,EACZ,cAAc,GAAE,mBAA2C,GACzD,IAAI,CA4MN"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,GAAG,EAAI,MAAM,OAAO,CAAC;AAClC,OAAO,EAIN,KAAK,YAAY,EAEjB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,KAAK,YAAY,CAAC;AAQ3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAC1B,GAAG,EAAE,GAAG,CAAC,GAAG,EACZ,cAAc,GAAE,mBAA2C,GACzD,IAAI,CAsON"}
@@ -171,22 +171,44 @@ export function registerRun(cli, adapterFactory = defaultAdapterFactory) {
171
171
  }
172
172
  }
173
173
  // A backstop timeout is a soft warning: the cart never signalled done, so
174
- // it may have hung or errored. CTA the agent toward the static checks
175
- // (lint/tokens) to catch a code fault before re-running.
174
+ // it may have hung or errored. What to do next depends on whether we SAW
175
+ // anything: with no screenshots, a timeout is unproven (the weak-model trap
176
+ // is to call a timeout "fine, it's interactive" and ship an untested cart),
177
+ // so push toward SEEING it (a probe screenshot / playtest) AND the static
178
+ // checks. With screenshots in hand, a timeout is expected for an
179
+ // interactive game (it just never self-quit), so only nudge on faults.
176
180
  const cta = exitReason === 'timeout'
177
- ? {
178
- description: 'The cart never printed the done-sentinel (backstop fired). Check for a fault:',
179
- commands: [
180
- {
181
- command: 'verify',
182
- description: 'Run the static gate (tokens + lint + integrity).',
183
- },
184
- {
185
- command: 'tokens',
186
- description: 'Confirm the cart is under the token budget.',
187
- },
188
- ],
189
- }
181
+ ? screenshots.length === 0
182
+ ? {
183
+ description: 'The cart never printed the done-sentinel and captured NO screenshot: a timeout alone does NOT prove it works. SEE it before calling it done:',
184
+ commands: [
185
+ {
186
+ command: 'run',
187
+ description: 'Add a temporary probe to the cart (extcmd("set_filename",...)+extcmd("screen") on a frame timer, then printh("__PICOPILOT_DONE__")), re-run, and LOOK at the PNG. Remove the probe after.',
188
+ },
189
+ {
190
+ command: 'playtest run',
191
+ description: 'Drive the cart with input and screenshot live gameplay (no cart edit needed).',
192
+ },
193
+ {
194
+ command: 'verify',
195
+ description: 'Run the static gate (tokens + lint + integrity) to catch a code fault.',
196
+ },
197
+ ],
198
+ }
199
+ : {
200
+ description: 'The cart never printed the done-sentinel (backstop fired) but a screenshot WAS captured: expected for an interactive game that never self-quits. If the frame looks wrong, check for a fault:',
201
+ commands: [
202
+ {
203
+ command: 'verify',
204
+ description: 'Run the static gate (tokens + lint + integrity).',
205
+ },
206
+ {
207
+ command: 'tokens',
208
+ description: 'Confirm the cart is under the token budget.',
209
+ },
210
+ ],
211
+ }
190
212
  : undefined;
191
213
  return ok({
192
214
  screenshots: [...screenshots],
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,MAAM,EAA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AE,CAAC;oBACZ,IAAI,CAAC,CAAC,CAAC,YAAY,YAAY,CAAC;wBAAE,MAAM,CAAC,CAAC;oBAC1C,yEAAyE;oBACzE,4CAA4C;gBAC7C,CAAC;YACF,CAAC;YAED,0EAA0E;YAC1E,yEAAyE;YACzE,4EAA4E;YAC5E,4EAA4E;YAC5E,0EAA0E;YAC1E,iEAAiE;YACjE,uEAAuE;YACvE,MAAM,GAAG,GACR,UAAU,KAAK,SAAS;gBACvB,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;oBACzB,CAAC,CAAC;wBACA,WAAW,EACV,8IAA8I;wBAC/I,QAAQ,EAAE;4BACT;gCACC,OAAO,EAAE,KAAK;gCACd,WAAW,EACV,2LAA2L;6BAC5L;4BACD;gCACC,OAAO,EAAE,cAAc;gCACvB,WAAW,EACV,+EAA+E;6BAChF;4BACD;gCACC,OAAO,EAAE,QAAQ;gCACjB,WAAW,EACV,wEAAwE;6BACzE;yBACD;qBACD;oBACF,CAAC,CAAC;wBACA,WAAW,EACV,+LAA+L;wBAChM,QAAQ,EAAE;4BACT;gCACC,OAAO,EAAE,QAAQ;gCACjB,WAAW,EACV,kDAAkD;6BACnD;4BACD;gCACC,OAAO,EAAE,QAAQ;gCACjB,WAAW,EAAE,6CAA6C;6BAC1D;yBACD;qBACD;gBACH,CAAC,CAAC,SAAS,CAAC;YAEd,OAAO,EAAE,CACR;gBACC,WAAW,EAAE,CAAC,GAAG,WAAW,CAAC;gBAC7B,MAAM;gBACN,UAAU;gBACV,OAAO;gBACP,GAAG;gBACH,aAAa;aACb,EACD,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAC,GAAG,EAAC,CACrC,CAAC;QACH,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -113,7 +113,7 @@ const defaultServerFactory = (rootDir, port) => new Promise((resolvePromise, rej
113
113
  */
114
114
  export function registerServe(cli, adapterFactory = defaultAdapterFactory, serverFactory = defaultServerFactory, registerCleanup = defaultCleanupRegistrar) {
115
115
  cli.command('serve', {
116
- description: 'Export a cart and serve it locally so you can play it in a browser. Requires PICO-8.',
116
+ description: 'Export a cart and serve it locally so a HUMAN can play it in a browser (for SHARING a playable build). Requires PICO-8, and a cart __label__. To verify your OWN build works, use `picopilot run` (screenshots) or `picopilot playtest` instead: serve is not the self-verification path.',
117
117
  args: z.object({
118
118
  cart: z
119
119
  .string()
@@ -193,8 +193,8 @@ export function registerServe(cli, adapterFactory = defaultAdapterFactory, serve
193
193
  return error({
194
194
  code: 'export-failed',
195
195
  message: result.value.labelWarning
196
- ? 'PICO-8 produced no bundle (the cart has no __label__). Capture a label first, then re-serve.'
197
- : 'PICO-8 produced no export bundle. Check the cart runs without a boot error.',
196
+ ? 'PICO-8 produced no bundle: this cart has no __label__ (the export splash), which the browser export needs. To just SEE your own build work, use `picopilot run` or `picopilot playtest` (no label needed) instead of serve. If you genuinely want a browser build to SHARE, bake a label first with `picopilot export --label <128x128.png>` (do NOT hand-edit main.p8), then re-serve.'
197
+ : 'PICO-8 produced no export bundle. Check the cart runs without a boot error (via `picopilot run`).',
198
198
  exitCode: 1,
199
199
  });
200
200
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,MAAM,EACN,QAAQ,GACR,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,YAAY,EAAc,MAAM,WAAW,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AACxE,OAAO,EAAW,CAAC,EAAC,MAAM,OAAO,CAAC;AAClC,OAAO,EACN,gBAAgB,EAEhB,iBAAiB,GACjB,MAAM,0BAA0B,CAAC;AASlC,MAAM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AC;YAC3C,KAAK,MAAM,CAAC;YAEZ,OAAO,EAAE,CAAC,EAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;QAClC,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/engine/scaffold/scaffold.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,MAAM,IAAI,MAAM,CAM/B;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAehC;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAuIjC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAO9C"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/engine/scaffold/scaffold.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,MAAM,IAAI,MAAM,CAM/B;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAehC;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAiLjC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAO9C"}
@@ -95,6 +95,48 @@ curated from PICO-8's manual for the things models get wrong without a reminder.
95
95
 
96
96
  A cart with none of these is inert. Keep them defined.
97
97
 
98
+ ## The build loop (do this every iteration, and to finish)
99
+
100
+ One change = one pass through this loop. Do NOT skip the last step:
101
+
102
+ 1. Edit \`main.lua\` (or a cart section via a picopilot command).
103
+ 2. \`picopilot tokens\` to watch the 8192-token budget.
104
+ 3. \`picopilot verify\` (the static gate: tokens + integrity). GREEN means
105
+ well-formed, it does NOT mean the cart runs or plays.
106
+ 4. **SEE it run.** Add a temporary probe to \`main.lua\` and \`picopilot run\`, then
107
+ LOOK at the screenshot PNG. Remove the probe after. Or use
108
+ \`picopilot playtest run\` to drive input and screenshot live gameplay with no
109
+ cart edit. Probe recipe:
110
+
111
+ \`\`\`lua
112
+ -- TEMPORARY: screenshot a couple of frames, then signal done so run exits.
113
+ if t==20 then extcmd("set_filename","probe_0") extcmd("screen") end
114
+ if t==40 then extcmd("set_filename","probe_1") extcmd("screen") end
115
+ if t==45 then printh("__PICOPILOT_DONE__") end
116
+ \`\`\`
117
+
118
+ **Definition of done: you have looked at a screenshot of the running cart and it
119
+ renders what you intended.** A green \`verify\` is NOT done. A \`picopilot run\`
120
+ that ends in \`exitReason: timeout\` with NO screenshot is NOT proof it works, it
121
+ just means the cart never self-quit; you still have not seen it. Never declare a
122
+ game finished on static checks or a bare timeout alone.
123
+
124
+ ## Handing the finished cart to the user
125
+
126
+ When it is verified and looks right, tell the user to play it with:
127
+
128
+ \`\`\`sh
129
+ pico8 -run /absolute/path/to/main.p8
130
+ \`\`\`
131
+
132
+ (or \`picopilot run\` for a headless screenshot pass). Do NOT reach for
133
+ \`picopilot serve\` to prove your own build: that exports + serves a browser build
134
+ for SHARING a playable cart with a human, needs a cart \`__label__\`, and puts a
135
+ human-in-the-loop where none is needed. Verify with \`run\`/\`playtest\`; serve only
136
+ if the user explicitly wants a browser build. And do NOT emit extra deliverables
137
+ (summary docs, play-guides, shell scripts, ASCII banners): the deliverable is the
138
+ verified cart itself.
139
+
98
140
  ## The fixed 16-colour palette (index → RGB)
99
141
 
100
142
  In a char grid, \`.\` = transparent and \`0-F\` = these indices.
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../../src/engine/scaffold/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;GASG;AAEH,0FAA0F;AAC1F,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,UAAU,MAAM;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CACtB,sDAAsD,YAAY,aAAa,CAC/E,CAAC;IACF,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,gBAAgB,IAAI,CAAC,CAAC;IAChD,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO;IACtB,OAAO;;;;;;;;;;;;;CAaP,CAAC;AACF,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,aAAa;IAC5B,OAAO,iBAAiB,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ;IACvB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIP,CAAC;AACF,CAAC;AAYD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IAC5B,OAAO;QACN,EAAC,IAAI,EAAE,SAAS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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+KP,CAAC;AACF,CAAC;AAYD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IAC5B,OAAO;QACN,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAC;QACpC,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAC;QACtC,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAC;QACxC,EAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,EAAC;KAClD,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picopilot",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "An agent-first toolchain for PICO-8 game development, built on the incur CLI framework.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -114,6 +114,28 @@ describe('picopilot init: AGENTS.md carries the curated PICO-8 reference', () =>
114
114
  expect(agents).toContain('_draw()');
115
115
  });
116
116
 
117
+ it('carries the build loop with a MANDATORY see-it-run step (not just static verify)', () => {
118
+ // The loop names verify AND run/playtest, and is explicit that a green
119
+ // static gate is not "done": the weak-model failure was shipping on verify.
120
+ expect(agents).toContain('picopilot verify');
121
+ expect(agents).toContain('picopilot run');
122
+ expect(agents).toContain('picopilot playtest run');
123
+ expect(agents.toLowerCase()).toContain('definition of done');
124
+ // It hands the model the concrete probe recipe so "see it" is actionable.
125
+ expect(agents).toContain('extcmd("screen")');
126
+ expect(agents).toContain('__PICOPILOT_DONE__');
127
+ // A bare timeout is explicitly NOT proof it works.
128
+ expect(agents.toLowerCase()).toContain('timeout');
129
+ });
130
+
131
+ it('hands the finished cart off via `pico8 -run`, NOT `serve`', () => {
132
+ // The user runs the cart with pico8 -run; serve is not the self-verify path.
133
+ expect(agents).toContain('pico8 -run');
134
+ // serve is called out as sharing-only (browser build), not proof-of-build.
135
+ expect(agents).toContain('picopilot serve');
136
+ expect(agents.toLowerCase()).toContain('do not emit extra deliverables');
137
+ });
138
+
117
139
  it('carries the fixed 16-colour palette with real RGB values', () => {
118
140
  // A palette entry the gfx render encoder depends on (red = 255,0,77).
119
141
  expect(agents).toMatch(/red/);
@@ -123,7 +123,7 @@ describe('picopilot run: structured run report', () => {
123
123
  expect(Array.isArray(out.screenshots)).toBe(true);
124
124
  });
125
125
 
126
- it('a backstop timeout CTAs toward the static gate (verify/tokens)', async () => {
126
+ it('a timeout with NO screenshots CTAs toward SEEING it (probe/playtest), not just static checks', async () => {
127
127
  const {stdout, exitCode} = await runRun(() =>
128
128
  stubAdapter(ranWith('timeout')),
129
129
  );
@@ -131,8 +131,34 @@ describe('picopilot run: structured run report', () => {
131
131
  expect(exitCode).toBe(0);
132
132
  const out = JSON.parse(stdout);
133
133
  expect(out.exitReason).toBe('timeout');
134
- // The CTA points at the static checks to catch a code fault before re-running.
135
- expect(stdout.toLowerCase()).toContain('verify');
134
+ const lower = stdout.toLowerCase();
135
+ // The weak-model trap is shipping an untested cart on a bare timeout. With no
136
+ // screenshot captured, the CTA must push toward actually SEEING the cart
137
+ // (a probe screenshot or playtest) as well as the static checks.
138
+ expect(lower).toContain('does not prove it works');
139
+ expect(lower).toContain('playtest');
140
+ expect(lower).toContain('verify');
141
+ });
142
+
143
+ it('a timeout WITH a screenshot is treated as expected-for-an-interactive-game', async () => {
144
+ const withShot: Pico8Result = {
145
+ ok: true,
146
+ value: {
147
+ screenshots: ['/tmp/probe_0.png'],
148
+ printh: 'hello from cart\n',
149
+ exitReason: 'timeout',
150
+ },
151
+ };
152
+ const {stdout, exitCode} = await runRun(() => stubAdapter(withShot));
153
+ expect(exitCode).toBe(0);
154
+ const out = JSON.parse(stdout);
155
+ expect(out.exitReason).toBe('timeout');
156
+ expect(out.screenshots).toContain('/tmp/probe_0.png');
157
+ const lower = stdout.toLowerCase();
158
+ // A captured frame means the cart rendered: a timeout here is the normal
159
+ // interactive-game case, so the CTA does NOT claim it is unproven.
160
+ expect(lower).toContain('expected for an interactive game');
161
+ expect(lower).not.toContain('does not prove it works');
136
162
  });
137
163
  });
138
164
 
@@ -222,25 +222,51 @@ export function registerRun(
222
222
  }
223
223
 
224
224
  // A backstop timeout is a soft warning: the cart never signalled done, so
225
- // it may have hung or errored. CTA the agent toward the static checks
226
- // (lint/tokens) to catch a code fault before re-running.
225
+ // it may have hung or errored. What to do next depends on whether we SAW
226
+ // anything: with no screenshots, a timeout is unproven (the weak-model trap
227
+ // is to call a timeout "fine, it's interactive" and ship an untested cart),
228
+ // so push toward SEEING it (a probe screenshot / playtest) AND the static
229
+ // checks. With screenshots in hand, a timeout is expected for an
230
+ // interactive game (it just never self-quit), so only nudge on faults.
227
231
  const cta =
228
232
  exitReason === 'timeout'
229
- ? {
230
- description:
231
- 'The cart never printed the done-sentinel (backstop fired). Check for a fault:',
232
- commands: [
233
- {
234
- command: 'verify',
235
- description:
236
- 'Run the static gate (tokens + lint + integrity).',
237
- },
238
- {
239
- command: 'tokens',
240
- description: 'Confirm the cart is under the token budget.',
241
- },
242
- ],
243
- }
233
+ ? screenshots.length === 0
234
+ ? {
235
+ description:
236
+ 'The cart never printed the done-sentinel and captured NO screenshot: a timeout alone does NOT prove it works. SEE it before calling it done:',
237
+ commands: [
238
+ {
239
+ command: 'run',
240
+ description:
241
+ 'Add a temporary probe to the cart (extcmd("set_filename",...)+extcmd("screen") on a frame timer, then printh("__PICOPILOT_DONE__")), re-run, and LOOK at the PNG. Remove the probe after.',
242
+ },
243
+ {
244
+ command: 'playtest run',
245
+ description:
246
+ 'Drive the cart with input and screenshot live gameplay (no cart edit needed).',
247
+ },
248
+ {
249
+ command: 'verify',
250
+ description:
251
+ 'Run the static gate (tokens + lint + integrity) to catch a code fault.',
252
+ },
253
+ ],
254
+ }
255
+ : {
256
+ description:
257
+ 'The cart never printed the done-sentinel (backstop fired) but a screenshot WAS captured: expected for an interactive game that never self-quits. If the frame looks wrong, check for a fault:',
258
+ commands: [
259
+ {
260
+ command: 'verify',
261
+ description:
262
+ 'Run the static gate (tokens + lint + integrity).',
263
+ },
264
+ {
265
+ command: 'tokens',
266
+ description: 'Confirm the cart is under the token budget.',
267
+ },
268
+ ],
269
+ }
244
270
  : undefined;
245
271
 
246
272
  return ok(
@@ -196,14 +196,23 @@ describe('picopilot serve: failure paths', () => {
196
196
  it('errors when the export produced no bundle, and removes the temp dir immediately', async () => {
197
197
  const serveSeen: {rootDir?: string} = {};
198
198
  const exportSeen: {options?: ExportOptions} = {};
199
- const {exitCode} = await runServe(
199
+ const {stdout, exitCode} = await runServe(
200
200
  () => stubAdapter('writes-no-js', exportSeen),
201
201
  fakeServer(serveSeen),
202
+ ['serve', cartPath, '--json'],
202
203
  );
203
204
  expect(exitCode).not.toBe(0);
204
205
  expect(serveSeen.rootDir).toBeUndefined();
205
206
  // The temp dir created before the failed export is cleaned up on the spot.
206
207
  expect(existsSync(exportSeen.options!.outDir)).toBe(false);
208
+ // The labelless message redirects to the self-verify tools (run/playtest)
209
+ // and points at the real label remedy, NOT hand-editing main.p8: this is the
210
+ // exact loop weak models fell into.
211
+ const lower = stdout.toLowerCase();
212
+ expect(lower).toContain('picopilot run');
213
+ expect(lower).toContain('playtest');
214
+ expect(lower).toContain('export --label');
215
+ expect(lower).toContain('do not hand-edit main.p8');
207
216
  });
208
217
 
209
218
  it('errors with a nonzero exit when the cart path does not exist', async () => {
@@ -164,7 +164,7 @@ export function registerServe(
164
164
  ): void {
165
165
  cli.command('serve', {
166
166
  description:
167
- 'Export a cart and serve it locally so you can play it in a browser. Requires PICO-8.',
167
+ 'Export a cart and serve it locally so a HUMAN can play it in a browser (for SHARING a playable build). Requires PICO-8, and a cart __label__. To verify your OWN build works, use `picopilot run` (screenshots) or `picopilot playtest` instead: serve is not the self-verification path.',
168
168
  args: z.object({
169
169
  cart: z
170
170
  .string()
@@ -250,8 +250,8 @@ export function registerServe(
250
250
  return error({
251
251
  code: 'export-failed',
252
252
  message: result.value.labelWarning
253
- ? 'PICO-8 produced no bundle (the cart has no __label__). Capture a label first, then re-serve.'
254
- : 'PICO-8 produced no export bundle. Check the cart runs without a boot error.',
253
+ ? 'PICO-8 produced no bundle: this cart has no __label__ (the export splash), which the browser export needs. To just SEE your own build work, use `picopilot run` or `picopilot playtest` (no label needed) instead of serve. If you genuinely want a browser build to SHARE, bake a label first with `picopilot export --label <128x128.png>` (do NOT hand-edit main.p8), then re-serve.'
254
+ : 'PICO-8 produced no export bundle. Check the cart runs without a boot error (via `picopilot run`).',
255
255
  exitCode: 1,
256
256
  });
257
257
  }
@@ -104,6 +104,48 @@ curated from PICO-8's manual for the things models get wrong without a reminder.
104
104
 
105
105
  A cart with none of these is inert. Keep them defined.
106
106
 
107
+ ## The build loop (do this every iteration, and to finish)
108
+
109
+ One change = one pass through this loop. Do NOT skip the last step:
110
+
111
+ 1. Edit \`main.lua\` (or a cart section via a picopilot command).
112
+ 2. \`picopilot tokens\` to watch the 8192-token budget.
113
+ 3. \`picopilot verify\` (the static gate: tokens + integrity). GREEN means
114
+ well-formed, it does NOT mean the cart runs or plays.
115
+ 4. **SEE it run.** Add a temporary probe to \`main.lua\` and \`picopilot run\`, then
116
+ LOOK at the screenshot PNG. Remove the probe after. Or use
117
+ \`picopilot playtest run\` to drive input and screenshot live gameplay with no
118
+ cart edit. Probe recipe:
119
+
120
+ \`\`\`lua
121
+ -- TEMPORARY: screenshot a couple of frames, then signal done so run exits.
122
+ if t==20 then extcmd("set_filename","probe_0") extcmd("screen") end
123
+ if t==40 then extcmd("set_filename","probe_1") extcmd("screen") end
124
+ if t==45 then printh("__PICOPILOT_DONE__") end
125
+ \`\`\`
126
+
127
+ **Definition of done: you have looked at a screenshot of the running cart and it
128
+ renders what you intended.** A green \`verify\` is NOT done. A \`picopilot run\`
129
+ that ends in \`exitReason: timeout\` with NO screenshot is NOT proof it works, it
130
+ just means the cart never self-quit; you still have not seen it. Never declare a
131
+ game finished on static checks or a bare timeout alone.
132
+
133
+ ## Handing the finished cart to the user
134
+
135
+ When it is verified and looks right, tell the user to play it with:
136
+
137
+ \`\`\`sh
138
+ pico8 -run /absolute/path/to/main.p8
139
+ \`\`\`
140
+
141
+ (or \`picopilot run\` for a headless screenshot pass). Do NOT reach for
142
+ \`picopilot serve\` to prove your own build: that exports + serves a browser build
143
+ for SHARING a playable cart with a human, needs a cart \`__label__\`, and puts a
144
+ human-in-the-loop where none is needed. Verify with \`run\`/\`playtest\`; serve only
145
+ if the user explicitly wants a browser build. And do NOT emit extra deliverables
146
+ (summary docs, play-guides, shell scripts, ASCII banners): the deliverable is the
147
+ verified cart itself.
148
+
107
149
  ## The fixed 16-colour palette (index → RGB)
108
150
 
109
151
  In a char grid, \`.\` = transparent and \`0-F\` = these indices.