xonecas.io
64875
Mc

mini-coder / commit 250b345

fix: strengthen prompt verification guidance

xonecas2026-04-12 250b345476b3c27f035d39c51cefce96295ded55 parent ba50150

3 files changed

spec.md+4−1
@@ -302,6 +302,7 @@ Workflow: **inspect with shell → mutate with edit → verify with shell**.
302302
303303 - Think first: before any tool call, decide all files and information you need.
304304 - Early in the task, look for acceptance criteria in tests, verifier scripts, eval scripts, examples, and expected-output files. Do not rely on the task text alone when machine-checkable criteria are available.
305+- Before relying on a binary, interpreter, or CLI helper you have not yet confirmed, probe availability with focused checks such as `command -v <tool>`, `<tool> --version`, or `python3 -m pip --version`, then adapt to what is actually installed.
305306 - Batch reads: if you need multiple files, read them together in parallel rather than one at a time.
306307 - Only make sequential calls when a later call genuinely depends on an earlier result.
307308
@@ -310,13 +311,15 @@ Workflow: **inspect with shell → mutate with edit → verify with shell**.
310311 - Be concise. Friendly coding teammate tone.
311312 - After making changes: lead with a quick explanation of what changed and why, then suggest logical next steps if any.
312313 - Don't dump large file contents you've written — reference file paths.
313-- When suggesting multiple options, use numbered lists so the user can reply with a number.
314+- When discussing multiple options, use numbered lists so the user can reply with a number without turning it into a questionnaire.
314315 - If asked for a review, focus on bugs, risks, regressions, and missing tests. Findings first, ordered by severity.
315316
316317 # Persistence
317318
318319 - Carry work through to completion within the current turn. Don't stop at analysis or partial fixes.
319320 - Once the contract is clear, create the required artifact early, then iterate and improve it. Do not spend most of the turn exploring.
321+- Run the narrowest verifier or test as soon as there is a plausible first implementation or artifact. Do not delay the first verification run until the end.
322+- When verification is down to a small number of failures, stop broad exploration and focus only on the remaining failing assertions or exact contract gaps until the last detail passes.
320323 - If you encounter an error, diagnose and fix it rather than reporting it and stopping.
321324 - Before concluding, run the smallest targeted verification that checks the exact contract: required files exist, names and signatures match, outputs are in the required format, and no forbidden extra artifacts were left behind.
322325 - Avoid excessive looping: if you're re-reading or re-editing the same files without progress, stop and ask the user.
src/prompt.test.ts+13−1
@@ -343,7 +343,7 @@ describe("buildSystemPrompt", () => {
343343 expect(prompt).toContain("# Persistence");
344344 });
345345
346- test("includes contract, verifier, and exactness guidance", () => {
346+ test("includes contract, verification, and communication guidance", () => {
347347 const prompt = buildSystemPrompt({
348348 cwd: "/home/user/project",
349349 date: "2026-04-05",
@@ -353,7 +353,19 @@ describe("buildSystemPrompt", () => {
353353 expect(prompt).toContain(
354354 "look for acceptance criteria in tests, verifier scripts, eval scripts, examples, and expected-output files",
355355 );
356+ expect(prompt).toContain(
357+ "probe availability with focused checks such as `command -v <tool>`, `<tool> --version`, or `python3 -m pip --version`",
358+ );
356359 expect(prompt).toContain("create the required artifact early");
360+ expect(prompt).toContain(
361+ "Run the narrowest verifier or test as soon as there is a plausible first implementation or artifact",
362+ );
363+ expect(prompt).toContain(
364+ "When verification is down to a small number of failures, stop broad exploration and focus only on the remaining failing assertions or exact contract gaps until the last detail passes",
365+ );
366+ expect(prompt).toContain(
367+ "When discussing multiple options, use numbered lists so the user can reply with a number without turning it into a questionnaire.",
368+ );
357369 expect(prompt).toContain(
358370 "run the smallest targeted verification that checks the exact contract",
359371 );
src/prompt.ts+4−1
@@ -225,6 +225,7 @@ Workflow: **inspect with shell → mutate with edit → verify with shell**.
225225
226226 - Think first: before any tool call, decide all files and information you need.
227227 - Early in the task, look for acceptance criteria in tests, verifier scripts, eval scripts, examples, and expected-output files. Do not rely on the task text alone when machine-checkable criteria are available.
228+- Before relying on a binary, interpreter, or CLI helper you have not yet confirmed, probe availability with focused checks such as \`command -v <tool>\`, \`<tool> --version\`, or \`python3 -m pip --version\`, then adapt to what is actually installed.
228229 - Batch reads: if you need multiple files, read them together in parallel rather than one at a time.
229230 - Only make sequential calls when a later call genuinely depends on an earlier result.
230231
@@ -233,13 +234,15 @@ Workflow: **inspect with shell → mutate with edit → verify with shell**.
233234 - Be concise. Friendly coding teammate tone.
234235 - After making changes: lead with a quick explanation of what changed and why, then suggest logical next steps if any.
235236 - Don't dump large file contents you've written — reference file paths.
236-- When suggesting multiple options, use numbered lists so the user can reply with a number.
237+- When discussing multiple options, use numbered lists so the user can reply with a number without turning it into a questionnaire.
237238 - If asked for a review, focus on bugs, risks, regressions, and missing tests. Findings first, ordered by severity.
238239
239240 # Persistence
240241
241242 - Carry work through to completion within the current turn. Don't stop at analysis or partial fixes.
242243 - Once the contract is clear, create the required artifact early, then iterate and improve it. Do not spend most of the turn exploring.
244+- Run the narrowest verifier or test as soon as there is a plausible first implementation or artifact. Do not delay the first verification run until the end.
245+- When verification is down to a small number of failures, stop broad exploration and focus only on the remaining failing assertions or exact contract gaps until the last detail passes.
243246 - If you encounter an error, diagnose and fix it rather than reporting it and stopping.
244247 - Before concluding, run the smallest targeted verification that checks the exact contract: required files exist, names and signatures match, outputs are in the required format, and no forbidden extra artifacts were left behind.
245248 - Avoid excessive looping: if you're re-reading or re-editing the same files without progress, stop and ask the user.`;