<?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: Michael Kaminski</title>
    <description>The latest articles on DEV Community by Michael Kaminski (@makaminski1337).</description>
    <link>https://dev.to/makaminski1337</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%2F1224430%2Fe62f2803-0300-4d09-bf54-cf77c63b5779.png</url>
      <title>DEV Community: Michael Kaminski</title>
      <link>https://dev.to/makaminski1337</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/makaminski1337"/>
    <language>en</language>
    <item>
      <title>42 sites, one $20 bill</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:54:44 +0000</pubDate>
      <link>https://dev.to/makaminski1337/42-sites-one-20-bill-2c4</link>
      <guid>https://dev.to/makaminski1337/42-sites-one-20-bill-2c4</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/hosting-42-sites-on-one-vercel-bill" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In 30 seconds&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What:&lt;/strong&gt; 42 Vercel projects on one team, all free on the Hobby plan until October 2026. Then three of them pushed seven meters past their limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The math:&lt;/strong&gt; $17.23 of usage at Pro list prices from 13 October to 12 November. Three projects were 88% of it; the other 37 cost $2.01 together.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How:&lt;/strong&gt; moved to Pro on 24 November and made one config change per meter. Usage excluding builds fell from $0.52 a day to about $0.18.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cost:&lt;/strong&gt; a flat $20 a month, about $0.48 per site. The POST burst still needs a firewall rule, and Hobby is off the table anyway because the storefront is a business.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I run 42 Vercel projects on one team: a resale storefront (lace-luxx.com), a newsletter, a GitHub data site, games and a long tail of experiments. Until October, all of it fit on Vercel's free Hobby plan. Then three projects broke that.&lt;/p&gt;

&lt;p&gt;This is what the meters showed, what I changed, and what hosting costs now. Every figure is from Vercel's own billing data for the team, priced at Pro list rates so the numbers mean something even for the days the team was still on Hobby.&lt;/p&gt;

&lt;h2&gt;
  
  
  One endpoint turned a quiet month into a bill
&lt;/h2&gt;

&lt;p&gt;Vercel's billing record for the team starts on 13 October. On 18 October, POST requests to one MCP endpoint on genome-of-games started arriving at about 140,000 a day and kept going until 3 November. Those 17 days produced 2.37M of the month's 2.48M function invocations.&lt;/p&gt;

&lt;p&gt;Something on the other end of the internet found the endpoint and kept calling it. Because an MCP route is a serverless function, every request was a billable invocation and a CDN request on top. The rest of the team's traffic barely registers against it.&lt;/p&gt;

&lt;p&gt;Over 13 October to 12 November the team used &lt;strong&gt;$17.23&lt;/strong&gt; of usage at Pro list prices. The peak day was 21 October at $1.11.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig1-daily.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig1-daily.svg" alt="Bar chart of Vercel usage cost per billing day from 13 October to 28 November 2026 at Pro list prices. Days before 18 October sit between $0.22 and $0.43. The genome-of-games POST burst from 18 October to 3 November lifts most days above $0.50, peaking at $1.11 on 21 October. 13 to 23 November is not drawn. After the fixes on 24 November the days read $0.59, $0.31, $0.21 and $0.45." width="100" height="45.65217391304348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Usage cost per billing day, Pro list prices before the $20 included credit, subscription line excluded. 13–23 November is not drawn because per-day figures were not pulled for those days. 28 November includes $0.29 of build minutes.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Three projects, three different meters
&lt;/h2&gt;

&lt;p&gt;The money was concentrated, and each of the three heavy projects stressed a different meter. That matters, because it means there was no single fix. A function-invocation problem, an image problem and a crawler problem each needed their own change.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Project&lt;/th&gt;
&lt;th&gt;31-day cost&lt;/th&gt;
&lt;th&gt;What drove it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;genome-of-games&lt;/td&gt;
&lt;td&gt;$6.61&lt;/td&gt;
&lt;td&gt;2.36M function invocations and 2.4M CDN requests from the POST burst&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;women-luxury-resale (lace-luxx.com)&lt;/td&gt;
&lt;td&gt;$5.67&lt;/td&gt;
&lt;td&gt;22,466 image transformations, ISR writes, a full build for every data commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;top-github-users&lt;/td&gt;
&lt;td&gt;$2.93&lt;/td&gt;
&lt;td&gt;1.1M ISR reads and 8.4 GB origin transfer, mostly crawlers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;37 other projects&lt;/td&gt;
&lt;td&gt;$2.01&lt;/td&gt;
&lt;td&gt;Build minutes and deployment storage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three projects were 88% of the cost. Seventeen projects rounded to $0.00.&lt;/p&gt;

&lt;p&gt;The storefront's bill is the one I should have seen coming. Every product photo was being transformed into whatever size and format a visitor's browser asked for, and every data commit from the posting engine kicked off a full build. Neither is a traffic problem. Both are configuration I had never looked at because Hobby never sent a bill.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig2-projects.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig2-projects.svg" alt="Horizontal bar chart of 31-day Vercel usage cost by project. genome-of-games $6.61, women-luxury-resale (lace-luxx.com) $5.67, top-github-users $2.93, and the 37 other projects $2.01 together." width="100" height="27.173913043478258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cost by project, 13 October to 12 November. Vercel's own per-project attribution.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Hobby stopped working
&lt;/h2&gt;

&lt;p&gt;Hobby is free, but each meter has a monthly cap, and the caps are enforced per team, not per project. One project blowing through a meter puts every project on the team at risk of a pause. Over those 31 days the team went over on seven of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image transformations: 4.5× the limit&lt;/li&gt;
&lt;li&gt;Image cache writes: 3.2×&lt;/li&gt;
&lt;li&gt;CDN requests: 3.0×&lt;/li&gt;
&lt;li&gt;Function invocations: 2.5×&lt;/li&gt;
&lt;li&gt;Fluid active CPU: 2.2×&lt;/li&gt;
&lt;li&gt;Fast origin transfer: 1.5×&lt;/li&gt;
&lt;li&gt;ISR reads: 1.2×&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two belong to the storefront. The next three are the POST burst. The last two are crawlers walking top-github-users. Reading the list that way is what turned a vague "we went over" into a short to-do list.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig3-meters.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fvercel-bill-fig3-meters.svg" alt="Horizontal bar chart of 31-day usage as a multiple of each Hobby monthly limit, with a dashed line at the limit. Seven meters are over: image transformations 4.5 times, image cache writes 3.2, CDN requests 3.0, function invocations 2.5, Fluid active CPU 2.2, fast origin transfer 1.5, ISR reads 1.2. ISR writes, image cache reads and fast data transfer are under." width="100" height="45.65217391304348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bars show 31-day usage divided by the Hobby monthly limit. The dashed line marks the limit.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I changed on 24 November
&lt;/h2&gt;

&lt;p&gt;I moved the team to Pro to keep the sites up and shipped one small config change per meter. None of them took more than a few lines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Images.&lt;/strong&gt; lace-luxx.com serves WebP only, with a 31-day cache, so each photo is transformed about once a month. That addresses image transformations and image cache writes at the same time: one format means one transformation per photo, and a long cache means it is not repeated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Builds.&lt;/strong&gt; Commits whose subject ends in &lt;code&gt;[skip ci]&lt;/code&gt; no longer trigger a Vercel build. The posting engine's data commits use it. A data commit does not change the site's code, so a full rebuild for each one was pure waste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crawlers.&lt;/strong&gt; top-github-users returns 403 to named AI and SEO crawlers on profile, city and country pages. Those pages exist for people. A crawler reading every profile page is what ISR reads and origin transfer were measuring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MCP endpoint.&lt;/strong&gt; GET is now static. POSTs still need a &lt;a href="https://vercel.com/docs/vercel-firewall" rel="noopener noreferrer"&gt;Vercel Firewall&lt;/a&gt; rule, because rules in &lt;code&gt;vercel.json&lt;/code&gt; didn't match them on previews. This is the one fix that is not done, and it is the one that caused the biggest number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;Before the fixes the steady rate was $0.52 a day ($15.46 per 30 days). Across the four full billing days measured since, usage excluding builds averaged &lt;strong&gt;$0.18 a day&lt;/strong&gt;, about $5.44 per 30 days. Builds now decide the rest: $0.42 on the day of the fixes, $0.01 on quiet days, $0.29 on 28 November.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Billing day (from 3 AM ET)&lt;/th&gt;
&lt;th&gt;Usage&lt;/th&gt;
&lt;th&gt;Builds&lt;/th&gt;
&lt;th&gt;Excl. builds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tue 24 Nov (fix day)&lt;/td&gt;
&lt;td&gt;$0.59&lt;/td&gt;
&lt;td&gt;$0.42&lt;/td&gt;
&lt;td&gt;$0.17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wed 25 Nov&lt;/td&gt;
&lt;td&gt;$0.31&lt;/td&gt;
&lt;td&gt;$0.11&lt;/td&gt;
&lt;td&gt;$0.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thu 26 Nov&lt;/td&gt;
&lt;td&gt;$0.21&lt;/td&gt;
&lt;td&gt;$0.01&lt;/td&gt;
&lt;td&gt;$0.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sat 28 Nov&lt;/td&gt;
&lt;td&gt;$0.45&lt;/td&gt;
&lt;td&gt;$0.29&lt;/td&gt;
&lt;td&gt;$0.16&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;27 November is left out because it was read mid-day.&lt;/p&gt;

&lt;p&gt;Four days is not a month, and I am not treating it as one. What the four days show is that the usage line is flat and low once the three fixes are in, and that the day-to-day variation is now almost entirely build minutes, which I control by how often I push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hobby, or $20 for everything?
&lt;/h2&gt;

&lt;p&gt;At this rate the team uses roughly $5 to $12 per 30 days, inside Pro's $20 included credit. Pro costs a flat $20 a month, about $0.48 per site.&lt;/p&gt;

&lt;p&gt;Going back to $0 needs two things: a full billing month with every Hobby meter under 70% of its limit, and the firewall rule in place. Even then, Vercel's &lt;a href="https://vercel.com/docs/limits/fair-use-guidelines" rel="noopener noreferrer"&gt;fair-use guidelines&lt;/a&gt; limit Hobby to non-commercial use, and the storefront is a business. So $20 a month for all 42 sites is the realistic floor, and a good deal.&lt;/p&gt;

&lt;p&gt;The part I would tell anyone running a lot of small projects on one team: the free tier is not free in the sense of unmetered. It is free until any one project on the team is noticed by something that does not sleep, and then the whole team is on the clock. Twenty dollars buys the right to not care which project that is.&lt;/p&gt;

&lt;p&gt;Usage on most of these sites is low, and getting them in front of people is its own ongoing question. This was about keeping hosting from being one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Source: Vercel billing charges API, read 24–29 November 2026; Pro list prices before the included credit.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vercel</category>
      <category>webdev</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>182.5 CU-Hours to Poll, Zero for the Timer: A 10-Second Undo Window That Lets the Database Sleep</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:54:07 +0000</pubDate>
      <link>https://dev.to/makaminski1337/1825-cu-hours-to-poll-zero-for-the-timer-a-10-second-undo-window-that-lets-the-database-sleep-4kai</link>
      <guid>https://dev.to/makaminski1337/1825-cu-hours-to-poll-zero-for-the-timer-a-10-second-undo-window-that-lets-the-database-sleep-4kai</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/undo-window-that-lets-the-database-sleep" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In 30 seconds&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What:&lt;/strong&gt; &lt;a href="https://github.com/MAKaminski/svelte-accounting-agent" rel="noopener noreferrer"&gt;svelte-accounting-agent&lt;/a&gt; holds every approval for 10 seconds so the reviewer can undo it before the ledger is written.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The math:&lt;/strong&gt; waiting with a 1-second poll costs 730 h × 0.25 CU = 182.5 CU-hours a month on a database that allows 100. Waiting with a timer costs nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How:&lt;/strong&gt; one timer per company, armed at write time for the earliest deadline. The deadline lives in the row, so a lost timer is a late commit, never a lost one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cost:&lt;/strong&gt; the timer path has no test of its own, a deploy can stretch the window to about 40 seconds, and the cold-start number is still unmeasured.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;A bookkeeping agent I pushed to GitHub on 2026-11-21 gives the reviewer ten seconds to undo any approval before it writes the ledger. The obvious way to build that is a loop that asks the database every second whether anything is due. On &lt;a href="https://neon.com/docs/introduction/free-tier" rel="noopener noreferrer"&gt;Neon's Free plan&lt;/a&gt; that loop costs 182.5 CU-hours a month against a 100 CU-hour allowance. The agent uses timers instead and the undo window costs nothing.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;a deferred action should be a timer armed at write time, not a poll, because the poll is paid for by the idle hours and the timer is paid for by the busy ones.&lt;/strong&gt; On a database that bills by compute-hour and sleeps when nobody talks to it, that difference is the whole budget.&lt;/p&gt;

&lt;p&gt;The project is &lt;a href="https://github.com/MAKaminski/svelte-accounting-agent" rel="noopener noreferrer"&gt;svelte-accounting-agent&lt;/a&gt;, public, 24 commits between 2026-11-19 and 2026-11-21. It codes bank and card transactions to QuickBooks accounts for a small resale business of mine, shows its reasoning, and never writes the books without a &lt;a href="https://www.michael-kaminski.io/writing/human-approval-gates-for-irreversible-agent-actions" rel="noopener noreferrer"&gt;recorded human approval&lt;/a&gt;. &lt;a href="https://svelte.dev/docs/kit/introduction" rel="noopener noreferrer"&gt;SvelteKit&lt;/a&gt;, Postgres on Neon through &lt;a href="https://orm.drizzle.team/" rel="noopener noreferrer"&gt;Drizzle&lt;/a&gt;, Claude through the API, one &lt;a href="https://fly.io/docs/machines/" rel="noopener noreferrer"&gt;Fly machine&lt;/a&gt;. Every number below is from the repository as cloned on 2026-11-22 at &lt;code&gt;f802a27&lt;/code&gt;, or from a test run I did the same day.&lt;/p&gt;

&lt;h2&gt;
  
  
  The arithmetic: 182.5 CU-hours versus 100
&lt;/h2&gt;

&lt;p&gt;Neon's Free plan gives each project 100 CU-hours of compute a month and scales a compute to zero after five minutes of inactivity. The five-minute timeout cannot be disabled on Free. The smallest compute is 0.25 CU. Those are Neon's published terms as of a documentation page last updated 2026-11-18.&lt;/p&gt;

&lt;p&gt;A month is about 730 hours. A scheduler that queries the database once a second never lets it sleep, so it burns 730 × 0.25 = 182.5 CU-hours. That is 1.8 times the entire allowance before the app has served a single request.&lt;/p&gt;

&lt;p&gt;The same app with no polling sends zero queries while idle. Neon sleeps. The compute it uses is whatever the reviewer's own actions cost, plus any scheduled jobs. The repository's estimate for the optional hourly ledger pull is 24 × 30 wake-ups of five minutes each, 60 hours × 0.25 CU = 15 CU-hours, plus roughly 10 CU-hours of real usage, about 25 CU-hours. A quarter of the cap instead of nearly double it.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fundo-fig1-cu-hours.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fundo-fig1-cu-hours.svg" alt="Bar chart of CU-hours per month. A one-second poll uses 182.5. Timers use about 25: 15 for the hourly pull and about 10 for real usage. The Free plan allowance is 100." width="920" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The poll is over the allowance before the first request. The timer version spends most of its budget on the optional hourly pull, not the undo window.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Nothing about the undo window changed between those two numbers. Only the way the app waits.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the undo window is
&lt;/h2&gt;

&lt;p&gt;Approve has two modes. &lt;code&gt;approve&lt;/code&gt; now writes the ledger immediately. &lt;code&gt;approve --later&lt;/code&gt; stamps the entry with &lt;code&gt;pending_until&lt;/code&gt;, the current time plus &lt;code&gt;UNDO_WINDOW_MS&lt;/code&gt;, which defaults to 10,000. The entry moves to &lt;code&gt;approved&lt;/code&gt; and nothing external happens yet.&lt;/p&gt;

&lt;p&gt;Undo inside the window flips it back to &lt;code&gt;recommended&lt;/code&gt;, clears &lt;code&gt;pending_until&lt;/code&gt;, and records an &lt;code&gt;undone&lt;/code&gt; decision. Undo after the window returns HTTP 409 &lt;code&gt;undo_window_closed&lt;/code&gt;, with the state in the message, because by then the write to the ledger has started and a second system now owns the entry.&lt;/p&gt;

&lt;p&gt;The deadline lives in the database row, not in memory. That is the detail the rest of this depends on. Any process that can read &lt;code&gt;pending_until&lt;/code&gt; can finish the job, which is what makes the timer safe to lose.&lt;/p&gt;

&lt;p&gt;There was a cheaper-looking design: approve immediately, and on undo call the ledger's "put it back in review" endpoint. The decision log rejects it on 2026-11-19 because undoing after mark-ready races the ledger's own sync to QuickBooks. A deferred commit is the only version where undo never has to unwrite anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  One timer per company, re-armed on every write
&lt;/h2&gt;

&lt;p&gt;The scheduler is 69 lines. The core of it is &lt;code&gt;armCommitTimer&lt;/code&gt;: select the minimum &lt;code&gt;pending_until&lt;/code&gt; among this company's &lt;code&gt;approved&lt;/code&gt; and &lt;code&gt;coded&lt;/code&gt; entries, and set one &lt;a href="https://nodejs.org/api/timers.html" rel="noopener noreferrer"&gt;&lt;code&gt;setTimeout&lt;/code&gt;&lt;/a&gt; for that moment plus 50 milliseconds of slack.&lt;/p&gt;

&lt;p&gt;If a timer already exists and fires no later than the new deadline, do nothing. If the new deadline is earlier, clear the old timer and arm the new one. If nothing is pending, clear the timer and remove it from the map.&lt;/p&gt;

&lt;p&gt;It is called from three places: after every API write in the request handler, because an approve or undo may have opened or closed a window; after each commit run, because the commit may have left later entries behind; and once per company at boot. When the timer fires, it runs &lt;code&gt;commitDue&lt;/code&gt; inside that company's row-level-security context, which selects everything whose &lt;code&gt;pending_until&lt;/code&gt; has passed and commits it, then re-arms.&lt;/p&gt;

&lt;p&gt;That is the entire mechanism. A company with no pending approvals has no timer, and the process makes no query on its behalf. Ten seconds after the last approve, the map is empty again.&lt;/p&gt;

&lt;p&gt;The timers are &lt;code&gt;unref&lt;/code&gt;'d, so they never keep the Node process alive during a shutdown. The deadline is in Postgres, so a shutdown loses nothing but the alarm clock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the undo window costs zero compute
&lt;/h2&gt;

&lt;p&gt;Neon stays awake for five minutes after the last query. A reviewer approving an entry is a query, so the compute is awake when the window opens. The commit fires ten seconds later, well inside the five minutes the compute would have stayed up anyway. The window adds no wake-ups and extends no sessions.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fundo-fig2-awake-window.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fundo-fig2-awake-window.svg" alt="Timeline. The approve at zero seconds wakes the compute. The commit fires at ten seconds. The compute stays awake until five minutes after the last query either way, then sleeps." width="920" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The ten seconds sit inside five minutes the compute was going to stay awake for anyway.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A one-second poll inverts that. The poll keeps the compute awake during the 23 hours a day when nobody is reviewing anything, to detect deadlines that only ever exist in the ten seconds after someone clicks. The cost is proportional to idleness. The timer's cost is proportional to use. For a tool a small business touches for a few minutes a day, that is the difference between 182.5 and about 25.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recovery and the second machine
&lt;/h2&gt;

&lt;p&gt;Two things can make a timer disappear: the process restarts, or a second copy of the process is running during a deploy. Both are handled, and one of them has a cost I want to name.&lt;/p&gt;

&lt;p&gt;At boot, the scheduler runs &lt;code&gt;commitDue&lt;/code&gt; for every company and re-arms. Anything whose window expired while the process was down is committed on the first sweep. A deadline is never lost, only delayed by however long the process was off.&lt;/p&gt;

&lt;p&gt;Only one machine may run jobs. Each process tries &lt;a href="https://www.postgresql.org/docs/current/explicit-locking.html" rel="noopener noreferrer"&gt;&lt;code&gt;pg_try_advisory_lock&lt;/code&gt;&lt;/a&gt; with a fixed key on a dedicated reserved connection and holds it for its lifetime. The holder is the leader; a follower retries every 30 seconds. When the old machine exits during a deploy, Postgres frees the lock and the new one takes it on its next attempt, then runs the boot sweep.&lt;/p&gt;

&lt;p&gt;This is also one reason the app uses Neon's direct endpoint instead of the pooled one: a session-level lock and the per-request session settings that row-level security depends on both die under transaction pooling.&lt;/p&gt;

&lt;p&gt;The cost: &lt;code&gt;armCommitTimer&lt;/code&gt; is a no-op on a follower. During a deploy overlap, an approval handled by the follower arms nothing. It is caught by the new leader's boot sweep, which can be up to 30 seconds after the old leader exits. So in the worst case a ten-second undo window becomes a forty-second one, during deploys only. I accepted that over a second table of distributed timers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the tests prove, and what they do not
&lt;/h2&gt;

&lt;p&gt;I ran the write-path and learning suites on 2026-11-22 from a fresh clone: 16 tests, 16 passed, 20.9 seconds under &lt;a href="https://vitest.dev/" rel="noopener noreferrer"&gt;Vitest&lt;/a&gt; on Node 22.23.5 against an in-process Postgres (&lt;a href="https://pglite.dev/" rel="noopener noreferrer"&gt;PGlite&lt;/a&gt;). Two of them are the window.&lt;/p&gt;

&lt;p&gt;"Approve later plus undo inside the window: no ledger write" approves with &lt;code&gt;--later&lt;/code&gt;, runs &lt;code&gt;commitDue&lt;/code&gt;, asserts zero writes to the ledger fixture, undoes, and asserts zero writes again. "Approve later: commits once the window passes" sets the window to 0 milliseconds, waits 5, runs &lt;code&gt;commitDue&lt;/code&gt;, and asserts exactly two writes in order: update the entry, mark it ready.&lt;/p&gt;

&lt;p&gt;Both tests call &lt;code&gt;commitDue&lt;/code&gt; directly. The scheduler short-circuits under the test runner, so the &lt;code&gt;setTimeout&lt;/code&gt; path, the re-arming, and the advisory-lock election are not covered by a test. They are covered by the boot sweep, which makes any timer bug a delay rather than a loss. That is the kind of safety net you should have before you trust an alarm clock, and it is also an admission that the alarm clock itself is untested.&lt;/p&gt;

&lt;p&gt;The numbers in the repository's operating envelope were measured on 2026-11-21 on a local production build: 3 milliseconds from click to the row leaving the queue, &lt;code&gt;GET /api/entries&lt;/code&gt; at 13.0 / 19.7 / 23.5 milliseconds p50 / p95 / p99, 551 milliseconds from process start to a healthy response.&lt;/p&gt;

&lt;p&gt;The hosted rows, including the one that matters most for this essay, the first query after Neon has scaled to zero, are still marked TBD. Neon's own documentation does not give a cold-start figure. The repository estimates 300 to 500 milliseconds and has not measured it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost of letting the database sleep
&lt;/h2&gt;

&lt;p&gt;Scale-to-zero is a trade, and the reviewer pays the other side of it. The first action after five idle minutes waits for the compute to wake. If the estimate holds, the queue page that renders in 180 milliseconds locally will take half a second on the first load of the morning. If the estimate is wrong, the first number I will see from production is how wrong.&lt;/p&gt;

&lt;p&gt;The second cost is that the whole design rests on one process holding one lock. There is no queue, no second worker, no retry service. For one machine and a handful of companies that is correct. At the point where commits must survive a region outage, the timer map becomes a job table and this essay's arithmetic changes, because a job table has to be polled by someone.&lt;/p&gt;

&lt;p&gt;The third is that the hourly pull, when it is on, is now the bill. Fifteen of the estimated 25 CU-hours are the ledger sync waking the database 720 times a month. The undo window is free; the thing that keeps the queue fresh is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I would carry to the next one
&lt;/h2&gt;

&lt;p&gt;When a system bills by the hour it is awake, write down what wakes it. A deferred action has exactly one moment it needs to run, and that moment is known at write time. Arm a timer for it, keep the deadline in the database so the timer is disposable, and sweep on boot so a lost timer is a late commit and never a lost one.&lt;/p&gt;

&lt;p&gt;Then measure the one number the design is betting on. Mine is the wake-up after idle, and it is still a TBD in the table.&lt;/p&gt;

&lt;p&gt;If you have run a deferred-commit window on a scale-to-zero database and have the cold-start number, I would trade notes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related:&lt;/strong&gt; &lt;a href="https://www.michael-kaminski.io/writing/human-approval-gates-for-irreversible-agent-actions" rel="noopener noreferrer"&gt;Human approval gates for irreversible agent actions&lt;/a&gt; is the principle this window implements, and &lt;a href="https://www.michael-kaminski.io/writing/where-to-cut-an-agent-in-half" rel="noopener noreferrer"&gt;Where to cut an agent in half&lt;/a&gt; is the same rules-around-judgment split in an MCP server.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>postgres</category>
      <category>architecture</category>
      <category>node</category>
    </item>
    <item>
      <title>Zero Model Calls, One Flag Worth $4,500: Where to Cut an Agent in Half</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:53:31 +0000</pubDate>
      <link>https://dev.to/makaminski1337/zero-model-calls-one-flag-worth-4500-where-to-cut-an-agent-in-half-2gmc</link>
      <guid>https://dev.to/makaminski1337/zero-model-calls-one-flag-worth-4500-where-to-cut-an-agent-in-half-2gmc</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/where-to-cut-an-agent-in-half" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In 30 seconds&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What:&lt;/strong&gt; &lt;a href="https://github.com/MAKaminski/goodwill-mcp" rel="noopener noreferrer"&gt;goodwill-mcp&lt;/a&gt;, an open-source MCP server that turns donation receipts into Form 8283 rows. 854 lines of TypeScript, zero model calls inside it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The split:&lt;/strong&gt; the host model reads the photos; code owns every price, threshold and total. Measured: 2 ms warm against a 50 ms budget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The catch:&lt;/strong&gt; validation checks shape, not truth. One defaulted flag moves the same 450 blouses from $900 to $5,400, across the $5,000 appraisal line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Still missing:&lt;/strong&gt; the eval for the model half. It is specified and not built.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;On 2026-11-11 I shipped an &lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;MCP&lt;/a&gt; server that reads thrift-store donation receipts, prices every item, and writes &lt;a href="https://www.irs.gov/forms-pubs/about-form-8283" rel="noopener noreferrer"&gt;Form 8283&lt;/a&gt; rows. It makes zero model calls. The same 450 blouses come out at $900, $3,150 or $5,400 depending on one three-letter flag the model is told to default.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;cut an agent in half at the line where probability ends, put every dollar of arithmetic on the deterministic side, and then admit that a validator checks the shape of the model's answer, not its truth.&lt;/strong&gt; The cut is the easy part. Knowing what it does not buy you is the part that keeps you out of trouble.&lt;/p&gt;

&lt;p&gt;The project is &lt;a href="https://github.com/MAKaminski/goodwill-mcp" rel="noopener noreferrer"&gt;goodwill-mcp&lt;/a&gt;, open source, MIT, v0.1.0. Claude reads the receipt and item photos. The server validates the draft, prices from a published guide, stores one &lt;a href="https://sqlite.org/" rel="noopener noreferrer"&gt;SQLite&lt;/a&gt; file on your machine and produces the year-end rows. I wrote the contract; the code, tests and release pipeline were built with &lt;a href="https://claude.com/product/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; against it in one session. Every number below was re-measured on 2026-11-15 from a fresh clone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cut: 854 lines of TypeScript, no model inside
&lt;/h2&gt;

&lt;p&gt;The server is 854 lines across nine TypeScript files. A grep for &lt;code&gt;anthropic&lt;/code&gt;, &lt;code&gt;openai&lt;/code&gt; or &lt;code&gt;fetch(&lt;/code&gt; across &lt;code&gt;src/&lt;/code&gt; returns 0 hits. The model that reads the photos is the host's model, the one already running the chat. The server never pays for a token and never waits on one.&lt;/p&gt;

&lt;p&gt;The tax rules live in one 59-line file, &lt;code&gt;rules.ts&lt;/code&gt;, with four threshold constants and five small pure functions. Form 8283 is required when the year's noncash total is over $500. A qualified appraisal is required when one group of similar items is over $5,000 in a year, with a warning at $4,000. A single donation of $250 or more needs the charity's written acknowledgment. Items below good used condition are excluded.&lt;/p&gt;

&lt;p&gt;Those four thresholds are the whole reason the split exists. A model should never be the thing deciding whether a line crossed $5,000. A constant should.&lt;/p&gt;

&lt;p&gt;The price guide is data, not code: 49 clothing categories from the ranges Goodwill Industries International publishes for items commonly sold in its stores, 18 women's, 16 children's, 15 men's. Women's blouses are $2 to $12. Women's jeans are $4 to $21. Men's coats are $7 to $40. Another charity is one more JSON file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the split costs in latency: almost nothing
&lt;/h2&gt;

&lt;p&gt;The proposal set budgets before the code existed, so this is the first time I have checked them. Over the MCP stdio path, &lt;code&gt;donation_create&lt;/code&gt; took 17 ms on the first call, which includes opening the database and running migrations, then 2 ms and 1 ms. &lt;code&gt;donation_report&lt;/code&gt; took 2 ms. The budget was 50 ms at p95.&lt;/p&gt;

&lt;p&gt;From the command line, which pays Node's startup each time, &lt;code&gt;--help&lt;/code&gt; ran in a median of 149 ms over seven runs, against a 300 ms budget. A full &lt;code&gt;donation create&lt;/code&gt; on a fresh database was a median 182 ms. The 13-test suite, which drives the real CLI and the real server over stdio, passed 13 of 13 in 3.6 seconds.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fgoodwill-fig2-budgets.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fgoodwill-fig2-budgets.svg" alt="Bar chart of measured latency as a share of budget. donation_create first call 17 milliseconds of a 50 millisecond budget, warm call 2 of 50, CLI help 149 of 300." width="920" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every measured path lands at half its budget or less. The model half, at an estimated 18 seconds, would not fit on this chart.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Set that against the model half. The proposal estimates 18 seconds end to end for one logged donation on Sonnet, with three photos at roughly 1,600 tokens each plus 2,200 tokens of prompt and schema. The deterministic half is a rounding error on the probabilistic half, by a factor of about a thousand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What validation actually catches
&lt;/h2&gt;

&lt;p&gt;The host model fills a typed draft and the server checks it with &lt;a href="https://zod.dev/" rel="noopener noreferrer"&gt;Zod&lt;/a&gt;. Here is the honest inventory of what that check can refuse, straight from the code.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model error&lt;/th&gt;
&lt;th&gt;What the server does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Category key that is not in the guide&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;NO_RATE_MATCH&lt;/code&gt;: saved at $0 and flagged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unit value above the guide's high end&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;VALUE_OVER_GUIDE&lt;/code&gt;: refused unless an &lt;code&gt;override_reason&lt;/code&gt; is written&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Condition fair or poor&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;BELOW_GOOD_CONDITION&lt;/code&gt;: item excluded, noted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Same receipt twice (SHA-256 of the photo, or receipt number)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;DUPLICATE_RECEIPT&lt;/code&gt;: returns the existing donation, changes nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date not &lt;code&gt;YYYY-MM-DD&lt;/code&gt;, quantity not a positive integer&lt;/td&gt;
&lt;td&gt;Schema rejection, exit 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantity 45 when the photo shows 450&lt;/td&gt;
&lt;td&gt;Accepted. $315 logged instead of $3,150.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date 2026-11-07 when the receipt says 2026-01-07&lt;/td&gt;
&lt;td&gt;Accepted.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I ran the 45-versus-450 row this week to be sure, and the date row follows from the schema, which checks the format and nothing else. Forty-five blouses and 450 blouses are both valid drafts. The validator cannot know how many blouses were in the photo, because knowing that is the model's entire job. A shape check cannot be a truth check, and the split does not change that.&lt;/p&gt;

&lt;p&gt;The prompt knows this. It tells the model: count only what you can see, and if a count is an estimate, say so and ask before logging. That is the right instruction. It is also the probabilistic half supervising itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The flag worth $4,500
&lt;/h2&gt;

&lt;p&gt;Every guide entry is a range, and &lt;code&gt;donation_create&lt;/code&gt; takes a &lt;code&gt;basis&lt;/code&gt; of &lt;code&gt;low&lt;/code&gt;, &lt;code&gt;mid&lt;/code&gt; or &lt;code&gt;high&lt;/code&gt; to pick a point in it. The median guide entry has a high end 5.25 times its low end. The widest is 12 times. The narrowest is 2 times.&lt;/p&gt;

&lt;p&gt;Take the test suite's own donation, 450 women's blouses in good condition. At &lt;code&gt;low&lt;/code&gt; the year logs $900: Form 8283 required, nothing else. At &lt;code&gt;mid&lt;/code&gt; it logs $3,150. At &lt;code&gt;high&lt;/code&gt; it logs $5,400, and the server correctly reports that clothing is over $5,000 for the year, so a qualified appraisal and Section B are required.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fgoodwill-fig1-basis.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fgoodwill-fig1-basis.svg" alt="Bar chart. 450 blouses log at 900 dollars on the low basis, 3,150 on mid and 5,400 on high. The 5,000 dollar appraisal line sits between mid and high." width="920" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Same photos, same count, same rules. The only thing that changed is the flag the prompt defaults to mid.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Same photos, same count, same rules. One parameter moved the result $4,500 and across the only line in this domain that creates real work. The rules did exactly what they should. The choice of input was the whole outcome.&lt;/p&gt;

&lt;p&gt;The prompt defaults it: use &lt;code&gt;mid&lt;/code&gt; unless told otherwise. So the deterministic half is airtight on a choice that the probabilistic half makes by default, from an instruction I wrote. That is the split drawn honestly: the rules own the arithmetic, and the inputs to the arithmetic still come from somewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing half of the measurement
&lt;/h2&gt;

&lt;p&gt;The proposal specifies an eval for the model half: 20 synthetic receipt-and-photo sets with golden JSON, store and date exact at 100%, category accuracy at 90% or better, total fair market value within plus or minus 10%. The architecture diagram has an &lt;code&gt;eval run&lt;/code&gt; command and a &lt;code&gt;fixtures/&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Neither exists in the repository. &lt;code&gt;src/commands/&lt;/code&gt; holds three files, intake, donation and valuation. There is no &lt;code&gt;fixtures/&lt;/code&gt; folder. The 13 tests that pass all exercise the deterministic side with hand-written drafts, which is why they pass in 3.6 seconds and why they prove nothing about the side that costs 18 seconds and makes the mistakes.&lt;/p&gt;

&lt;p&gt;So the honest status on 2026-11-15 is: the half that cannot be wrong is tested to the budget, and the half that can be wrong has a budget and no test. I have measured zero of the model's error rate. The eval is the next commit, and it should have been in the first one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What else is not done
&lt;/h2&gt;

&lt;p&gt;The npm package is not published; &lt;code&gt;npm view goodwill-mcp&lt;/code&gt; returned 404 this morning, four days after the release; the README says as much and points at the source install, which works. The one-click &lt;code&gt;.mcpb&lt;/code&gt; bundle for Claude Desktop is on the GitHub release. The proposal's cost line, about $0.044 per logged donation on Sonnet, is the proposal's own rate card and an estimate, not a bill I have read.&lt;/p&gt;

&lt;p&gt;And the guide is one organization's 2023 ranges for clothing only. Household goods, furniture and electronics are on the roadmap, which means a donation of a lamp today is priced at $0 with a &lt;code&gt;NO_RATE_MATCH&lt;/code&gt; flag, or at whatever &lt;code&gt;unit_value&lt;/code&gt; the model proposes, with the server able to refuse only if a guide entry exists to refuse against. For a category with no entry, there is nothing to refuse against.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I would carry to the next one
&lt;/h2&gt;

&lt;p&gt;Put the arithmetic, the thresholds and the audit trail on the side that cannot hallucinate, and make that side free to run. That part took one session and it is the part the tests cover.&lt;/p&gt;

&lt;p&gt;Then list, in a table, every model error the deterministic side cannot see, and build the eval for exactly those rows before you call the thing done. I did the first half and published. The second half is a file that does not exist yet, and until it does, the zero in "zero model calls" is a cost figure, not a correctness claim.&lt;/p&gt;

&lt;p&gt;If you have drawn this line in a system of your own and found a cleaner place to put the eval, I would trade notes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related:&lt;/strong&gt; &lt;a href="https://www.michael-kaminski.io/writing/designing-tools-an-agent-can-actually-call" rel="noopener noreferrer"&gt;Designing tools an agent can actually call&lt;/a&gt; covers the argument design this server depends on, and &lt;a href="https://www.michael-kaminski.io/writing/undo-window-that-lets-the-database-sleep" rel="noopener noreferrer"&gt;the undo-window essay&lt;/a&gt; is the same rules-around-judgment pattern applied to a bookkeeping agent. The IRS's own guidance on valuing donated property is &lt;a href="https://www.irs.gov/publications/p561" rel="noopener noreferrer"&gt;Publication 561&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>architecture</category>
      <category>llm</category>
    </item>
    <item>
      <title>126 Pull Requests, All Merged, Trust Score 0.55: Rank Agents on the Wilson Lower Bound</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:52:54 +0000</pubDate>
      <link>https://dev.to/makaminski1337/126-pull-requests-all-merged-trust-score-055-rank-agents-on-the-wilson-lower-bound-aap</link>
      <guid>https://dev.to/makaminski1337/126-pull-requests-all-merged-trust-score-055-rank-agents-on-the-wilson-lower-bound-aap</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/rank-agents-on-the-wilson-lower-bound" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Between 2026-10-21 and 2026-10-27 an agent I built opened 126 pull requests against its own repository. Every one of them merged. The system that runs it still scores that agent at 0.55 against a trust floor of 0.85, and it is right to.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;rank an agent on the Wilson 95% lower bound of its attributable success rate, never on the rate itself, and decide by name which failures are the environment's before you count a single run.&lt;/strong&gt; Everything else in autonomy policy follows from those two choices.&lt;/p&gt;

&lt;p&gt;The system is FORGE, a single-owner operating system I have been building since 2026-10-20: work items, people, money and code on one Postgres graph under Supabase, with agents doing the work. Worker-Dev is the agent that turns a work item into a branch. Its track record is a SQL view, and the view is the subject of this essay.&lt;/p&gt;

&lt;h2&gt;
  
  
  The score is a lower bound, not a rate
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;semantic.model_precision&lt;/code&gt; is one view in migration 0014. For each model, it counts the finished Worker-Dev runs that are attributable to the model, counts how many of those built a branch that passed &lt;code&gt;pnpm check&lt;/code&gt; and the scope check, divides, and then reports the Wilson 95% lower bound of that fraction with z = 1.96.&lt;/p&gt;

&lt;p&gt;The formula is three lines of SQL, and by migration 0025 it is one function, &lt;code&gt;semantic.wilson_lb(k, n)&lt;/code&gt;, shared by the model ranking, the agent scorecards and the autonomy gate. That is deliberate. If the number that ranks models and the number that grants autonomy came from two formulas, they would disagree the first time it mattered.&lt;/p&gt;

&lt;p&gt;Why the bound and not the rate: a model with one build in one run has a rate of 100% and a lower bound of 0.21. A model with 38 builds in 40 runs has a rate of 95% and a lower bound of 0.835. Sorted by rate, the rookie wins. Sorted by the bound, it ranks where it should, below a model you have actually watched work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What 0.85 costs in runs
&lt;/h2&gt;

&lt;p&gt;The autonomy ladder gives an agent level L1, advancing its own artifact without approval, when its lower bound reaches 0.85. The arithmetic behind that floor is less forgiving than it looks. I recomputed it this week.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observed success rate&lt;/th&gt;
&lt;th&gt;Runs needed before the 95% lower bound clears 0.85&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;98%&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;95%&lt;/td&gt;
&lt;td&gt;49 to 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;92%&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90%&lt;/td&gt;
&lt;td&gt;196&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;88%&lt;/td&gt;
&lt;td&gt;545&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;86%&lt;/td&gt;
&lt;td&gt;4,899&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;85% or below&lt;/td&gt;
&lt;td&gt;never&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Worked for the row the design doc records: at 95% and n = 50, (0.95 + 1.96² / 100 − 1.96 · √(0.95 · 0.05 / 50 + 1.96² / 10,000)) / (1 + 1.96² / 50) = (0.9884 − 0.0716) / 1.0768 = 0.851.&lt;/p&gt;

&lt;p&gt;Read the bottom rows twice. A floor of 0.85 on the lower bound is not "be right 85% of the time." It is "be right about 95% of the time, and prove it fifty times." An agent that fails one run in seven never earns L1, however many runs it logs. The bound converges to the rate, and the rate is under the floor.&lt;/p&gt;

&lt;p&gt;That is the property I wanted. A trust floor that a mediocre agent can grind past by volume is not a floor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Worker-Dev stood, and what I did about it
&lt;/h2&gt;

&lt;p&gt;On 2026-10-21 Worker-Dev running on Claude had built 10 of 12 attributable runs. Rate 0.833. Lower bound (0.9934 − 0.2647) / 1.3201 = 0.552. By the ladder it was an L0 agent: suggest only.&lt;/p&gt;

&lt;p&gt;I wanted work items to close themselves anyway, so I overrode the floor for merging and wrote the override down as ADR 0011. The override comes with a list of conditions that every pull request has to clear on every five-minute poll, and the poller merges at most one PR per poll.&lt;/p&gt;

&lt;p&gt;CI's &lt;code&gt;check&lt;/code&gt; run on the exact head commit must be green. A Red Team review run, on a model other than the one that wrote the code, must have passed, and the head it reviewed must equal the PR's current head; a push after review voids it. The head must not be behind &lt;code&gt;main&lt;/code&gt;. The diff must be 200 lines or fewer. Every changed path must match an allowlist, and a second list of paths is excluded whatever the allowlist says.&lt;/p&gt;

&lt;p&gt;Here is what that produced, from the GitHub record on 2026-11-08. The Worker-Dev GitHub App authored 126 pull requests between 2026-10-21 13:02 UTC and 2026-10-27 21:02 UTC: 26, 23, 40, 0, 22, 6 and 9 per day. All 126 merged. Median diff 149 lines; 92 were at or under the 200-line cap and 34 were over it.&lt;/p&gt;

&lt;p&gt;Fourteen of the 126 were merged by the App itself under those conditions. The other 112 I merged by hand. The fourteen ranged from 36 to 195 lines. Not one over 200 got through, which is the cap working.&lt;/p&gt;

&lt;h2&gt;
  
  
  The denominator is the whole argument
&lt;/h2&gt;

&lt;p&gt;"Attributable" is doing more work in that view than the Wilson formula is. Five kinds of ended run never enter the denominator: a run stopped by the kill switch, a run cut off by an agents-service restart, a sandbox that failed to spawn, a subscription usage limit, and a run a human marked &lt;code&gt;excluded_from_precision&lt;/code&gt; with a written reason through &lt;code&gt;pnpm forge exclude-run&lt;/code&gt;. Everything else counts against the model.&lt;/p&gt;

&lt;p&gt;The list exists because of what happens without it. On 2026-10-27, after an 18:57 restart, every Worker-Dev run started hitting its 8-round iteration cap. FE-57 twice, MW-139 twice. Each run spent all eight rounds "fixing" a failing test it could not see the cause of.&lt;/p&gt;

&lt;p&gt;The cause was not the model. A test merged in PR #155 shelled out to &lt;code&gt;git&lt;/code&gt;. CI has git; the run sandbox does not. So &lt;code&gt;pnpm check&lt;/code&gt; failed on &lt;code&gt;main&lt;/code&gt; inside every sandbox, before the agent had changed a line. Reproduced on commit 623cec6e in a fresh sandbox: 1 failed, 484 passed, that one test.&lt;/p&gt;

&lt;p&gt;Four runs, zero builds, a perfectly good model. To size the damage, put four unearned failures on top of the 2026-10-21 record: 10 of 12 becomes 10 of 16, and the lower bound drops from 0.552 to 0.386. The view has no clause for "the sandbox lacks git." The only way those four leave the denominator is a human running &lt;code&gt;exclude-run&lt;/code&gt; with the reason typed out, and the reason is stored on the run node where the next person can read it.&lt;/p&gt;

&lt;p&gt;That is the rule I would carry anywhere: the environment's failures are excluded by name, one clause per cause, and a human writes down why. An exclusion list you can grow silently is a precision score you can inflate silently.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this costs
&lt;/h2&gt;

&lt;p&gt;First, the override means the floor is not doing the work. The merge conditions are. If I removed them and left the 0.85, nothing would merge; if I removed the 0.85 and left them, today's behavior would not change. I should be honest that the trust score is currently a dashboard, and the containment is the policy.&lt;/p&gt;

&lt;p&gt;Second, the allowlist let through something I would have read. On 2026-10-23 at 15:17 UTC the App merged PR #79, which added &lt;code&gt;lib/public-api/auth.ts&lt;/code&gt; and its test: sha256 token hashing for the public API.&lt;/p&gt;

&lt;p&gt;The always-excluded list in &lt;code&gt;agents/_lib/automerge.py&lt;/code&gt; names &lt;code&gt;app/api/core/**&lt;/code&gt;, &lt;code&gt;lib/core-api/**&lt;/code&gt;, &lt;code&gt;lib/agent-auth.ts&lt;/code&gt;, &lt;code&gt;lib/session.ts&lt;/code&gt;, &lt;code&gt;lib/db.ts&lt;/code&gt;, &lt;code&gt;proxy.ts&lt;/code&gt;, the decision and plan docs, and the config files. It does not name &lt;code&gt;lib/public-api/**&lt;/code&gt;. The PR was 135 lines, CI was green, and a different model had reviewed it, so by the written rules it was a correct merge. By my rules it was a gap in the written rules, and the fix is one more path in that list.&lt;/p&gt;

&lt;p&gt;Third, "built" means a branch passed &lt;code&gt;pnpm check&lt;/code&gt;. It does not mean the code was right, or that the work item was done. The planning doc that started this had an earlier Worker-Dev run on a local Qwen3.6 model go 34 minutes and 118,714 output tokens with nothing written; that counts as a failure. A run that writes the wrong thing cleanly counts as a build. The score measures what the gate measures.&lt;/p&gt;

&lt;p&gt;Fourth, n = 14. Fourteen auto-merges at 14 of 14 is a lower bound of 0.78, which is below the floor those merges were supposed to be governed by. The sample that would justify the override has not been collected yet, and it cannot be collected without the override.&lt;/p&gt;

&lt;p&gt;Last, a disclosure about this essay. The Supabase instance that holds these views was not running on the machine when I wrote it, and I did not start it. The 10-of-12 figure is from the ADR dated 2026-10-21; the pull-request counts are from GitHub as of 2026-11-08; the Wilson numbers I recomputed. I do not know today's precision row, and I would rather say so than quote a stale one as current.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Score an agent on the Wilson 95% lower bound of built over attributable runs, use one function for ranking and for autonomy, and write the exclusion list as named clauses with a human-typed reason for anything not on it.&lt;/strong&gt; Then read the table above before you pick the floor. Whatever number you choose, it is a ceiling on the failure rate you will tolerate forever, and it is a run count you have to earn before anything is trusted.&lt;/p&gt;

&lt;p&gt;If you are gating agent autonomy on a success rate today, I would like to see your n. If it is under 22, the bound says you do not know yet, and I would trade notes on what you are excluding from the denominator.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>statistics</category>
      <category>datascience</category>
    </item>
    <item>
      <title>3,736 Tokens for Five Words: Thinking Is a Role, Not a Default</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:52:17 +0000</pubDate>
      <link>https://dev.to/makaminski1337/3736-tokens-for-five-words-thinking-is-a-role-not-a-default-44la</link>
      <guid>https://dev.to/makaminski1337/3736-tokens-for-five-words-thinking-is-a-role-not-a-default-44la</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/thinking-is-a-role-not-a-default" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I asked a 35-billion-parameter model running on my desk to answer a question in five words. With thinking off it took 122 milliseconds. With thinking on, the same model, same prompt, same machine, took 36.1 seconds and generated 3,736 tokens to arrive at five words.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;on a local model, reasoning mode is a 300x latency multiplier, and it belongs in a role a planner has to choose on purpose, never in a default.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built a small agent fleet on 2026-10-30 with exactly that rule in its config. Everything below was measured on 2026-11-01 on the machine that runs it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fleet, in one paragraph
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fleet&lt;/code&gt; is 1,332 lines of Python across eleven files, standard library only, plus a 200-line test file with 17 tests. Claude plans a goal into tasks, a local Ollama model executes them, SQLite carries the run across days with lease-based claims, and a built-in dashboard reads the same handlers as the CLI and the MCP server.&lt;/p&gt;

&lt;p&gt;Callers never name a model. They name one of five roles in &lt;code&gt;fleet.toml&lt;/code&gt;: &lt;code&gt;worker-bulk&lt;/code&gt;, &lt;code&gt;worker-think&lt;/code&gt;, &lt;code&gt;escalate&lt;/code&gt;, &lt;code&gt;integrator&lt;/code&gt;, &lt;code&gt;planner&lt;/code&gt;. The first two are the same local model, &lt;code&gt;qwen3.6:35b-a3b&lt;/code&gt; under Ollama 0.40.7 on an M5 Pro with 64 GB. The only difference between them is one line: &lt;code&gt;think = false&lt;/code&gt; versus &lt;code&gt;think = true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That one line is the subject of this essay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Six words, 3,736 tokens
&lt;/h2&gt;

&lt;p&gt;The prompt was &lt;em&gt;"Answer in exactly five words: what does a dispatcher do?"&lt;/em&gt;, sent to Ollama's &lt;code&gt;/api/chat&lt;/code&gt; with &lt;code&gt;stream: false&lt;/code&gt;, model already resident, two runs in each mode. A first cold call with thinking off took 1,470 ms, almost all of it prompt evaluation while the runner woke up; I discard it and report the warm runs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measured 2026-11-01&lt;/th&gt;
&lt;th&gt;think = false&lt;/th&gt;
&lt;th&gt;think = true&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total time, run 1&lt;/td&gt;
&lt;td&gt;122 ms&lt;/td&gt;
&lt;td&gt;36,093 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total time, run 2&lt;/td&gt;
&lt;td&gt;114 ms&lt;/td&gt;
&lt;td&gt;30,426 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output tokens, run 1&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;3,736&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output tokens, run 2&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;3,227&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Characters of hidden reasoning&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;13,576 and 12,141&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answer, run 1&lt;/td&gt;
&lt;td&gt;"They coordinate communication between teams."&lt;/td&gt;
&lt;td&gt;"Directs field units via communication."&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answer, run 2&lt;/td&gt;
&lt;td&gt;"Coordinates and directs operational resources effectively."&lt;/td&gt;
&lt;td&gt;"Coordinates resources and assigns personnel"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decode rate during the long generation&lt;/td&gt;
&lt;td&gt;n/a (too short to measure)&lt;/td&gt;
&lt;td&gt;103.6 and 106.1 tok/s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The ratio is 267x to 296x on wall time and roughly 500x on tokens. The decode rate is the same in both modes, about 105 tokens a second. The model is doing five hundred times more work to reach an answer of the same length.&lt;/p&gt;

&lt;p&gt;On quality: thinking on produced five words both times. Thinking off produced five words once and six the other time. On this prompt, that one extra word is the entire difference 3,736 tokens bought.&lt;/p&gt;

&lt;h2&gt;
  
  
  What 30 seconds does to a day
&lt;/h2&gt;

&lt;p&gt;The fleet's working unit is a bulk task of about 8,000 tokens in and 1,000 out: a brief shared by every task in the run, the task itself, and a JSON answer. Two more measurements price that unit.&lt;/p&gt;

&lt;p&gt;Prefill: a 10,520-token prompt took 12.0 seconds, which is 876 tokens a second. Decode: 105 tokens a second, from the long runs above. So one bulk task costs 8,000 / 876 + 1,000 / 105 = 9.1 + 9.5 = 18.7 seconds, and one stream clears 86,400 / 18.7 = about 4,600 tasks a day.&lt;/p&gt;

&lt;p&gt;Add the thinking budget the model spent on a trivial question, 3,227 to 3,736 tokens, and the same task takes 49 to 54 seconds. The day drops to 1,590 to 1,750 tasks. On a question that actually needs multi-step reasoning the budget is larger, so that is a floor on the cost, not an estimate of it.&lt;/p&gt;

&lt;p&gt;Roughly: thinking on by default would hand back two thirds of the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  One stream, however many you send
&lt;/h2&gt;

&lt;p&gt;The number of streams matters because the thinking cost is paid serially. I sent one request for about 65 tokens of output and it returned in 0.83 to 1.15 seconds. I then sent four at once.&lt;/p&gt;

&lt;p&gt;The four came back at 0.94, 1.96, 3.15, and 3.95 seconds. Their decode times sum to 3,751 ms and the wall clock read 3,950 ms. Ollama's MLX runner on this machine serves one stream and queues the rest, which is why &lt;code&gt;fleet.toml&lt;/code&gt; sets &lt;code&gt;local_concurrency = 1&lt;/code&gt; and &lt;code&gt;OLLAMA_NUM_PARALLEL=1&lt;/code&gt; in the launchd environment. Extra slots would only have hidden the queue.&lt;/p&gt;

&lt;p&gt;So a 30-second thinking call is not a slow task. It is 30 seconds during which nothing else on the local tier can run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Role, not model, and not default
&lt;/h2&gt;

&lt;p&gt;The rule the fleet encodes is that a caller asks for a role and the config decides what a role means. The planner's system prompt says it in one line: use &lt;code&gt;worker-bulk&lt;/code&gt; by default, &lt;code&gt;worker-think&lt;/code&gt; only for multi-step reasoning, &lt;code&gt;integrator&lt;/code&gt; only for a final merge. Every task carries a role name, and the dispatcher looks the role up at call time, so swapping a model, or turning thinking on for a class of work, is an edit to one file that the running worker picks up without a restart.&lt;/p&gt;

&lt;p&gt;The two local roles also differ in budget. &lt;code&gt;worker-bulk&lt;/code&gt; gets a 120-second timeout and two retries. &lt;code&gt;worker-think&lt;/code&gt; gets 300 seconds and one retry, because a second 30-second think on a task that just failed one is a worse bet than escalating.&lt;/p&gt;

&lt;p&gt;Escalation is the other half of the design. After the retries, the dispatcher walks the role's &lt;code&gt;fallback&lt;/code&gt; one tier up, to a &lt;code&gt;claude-haiku&lt;/code&gt; role over the Anthropic API, and marks the result &lt;code&gt;escalated = 1&lt;/code&gt; so the dashboard can show what the local tier could not do. At the rates in the config, $1 per million in and $5 per million out, a bulk-shaped escalation costs about $0.013. A planned run costs about $0.275, paid once, to Opus.&lt;/p&gt;

&lt;p&gt;Thinking off by default and a paid tier above it is the whole bet: let the free model take the first swing at everything, cheaply, and pay for the second swing only on the tasks that earned it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it costs
&lt;/h2&gt;

&lt;p&gt;Three things, and the third is the one that matters.&lt;/p&gt;

&lt;p&gt;First, thinking off means a bulk task that quietly needed reasoning gets a confident shallow answer. The only gate behind the worker is a 40-line validator that checks a JSON-schema subset: type, required, properties, items, enum, string length. It catches a malformed answer. It cannot catch a well-formed wrong one, and a wrong one that validates never escalates. The planner's judgment about which tasks need &lt;code&gt;worker-think&lt;/code&gt; is doing work that nothing downstream verifies.&lt;/p&gt;

&lt;p&gt;Second, the memory. The model is 23 GB on disk and 29 GB resident at a 32K context when I ran &lt;code&gt;ollama ps&lt;/code&gt; today, up from 27 GB earlier in the same session as the context cache grew. Keeping it resident forever (&lt;code&gt;OLLAMA_KEEP_ALIVE=-1&lt;/code&gt;) is what makes the 122 ms possible, and it is 29 GB of a 64 GB machine that nothing else gets.&lt;/p&gt;

&lt;p&gt;Third: &lt;code&gt;fleet.db&lt;/code&gt; has zero runs, zero tasks, zero results, zero events. It was last written at 16:14 on 2026-10-30, the afternoon the schema was created, and nothing has been dispatched through it since. Every number in this essay is a measurement of the engine on a stand. The architecture doc's line about "$1,702 a month avoided" is 4,364 local tasks a day times a Haiku-equivalent price, which is capacity arithmetic for work that has not happened, and &lt;a href="https://www.michael-kaminski.io/writing/the-monitor-that-could-not-see-itself" rel="noopener noreferrer"&gt;last week&lt;/a&gt; I wrote 1,500 words about the difference between a system that runs and a system that would.&lt;/p&gt;

&lt;p&gt;The measured numbers stand. The dollar number does not, until a run does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Treat reasoning mode on a local model as a separate, more expensive tier with its own name, timeout, and retry budget, and make the planner spend it deliberately.&lt;/strong&gt; Measure the think-on and think-off latency on a trivial prompt before you set the default. If the ratio is in the hundreds, as it was here, the default is off, and "on" is a role.&lt;/p&gt;

&lt;p&gt;If you are routing between a local model and an API tier and your config has a single thinking flag for the whole worker, I would like to see your think-on-versus-off numbers on the same prompt. Mine are above, and I would trade.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>architecture</category>
      <category>performance</category>
    </item>
    <item>
      <title>4,401 Failures, Zero Alerts: The Monitor That Could Not See Itself</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:51:41 +0000</pubDate>
      <link>https://dev.to/makaminski1337/4401-failures-zero-alerts-the-monitor-that-could-not-see-itself-2e1c</link>
      <guid>https://dev.to/makaminski1337/4401-failures-zero-alerts-the-monitor-that-could-not-see-itself-2e1c</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/the-monitor-that-could-not-see-itself" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My gamma-walls pipeline is scheduled 33 times a day. launchd has fired it 4,401 times since 2026-06-11. Every one of those runs failed on its first line, with the same seven words, and I found out today, 135 days later, because the chart it feeds never stopped drawing levels.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;a monitor that reports only through its output cannot report its own absence.&lt;/strong&gt; The alert I wired fires when price crosses a level. Nothing fires when the level stops being computed, so the last level ever computed simply becomes permanent.&lt;/p&gt;

&lt;p&gt;This is the fourth decorative control I have found in my own systems this year, and the cheapest to have prevented.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.michael-kaminski.io/writing/statistical-gating-for-agent-instruction-changes" rel="noopener noreferrer"&gt;first&lt;/a&gt; was a significance test that could not detect the effect it tested for. The &lt;a href="https://www.michael-kaminski.io/writing/measure-reach-on-the-log-scale" rel="noopener noreferrer"&gt;second&lt;/a&gt; was a power calculation on the wrong scale. The &lt;a href="https://www.michael-kaminski.io/writing/provenance-in-the-primary-key" rel="noopener noreferrer"&gt;third&lt;/a&gt; was a deduplicator whose key guaranteed nothing could collide. This one is a scheduler that has fired every fifteen minutes for four and a half months and has never run.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline, in one paragraph
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;schwab_gamma_walls.py&lt;/code&gt; is a 610-line Python 3 script. It pulls the option chain for a ticker from the Schwab Trader API, sums dealer gamma by strike, and produces three levels: the call wall, the put wall, and the gamma flip. It then writes a thinkScript study for thinkorswim with those levels as inputs and an &lt;code&gt;Alert()&lt;/code&gt; on each, appends a row to a per-symbol history CSV, and renders an HTML dashboard.&lt;/p&gt;

&lt;p&gt;A 23-line bash wrapper sources the credentials, picks the virtualenv's python, and runs the script. A launchd agent, &lt;code&gt;com.modularequity.gammawalls&lt;/code&gt;, calls the wrapper on 33 calendar slots from 08:00 to 16:00, fifteen minutes apart, seven days a week; the wrapper is what exits early on weekends. Everything below was measured on 2026-10-25 from files on the machine that runs it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every run failed on the first line
&lt;/h2&gt;

&lt;p&gt;The launchd log is 4,401 lines and 466,506 bytes. Every line is identical: &lt;code&gt;/bin/bash: ~/Documents/.../run_gamma_walls.sh: Operation not permitted&lt;/code&gt;. One hundred and six bytes, 4,401 times, no timestamps, no variation.&lt;/p&gt;

&lt;p&gt;The exit code launchd records is 126, bash's code for a command it was handed and could not execute. bash never opened the wrapper. The wrapper never sourced the credentials, never chose a python, never reached the line that runs the script. The script's own log, &lt;code&gt;gamma_walls.log&lt;/code&gt;, which the wrapper appends to on every run, does not exist on disk.&lt;/p&gt;

&lt;p&gt;The cause is where I put it. The wrapper lives under &lt;code&gt;~/Documents&lt;/code&gt;, which macOS treats as a protected folder. A command I run from Terminal inherits Terminal's permission to read that folder; the same command launched by launchd inherits nothing. The manual test and the scheduled job were the same command run by different principals, and only one of them was allowed to read the file.&lt;/p&gt;

&lt;p&gt;That is the reading that fits the error, the path, and the exit code, and I have not found a second one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The arithmetic of the silence
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measured 2026-10-25&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Log file created&lt;/td&gt;
&lt;td&gt;2026-06-11 23:50:42&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Last artifact written (manual test run)&lt;/td&gt;
&lt;td&gt;2026-06-12 00:53&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Most recent failure logged&lt;/td&gt;
&lt;td&gt;2026-10-25 14:00:03&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Calendar slots scheduled in the window&lt;/td&gt;
&lt;td&gt;4,480 (135 days x 33, plus 25 today)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failures logged&lt;/td&gt;
&lt;td&gt;4,401 (98.2%; the rest were slots the laptop slept through)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Successful scheduled runs&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;launchd run count since last login, last exit code&lt;/td&gt;
&lt;td&gt;634, 126&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rows in QQQ_gamma_history.csv&lt;/td&gt;
&lt;td&gt;8, all between 00:22 and 00:53 on 2026-06-12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weekday slots that would have done work&lt;/td&gt;
&lt;td&gt;3,168 (96 weekdays x 33)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The eight rows in the history file are a half-hour test session the night I built it. The spot column reads 717.12 in every row because the market was closed. That file was the subject of a 100-second video I scripted and captured on 2026-08-16, about how the gamma flip walked 3.9 points on zero trades.&lt;/p&gt;

&lt;p&gt;I read those eight rows as evidence of estimator drift, and they are. They were also the complete production history of the pipeline, 65 days into its outage. I did not notice, because I was reading the file for what it said and not for when it stopped.&lt;/p&gt;

&lt;h2&gt;
  
  
  The chart kept drawing June
&lt;/h2&gt;

&lt;p&gt;The thinkScript study was written at 00:53 on 2026-06-12 with three inputs: call wall 720, put wall 700, gamma flip 722.2. On a working pipeline that file is overwritten every fifteen minutes and those values are never older than the last run. On this pipeline they are 135 days old, and the chart has no way to show the difference. A level is a line, and a stale line looks exactly like a fresh one.&lt;/p&gt;

&lt;p&gt;The three &lt;code&gt;Alert()&lt;/code&gt; calls fire on close crossing those levels. Since late July QQQ has traded as high as 762.86 and as low as 661.14, and it closed Friday at 704.88, so price has crossed the frozen flip at least twice and the frozen put wall at least twice. Every one of those alerts was computed from a chain that no longer exists, and every one of them looked like the system working.&lt;/p&gt;

&lt;p&gt;That is the inversion worth naming. The pipeline's only alerting path is triggered by its output. When the output freezes, the alerting path keeps running on the frozen output, so the failure mode is confident, stale alerts rather than silence.&lt;/p&gt;

&lt;p&gt;The system does not look dead. It looks decisive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two of the three layers knew
&lt;/h2&gt;

&lt;p&gt;launchd knew. &lt;code&gt;launchctl print&lt;/code&gt; on the job reports &lt;code&gt;runs = 634&lt;/code&gt; and &lt;code&gt;last exit code = 126&lt;/code&gt; right now, in plain text, on demand. Nobody runs &lt;code&gt;launchctl print&lt;/code&gt; on a job that seems fine.&lt;/p&gt;

&lt;p&gt;The log knew. A 466 KB file of one repeated line is about as loud as a text file gets. But a log that grows is indistinguishable, from the outside, from a log that grows because things are working, and I pointed stdout and stderr at the same path, so the healthy log and the failing log would have been the same file. I never opened it, because nothing told me to.&lt;/p&gt;

&lt;p&gt;The chart did not know, and the chart is the only one of the three I look at. I built the monitoring for the market and none for the monitor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two fixes, and what each one costs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fix 1: move the pipeline out of the protected folder, or launch it from a principal that is allowed in.&lt;/strong&gt; Copying the project to a path macOS does not guard and re-pointing the plist is ten minutes. The cost is that the folder protection was doing exactly what it exists to do, and routing around it is a decision about where a credentials file lives, not a side effect of wanting a schedule to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix 2: a liveness check that is not the output.&lt;/strong&gt; A second scheduled job at 16:15 on weekdays that reads the modification time of &lt;code&gt;QQQ_gamma_history.csv&lt;/code&gt; and sends a message if the file is older than today. About fifteen lines. It would have fired at 16:15 on 2026-06-12, the first market day, and this essay would be one line in a commit message.&lt;/p&gt;

&lt;p&gt;The cost of fix 2 is that it is another scheduled job on the same machine with the same failure modes. If it lives in the same folder it dies the same way on the same night, and the log fills with two repeated lines instead of one. The check has to be simpler than the thing it checks, and it has to live somewhere the thing it checks cannot take it down. A liveness check that shares a fate with its subject is a second copy of the subject.&lt;/p&gt;

&lt;p&gt;I am doing both. Neither is done as I write this, and 4,401 is still climbing by one every fifteen minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this costs an agent pipeline
&lt;/h2&gt;

&lt;p&gt;Nothing in this failure is specific to options or to macOS. Every scheduled agent I run has the same four parts: a timer, a wrapper, a script, and an artifact somebody looks at. The artifact gets the attention. The timer and the wrapper are the parts that fail quietly, and they fail before any line of the script, which means the script's own error handling, however careful, never gets a vote.&lt;/p&gt;

&lt;p&gt;This pipeline has ten &lt;code&gt;except&lt;/code&gt; clauses and three explicit exit messages, and none of them has ever executed.&lt;/p&gt;

&lt;p&gt;The rule I am taking from this: &lt;strong&gt;every scheduled job needs one signal that says "I ran," carried on a channel its output does not share, checked by something that does not depend on the job.&lt;/strong&gt; A heartbeat file in another folder. A "last updated" row that the dashboard reads and shows in red when it is stale. A message when the row is missing.&lt;/p&gt;

&lt;p&gt;The signal is boring, and it is worth more than every alert the job can raise, because the alerts only speak while the job is alive.&lt;/p&gt;

&lt;p&gt;If you have a scheduled pipeline whose output you look at, run one check before you trust it: the modification time of the newest artifact against the schedule. Mine said 2026-06-12 on 2026-10-25. The chart said everything was fine, and the chart was the only thing I had asked.&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>devops</category>
      <category>ai</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Superior: The Company We Built, and the Paperwork I Never Did</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:51:04 +0000</pubDate>
      <link>https://dev.to/makaminski1337/superior-the-company-we-built-and-the-paperwork-i-never-did-e7b</link>
      <guid>https://dev.to/makaminski1337/superior-the-company-we-built-and-the-paperwork-i-never-did-e7b</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/superior-the-company-we-built-and-the-paperwork-i-never-did" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.superior-maintenance.com" rel="noopener noreferrer"&gt;Superior Contracting &amp;amp; Maintenance&lt;/a&gt; did not start with a business plan. It started in 2007 with my brother, &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;&lt;strong&gt;Erik Kaminski&lt;/strong&gt;&lt;/a&gt;, working as an office assistant for a plumber, and noticing that the hard part of the job was not the plumbing.&lt;/p&gt;

&lt;p&gt;The hard part was the relationships: the property owner who needed someone today, the tradesman who could be there tomorrow, and the person in the middle who made both of them trust the arrangement. &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;Erik&lt;/a&gt; was very good at being that person. So he went out on his own, and he called the company EZLinks.&lt;/p&gt;

&lt;p&gt;This is the candid version of how EZLinks became Superior, what we built, and why I left. I have never written the whole thing down. As you will see, that is a theme.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig1-timeline.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig1-timeline.svg" alt="Timeline from 2007 to 2023. 2007: my brother founds EZLinks and runs it alone for about ten years, best year about 1.7 million dollars. For years before 2018 I keep his books and pay contractors from my front door. 2013 to 2014: the Superior name is reserved and left unused. 2018: I join, all revenue moves into Superior, and I am offered 30 percent equity on a handshake. 2018 to 2023: Superior grows to 50 people, 8 states and more than 1 million dollars a month. 2023: I step back, ask for the equity, and leave for fintech at Momnt." width="100" height="46.086956521739125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sixteen years, two names, one set of relationships at the core.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ten years, one person
&lt;/h2&gt;

&lt;p&gt;For about ten years, EZLinks was &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;Erik&lt;/a&gt;. He ran it by himself. He worked with private equity groups that owned property and needed it maintained, and he learned the operations the way you only learn them when there is nobody else to hand them to. His best year, alone, was about &lt;strong&gt;$1.7 million in revenue&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I was around the whole time, just not on any org chart. I did his accounting for years. Contractors literally came to my house, and I wrote them checks at my front door. I handled the low-level business needs that a one-person company never has time for. None of it had a title. It was what you do for family.&lt;/p&gt;

&lt;p&gt;Somewhere around 2013 or 2014, we reserved a name: Superior Contracting &amp;amp; Maintenance. Then we sat on it. For years it was a name on a state filing and nothing else.&lt;/p&gt;

&lt;h2&gt;
  
  
  2018: the name gets a company
&lt;/h2&gt;

&lt;p&gt;In 2018 I left GreenSky and joined full time. That is when Superior became real. We began running all of the revenue through it, and the relationships &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;Erik&lt;/a&gt; had spent a decade earning became Superior's book of business.&lt;/p&gt;

&lt;p&gt;Within the first year, I was offered a &lt;strong&gt;30% equity slice&lt;/strong&gt; for growing it. I want to be direct about this, because it is the hinge of the whole story: that offer is the reason I stayed. Not the salary, not the title. The 30%.&lt;/p&gt;

&lt;p&gt;And because it was family, I never worried about the paperwork. I thought it would all work out. I had spent years being the person who made sure other people's paper was in order, and I did not do my own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;Over the next six years we built a company. At its peak, Superior had &lt;strong&gt;50 employees and hundreds of contractors across eight states&lt;/strong&gt;, two business lines, hundreds of client relationships, and &lt;strong&gt;more than $1 million a month in revenue&lt;/strong&gt;.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig2-scale.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig2-scale.svg" alt="Bar chart of annual revenue. EZLinks' best year with one person: about 1.7 million dollars. Superior's peak run-rate: more than 12 million dollars a year, from more than 1 million a month, about seven times the best solo year. Stat tiles: 50 employees, hundreds of contractors across 8 states, 2 business lines, 600 to 700 thousand dollars of working capital." width="100" height="44.565217391304344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The math: $1M a month × 12 is a $12M run-rate. $12M ÷ $1.7M is about 7× the best year one person could do alone.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Seven times is not the result of working seven times harder. One person, however good, tops out where his calendar does. To get past that you need a machine, and the machine was my job. My title was CFO, but the work was everything behind the field: I built out a product team, an accounting team, and all of the administrative back end, so that operators could operate.&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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig3-back-office.svg" 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%2Fwww.michael-kaminski.io%2Fimages%2Fessays%2Fsuperior-fig3-back-office.svg" alt="Diagram. On top, operators and field teams: hundreds of contractors, 8 states, 2 business lines, the clients. Holding them up, three teams: a product team for the software the field runs on, an accounting team for the close, the cash and contractor pay, and an administrative back end for onboarding, contracts and paperwork. All three sit on one ERP and one set of books, NetSuite." width="100" height="42.391304347826086"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nobody hires a contractor because of the back office. Nobody keeps one without it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The working capital tells the story better than the revenue does. In this business you pay the contractor before the client pays you. At our size that meant carrying somewhere between &lt;strong&gt;$600,000 and $700,000 of working capital&lt;/strong&gt; at any time, just to keep the work moving. The checks I used to write at my front door had become a treasury function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing a CEO
&lt;/h2&gt;

&lt;p&gt;The last big piece was leadership that did not depend on me or &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;Erik&lt;/a&gt;. We brought in &lt;a href="https://www.linkedin.com/in/chris-albano-4305753/" rel="noopener noreferrer"&gt;&lt;strong&gt;Chris Albano&lt;/strong&gt;&lt;/a&gt;, a director from Home Depot, to run the company. He was an excellent fit for the role.&lt;/p&gt;

&lt;p&gt;I designed his compensation plan myself: a path to &lt;strong&gt;up to 20% of the company&lt;/strong&gt; for hitting earnout goals, with the goals and the math written down, so that he would know exactly what he was building toward.&lt;/p&gt;

&lt;p&gt;I would like to say I noticed the irony at the time. I did not.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The promise&lt;/th&gt;
&lt;th&gt;What was agreed&lt;/th&gt;
&lt;th&gt;What was written down&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;My equity&lt;/td&gt;
&lt;td&gt;30% for growing the company (year one, 2018)&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dividend on free cash flow&lt;/td&gt;
&lt;td&gt;Agreed in year one, on free cash flow or net profit&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The CEO's equity&lt;/td&gt;
&lt;td&gt;Up to 20% on earnout goals&lt;/td&gt;
&lt;td&gt;A full compensation plan. I wrote it.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Stepping back
&lt;/h2&gt;

&lt;p&gt;By 2023 the company was doing well. We were growing. But the work had shifted from building the machine to running it, and I had been heads-down at a hundred hours a week for six years. I needed a break.&lt;/p&gt;

&lt;p&gt;The plan was simple: take a vacation for a while, get my head together, and come back at it. And since we now had a CEO with a written plan to earn equity, it seemed like the right moment to do the other thing we had agreed to in year one: formally split the equity, and start paying out a dividend on our free cash flow.&lt;/p&gt;

&lt;p&gt;When I asked, I was told that the only way to get money from the company was to work there for a salary.&lt;/p&gt;

&lt;p&gt;I was in shock. I started the vacation anyway. My paychecks stopped. And somewhere in those weeks I realized I was not coming back.&lt;/p&gt;

&lt;h2&gt;
  
  
  What came next
&lt;/h2&gt;

&lt;p&gt;I went back into fintech at &lt;a href="https://www.momnt.com/" rel="noopener noreferrer"&gt;Momnt&lt;/a&gt;, with a leadership team that included people I knew from GreenSky. They were focused on hypergrowth, and they would let me take on hard problems that were worth a lot to solve.&lt;/p&gt;

&lt;p&gt;The people I supported there were &lt;a href="https://www.linkedin.com/in/barclaykeith/" rel="noopener noreferrer"&gt;&lt;strong&gt;Barclay Keith&lt;/strong&gt;&lt;/a&gt;, the CEO; &lt;a href="https://www.linkedin.com/in/lenamcdearmid/" rel="noopener noreferrer"&gt;&lt;strong&gt;Lena McDearmid&lt;/strong&gt;&lt;/a&gt;, the COO; &lt;a href="https://www.linkedin.com/in/brianlanehart/" rel="noopener noreferrer"&gt;&lt;strong&gt;Brian Lanehart&lt;/strong&gt;&lt;/a&gt;, the CTO; and their local savant, &lt;a href="https://www.linkedin.com/in/richard-mcnamara-8aa36410/" rel="noopener noreferrer"&gt;&lt;strong&gt;Richard McNamara&lt;/strong&gt;&lt;/a&gt;, who ran credit as Chief Credit Officer and served as CFO. That has been the thread ever since.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell anyone building with family
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write it down before it matters.&lt;/strong&gt; The time to paper an equity promise is when everyone is happy and the number is small. Later, the number is large and everyone remembers the conversation a little differently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The document protects the relationship, not just the deal.&lt;/strong&gt; I skipped the paperwork because it felt like distrust. It is the opposite. It is what lets two people who love each other disagree about money without disagreeing about each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate ownership from employment, in writing.&lt;/strong&gt; Owners are paid in distributions. Employees are paid in wages. If nothing says which one you are, the answer is whatever the person holding the bank login says it is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Give yourself the same care you give the hire.&lt;/strong&gt; I wrote a precise, fair equity plan for a new hire. I never wrote one for myself. Whatever you would insist on for a stranger, insist on for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this is here
&lt;/h2&gt;

&lt;p&gt;I do not write this to settle anything. &lt;a href="https://www.linkedin.com/in/erik-kaminski-63978822b/" rel="noopener noreferrer"&gt;Erik&lt;/a&gt; built something real out of nothing more than a knack for relationships, and I am proud of what we built on top of it together. Fifty people had jobs there. Hundreds of contractors had steady work. Clients in eight states got their properties looked after.&lt;/p&gt;

&lt;p&gt;Superior is where I learned most of what I now do for a living: that operators need a back office to operate, that working capital is a product, and that the paperwork is never the boring part. It is where we came from, and it is a core part of who we are. I just wish I had written it down sooner.&lt;/p&gt;

</description>
      <category>startup</category>
      <category>fintech</category>
      <category>entrepreneurship</category>
      <category>career</category>
    </item>
    <item>
      <title>The Banner Is Not a Lock: A Shadow Session Wrote the Row It Was Told Not To</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:50:27 +0000</pubDate>
      <link>https://dev.to/makaminski1337/the-banner-is-not-a-lock-a-shadow-session-wrote-the-row-it-was-told-not-to-4mig</link>
      <guid>https://dev.to/makaminski1337/the-banner-is-not-a-lock-a-shadow-session-wrote-the-row-it-was-told-not-to-4mig</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/the-banner-is-not-a-lock" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On 2026-09-22 a shadow session in my LinkedIn engine wrote a ledger row it had been told not to write. The instruction was the first thing in its prompt, in a banner, in capitals. It wrote the row anyway.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;a prompt is an instruction, and an instruction is not a lock.&lt;/strong&gt; If an agent must not do a thing, the code the agent calls has to refuse, and the refusal has to be an exit code the runner can see. I had known that for irreversible actions. I had not applied it to a mode flag, because "shadow" felt like a setting rather than an action. It is an action. Every publish is one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the engine is
&lt;/h2&gt;

&lt;p&gt;The engine is a gated, ledger-backed system for one operator's LinkedIn presence: three posts a day on a learning schedule, one considered comment per run, warm outreach inside hard budgets, and a job-search lane. A control plane on Cloudflare decides &lt;em&gt;when&lt;/em&gt;. A small runner on my own machine drives my own logged-in browser, because LinkedIn offers no API for most of this. Every run is a fresh session with one playbook and a mode banner; the ledgers are the only memory.&lt;/p&gt;

&lt;p&gt;Over three days, 2026-09-21 to 2026-09-22, the engine went from a folder of scripts to a package with 27 named invariants, each with a test that is the definition. Twenty-four ledger tables live in D1 now, generated from one schema spec; 2,760 rows were imported and reconciled row-for-row. Fifty-seven differential cases prove the lifted commands produce the same stdout, stderr, exit code and ledger writes as the originals, modulo an enumerated list of deltas. Fifteen schedules run in shadow. None of that stopped the row.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;The scorecard job reconciles accepted invites in the browser and logs the week. Its first live shadow run was a success in every way I had planned to measure: the session started, the browser worked, the playbook ran, and the report came back. Then I read the ledger. There was a new row that a shadow run has no business writing.&lt;/p&gt;

&lt;p&gt;The session had the banner. It had the playbook line that says shadow logs and never sends. It had the same model that had followed the same rule in fourteen other shadow runs. On this one it did not. I do not know why, and I have stopped treating "why" as the useful question. &lt;strong&gt;The useful question is what stopped it, and the answer was nothing.&lt;/strong&gt; The commands the session called did not know they were in shadow. Only the prompt did.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;The runner now sets an environment variable that names the mode, and the engine reads it. In shadow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every command that records a publish or a send exits 3 and writes nothing. That is log-post, log-comment, log-send without the shadow flag, log-reply, and the apply record.&lt;/li&gt;
&lt;li&gt;A passing gate exits 3. The gate still runs, still scores, still reports. It cannot return the code that means "go".&lt;/li&gt;
&lt;li&gt;Easy Apply preflight fails.&lt;/li&gt;
&lt;li&gt;The session is started with the tools that fill forms and attach files disallowed, so even a session that decided to try has nothing to try with.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exit 3 is deliberate. Zero means done, one means error, two means "correctly declined" in this engine's vocabulary. Three means held. The runner treats it as a normal outcome and the console shows it as one, so a shadow run that does exactly what it should now ends in a code that a person can read as "the lock worked".&lt;/p&gt;

&lt;p&gt;The playbooks were rebuilt with the same banner, because the banner is still useful. It tells the model what is expected, and most of the time the model does it. The lock is for the rest of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this keeps coming up
&lt;/h2&gt;

&lt;p&gt;This is the third time on this site I have written the same finding in a different costume. The &lt;a href="https://www.michael-kaminski.io/writing/human-approval-gates-for-irreversible-agent-actions" rel="noopener noreferrer"&gt;approval-gates essay&lt;/a&gt; said that anything the agent cannot undo has to be a property of the tool surface, not a policy asking the model to behave. The &lt;a href="https://www.michael-kaminski.io/writing/statistical-gating-for-agent-instruction-changes" rel="noopener noreferrer"&gt;statistical-gating essay&lt;/a&gt; said a gate that cannot detect the effect it was built for is decorative. This one says a mode that lives only in the prompt is decorative too.&lt;/p&gt;

&lt;p&gt;The pattern is the same each time. I write a rule in the place where I write, which is the prompt, and I feel the rule is enforced because I can see it. Then the system does the thing once, and I discover that the only enforcement was my having written it down. &lt;strong&gt;The rule has to move from the place where I write to the place where the code runs, and it has to fail closed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The engine has a table of invariants for exactly this reason. Each one is marked Code, Partial or Gap. Code means the engine enforces it and a test proves it. Partial means the engine enforces its half and the rest is a playbook instruction. The mode flag was not even on the table, because I had not thought of it as an invariant. It is now: shadow never publishes, and the test is a session that tries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two more gaps closed the same week
&lt;/h2&gt;

&lt;p&gt;Reading the ledger for the shadow row turned up two smaller ones, both the same shape.&lt;/p&gt;

&lt;p&gt;A veto in the engagement candidate list could be overridden by an explicit lane or relevance argument on the command line. That is a rule living in the default rather than in the code. Now the pick filters on the stored lane and a veto is final.&lt;/p&gt;

&lt;p&gt;The posting gate checked numbers against the fact ledger but let an unregistered number through if it was plausible. A checkable number found in neither the fact ledger nor a sourced claims row is now a hard fail, which is what the posting playbook had said all along. The playbook said it; the gate did not do it. Same costume.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to copy
&lt;/h2&gt;

&lt;p&gt;If you run agents on a schedule, list every action that must not happen in a given mode, and for each one ask which line of code refuses it. If the answer is "the prompt", you do not have a lock. Add a mode to the environment, make the command exit non-zero and write nothing, and then run a session that tries. The session that tries is the test. Mine wrote a row; yours will do something else. The lock is what makes it a story instead of an incident.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>architecture</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Guard Jobs Are Free: Four Agents, Three Human Gates, and Zero Model Calls on a Bad Request</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:49:50 +0000</pubDate>
      <link>https://dev.to/makaminski1337/guard-jobs-are-free-four-agents-three-human-gates-and-zero-model-calls-on-a-bad-request-3khp</link>
      <guid>https://dev.to/makaminski1337/guard-jobs-are-free-four-agents-three-human-gates-and-zero-model-calls-on-a-bad-request-3khp</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/guard-jobs-are-free" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A feature of five stories costs sixteen model runs in my software-delivery pipeline: one for the product agent, then five each for dev, QA and acceptance. A request that fails the Definition of Ready costs zero, because the check that fails it is a bash script that runs before any model is invoked.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;put the preconditions in a guard job, not in the prompt.&lt;/strong&gt; A guard job is free, it is deterministic, and it fails in a way the issue timeline records. A precondition written into a prompt costs a model call to evaluate and is honoured most of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape
&lt;/h2&gt;

&lt;p&gt;Four agents, each owning exactly one gate, with no authority over the others' work. The product agent asks whether this is a real, sliced, testable feature; it cannot write code. The dev agent turns one story into one pull request with tests; it cannot start from an unrefined issue. The QA agent asks whether the tests actually prove the criteria; it cannot fix the code. The acceptance agent asks whether the requester would call this done, and looks at the rendered screens at 375, 768 and 1440 pixels to answer; it cannot merge.&lt;/p&gt;

&lt;p&gt;Every agent is the same three parts: a role file, a bash guard job, and one model invocation with a per-agent tool allowlist. Adding a fifth agent means copying that pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Labels are the control flow
&lt;/h2&gt;

&lt;p&gt;There is no database, queue or persistent service. GitHub issues are the state, and labels are the only orchestration primitive. An intake issue carries the raw request verbatim, never edited. The product agent replies with a proposal. A human adds &lt;code&gt;gate:approved&lt;/code&gt;. The agent creates a feature issue and story issues in &lt;code&gt;stage:ready&lt;/code&gt;. A human adds &lt;code&gt;agent:dev&lt;/code&gt; to one story. Dev, QA and acceptance run unattended from there, and a person gets a message on done, failure or a question.&lt;/p&gt;

&lt;p&gt;Every state transition is a label change, and every label change is a visible event in the issue timeline. That is the single biggest reason the system stays cheap to run and easy to debug. When something goes wrong, the answer to "what happened" is on the issue, in order, with timestamps.&lt;/p&gt;

&lt;h2&gt;
  
  
  The guard
&lt;/h2&gt;

&lt;p&gt;The dev agent's guard checks three things before spending a model call: is this a story, is it in ready, and does it carry at least one Given-When-Then acceptance criterion. If any check fails, the guard adds &lt;code&gt;gate:failed&lt;/code&gt; and stops. No model, no branch, no cost.&lt;/p&gt;

&lt;p&gt;That guard is the design constraint made concrete: &lt;strong&gt;no code can be written from an unrefined request.&lt;/strong&gt; Everything else in the pipeline is a consequence. The product agent exists because something has to produce the criteria the guard demands. The QA agent traces each criterion to a test because the criteria are machine-checkable. The acceptance agent reads the original intake rather than the refined story, because refinement loses information and that edge is the check on the loss.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three human gates
&lt;/h2&gt;

&lt;p&gt;Three decisions stay with a person, and each has a reason that is not "we were nervous".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scope.&lt;/strong&gt; Approving the proposal is a business decision. An agent approving its own scope is the vibe-coding problem with extra steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sequencing.&lt;/strong&gt; Stories sit in ready until a person pulls one. Priority is theirs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge.&lt;/strong&gt; The acceptance agent recommends. One irreversible action, one human.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything between those three points runs unattended. The kill switch is a label: &lt;code&gt;agent:paused&lt;/code&gt; on any item stops every agent for that item before any model call. Disabling Actions stops everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it costs
&lt;/h2&gt;

&lt;p&gt;One model call per agent per item. A five-story feature is 1 + 5 + 5 + 5 = 16 runs, plus one extra dev-and-QA cycle for each block. The guard jobs are not in that count because they cost nothing. That arithmetic is why the preconditions live in bash and not in the prompt, and it is the same arithmetic as the &lt;a href="https://www.michael-kaminski.io/writing/designing-tools-an-agent-can-actually-call" rel="noopener noreferrer"&gt;tool-surface essay&lt;/a&gt;: the cheapest place to prevent a bad call is before it is made.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is not proven
&lt;/h2&gt;

&lt;p&gt;The pipeline was built on 2026-09-07 and has run on my own repositories. I have no throughput numbers worth publishing yet, and the honest claim is the structural one: a request without acceptance criteria cannot reach a model that writes code. The count of features shipped through it is a later essay, with the count.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>github</category>
      <category>automation</category>
      <category>testing</category>
    </item>
    <item>
      <title>The Statute Rewrote the Product: A Permit Service That Had to Refuse Its Own Launch Pitch</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:49:14 +0000</pubDate>
      <link>https://dev.to/makaminski1337/the-statute-rewrote-the-product-a-permit-service-that-had-to-refuse-its-own-launch-pitch-1n9c</link>
      <guid>https://dev.to/makaminski1337/the-statute-rewrote-the-product-a-permit-service-that-had-to-refuse-its-own-launch-pitch-1n9c</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/the-statute-rewrote-the-product" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On 2026-09-02 I read the statute that governs what my product was selling, and on 2026-09-03 the product refused its own launch pitch. Everything in between is the essay.&lt;/p&gt;

&lt;p&gt;The product is Transparent Permits, a self-serve service from a licensed residential contractor in metro Atlanta. The launch pitch was clean: the contractor's licence on your permit, you keep your crew, one site walk, the owner supervises. A customer describes the project, pays by card, and gets the licence documents in a private portal. It built and rendered with zero credentials, took payment through a server-priced checkout, and closed the order from a webhook with an idempotency ledger. It was a good build of the wrong product.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the statute says
&lt;/h2&gt;

&lt;p&gt;Georgia's licensing law and its rules prohibit lending a licence: putting your number on work you do not actually control. The 2026 changes extended the pattern to the trades from 2026-07-01. Read against the pitch, every phrase was a match. "You keep your crew" is an unlicensed crew under a licence that does not supervise them. "One site walk" is supervision in name. "The owner supervises" is the licensee stepping out of the role the licence exists to hold.&lt;/p&gt;

&lt;p&gt;The conclusion first: &lt;strong&gt;the pitch was the fact pattern the rule was written to catch, and no amount of product polish changes that.&lt;/strong&gt; The only move was to change what the product is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it became
&lt;/h2&gt;

&lt;p&gt;A contractor-of-record model. The licensed contractor approves the scope, obtains the permit, and supervises the permitted work through inspections, with the visit count bounded in the agreement. The documents that used to unlock at payment now unlock at scope approval. Declining the scope emails a refund notice, the refund closes the order, and the portal locks.&lt;/p&gt;

&lt;p&gt;The interesting part is what the intake refuses. Six hard stops, enforced on the client and again on the server, so a request that fails cannot be submitted by a determined browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trade permits (electrical, plumbing, HVAC), unless the trade licensee's number is supplied.&lt;/li&gt;
&lt;li&gt;Unlicensed crews performing the work.&lt;/li&gt;
&lt;li&gt;Investors doing the labour themselves.&lt;/li&gt;
&lt;li&gt;"Contractors" with no licence, a placeholder number, or the licensee's own number.&lt;/li&gt;
&lt;li&gt;A contractor ordering on an owner's behalf without the owner's contact.&lt;/li&gt;
&lt;li&gt;A subcontractor list that is missing when the work needs one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each stop records why it fired, so the intake tells me which pattern people are trying to buy. That is not a bug report. It is the demand signal for the product I cannot sell them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freeze the old agreement, version the new one
&lt;/h2&gt;

&lt;p&gt;Orders placed under the launch agreement keep it. The agreement module holds version one frozen and version two dated, and the portal renders the text that applied to the order's version. A customer who agreed to one document must never find a different one in their portal. Approve and decline links are signed with an HMAC so the review page cannot be forged, and the first decision wins.&lt;/p&gt;

&lt;p&gt;The copy sweep was the long part: home, the intent pages, the county pages, the machine-readable summary, the social card, the success page and seven email sequences all said the old thing. A grep for the launch phrasing is now a test, because copy regresses faster than code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this rhymes
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.michael-kaminski.io/writing/shipping-an-ai-agent-through-compliance-review" rel="noopener noreferrer"&gt;compliance-review essay&lt;/a&gt; on this site argues that the durable move in a regulated system is to design against the statute rather than against guidance, because guidance is the layer that moves. This is the same lesson from the other side. I had designed against the pitch, which is the layer that moves fastest of all, because I wrote it. &lt;strong&gt;Read the statute before the landing page, and read it as a description of what the product does, not as a footnote.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Numbers
&lt;/h2&gt;

&lt;p&gt;Rebuild: one working day, 2026-09-02 to 2026-09-03, evaluated on the first and shipped on the second. Tests: 63, all green with no environment configured. Schema changes: none; the new intake fields live in the existing JSON column and the scope decisions are event rows. New environment variables: none; the cron token also keys the review-link signature. Orders refunded under the change: not reported here.&lt;/p&gt;

&lt;p&gt;The employer of the licence is a company I work with, not a client I am describing from the outside, and the licence number is deliberately absent from this essay.&lt;/p&gt;

</description>
      <category>fintech</category>
      <category>compliance</category>
      <category>ai</category>
      <category>architecture</category>
    </item>
    <item>
      <title>I Gave My Website a Voice, and the Voice Was the Easy Part</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:48:37 +0000</pubDate>
      <link>https://dev.to/makaminski1337/i-gave-my-website-a-voice-and-the-voice-was-the-easy-part-7g6</link>
      <guid>https://dev.to/makaminski1337/i-gave-my-website-a-voice-and-the-voice-was-the-easy-part-7g6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/i-gave-my-website-a-voice" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is a button on my homepage now that says &lt;strong&gt;Talk to my Digital Twin&lt;/strong&gt;. Press it and you get a panel. Type a question and an AI trained on the public content of this site answers as me. Press the broadcast icon and it opens the microphone, waits for you to finish a sentence, answers out loud in a clone of my voice, and starts listening again — no clicking between turns.&lt;/p&gt;

&lt;p&gt;Three services behind it, all server-side so the keys never reach a browser: Whisper for speech to text, Claude for the conversation, ElevenLabs for the voice. That part is a weekend's worth of plumbing and it mostly worked on the first deploy.&lt;/p&gt;

&lt;p&gt;What did not work on the first deploy, or the fifth, was making the thing sound like a human being. And the fixes for that were almost never in the audio stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  The engine reads what you write, not what you meant
&lt;/h2&gt;

&lt;p&gt;The first end-to-end test came back in a voice that was unmistakably mine and delivery that was unmistakably a computer. It said "dollar ten point eight B." It said "ess one." It said "A-S-C six zero six" with the flat cadence of a serial number. Somewhere in there it read a percent sign aloud.&lt;/p&gt;

&lt;p&gt;My instinct was to reach for the voice settings — stability, similarity, style — because those are the knobs the vendor gives you and knobs feel like control. I turned them for an hour and got a marginally smoother reading of the same broken sentences.&lt;/p&gt;

&lt;p&gt;The actual problem was upstream. A speech engine is handed a string. It has no idea that &lt;code&gt;$10.8B&lt;/code&gt; is a quantity a human would say as "about ten point eight billion," or that &lt;code&gt;2016-2018&lt;/code&gt; is a span and not a subtraction. It is not confused. It is doing exactly what you asked, and what you asked was to read a document out loud.&lt;/p&gt;

&lt;p&gt;So the fix went into the model's instructions, not the audio config. The system prompt now has a section that says, in effect: &lt;em&gt;you are being read aloud, so write speech&lt;/em&gt;. Spell out anything an eye would decode but an ear cannot. Hyphenate acronyms that get read letter by letter — "S-one," not "S1." Treat punctuation as pacing rather than typography, because the engine either swallows a semicolon or announces it. Write "and" instead of an ampersand and "percent" instead of a sign. Keep sentences short, because prosody drifts across a long clause the way a held note goes flat.&lt;/p&gt;

&lt;p&gt;That change did more for perceived quality than every voice parameter combined. It is the same lesson that shows up in financial reporting, incidentally: the presentation layer can only render what the data model gives it, and most "the dashboard looks wrong" problems are really "the dashboard is correctly displaying a bad number" problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Silence is a design decision
&lt;/h2&gt;

&lt;p&gt;Hands-free sounds like a small feature and is mostly an argument about silence. Somebody has to decide when you are done talking, and every threshold is a trade.&lt;/p&gt;

&lt;p&gt;Cut the turn at half a second of quiet and it interrupts anyone who pauses to think. Wait three seconds and every exchange feels like it is buffering. It landed at &lt;strong&gt;1.3 seconds&lt;/strong&gt; below threshold to close a turn, 150 milliseconds above it to open one, and anything under 400 milliseconds of speech thrown away as a cough, a door, or a chair.&lt;/p&gt;

&lt;p&gt;The part I did not expect to matter most: the threshold itself cannot be a constant. A fixed cutoff works beautifully at a quiet desk and fails completely next to a laptop fan or in a coffee shop — and "fails" here means the microphone decides the room is talking and never stops recording. So it now spends the first 700 milliseconds after you press the button doing nothing but listening to the room, then sets its bar relative to whatever it heard. That is why there is a brief "getting a read on the room" state before it says it is listening. It is not a loading spinner. It is the only reason the feature works anywhere but my office.&lt;/p&gt;

&lt;p&gt;One more: the loop suspends itself while the twin is speaking and resumes when playback ends. Without that it hears its own voice through the speakers and answers itself, which is funny exactly once.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I care most about
&lt;/h2&gt;

&lt;p&gt;Ask it whether it is a real person and it tells you it is not. That is not a disclaimer bolted on the outside; it is in the instructions, and I tested it by trying to talk it out of the answer.&lt;/p&gt;

&lt;p&gt;It is also fenced in on substance. It only knows what this site already publishes. It is told to say it does not know rather than invent a client, a number, or a date — because a confident fabrication in my voice is worse than no answer at all. It will not discuss anything non-public about any employer. Asked what I charge, it says compensation depends on role and scope and belongs on a call, which is both a guardrail and the truth.&lt;/p&gt;

&lt;p&gt;I checked all of that against the live deployment rather than trusting the prompt. Asked for a base salary: declined, sent it to a call. Asked to name clients at a former employer: declined. Asked what I did at GreenSky: product and strategy on the credit platform, there through the IPO, supported the S-1 — accurate, first person, one sentence, and it said "S-one" out loud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retiring the volume numbers
&lt;/h2&gt;

&lt;p&gt;This entry has no number on it, and none of the ones after it will either.&lt;/p&gt;

&lt;p&gt;"Behind the Build" ran eight volumes and the numbering was quietly the worst thing about it. These posts get drafted by scheduled runs, each of which branches off the published site, counts the volumes it can see, and adds one. Run two of those in the same window and both of them confidently write "Vol. 2." I spent part of this week untangling six of those — six separate drafts, all claiming the same number, several never merged at all. Not one of them was wrong about anything except its own place in line.&lt;/p&gt;

&lt;p&gt;A counter that requires global coordination to be correct is a counter that will be wrong. So it is gone. These are &lt;strong&gt;Field Notes&lt;/strong&gt; now: dated, titled, unnumbered. Nothing to collide over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also shipped, since it was the same 24 hours
&lt;/h2&gt;

&lt;p&gt;Four more live sites went onto the &lt;a href="https://www.michael-kaminski.io/websites" rel="noopener noreferrer"&gt;Websites&lt;/a&gt; page in the same stretch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;COT Signal&lt;/strong&gt; — weekly CME futures positioning for Bitcoin and Ether, read straight off the CFTC Commitments of Traders report. Asset managers, hedge funds, and dealers, net long against net short.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VendorLink&lt;/strong&gt; — a two-sided marketplace pairing event organizers with local vendors, with applications, contracts, and payments in one flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YardLine&lt;/strong&gt; — a supply-side prospecting CRM for heavy-duty truck salvage yards around metro Atlanta. Roster-gated, so what the public sees is a sign-in screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next Generation Capital&lt;/strong&gt; — an investor-network site for an Atlanta build-to-rent and cottage-community firm. Deliberately not a public offering: it states a thesis and opens an introduction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They have nothing to do with each other, which is sort of the point. The interesting constraint right now is not whether a thing can be built in an evening. It is whether the tenth one you built in an evening is still something you would put your name on. The twin is the current test case: it speaks in my voice, on my domain, to people deciding whether to email me. If it invents one deal or bluffs one number, the convenience was not worth it.&lt;/p&gt;

&lt;p&gt;So far it says "I'm not sure" more often than I expected, which I am choosing to read as a good sign.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I Shipped the Same Pull Request Twice and Only Noticed the Second Time</title>
      <dc:creator>Michael Kaminski</dc:creator>
      <pubDate>Sat, 05 Dec 2026 23:48:01 +0000</pubDate>
      <link>https://dev.to/makaminski1337/i-shipped-the-same-pull-request-twice-and-only-noticed-the-second-time-59b8</link>
      <guid>https://dev.to/makaminski1337/i-shipped-the-same-pull-request-twice-and-only-noticed-the-second-time-59b8</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.michael-kaminski.io/writing/behind-the-build-vol-8-i-shipped-the-same-pr-twice" rel="noopener noreferrer"&gt;michael-kaminski.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Two things shipped to this site recently. A &lt;a href="https://www.michael-kaminski.io/websites" rel="noopener noreferrer"&gt;Websites&lt;/a&gt; tab, listing the twelve production apps I have running on Vercel. Then, a day later, a &lt;a href="https://www.michael-kaminski.io/products" rel="noopener noreferrer"&gt;Products&lt;/a&gt; tab, listing the desktop tools sitting in public repos that had never made it onto the portfolio — a macOS system monitor with a resizable desktop HUD, a touchscreen driver that seizes the touch device out from under WindowServer, and an on-device context-capture daemon that OCRs your screen and then deletes the raw footage.&lt;/p&gt;

&lt;p&gt;Different content, different audience, different reason for existing. Identical pull request.&lt;/p&gt;

&lt;h2&gt;
  
  
  The diff, twice
&lt;/h2&gt;

&lt;p&gt;Both changes came down to the same six moves, in the same order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A new page component&lt;/strong&gt; holding a hardcoded array of cards — name, image, category, blurb, tags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A lazy import and a route&lt;/strong&gt; in the app shell, so the page code-splits instead of riding along in the main bundle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One nav item&lt;/strong&gt;, added in two places, because the desktop and mobile menus are separate lists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screenshots&lt;/strong&gt;, captured, converted to WebP, dropped into the public folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An entry in the sitemap&lt;/strong&gt;, so the new route is not invisible to crawlers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A rebuild&lt;/strong&gt;, because the compiled output is committed to this repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you do that once, it's a feature. When you do it twice inside 36 hours, it stops being a feature and starts being a checklist you are executing from memory — which is exactly the moment the engineer brain lights up and says &lt;em&gt;abstract it&lt;/em&gt;. Build a generic card-grid page. Drive it off a config file. Make adding a tab a one-line change.&lt;/p&gt;

&lt;h2&gt;
  
  
  I didn't, and I think that was right
&lt;/h2&gt;

&lt;p&gt;Here is the honest accounting. The shared surface between those two pages is a rounded card with an image on top and some text underneath. The differences are small but real: one grid links out to live sites, the other links to repos and needs a graceful fallback panel for the tool whose README has no screenshot in it. One has a category line about deployment; the other has one about the operating system. The framer-motion stagger delays differ because the column counts differ.&lt;/p&gt;

&lt;p&gt;Abstracting that gets you a component with a props interface roughly as long as the duplicated markup, plus a new decision every time a third page doesn't quite fit — do I add a prop, or a variant flag, or fork it after all? Two instances is not a pattern. It's a coincidence with a second data point. The rule I keep coming back to is that you abstract on the &lt;strong&gt;third&lt;/strong&gt; occurrence, because that's the first time you can actually see which parts vary and which parts are load-bearing.&lt;/p&gt;

&lt;p&gt;What I did do is write the checklist down. The expensive part of shipping those tabs was never the JSX — it was remembering that the mobile nav is a separate array, and that the sitemap will silently rot if you don't touch it. Those are the steps that get skipped at 11pm, and skipping them is invisible until a month later when you wonder why a page never got indexed. Cheap fix: the list lives in the repo now, so future-me doesn't have to re-derive it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I'd flag in review
&lt;/h2&gt;

&lt;p&gt;Committing the build output is the thing a reviewer should raise an eyebrow at, and I'll raise it myself. Every one of these PRs carries a fresh set of hashed bundles and a churned asset manifest alongside the four lines of source that actually changed. The diff stat reads like a large change. It isn't. But it does mean the compiled artifacts and the source can drift if someone edits one without the other, and it makes the review signal-to-noise ratio worse on exactly the changes where you'd want it to be good.&lt;/p&gt;

&lt;p&gt;It stays for now because the deployment story here is simple and I'd rather have the boring thing that works than the clever thing I have to debug on a Sunday. But it is technical debt, it is written down as technical debt, and that distinction matters more than people give it credit for. Debt you've named has a repayment plan. Debt you haven't is just a surprise with a delay on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The transferable bit
&lt;/h2&gt;

&lt;p&gt;Most of what I do in finance-heavy engineering work is this exact judgment call at larger stakes: something got built twice, and someone wants to know whether to consolidate. The answer is almost never about the code. It's about whether the two things will keep moving in the same direction. Two report pipelines that both close the month will converge, and you should merge them. Two grids that happen to both be grids won't, and merging them buys you a config format nobody wants to own.&lt;/p&gt;

&lt;p&gt;Repetition is information. It tells you where the seams are. It does not, by itself, tell you to remove them.&lt;/p&gt;

&lt;p&gt;If you've got a codebase where every new page or report is a six-step ritual nobody has written down, &lt;a href="https://calendly.com/kaminski1337/15min" rel="noopener noreferrer"&gt;grab 15 minutes&lt;/a&gt; — that ritual is usually where the time is going.&lt;/p&gt;

</description>
      <category>github</category>
      <category>ai</category>
      <category>automation</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
