<?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>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>
