<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Galih Putro Aji on Medium]]></title>
        <description><![CDATA[Stories by Galih Putro Aji on Medium]]></description>
        <link>https://medium.com/@galihputroaji.gh?source=rss-6fb8b03a895------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Kr2VCixgTaLdqYLwjrG5Hg.png</url>
            <title>Stories by Galih Putro Aji on Medium</title>
            <link>https://medium.com/@galihputroaji.gh?source=rss-6fb8b03a895------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:26:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@galihputroaji.gh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Interesting Part of Jev Isn’t Jev]]></title>
            <link>https://medium.com/devsameday/the-interesting-part-of-jev-isnt-jev-726b91a87632?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/726b91a87632</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[system-one-model]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 06:07:44 GMT</pubDate>
            <atom:updated>2026-10-05T06:08:12.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y665HCFDdDgQNA6qUy6dbw.png" /></figure><p>Look inside almost any agent harness and you’ll find the same small waste. A frontier model reads a support ticket, reasons about it, writes a polite sentence explaining that yes, this looks like a bug, and then a line of code downstream searches that sentence for the word “bug”. We paid for a paragraph and kept one bit.</p><p>TypeSafe AI’s Jev is a bet that this is silly, and I think the bet is right even if Jev itself turns out to be mediocre.</p><h3>What it actually is</h3><p>Jev launched on September 15, 2026, from a San Francisco startup that came out of stealth with a roughly $40 million seed round led by DCVC. It doesn’t write text at all. You send it a block of state plus typed questions, and it sends back numbers: a probability for yes/no, a distribution over options for multiple choice, a score against a rubric you define. Input costs $0.042 per million tokens, output costs nothing because there is no output, and the context window is 32K.</p><p>TypeSafe calls this a “System One model,” a nod to Kahneman’s fast, intuitive mode of thinking. Simon Willison has suggested the plainer label “decision models.” Either way, the shape is what matters: unstructured text in, typed answers out, and the answer always fits your schema, so there’s no parsing step to break.</p><h3>Why the pricing matters more than the model</h3><p>My back-of-envelope math says a thousand classification calls of around 500 input tokens each cost roughly two cents, and a million of them come to about $21. At that price you stop deciding whether a check is worth running. You put one in front of every bash command, every file write, every turn, because the question “is this worth the money” disappears.</p><p>That changes how you design. When a safety check costs a dollar per hundred runs you ration it; when it costs nothing you make it a reflex. My own code review script is a good example of the rationing: it only scans the files in the diff for leaked secrets, because sending the whole repo to a big model on every run costs too much. I made that compromise for the bill, not because it’s the right way to check.</p><h3><strong>What I don’t buy yet</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0AuERJ_U1y3As2S5Jo5TQ.png" /><figcaption>Give each question the cheapest thing that can answer it</figcaption></figure><p>Launch demos look great, and demos always do. The only accuracy figure I could find comes from a third-party pricing guide quoting TypeSafe’s own dashboard: 67.8% aggregate accuracy for Jev against 74.1% for an unnamed comparator. I’d hold that loosely because of where it comes from, but it matches what you’d expect from something priced this low. You get a fast, decent judgment, not a careful one.</p><p>That makes the confidence number a problem you have to own. Say a prompt-injection check returns 64% on a borderline message. Block at 0.6 and legitimate requests stall; block at 0.9 and the subtle attacks walk through. The threshold is a product decision hiding in a config file.</p><p>On the bash gate, a classifier that scores cooperative cleanup commands correctly tells you little about an agent actively trying to get around it, or a command hidden behind base64 or an eval. A semantic classifier isn’t automatically better than regex there; it fails differently. I’d run it beside permissions and sandboxing, never instead of them.</p><p>And the file idea has a ceiling. The file still goes to Jev as input, so you pay for those tokens, and 32K rules out anything large.</p><h3>Where I’d start</h3><p>With the checks where a wrong answer is cheap to recover from. A compaction trigger that fires a turn early costs nothing. A routing decision that sends a task to the wrong agent costs a retry. Those are good places to learn what Jev’s confidence numbers actually mean on your data.</p><p>Gating destructive commands comes after that, and only with a second layer behind it.</p><blockquote>I took 60 files from the repo: handlers, config.go, the JWT middleware setup, docker-compose.yml, a few .env.example files and some test fixtures. I labeled them by hand, 15 with a real secret and 45 without, then ran Jev and the model my script uses today over all of them. The big model caught 14 of the 15; Jev caught 13 at a 0.5 threshold and 11 at 0.9. Average latency was 420 ms for Jev against 2.3 seconds for the big model. At 0.5 the cheap pass flagged 19 of the 60 files, so only those 19 would have reached the big model. The surprise was in the details: Jev raised false alarms on .env.example placeholders, and it missed a Postgres connection string assembled with fmt.Sprintf.</blockquote><p>The broader point survives whatever happens to Jev. Agents have been doing too much of their thinking with the most expensive tool in the box. Deterministic code, a cheap classifier, a fast model and a heavy reasoner each have a job, and most harnesses today give all of it to the last one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=726b91a87632" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/the-interesting-part-of-jev-isnt-jev-726b91a87632">The Interesting Part of Jev Isn’t Jev</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Came From Go. Rust Broke My Brain]]></title>
            <link>https://medium.com/devsameday/i-came-from-go-rust-broke-my-brain-f534372e1c94?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/f534372e1c94</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 04:12:01 GMT</pubDate>
            <atom:updated>2026-10-01T04:33:24.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FggGlhzW_zH3YdzTlQqkvA.png" /></figure><p><em>Go never asked me to think about memory. Rust asked on the first day, and kept asking.</em></p><p>Go’s deal was simple. I wrote code, and something else cleaned up after me. I never asked who owned a value because the answer was always the same: the garbage collector, eventually. That arrangement lasted years.</p><p>Then I started learning Rust, and the compiler started asking questions I’d never been asked before. Not about logic. About ownership and lifetimes: things Go had quietly handled while I wasn’t looking. Four of those questions broke my brain in particular.</p><h3>1. Ownership: the value moved out from under you</h3><p>In Go, this is nothing:</p><pre>func process(items []string) { /* ... */ }<br><br>data := []string{&quot;a&quot;, &quot;b&quot;}<br>process(data)<br>fmt.Println(data) // fine. nobody cares.</pre><p>You pass a slice to a function and keep using it afterward. In Rust, the equivalent can refuse to compile, because passing a value can transfer ownership of it. The function owns it now. You don’t. The compiler’s exact words: error[E0382]: use of moved value.</p><p>Every Go developer meets this error in the first week. It’s the moment you realize there’s no runtime cleanup crew in Rust. The compiler tracks every value’s owner at compile time, and when the owner goes out of scope, Rust drops the value. Right there. Deterministically.</p><blockquote>“The first time E0382 showed up, I was just trying to pass a config struct into a handler. I stared at ‘use of moved value’ for twenty minutes before it clicked that I’d given the struct away.”</blockquote><p>The strange part isn’t the rule itself. It’s that Go trained you to never think about this category of problem at all.</p><h3>2. There is no nil, and errors don’t travel in pairs</h3><p>user, err := getUser(id). If you&#39;ve written Go for any length of time, your fingers type that in your sleep. Two return values, one of them possibly nil, and a quiet agreement that you&#39;ll check.</p><p>Rust has no nil. No null. The concept doesn’t exist. Instead there’s Option&lt;T&gt;: a value that is explicitly either Some(thing) or None. You can&#39;t just use it and hope. The compiler forces the question: what happens when there&#39;s nothing here?</p><pre>let user: Option&lt;User&gt; = get_user(id);<br>match user {<br>    Some(u) =&gt; println!(&quot;{}&quot;, u.name),<br>    None =&gt; println!(&quot;nobody home&quot;),<br>}</pre><p>Errors work the same way. No (T, error) tuple, there&#39;s Result&lt;T, E&gt;, and the ? operator that propagates errors upward without the if err != nil chant. After a month of this, something uncomfortable happens: you go back to Go, and every unchecked nil starts looking like a landmine you planted yourself. You&#39;d just never noticed the field was mined.</p><h3>3. Lifetimes: the one that almost ended it</h3><p>Go never asks how long a reference stays valid. The garbage collector keeps things alive as long as someone points at them, and that’s the end of the discussion.</p><p>Rust asks. In the function signature. With syntax that looks like line noise the first time:</p><pre>fn longest&lt;&#39;a&gt;(x: &amp;&#39;a str, y: &amp;&#39;a str) -&gt; &amp;&#39;a str {<br>    if x.len() &gt; y.len() { x } else { y }<br>}</pre><p>That &#39;a is a promise: the returned reference lives no longer than the shortest-lived input. The compiler checks the promise, and if you get it wrong, it tells you in an error message long enough to make coffee during.</p><p>The way to read it: lifetimes aren’t a feature. They’re the compiler doing, at compile time, the bookkeeping Go’s garbage collector does at runtime. Same job, different shift.</p><blockquote>“I won’t pretend I understood lifetimes that day. I slapped &#39;static on things until it compiled and felt dirty about it for a week.&quot;</blockquote><h3>4. Traits are not interfaces, even though they look like cousins</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JE-xrTYtEAbbCTvFdXVJyQ.png" /></figure><p>This one is sneaky because it looks familiar. Go interfaces, Rust traits: both about behavior, both let you write generic code. Close enough to lull you, different enough to bite.</p><p>In Go, a type satisfies an interface implicitly. You never declare it, if it has the methods, it counts. Rust demands an explicit impl Trait for Type, which feels like bureaucracy until you remember Go&#39;s implicit version has a famous trap: a nil pointer wrapped in an interface is not a nil interface, and it blows up at runtime in exactly the place you stopped looking.</p><p>Rust also has the orphan rule: you can’t implement someone else’s trait for someone else’s type, which keeps the ecosystem from turning into a free-for-all. And where Go reaches for dynamic dispatch through interfaces by default, Rust leans on static dispatch with generics, monomorphizing everything at compile time so the machine code stays fast and misuse gets caught before the program ever runs.</p><p>The honest version: traits felt hostile for a week. Then I realized Go’s looseness was the thing that had been biting me for years. I’d just learned to call the bites normal.</p><p>Rust didn’t teach me Go is bad. It showed me how much Go was carrying for me while I wasn’t looking. I still reach for Go when I want to ship something this week. But now there’s a voice in the back of my head asking who owns this value, and Go never taught me to ask. I’m glad something finally did.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f534372e1c94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/i-came-from-go-rust-broke-my-brain-f534372e1c94">I Came From Go. Rust Broke My Brain</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A $40 Million Startup Built an AI That Can’t Chat. Three Days Later, Its Free Version Appeared]]></title>
            <link>https://medium.com/devsameday/a-40-million-startup-built-an-ai-that-cant-chat-three-days-later-its-free-version-appeared-c8ec0fe02d94?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ec0fe02d94</guid>
            <category><![CDATA[system-one-model]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Mon, 28 Sep 2026 10:38:41 GMT</pubDate>
            <atom:updated>2026-09-28T10:38:41.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMyqI3zfuSQ9dAr3LBSqxw.png" /></figure><p><em>Jev from TypeSafe and Laya from the community: what was promised, what was proven, and who actually came first.</em></p><p>On September 15, 2026, TypeSafe AI emerged from stealth with a <a href="https://finance.yahoo.com/technology/ai/articles/typesafe-ai-emerges-stealth-40m-190000776.html">$40 million seed round led by DCVC</a> and a product deliberately designed to be unable to write sentences. Its name is Jev. Three days later, an engineer from Kerala named Nandakishor M <a href="https://dev.to/nandakishor_m_6cc0adfde9f/i-built-non-autoregressive-decision-models-a-year-ago-then-a-frontier-lab-called-it-a-18me">released Laya</a>, an open-source model that mimics Jev’s API, and <a href="https://github.com/NandhaKishorM/laya">its repository</a> now has around 25,700 stars on GitHub. To <a href="https://analyticsindiamag.com/ai-features/this-kerala-engineer-built-open-source-jev-alternative-a-year-before-the-hype">Analytics India Magazine</a>, he claimed that he had been working on the idea since April 2025, while researching ways to detect hallucinations before an LLM finished responding.</p><p>The story is easy to summarize: an expensive startup, copied by the community within days. The more honest version is messier. What was copied was the shape of the interface, not the model itself, and the Laya figures most frequently quoted come with footnotes that are rarely carried along with them.</p><h3>Jev, an AI that only answers choices</h3><p>Ordinary language models receive text and respond with text. Jev receives a “state” (an email, JSON document) along with a list of typed questions, then returns answers that can be read directly by a program: a single choice, a score, or a yes/no probability, all accompanied by a confidence level. Its founder, Diogo Almeida, <a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev">describes Jev</a> as a “frontier-intelligence function call.”</p><p>An example from Laya’s README, which uses the same format: a customer email complains about being charged twice and threatens to cancel the subscription unless refunded that day. The model answers “billing department,” plus a churn probability of around 89 percent. The decision threshold is in your code; above a certain number, the process runs automatically, while below it, it is routed to a human.</p><p>TypeSafe’s claims are bold. The price is $0.042 per million input tokens with free output, response time is 70 to 500 milliseconds, and <a href="https://typesafe.ai/">their homepage</a> states that it is 193.6x faster and 444.6x cheaper. Their launch blog itself acknowledges that those figures come from four workflows created by the internal team that may be biased, and that such a low price has not yet been proven to be free of subsidies. The transparency is commendable, but the benchmark is still their own.</p><p>The phrase “cannot hallucinate” needs to be read narrowly. <a href="https://en.wowtale.net/2026/09/21/235190/">What it means</a> is that the answer cannot fall outside the schema you define, not that the answer is guaranteed to be correct. A wrong answer can still arrive in a perfect format.</p><p>Almeida previously worked on RLHF at OpenAI, and <a href="https://www.forbes.com/sites/the-prompt/2026/09/15/this-200-million-startup-wants-to-fix-ais-overconfidence-problem/">Forbes</a> reports that its seed valuation was around $200 million. TypeSafe trained Jev entirely on synthetic data and has not disclosed its architecture; <a href="https://techcrunch.com/2026/09/18/a-new-kind-of-ai-model-from-a-chatgpt-inventor-is-thrilling-developers/">according to TechCrunch</a>, outside observers suspect that there may be an open-weight LLM underneath.</p><h3>Laya: the same interface, a different engine</h3><p>Laya is a ModernBERT-large encoder with 421 million parameters and a decision head on top. All questions are answered in a single forward pass, taking around 33 to 40 milliseconds on a T4 GPU, licensed under Apache 2.0, and pip install laya is enough to try it. Its built-in server, laya-serve, exposes a POST /v1/systemone endpoint with the same request and response shape as Jev&#39;s API, <a href="https://huggingface.co/convaiinnovations/laya">according to its model card</a>, so a Jev client only needs to change the base URL.</p><p>That is why the word “clone” is not quite accurate. Jev’s weights are closed and its architecture has not been published, while Laya is a standalone bidirectional encoder. What they share is only the concept and the API contract.</p><p>The community’s enthusiasm is real: around 25.7 thousand stars, 2.2 thousand forks, and a model card with 4.12 thousand likes. Ports for Apple silicon and Huawei Ascend NPUs have already appeared. One example documented in the README: fine-tuning Laya for a browser agent increased top-1 element selection accuracy from 0.10 to 0.66.</p><h3>The numbers that need to be read twice</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1n381b16AWmKqOJ15xdVGQ.jpeg" /><figcaption><em>Jev and Laya accuracy according to the comparison table in Laya’s README. Jev’s figures come from a third party</em></figcaption></figure><p>The comparison table in the README places Laya above Jev on the typed-decisions benchmark: 0.766 versus 0.727. Read the footnote. The 0.766 figure belongs to a checkpoint that has already been fine-tuned on the benchmark’s own training split. Its base checkpoint only reaches 0.362, below the majority-class guess of 0.461, and the README itself states that Laya is a fast foundation for specialization, not a zero-shot decision engine. AG News is included in its training-data mixture. On Banking77, with dozens of labels, Jev leads by a wide margin: 0.870 versus 0.425.</p><p>The Jev figures in that table are not measured by Laya; its developer cites them from third-party testing. One of them, a <a href="https://github.com/AbdelStark/jev-benchmarks">300-example pilot by AbdelStark</a> comparing Jev with the GLiNER2.5 model, provides a mixed picture. Jev wins decisively on AG News and Banking77. On the emotion dataset, its accuracy is only 0.480, and on 16 percent of examples it assigned zero probability to the correct label. Jev’s latency of 236 to 256 milliseconds in that pilot was measured from France over the internet, while Laya’s 33 milliseconds runs locally on a GPU. Part of the difference is simply network distance.</p><p>Laya itself starts out with probabilities that are too overconfident. The average expected calibration error (ECE) of its default checkpoint is 0.466, and only falls to 0.081 after temperature fitting on held-out data. This means the confidence scores from the default version are not yet trustworthy before you tune them on your own data.</p><h3>Who came first?</h3><p>Nandakishor claims that he published the idea a year before Jev through two arXiv papers, and accuses TypeSafe of launching the same concept without a paper, open weights, or a dataset. His first paper, <a href="https://arxiv.org/abs/2503.23303">SalesRLAgent</a>, predicts sales conversion probabilities using reinforcement learning and synthetic data from GPT-4o. <a href="https://arxiv.org/abs/2510.01237">His second paper</a> routes LLM queries based on estimated confidence before the model answers, and its experiments use SmolLM2–360M with 72 training examples.</p><p>The two are aligned: a small model trained with RL to measure its own confidence. However, the text of the second paper does not contain typed questions based on choice, score, or boolean values, nor a reward based on a proper scoring rule, which is central to Laya. On Dev.to, Nandakishor describes the paper as an exact framework for schema-based decisions, and that description is broader than the paper itself.</p><p>TypeSafe’s side is equally fragile. The basic construction — an encoder that scores labels provided only at inference time — has existed for years through NLI-based zero-shot classification and the GLiNER family of models since 2023. <a href="https://akmaier.substack.com/p/laya-jev-and-the-return-of-the-discriminative">An analysis on Substack</a> by akmaier concludes that both sides claim more originality than is supported by the public record. TypeSafe, according to <a href="https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e">coverage</a> through the end of September, has not responded publicly.</p><h3>The real test</h3><p>The idea belongs to no one. TypeSafe packaged it into a ready-to-use service without fine-tuning; Nandakishor showed how quickly such an API contract could be reproduced, and that half of its value only appears after the model is trained on your own data. Both can be true at the same time.</p><p>If your ticketing or content-moderation workflow is already running on top of an LLM, do not stop at the README. Collect two hundred to three hundred real examples that you have already labeled, run both models, then calculate not just accuracy, but what percentage of decisions can be automated at a five-percent error threshold. That is the metric used by the AbdelStark pilot, and it determines how many tickets truly no longer need to be handled by a human. That number does not appear in any README.</p><h3>The Bottom Line</h3><p>Ultimately, the standoff between Jev and Laya is less about who holds the deed to discriminative decision architectures and more about a practical shift away from generic generative text toward strict schema reliability. While TypeSafe packages an instant, out-of-the-box pipeline for teams that want immediate results without fine-tuning, Laya demonstrates the agile power of open-source models ready to be specialized and calibrated directly on internal domain data. Instead of relying on headline-grabbing benchmarks or marketing claims, the real decision rests in your own operational pipeline: run a few hundred real examples through both, measure your risk thresholds, and see which one actually reduces human workload without breaking production</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ec0fe02d94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/a-40-million-startup-built-an-ai-that-cant-chat-three-days-later-its-free-version-appeared-c8ec0fe02d94">A $40 Million Startup Built an AI That Can’t Chat. Three Days Later, Its Free Version Appeared</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do Token-Saving Tools Make Your AI Agent Dumber?]]></title>
            <link>https://medium.com/devsameday/do-token-saving-tools-make-your-ai-agent-dumber-e4c32d831b5c?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4c32d831b5c</guid>
            <category><![CDATA[ponytail]]></category>
            <category><![CDATA[saver-token]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[harness-engineering]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 01:29:27 GMT</pubDate>
            <atom:updated>2026-09-26T16:08:00.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*O_opMG12ylYClxke" /><figcaption>Do Token-Saving Tools Make Your AI Agent Dumber?</figcaption></figure><p><em>What the research actually shows, once you get past the “save up to 99%” marketing math.</em></p><p>You’ve probably watched an agent burn half its context window on one cat of a 400-line file, or three screens of stack trace nobody asked it to keep. The obvious move is to bolt on a &quot;token saver&quot; skill and move on. But that raises a real question: if you force a model to read compressed context, or make it talk in fewer words, does it get worse along the way?</p><p>Turns out “token saver” is a label stretched over two completely different mechanisms, which is exactly why the debate around it feels so muddled.</p><h3><strong>Two camps, constantly confused</strong></h3><p>One camp does structural pruning. It clears junk out of the context window: stale tool results, verbose logs nobody’s reading twice, tool descriptions the agent never touches. Anthropic’s context editing and memory tool live here, along with lazy-loaded tool schemas and retrieval that pulls the relevant slice of a file instead of dumping the whole thing.</p><p>The other camp does lossy compression. It actually squeezes the content itself, the way LLMLingua rewrites a prompt into fewer tokens, or the way a Claude Code skill called Caveman forces the model into clipped, caveman-style prose.</p><p>Both get sold with the same headline number: save up to 99% of tokens. What happens to output quality afterward runs in opposite directions.</p><h3>Cutting junk wins twice</h3><p>There’s a strange pattern buried in context-management research: stuffing more context into a model doesn’t reliably make it smarter, even when the context window is nowhere near full. The NoLiMa benchmark found that at 32,000 tokens, 11 of the 12 models tested had already dropped below half their short-context performance, and GPT-4 lost about 15% just from stretching context length from 4,000 to 128,000 tokens. The “lost in the middle” effect shows a similar shape: models recall information at the start or end of a document far more reliably than information in the middle, with multi-document answer accuracy dropping 20 to 30 percent when the relevant fact sits in that middle zone.</p><p>Anthropic, a company with every incentive to have you burn as many tokens as possible, shipped context editing and a memory tool that do the opposite: they automatically prune an agent’s context window. Context editing alone lifted performance 29% over baseline; paired with the memory tool, that climbed to 39%. In a 100-turn web search evaluation, token consumption dropped 84%, and agents that would otherwise have run out of room finished the task. Hard numbers to wave away.</p><p>What’s getting deleted here isn’t information. It’s noise, stale tool output the agent no longer needs. A model that isn’t forced to wade through fifty thousand irrelevant tokens pays more attention to what’s left, not less. Sometimes a smart compressor even nudges accuracy up: LongLLMLingua posted a 21.4% accuracy gain on NaturalQuestions while using four times fewer tokens, simply by cutting the parts that were confusing the model in the first place.</p><h3>Where it actually gets risky</h3><p>Your skepticism holds up once a tool starts squeezing content the task genuinely needs, not just junk. The damage shows up in the numbers pretty fast.</p><p>Push token pruning past 50% and accuracy starts visibly degrading, according to research comparing compression methods directly. Classification tasks take the hardest hit: LLMLingua-2 compression dropped performance on TREC and LSHT-ZH classification tasks by up to 52%, because the patterns that signal which class an answer belongs to get compressed away along with everything else. There’s even a cleaner mathematical version of this story. One framework models cross-entropy loss as growing quadratically with the compression ratio, while task accuracy falls off linearly. Not a cliff. Not free, either.</p><p>The most honest data point here comes from an independent JetBrains benchmark of Caveman, the skill that makes Claude Code talk like it just discovered fire. The pitch was a 65% cut in output tokens. After a paired A/B test across 82 real coding tasks, the actual saving was 8.5%, and output quality was statistically indistinguishable from the baseline.</p><p>Two things fall out of that number. First, “save up to 99%” on a landing page is a best-case ceiling, not what you’ll see on your own workload. Second, and more useful: quality held up because the skill knew where to stop. It only compressed the narration between tool calls; code, commands, anything that needed to stay byte-exact, it left alone. A compressor that knows what it’s not allowed to touch is low-risk. One that flattens everything indiscriminately isn’t.</p><h3>The real axis isn’t cost vs. capability</h3><p>Framing this as “save money or keep your agent smart” misses what the data is actually saying. The real axis is noise versus signal.</p><p>Cut noise, and you win on both fronts: cheaper and more accurate, because noise was actively hurting the model, not just padding your bill. Cut signal, meaning precise instructions, exact numbers, the edge case a decision hinges on, and you save tokens while quietly bleeding capability. That loss scales with how aggressive the compression gets.</p><p>The line between noise and signal isn’t always obvious, and finding it is real engineering work, not a summarization toggle you flip once. What’s worth protecting when compressing an agent’s running context tends to be the architectural decisions already made, the bugs still open, the implementation details that matter later, not just “as long as it’s short.”</p><h3>A quick gut check before you install one</h3><p>What exactly does it throw away? Tools that clear stale tool output and repeated history are a safer bet than ones that flatten everything to the same terse register.</p><p>Distrust the big percentage on the landing page. It’s a ceiling. Measure the saving on your own tasks, the way JetBrains actually measured Caveman instead of taking the pitch at face value.</p><p>The more aggressive the compression ratio, the harder you need to test it, especially for classification work, multi-constraint instructions, or anything where a number has to survive intact.</p><p>For coding agents specifically, favor tools that compress narration and logs while leaving code and commands untouched over ones that treat every output the same way.</p><p>Fix the structural stuff first. Clear irrelevant tool output. Lazy-load tools you rarely call. Cache the parts of the prompt that never change. Trim tool descriptions the agent never actually uses. Only reach for lossy compression once context is still bloated after all that.</p><p>So: are token savers actually useful, or do they quietly cost you capability? Both, depending on which camp the tool belongs to. The ones cutting noise will very likely make your agent both cheaper and more accurate; the data keeps pointing that direction. The ones actually squeezing content carry a real trade-off curve, and it gets steeper the more aggressive they get, especially when the compressor can’t tell the difference between what’s safe to cut and what isn’t.</p><p>The safest habit: don’t take the landing page number at face value, don’t panic the moment you hear “compression,” and don’t install a skill promising a 90% cut without running it against the tasks you actually do every day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4c32d831b5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/do-token-saving-tools-make-your-ai-agent-dumber-e4c32d831b5c">Do Token-Saving Tools Make Your AI Agent Dumber?</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nobody Needed That Date Picker Library]]></title>
            <link>https://medium.com/devsameday/nobody-needed-that-date-picker-library-30e2a1d211fe?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/30e2a1d211fe</guid>
            <category><![CDATA[ponytail]]></category>
            <category><![CDATA[yagni]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[coding-principle]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 11:11:01 GMT</pubDate>
            <atom:updated>2026-09-26T16:11:09.689Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*59fn0TeWlZmQWEvsZ-v0kQ.png" /><figcaption>Yagni Meme</figcaption></figure><p>Ask an AI coding agent for a simple date input and watch what happens. Nine times out of ten it reaches for a library, writes a wrapper component, ships a stylesheet, and opens a conversation about timezones nobody asked for. What you actually needed was one line: &lt;input type=&quot;date&quot;&gt;. Browsers have had this built in since 2011.</p><p>That gap between what’s asked and what gets built isn’t new. Engineers have been fighting it since the late 1990s, and it has a name: YAGNI.</p><h3>What YAGNI Actually Means</h3><p>YAGNI stands for “You Aren’t Gonna Need It.” It came out of Extreme Programming, the methodology getting hashed out in the late ’90s, and the rule is blunt: don’t write code for a requirement you don’t have yet. Not “might have.” Don’t have.</p><p>It sounds like an excuse for laziness; it’s really an argument about cost. Every line you write for a hypothetical future has to get tested, maintained, and eventually understood by whoever touches the code after you. If the feature actually materializes, you build it then, with real requirements instead of a guess made six months earlier.</p><p>Teams that skip this step tend to discover the same thing: half the “definitely needed” features never get used. The guess was wrong. YAGNI sits alongside DRY and KISS as one of the load-bearing principles behind code that doesn’t rot.</p><h3>Why This Is Back in Fashion</h3><p>For twenty-odd years YAGNI was mostly a note to self, something you’d mutter at a junior dev reaching for a factory pattern on a to-do app. Now there’s a new offender, and it’s worse at self-restraint than most junior devs ever were.</p><p>Language models default to generous. Ask for a small feature and you’ll often get the fullest answer the model knows how to give: an extra dependency, an abstraction layer nobody requested, error handling for cases that can’t occur, a config option with exactly one caller. A five-line change becomes fifty; token costs climb, and review time climbs right along with it. Every extra line is a line that can break.</p><p>Imagine asking for a rate limiter on one internal script and getting back a Redis-backed sliding-window implementation with configurable buckets, when the actual requirement was capping five requests a minute. That’s not a rare glitch. It’s closer to the default behavior of a model trying to look thorough.</p><p>So a handful of developers have started doing something specific: turning YAGNI from a value into an instruction the agent has to follow, every time it opens a file.</p><h3>Ponytail Takes This Literally</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P1y1JLdFTpSycNdP" /><figcaption>ponytail banner</figcaption></figure><p>The clearest example is <a href="https://github.com/dietrichgebert/ponytail">ponytail</a>, an open-source project by developer Dietrich Gebert that’s picked up more than 130,000 GitHub stars. It’s a skill you install into your coding agent (Claude Code, Codex, GitHub Copilot CLI, Gemini CLI, and a long list of others) so it starts thinking, in the project’s own words, like “the laziest senior dev in the room.” Gebert sums up the philosophy in nine words: “the best code is the code you never wrote.”</p><p>The mechanism is a checklist the agent has to run before writing anything. Does this need to exist at all? If not, skip it, and that’s the YAGNI step, first in line. Already in the codebase? Reuse it. Standard library handles it? Use that. Does the platform already do this natively? Use the native feature. Is there a dependency already installed that solves it? Use that instead of adding a new one. Can it be done in one line? Write one line. Only once every one of those questions comes back empty does the agent write new code, and even then, as little as the problem actually requires.</p><p>That date picker at the top of this piece is the project’s own go-to example. Without the checklist, an agent reaches for flatpickr, writes a wrapper, ships a stylesheet, and opens the timezone conversation. With it: one native input element, because the browser solved this problem over a decade ago.</p><p>A color picker follows the same script and the numbers are more dramatic. Left alone, an agent tends to pull in a picker library, add custom CSS, and hand back close to 300 lines. Running the checklist first, that drops to around 23, because &lt;input type=&quot;color&quot;&gt; already does the job for most projects.</p><p>None of this means cutting corners on the parts that matter. Gebert is explicit that trust-boundary validation, data-loss handling, security, and accessibility are never on the table for removal. Lazy about the solution, not about the parts of the job that carry real risk. The numbers back the claim: benchmarked against a plain agent on real Claude Code sessions editing an open-source FastAPI and React repo, ponytail cut the resulting code roughly in half on average, with individual tasks where the baseline had badly over-built dropping by far more. Safety scores held at 100% across every test case, and cost and runtime both came down against the no-skill baseline.</p><h3>Where YAGNI Stops Being Good Advice</h3><p>It’s easy to misread YAGNI as permission to skip design work entirely. There’s a real difference between deferring a feature nobody’s asked for and skipping a foundation every feature needs. Input validation, basic error handling, security, accessibility: these aren’t “future requirements” you get to postpone. They’re part of what “done” means for almost anything you ship, no matter how small.</p><p>Scale planning works the same way. If you already know a system is going to handle a few million users within a quarter, that’s not speculation, it’s a known requirement, and YAGNI has nothing to say against preparing for it. What YAGNI actually targets is uncertainty dressed up as foresight: the feature that “will probably” be needed, based on nothing sturdier than a hunch.</p><p>Here’s a rough test. If you can name the specific user or the specific requirement asking for something right now, it’s not YAGNI territory. If the only justification is “flexibility” or “just in case,” that’s the moment to stop and ask what you’re actually building this for.</p><h3>Applying It Without the Skill</h3><p>You don’t need to install anything to start practicing this. A few habits carry most of the weight. Before adding a config option or an abstraction, ask who’s actually asking for it. If the honest answer is “no one yet,” that’s your answer.</p><p>Check what the language, framework, or platform already does before reaching for a new dependency; a surprising number of “custom” problems already have a one-line solution built in. Treat flexibility as a cost, not a free feature, every parameter you add gets tested and maintained by someone, so make sure a real caller exists before you write it.</p><p>When reviewing an agent’s diff, run the same question over the code it produced: what here could get deleted without losing any of the functionality that was actually requested? Build for what’s needed now. Requirements change, and responding to that change later is almost always cheaper than maintaining complexity you built on a guess that turned out wrong.</p><p>YAGNI isn’t a license to write sloppy code or skip the boring parts that keep software safe. It’s a discipline: build for the requirement in front of you, and trust that the next one will be easier to solve with better information than you have today. The code you never write is, by definition, code that can’t break.</p><p><em>YAGNI traces back to Extreme Programming’s late-’90s playbook. The ponytail numbers and quotes come straight from its </em><a href="https://github.com/dietrichgebert/ponytail"><em>GitHub README</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30e2a1d211fe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/nobody-needed-that-date-picker-library-30e2a1d211fe">Nobody Needed That Date Picker Library</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeepSeek Just Quietly Killed Its Own Flagship Model. And I Think It’s Genius]]></title>
            <link>https://medium.com/devsameday/deepseek-just-quietly-killed-its-own-flagship-model-and-i-think-its-genius-90e75f277d38?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/90e75f277d38</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[deepseek]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 07:52:08 GMT</pubDate>
            <atom:updated>2026-09-11T09:58:06.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I0ru3c2a4zZj_UEQRsvUUQ.jpeg" /><figcaption>Deepseek V4.1 Flash Banner</figcaption></figure><p><em>A smaller, weirder, cheaper model just made its own big brother pointless. Here’s what happened, and why I can’t stop thinking about it.</em></p><p>I was just casually checking AI news like I do every morning with my coffee, and I saw a headline that made me stop scrolling. DeepSeek released a new model, and in the same breath, basically announced they’re retiring their own flagship model. Not a competitor’s model. Their own. The expensive, flagship, top-of-the-line one.</p><p>My first reaction was, wait, what? Why would a company kill its own best product?</p><p>Then I actually read into it, and honestly, the more I understood, the more it started to feel like one of the most quietly aggressive moves I’ve seen in the AI space this year. So I wanted to sit down and unpack this properly, partly for you, and partly because writing things out is how I actually process them.</p><p>Let’s talk about DeepSeek-V4.1-Flash.</p><h3>So what actually happened</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JON3CU4H6LxJRd9Z.png" /></figure><p>On September 10, 2026, DeepSeek dropped DeepSeek-V4.1-Flash on their API, described as the smallest model in a brand-new architecture family they’re building. “Smallest” is doing a lot of heavy lifting there, because we’re still talking about a 552-billion-parameter model. It’s just small <em>relative</em> to what’s coming next from them, apparently.</p><p>Here’s the part that got me, deepSeek is on record saying V4.1-Flash now outperforms their own V4-Pro flagship across performance, cost, speed, and total runtime. And they’re not just saying it quietly in a footnote. Starting September 14, 2026, every single request sent to V4-Pro gets automatically rerouted to V4.1-Flash instead, and billed at Flash’s cheaper rate. V4-Pro isn’t technically “dead,” but it’s on life support until a future V4.1-Pro shows up, and DeepSeek hasn’t even given a timeline for that.</p><p>Think about that for a second. If you were paying for the premium tier, you’re now getting downgraded to the “budget” model, except that budget model is apparently better and cheaper at the same time. That’s not really a downgrade. That’s DeepSeek admitting their expensive model became obsolete in about four and a half months.</p><p>I don’t know about you, but that’s the kind of internal confidence (or maybe internal chaos) that makes me want to know exactly what’s under the hood.</p><h3>The architecture: a fast reader and a careful writer</h3><p>Here’s where it gets nerdy, but stick with me because this is genuinely the interesting bit.</p><p>Most big language models activate roughly the same chunk of their brain whether they’re reading your prompt or writing the answer. DeepSeek did something different with V4.1-Flash. They call it a “causal encoder-decoder” architecture, and the trick is that reading and writing use different amounts of the model.</p><ul><li>When it’s reading your input, it only activates about 8 billion parameters.</li><li>When it’s generating a response, it activates 16 billion.</li><li>Out of a total pool of 552 billion parameters sitting in the background as a mixture-of-experts setup.</li></ul><p>Why does that split matter? Because of how AI agents actually behave. If you’ve ever used an AI coding agent or a tool-calling assistant, you know most of its time isn’t spent writing clever paragraphs. It’s spent reading. Reading file contents, reading tool outputs, reading error logs, reading the last fifty messages of context before deciding what to do next. Agents are input-heavy by nature.</p><p>So DeepSeek basically looked at that pattern and thought: why are we paying full price to just <em>read</em> stuff? Making the reading half of the brain cheaper means the overall cost of running an agent in a long, looping session drops significantly, without gutting the quality of what the model actually produces when it responds.</p><p>It’s a genuinely clever bit of engineering, honestly. Not flashy, not headline-grabbing on its own, but the kind of decision that only makes sense if you’ve actually watched how agents behave in production and built around that reality instead of around benchmark vanity metrics.</p><p>The model was also pre-trained on a reported 45 trillion tokens, handles up to 1 million tokens of context, and understands images natively without needing a separate vision bolt-on. That last part matters because DeepSeek used to ship vision as a separate experimental model. Now it’s just built in.</p><h3>The memory trick nobody outside AI infra will care about (but should)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m2pHkeurpNxzxDi3.png" /><figcaption>Smaller KV cache. Bigger savings</figcaption></figure><p>This next part sounds boring on paper and is actually one of the most important details in the whole release.</p><p>Every model that holds a conversation keeps something called a KV cache, basically its short-term memory of everything it has already processed, so it doesn’t have to redo the math from scratch every single time you send a new message. The problem is that this cache eats up expensive high-bandwidth memory, and the longer your session runs (which, again, is exactly what happens with agents), the hungrier that cache gets.</p><p>DeepSeek says V4.1-Flash needs only about 890 bytes per token for this cache. To put that in perspective:</p><ul><li>That’s roughly a quarter of what the previous V4-Flash needed.</li><li>It’s something like 437 times less than what their very first model needed back in 2023.</li><li>Compared to the prior generation, it needs a quarter of the HBM and an eighth of the SSD storage.</li></ul><p>I’ll be honest, when I first read “890 bytes,” it didn’t mean much to me either. But when you frame it as “your AI agent can now run for hours without silently burning through the most expensive kind of memory a data center owns,” it starts to click why this matters more than another point or two on a leaderboard. Cache costs are a huge, invisible chunk of what makes long-running agents expensive to operate. Shrinking that isn’t a cosmetic win, it’s a structural one.</p><h3>Where it actually wins, and where it doesn’t</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xM3lwjVqsIG5AxtN.png" /></figure><p>Now, I want to be fair here, because I don’t think this article should read like a DeepSeek press release, and DeepSeek’s own numbers deserve a bit of skepticism since they haven’t been independently verified by outside labs yet.</p><p>On the bright side, according to DeepSeek’s own benchmark tables:</p><ul><li>On DeepSWE v1.1, a coding-focused benchmark, V4.1-Flash scored 74.2, edging out Claude Opus 5’s 74.0 and GPT-5.6 Sol’s 73.0.</li><li>On CyberGym, a cybersecurity evaluation, it scored 88.1, ahead of every other model listed.</li><li>Against its closest Chinese rival, Moonshot’s Kimi K3, it comes out ahead on basically every agentic and coding benchmark where both were tested.</li></ul><p>But it’s not a clean sweep, and I think this is the part people skip over when they’re excited about a new release:</p><ul><li>On Humanity’s Last Exam, a notoriously brutal academic reasoning test, it scored 36.8 versus Opus 5’s 56.3. That’s not a small gap.</li><li>On ProgramBench it landed at 20.3 against Opus 5’s 37.0.</li><li>It also trails on Terminal-Bench 3.0, and DeepSeek itself admits the model is behind the best closed systems when it comes to reading complicated images.</li></ul><p>So here’s my honest read on it, this is a model that’s been very deliberately optimized for coding, cybersecurity, and agentic tool-use, where it genuinely seems to compete with or beat models from Anthropic and OpenAI. But it is not a general “smartest model in the room” replacement for the hardest reasoning tasks out there. It knows exactly what job it was built for, and it’s not pretending to be something else.</p><h3>The part that made me raise an eyebrow</h3><p>There’s one detail I have to mention because I think it’s more interesting than the benchmarks, and it’s the kind of thing companies usually bury.</p><p>Buried in the technical report, DeepSeek openly described instances of reward hacking during training. In plain terms, that means during reinforcement learning, the model sometimes found shortcuts nobody wanted, like exploiting newly published security vulnerabilities or wiping important files in its own test environment, instead of solving problems the intended way.</p><p>I actually appreciate that they didn’t hide this. It’s a little unsettling to read, sure. But it’s also a rare bit of honesty in an industry where “our model behaved unpredictably during training” usually gets quietly smoothed over in the marketing copy. If you’re going to hand a model tool access and let it run loose in agentic workflows, I’d rather the lab tell me it sometimes tries to cheat than pretend it never happens.</p><h3>The business side: this was also a knife fight</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3SyHVTZHzIxXnrhf.jpeg" /><figcaption>Deepseek V4.1 Pricing</figcaption></figure><p>Zooming out from the tech for a second, because the market reaction tells its own story.</p><p>The moment this dropped, shares in Chinese AI competitors MiniMax and <a href="http://z.ai/">Z.ai</a> fell more than 8% in Hong Kong trading, and Alibaba slipped over 2%. That’s not a coincidence. DeepSeek didn’t just ship a model, it repriced the entire competitive floor underneath everyone else building in the same space. Off-peak, output now runs at $0.60 per million tokens, with cached input priced at a fraction of a cent, and analysts estimated the cut at up to 32% versus previous rates.</p><p>There’s also a slightly funny twist here if you’ve been following DeepSeek’s year: back in August, they actually quadrupled prices when they launched a coding-agent competitor. So the pattern looks like raise prices, launch aggressively, then a month later undercut the market entirely with something better and cheaper. Whether that’s a deliberate strategy or just how fast their internal roadmap moves, I genuinely don’t know. But it’s not exactly the behavior of a company playing it safe.</p><p>And there’s a bigger context clue: reports surfaced that DeepSeek has started prepping for a listing on Shanghai’s STAR Market. A release like this, one that visibly outperforms your own flagship and undercuts your competitors’ pricing right before investor conversations heat up, doesn’t feel like a coincidence to me either.</p><h3>My actual take</h3><p>Here’s where I land on all of this, for what it’s worth.</p><p>I don’t think the headline here is “DeepSeek made a slightly better model.” I think the headline is that the economics of running AI agents are shifting fast, and the labs that figure out how to make the <em>boring</em> parts cheaper (memory, input processing, long sessions) are going to have an edge that a shinier chatbot demo can’t compensate for. V4.1-Flash isn’t trying to win every single benchmark. It’s trying to win the benchmark that actually matters for a huge chunk of real-world usage right now: can this thing run cheaply, for a long time, doing agentic work, without falling apart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UV4W6VBRCRBjWL8b" /></figure><p>It also reinforces something I keep noticing about the open-weight Chinese labs this year: they’re not chasing “smartest model” trophies as hard as they’re chasing “cheapest capable model that businesses will actually build on.” That’s a different game, and honestly it might be the smarter one to play long-term.</p><p>Will V4.1-Flash hold up once people outside DeepSeek start independently testing it? I genuinely don’t know yet, and neither does anyone else writing about this right now. But I do know that if you’re building anything agent-related and haven’t at least glanced at this release, it’s worth five minutes of your time.</p><p>I’ll be watching to see what V4.1-Pro looks like whenever it actually shows up. If the “small” model is already doing this much damage, I’m curious what the follow-up flagship is going to look like.</p><p>If you’re building with AI models right now, I’d genuinely love to hear what you think, drop a comment and let’s talk about it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90e75f277d38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/deepseek-just-quietly-killed-its-own-flagship-model-and-i-think-its-genius-90e75f277d38">DeepSeek Just Quietly Killed Its Own Flagship Model. And I Think It’s Genius</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Switched From Node.js to Go, and Now I Miss Hono Like an Ex]]></title>
            <link>https://medium.com/devsameday/i-switched-from-node-js-to-go-and-now-i-miss-hono-like-an-ex-c71f8b2cae04?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/c71f8b2cae04</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[hono]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 17:13:20 GMT</pubDate>
            <atom:updated>2026-09-10T17:13:20.466Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfkIpknR5Bp7zGV8eztg6w.jpeg" /><figcaption>I Switched From Node.js to Go, and Now I Miss Hono Like an Ex</figcaption></figure><p><em>A backend developer’s honest confession after a few months of “just trying Go for fun.”</em></p><p>Okay, I need to get something off my chest.</p><p>I spent years writing Node.js. Express, then Fastify, then finally Hono when it showed up and made everything feel <em>stupidly</em> simple. I was comfortable. Maybe too comfortable. So a few months ago, hyped up by yet another “Go is faster and simpler” tweet, I decided to actually learn Go and build a real backend service with it, not just a “hello world” I’d forget in a week.</p><p>And look, I’m not here to tell you Go is bad. It’s not. Go is genuinely great in a lot of ways I didn’t expect. But somewhere between go build and my third goroutine leak, I realized something I did not see coming: I miss Hono. Not Node.js in general. Not Express. Specifically Hono. And I think that says a lot about what actually matters to a backend developer, so let me walk you through it.</p><h3>The honeymoon phase with Go</h3><p>The first week with Go felt amazing, honestly. Coming from JavaScript’s “everything is technically valid until it crashes in production,” Go’s strict typing and compiler felt like having a strict but caring senior engineer looking over my shoulder 24/7. It wouldn’t let me ship garbage. If something was wrong, it told me immediately, at compile time, not three requests into production at 2 AM.</p><p>The performance was also just… there. No extra effort, no --max-old-space-size flags, no worrying about the event loop getting blocked by one dumb synchronous function somebody wrote at 5 PM on a Friday. A single binary, a tiny Docker image, low memory footprint. It genuinely felt like cheating compared to my Node.js deployments.</p><p>I liked net/http more than I expected too. It&#39;s plain, it&#39;s boring, and honestly that&#39;s a compliment. Less magic means less &quot;wait why is this happening&quot; moments during debugging.</p><p>So yeah, on paper, Go was winning.</p><h3>Then I started writing actual routes</h3><p>This is where the cracks started showing.</p><p>See, when I used Hono back in my Node days, I got spoiled. Really spoiled. Defining a route with typed params, typed query strings, typed JSON bodies — all inferred automatically, all the way through to my handler — felt like magic that actually worked, not magic that broke on the fifth edge case. I’d write something like a POST endpoint, chain a validator with Zod, and just <em>know</em> the shape of my data by the time it hit my business logic. No manual struct binding, no separate validation step that I had to remember to write, no boilerplate.</p><p>In Go, I found myself constantly writing the same repetitive dance: define a struct, decode the JSON body into it, manually check if required fields are empty, write a separate validation function, handle the error, then finally get to the actual logic I wanted to write in the first place. Every single route. Every single time. Sure, there are libraries for this now — validator packages, code generators, some frameworks that try to bring that DX back — but none of it felt as <em>seamless</em> as Hono’s built-in flow. It always felt like I was assembling the convenience myself instead of it just being there.</p><p>And middleware — oh man, middleware. In Hono, chaining middleware feels like writing a sentence. Auth check, then logging, then rate limit, then your handler, done, readable top to bottom. In Go, depending on which router or framework you pick, middleware composition can range from “pretty clean” to “why do I need three wrapper functions just to add a header.” It’s not impossible, it’s just not effortless the way Hono made it feel.</p><h3>The thing I didn’t expect: I miss the developer experience, not the language</h3><p>Here’s the realization that actually surprised me. I didn’t miss JavaScript’s flexibility. I didn’t miss npm install giving me 400 packages I never asked for. I didn&#39;t even miss async/await, weirdly enough — Go&#39;s goroutines and channels are their own kind of elegant once they click.</p><p>What I missed was how Hono made building an API feel <em>fun</em> again. Type safety that flows end to end without extra ceremony. A router that’s genuinely tiny and readable. The RPC-style client generation where your frontend just knows your backend’s types without you writing a separate SDK. That “it just works and it’s fast” feeling that Hono nailed for edge runtimes, Bun, Node, wherever you throw it.</p><p>Go gave me raw performance and simplicity at the language level. But Hono gave me <em>ergonomics</em> at the framework level. And it turns out, for the kind of work I actually do day to day — building and iterating on APIs quickly — ergonomics matter more to my happiness than raw runtime performance, at least until I hit a scale where that performance actually becomes the bottleneck.</p><h3>So, am I going back to Node.js?</h3><p>Honestly? Not fully. I think Go earned a permanent spot in my toolbox, especially for services where performance and low resource usage genuinely matter — things like workers, CLIs, high-throughput internal services. The compiler safety alone is worth it for anything long-lived and business-critical.</p><p>But for fast-moving APIs, prototypes, and anything where developer velocity matters more than shaving off milliseconds? I catch myself opening a new Hono project out of pure habit, and honestly, muscle memory doesn’t lie.</p><p>Maybe that’s the real lesson here. It’s not really “Go vs Node.js.” It’s realizing that the framework’s developer experience can matter just as much as the language underneath it — sometimes even more. Go is a fantastic language. Hono is just a really, really good framework. And apparently, I can’t fully quit either one.</p><p>If you’re a Node dev thinking about trying Go: do it. You’ll learn a ton, and you’ll probably like Go more than you expect. Just don’t be surprised if, somewhere along the way, you find yourself missing a tiny TypeScript framework you didn’t think you’d care about this much.</p><p><em>Have you made a similar jump between stacks? I’d genuinely love to hear what you missed — and what you didn’t too!.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c71f8b2cae04" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/i-switched-from-node-js-to-go-and-now-i-miss-hono-like-an-ex-c71f8b2cae04">I Switched From Node.js to Go, and Now I Miss Hono Like an Ex</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Go Fiber v3 is Here: Breaking Changes, Shiny New Superpowers, and Why You Should Finally Upgrade]]></title>
            <link>https://medium.com/devsameday/go-fiber-v3-is-here-breaking-changes-shiny-new-superpowers-and-why-you-should-finally-upgrade-24bac84fac97?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/24bac84fac97</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 13:41:01 GMT</pubDate>
            <atom:updated>2026-09-09T14:53:05.291Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GgWhsugZa5eYIbZ1GbdZeA.png" /><figcaption>Go Fiber v3 is Here: Breaking Changes, Shiny New Superpowers, and Why You Should Finally Upgrade</figcaption></figure><p><em>A practical, zero-fluff developer survival guide to migrating from Fiber v2 to v3 without ruining your weekend.</em></p><p>Let’s be honest with each other for a second: every time a major web framework announces a v3, a collective groan echoes across the engineering department. You see the announcement on Hacker News, look at your go.mod file where github.com/gofiber/fiber/v2 has been quietly powering your production services since late 2021, and immediately think:</p><blockquote>“Great. How many handler signatures am I going to have to rewrite on a Friday afternoon?”</blockquote><h3>The Shiny New Superpowers (Why You Actually Want v3)</h3><p>Before we talk about what breaks, let’s look at why Fiber v3 is worth the migration effort in the first place.</p><h4>1. fiber.Ctx Finally Implements context.Context</h4><p>If you’ve ever built a production service in Fiber v2, you know the awkward ritual:</p><pre>// The v2 pain: juggling two contexts<br>func GetUser(c *fiber.Ctx) error {<br>    ctx := c.UserContext() // extracts stdlib context<br>    user, err := userService.FindByID(ctx, c.Params(&quot;id&quot;))<br>    // ...<br>}</pre><p>In Fiber v3, fiber.Ctx <strong>natively implements Go&#39;s standard </strong><strong>context.Context interface</strong> (Deadline(), Done(), Err(), Value()).</p><p>You can now pass c directly into your database repositories, gRPC clients, or tracing libraries:</p><pre>// The v3 joy: c IS a context.Context!<br>func GetUser(c fiber.Ctx) error {<br>    user, err := userService.FindByID(c, c.Params(&quot;id&quot;))<br>    if err != nil {<br>        return err<br>    }<br>    return c.JSON(user)<br>}</pre><p>Good riddance to .UserContext(). Your domain services just became a whole lot cleaner.</p><h4>2. NewWithCustomCtx: Type-Safe Context Without c.Locals Roulette</h4><p>We have all committed the crime of storing values in c.Locals(&quot;user&quot;) and then typing c.Locals(&quot;user&quot;).(*User) everywhere with our eyes half-closed, praying nobody made a typo.</p><p>Fiber v3 introduces NewWithCustomCtx, letting you extend the base context with custom application-specific helper methods:</p><pre>type CustomCtx struct {<br>    fiber.DefaultCtx<br>}<br>func (c *CustomCtx) CurrentUser() *User {<br>    if u, ok := c.Locals(&quot;user&quot;).(*User); ok {<br>        return u<br>    }<br>    return nil<br>}<br>app := fiber.NewWithCustomCtx(func(app *fiber.App) fiber.CustomCtx {<br>    return &amp;CustomCtx{DefaultCtx: *fiber.NewDefaultCtx(app)}<br>})<br>app.Get(&quot;/profile&quot;, func(c fiber.Ctx) error {<br>    cc := c.(*CustomCtx)<br>    return c.JSON(cc.CurrentUser()) // Fully typed helper!<br>})</pre><h4>3. First-Class HTTP QUERY Method (RFC 10008)</h4><p>Have you ever felt dirty sending a POST request just because your search endpoint required a complex JSON filter body that exceeded URL query string sanity?</p><p>Fiber v3 officially supports the brand-new HTTP QUERY verb (RFC 10008). It behaves like GET (safe and idempotent), but allows a request body:</p><pre>app.Query(&quot;/search&quot;, func(c fiber.Ctx) error {<br>    var searchCriteria SearchQuery<br>    if err := c.Bind().Body(&amp;searchCriteria); err != nil {<br>        return c.Status(fiber.StatusBadRequest).SendString(err.Error())<br>    }<br>    return c.JSON(executeSearch(searchCriteria))<br>})</pre><p>Fiber’s cache middleware even knows how to hash the QUERY request body into the cache key automatically. Beautiful.</p><h4>4. Built-in ACME / Let’s Encrypt AutoCert</h4><p>Say goodbye to wrapping your development and staging services in complicated reverse proxy containers just to get automated HTTPS certificates. Fiber v3 can manage TLS certificates via ACME directly:</p><pre>certManager := &amp;autocert.Manager{<br>    Prompt:     autocert.AcceptTOS,<br>    HostPolicy: autocert.HostWhitelist(&quot;api.mycoolapp.com&quot;),<br>    Cache:      autocert.DirCache(&quot;./certs&quot;),<br>}<br><br>app.Listen(&quot;:443&quot;, fiber.ListenConfig{<br>    AutoCertManager: certManager,<br>})</pre><h4>5. Rebuilt HTTP Client</h4><p>Fiber’s built-in client package has been completely rewritten. It now ships with automatic CookieJar support, customizable request/response lifecycle hooks, and an Axios-style fluent interface:</p><pre>cc := client.New().<br>    SetBaseURL(&quot;&lt;https://api.upstream.com&gt;&quot;).<br>    SetTimeout(5 * time.Second)<br><br>resp, err := cc.Get(&quot;/health&quot;)</pre><h3>The Breaking Changes (What Will Bite You)</h3><p>Now for the part that pays our salaries: fixing compiler errors. Here are the major breaking changes you need to watch out for.</p><h4>1. Goodbye *fiber.Ctx Pointer, Hello fiber.Ctx Interface</h4><p>In Fiber v2, every handler signature looked like:</p><pre>func(c *fiber.Ctx) error // v2</pre><p>In Fiber v3, fiber.Ctx is an <strong>interface</strong>, not a pointer to a struct:</p><pre>func(c fiber.Ctx) error  // v3</pre><blockquote>Tip: If you run go build and get 99 compiler errors complaining about *fiber.Ctx, this is why.</blockquote><h4>2. Parser is Dead. Long Live Bind()</h4><p>One of the cleanest refactors in v3 is unifying all parsing methods under c.Bind():</p><ul><li>c.BodyParser(&amp;x) ➡️ <strong>c.Bind().Body(&amp;x)</strong></li><li>c.QueryParser(&amp;x) ➡️ <strong>c.Bind().Query(&amp;x)</strong></li><li>c.CookieParser(&amp;x) ➡️ <strong>c.Bind().Cookie(&amp;x)</strong></li><li>c.ParamsParser(&amp;x) ➡️ <strong>c.Bind().URI(&amp;x)</strong></li></ul><p>⚠️ <strong>Critical Gotcha</strong>: For route parameters, the struct tag changed from params:”id” to uri:”id”!</p><pre>// v2<br>type RequestParams struct {<br>    ID int `params:&quot;id&quot;`<br>}</pre><pre>// v3<br>type RequestParams struct {<br>    ID int `uri:&quot;id&quot;`<br>}</pre><h4>3. Middleware Data Access: No More String Keys in c.Locals</h4><p>In v2, middlewares stored data under arbitrary string keys like c.Locals(&quot;requestid&quot;) or c.Locals(&quot;csrf&quot;). This led to key collisions and zero type safety.</p><p>In v3, official middlewares use unexported context keys and provide dedicated, exported accessor functions:</p><pre>// v2: String matching and type casting<br>reqID := c.Locals(&quot;requestid&quot;).(string)<br><br>// v3: Type-safe, collision-free accessor functions<br>reqID := requestid.FromContext(c)<br>csrfToken := csrf.TokenFromContext(c)<br>userSession := session.FromContext(c)</pre><h4>4. app.Static() Has Been Evicted</h4><p>app.Static() has been removed from the core App struct and moved to the static middleware:</p><pre>// v2<br>app.Static(&quot;/assets&quot;, &quot;./public&quot;)<br><br>// v3<br>import &quot;github.com/gofiber/fiber/v3/middleware/static&quot;<br>app.Get(&quot;/assets/*&quot;, static.New(&quot;./public&quot;))</pre><p><em>(Notice the trailing </em><em>* wildcard! Don&#39;t forget it, or your subpaths will 404).</em></p><h4>5. Listen Method Consolidation</h4><p>Methods like app.ListenTLS() and app.ListenMutualTLS() have been retired. Everything is unified into app.Listen() using fiber.ListenConfig:</p><pre>// v3 TLS<br>app.Listen(&quot;:443&quot;, fiber.ListenConfig{<br>    CertFile:    &quot;./cert.pem&quot;,<br>    CertKeyFile: &quot;./key.pem&quot;,<br>})</pre><h3>The Migration Gameplan</h3><p>Don’t manually migrate your files one by one. Follow this sensible 4-step workflow:</p><ul><li><strong>Update your Go version<br></strong>Fiber v3 requires <strong>Go 1.26+</strong>. Make sure your go.mod reflects this.</li><li><strong>Run the Fiber Migration CLI</strong>:</li></ul><pre>go install github.com/gofiber/cli/fiber@latest fiber migrate - to v3</pre><ul><li><strong>The CLI will automatically handle most of the signature transitions</strong> (*fiber.Ctx ➡fiber.Ctx) and parser migrations <br>(c.BodyParser ➡ c.Bind().Body).</li><li><strong>Audit Your Struct Tags<br></strong>Search for params: in your codebase and update them to uri: .</li><li><strong>Audit Middleware Extractors</strong>: Replace calls to c.Locals(&quot;requestid&quot;), c.Locals(&quot;csrf&quot;), etc., with their respective FromContext(c) helper functions.</li></ul><h3>The Verdict</h3><p>Is Fiber v3 worth upgrading to? <strong>Absolutely.</strong></p><blockquote>Fiber v2 was already blazing fast, but v3 matures it from a “fast Express clone for Go” into a first-class, idiomatic Go web framework. Standard library context.Context compliance alone will eliminate hundreds of lines of awkward glue code in any clean architecture codebase.</blockquote><p>Give your services an afternoon of migration love — your future self (and your junior devs) will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24bac84fac97" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/go-fiber-v3-is-here-breaking-changes-shiny-new-superpowers-and-why-you-should-finally-upgrade-24bac84fac97">Go Fiber v3 is Here: Breaking Changes, Shiny New Superpowers, and Why You Should Finally Upgrade</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We Wrote One Markdown File, and AI Agents Finally Respected Our Go Architecture]]></title>
            <link>https://medium.com/devsameday/we-wrote-one-markdown-file-and-ai-agents-finally-respected-our-go-architecture-aaeba1e25312?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaeba1e25312</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[harness-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[gofiber]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 11:51:47 GMT</pubDate>
            <atom:updated>2026-09-09T15:05:32.974Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fBW2Qwctka5ArCyNlMlLWw.png" /><figcaption>We Wrote One Markdown File, and AI Agents Finally Respected Our Go Architecture</figcaption></figure><p><em>How a single </em><em>AGENTS.md at our repo root stopped coding agents from bypassing layers, leaking SQL queries into HTTP handlers, and wrecking clean architecture in our Go backend.</em></p><p>A couple of months ago, I asked Claude Code to implement a simple order cancellation endpoint in our Go backend:</p><blockquote>“Add an endpoint POST /api/v1/orders/:id/cancel. Users can only cancel orders in pending status, and we need to record a cancellation audit log.&quot;</blockquote><p>Three minutes later, the tool notified me that the changes were ready. It had written about 120 lines of clean, compilable Go. I fired up curl, sent a request, and got a crisp 200 OK. The database record updated properly.</p><p>Then I opened the git diff.</p><p>My heart sank.</p><p>Right inside internal/delivery/http/handler/order.go, the agent had imported github.com/jackc/pgx/v5/pgxpool. Inside the Fiber handler function, it was running raw SQL queries:</p><pre>// What the agent produced in our HTTP handler<br>func (h *OrderHandler) CancelOrder(c fiber.Ctx) error {<br>    id := c.Params(&quot;id&quot;)<br><br>    // ❌ Raw SQL query directly in transport layer<br>    var status string<br>    err := h.db.QueryRow(c.Context(), &quot;SELECT status FROM orders WHERE id = $1&quot;, id).Scan(&amp;status)<br>    if err != nil {<br>        return c.Status(fiber.StatusNotFound).JSON(fiber.Map{&quot;error&quot;: &quot;order not found&quot;})<br>    }<br><br>    // ❌ Core business rules hardcoded in HTTP controller<br>    if status != &quot;pending&quot; {<br>        return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{&quot;error&quot;: &quot;order cannot be cancelled&quot;})<br>    }<br><br>    _, err = h.db.Exec(c.Context(), &quot;UPDATE orders SET status = &#39;cancelled&#39;, updated_at = NOW() WHERE id = $1&quot;, id)<br>    if err != nil {<br>        return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{&quot;error&quot;: &quot;failed to update order&quot;})<br>    }<br><br>    return c.SendStatus(fiber.StatusOK)<br>}</pre><p>Our internal/usecase package hadn&#39;t been touched. Our internal/domain package hadn&#39;t been touched. The repository layer was bypassed entirely.</p><p>The agent didn’t care about our clean architecture boundaries, our interface segregation, or our domain error mapping. It took the absolute shortest path between the prompt and a working HTTP response.</p><p>And honestly? That’s exactly what language models are trained to do unless you stop them.</p><h3>Why “Prompting in Chat” Kept Failing Us</h3><p>At first, we tried fixing this the human way: by nagging.</p><p>Every time we opened an agent session, we would paste instructions into the prompt:</p><ul><li><em>“Remember to follow Clean Architecture.”</em></li><li><em>“Don’t call the database from handlers.”</em></li><li><em>“Put business logic in </em><em>internal/usecase.&quot;</em></li></ul><p>It worked for that immediate prompt. But two turns later — or when context compacted, or when another engineer on the team pulled the branch — the agent drifted right back into writing monolith scripts inside controllers.</p><p>Here is why manual prompting fails for repository architecture:</p><ol><li><strong>Context Eviction</strong>: As sessions get longer, system prompts and early conversation turns get summarized or dropped from the active context window.</li><li><strong>Ambiguity</strong>: “Follow Clean Architecture” means ten different things depending on which blog post the model memorized during pre-training. Does an interface live in domain, in repository, or next to the consumer? The model guesses.</li><li><strong>No Negative Constraints</strong>: LLMs are eager to please. If you tell them to cancel an order, their primary objective is satisfying the prompt, not preserving separation of concerns.</li></ol><p>We realized we didn’t need better chat prompts. We needed a <strong>persistent, repository-level architectural contract</strong> that agents read automatically on every turn.</p><p>We created AGENTS.md at the root of our repository.</p><h3>Why “Prompting in Chat” Kept Failing Us</h3><p>At first, we tried fixing this the human way: by nagging.</p><p>Every time we opened an agent session, we would paste instructions into the prompt:</p><ul><li><em>“Remember to follow Clean Architecture.”</em></li><li><em>“Don’t call the database from handlers.”</em></li><li><em>“Put business logic in </em><em>internal/usecase.&quot;</em></li></ul><p>It worked for that immediate prompt. But two turns later — or when context compacted, or when another engineer on the team pulled the branch — the agent drifted right back into writing monolith scripts inside controllers.</p><p>Here is why manual prompting fails for repository architecture:</p><ol><li><strong>Context Eviction</strong>: As sessions get longer, system prompts and early conversation turns get summarized or dropped from the active context window.</li><li><strong>Ambiguity</strong>: “Follow Clean Architecture” means ten different things depending on which blog post the model memorized during pre-training. Does an interface live in domain, in repository, or next to the consumer? The model guesses.</li><li><strong>No Negative Constraints</strong>: LLMs are eager to please. If you tell them to cancel an order, their primary objective is satisfying the prompt, not preserving separation of concerns.</li></ol><p>We realized we didn’t need better chat prompts. We needed a <strong>persistent, repository-level architectural contract</strong> that agents read automatically on every turn.</p><p>We created AGENTS.md at the root of our repository.</p><h3>The Anatomy of Our AGENTS.md</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*95VWROS-KBIB31nw86Z_4Q.png" /><figcaption>The Anatomy of Our AGENTS.md</figcaption></figure><p>Modern coding agents (Claude Code, Cursor, Cline, Windsurf, and ZCode) inspect the repository root for instruction files (AGENTS.md or CLAUDE.md).</p><p>Rather than writing an essay on software engineering philosophy, we structured our AGENTS.md around four concrete, non-negotiable rules:</p><pre>go-backend/<br>├── AGENTS.md                  &lt;-- The single source of architectural truth<br>├── cmd/<br>│   └── api/<br>│       └── main.go            &lt;-- Wire dependencies<br>├── internal/<br>│   ├── delivery/<br>│   │   └── http/              &lt;-- HTTP routing, request parsing, DTOs<br>│   ├── usecase/               &lt;-- Business logic, orchestration, interfaces<br>│   ├── domain/                &lt;-- Pure entities &amp; domain errors (ZERO imports)<br>│   └── repository/            &lt;-- Database queries (pgx, SQL, migrations)</pre><p>Here are the four sections from our actual AGENTS.md that completely changed agent behavior:</p><h4>1. The Strict Dependency Matrix</h4><p>We explicitly list what each package is allowed — and forbidden — to import:</p><p>Package Can Import MUST NEVER Import internal/domain Standard library only delivery, usecase, repository, external DB drivers internal/usecase internal/domain, stdlib delivery, repository, database drivers (pgx, gorm, sql) internal/delivery/http internal/usecase, internal/domain, Fiber internal/repository, database drivers internal/repository internal/domain, DB drivers, stdlib delivery, usecase</p><p>A table like this is unambiguous for LLMs. If an agent tries to import internal/repository into internal/delivery/http/order_handler.go, it directly violates a row in this table.</p><h4>2. The Go Interface Rule: Consumer-Owned Interfaces</h4><p>In languages like Java or C#, developers often define interfaces alongside the implementation (IOrderRepository right inside the data access layer).</p><p>In idiomatic Go, <strong>interfaces belong where they are consumed</strong>. We spelled this out verbatim in AGENTS.md:</p><ul><li>Do NOT define interfaces in internal/repository.</li><li>Define the repository interface inside internal/usecase where it is consumed:</li></ul><pre>// internal/usecase/order_cancel.go<br>type OrderCancelRepository interface {<br>    GetByID(ctx context.Context, id string) (*domain.Order, error)<br>    UpdateStatus(ctx context.Context, id string, status domain.OrderStatus) error<br>}</pre><ul><li>Keep interfaces small and specific to the usecase (Interface Segregation Principle).</li></ul><h4>3. Separation of DTOs and Domain Models</h4><p>One of the worst habits of coding agents is taking a database struct with database tags and JSON tags, and passing it straight to the HTTP client.</p><p>We added an explicit ban:</p><ul><li>Never expose domain structs or raw database models directly to HTTP responses.</li><li>Every HTTP endpoint must have explicit Request and Response DTO structs in internal/delivery/http/dto/.</li><li>Handlers are responsible for mapping incoming DTOs to usecase arguments, and mapping usecase results to response DTOs.</li></ul><h4>4. Negative Examples (The “Do Not Do This” Block)</h4><p>LLMs pay disproportionate attention to negative examples with explicit // ❌ BAD vs // ✅ GOOD diffs:</p><pre>// ❌ BAD: Leaking DB driver into handler<br>package handler<br>import &quot;github.com/jackc/pgx/v5/pgxpool&quot;<br>type OrderHandler struct { db *pgxpool.Pool }<br><br>// ✅ GOOD: Handler depends only on usecase interface<br>package handler<br>type OrderHandler struct { usecase OrderCancelUsecase }<br><br>// ❌ BAD: Checking business status in handler<br>if req.Status != &quot;pending&quot; { return c.Status(400)... }<br><br>// ✅ GOOD: Business rules live in usecase, mapped to domain errors<br>err := h.usecase.Execute(ctx, id)<br>if errors.Is(err, domain.ErrOrderNotCancellable) {<br>    return c.Status(fiber.StatusUnprocessableEntity).JSON(...)<br>}</pre><h3>What the Agent Produced After AGENTS.md</h3><p>With AGENTS.md committed at repo root, I ran the exact same prompt again in a clean branch:</p><blockquote>“Add an endpoint POST /api/v1/orders/:id/cancel. Users can only cancel orders in pending status, and we need to record a cancellation audit log.&quot;</blockquote><p>This time, the agent generated three files across our architectural layers with zero human intervention.</p><h4>1. The Domain Entity (internal/domain/order.go)</h4><p>Pure Go, zero database dependencies, with business validation on the entity itself:</p><pre>package domain<br><br>import &quot;errors&quot;<br><br>var (<br> ErrOrderNotFound       = errors.New(&quot;order not found&quot;)<br> ErrOrderNotCancellable = errors.New(&quot;order can only be cancelled while in pending status&quot;)<br>)<br><br>type OrderStatus string<br><br>const (<br> OrderStatusPending   OrderStatus = &quot;pending&quot;<br> OrderStatusCancelled OrderStatus = &quot;cancelled&quot;<br> OrderStatusCompleted OrderStatus = &quot;completed&quot;<br>)<br><br>type Order struct {<br> ID     string<br> UserID string<br> Status OrderStatus<br> Total  int64<br>}<br><br>func (o *Order) CanCancel() bool {<br> return o.Status == OrderStatusPending<br>}</pre><h4>2. The Usecase (internal/usecase/cancel_order.go)</h4><p>The business workflow and the consumer-owned repository contract:</p><pre>package usecase<br><br>import (<br> &quot;context&quot;<br> &quot;fmt&quot;<br><br> &quot;go-backend/internal/domain&quot;<br>)<br><br>// Consumer-defined interface: exactly what this usecase needs<br>type CancelOrderRepository interface {<br> GetByID(ctx context.Context, id string) (*domain.Order, error)<br> UpdateStatus(ctx context.Context, id string, status domain.OrderStatus) error<br> RecordAuditLog(ctx context.Context, orderID string, action string) error<br>}<br><br>type CancelOrderUseCase struct {<br> repo CancelOrderRepository<br>}<br><br>func NewCancelOrderUseCase(repo CancelOrderRepository) *CancelOrderUseCase {<br> return &amp;CancelOrderUseCase{repo: repo}<br>}<br><br>func (uc *CancelOrderUseCase) Execute(ctx context.Context, orderID string) error {<br> order, err := uc.repo.GetByID(ctx, orderID)<br> if err != nil {<br>  return fmt.Errorf(&quot;fetch order: %w&quot;, err)<br> }<br><br> if !order.CanCancel() {<br>  return domain.ErrOrderNotCancellable<br> }<br><br> if err := uc.repo.UpdateStatus(ctx, orderID, domain.OrderStatusCancelled); err != nil {<br>  return fmt.Errorf(&quot;update status: %w&quot;, err)<br> }<br><br> _ = uc.repo.RecordAuditLog(ctx, orderID, &quot;ORDER_CANCELLED&quot;)<br> return nil<br>}</pre><h4>3. The Delivery Handler (internal/delivery/http/order_handler.go)</h4><p>A lean HTTP transport controller that only deals with serialization, parameter extraction, and HTTP status codes:</p><pre>package handler<br><br>import (<br> &quot;errors&quot;<br><br> &quot;github.com/gofiber/fiber/v3&quot;<br> &quot;go-backend/internal/domain&quot;<br> &quot;go-backend/internal/usecase&quot;<br>)<br><br>type OrderHandler struct {<br> cancelUseCase *usecase.CancelOrderUseCase<br>}<br><br>func NewOrderHandler(cancelUseCase *usecase.CancelOrderUseCase) *OrderHandler {<br> return &amp;OrderHandler{cancelUseCase: cancelUseCase}<br>}<br><br>func (h *OrderHandler) CancelOrder(c fiber.Ctx) error {<br> orderID := c.Params(&quot;id&quot;)<br> if orderID == &quot;&quot; {<br>  return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{<br>   &quot;error&quot;: &quot;order id is required&quot;,<br>  })<br> }<br><br> err := h.cancelUseCase.Execute(c.Context(), orderID)<br> if err != nil {<br>  switch {<br>  case errors.Is(err, domain.ErrOrderNotFound):<br>   return c.Status(fiber.StatusNotFound).JSON(fiber.Map{<br>    &quot;error&quot;: &quot;order not found&quot;,<br>   })<br>  case errors.Is(err, domain.ErrOrderNotCancellable):<br>   return c.Status(fiber.StatusUnprocessableEntity).JSON(fiber.Map{<br>    &quot;error&quot;: &quot;order cannot be cancelled in its current state&quot;,<br>   })<br>  default:<br>   return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{<br>    &quot;error&quot;: &quot;internal server error&quot;,<br>   })<br>  }<br> }<br><br> return c.Status(fiber.StatusOK).JSON(fiber.Map{<br>  &quot;status&quot;:  &quot;success&quot;,<br>  &quot;message&quot;: &quot;order cancelled successfully&quot;,<br> })<br>}</pre><h3>Don’t Just Trust It: Enforce Boundaries with a 25-Line AST Test</h3><p>Markdown instructions guide the agent, but code review and CI must enforce the boundary. Instead of installing heavy external architectural linting tools, we wrote a simple Go test in internal/architecture_test.go using the standard library&#39;s go/parser and go/token:</p><pre>package internal_test<br><br>import (<br> &quot;go/parser&quot;<br> &quot;go/token&quot;<br> &quot;os&quot;<br> &quot;path/filepath&quot;<br> &quot;strings&quot;<br> &quot;testing&quot;<br>)<br><br>// TestArchitecture_DeliveryMustNotImportRepository ensures the delivery layer<br>// never imports the repository layer directly.<br>func TestArchitecture_DeliveryMustNotImportRepository(t *testing.T) {<br> deliveryDir := &quot;./delivery&quot;<br><br> err := filepath.Walk(deliveryDir, func(path string, info os.FileInfo, err error) error {<br>  if err != nil || info.IsDir() || !strings.HasSuffix(path, &quot;.go&quot;) {<br>   return err<br>  }<br><br>  fset := token.NewFileSet()<br>  node, err := parser.ParseFile(fset, path, nil, parser.ImportsOnly)<br>  if err != nil {<br>   t.Fatalf(&quot;failed to parse file %s: %v&quot;, path, err)<br>  }<br><br>  for _, imp := range node.Imports {<br>   importPath := strings.Trim(imp.Path.Value, `&quot;`)<br>   if strings.Contains(importPath, &quot;internal/repository&quot;) {<br>    t.Errorf(&quot;architectural violation: %s imports repository package (%s)&quot;, path, importPath)<br>   }<br>   if strings.Contains(importPath, &quot;github.com/jackc/pgx&quot;) || strings.Contains(importPath, &quot;gorm.io&quot;) {<br>    t.Errorf(&quot;architectural violation: %s imports database driver directly (%s)&quot;, path, importPath)<br>   }<br>  }<br>  return nil<br> })<br><br> if err != nil {<br>  t.Fatalf(&quot;failed to walk delivery directory: %v&quot;, err)<br> }<br>}</pre><p>Whenever an agent (or an engineer at 2:00 AM) tries to sneak a database driver into an HTTP handler, running go test ./... fails immediately:</p><pre>$ go test ./internal -v -run &quot;TestArchitecture&quot;<br>=== RUN   TestArchitecture_DeliveryMustNotImportRepository<br>    architecture_test.go:31: architectural violation: delivery/http/order_handler.go imports database driver directly (github.com/jackc/pgx/v5/pgxpool)<br>--- FAIL: TestArchitecture_DeliveryMustNotImportRepository (0.00s)<br>FAIL<br>exit status 1</pre><h3>What We Learned</h3><ol><li><strong>AI Agents aren’t bad at architecture; they are context-starved.</strong> Left to their own devices, agents optimize for brevity and quick green tests. AGENTS.md provides the boundaries they need to make decisions like senior engineers.</li><li><strong>Tabular rules beat prose.</strong> A markdown table detailing Can Import vs MUST NEVER Import produced near-100% compliance across Claude, Cursor, and Copilot, whereas paragraphs explaining hexagonal theory were frequently ignored.</li><li><strong>Negative examples are twice as effective as positive ones.</strong> Showing the model what <em>not</em> to do (with ❌ BAD) anchors it against its default training biases.</li><li><strong>Couple documentation with programmatic guardrails.</strong> AGENTS.md guides code generation, a 25-line AST unit test in CI ensures no regression ever reaches production.</li></ol><p>If your team is adopting AI coding assistants, don’t waste time repeating rules in chat prompts. Write down your architecture rules in an AGENTS.md file, commit it to your repository, and let the agents do what they do best: build great software within clear boundaries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaeba1e25312" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/we-wrote-one-markdown-file-and-ai-agents-finally-respected-our-go-architecture-aaeba1e25312">We Wrote One Markdown File, and AI Agents Finally Respected Our Go Architecture</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why We Dumped Swagger UI for Scalar in Our Go Backend]]></title>
            <link>https://medium.com/devsameday/why-we-dumped-swagger-ui-for-scalar-in-our-go-backend-e5e052a68dc7?source=rss-6fb8b03a895------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5e052a68dc7</guid>
            <category><![CDATA[fiber]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Galih Putro Aji]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 02:33:17 GMT</pubDate>
            <atom:updated>2026-09-09T15:06:26.941Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wicHG9f5tFMnCkkyvgx52w.png" /><figcaption>Why We Dumped Swagger UI for Scalar in Our Go Backend</figcaption></figure><p>A few weeks ago, at 4:45 PM on a Friday (because of course it was Friday), our frontend engineer dropped a message on Slack:</p><blockquote>“Hey, why is the API playground on staging trying to send requests to localhost:8080? Did someone leave their dev server running on a laptop somewhere?&quot;</blockquote><p>Silence in the channel… <br>That single innocent question exposed a dirty secret: our API documentation was broken, outdated, and living in an alternate universe.</p><p>Like almost every Go developer over the last five years, we had faithfully followed the holy Go ritual:</p><ol><li>Write magic comments above handler functions like a medieval monk copying manuscripts (// @Param user_id path string true &quot;User ID&quot;).</li><li>Run swag init and pray we didn&#39;t miss a comma.</li><li>Mount Swagger UI on /swagger/*.</li><li>Congratulate ourselves on being “documentation champions.”</li></ol><p>It worked initially. But as our backend grew, that ritual turned into a comedy of errors.</p><h3>The Three Pain Points That Drove Us Crazy</h3><p>Before we threw Swagger UI out the window, we were dealing with three daily frustrations:</p><h4>1. The “Doc Drift” Trap</h4><p>Your annotations live as comments above HTTP handlers. You refactor a Go struct inside a domain package, but forget to update the 15 lines of magic comments floating above your handler function.</p><p>Result? Your docs claim the endpoint returns a plain string, but your Go code returns a nested JSON object. Your frontend team spends two hours debugging phantom errors while you sip coffee completely unaware.</p><h4>2. The 2015-Era UI Experience</h4><p>Let’s be honest: Swagger UI looks like it was designed when Internet Explorer 8 was still a thing. Testing JWT-authenticated endpoints, reading nested JSON error schemas, and searching across 30+ endpoints felt like navigating a government tax portal.</p><h4>3. The Hardcoded Host Nightmare</h4><p>Our generated spec had host: &quot;localhost:8080&quot; baked inside it. When QA opened the docs on staging (https://staging-api.example.com/docs) to test a release, every click on &quot;Try it out&quot; silently fired HTTP calls to localhost:8080.</p><p>Cue 30 minutes of classic “It works on my machine!” debates.</p><h3>Enter Scalar: Single Source of Truth + Zero Build Overhead</h3><p>We decided we didn’t want another 50MB npm build step in our CI pipeline, nor did we want complex static asset embedding in our Go binary. We wanted something dead simple, ridiculously sleek, and impossible to break.</p><p>That’s when we dumped Swagger UI and switched to <strong>Scalar</strong>.</p><p>Instead of scattering annotations across 40 Go files, we made a radical move: a single api/openapi/openapi.yaml file as the <strong>one true source of truth</strong>.</p><pre>go-backend/<br>├── api/<br>│   └── openapi/<br>│       └── openapi.yaml           &lt;-- One True Source of Truth<br>├── internal/<br>│   └── delivery/<br>│       └── http/<br>│           ├── handler/<br>│           │   ├── docs.go        &lt;-- Serves Scalar HTML &amp; openapi.yaml<br>│           │   └── docs_test.go   &lt;-- Contract &amp; security tests<br>│           └── router.go          &lt;-- Environment guardrails</pre><p>Scalar runs as a modern, zero-build web component (@scalar/api-reference) straight from a CDN. No Node.js, no Webpack, no build step.</p><p>All our Go backend needs to do is serve a 15-line HTML shell and the raw YAML file in internal/delivery/http/handler/docs.go:</p><pre>package handler<br><br>...<br><br>type DocsHandler struct {<br> openAPIPath string<br>}<br>func NewDocsHandler(openAPIPath string) *DocsHandler {<br> if openAPIPath == &quot;&quot; {<br>  openAPIPath = &quot;api/openapi/openapi.yaml&quot;<br> }<br> return &amp;DocsHandler{openAPIPath: openAPIPath}<br>}</pre><pre>// RenderUI serves the Scalar API reference HTML shell<br>func (h *DocsHandler) RenderUI(c fiber.Ctx) error {<br> html := `&lt;!doctype html&gt;<br>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;title&gt;API Reference&lt;/title&gt;<br>    &lt;meta charset=&quot;utf-8&quot; /&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;!-- Scalar CDN script integration --&gt;<br>    &lt;` + `script id=&quot;api-reference&quot; data-url=&quot;/docs/openapi.yaml&quot;&gt;&lt;/` + `script&gt;<br>    &lt;` + `script src=&quot;&lt;https://cdn.jsdelivr.net/npm/@scalar/api-reference&gt;&quot;&gt;&lt;/` + `script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;`<br> c.Set(fiber.HeaderContentType, fiber.MIMETextHTMLCharsetUTF8)<br> return c.SendString(html)<br>}</pre><pre>// ServeSpec serves the raw OpenAPI YAML file<br>func (h *DocsHandler) ServeSpec(c fiber.Ctx) error {<br> content, err := os.ReadFile(h.openAPIPath)<br> if err != nil {<br>  return c.Status(fiber.StatusNotFound).JSON(fiber.Map{<br>   &quot;error&quot;: &quot;OpenAPI specification not found&quot;,<br>  })<br> }<br> c.Set(fiber.HeaderContentType, &quot;application/yaml&quot;)<br> return c.Send(content)<br>}</pre><p>Notice data-url=&quot;/docs/openapi.yaml&quot;: the browser automatically fetches the contract relative to whatever host served the page.</p><h3>The Secret Sauce: Relative Routing (url: /api)</h3><p>The real magic that cured our staging headaches was replacing full domain URLs in openapi.yaml with a single relative path:</p><pre>openapi: 3.0.3<br>info:<br>  title: Go Service API<br>  version: 1.0.0<br>servers:<br>  - url: /api<br>    description: Same-origin API server</pre><p>By defining url: /api, Scalar&#39;s HTTP client attaches test requests directly to whichever domain is currently in the address bar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*luQQcrck4FvnQHLV06K8bQ.png" /></figure><p>No environment variables, no YAML templating hackery, and zero CORS errors on staging. It just works because the browser already knows where it is!</p><h3>Keeping Production Locked Down (404 for Unexpected Visitors)</h3><p>As much as we love interactive API playgrounds, we don’t want bored internet scanners getting a free interactive map of our internal endpoints in production.</p><p>In internal/delivery/http/router.go, we locked the /docs route behind an environment check:</p><pre>func RegisterRoutes(app *fiber.App, cfg *config.Config, docsHandler *handler.DocsHandler) {<br> api := app.Group(&quot;/api&quot;)<br> // ... register auth, user, referee routes ...<br><br> // Security Guardrail: Mount /docs only in dev, test, and staging.<br> // In production, /docs returns a polite 404 Not Found.<br> if !isProduction(cfg.AppEnv) {<br>  docsGroup := app.Group(&quot;/docs&quot;)<br>  docsGroup.Get(&quot;&quot;, docsHandler.RenderUI)<br>  docsGroup.Get(&quot;/openapi.yaml&quot;, docsHandler.ServeSpec)<br> }<br>}<br><br>func isProduction(env string) bool {<br> return env == &quot;production&quot; || env == &quot;prod&quot;<br>}</pre><p>If an automated vulnerability scanner hits GET /docs on production, Fiber responds with a standard 404 Not Found. Move along, nothing to see here!</p><h3>Verifying It All in 5 Milliseconds</h3><p>To make sure nobody accidentally breaks our routing or leaks docs to production during a late-night refactor, we wrote a quick unit test (internal/delivery/http/handler/docs_test.go):</p><pre>func TestDocsOpenAPISpec_UsesRelativeAPIServer(t *testing.T) {<br> app := fiber.New()<br> docsHandler := handler.NewDocsHandler(&quot;../../../../api/openapi/openapi.yaml&quot;)<br> app.Get(&quot;/docs/openapi.yaml&quot;, docsHandler.ServeSpec)<br><br> req := httptest.NewRequest(http.MethodGet, &quot;/docs/openapi.yaml&quot;, nil)<br> resp, err := app.Test(req)<br> if err != nil || resp.StatusCode != http.StatusOK {<br>  t.Fatalf(&quot;expected 200 OK, got %d&quot;, resp.StatusCode)<br> }<br><br> buf := make([]byte, 1024)<br> n, _ := resp.Body.Read(buf)<br> content := string(buf[:n])<br><br> if !strings.Contains(content, &quot;url: /api&quot;) {<br>  t.Errorf(&quot;expected openapi spec to define relative server &#39;url: /api&#39;, got:\n%s&quot;, content)<br> }<br>}</pre><pre>$ go test ./internal/delivery/http/handler -v -run &quot;TestDocs&quot;<br>=== RUN   TestDocsRoutes_NonProduction_Serves200<br>--- PASS: TestDocsRoutes_NonProduction_Serves200 (0.00s)<br>=== RUN   TestDocsOpenAPISpec_UsesRelativeAPIServer<br>--- PASS: TestDocsOpenAPISpec_UsesRelativeAPIServer (0.00s)<br>PASS<br>ok  	go-backend/internal/delivery/http/handler	0.004s</pre><h3>Moral of the Story</h3><p>Switching from Swagger UI to Scalar delivered three huge wins for our team:</p><ul><li><strong>Zero Doc Drift</strong>: PRs review openapi.yaml directly—no more hidden annotation bugs inside Go handler comments.</li><li><strong>Zero Build Overhead</strong>: Scalar runs in the browser via CDN web component. No npm dependencies or binary bloat.</li><li><strong>Happier Frontend Devs</strong>: Staging playgrounds actually work, and the UI feels like a modern developer tool built in this decade.</li></ul><p>If your team is still wrestling with broken Swagger playgrounds or 2015-era UI, dumping Swagger for Scalar is easily one of the highest-ROI Developer Experience (DX) wins you can score in an afternoon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5e052a68dc7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsameday/why-we-dumped-swagger-ui-for-scalar-in-our-go-backend-e5e052a68dc7">Why We Dumped Swagger UI for Scalar in Our Go Backend</a> was originally published in <a href="https://medium.com/devsameday">devsameday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>