<?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: Kevin Ugochukwu Chime</title>
    <description>The latest articles on DEV Community by Kevin Ugochukwu Chime (@gunroar).</description>
    <link>https://dev.to/gunroar</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%2F4267197%2F7cfadf1a-a656-4a35-8601-53cd7ae809f3.png</url>
      <title>DEV Community: Kevin Ugochukwu Chime</title>
      <link>https://dev.to/gunroar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gunroar"/>
    <language>en</language>
    <item>
      <title>My AI coding agent isn't allowed to be efficiently LAZY</title>
      <dc:creator>Kevin Ugochukwu Chime</dc:creator>
      <pubDate>Thu, 26 Nov 2026 15:15:58 +0000</pubDate>
      <link>https://dev.to/gunroar/my-ai-coding-agent-isnt-allowed-to-be-efficiently-lazy-268h</link>
      <guid>https://dev.to/gunroar/my-ai-coding-agent-isnt-allowed-to-be-efficiently-lazy-268h</guid>
      <description>&lt;p&gt;I built a graphical goal planner with Claude Code, and let a browser-testing agent, Kane CLI, decide when the work was finished.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fji707etbx1q4zacucnl1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fji707etbx1q4zacucnl1.png" alt="Hey, there!" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every developer who has used an AI coding agent knows this moment. The agent writes a few hundred lines, runs the tests, and says, with full confidence, "Bro, I'm done!" Then you open the app and the button does nothing.&lt;/p&gt;

&lt;p&gt;The agent honestly wasn't lying. It just graded its own homework, gave itself a perfect score, a gold star for good performance. It checked what it could check (the code compiles, the unit tests pass) and nobody actually clicked through the app.&lt;/p&gt;

&lt;p&gt;For the KaneCLI Online Hackathon by TestMu AI, I wanted to try a different rule: &lt;strong&gt;the agent doesn't get to decide when it's finished. Something outside it does.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The result is PathProof.&lt;/p&gt;

&lt;h2&gt;
  
  
  What PathProof does
&lt;/h2&gt;

&lt;p&gt;You type a goal, like &lt;em&gt;"Get a junior developer job"&lt;/em&gt; or &lt;em&gt;"Run a marathon"&lt;/em&gt;, and PathProof draws a map of the milestones between you and it. Every step has a cost in time, money, effort and risk. A* search, the same algorithm games use to move characters around obstacles, picks the cheapest route.&lt;/p&gt;

&lt;p&gt;Then real life happens. A step becomes impossible: you can't afford the bootcamp, or you get injured three weeks before the race. You block that milestone, and PathProof replans around it.&lt;/p&gt;

&lt;p&gt;It works offline, with no API keys needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdpgavcwagtty67qm0ven.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdpgavcwagtty67qm0ven.png" alt="The planner, with the Kane 3/3 badge in the top bar" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The interesting part isn't the planner itself. It's how it was built.&lt;/p&gt;




&lt;h2&gt;
  
  
  The rule: Kane decides when it's done
&lt;/h2&gt;

&lt;p&gt;I wrote PathProof with &lt;strong&gt;Claude Code&lt;/strong&gt;. To verify it, I used &lt;strong&gt;Kane CLI&lt;/strong&gt;, an AI agent that opens a real Chrome window and tests a web app the way a person would, following instructions written in plain English.&lt;/p&gt;

&lt;p&gt;Here's one of the checks, word for word:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Open the goal picker and click '+ New'. Type 'Get a junior developer job' as the goal and submit the form. Wait for the map of milestones to appear on the canvas. Then look in the left panel under the heading 'Best Path'. Verify that directly under 'Best Path' there is a numbered list of at least 2 route steps…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No selectors, no test framework. Just a description of what a user should see.&lt;/p&gt;

&lt;p&gt;The checks live in one file, &lt;code&gt;kane/checks.json&lt;/code&gt;. There are three:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;loads:&lt;/em&gt; the app opens with no errors, and the top bar shows the goal picker.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;new-goal:&lt;/em&gt; creating a goal produces a real route in the Best Path list.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;reroute:&lt;/em&gt; blocking a milestone in the middle of the route changes the route.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How the two agents talk
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpn8r1hmurqpl0zbpi9fg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpn8r1hmurqpl0zbpi9fg.png" alt="The loop between Claude Code and Kane CLI" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claude Code has &lt;em&gt;hooks&lt;/em&gt;: commands that run at fixed moments in the agent's life. One of them, the &lt;em&gt;Stop hook&lt;/em&gt;, runs whenever the agent tries to finish its turn. That's where Kane comes in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node scripts/verify.js --hook"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When Claude says it's done:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Stop hook runs &lt;code&gt;scripts/verify.js&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;verify.js&lt;/code&gt; starts one &lt;code&gt;kane-cli run --agent&lt;/code&gt; per check, all in parallel, against the app running on localhost.&lt;/li&gt;
&lt;li&gt;Kane streams its progress as JSON lines. The script reads the final &lt;code&gt;run_end&lt;/code&gt; event: pass or fail, plus a summary of what Kane saw.&lt;/li&gt;
&lt;li&gt;If any check fails, the script prints &lt;code&gt;{"decision": "block", "reason": "Kane saw: …"}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Claude Code won't let the agent stop. Instead, Kane's report becomes its next instruction.&lt;/li&gt;
&lt;li&gt;Claude fixes the code and tries to stop again. Kane re-runs. Only when every check passes does the turn actually end.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent never sees a stack trace or a failing assertion. It reads a sentence from another agent describing what went wrong on screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keeping it from looping forever
&lt;/h3&gt;

&lt;p&gt;Two agents arguing with each other can go on for a long time, so the hook has guards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It &lt;em&gt;skips&lt;/em&gt; Kane if nothing in &lt;code&gt;public/&lt;/code&gt;, &lt;code&gt;lib/&lt;/code&gt; or &lt;code&gt;server.js&lt;/code&gt; changed since the last green run.&lt;/li&gt;
&lt;li&gt;It skips if the app isn't running, or if Kane CLI isn't logged in.&lt;/li&gt;
&lt;li&gt;If the agent tries to stop twice in a row &lt;em&gt;without changing anything&lt;/em&gt;, the hook lets it stop instead of blocking forever.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a &lt;code&gt;CLAUDE.md&lt;/code&gt; in the repo that tells the agent two things: a Kane failure describes a real bug in the running app, even if it has nothing to do with the change it was asked to make, and it must &lt;strong&gt;never edit the checks to make them pass&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The moment it worked
&lt;/h2&gt;

&lt;p&gt;To test the loop, I quietly broke the app: a bug that left the Best Path list empty while the map still highlighted a route. Then I asked Claude for something unrelated, a small change to a button.&lt;/p&gt;

&lt;p&gt;Claude made the change and said it was done.&lt;/p&gt;

&lt;p&gt;Kane opened Chrome, created a goal, looked at the left panel, and failed the check:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The route finder highlights a path on the map but does not fill the Best Path list in the left panel."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpiemtmx0x1p5ksvz8kw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpiemtmx0x1p5ksvz8kw8.png" alt="Kane's report on the planted bug" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That sentence went straight back to Claude. It hadn't touched the route list and hadn't been told about the bug, but it went looking, found the cause, fixed it, and tried to stop again. Kane re-ran, everything passed, and the turn ended.&lt;/p&gt;

&lt;p&gt;That's the whole idea in one exchange: an unrelated change, a regression nobody asked about, caught in a real browser before anyone called the work finished.&lt;/p&gt;




&lt;h2&gt;
  
  
  The bug was in my test
&lt;/h2&gt;

&lt;p&gt;My favourite failure this week wasn't in the app. It was in my own check.&lt;/p&gt;

&lt;p&gt;My first version of the new-goal check said something like &lt;em&gt;"verify the route list in the left panel has at least 2 steps."&lt;/em&gt; I planted the empty-list bug, ran Kane, and… it passed.&lt;/p&gt;

&lt;p&gt;I read Kane's output to see why. Above the Best Path list, the left panel has a &lt;strong&gt;Timeline&lt;/strong&gt; bar split into numbered segments. Kane looked at the left panel, saw a numbered thing with several items, and reasonably decided that was the route.&lt;/p&gt;

&lt;p&gt;Kane did exactly what I asked. I just hadn't asked precisely enough.&lt;/p&gt;

&lt;p&gt;So I rewrote the check to name the &lt;strong&gt;"Best Path"&lt;/strong&gt; heading, to say the Timeline and Path profile charts don't count, and to say outright that an empty Best Path area is a failure. Now it fails when it should.&lt;/p&gt;

&lt;p&gt;The lesson: &lt;strong&gt;with plain-English tests, read what the tester actually saw, not just pass or fail.&lt;/strong&gt; A green check from a vague instruction can be worse than no check at all, because it makes you stop looking.&lt;/p&gt;




&lt;h2&gt;
  
  
  Kane's results are part of the product
&lt;/h2&gt;

&lt;p&gt;I didn't want the testing to stay hidden in a terminal, so PathProof shows it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Kane 3/3&lt;/strong&gt; badge sits in the app's top bar. Click it and a panel opens with every check, its plain-English objective, and Kane's own summary of what it saw on the last run.&lt;/li&gt;
&lt;li&gt;The landing page has a live checks section with the same results.&lt;/li&gt;
&lt;li&gt;The repo includes the checks, the latest report (&lt;code&gt;kane/last-report.md&lt;/code&gt;) and Kane's raw output for each check (&lt;code&gt;kane/runs/*.ndjson&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to know whether the app works, you can read exactly what the tester did and what it saw.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's rough
&lt;/h2&gt;

&lt;p&gt;This isn't a replacement for unit tests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's slow.&lt;/strong&gt; A Kane run takes minutes, not milliseconds. Running the checks in parallel helps, but the loop is still much slower than a test suite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two sources of flakiness.&lt;/strong&gt; A browser agent judging a coding agent means either one can be wrong. When a browser session dies mid-run, Kane fails the check, and the coding agent has to tell a real bug from a broken test environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The reroute check is too lenient.&lt;/strong&gt; It still accepts "no route possible" as a pass. It should require a real detour.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where it shines is the class of bugs unit tests miss: everything compiles, every function returns the right value, and the screen is still wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Run the Kane checks on every pull request in CI, not only when the agent stops.&lt;/li&gt;
&lt;li&gt;Tighten the reroute check so it needs an actual detour.&lt;/li&gt;
&lt;li&gt;Turn Kane's failures into checklist items on the goal map itself, so the planner plans its own fixes.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://pathproof-umber.vercel.app/home" rel="noopener noreferrer"&gt;https://pathproof-umber.vercel.app/home&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/GunroarCannon/pathproof" rel="noopener noreferrer"&gt;https://github.com/GunroarCannon/pathproof&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To run the checks yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install
cp .env.example .env    &lt;span class="c"&gt;# keys are optional; there's an offline planner&lt;/span&gt;
npm start               &lt;span class="c"&gt;# http://localhost:8000&lt;/span&gt;
kane-cli login --oauth
npm run verify          &lt;span class="c"&gt;# runs every Kane check, writes kane/last-report.md&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;PathProof's planner (the map, A&lt;/em&gt; search and UI) comes from my earlier project, GoalStar. The Kane verification loop, the checks, the Kane results in the app and the new landing page were built during the hackathon.*&lt;/p&gt;

&lt;p&gt;Thanks to TestMu AI and the Kane CLI team for the hackathon. If you've found a good way to keep plain-English tests specific without turning them back into CSS selectors, I'd love to hear it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;#KaneCLIHackathon #KaneCLI #AIAgents&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
