<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How I Survived 7 Rebuilds of the Same SaaS by Building a Control Layer Around Claude Code]]></title><description><![CDATA[How I Survived 7 Rebuilds of the Same SaaS by Building a Control Layer Around Claude Code]]></description><link>https://vintage97hashnodedev.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6a0d69347e4b2e77c06f0338/76a97860-b143-47ca-8d64-cb9232a6a4e1.jpg</url><title>How I Survived 7 Rebuilds of the Same SaaS by Building a Control Layer Around Claude Code</title><link>https://vintage97hashnodedev.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 11:01:28 GMT</lastBuildDate><atom:link href="https://vintage97hashnodedev.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I cross-checked my date calculator against python-dateutil: 3,000 cases, 14 disagreements]]></title><description><![CDATA[I run a small site of free browser tools, and the date calculator is the page that gets the most search impressions. Date code that "looks right" is easy…]]></description><link>https://vintage97hashnodedev.hashnode.dev/i-cross-checked-my-date-calculator-against-python-dateutil-3-000-cases-14-disagreements</link><guid isPermaLink="true">https://vintage97hashnodedev.hashnode.dev/i-cross-checked-my-date-calculator-against-python-dateutil-3-000-cases-14-disagreements</guid><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[JK]]></dc:creator><pubDate>Thu, 19 Nov 2026 16:29:04 GMT</pubDate><content:encoded><![CDATA[<p>I run a small site of free browser tools, and the date calculator is the page that gets the most search impressions. Date code that "looks right" is easy to write and hard to trust, so I checked mine against code I didn't write.</p>
<h2>The setup</h2>
<p>A short Python script picks 3,000 date sums with a fixed random seed:</p>
<ul>
<li>1,000 "add N months" (N from -36 to 36)</li>
<li>1,000 "add N days" (N from -1,500 to 1,500)</li>
<li>1,000 "gap between two dates", in days and in years, months and days</li>
</ul>
<p>Dates run from 1990 to 2040. About 30% are picked on purpose from the awkward ones: January 31, February 28, March 31, August 31, December 31, February 29, and the same days in 2100, which is not a leap year.</p>
<p>The script answers each one with <code>python-dateutil</code> (<code>relativedelta</code>) and plain <code>datetime</code>, then writes the answers to a JSON file. A Node test reads that file and compares every case with the site's own JavaScript. The test runs before every deploy.</p>
<h2>What came out</h2>
<table>
<thead>
<tr>
<th>Check</th>
<th>Cases</th>
<th>Same answer</th>
</tr>
</thead>
<tbody><tr>
<td>Add or subtract months</td>
<td>1000</td>
<td>1000</td>
</tr>
<tr>
<td>Add or subtract days</td>
<td>1000</td>
<td>1000</td>
</tr>
<tr>
<td>Days between two dates</td>
<td>1000</td>
<td>1000</td>
</tr>
<tr>
<td>Gap in years, months and days</td>
<td>1000</td>
<td>986</td>
</tr>
</tbody></table>
<p>All 14 differences have the same shape: the end date is the last day of a shorter month and the start day is bigger. January 31 to February 29, 2028 is the simplest one. Both sides say 29 days. dateutil says "1 month", because January 31 plus one month lands on February 29. My code says "29 days", because the 31st hasn't come round yet.</p>
<p>I kept my reading and wrote the difference on the page instead of hiding it. The test now allows exactly that one pattern and fails on anything else.</p>
<h2>The shortcut that fails 1 in 10</h2>
<p>I also ran the common shortcut, <code>date.setMonth(date.getMonth() + n)</code>, which moves the month number and lets the day overflow. It disagreed with both libraries in 97 of the 1,000 month sums:</p>
<table>
<thead>
<tr>
<th>Start</th>
<th>Step</th>
<th>Clamped to month end</th>
<th>setMonth</th>
</tr>
</thead>
<tbody><tr>
<td>Jan 31, 2026</td>
<td>+1 month</td>
<td>Feb 28, 2026</td>
<td>Mar 3, 2026</td>
</tr>
<tr>
<td>Aug 31, 2026</td>
<td>+6 months</td>
<td>Feb 28, 2027</td>
<td>Mar 3, 2027</td>
</tr>
<tr>
<td>Dec 31, 2026</td>
<td>-30 months</td>
<td>Jun 30, 2024</td>
<td>Jul 1, 2024</td>
</tr>
</tbody></table>
<p>If a tool tells you a date in the first days of the next month for a step that started on the 29th, 30th or 31st, that overflow is usually why.</p>
<p>The results table is on the <a href="https://instantfreetools.com/date-calculator/">date calculator page</a> under "How we tested this calculator". If you've hit a date case that two tools disagree on, I'd like to add it to the test file.</p>
]]></content:encoded></item><item><title><![CDATA[Three small calculators, three edge cases I had to decide on purpose]]></title><description><![CDATA["9 to 5" without am or pm, a 29 February birthday, and temperatures below absolute zero]]></description><link>https://vintage97hashnodedev.hashnode.dev/three-small-calculators-three-edge-cases-i-had-to-decide-on-purpose</link><guid isPermaLink="true">https://vintage97hashnodedev.hashnode.dev/three-small-calculators-three-edge-cases-i-had-to-decide-on-purpose</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[dates]]></category><category><![CDATA[programming]]></category><dc:creator><![CDATA[JK]]></dc:creator><pubDate>Mon, 09 Nov 2026 15:43:08 GMT</pubDate><content:encoded><![CDATA[<p>I build and run a small site of free calculators. Most of the code is simple arithmetic. The interesting part is the handful of inputs where the arithmetic is fine but the question is ambiguous, and the calculator has to pick an answer. Here are three of those decisions, from three different tools, with the code that makes them.</p>
<h2>1. "9 to 5" has no am or pm</h2>
<p>The <a href="https://instantfreetools.com/hours-calculator/">hours calculator</a> works out time worked between two clock times. Its time parser accepts "9", "9:30", "0930", "9.30", "9am" and "9:30 pm", and it treats an end time that is earlier than the start as the next day, so a night shift from 22 to 6 is 8 hours.</p>
<p>That rule breaks the most common input of all. "9" and "5" with no am or pm read as 09:00 to 05:00 the next morning, which is 20 hours. Nobody who types "9 and 5" means that.</p>
<p>So there is a second rule on top: if both times are plain numbers between 1 and 12, with no am or pm, and the end is earlier than the start, read the end as afternoon.</p>
<pre><code class="language-js">if (s !== null &amp;&amp; e !== null &amp;&amp; ps &amp;&amp; pe &amp;&amp;
    +ps[1] &gt;= 1 &amp;&amp; +ps[1] &lt;= 12 &amp;&amp; +pe[1] &gt;= 1 &amp;&amp; +pe[1] &lt;= 12 &amp;&amp;
    e &lt; s &amp;&amp; e + 720 &gt; s) return { s, e: e + 720, guessed: true };
</code></pre>
<p>With that, "9 and 5" is 8 hours and "8 and 4:30" is 8 hours 30 minutes. "7 and 11" is left alone as 4 hours, because 11 is already after 7. A night shift written as "22 and 6" or "9pm and 5am" doesn't match, because 22 is outside 1 to 12 and am or pm was given, so it stays 8 hours across midnight.</p>
<p>The function returns <code>guessed: true</code> when it made that call, and the page says so next to the result. A silent guess would be wrong for someone. A visible guess can be corrected.</p>
<h2>2. A birthday on 29 February</h2>
<p>The <a href="https://instantfreetools.com/age-calculator/">age calculator</a> gives age in years, months and days, and the days until the next birthday. For someone born on 29 February 2008, the question is when the birthday falls in a year without that date.</p>
<p>There are two common answers, 28 February and 1 March, and both are used in practice. I chose 1 March: it is the day the person has, in the plain sense, completed another year.</p>
<pre><code class="language-js">if (m === 1 &amp;&amp; d === 29 &amp;&amp; new Date(Date.UTC(year, 1, 29)).getUTCMonth() !== 1)
  return new Date(Date.UTC(year, 2, 1));
</code></pre>
<p>So on 28 February 2027 that person is 18 years, 11 months and 27 days old, with 1 day to go. On 1 March 2027 they turn 19 and the page shows the birthday message. In 2028 the birthday is 29 February again. The page states the rule in its FAQ, because someone who expects 28 February deserves to know why the answer is a day later.</p>
<p>The birth date in a shared link goes after the <code>#</code>, as <code>/age-calculator/#dob=1990-05-17</code>. Browsers don't send that part to the server, and a date of birth is personal. Older links that put it in the query string still open.</p>
<h2>3. Temperatures below absolute zero</h2>
<p>The <a href="https://instantfreetools.com/unit-converter/">unit converter</a> converts everything through a base unit, except temperature, which needs offsets rather than a single factor. −40 °C converts to −40 °F, the one point where the scales meet, which makes a nice test.</p>
<p>The edge case is input that can't exist. −300 °C is below absolute zero (−273.15 °C). So is −460 °F, while −459 °F is just above it. The converter checks the input against absolute zero, converted to the unit you typed in, and shows a message instead of a number. Weights, lengths and volumes have a simpler rule: they can't be negative at all.</p>
<p>Two smaller decisions in the same tool:</p>
<ul>
<li>Results go through <code>toPrecision(7)</code> before display, so 0.1 + 0.2 shows as 0.3, while very large or very small values switch to "× 10^" notation: 0.0000001 shows as 1.0000 × 10^-7.</li>
<li>US and UK volumes are separate units. One US cup is 8 US fluid ounces but 8.326742 UK fluid ounces, and one UK pint is 2.4019 US cups. A recipe converter that says "pint" without a country is guessing.</li>
</ul>
<p>A shared link carries the category, both units and the value: <code>/unit-converter/?cat=temperature&amp;v=-40&amp;from=c&amp;to=f</code>. When it is read back, a unit that doesn't belong to that category is dropped, so a hand-edited link like <code>cat=weight&amp;from=kg&amp;to=stone</code> keeps kilograms and the value and leaves the second unit at its default. On this site the stone unit is <code>st</code>.</p>
<h2>What these have in common</h2>
<ol>
<li>The ambiguous input is the common one. "9 and 5" is how people type a work day.</li>
<li>When the calculator chooses, it says what it chose, next to the result.</li>
<li>The rule goes in a small, pure function with a name, so it can be tested on its own.</li>
</ol>
<p>Which edge case in a "simple" calculator surprised you the most?</p>
]]></content:encoded></item><item><title><![CDATA[Fair random picks in the browser: rejection sampling, a wheel that decides first, and links that redraw]]></title><description><![CDATA[What `Math.random() * n` gets wrong, and the small helper four of my tools now share]]></description><link>https://vintage97hashnodedev.hashnode.dev/fair-random-picks-in-the-browser-rejection-sampling-a-wheel-that-decides-first-and-links-that-redraw</link><guid isPermaLink="true">https://vintage97hashnodedev.hashnode.dev/fair-random-picks-in-the-browser-rejection-sampling-a-wheel-that-decides-first-and-links-that-redraw</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Security]]></category><category><![CDATA[algorithms]]></category><dc:creator><![CDATA[JK]]></dc:creator><pubDate>Sun, 08 Nov 2026 15:44:29 GMT</pubDate><content:encoded><![CDATA[<p>I run a small site of free browser tools, and four of them need randomness: a number picker, a name wheel, a name generator and a password generator. They all go through one small helper now. Here is what it does and why, with the actual code.</p>
<h2>The source: crypto, not Math.random</h2>
<p><code>Math.random()</code> is fine for animations, but it isn't designed to be unpredictable. The helper reads from the browser's cryptographic generator instead:</p>
<pre><code class="language-js">const cryptoU32 = () =&gt; crypto.getRandomValues(new Uint32Array(1))[0];
</code></pre>
<p>That returns a whole number from 0 to 2^32 − 1. The <a href="https://instantfreetools.com/password-generator/">password generator</a> needs this for obvious reasons, and once it existed there was no reason for the other tools to use anything weaker.</p>
<h2>Turning 32 bits into "1 to 6" without bias</h2>
<p>The obvious way is <code>min + (x % span)</code>. The problem is that 2^32 doesn't divide evenly by most ranges. For a six-sided die, 2^32 % 6 is 4, so four of the faces would come up very slightly more often than the other two.</p>
<p>For a die the difference is tiny. For a wide range it isn't. Ask for a number between 1 and 3,000,000,000 and 2^32 % 3,000,000,000 is 1,294,967,296, so with plain modulo the lowest 1.29 billion values would be twice as likely as the rest.</p>
<p>The fix is rejection sampling: only accept raw values below the largest multiple of the range, and draw again otherwise.</p>
<pre><code class="language-js">const span = max - min + 1;
const limit = 2 ** 32 - (2 ** 32 % span);
let x;
do { x = rng(); } while (x &gt;= limit);
return min + (x % span);
</code></pre>
<p>For 1 to 6 the limit is 4,294,967,292, so only four raw values out of 4.29 billion are ever thrown away. In testing I passed in a fake generator that returned 4,294,967,295, then 4,294,967,294, then 7. The first two were rejected and the result was 2, on the third call. Passing the generator as a parameter is what made that test possible.</p>
<h2>No repeats: shuffle, then cut</h2>
<p>The <a href="https://instantfreetools.com/random-number-generator/">random number generator</a> has a "No repeats" box for raffles. For ranges up to 100,000 numbers it builds the full list, shuffles it with Fisher-Yates (using the same unbiased helper for every swap) and takes the first n. For bigger ranges it draws and skips numbers it has already seen. Asking for 6 different numbers from 1 to 5 returns nothing, and the page explains why instead of looping forever.</p>
<p>A shared link from this page carries the settings, not the numbers: <code>?min=1&amp;max=500&amp;n=3&amp;u=1</code>. Opening it makes a fresh draw. That was deliberate. A link that replays a "random" result is one that someone could edit to show whatever they wanted, so the shared text includes the numbers that were drawn and the link lets the other person draw their own.</p>
<h2>A wheel that decides before it spins</h2>
<p>The <a href="https://instantfreetools.com/spin-the-wheel/">spin the wheel</a> page looks like physics, but it isn't. The winner is picked first with the same helper, and only then does the page work out the angle that will land the pointer on it:</p>
<pre><code class="language-js">const winner = randInt(0, n - 1);
const within = randInt(15, 85) / 100;   // somewhere inside the slice, away from the edges
</code></pre>
<p>The wheel then turns five full turns plus whatever is left to bring that point under the pointer. With 8 names and slice number 2 as the winner, it stops at 2,062.35 degrees, and reading the pointer position back gives slice 2 again. Picking first means every name has exactly the same chance, however the animation is timed. Keeping the stop point between 15% and 85% of the slice means nobody has to argue about a pointer sitting on a line.</p>
<p>The same page splits people into teams. The list is shuffled and dealt out one name at a time, so seven names in three teams come out as 3, 2 and 2, never 4, 2 and 1.</p>
<h2>Lists people paste</h2>
<p>Names get pasted in every format. If the text has line breaks, each line is one name; if not, commas split it. "Ann, Bo, , ann" with duplicate removal on gives Ann and Bo, comparing names after Unicode normalisation and lower-casing. A line like "Bo, Cy" in a list that has line breaks stays one entry, because a line is treated as a name and a name can contain a comma.</p>
<h2>Passwords: one of each, then shuffle</h2>
<p>With upper case, lower case, digits and symbols all on, the password generator draws from 87 characters. It picks one character from each chosen set first, fills the rest from the whole pool, and shuffles, so a "must include a digit" rule is always met without making the first character predictable. A 16-character password from that pool is about 103 bits. Turning on "avoid look-alike characters" removes I, l, 1, O, 0 and o, leaving 81 characters and about 101 bits, which costs less than people expect.</p>
<p>The <a href="https://instantfreetools.com/random-name-generator/">random name generator</a> uses the same picker for first and last names, so even a placeholder name for a test form or a story character comes from the same unbiased source.</p>
<h2>What I'd keep</h2>
<ol>
<li>One random helper for the whole site, with the generator as a parameter so it can be tested.</li>
<li>Rejection sampling for every range, not only the big ones.</li>
<li>Decide the outcome first, animate second.</li>
<li>Share settings, not "random" results.</li>
</ol>
<p>How do you test code that is supposed to be random?</p>
]]></content:encoded></item><item><title><![CDATA[How I made shareable result links for a static calculator site (no backend)]]></title><description><![CDATA[Query strings for dates and percentages, a hash for text, and two gates on everything that comes back in]]></description><link>https://vintage97hashnodedev.hashnode.dev/how-i-made-shareable-result-links-for-a-static-calculator-site-no-backend</link><guid isPermaLink="true">https://vintage97hashnodedev.hashnode.dev/how-i-made-shareable-result-links-for-a-static-calculator-site-no-backend</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[url]]></category><dc:creator><![CDATA[JK]]></dc:creator><pubDate>Sun, 08 Nov 2026 05:09:35 GMT</pubDate><content:encoded><![CDATA[<p>I build and run a small site of free calculators. It is fully static: the pages are built ahead of time and served from a CDN, and every calculation runs in the browser. The only server code is a small usage counter that records which tool was used, never the inputs, so there is nowhere a result could be saved.</p>
<p>People still wanted to send a result to someone else. "There are 46 days between these dates" is only useful if the other person can open the same calculation and check it. So every calculator needed a link that reproduces its result, without a backend. Here is how I did it, and the two rules I ended up following.</p>
<h2>Rule 1: the URL is the saved state</h2>
<p>If the inputs are in the URL, the page can rebuild the result on load. For the <a href="https://instantfreetools.com/days-between-dates/">days between dates</a> page the state is two dates and one checkbox:</p>
<pre><code class="language-js">export function betweenQuery({ from, to, inc }) {
  const p = new URLSearchParams({ from, to });
  if (inc) p.set('inc', '1');
  return p.toString();
}
</code></pre>
<p>That gives a link like <code>/days-between-dates/?from=2026-11-09&amp;to=2026-12-25</code>, which opens showing 46 days. The checkbox for counting the end date is only written when it is on, so the common case stays short.</p>
<p>The <a href="https://instantfreetools.com/date-calculator/">date calculator</a> has three tabs, and each tab writes only the fields it uses. "90 days after 9 November 2026" becomes:</p>
<pre><code>/date-calculator/?tab=add&amp;start=2026-11-09&amp;y=0&amp;m=0&amp;w=0&amp;d=90&amp;op=1
</code></pre>
<p>and the business-days tab writes the region and the two "include" switches instead of years, months and weeks. Writing only what the tab needs keeps links readable, and it means a link from one tab never carries stale values from another.</p>
<p>When someone presses Copy, the page also calls <code>history.replaceState</code> with the same URL. The address bar then always matches what is on screen, so copying from the browser works too. I used <code>replaceState</code> rather than <code>pushState</code> so that changing a field doesn't fill the Back button with every keystroke.</p>
<h2>Rule 2: everything that comes back in is untrusted</h2>
<p>A shared link can be edited by anyone before it is opened. So reading the URL is a separate function from writing it, and it keeps only values it understands.</p>
<p>Dates go through two gates. The first is a pattern check, <code>/^\d{4}-\d{2}-\d{2}$/</code>, in the reader. In testing I opened <code>?from=2026-11-09&amp;to=tomorrow&amp;inc=yes</code>, and the reader kept only <code>from</code>: "tomorrow" fails the pattern and <code>inc</code> has to be exactly <code>1</code>.</p>
<p>The pattern alone isn't enough, though. <code>2026-02-30</code> matches it. The second gate is the date parser, which builds the date in UTC and checks that the year, month and day it gets back are the ones it was given:</p>
<pre><code class="language-js">const dt = new Date(Date.UTC(y, m - 1, d));
if (dt.getUTCFullYear() !== y || dt.getUTCMonth() !== m - 1 || dt.getUTCDate() !== d) return null;
</code></pre>
<p><code>Date.UTC(2026, 1, 30)</code> quietly rolls over into March, so the check fails and the page falls back to its default date instead of showing a wrong answer.</p>
<p>The region field gets an allow-list rather than a cleaner. Anything that isn't one of the known codes is dropped, so <code>region=&lt;script&gt;</code> never reaches the page at all.</p>
<p>The <a href="https://instantfreetools.com/percentage-calculator/">percentage calculator</a> has five sentence-style rows and ten number fields. Its reader keeps a field only if it is at most 40 characters and the same number parser the form uses can read it. In testing <code>offa=$80&amp;offb=12,5</code> came through as $80 and 12,5, because the form accepts currency signs and a decimal comma, while <code>abc</code> and a 41-character number were dropped. Using the form's own parser means a link can never hold a value the form itself would refuse.</p>
<h2>Text goes after the #, not in the query</h2>
<p>Dates and percentages are short and not private. Text is different. The <a href="https://instantfreetools.com/character-counter/">character counter</a> promises that what you paste isn't sent to a server, and a query string is sent to the server with every request, and ends up in server logs.</p>
<p>The part after <code>#</code> is not sent. So the character counter and the QR code generator put their state in the hash instead:</p>
<pre><code>/character-counter/#t=Hello%2C+world%21
</code></pre>
<p>Two limits came with that. Text over 2,000 characters gets no link, and the page says so, because long URLs get cut off in messaging apps. And the QR code link never includes a Wi-Fi password, even though the QR code itself does. A link tends to end up in chat history; a password shouldn't.</p>
<h2>One page, many URLs, one canonical</h2>
<p>Every one of these links is a different URL for the same page. Search engines shouldn't treat <code>?from=2026-11-09&amp;to=2026-12-25</code> as its own page, so the layout builds the canonical link from the path only:</p>
<pre><code class="language-js">const canonical = new URL(Astro.url.pathname, Astro.site);
</code></pre>
<p>The shared link works for people. The canonical tells search engines there is only one page.</p>
<h2>What I would do again</h2>
<ol>
<li>Keep a writer and a reader for every page, as separate functions. The writer can be simple. The reader is where the care goes.</li>
<li>Validate with the same parser the form uses, so a link can't hold anything the form would refuse.</li>
<li>Decide per tool whether the state is private. If it is, use the hash.</li>
<li>Only write the fields that are in use. Short links get shared more and break less.</li>
</ol>
<p>If you have built shareable state into a static site, I'd like to know where you drew the line between the query string and the hash.</p>
]]></content:encoded></item><item><title><![CDATA[How I Survived 7 Rebuilds of the Same SaaS by Building a Control Layer Around Claude Code]]></title><description><![CDATA[I'm a solo founder. Over the past month I rebuilt the same B2B SaaS codebase seven times. Not because the code was bad — because the AI assistant kept…]]></description><link>https://vintage97hashnodedev.hashnode.dev/how-i-survived-7-rebuilds-of-the-same-saas-by-building-a-control-layer-around-claude-code</link><guid isPermaLink="true">https://vintage97hashnodedev.hashnode.dev/how-i-survived-7-rebuilds-of-the-same-saas-by-building-a-control-layer-around-claude-code</guid><dc:creator><![CDATA[JK]]></dc:creator><pubDate>Wed, 20 May 2026 08:08:04 GMT</pubDate><content:encoded><![CDATA[<p>I'm a solo founder. Over the past month I rebuilt the same B2B SaaS codebase seven times. Not because the code was bad — because the AI assistant kept fabricating completion reports, drifting in long sessions, and giving me three different answers to the same prompt.</p>
<p>After rebuild number seven I stopped writing product code for two days. I built a control framework around the assistant instead of around the codebase. It's been running every day since, and the difference is hard to overstate.</p>
<p>This post is the short version of what's inside.</p>
<h2>The core problem</h2>
<p>The failure mode wasn't "the model is dumb." It was that the model is <strong>convincing when it's wrong</strong>. Three patterns kept killing me:</p>
<ol>
<li><p><strong>Fabricated completion reports.</strong> "Task complete, all tests pass." No tests were run. No tests existed.</p>
</li>
<li><p><strong>Long-session drift.</strong> At 60% context, the model started contradicting decisions it had made 20 turns earlier.</p>
</li>
<li><p><strong>Prompt-layer guardrails get ignored.</strong> I tried system prompts, custom instructions, every prompt trick. The model agreed politely and then did whatever it wanted.</p>
</li>
</ol>
<p>The insight that changed everything: <strong>if prompts get ignored, move the guardrails out of the prompt layer and into the protocol layer.</strong> Hooks. Not instructions.</p>
<h2>What's in the kit</h2>
<p>Single release. No subscription. Designed for solo developers who are 3+ rebuilds in and tired.</p>
<ul>
<li><p><strong>3 hooks</strong> that block fabricated reports at the protocol layer. Pre-tool-use, post-tool-use, subagent-stop. They don't ask the model to be honest. They refuse to accept output that fails an objective check.</p>
</li>
<li><p><strong>17 sub-agent definitions</strong> in 4 teams: research, build, verify, ship. Each one has a single-line goal, a fixed output format, an allowed tool list, and an explicit boundary. If a sub-agent tries to step outside its boundary, the hook stops it.</p>
</li>
<li><p><strong>5 SSOT files</strong> (single source of truth): wiki, wiki-detail, status, decisions, false-report log. The false-report log is the most important — it's where every "I lied" event gets recorded so the same lie can't slip through twice.</p>
</li>
<li><p><strong>2 RAG embedding scripts</strong> for pulling project memory back into context without bloating the prompt.</p>
</li>
<li><p><strong>13 case studies</strong> from the seven-rebuild retrospective. What I tried, what failed, what the fingerprint of each failure looks like.</p>
</li>
<li><p><strong>Setup script</strong> with an explicit consent prompt before it touches anything.</p>
</li>
</ul>
<h2>A taste of what the hook layer looks like</h2>
<p>This isn't the actual hook (the real ones are in the archive) — it's the shape. The point is that hooks live outside the model's reach:</p>
<pre><code class="language-bash">#!/bin/bash
# subagent-stop hook: reject reports that claim completion
# without referencing any verification step

report="$1"

if grep -qEi "(complete|finished|done|100%)" "$report"; then
  if ! grep -qEi "(test|verified|checked|ran)" "$report"; then
    echo "blocked: completion claim with no verification reference"
    exit 2
  fi
fi
</code></pre>
<p>The model can be as creative as it wants inside the prompt. The hook doesn't read the prompt. It reads the output and checks structure. If the structure doesn't match the contract, exit code 2, and the report is rejected at the protocol layer.</p>
<h2>Numbers from my own project</h2>
<p>Unverified, single-author, on one codebase. Take with a grain of salt:</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody><tr>
<td>Weekly task time</td>
<td>~40h</td>
<td>~8h</td>
</tr>
<tr>
<td>Output accuracy</td>
<td>~40%</td>
<td>~95%</td>
</tr>
<tr>
<td>Fabricated reports / week</td>
<td>~13</td>
<td>0-1</td>
</tr>
</tbody></table>
<p>The "0-1" line matters more than the "95%." A loud failure I can catch. A silent fabrication is what burns a week.</p>
<h2>Why I'm sharing</h2>
<p>I was going to keep it private. Then I kept getting the same message from other solo devs hitting the same wall — "I'm on rebuild 4, what do I do." So I packaged the framework I was already using.</p>
<p>The <a href="https://raxsoft.gumroad.com/l/aiacf">Gumroad page</a> is a free preview — full README, ICP, before/after, FAQ. Read everything before deciding. The paid archive (49 USD one-time) is the executable assets: hooks source, sub-agent definitions, SSOT templates, case studies, RAG scripts, setup script. No subscription, no updates, no support — single release. MIT for code, CC BY-NC for docs.</p>
<p>If you're 3+ rebuilds in and the assistant is still fabricating reports, I'm in the comments. Happy to talk specifics.</p>
]]></content:encoded></item></channel></rss>