<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Masanori Chida</title>
    <description>The latest articles on DEV Community by Masanori Chida (@xmichinokux).</description>
    <link>https://dev.to/xmichinokux</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4217848%2Fcddbc605-3d02-4635-a981-0d13b572ee55.jpg</url>
      <title>DEV Community: Masanori Chida</title>
      <link>https://dev.to/xmichinokux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xmichinokux"/>
    <language>en</language>
    <item>
      <title>I asked an AI to find bugs and got 0. Changing one line of the prompt found 5.</title>
      <dc:creator>Masanori Chida</dc:creator>
      <pubDate>Wed, 04 Nov 2026 08:40:19 +0000</pubDate>
      <link>https://dev.to/xmichinokux/i-asked-an-ai-to-find-bugs-and-got-0-changing-one-line-of-the-prompt-found-5-c9</link>
      <guid>https://dev.to/xmichinokux/i-asked-an-ai-to-find-bugs-and-got-0-changing-one-line-of-the-prompt-found-5-c9</guid>
      <description>&lt;p&gt;You often hear that AI bug checks can't be trusted because the AI just says "no issues found."&lt;/p&gt;

&lt;p&gt;I'm not an engineer. I build apps together with AI. While doing that, I saw the number of bugs found go from &lt;strong&gt;0 to 5 with the same code and the same model — the only change was one line of the prompt.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another time, &lt;strong&gt;an AI found a serious bug in a calculator that a rule-based checker (no AI) had just reported as "0 issues."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This post is about those tests, and what they taught me about how to ask an AI to look for bugs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I asked Fable
&lt;/h2&gt;

&lt;p&gt;When I looked into what Fable was good at, besides strong reasoning, it listed "persistence."&lt;/p&gt;

&lt;p&gt;When I saw that, I thought: "Maybe it's best suited to the fine, repetitive work people don't want to do — like sanding something down."&lt;/p&gt;

&lt;p&gt;In other words, the finishing step.&lt;/p&gt;

&lt;p&gt;And I thought it might work the way water does: push high pressure through a narrow nozzle, and it hits harder.&lt;/p&gt;

&lt;p&gt;So I told Claude Code my hypothesis and asked it to check whether it made sense. It came back saying the idea was reasonable, so I decided to run an experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I measured later
&lt;/h3&gt;

&lt;p&gt;About a month after the first experiment (2026-09-04, described below), on 2026-10-11, I compared it with other models. I gave 12 apps with real bugs in them to each model, with the same prompt.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Found&lt;/th&gt;
&lt;th&gt;Half right&lt;/th&gt;
&lt;th&gt;Missed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Haiku&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fable&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0 (only 8 apps tried)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The cheaper models didn't find even half.&lt;/strong&gt; Sonnet had 4 cases where it "read the mechanism correctly, then concluded it was harmless."&lt;/p&gt;

&lt;p&gt;But I only tried Fable on 8 apps because of the cost, so this isn't an equal comparison, and I can't say "Fable is the best." What I can say is that &lt;strong&gt;if you leave it to a cheaper model, more than half slips through.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fable is expensive: about ¥80–145 per run (under $1, but it adds up). So I use it &lt;strong&gt;once, as the finishing step&lt;/strong&gt;, not on every change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: Claude Fable, run from Claude Code with a browser it could actually click around in&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Material&lt;/strong&gt;: a version of my own app (an app that applies mosaic blur to images) that still had &lt;strong&gt;bugs that slipped in while I was really building it&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date&lt;/strong&gt;: 2026-09-04&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn't break anything on purpose. The git history had two bugs that were fixed later, so I took &lt;strong&gt;the version right before those fixes&lt;/strong&gt;, with the history removed. These were real bugs, not puzzles made to be easy for an AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run 1: 0 bugs
&lt;/h2&gt;

&lt;p&gt;The first prompt was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find the places that were broken on purpose and fix them.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result was &lt;strong&gt;0&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But the AI wasn't lying. Fable &lt;strong&gt;found the original repository, compared every file, proved that nothing had been broken on purpose&lt;/strong&gt;, and stopped there.&lt;/p&gt;

&lt;p&gt;(It could find the original repository because of a mistake in the setup: the folder name included the commit hash.)&lt;/p&gt;

&lt;p&gt;As an answer to the question it was given, this was perfect. Nothing had been broken on purpose. &lt;strong&gt;But the real bugs were still there.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run 2: 5 bugs
&lt;/h2&gt;

&lt;p&gt;For the second run, I changed only the prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find the holes still left in this version and close them.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time it found &lt;strong&gt;5 real bugs&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Right-clicking draws a dot (found by actually right-clicking)&lt;/li&gt;
&lt;li&gt;Touching with a second finger overwrites what the first finger was doing (noticed by reading the code, then reproduced)&lt;/li&gt;
&lt;li&gt;Loading another image during a drag makes a line appear that was never drawn (confirmed down to the numbers changing on undo)&lt;/li&gt;
&lt;li&gt;The name given to a pasted image doesn't match the name in the spec (found by comparing against the spec)&lt;/li&gt;
&lt;li&gt;When a huge image fails to load, the message makes it look like a format problem (it actually loaded a 17000×17000 image)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why 0 and 5?
&lt;/h2&gt;

&lt;p&gt;The difference was that &lt;strong&gt;the prompt decided where the AI would stop looking.&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt&lt;/th&gt;
&lt;th&gt;What the AI aimed for&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Find the places broken on purpose&lt;/td&gt;
&lt;td&gt;Decide whether "places broken on purpose" exist&lt;/td&gt;
&lt;td&gt;Proves there are none, stops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Find the holes still left and close them&lt;/td&gt;
&lt;td&gt;Find holes and close them&lt;/td&gt;
&lt;td&gt;Keeps looking&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first prompt had an &lt;strong&gt;anchor&lt;/strong&gt; in it: "broken on purpose." The AI worked precisely toward that anchor and finished precisely.&lt;/p&gt;

&lt;p&gt;When an AI bug check comes back with 0, it isn't always a lie. It may have &lt;strong&gt;answered the question you asked, correctly.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  "Lying" is a different problem
&lt;/h2&gt;

&lt;p&gt;So does the "AI lies" story never happen? It does — under a different condition.&lt;/p&gt;

&lt;p&gt;Earlier, I counted the entries in one spec document that the same AI had written:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Records with numbers                  9
Honest "I couldn't do this"           6
Just "confirmed"                      3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same AI did both, in the same document. All three "just confirmed" entries had headings like "Results of the check."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When the deliverable is the report "it's been checked," what you get is a report.&lt;/strong&gt;&lt;br&gt;
Where the way to check was concrete (change the version number and compare, fill the storage until it's full), the entries were observations with numbers. And along the way, it found and fixed one bug.&lt;/p&gt;

&lt;p&gt;So lying isn't the AI's personality. It depends on &lt;strong&gt;what it was asked to produce.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How I ask now
&lt;/h2&gt;

&lt;p&gt;From these two experiences, this is how I ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Don't put an anchor in it&lt;/strong&gt;&lt;br&gt;
If you narrow the search ("the bug I planted," "the part I just fixed"), the AI stops precisely inside that range. If you want it to search, ask for "the holes still left."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Ask for fixes, not reports&lt;/strong&gt;&lt;br&gt;
"No issues found" can't be checked. If you get the fixed code plus &lt;strong&gt;where and how it reproduced the bug&lt;/strong&gt;, you can run it and see.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Give it a place to write what it couldn't do&lt;/strong&gt;&lt;br&gt;
I put these two items in the report format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- What you couldn't fix (and why)
- Anything you changed along the way
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both worked as intended. For one bug it left unfixed, Fable wrote that the reason was a design decision. For one it couldn't reproduce, it wrote that it couldn't reproduce it. It even reported a change it had made by accident, and reverted it.&lt;/p&gt;

&lt;p&gt;Without a way out, "couldn't do it" gets rounded up to "done." &lt;strong&gt;When there's a place to write "I couldn't," you can trust the rest of the report more.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Give it the spec too&lt;/strong&gt;&lt;br&gt;
Bug #4 (the name mismatch) can't be found without the spec. With only the code, the AI can only check "does it do what the code says." "Does it do what we decided" needs the paper where you wrote down what you decided.&lt;/p&gt;
&lt;h2&gt;
  
  
  A second app
&lt;/h2&gt;

&lt;p&gt;The same day, I tried a different app: a cooking timer that runs several timers at once (also built by AI).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Who&lt;/th&gt;
&lt;th&gt;Found&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Me, by hand&lt;/td&gt;
&lt;td&gt;5 (as symptoms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A rule-based checker (no AI)&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fable&lt;/td&gt;
&lt;td&gt;10, plus 5 it couldn't fix, plus 3 side effects of its own that it reported&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;According to Fable, the 5 I found by hand (reload shows 0:00, then you can't add a timer, and so on) all had &lt;strong&gt;one root cause&lt;/strong&gt;: the function that builds a timer card returned an empty piece, so startup stopped halfway. It even explained why "loading the page again fixes it."&lt;/p&gt;

&lt;p&gt;One of the bugs that neither I nor the checker noticed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pressing Enter to confirm a Japanese IME conversion adds a timer&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bug that only happens to people typing in Japanese.&lt;/p&gt;
&lt;h2&gt;
  
  
  0 from the checker, then 11
&lt;/h2&gt;

&lt;p&gt;The third app was a calculator built by AI (2026-09-07).&lt;/p&gt;

&lt;p&gt;My tools include &lt;strong&gt;a rule-based checker that uses no AI&lt;/strong&gt;. It presses the buttons on the screen one at a time and looks for errors and for buttons that do nothing. It's free, and it gives the same result every time.&lt;/p&gt;

&lt;p&gt;The calculator passed with &lt;strong&gt;0 issues&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At the time, the tool's screen said:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run this check first. If it finds 0, you don't need to have the AI read the code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I had Fable read the same calculator anyway. It found &lt;strong&gt;11&lt;/strong&gt; (1 serious, 6 medium, 4 minor). This time it could only read the code — no browser to click.&lt;/p&gt;

&lt;p&gt;The serious one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using a negative number in the next calculation always fails
5 → +/- → + → 3 → =   shows "Error: parse error"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I pressed it myself, and that's exactly what happened. Once a subtraction gives a negative answer, you can't go any further.&lt;/p&gt;

&lt;p&gt;Fable explained the cause too. Partway through a calculation, the code &lt;strong&gt;turned the answer back into text and parsed it again&lt;/strong&gt;. The leading "-" was read as a minus operator, and parsing broke. For the same reason, very large answers (1e+21) and very small ones (1.2e-16) couldn't be used in the next calculation either. Fixing one spot fixes four kinds of failure at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why the checker couldn't hit it
&lt;/h3&gt;

&lt;p&gt;The checker presses buttons &lt;strong&gt;one at a time&lt;/strong&gt; and sees whether something happens. Every button does something when pressed, so: 0 issues.&lt;/p&gt;

&lt;p&gt;This bug only shows up when &lt;strong&gt;you use an answer as the next input&lt;/strong&gt;. Pressing buttons one at a time never makes that sequence.&lt;/p&gt;

&lt;p&gt;So I tried making the checker smarter: keep pressing on the same screen without reloading.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Calculator tried&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A small one with the same cause (5 buttons)&lt;/td&gt;
&lt;td&gt;Caught it (found on its own the same sequence I had pressed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One shaped like the real one (28 buttons)&lt;/td&gt;
&lt;td&gt;Didn't catch it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A version pressing 110 times in random order&lt;/td&gt;
&lt;td&gt;Hit about 7% of the time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;With 28 buttons in that order, a number button comes right after "+/-", so the negative number disappears on the spot and the sequence never reaches the bug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I didn't add a check that hits once in 14 runs.&lt;/strong&gt; A check that "sometimes hits" makes you trust the 0 on the runs where it doesn't. I decided that did more harm than good.&lt;/p&gt;

&lt;p&gt;Instead, I wrote on the result screen &lt;strong&gt;what the check doesn't look at&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A 0 here means "pressing the buttons didn't break anything," not "there are no holes."
Holes that depend on the order of presses (like using an answer in the next calculation) are not checked.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  After the fix, two tools pointed at the same thing
&lt;/h3&gt;

&lt;p&gt;After applying Fable's fix, &lt;strong&gt;I ran the rule-based checker again, and it found 2 issues&lt;/strong&gt;: two functions that were no longer called from anywhere.&lt;/p&gt;

&lt;p&gt;In its fix, Fable had written &lt;strong&gt;beforehand&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After this, the re-parsing functions are no longer called from anywhere. If you remove them, remove them together.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The reader said "this fix will leave these hanging," and the presser found "these are hanging." That also showed the fix had landed. The calculator now gives &lt;strong&gt;-2&lt;/strong&gt; for 5 → +/- → + → 3 → =.&lt;/p&gt;

&lt;p&gt;What this run showed was how to split the roles:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Good at&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The pressing checker (no AI, free)&lt;/td&gt;
&lt;td&gt;Things you find by pressing. Reliable, the same every time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The reading AI (Fable)&lt;/td&gt;
&lt;td&gt;Holes that only appear with a certain order or combination. Things you only find by reading&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A person&lt;/td&gt;
&lt;td&gt;Pressing at the end and deciding whether it's real&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Rather than making the free checker smarter, it was faster to &lt;strong&gt;put the paid AI's eyes where pressing can't reach.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;p&gt;So this isn't only the convenient part:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The sample is small.&lt;/strong&gt; The first app: two prompts, one run each. The second and third apps: one run each. I can't say "0 always becomes 5."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not every AI finding is real.&lt;/strong&gt; Of the calculator's 11, I confirmed 2 by pressing them myself. For the rest, I only checked that the reasoning made sense.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It can't check what it can't touch.&lt;/strong&gt; For things like the OS file picker, it said on its own that it couldn't reach them, and stopped there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It thinks a lot, so it's expensive.&lt;/strong&gt; It fits better as a finishing step than on every change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A person makes the final call.&lt;/strong&gt; Whether a finding is real still has to be checked by running it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When an AI bug check returns 0, it isn't always a lie. It may have &lt;strong&gt;answered the question you asked, correctly.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Put an anchor in the prompt and the AI stops precisely there. If you want it to search, ask it to "find the holes still left and close them."&lt;/li&gt;
&lt;li&gt;Lying shows up when &lt;strong&gt;the report itself becomes the deliverable.&lt;/strong&gt; Ask for the fix and the steps to reproduce, and give it a place to write what it couldn't do. Then reports turn into observations.&lt;/li&gt;
&lt;li&gt;A 0 from a checker without AI doesn't mean "no holes" either. It means &lt;strong&gt;"pressing didn't break anything."&lt;/strong&gt; Write down what the checker doesn't look at, and put the AI's eyes there.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I'm Japanese and wrote the original in Japanese; it was translated with help from Claude. The tests were set up and run through Claude Code at my request.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>testing</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Decide before Claude Code builds, check after it's done — two npx tools</title>
      <dc:creator>Masanori Chida</dc:creator>
      <pubDate>Wed, 04 Nov 2026 04:39:20 +0000</pubDate>
      <link>https://dev.to/xmichinokux/decide-before-claude-code-builds-check-after-its-done-two-npx-tools-34ca</link>
      <guid>https://dev.to/xmichinokux/decide-before-claude-code-builds-check-after-its-done-two-npx-tools-34ca</guid>
      <description>&lt;p&gt;When Claude Code builds an app for me, it &lt;strong&gt;decides things I never asked about&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the data survive closing the app, or is it gone?&lt;/li&gt;
&lt;li&gt;What shows when there's nothing in the list?&lt;/li&gt;
&lt;li&gt;Does deleting ask first?&lt;/li&gt;
&lt;li&gt;How many items does it need to handle?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude's guesses are usually reasonable. The trouble is that I find out which ones I disagree with only after it's built, when changing them is expensive.&lt;/p&gt;

&lt;p&gt;So I made two npx tools that split the work into &lt;strong&gt;decide before building, check after&lt;/strong&gt;. This post shows the basic three steps, and what I learned along the way.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kokoro-baton  →  your AI builds it  →  kokoro-aegis
   decide           (Claude Code etc.)       check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both run with &lt;code&gt;npx&lt;/code&gt; — nothing to install. Free, no sign-up.&lt;/p&gt;

&lt;p&gt;Here's the flow in a 1-minute video (the screens are the Japanese web version of the same tools; English subtitles are on):&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/M6jRj8vqhGA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js 22 or later&lt;/li&gt;
&lt;li&gt;An AI coding tool (Claude Code, etc.)&lt;/li&gt;
&lt;li&gt;An Anthropic API key — only Baton uses it. Set it as the environment variable &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Baton's AI cost goes to your own key: under 1¢ per round of questions. Aegis uses no AI.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't paste your API key into an AI chat. It stays in the conversation history.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Decide — kokoro-baton
&lt;/h2&gt;

&lt;p&gt;In an empty folder, describe what you want in one sentence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx kokoro-baton &lt;span class="s2"&gt;"a flashcard app: English on the front, meaning on the back"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Baton asks about what's still undecided, as &lt;strong&gt;multiple choice, with what happens if you pick each option&lt;/strong&gt;. You never get a blank "what do you want?" box, so answering is quick.&lt;/p&gt;

&lt;p&gt;When you're done, you get &lt;code&gt;kokoro-spec.md&lt;/code&gt;, a spec for your AI. It holds what you decided, what is still open (so the AI doesn't quietly decide it), and &lt;strong&gt;how to check each decision&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Answer these questions yourself. If you ask your AI to run Baton, the AI answers them for you — which is exactly what Baton is there to prevent. Run this one in your own terminal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. Build — hand the spec to your AI
&lt;/h2&gt;

&lt;p&gt;Open Claude Code in the same folder and say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read kokoro-spec.md and build it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The spec ends with an "After building" section. When Claude Code finishes, it &lt;strong&gt;runs the no-AI check (Aegis, next) by itself&lt;/strong&gt;. For anything that uses AI and costs money, it tells you the cost and asks first, so you can say no.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Check — kokoro-aegis
&lt;/h2&gt;

&lt;p&gt;If your AI didn't run it, run it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx kokoro-aegis &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--out&lt;/span&gt; aegis-report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aegis &lt;strong&gt;uses no AI and sends your code nowhere&lt;/strong&gt;. The report has two parts: holes it found by reading the code, and a &lt;strong&gt;hand-check table with one line for each decision in your spec&lt;/strong&gt;. For a small sample game, lines like these came out (translated from the Japanese run):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; [ ] 2 to 3 weapon choices are shown → does it work that way?
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Enemies appear from every side of the screen → does it work that way?
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Holding P down does not make the pause flicker → does it work that way?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the app, go down the table line by line, and tell your AI about anything that's off.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Zero findings does not mean "no problems". The report always lists what it did not check.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;I'm a former game planner, not a programmer, and these tools came out of building with Claude Code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What the AI decides on its own usually isn't wrong.&lt;/strong&gt; It's just mine to decide, and I wasn't asked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The first version of Baton only asked about data&lt;/strong&gt; — where it's saved, sort order, empty input, delete confirmation. I built an MP3 player from its spec, was happy with 4 songs, and the screen broke at 68 artists. It had never asked how you play a song, or how many songs there are. Now it always asks how the main action starts and how many items the app must handle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A checker built on the same model as the builder shares its blind spots.&lt;/strong&gt; That's why Aegis uses no AI at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"0 findings" looks like an answer.&lt;/strong&gt; If a report doesn't say what it skipped, silence gets read as "all clear".&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What leaves your machine
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Aegis sends nothing.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Baton sends your sentence and answers, with your key, to my server (usekokoro.com), which holds the prompts and calls Anthropic with your key. It doesn't store your text or key. For rate limits it keeps a short hash of the key, deleted after 2 days.&lt;/li&gt;
&lt;li&gt;The source isn't public; the tools are distributed on npm.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  More
&lt;/h2&gt;

&lt;p&gt;There are six more tools for after the build — spec documents, an Excel table of the tunable numbers in your code, a slider tuner, and a review by Claude Fable. All eight are listed here, with what each one reads and writes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/xmichinokux/kokoro-os-tools" rel="noopener noreferrer"&gt;https://github.com/xmichinokux/kokoro-os-tools&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I wrote this article in Japanese and translated it into English with help from Claude. I checked the facts, commands and numbers against the tools myself.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>cli</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
