<?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: hematenergi</title>
    <description>The latest articles on DEV Community by hematenergi (@hematenergi).</description>
    <link>https://dev.to/hematenergi</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%2F557069%2Fff6a4744-9746-45f5-8dcb-db32d60f007b.png</url>
      <title>DEV Community: hematenergi</title>
      <link>https://dev.to/hematenergi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hematenergi"/>
    <language>en</language>
    <item>
      <title>My coding agent kept re-asking questions I'd already answered. So I made CI fail.</title>
      <dc:creator>hematenergi</dc:creator>
      <pubDate>Mon, 19 Oct 2026 05:00:16 +0000</pubDate>
      <link>https://dev.to/hematenergi/my-coding-agent-kept-re-asking-questions-id-already-answered-so-i-made-ci-fail-2mie</link>
      <guid>https://dev.to/hematenergi/my-coding-agent-kept-re-asking-questions-id-already-answered-so-i-made-ci-fail-2mie</guid>
      <description>&lt;p&gt;Here's the pattern, in its simplest form. On Monday you tell your agent: no email sign-up — most of your users don't have an email address, so it's phone numbers.&lt;/p&gt;

&lt;p&gt;On Thursday a fresh session opens with: &lt;em&gt;"Before I start — should sign-up use email, or a phone number?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Nobody did anything wrong. The decision was made, and the reasoning was good. It just lived in a chat window that no longer existed. The new session read the code, saw nothing about email, and did the reasonable thing: it asked. Sometimes it didn't ask, and just built the version I'd already rejected.&lt;/p&gt;

&lt;p&gt;If you work with coding agents every day, you've probably started typing a little speech at the top of every session. &lt;em&gt;It's a small shop. Sign-up is by phone. Don't touch the price code, we fixed that bug twice. Checkout is stuck because I haven't decided what a failed payment shows.&lt;/em&gt; You forget a different piece each time, and the piece you forget is the one that breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix isn't a smarter agent. It's a file.
&lt;/h2&gt;

&lt;p&gt;I'm a frontend and mobile engineer. Most of my week is React and React Native apps in production, and lately a lot of side work driven by Claude Code and Codex. What I wanted was simple: the last five minutes of a session should produce a &lt;strong&gt;file&lt;/strong&gt;, not a memory.&lt;/p&gt;

&lt;p&gt;That became &lt;a href="https://github.com/hematenergi/fragment" rel="noopener noreferrer"&gt;Fragment&lt;/a&gt;. It's not a tool that runs anything. It's a handful of plain files in your repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/AGENT-PROTOCOL.md   the rules. one file. every agent and human reads this one
CLAUDE.md / AGENTS.md    three lines each, pointing there. never a second copy
docs/STATE.md            the board. read first, written last
scripts/docs-check.sh    red when any of the above stops being true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;STATE.md&lt;/code&gt; has a section called &lt;strong&gt;"Decisions already made — do not ask again."&lt;/strong&gt; That's where "phone, not email, because most users don't have one" goes. The next session reads it before it speaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Files alone decay in a week
&lt;/h2&gt;

&lt;p&gt;I've tried the "just keep a notes file" approach. It works for about five days. Then one session forgets to update it, the next one trusts a stale board, and you're back to the speech.&lt;/p&gt;

&lt;p&gt;So the part that matters isn't the folder layout. It's the guard. &lt;code&gt;docs-check.sh&lt;/code&gt; fails CI when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a session changed documents and left no trace in the log,&lt;/li&gt;
&lt;li&gt;a link stopped resolving or a document isn't indexed,&lt;/li&gt;
&lt;li&gt;the board hasn't moved in a week,&lt;/li&gt;
&lt;li&gt;a piece of work claims &lt;code&gt;done&lt;/code&gt; with an unticked box and no recorded command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It knows nothing about your code or your language. It only checks that the story stays true. Repo-specific rules go in a local file the shared guard sources, so updating the guard never touches them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happened when someone else used it
&lt;/h2&gt;

&lt;p&gt;Fragment was extracted from a private repo, not designed first. Two people, two operating systems, two different agents, 25 commits in 18 hours. Two things surprised me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The guard caught a real incident 74 minutes after it was wired into CI.&lt;/strong&gt; A file was renamed through the GitHub web UI. Perfectly reasonable housekeeping, but the rename broke three rules at once: a dangling index link, an unlisted file, a skipped session log. CI went red within minutes. Nobody was careless; a web UI just can't see an index it doesn't know exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second person adopted the ritual without being taught it.&lt;/strong&gt; All seven of their commits had the same three-file shape: index, board, the actual work. No shared session, no reminders. They read the same protocol file and converged on the same move.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't prove
&lt;/h2&gt;

&lt;p&gt;I'd rather say this up front, because a case study that only flatters itself is marketing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;n=2. Both production repos are run by me.&lt;/li&gt;
&lt;li&gt;Concurrency above two people is untested. Those two took turns.&lt;/li&gt;
&lt;li&gt;Nothing here shows Fragment preventing bugs. It prevents lost context and re-argued decisions. Tests and review still decide whether the code is correct.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full working, with commit SHAs, is in &lt;a href="https://github.com/hematenergi/fragment/blob/main/CASE-STUDY.md" rel="noopener noreferrer"&gt;CASE-STUDY.md&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;In Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add hematenergi/fragment &lt;span class="nt"&gt;--skill&lt;/span&gt; fragment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or paste the install prompt from &lt;a href="https://hematenergi.github.io/fragment/" rel="noopener noreferrer"&gt;the site&lt;/a&gt; into whatever agent you already use. The first run of the guard will fail. That's the feature: it's your adoption checklist. Work down the list until it's green.&lt;/p&gt;

&lt;p&gt;If you try it and it breaks, I want to hear where.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Dany, a frontend and mobile engineer in Indonesia (GMT+7): React, Next.js, React Native, and web3 frontend (Solana, EVM). I also build tooling for AI coding agents. Open to remote contract work — &lt;a href="https://hematenergi.github.io" rel="noopener noreferrer"&gt;hematenergi.github.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>opensource</category>
      <category>git</category>
    </item>
  </channel>
</rss>
