<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged prompt-engineering</title>
<link>https://coderlegion.com/tag/prompt-engineering</link>
<description>Powered by Question2Answer</description>
<item>
<title>Keep the settings next to your AI video prompt</title>
<link>https://coderlegion.com/32650/keep-the-settings-next-to-your-ai-video-prompt</link>
<description>&lt;p&gt;Saving an AI video prompt without its settings is a bit like keeping a command but losing the arguments. You can remember the idea and still have trouble repeating the experiment.&lt;/p&gt;
&lt;p&gt;For a small comparison, keep a record like this alongside each exported clip:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;take&quot;: &quot;crossing-01&quot;,
  &quot;input_mode&quot;: &quot;text-to-video&quot;,
  &quot;prompt&quot;: &quot;A cyclist waits at a crossing and turns toward the traffic light. Fixed camera, overcast daylight.&quot;,
  &quot;aspect_ratio&quot;: &quot;16:9&quot;,
  &quot;duration_seconds&quot;: 5,
  &quot;change_from_previous_take&quot;: &quot;baseline&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is an example notebook entry, not an API request. Add the model label and output resolution shown by your generator. For image-to-video, record which reference image you used. If a seed is available, save that too; do not assume every service exposes one.&lt;/p&gt;
&lt;p&gt;For the next take, change one item and describe the change in a sentence. If you change the reference image, prompt and clip length together, a better result will not tell you which decision helped.&lt;/p&gt;
&lt;p&gt;It also helps to decide what you are checking before you generate. In the cyclist example, that could be whether the head turn happens, the bicycle keeps its shape and the camera remains still. Keep failures as well as favorites. A folder containing only the best clips hides how much variation there was.&lt;/p&gt;
&lt;p&gt;I help with promotion for &lt;a rel=&quot;nofollow&quot; href=&quot;https://wan-3.pro/&quot;&gt;Wan3&lt;/a&gt;, an independent video-generation site. This is a suggested way to organize prompt experiments, not a benchmark of its outputs. A plain text file next to each video is enough to get started.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/32650/keep-the-settings-next-to-your-ai-video-prompt</guid>
<pubDate>Tue, 27 Oct 2026 07:59:32 +0000</pubDate>
</item>
<item>
<title>How Adobe Firefly and Copilot Taught Me to Prompt for Code (Part 1)</title>
<link>https://coderlegion.com/31633/how-adobe-firefly-and-copilot-taught-me-to-prompt-for-code-part-1</link>
<description>&lt;p&gt;Every time the topic of AI comes up in developer spaces, the conversation usually splits into two extremes: people who claim AI takes &quot;zero effort&quot; because you just type a sentence and get a finished product, and people who dismiss prompting as a soft, non-technical skill that has nothing to do with &quot;real&quot; engineering.&lt;/p&gt;
&lt;p&gt;Anyone who has actually spent hours trying to force a foundation model to produce a specific, non-generic output knows that both takes are wrong.&lt;/p&gt;
&lt;p&gt;My goal wasn't to generate random fantasy landscapes or stock avatars. I wanted to recreate my dog—an American Pit Bull Terrier (APBT)—across distinct visual styles so I could design a clean, accurate brand logo. To do that, I set two strict rules for myself:&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;1.&lt;/strong&gt; &lt;strong&gt;Only Native Firefly&lt;/strong&gt;: I refused to jump to third-party models when things got difficult; I committed exclusively to the native Adobe Firefly model (working through Firefly Image 3 and 4, long before conversational in-canvas editing existed).&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;2. Only My Own Photos&lt;/strong&gt;: I never used stock presets or random internet pictures. Every single generation was fed exclusively with my own photographs of my dog.&lt;/p&gt;
&lt;p&gt;That self-imposed constraint turned into a masterclass in fighting statistical bias, understanding parameter pipelines, and sanitizing noisy inputs. Looking back, the exact workflow I had to build to get Firefly to respect canine anatomy is the same mental model required to get an LLM to write production-ready code.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Note: This is the first part of a multi-part series exploring how creative AI workflows translate directly into software engineering and systems architecture.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15746578785841454019&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;my dog for reference
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.behance.net/gallery/226055205/Morgan-Vega?platform=direct&quot;&gt;Behance Project: Morgan &quot;Vega&quot;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;fighting-the-default-weight-why-lazy-prompts-fail-&quot;&gt;Fighting the &quot;Default Weight&quot; (Why Lazy Prompts Fail)&lt;/h3&gt;
&lt;p&gt;When I started experimenting with Firefly in 2024 and locked into a heavy daily workflow in 2025, I quickly hit a wall. If you type &quot;pitbull&quot; into an image model by itself, you do not get an accurate American Pit Bull Terrier.&lt;/p&gt;
&lt;p&gt;Because public stock datasets suffer from massive tag pollution—where people tag Mastiff crosses, Cane Corsos, American Bullies, and random block-headed mixes under the same umbrella term—the model’s latent space defaults to two extremes: either an exaggerated, short-legged caricature or a generic Labrador-mastiff hybrid with mushy features.&lt;/p&gt;
&lt;p&gt;Because I refused to switch to another generator, I had to learn how to override Firefly's statistical baseline using my own reference photos, active human feedback (RLHF), and structured parameter control.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Engineering Parallel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;LLMs do the exact same thing with code. If you give a coding model a lazy prompt like &quot;build an API endpoint to process user data,&quot; its weights will pull straight toward the internet's most common, bloated, and outdated tutorials. To override the statistical default, you cannot rely on umbrella terms. You have to provide a structural blueprint and specify exact boundaries.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-firefly-actually-works-parameter-pipelines-amp-edge-copilot&quot;&gt;How Firefly Actually Works: Parameter Pipelines &amp;amp; Edge Copilot&lt;/h3&gt;
&lt;p&gt;Most people who haven't used Adobe Firefly assume it works like a simple chat box. In reality, Firefly’s interface is a structured parameter pipeline that separates geometry, style, and text tokens into distinct control layers.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=7167573050077163068&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12213989863353670922&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Instead of relying on a single text prompt to do everything, Firefly breaks generation down into specific modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;General &amp;amp; Content Settings&lt;/strong&gt;: Choosing the base model (&lt;em&gt;Firefly Image 3 / 4&lt;/em&gt;), locking the &lt;em&gt;Aspect ratio&lt;/em&gt;, switching &lt;em&gt;Content type&lt;/em&gt; between &lt;em&gt;Photo&lt;/em&gt; and &lt;em&gt;Art&lt;/em&gt;, and dialing the &lt;em&gt;Visual intensity&lt;/em&gt; slider.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Composition Reference (Structure)&lt;/strong&gt;: This is where I uploaded my own photos of my dog. Under the hood, Firefly uses this slot for edge detection and depth mapping, forcing the new generation to follow the physical geometry of the uploaded photo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Style Reference &amp;amp; Effects Taxonomy:&lt;/strong&gt; Rather than guessing random adjectives, Firefly categorizes visual weights into structured buckets—&lt;em&gt;Movements&lt;/em&gt;, &lt;em&gt;Themes&lt;/em&gt;, &lt;em&gt;Techniques&lt;/em&gt;, &lt;em&gt;Effects&lt;/em&gt;, &lt;em&gt;Materials&lt;/em&gt;, and &lt;em&gt;Concepts&lt;/em&gt; (such as &lt;em&gt;Minimalism&lt;/em&gt;, &lt;em&gt;Flat design&lt;/em&gt;, &lt;em&gt;Anime&lt;/em&gt;, or Doodle drawing), alongside explicit dropdowns for &lt;em&gt;Color and tone&lt;/em&gt;, &lt;em&gt;Lighting&lt;/em&gt;, and &lt;em&gt;Camera angle&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To master this setup, I realized I needed to understand what all those art movements and techniques actually meant, and how Firefly's text parser expected them to be combined with my reference uploads.&lt;/p&gt;
&lt;p&gt;I opened &lt;strong&gt;Copilot in the Edge browser&lt;/strong&gt; and used it as my domain tutor and syntax compiler:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning the Art Taxonomy:&lt;/strong&gt; I used Copilot to learn the technical differences between the styles available in Firefly—what separates a digital painting from continuous-contour linework, cross-hatched doodle styles, manga ink, or flat vector color blocking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compiling Firefly-Specific Prompts&lt;/strong&gt;: Firefly didn't want chatty paragraphs; it wanted clean, comma-separated tokens that complemented the sidebar parameters. When the model kept cropping or distorting lower limbs, I used Copilot to help refine explicit anatomical and positional tokens (like &lt;em&gt;standing and showing his legs&lt;/em&gt;) that worked with my uploaded Composition Reference.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14283121917887204311&quot; alt=&quot;&quot;&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.adobe.com/community/gallery/assets/75b0745c-b6e3-44a7-a2f4-26aa011cc19a&quot;&gt;Adobe Gallery&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=17280446436872332353&quot; alt=&quot;&quot;&gt;&lt;br&gt;
(&lt;code&gt;an American Pit Bull Terrier, black, standing, in a simple background, digital painting&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;One of my early experiments feeding my dog's photo into this pipeline was hand-picked by Adobe to be featured in the official &lt;strong&gt;Adobe Firefly Gallery&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you look at the prompt on that featured gallery card—&lt;code&gt;an American Pit Bull Terrier, black, standing, in a simple background, digital painting&lt;/code&gt;—a casual viewer might assume it took zero effort. What they don't see is how the pipeline worked together: because I fed my own photograph into the Composition Reference slot and gave continuous feedback on anatomically accurate runs, my photo carried the morphological constraints (the exact rose/half-pricked ears, the lean chest, the straight front assembly). That allowed the text prompt to stay surgical and declarative.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Engineering Parallel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompting complex systems is configuration and technical specification. When your underlying architecture is solid—when your Pydantic schemas, type definitions, and structural interfaces are already passed into the system's parameters—you don't need to write a 500-word conversational essay begging the AI not to hallucinate. Your prompt can be a clean, concise instruction because the structural reference is already doing the heavy lifting.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-pre-editing-experiments-diagnosing-cross-attention-bleed&quot;&gt;The Pre-Editing Experiments: Diagnosing Cross-Attention Bleed&lt;/h3&gt;
&lt;p&gt;Even with Firefly's Composition Reference locking my dog's anatomy in place, pushing my raw photos across radically different art styles before in-canvas editing existed exposed a major flaw in how diffusion models read reference images.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=16697791684709526287&quot; alt=&quot;&quot;&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Manga drawing style of an American Pit Bull Terrier, black. 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5702403718989328462&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=17990835431187139384&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; American Pit Bull Terrier, solid black, doodle style
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=6760457221779585084&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; American pit bull terrier, solid black, standing and showing his legs, doodle style 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2369913449814901055&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;American pit bull terrier, solid black, standing and showing his legs, cartoon style
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=262291669817531290&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;black american pit bull terrier standing 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Looking across these early runs—all generated from my own photos—you can see two things happening at once:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What Worked (Morphological Locking)&lt;/strong&gt;: Whether I pushed the engine toward stark white-on-black ink, clean &lt;em&gt;doodle style&lt;/em&gt; linework, &lt;em&gt;manga drawing style&lt;/em&gt;, or &lt;em&gt;cartoon style&lt;/em&gt; pop art, my dog's core anatomy, ear carriage, and muscle tone stayed true to my photos.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Where the Noise Leaked In (Environmental Contamination)&lt;/strong&gt;: Look closely at the backgrounds. Because Firefly's Composition Reference evaluates the entire uploaded image, it couldn't tell where my dog ended and the backyard began. In the manga generation, a metal pole and patio clutter from my original photo bled straight into the illustration. In the walking side-profiles, the model spent half its attention rendering the wooden deck planks and walls. And in the sketch and dark stencil, background shadows confused the style weights into hallucinating fake artist signatures and floating geometric shapes in the negative space.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;input-sanitization-the-1-1-cutout-breakthrough&quot;&gt;Input Sanitization: The 1:1 Cutout Breakthrough&lt;/h3&gt;
&lt;p&gt;Diagnosing why those background artifacts were happening led to my biggest workflow breakthrough: I started completely removing the background from my dog's photos and standardizing the canvas to a 1:1 square before uploading them into Firefly's Composition Reference&lt;/p&gt;
&lt;p&gt;Suddenly, every generation locked in without environmental bleed. Why?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Eliminating Cross-Attention Contamination:&lt;/strong&gt; In a raw outdoor photo, 60% of the pixels are grass, fences, poles, and shadows. The model’s attention layers try to apply your &lt;em&gt;Effects&lt;/em&gt; and &lt;em&gt;Styles&lt;/em&gt; across all that background noise at once. Stripping the background zeroed out those competing tokens, forcing 100% of the feature extraction onto the dog's silhouette.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unambiguous Edge Maps:&lt;/strong&gt; Isolating the subject gave Firefly's &lt;em&gt;Composition Reference&lt;/em&gt; algorithm a stark, vector-clean perimeter to color and shade within—instantly eliminating the hallucinated signatures and floating background scribbles.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native Latent Geometry:&lt;/strong&gt; Setting the input cutout and Firefly's &lt;em&gt;Aspect ratio&lt;/em&gt; parameter to a centered 1:1 square aligned with the native geometry of diffusion grids, eliminating compositional drift and giving me the exact, isolated character assets I needed to composite my final brand logo by hand.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;The Engineering Parallel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Garbage context in, garbage code out. Those metal poles and fake signatures in my early dog drawings are the exact visual equivalent of what happens when a developer dumps an entire cluttered repository, unformatted stack traces, and five unrelated files into an LLM context window and says &quot;my code is a mess, fix it.&quot;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-takeaway-and-what-s-next-in-this-series-&quot;&gt;The Takeaway (And What's Next in This Series)&lt;/h3&gt;
&lt;p&gt;For a long time, I fell into the trap of thinking that being &quot;good at prompting&quot; didn't count as a real technical skill. We are conditioned to believe that unless we are suffering through manual boilerplate or memorizing every flag from scratch, we are somehow taking a shortcut.&lt;/p&gt;
&lt;p&gt;But refusing to take the easy route—sticking exclusively to the Firefly model, feeding it only my own photography, using Edge Copilot to master art taxonomy and syntax, diagnosing attention bleed across dozens of test runs, and engineering a clean 1:1 preprocessing pipeline—taught me what prompting actually is. Whether you are steering a diffusion model away from tag-polluted training data or directing a coding agent through a production refactor, the core discipline is the same: systems thinking.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Coming up next in this series:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the next post, I’ll be sharing my full Behance project, where I break down the complete visual archive of my Firefly attempts—showing the direct before-and-after impact of the 1:1 cutout pipeline—and how I took those isolated AI assets into Photoshop to composite and finish the final brand logo. Stay tuned!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31633/how-adobe-firefly-and-copilot-taught-me-to-prompt-for-code-part-1</guid>
<pubDate>Sun, 18 Oct 2026 17:06:01 +0000</pubDate>
</item>
<item>
<title>How to Plan AI Videos from Text and Images: A Practical Workflow with Flow AI Video</title>
<link>https://coderlegion.com/27783/how-to-plan-ai-videos-from-text-and-images-a-practical-workflow-with-flow-ai-video</link>
<description>&lt;p&gt;A short AI-generated clip can be useful in a landing-page concept, a storyboard, or a social post. The difficult part is not typing a long prompt. It is defining a shot that can be evaluated, choosing suitable inputs, and deciding whether the output actually works in motion.&lt;/p&gt;
&lt;p&gt;This guide describes a practical workflow using &lt;a rel=&quot;nofollow&quot; href=&quot;https://flowaivideo.org/&quot;&gt;Flow AI Video&lt;/a&gt; as the browser-based example. It is a planning and quality-control guide, not a benchmark or a claim that every generation will succeed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclosure:&lt;/strong&gt; I am affiliated with this website. It is independently operated, not Google's official Flow website. Account access and generation credits are required; available models, costs, and output settings can change.&lt;/p&gt;
&lt;p&gt;Website: &lt;a rel=&quot;nofollow&quot; href=&quot;https://flowaivideo.org/&quot;&gt;https://flowaivideo.org/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-should-you-decide-before-generating-an-ai-video-&quot;&gt;What Should You Decide Before Generating an AI Video?&lt;/h3&gt;
&lt;p&gt;Start with the destination rather than the model selector. A vertical mobile clip and a landscape website banner need different framing. Decide which subject matters, where that subject should sit, and how much empty space you need for text added later in an editor.&lt;/p&gt;
&lt;p&gt;Write a one-sentence brief: &quot;A landscape product teaser showing a ceramic cup on a desk, with a slow camera move and room for a headline on the left.&quot; This is specific enough to judge. &quot;An amazing cinematic advertisement&quot; is not: almost any attractive frame could satisfy it while failing your actual layout.&lt;/p&gt;
&lt;p&gt;Also decide what must not change. For a product concept, those constraints might include its shape and color. For a character shot, they might include clothing and identity. AI outputs can alter these details, so treat them as review criteria rather than guarantees.&lt;/p&gt;
&lt;h3 id=&quot;text-to-video-vs-image-to-video-which-should-you-use-&quot;&gt;Text-to-Video vs Image-to-Video: Which Should You Use?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Text-to-video&lt;/strong&gt; is useful when you are exploring a scene that does not yet exist. You describe the subject, environment, movement, and composition. The tradeoff is that the model must invent more of the scene, including details you might care about but did not specify.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Image-to-video&lt;/strong&gt; is useful when you already have an authorized photograph, illustration, or approved concept frame. It supplies a visual starting point, but it does not lock every pixel. Objects may change shape during motion, and an image containing small lettering can become harder to read.&lt;/p&gt;
&lt;p&gt;The current website also exposes a reference-to-video option. Check that mode's actual input requirements before using it; support can depend on the selected model. Do not assume all modes offer identical duration, resolution, or reference controls.&lt;/p&gt;
&lt;h3 id=&quot;how-to-write-a-prompt-you-can-actually-test&quot;&gt;How to Write a Prompt You Can Actually Test&lt;/h3&gt;
&lt;p&gt;For a first attempt, use one subject, one action, and one camera instruction. Add lighting and composition only where they help explain the shot.&lt;/p&gt;
&lt;p&gt;Example planning prompt:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;A matte ceramic cup on a wooden desk beside a window. Soft morning light. A slow, steady camera push toward the cup. Keep the cup fully visible, with open space on the left. No added lettering.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is an illustrative prompt, not a description of a tested output. Its advantage is that failures are easy to identify: the camera could move too much, the cup could deform, or the composition could leave no room for copy.&lt;/p&gt;
&lt;p&gt;Avoid beginning with multiple scene changes, elaborate hand interactions, readable typography, and fast camera movement in the same request. When a complex result fails, you will not know which instruction caused the problem. Establish a simpler baseline, then add one requirement at a time.&lt;/p&gt;
&lt;h3 id=&quot;how-to-generate-a-first-draft-in-the-browser&quot;&gt;How to Generate a First Draft in the Browser&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open the generator and choose text-to-video or image-to-video according to your starting material.&lt;/li&gt;
&lt;li&gt;If using an image, choose an original or licensed source with the subject clearly visible. Avoid uploading private client assets without approval.&lt;/li&gt;
&lt;li&gt;Select an available model and inspect its current controls. At the time of this walkthrough, the displayed generator included aspect-ratio, quality, and duration choices, but those choices are model-dependent.&lt;/li&gt;
&lt;li&gt;Enter the prompt and check the displayed credit cost before submitting. A longer or higher-resolution attempt is not automatically a better test.&lt;/li&gt;
&lt;li&gt;Generate a draft, preserve the prompt and settings, and review the result before spending credits on another version.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Keep a small experiment log containing input filename, prompt, model, settings, and a short review note. For example: &quot;good framing; cup handle changes halfway through.&quot; This makes iteration more useful than repeatedly pressing Generate without recording what changed.&lt;/p&gt;
&lt;h3 id=&quot;why-can-a-good-first-frame-still-produce-a-bad-clip-&quot;&gt;Why Can a Good First Frame Still Produce a Bad Clip?&lt;/h3&gt;
&lt;p&gt;A still image hides temporal problems. A clip may look convincing at the start but develop flickering edges, drifting textures, changing object proportions, or implausible motion later. Those errors matter even if a thumbnail looks polished.&lt;/p&gt;
&lt;p&gt;Watch the entire clip at normal speed, then replay difficult moments. Inspect product outlines, hands, reflections, faces, and background geometry. Check the final frame as carefully as the first. If audio is included by the selected workflow, review it independently rather than assuming visual quality implies usable sound.&lt;/p&gt;
&lt;p&gt;For a landing page, also review the clip with the intended headline and crop. A shot can be attractive but unusable because its moving subject crosses the text area. That is a composition problem, not necessarily a generation-quality problem.&lt;/p&gt;
&lt;h3 id=&quot;how-to-improve-a-failed-result-without-changing-everything&quot;&gt;How to Improve a Failed Result Without Changing Everything&lt;/h3&gt;
&lt;p&gt;Change the smallest relevant part of the request. If movement is unstable, try a calmer action or camera move. If the scene is too busy, remove competing objects. If visual identity matters, consider whether an authorized reference image provides a better starting point than text alone.&lt;/p&gt;
&lt;p&gt;Do not interpret a single successful clip as proof of reliability across all subjects. Review each final output. For product marketing, avoid presenting generated features or movements as evidence of a real product capability.&lt;/p&gt;
&lt;p&gt;When testing the &lt;a rel=&quot;nofollow&quot; href=&quot;https://flowaivideo.org/&quot;&gt;Flow AI video generator&lt;/a&gt;, compare iterations against the same brief. The useful question is not &quot;Which version is the most spectacular?&quot; It is &quot;Which version communicates the intended idea with the fewest distracting errors?&quot;&lt;/p&gt;
&lt;h3 id=&quot;frequently-asked-questions&quot;&gt;Frequently Asked Questions&lt;/h3&gt;
&lt;h4 id=&quot;does-a-higher-resolution-guarantee-a-more-accurate-video-&quot;&gt;Does a higher resolution guarantee a more accurate video?&lt;/h4&gt;
&lt;p&gt;No. Resolution describes the output dimensions, not correctness of motion, anatomy, or object identity. Evaluate those properties separately. Use the actual settings available for your chosen model rather than assuming every output supports the same maximum resolution.&lt;/p&gt;
&lt;h4 id=&quot;should-i-generate-text-inside-the-video-&quot;&gt;Should I generate text inside the video?&lt;/h4&gt;
&lt;p&gt;If exact wording is important, a more controllable workflow is to add captions, prices, and calls to action afterward in a video editor. This also makes localization and later updates easier.&lt;/p&gt;
&lt;h4 id=&quot;can-i-publish-any-generated-clip-commercially-&quot;&gt;Can I publish any generated clip commercially?&lt;/h4&gt;
&lt;p&gt;Check the service terms, selected model's conditions, and rights to your inputs. Generation alone does not resolve copyright, trademark, likeness, or client-approval questions.&lt;/p&gt;
&lt;h3 id=&quot;a-final-delivery-checklist&quot;&gt;A Final Delivery Checklist&lt;/h3&gt;
&lt;p&gt;Before using a clip, confirm the intended aspect ratio, review the full motion, check that important details remain consistent, and test the downloaded file in its destination. Keep the source image and prompt alongside the approved export. A repeatable review process is more valuable than a collection of untraceable generations.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/27783/how-to-plan-ai-videos-from-text-and-images-a-practical-workflow-with-flow-ai-video</guid>
<pubDate>Sun, 20 Sep 2026 05:17:37 +0000</pubDate>
</item>
<item>
<title>Prompting Is Dead. Long Live Graphs.</title>
<link>https://coderlegion.com/27695/prompting-is-dead-long-live-graphs</link>
<description>&lt;p&gt;AI engineering renames itself every six weeks. Underneath the funeral, something real is happening and it's not what the eulogy says.&lt;/p&gt;
&lt;p&gt;There’s a clip going around, an Anthropic lead in an interview, saying, roughly, that we don’t prompt models any more, we build the loops and now the graphs that do, and that in a few months prompts will be a thing of the past.&lt;/p&gt;
&lt;p&gt;Predictably, the timeline heard: prompting is dead. Courses were announced by Sunday.&lt;/p&gt;
&lt;p&gt;Now, before we go further: the sentiment is real and it’s coming from real people. Claude Code’s creator Boris Cherny said “I don’t prompt Claude anymore,” his job is to write the loops that do. That’s the origin of “loop engineering,” a name Addy Osmani popularized on June 7. Loop engineering then enjoyed exactly six weeks of fame before Peter Steinberger asked on X, “Are we still talking loops or did we shift to graphs yet?” and Hamel Husain filed the obituary within hours: Loop Engineering Is Dead. Enter Graph Engineering.&lt;/p&gt;
&lt;p&gt;Six weeks. Some yogurts last longer.&lt;/p&gt;
&lt;p&gt;So I’m not here to argue with the practice; the practice is right. I’m here to argue with the verb replaced, because it hides the one insight that actually matters, and because “prompting is dead” is going to make a lot of people build the wrong thing.&lt;/p&gt;
&lt;p&gt;Nothing died. Everything got wrapped.&lt;br&gt;
Line up the “dead” disciplines and look at what each one actually controls. Prompt engineering: the words you send. Context engineering: everything the model sees. Harness engineering: the code around the model, tools, files, state, errors. Loop engineering: the cycle that drives one agent toward a goal. Graph engineering: who runs when, and who checks whom, across many agents.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2715355157783057176&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Not one of these replaced the one before it. Each wraps it. A graph is made of loops. Each loop needs a harness. Every harness call is a context problem. Every context contains prompts. Nobody stopped writing prompts; the prompt just got promoted from thing a human types to thing the system types, at the right node, with the right state. Saying prompts are dead because we build graphs is like saying sentences are dead because we invented paragraphs.&lt;/p&gt;
&lt;p&gt;What “died” is the career: sitting there typing clever instructions by hand. Fine. That was always a job description with a countdown timer on it.&lt;/p&gt;
&lt;p&gt;A loop is a one-node graph, and that’s the whole reveal&lt;br&gt;
Here’s the mechanical fact that makes the loop-vs-graph war slightly ridiculous. A loop is: find the next piece of work, plan, act, check the result, continue or stop. Draw that on a whiteboard. It’s a single node with one edge pointing back at itself.&lt;/p&gt;
&lt;p&gt;Congratulations. You’ve been doing graph engineering. Just with a very small graph.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3613016058292397013&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The graph shows up the moment your task grows a second goal. A launch needs research, copy, code, legal review, approval. A code change needs analysis, implementation, security review, tests, release. You can build a loop for each. But someone has to connect them: which can run in parallel, which model does which step, who verifies whom, where the human veto sits. That connective tissue was always there, hidden in someone’s head or someone’s bash script. Graph engineering just means drawing it, and then treating it as a first-class thing you design, test, and version.&lt;/p&gt;
&lt;p&gt;Graphs don’t replace loops. They connect and govern them.&lt;/p&gt;
&lt;p&gt;That’s it. That’s the whole discipline. Everything else is nodes, edges, and state — which, as any grey-haired engineer will tell you while pointing at a workflow engine from 2013, is not exactly a fresh idea.&lt;/p&gt;
&lt;p&gt;Okay, so what actually changed?&lt;br&gt;
If the structure isn’t new, why does it feel new? Because the nodes changed. In a 2013 workflow engine, a node followed rules. Now a node interprets its task. And that one difference forces a decision every agent builder eventually hits the hard way: who decides what runs next?&lt;/p&gt;
&lt;p&gt;Early agents let the model decide everything: which tool, what’s next, whether to stop, all mid-flight, all in one context window. It looks wonderfully general in a demo. In production it produces wonderfully general ways to fail: agents looping needlessly, skipping business logic, losing state, drowning their own context in tool output.&lt;/p&gt;
&lt;p&gt;The pattern converging across the industry now is the opposite split. Google made it explicit with ADK 2.0: code controls predictable routing, models handle steps needing judgment. Anthropic’s version is Claude Code’s dynamic workflows, where Claude writes a small JavaScript orchestration script that coordinates parallel subagents, so the model spends far fewer tokens repeatedly deciding what to do next.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=17468880985197485174&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Read that as a rule and it’s clean: edges are code, nodes are model. Routing is boring and should be deterministic. Judgment is expensive and should be spent only where interpretation is actually needed. Every “graph engineering” tutorial that skips this rule is just spaghetti with better naming.&lt;/p&gt;
&lt;p&gt;Two more things the graph makes visible that the loop hides. First, state: a loop keeps it in the context window, which is why long loops get amnesia; a graph forces state to be explicit and shared. Second, checking: a loop tends to check itself, which is like marking your own exam; a graph lets you add an independent verifier node, and, crucially, a loop that watches the metric your optimizing loop is chasing. An optimization loop without a checking loop becomes very good at producing the wrong result, and it produces it with tremendous confidence.&lt;/p&gt;
&lt;p&gt;Loop vs graph, honestly, on every axis&lt;br&gt;
Since the clip promised “differences from all aspects,” here’s the whole thing on one card.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=13384858697060472618&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Notice the failure-mode row. Loops fail by running forever or lying to themselves. Graphs fail differently: you draw a beautiful box-and-arrow diagram and discover you have carefully documented a traffic jam. Neither is free. The graph just moves your bugs from “invisible and in the model’s head” to “visible and in your architecture,” which is a trade I’ll take every time, but it is a trade.&lt;/p&gt;
&lt;p&gt;Fine print, because the timeline skipped it&lt;br&gt;
Three things Turing Post flagged that deserve amplifying. “Graph” now means four different things: a control graph (what runs next), a knowledge graph (GraphRAG, entities and relations), an execution trace (what happened in one run), and an improvement graph (loops auditing loops). People are stapling all four together in the same viral post. The stats are borrowed: the “18% more accurate, 85% cheaper” figure that toured the internet came from a GraphRAG paper on industrial engineering diagrams, a narrow result promoted to a general law. And Anthropic has not announced a discipline called graph engineering. It ships coded orchestration and five composable agent patterns from its “Building Effective Agents” guide, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, which, if you draw them, are a line, a branch, a fan-out, a hub, and a loop. Graph engineering is the label. Those are the mechanism.&lt;/p&gt;
&lt;p&gt;Do you actually need one?&lt;br&gt;
The most useful sentence in this whole discourse is also the least retweeted: most agents still don’t need a graph. One model, one tool loop, a good stopping condition covers an enormous amount of real work, and every graph framework you add brings state management, routing logic, and new places to break.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3431700043626783299&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;So the efficient way to use all this, architect hat on: start with a loop; you’ll be surprised how far it goes. Add a graph the moment you have real parallelism, a need for an independent verifier, or a human who must approve something consequential. When you do, put routing in code and judgment in the model, make state explicit, and give every loop a stop condition and a budget, because “when the test passes” is a stop condition and “when it feels done” is a séance. Hand-roll it first, in Claude Code or a plain script; lift it into a framework only when the shape stabilizes.&lt;/p&gt;
&lt;p&gt;And when someone tells you graph engineering improved accuracy by 18%, ask three questions: which kind of graph, compared to what, and where did the number come from. That eliminates a surprising amount of graph engineering.&lt;/p&gt;
&lt;p&gt;Someone has already proposed “metagraph engineering,” because the internet remains undefeated. The name will change again by autumn. The problem won’t: how to split work, control execution, check claims independently, preserve state, and keep humans in charge of the decisions that should stay theirs.&lt;/p&gt;
&lt;p&gt;Prompts aren’t dead. They just stopped being the thing you type and became the thing your system types.&lt;/p&gt;
&lt;p&gt;You didn’t lose a skill. You got promoted.&lt;/p&gt;
&lt;p&gt;-Hardik&lt;/p&gt;
&lt;p&gt;buymeacoffee.com/HardikGoel&lt;/p&gt;
&lt;p&gt;I’ve spent about two decades building data and AI systems, and I’ve watched roughly nine “revolutionary” orchestration paradigms turn out to be nodes, edges, and state with a new logo. This one has real substance under the rename, which is rarer than it sounds. I write about AI’s mechanics, its hype cycles, and its remarkably short-lived funerals. Subscribe. Loop engineering would have wanted it that way.&lt;/p&gt;
&lt;p&gt;Sources / further reading: Turing Post, “Is Graph Engineering Real?” (Ksenia Se, July 20, 2026), the best-sourced fact-check of the whole cycle, including the four meanings of “graph” and the borrowed 18%/85% figures. Addy Osmani, “Loop Engineering” (June 7, 2026). Peter Steinberger’s and Hamel Husain’s posts of July 18. Anthropic, “Building Effective Agents” (2024) and Claude Code’s dynamic workflows documentation. Google’s ADK 2.0 announcement on code-controlled routing. Louis Bouchard, “Graph Engineering vs Loop Engineering,” and MarkTechPost’s three-layer explainer (July 29). Note: I couldn’t access the specific interview clip that prompted this piece, so where I paraphrase the Anthropic lead, I’m relying on their published statements and the primary sources above rather than the clip’s framing; if the clip says something sharper, the primary sources still stand.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/27695/prompting-is-dead-long-live-graphs</guid>
<pubDate>Sat, 19 Sep 2026 06:03:05 +0000</pubDate>
</item>
<item>
<title>Your AI Visibility Score May Be Wrong: A Reproducible Testing Protocol</title>
<link>https://coderlegion.com/26904/your-ai-visibility-score-may-be-wrong-a-reproducible-testing-protocol</link>
<description>&lt;p&gt;&lt;strong&gt;By Jarno Saarimies, Founder of AEOvara.&lt;/strong&gt; This is Part 3 of the series &lt;em&gt;How to Build a Repeatable AI Search Visibility Benchmark&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Ask ChatGPT the same commercial question twice and you may get two different shortlists. Change “best” to “most reliable,” and the shortlist may change again. Run the prompt in a continuing conversation, in another country, or after a model update, and you may no longer be measuring the same system.&lt;/p&gt;
&lt;p&gt;That creates an awkward problem for AI visibility reporting: a dashboard can show a precise score even when the experiment behind it is not precise.&lt;/p&gt;
&lt;p&gt;This does not make AI visibility measurement useless. It means the score must be treated as an estimate produced by a documented test—not as an objective ranking retrieved from a fixed index.&lt;/p&gt;
&lt;p&gt;In Parts 1 and 2 of this series, I explained how to build a prompt corpus and track mentions, citations, competitors, and answer quality. This article addresses the harder question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When is a change in AI visibility evidence, and when is it only measurement noise?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The answer requires more than repeating prompts. You need to control the test environment, preserve the raw evidence, quantify uncertainty, and separate effects that dashboards often collapse into one number.&lt;/p&gt;
&lt;h3 id=&quot;first-identify-what-actually-changed&quot;&gt;First, identify what actually changed&lt;/h3&gt;
&lt;p&gt;Suppose your mention rate rises from 30% to 40%. At least three different things could have produced that result.&lt;/p&gt;
&lt;h4 id=&quot;1-the-brand-changed&quot;&gt;1. The brand changed&lt;/h4&gt;
&lt;p&gt;You published new evidence, earned independent coverage, corrected an entity description, improved a relevant page, or became more widely discussed. This is the effect an AEO or GEO programme is trying to measure.&lt;/p&gt;
&lt;h4 id=&quot;2-the-engine-changed&quot;&gt;2. The engine changed&lt;/h4&gt;
&lt;p&gt;The provider released a new model snapshot, changed retrieval behaviour, refreshed an index, altered citation rules, or modified the product. OpenAI explicitly states that model outputs are variable and that prompting behaviour can change between model snapshots. For API applications, it recommends pinned model versions and evals when consistency matters.&lt;/p&gt;
&lt;p&gt;Consumer AI products rarely give researchers complete control over those variables. A visible product name such as “ChatGPT” is not a permanent experimental condition.&lt;/p&gt;
&lt;h4 id=&quot;3-the-sample-changed&quot;&gt;3. The sample changed&lt;/h4&gt;
&lt;p&gt;The wording, session history, location, language, login state, retrieval mode, time, or number of repetitions changed. Even if the website and model stayed untouched, the measured score could move.&lt;/p&gt;
&lt;p&gt;If your log cannot distinguish these explanations, it cannot support a causal claim such as “our optimization increased AI visibility by 10%.” It can only say that the observed answers changed.&lt;/p&gt;
&lt;p&gt;That distinction sounds cautious. It is also what makes the result credible.&lt;/p&gt;
&lt;h3 id=&quot;a-prompt-is-not-a-keyword&quot;&gt;A prompt is not a keyword&lt;/h3&gt;
&lt;p&gt;Traditional rank tracking usually observes a defined query, location, device, and search engine. AI prompts carry more semantic degrees of freedom.&lt;/p&gt;
&lt;p&gt;Consider these questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are the best technical SEO consultancies for a Finnish SME?&lt;/li&gt;
&lt;li&gt;Which technical SEO consultancy is most reliable for a small Finnish company?&lt;/li&gt;
&lt;li&gt;Who can help a Finnish business become visible in AI-generated answers?&lt;/li&gt;
&lt;li&gt;Recommend an affordable Finnish specialist in SEO and AI search optimization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They occupy the same commercial neighbourhood, but they are not interchangeable samples. “Best,” “reliable,” “affordable,” and “AI search optimization” introduce different selection criteria.&lt;/p&gt;
&lt;p&gt;A 2026 controlled study by Jan Ehrlinspiel, Malte Landwehr, and Tomek Rudzki examined 37,804 responses across five AI answer engines. It found that prompt format and archetype can shift visibility baselines, with the clearest sensitivity appearing in unbranded, middle-funnel commercial prompts. The authors are affiliated with Peec AI, so that commercial relationship should be disclosed, but the methodological lesson is useful: one wording cannot represent an entire buyer intent.&lt;/p&gt;
&lt;p&gt;Freezing a prompt list is therefore necessary, but not sufficient. A frozen list gives you repeatability for those exact prompts. It does not prove that the list represents the full market.&lt;/p&gt;
&lt;h3 id=&quot;use-prompt-families-not-a-bag-of-convenient-questions&quot;&gt;Use prompt families, not a bag of convenient questions&lt;/h3&gt;
&lt;p&gt;A stronger benchmark separates two layers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Core prompts&lt;/strong&gt; remain unchanged so trends can be compared over time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt variants&lt;/strong&gt; test whether the result survives realistic changes in wording.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For each buyer intent, write one core prompt and two or three variants before checking which version favours your brand. This prevents an easy form of unconscious cherry-picking: keeping the wording that produces the most flattering result.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Buyer intent &lt;/th&gt;&lt;th&gt;Core prompt &lt;/th&gt;&lt;th&gt;Controlled variants&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Category discovery &lt;/td&gt;&lt;td&gt;What are the best AEO agencies in Finland? &lt;/td&gt;&lt;td&gt;most reliable; established; suitable for SMEs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Problem solving &lt;/td&gt;&lt;td&gt;How can a Finnish SME improve visibility in AI answers? &lt;/td&gt;&lt;td&gt;get cited by ChatGPT; appear in AI search; improve generative search visibility&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Supplier selection &lt;/td&gt;&lt;td&gt;Who should I hire for an AI visibility audit in Finland? &lt;/td&gt;&lt;td&gt;independent specialist; consultancy; local expert&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Do not average branded questions such as “What is AEOvara?” into the same score as unbranded discovery questions. A branded prompt measures recognition and description accuracy. An unbranded prompt measures discovery. Combining them can make a weak discovery result look healthy.&lt;/p&gt;
&lt;h3 id=&quot;record-the-test-environment-like-an-experiment&quot;&gt;Record the test environment like an experiment&lt;/h3&gt;
&lt;p&gt;Every observation should include enough metadata for another person to understand what was tested:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;exact prompt text;&lt;/li&gt;
&lt;li&gt;platform and visible product mode;&lt;/li&gt;
&lt;li&gt;model identifier, when exposed;&lt;/li&gt;
&lt;li&gt;web search or grounding status, when exposed;&lt;/li&gt;
&lt;li&gt;date, time, language, and country;&lt;/li&gt;
&lt;li&gt;signed-in or signed-out state;&lt;/li&gt;
&lt;li&gt;clean session or continuing conversation;&lt;/li&gt;
&lt;li&gt;personalization or memory state, when known;&lt;/li&gt;
&lt;li&gt;repetition number;&lt;/li&gt;
&lt;li&gt;full answer and cited URLs;&lt;/li&gt;
&lt;li&gt;scorer name or scoring-rule version.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;“ChatGPT, September” is not adequate provenance. Neither is a cropped screenshot that hides the prompt, date, citations, and product mode.&lt;/p&gt;
&lt;p&gt;API-based monitoring improves control, but it creates a different test. An API model with a pinned snapshot and explicit search configuration is not necessarily equivalent to the consumer interface used by customers. Report API observations as API observations. Do not quietly label them “what users see in ChatGPT.”&lt;/p&gt;
&lt;h3 id=&quot;measure-a-rate-and-show-its-uncertainty&quot;&gt;Measure a rate—and show its uncertainty&lt;/h3&gt;
&lt;p&gt;If a brand appears in 3 of 5 runs, the observed mention rate is 60%. That does not mean the true probability of a mention is known to be 60%.&lt;/p&gt;
&lt;p&gt;With only five binary observations, a 95% Wilson confidence interval is approximately &lt;strong&gt;23% to 88%&lt;/strong&gt;. The interval is wide because the sample is small.&lt;/p&gt;
&lt;p&gt;If the brand appears in 30 of 50 comparable runs, the observed rate is still 60%, but the corresponding interval narrows to approximately &lt;strong&gt;46% to 72%&lt;/strong&gt;. More observations have not changed the headline percentage; they have changed how much confidence we should place in it.&lt;/p&gt;
&lt;p&gt;For a binary mention metric:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mention rate = mentions / comparable runs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Report the numerator and denominator—not just the percentage:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ChatGPT web search: 12/20 mentions, 60%
95% Wilson interval: approximately 39%–78%
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The interval is not decoration. It helps prevent claims that the evidence cannot support.&lt;/p&gt;
&lt;p&gt;If period A is 6/20 and period B is 8/20, the dashboard has moved from 30% to 40%. But with samples that small, the difference may be ordinary variation. Call it an observed increase, not a confirmed improvement.&lt;/p&gt;
&lt;h3 id=&quot;do-not-use-one-noise-budget-for-every-metric&quot;&gt;Do not use one noise budget for every metric&lt;/h3&gt;
&lt;p&gt;Mention, citation, prominence, sentiment, and factual accuracy behave differently.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mention&lt;/strong&gt; is binary and relatively easy to score.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Citation&lt;/strong&gt; requires a link or source reference and should be stored at URL level.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prominence&lt;/strong&gt; depends on an explicit rule: first named, top three, recommended, or merely included.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sentiment&lt;/strong&gt; is a classification judgement and is usually noisier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accuracy&lt;/strong&gt; must be checked against a dated source of truth.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A 2026 production-data paper on GEO measurement reported that sentiment was 6.7 times noisier than mention in its dataset. That is one vendor’s observational result, not a universal constant, but it illustrates why a single blended “AI visibility score” can hide more than it reveals.&lt;/p&gt;
&lt;p&gt;Publish the components separately. A brand can have a rising mention rate while its citation rate falls or its description becomes inaccurate. Those are materially different outcomes.&lt;/p&gt;
&lt;h3 id=&quot;establish-a-noise-floor-before-claiming-a-win&quot;&gt;Establish a noise floor before claiming a win&lt;/h3&gt;
&lt;p&gt;Before changing the site, run the unchanged benchmark over several measurement windows. This creates a baseline for natural movement.&lt;/p&gt;
&lt;p&gt;Then document the intervention:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;page or entity changed;&lt;/li&gt;
&lt;li&gt;exact publication time;&lt;/li&gt;
&lt;li&gt;URLs affected;&lt;/li&gt;
&lt;li&gt;intended prompt family;&lt;/li&gt;
&lt;li&gt;no other known campaign, migration, or major PR event;&lt;/li&gt;
&lt;li&gt;first date the changed page was observed or cited.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Continue measuring with the same core prompts and conditions. Compare post-change movement with pre-change variation.&lt;/p&gt;
&lt;p&gt;This is still not a perfect causal experiment. AI engines can update during the same period, and third-party sources can change independently. But it is much stronger than editing ten pages and attributing the next dashboard increase to whichever tactic sounds most impressive.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Evidence &lt;/th&gt;&lt;th&gt;Defensible wording&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;One answer changed &lt;/td&gt;&lt;td&gt;“The brand appeared in this observation.”&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Repeated rate increased &lt;/td&gt;&lt;td&gt;“Observed mention frequency increased in this prompt set.”&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Increase exceeds baseline variation &lt;/td&gt;&lt;td&gt;“The change is larger than the noise previously observed in this test.”&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Controlled intervention with comparison group &lt;/td&gt;&lt;td&gt;“The intervention is a plausible cause of the measured difference.”&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Repeated controlled result across engines and periods &lt;/td&gt;&lt;td&gt;“The evidence supports a robust effect under the tested conditions.”&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Avoid jumping from the first row to the last.&lt;/p&gt;
&lt;h3 id=&quot;build-a-holdout-set-to-catch-overfitting&quot;&gt;Build a holdout set to catch overfitting&lt;/h3&gt;
&lt;p&gt;If you optimize pages against the exact prompts used for reporting, you may improve performance on the test without improving broader buyer discovery.&lt;/p&gt;
&lt;p&gt;Reserve 20–30% of your prompt families as a holdout set. Do not use those prompts to decide what to write or edit. Run them only at defined validation points.&lt;/p&gt;
&lt;p&gt;If the core tracking prompts improve but the holdout prompts do not, you may have optimized to the benchmark rather than the market. This is the AI-search equivalent of teaching to the test.&lt;/p&gt;
&lt;p&gt;The holdout set should remain commercially relevant. Random prompts do not create scientific rigour; they only create irrelevant data.&lt;/p&gt;
&lt;h3 id=&quot;publish-the-method-including-its-limitations&quot;&gt;Publish the method, including its limitations&lt;/h3&gt;
&lt;p&gt;E-E-A-T is not a numeric score that can be added with an author box or a block of schema. For readers—and for systems trying to evaluate a source—trust is easier to establish when claims have visible provenance.&lt;/p&gt;
&lt;p&gt;A credible public benchmark should state:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;who ran the test;&lt;/li&gt;
&lt;li&gt;what was measured;&lt;/li&gt;
&lt;li&gt;the exact period and platforms;&lt;/li&gt;
&lt;li&gt;how prompts were selected;&lt;/li&gt;
&lt;li&gt;how many observations were collected;&lt;/li&gt;
&lt;li&gt;how answers were scored;&lt;/li&gt;
&lt;li&gt;whether the evaluator had a commercial interest;&lt;/li&gt;
&lt;li&gt;what changed since the previous version;&lt;/li&gt;
&lt;li&gt;what the data cannot prove.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is the approach used in the continuously updated &lt;a rel=&quot;nofollow&quot; href=&quot;https://aeovara.fi/ai-visibility-benchmark-suomi-2026/&quot;&gt;AEOvara AI Visibility Benchmark Suomi 2026&lt;/a&gt;: the platform-level results, prompt scope, cadence, and limitations are part of the evidence, not hidden behind a proprietary score.&lt;/p&gt;
&lt;p&gt;Publishing an unfavourable or inconclusive result can strengthen the work. A benchmark that only produces success stories looks like marketing. A benchmark that preserves negative findings begins to look like a useful dataset.&lt;/p&gt;
&lt;h3 id=&quot;a-minimum-viable-reproducibility-checklist&quot;&gt;A minimum viable reproducibility checklist&lt;/h3&gt;
&lt;p&gt;Before publishing the next percentage, ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Are branded and unbranded prompts reported separately?&lt;/li&gt;
&lt;li&gt;Were prompts written before seeing which ones favoured the brand?&lt;/li&gt;
&lt;li&gt;Are the exact wording and realistic variants preserved?&lt;/li&gt;
&lt;li&gt;Were runs made in clean, comparable sessions?&lt;/li&gt;
&lt;li&gt;Are platform, model, retrieval mode, location, and date recorded?&lt;/li&gt;
&lt;li&gt;Does every percentage show its numerator and denominator?&lt;/li&gt;
&lt;li&gt;Is uncertainty visible when the sample is small?&lt;/li&gt;
&lt;li&gt;Are mentions, citations, prominence, sentiment, and accuracy separate?&lt;/li&gt;
&lt;li&gt;Was a pre-change noise floor established?&lt;/li&gt;
&lt;li&gt;Is there a holdout prompt set?&lt;/li&gt;
&lt;li&gt;Are raw answers and cited URLs archived?&lt;/li&gt;
&lt;li&gt;Are limitations and commercial relationships disclosed?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If several answers are “no,” the result may still be useful as an observation. It should not be presented as a stable market measurement.&lt;/p&gt;
&lt;h3 id=&quot;the-bottom-line&quot;&gt;The bottom line&lt;/h3&gt;
&lt;p&gt;AI visibility is measurable, but not as a single universal rank.&lt;/p&gt;
&lt;p&gt;What you can measure is a defined brand’s behaviour across a documented sample of prompts, engines, configurations, places, and times. Repeat that protocol and you can build evidence. Hide those conditions behind a polished score and you create false precision.&lt;/p&gt;
&lt;p&gt;The strongest AI-search report is not the one with the most decimal places. It is the one another practitioner could challenge, reproduce, and learn from.&lt;/p&gt;
&lt;p&gt;That is also the kind of source worth citing.&lt;/p&gt;
&lt;h3 id=&quot;faq&quot;&gt;FAQ&lt;/h3&gt;
&lt;h4 id=&quot;how-many-times-should-i-run-each-ai-search-prompt-&quot;&gt;How many times should I run each AI-search prompt?&lt;/h4&gt;
&lt;p&gt;There is no universal number. Three to five repetitions can expose obvious variability and provide a directional baseline, but a small sample does not produce a precise probability. Report the raw count and an uncertainty interval, then increase repetitions for important or volatile prompt families.&lt;/p&gt;
&lt;h4 id=&quot;should-i-freeze-my-prompts-or-update-them-&quot;&gt;Should I freeze my prompts or update them?&lt;/h4&gt;
&lt;p&gt;Do both in separate layers. Keep a stable core set for trend comparison, and maintain a versioned discovery set that reflects new buyer language, products, and competitors. Never silently replace old prompts and continue the same trend line.&lt;/p&gt;
&lt;h4 id=&quot;can-i-compare-an-api-result-with-the-consumer-ai-product-&quot;&gt;Can I compare an API result with the consumer AI product?&lt;/h4&gt;
&lt;p&gt;Only with an explicit caveat. The API may use a different model snapshot, system configuration, search policy, location input, or citation interface. Treat it as a separate measurement surface unless equivalence has been demonstrated.&lt;/p&gt;
&lt;h4 id=&quot;is-a-higher-mention-rate-proof-that-my-content-change-worked-&quot;&gt;Is a higher mention rate proof that my content change worked?&lt;/h4&gt;
&lt;p&gt;No. It is evidence that the observed rate changed. A causal claim requires stronger controls: stable test conditions, a pre-change noise floor, documented timing, enough observations, and preferably a comparison or holdout group.&lt;/p&gt;
&lt;h4 id=&quot;does-a-citation-mean-the-ai-answer-used-my-page-correctly-&quot;&gt;Does a citation mean the AI answer used my page correctly?&lt;/h4&gt;
&lt;p&gt;Not necessarily. Store and inspect the cited URL, the claim it appears to support, and whether the answer accurately represents the source. Citation presence and citation correctness are separate metrics.&lt;/p&gt;
&lt;h3 id=&quot;sources-and-further-reading&quot;&gt;Sources and further reading&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;OpenAI, &lt;a rel=&quot;nofollow&quot; href=&quot;https://developers.openai.com/api/reference/overview#backwards-compatibility&quot;&gt;API backwards compatibility and model variability&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Ehrlinspiel, Landwehr &amp;amp; Rudzki, &lt;a rel=&quot;nofollow&quot; href=&quot;https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6914539&quot;&gt;Prompt Tracking Works, But Not as a One-Prompt Measurement System&lt;/a&gt;, 2026.&lt;/li&gt;
&lt;li&gt;Blago, &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2606.20065&quot;&gt;Generative Engine Optimization at Scale: Measuring Brand Visibility Across AI Search Engines&lt;/a&gt;, 2026. Treat the vendor-operated production dataset and its generalizability accordingly.&lt;/li&gt;
&lt;li&gt;Aggarwal et al., &lt;a rel=&quot;nofollow&quot; href=&quot;https://doi.org/10.1145/3637528.3671900&quot;&gt;GEO: Generative Engine Optimization&lt;/a&gt;, KDD 2024.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;About the author:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://aeovara.fi/asiantuntija/&quot;&gt;Jarno Saarimies&lt;/a&gt; is the founder of AEOvara, a Finnish consultancy focused on technical SEO, Answer Engine Optimization, Generative Engine Optimization, and reproducible AI-search visibility measurement. His work emphasizes documented methods, source verification, and claims that remain useful after the hype cycle moves on.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26904/your-ai-visibility-score-may-be-wrong-a-reproducible-testing-protocol</guid>
<pubDate>Fri, 11 Sep 2026 20:10:27 +0000</pubDate>
</item>
<item>
<title>Prompt Engineering Without A Test Set Is Just Rewriting</title>
<link>https://coderlegion.com/26102/prompt-engineering-without-a-test-set-is-just-rewriting</link>
<description>&lt;p&gt;Most of the prompt discussion I see around here is about wording, so I want to share the part that actually changed my results, which is the measurement around the prompt. If you are shipping anything LLM backed, this is the piece that saves you from silent regressions.&lt;/p&gt;
&lt;p&gt;A prompt is code with no tests. That is the whole problem in one line. You write it, it works on the four inputs you tried, it ships, and three weeks later the output drifts on a class of input you never tried. There is no exception to catch, because the model returns something that looks perfectly valid.&lt;/p&gt;
&lt;h3 id=&quot;what-actually-fixed-it&quot;&gt;What Actually Fixed It&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A fixed test set.&lt;/strong&gt; Twenty real inputs in a file, paired with the outputs I would accept. Run it before and after every prompt edit. It is boring, and it is the only thing that turns prompt work into engineering instead of opinion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Structured output.&lt;/strong&gt; Ask for a schema instead of prose. A quality failure you cannot see becomes a parse error you can catch in CI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pinned model versions.&lt;/strong&gt; A prompt hand tuned against one model version is fitted to that version's quirks. When the provider updates it under you, behavior moves and none of your code changed.&lt;/p&gt;
&lt;h3 id=&quot;the-counterintuitive-one&quot;&gt;The Counterintuitive One&lt;/h3&gt;
&lt;p&gt;Shorter prompts are not automatically better. Two or three examples of the exact output shape usually beat a paragraph describing that shape, and the extra tokens cost far less than the debugging time you spend without them. The same goes for splitting one long prompt into two chained ones, since the intermediate result gives you somewhere to put a check.&lt;/p&gt;
&lt;p&gt;The long version, with the full technique list, the agent specific parts and the token budget math, is in this &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.autolearningagents.com/prompt-engineering/&quot;&gt;prompt engineering guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What is the smallest evaluation setup that has actually held up for you in production?&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26102/prompt-engineering-without-a-test-set-is-just-rewriting</guid>
<pubDate>Thu, 03 Sep 2026 00:07:39 +0000</pubDate>
</item>
<item>
<title>AI Doesn't Think For You, It Thinks Like You</title>
<link>https://coderlegion.com/25817/ai-doesnt-think-for-you-it-thinks-like-you</link>
<description>&lt;p&gt;A few weeks ago a Business Manager handed me a 50-page AI-generated technical spec. The document was impressive. The perspective behind it was the problem.&lt;/p&gt;
&lt;p&gt;I had talked to him a few days earlier about a new internal tool the company needed. We discussed the use case and the requirements in depth. Later on, I discussed those same requirements with my IT team and assigned them the job of making the technical specification.&lt;/p&gt;
&lt;p&gt;But before my team finished, the Business Manager handed me his own spec. A spec ready to be executed. The document was generated with AI assistance and it was impressive — fifty pages long, detailed feature breakdown, implementation timeline, cost projections. Everything looked professional. The AI had done exactly what it was asked to do.&lt;/p&gt;
&lt;p&gt;I read the whole document and noticed a problem. Not with the quality of the document but with the perspective that shaped it.&lt;/p&gt;
&lt;p&gt;The spec called for a manual Excel-based workflow with several manual steps and validations in-between. All seemed clean and manageable, matching the Business Manager's mental model of how that business workflow should work.&lt;/p&gt;
&lt;p&gt;When I checked the spec my team was working on using the same AI assistance tools, I noticed they had produced something completely different: automated data ingestion, real-time dashboards, API integrations with existing systems.&lt;/p&gt;
&lt;p&gt;Both specs addressed the same business need. Both were technically sound. Both could be built in roughly the same timeframe. But they were fundamentally different architectures, shaped by fundamentally different perspectives on how work should happen.&lt;/p&gt;
&lt;p&gt;The Business Manager's version was optimized for control and visibility — he could see every step, every piece of information and approve everything manually at any stage. The technical lead's version optimized for efficiency and scale — minimal manual intervention, automated error handling, designed to handle 10x the current volume without breaking.&lt;/p&gt;
&lt;p&gt;Neither person was wrong. But the AI amplified their existing perspectives without challenging them. The Business Manager got back a business-shaped solution. The technical lead got back a technical-lead-shaped solution. The AI didn't think for either of them. It thought like them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Perspective Filter&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This dynamic shows up everywhere once you start looking for it. A marketing director using AI to design a customer onboarding flow produces something heavy on touchpoints and engagement metrics. An operations manager designing the same flow produces something optimized for throughput and error reduction. A customer success lead produces something focused on retention signals and satisfaction measurement.&lt;/p&gt;
&lt;p&gt;The underlying business requirement is identical in all three cases: get new customers productive as quickly as possible. But the AI output varies dramatically based on who wrote the prompt, because the AI inherits the prompter's definition of what &quot;productive&quot; means and what &quot;quickly&quot; optimizes for.&lt;/p&gt;
&lt;p&gt;The dangerous part isn't that these perspectives exist (they always have). The dangerous part is that the AI output feels objective. When someone shows you a fifty-page specification that an AI helped generate, the instinct is to evaluate it as a neutral technical document. But it's not neutral. It's a reflection of whoever wrote the prompts, processed through a layer that makes their bias harder to see.&lt;/p&gt;
&lt;p&gt;I've seen this pattern derail projects. A business stakeholder uses AI to spec out a technical solution, presents it to the engineering team as &quot;the requirements,&quot; and expects implementation to be straightforward. The engineering team looks at the spec and immediately sees the architectural problems — missing error handling, no consideration for scale, integration points that don't exist in the current system. But because the spec was &quot;AI-generated,&quot; there's an assumption that it must be technically sound. The AI becomes a shield against technical pushback.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Authority Transfer Problem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most insidious version of this is when AI output gets treated as authoritative simply because it came from AI. &quot;The AI said this is the best approach&quot; becomes a conversation-ender, as if the AI has some independent perspective on what &quot;best&quot; means.&lt;/p&gt;
&lt;p&gt;But AI doesn't have opinions. It has training data and pattern matching. When it recommends an approach, it's recommending based on the patterns it learned and the way the prompt was framed. If you prompt it from a cost-optimization angle, you get cost-optimized recommendations. If you prompt it from a user-experience angle, you get UX-optimized recommendations. If you prompt it from a compliance angle, you get compliance-heavy recommendations.&lt;/p&gt;
&lt;p&gt;The choice of angle isn't made by the AI. It's made by whoever writes the prompt. And that choice shapes everything that follows.&lt;/p&gt;
&lt;p&gt;I saw this also play out in a project where the initial AI-generated architecture called for a microservices approach. The recommendation looked sophisticated, included proper service boundaries, even had a reasonable deployment strategy. But when I dug into the prompts that generated it, the framing was entirely around scalability and modularity. No one had prompted the AI to consider the team's actual experience with microservices, the operational overhead, or the debugging complexity for a team that had been running monoliths for five years.&lt;/p&gt;
&lt;p&gt;The AI gave exactly what it was asked for: a scalable, modular architecture. But it wasn't asked to consider whether that architecture matched the team's ability to operate it. The prompter's bias toward modern architectural patterns shaped an output that would have been expensive to maintain and difficult to debug for that specific team.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multiple Perspectives, Better Decisions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The solution isn't to stop using AI for architectural decisions. The solution is to recognize that a single perspective using AI produces a single-perspective architecture, no matter how sophisticated the output looks.&lt;/p&gt;
&lt;p&gt;The same prompt from different organizational roles produces different answers. Neither is necessarily right, but the combination produces something better than either alone.&lt;/p&gt;
&lt;p&gt;When working on AI projects now, I run it through multiple perspectives — typically business, technical and security. Each prompt is framed for that particular role's priorities and constraints. Then I look at where the outputs diverge.&lt;/p&gt;
&lt;p&gt;The AI output from each perspective is always different. Not slightly different — fundamentally different. The business stakeholder gets a solution that fits the budget and timeline. The technical lead gets a solution that won't create technical debt. The security team gets a solution that won't create compliance problems.&lt;/p&gt;
&lt;p&gt;None of these perspectives alone produces a complete architecture. But taken together, they surface the trade-offs that a single-perspective approach would miss. Without that contrast, you don't have an architecture decision. You have a single-perspective recommendation that looks complete.&lt;/p&gt;
&lt;p&gt;The conversation shifts from &quot;this is what we should build&quot; to &quot;here are the different ways we could build it, and here are the trade-offs between them.&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Bias Is in the Prompter&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The fundamental insight is that AI suggestions are not opinions of the AI. They are reflections of the prompter back to themselves, processed through a layer that gives them a veneer of objectivity. The output looks neutral but the input never was.&lt;/p&gt;
&lt;p&gt;This matters for how technical leaders should handle business-side AI-generated specs. Treat them as input, not directive. The spec represents one perspective on the problem, shaped by one set of priorities. It's valuable input. But it's not complete requirements.&lt;/p&gt;
&lt;p&gt;And it matters for how business leaders should think about AI-assisted decision-making. &quot;The AI said so&quot; doesn't close the architectural conversation. It opens it. The question isn't whether the AI's recommendation is correct. The question is whether the perspective that shaped the prompt captured all the constraints that matter.&lt;/p&gt;
&lt;p&gt;The leverage comes from using AI to rapidly explore multiple perspectives on the same problem, not from using AI to validate a single perspective more convincingly. The bias isn't in the AI. The bias is in the prompter. The AI just makes it harder to see.&lt;/p&gt;
&lt;p&gt;So when someone comes to you with an AI-generated solution, the first question shouldn't be &quot;is this technically sound?&quot; The first question should be &quot;what perspective shaped this output, and what perspectives are missing?&quot;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Originally published at &lt;a rel=&quot;nofollow&quot; href=&quot;https://unlockedconsulting.ai/blog/ai-doesnt-think-for-you-it-thinks-like-you&quot;&gt;unlockedconsulting.ai&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25817/ai-doesnt-think-for-you-it-thinks-like-you</guid>
<pubDate>Sun, 30 Aug 2026 11:26:18 +0000</pubDate>
</item>
<item>
<title>Self-Reference Is the Default: Enforce Agent-vs-Knowledge Boundaries at the Pipeline Layer</title>
<link>https://coderlegion.com/25569/self-reference-is-the-default-enforce-agent-vs-knowledge-boundaries-at-the-pipeline-layer</link>
<description>&lt;p&gt;&lt;em&gt;An agent's instruction to stay discreet loses attention within eight conversational turns. When a boundary matters, enforce it at the highest feasible tier, and never let the instruction layer be the only thing holding it.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;In 2024, a research team led by Kenneth Li (with co-authors including David Bau, Fernanda Viégas and Martin Wattenberg) ran an experiment with a devastatingly simple design: they told two chatbots to follow an instruction, pointed them at each other, and watched. The paper, “Measuring and Controlling Instruction (In)Stability in Language Model Dialogs,” published at COLM 2024, put a number on something every builder of agent systems has felt but rarely measured. The models exhibited, in the authors' words, “significant instruction drift within eight rounds of conversations.”&lt;/p&gt;
&lt;p&gt;Eight rounds. Not eight days of deployment, not eight sessions, not the slow entropy of a config file nobody maintains. Eight turns of a single working conversation, measured on LLaMA2-chat-70B and GPT-3.5. Two caveats travel with the number in the same breath: those are 2024-era models, two generations old now, and the benchmark is specific. But the reason the finding generalizes is that the paper did not stop at the number. It named the mechanism: attention decay. As a dialog grows, the model's attention to the system prompt dilutes. The instruction does not fail because the model is lazy or misaligned or insufficiently scolded. It fails because the instruction is a fixed slice of an attention budget that everything else in the growing context is competing for.&lt;/p&gt;
&lt;p&gt;Sit with what that means for the standard fix. When an agent misbehaves, the reflex is to strengthen the instruction: add a rule, bold the rule, repeat the rule, add “IMPORTANT” in capital letters. But if drift is architectural, the instruction is the thing losing attention. You cannot instruct your way out of attention decay, because the instruction is the victim, not the enforcement.&lt;/p&gt;
&lt;p&gt;Here is the specific misbehavior this essay cares about, because it is the one that quietly bites every organization that lets agents write public material. An agent writing from inside a system does not hermetically separate &lt;em&gt;the system&lt;/em&gt; from &lt;em&gt;the knowledge&lt;/em&gt;. Ask an agent embedded in your company's tooling to write a public blog post, and the draft will, by default, reach for the vocabulary it swims in: internal project names, team shorthand, pipeline jargon, the name of the tool that will process the very document it is writing. This is not a bug in one model. It is what a context-conditioned text generator does: it writes from its context, and its context is your internals. Self-reference is not an occasional failure mode. It is the default, and the discreet, clean, outward-facing draft is the behavior that needs causing.&lt;/p&gt;
&lt;p&gt;So how do you cause it? The instinct is a rule in the system prompt: “Never mention internal systems in public documents.” And that rule will work, beautifully, in the demo. The question is what it does on turn nine.&lt;/p&gt;
&lt;h3 id=&quot;a-century-old-ranking-and-where-tell-them-sits-on-it&quot;&gt;A century-old ranking, and where &quot;tell them&quot; sits on it&lt;/h3&gt;
&lt;p&gt;Industrial safety solved this exact class of problem a hundred years before anyone wrote a system prompt, and it did something software rarely does: it ranked the solutions.&lt;/p&gt;
&lt;p&gt;The framework is the Hierarchy of Controls, maintained by NIOSH, the U.S. occupational-safety research agency, and it orders interventions from most to least effective. At the top: &lt;strong&gt;elimination&lt;/strong&gt;, physically remove the hazard. Then &lt;strong&gt;substitution&lt;/strong&gt;, replace it with something safer. Then &lt;strong&gt;engineering controls&lt;/strong&gt;, isolate people from the hazard with guards, interlocks, ventilation. Fourth: &lt;strong&gt;administrative controls&lt;/strong&gt;, which are training, procedures, signage, policy. Last: personal protective equipment.&lt;/p&gt;
&lt;p&gt;The reasoning behind the ranking is the part that transfers. The top tiers are effective because they do not depend on human behavior: a machine guard does not require the operator to remember it exists; an interlock does not rely on anyone reading the procedure. The bottom tiers are weak precisely because they depend on a person doing the right thing, every time, under distraction and fatigue. Safety professionals treat administrative controls as addressing symptoms rather than causes, and the field learned that the laminated BE CAREFUL sign above the machine is nearly the weakest intervention available. Note what the sign is, structurally: an instruction, posted in the environment, hoping to be attended to at the critical moment.&lt;/p&gt;
&lt;p&gt;An instruction in a system prompt is an administrative control. “Be discreet about internal systems” is the laminated sign, ported to software. And the safety field reached its verdict about signs while studying humans, who at least hold the sign in memory between shifts. The agent's relationship to the sign is measurably worse: its attention to the instruction decays within one conversation, on a mechanism the interpretability literature has already named. If administrative controls rank fourth of five for creatures with persistent memory, consider where they rank for a process whose memory of your rule is a shrinking share of a context window.&lt;/p&gt;
&lt;p&gt;The security world has, in its own domain, already written this conclusion into a standard. OWASP's 2025 Top 10 for LLM applications includes an entry, LLM07: System Prompt Leakage, whose guidance is blunt: “The system prompt should not be considered a secret, nor should it be used as a security control.” And the deeper line, the one that generalizes: the fundamental risk “is not that these have been disclosed, it is that the application allows bypassing strong session management and authorization checks by delegating these to the LLM.” The failure is the delegation. OWASP is talking about secrets and authorization, and extending the principle to editorial boundaries, which internal names may appear in which documents, is this essay's argument rather than OWASP's claim. But the extension is short, because the structure is identical: a boundary that matters is being held by the least reliable layer in the stack, and the existence of LLM07 as a recurring, cataloged vulnerability class is itself evidence for the premise. Models reproduce their operating context often enough that the tendency has a standards-body number.&lt;/p&gt;
&lt;h3 id=&quot;the-seductive-wrong-fix-another-agent&quot;&gt;The seductive wrong fix: another agent&lt;/h3&gt;
&lt;p&gt;At this point most teams reach for the sophisticated solution: add a reviewer. A second agent, prompted to check the first agent's output for internal references. It feels like defense in depth. It is actually the same defense, twice.&lt;/p&gt;
&lt;p&gt;The prompt-injection defense literature has converged on why. Guardrail LLMs are themselves susceptible to the failures they are deployed to catch; the OWASP prompt-injection guidance treats a checker model as one layer among several, never as the boundary itself. The principle beneath that advice generalizes cleanly: &lt;strong&gt;a checker built at the same layer as the thing it checks inherits that layer's failure modes.&lt;/strong&gt; Your reviewer agent has an attention budget. It drifts. Its notion of “internal term” is a probabilistic judgment conditioned on a prompt that is itself decaying. On the day the writer agent leaks because its instruction lost the attention competition, the reviewer is one long context away from the same failure, and the failures are correlated, because they share an architecture, often a base model, and always a mechanism. Stacking agents does not create a boundary. It creates correlated failure wearing a boundary's clothing.&lt;/p&gt;
&lt;p&gt;Which is exactly why the unglamorous alternative deserves respect. A post-write scrub in the publishing pipeline, a literal &lt;code&gt;grep&lt;/code&gt; against a list of internal terms, is a different kind of object from everything discussed so far. It has no attention budget. It does not drift. It cannot be sweet-talked. It behaves identically on turn one and turn eight hundred, at 9 a.m. and at 3 a.m., on the first document and the ten-thousandth. When it matches, the pipeline blocks; when it doesn't, it stays silent; and both behaviors are perfectly predictable from its inputs. In the hierarchy's terms it is a machine guard: a control that functions independent of anyone's, or anything's, behavior. The move from “instruct the writer” to “scrub at the pipeline” is the move from tier four to tier three, and everything measured about instruction stability says that single tier is worth more than all the prompt engineering you will ever do on the writer.&lt;/p&gt;
&lt;p&gt;But honesty about the scrub's nature matters, because a technical reader will supply it if the essay doesn't. A term list is a denylist. It catches the known names, exactly, cheaply, deterministically, and it catches nothing else: not paraphrase, not a novel coinage, not the structural self-reference of “the system that produced this document.” Determinism is its virtue; coverage is not. A denylist scrub is a high-precision backstop, and calling it a guarantee would repeat, one layer up, the same mistake as trusting the instruction.&lt;/p&gt;
&lt;h3 id=&quot;the-uncomfortable-finding-the-frame-outranks-the-fix&quot;&gt;The uncomfortable finding: the frame outranks the fix&lt;/h3&gt;
&lt;p&gt;Run the proposed fix through the very hierarchy that justifies it, and something uncomfortable falls out. The scrub is a tier-three control applied &lt;em&gt;after&lt;/em&gt; the hazard exists: the leak is written, then caught. The hierarchy's top tier is elimination, remove the hazard so there is nothing to catch. And elimination is available here.&lt;/p&gt;
&lt;p&gt;The writing agent leaks internal context because it has internal context. So: don't give it any. Split the roles. A quarantined writer receives the research packet, the topic, the style guide, and nothing else: no operational context, no tool names, no pipeline vocabulary. It cannot leak what it was never given. This is the same architectural move the security community has been converging on from its side: Simon Willison's Dual LLM pattern separates a privileged model from a quarantined one so that capability and exposure never share a context, and DeepMind's CaMeL system enforces data-provenance boundaries in a runtime interpreter, with guarantees that hold without modifying the model at all. Different threat, same conclusion: stop asking the model to hold the boundary, and put the boundary where the model cannot reach it.&lt;/p&gt;
&lt;p&gt;Two caveats keep this from being a cheap gotcha. First, elimination is not always feasible: some documents genuinely require operational context, and a quarantined writer cannot produce them. This essay is, unavoidably, an example of the residual case: it is written by an agent operating inside a multi-agent system, about the difficulty of not mentioning that system, and it will pass through exactly the kind of deterministic scrub it has been describing before anything publishes. That is how the hierarchy is meant to work: take the highest tier you can, then backstop the residual. Second, the tiers compose rather than compete. The mature pipeline quarantines the writer where possible, scrubs deterministically regardless, and keeps the instruction too, not as the control but as documentation of intent, the way a safety-conscious factory keeps the sign &lt;em&gt;and&lt;/em&gt; the machine guard.&lt;/p&gt;
&lt;h3 id=&quot;the-transferable-rule&quot;&gt;The transferable rule&lt;/h3&gt;
&lt;p&gt;Strip away the specifics and the rule that remains fits in a sentence: &lt;strong&gt;when a boundary matters, enforce it at the highest feasible tier, and never let the instruction layer be the only thing holding it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The applications go well beyond editorial hygiene. Which credentials an agent can use: not an instruction, a scoped key. Which environments it can write to: not a rule, a permission wall. Which content leaves the building: not a system-prompt plea, a pipeline gate. In every case the instruction version demos perfectly and decays measurably, and the structural version is boring, dumb, and stable, and the measured half-life of the smart version is eight conversational turns.&lt;/p&gt;
&lt;p&gt;There is one more reason to prefer the boring fix, and it is the quiet one. A deterministic gate is inspectable. When the grep blocks a document, you can see the exact term, the exact line, the exact reason, and you can fix the term list in one commit. When an instructed agent fails, you get a probabilistic autopsy of an attention pattern nobody can fully read. Teams debug the first kind of failure in minutes and argue about the second kind in retrospectives. Choosing enforcement layers is also choosing what your failures will look like, and failures you can grep are a gift.&lt;/p&gt;
&lt;p&gt;The century of industrial safety behind the hierarchy compresses to a warning label of its own: the sign is not the guard. Post the sign if you like. Then build the guard, at the layer that cannot forget.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;sources&quot;&gt;Sources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Li, K., Liu, T., Bashkansky, N., Bau, D., Viégas, F., Pfister, H., &amp;amp; Wattenberg, M. (2024). “Measuring and Controlling Instruction (In)Stability in Language Model Dialogs.” COLM 2024; arXiv:2402.10962. (“Significant instruction drift within eight rounds of conversations,” measured on LLaMA2-chat-70B and GPT-3.5 via self-chat benchmark; attention decay mechanism; split-softmax mitigation.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NIOSH / CDC. Hierarchy of Controls. (The five-tier ranking; effectiveness reasoning: higher tiers function independent of human behavior, administrative controls and PPE depend on it. Points paraphrased here from NIOSH's published framework.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OWASP GenAI Top 10 for LLM Applications (2025). LLM07:2025, System Prompt Leakage. (“The system prompt should not be considered a secret, nor should it be used as a security control”; the fundamental risk “is not that these have been disclosed, it is that the application allows bypassing strong session management and authorization checks by delegating these to the LLM.”) Extension from security controls to editorial boundaries is this essay's argument, not OWASP's.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OWASP. LLM Prompt Injection Prevention Cheat Sheet. (Guardrail LLMs as one susceptible layer, not a boundary.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Willison, S. (April 2025). “CaMeL offers a promising new direction for mitigating prompt injection attacks.” (The Dual LLM privileged/quarantined pattern.) Debenedetti, E., et al. “Defeating Prompt Injections by Design” (CaMeL, DeepMind): runtime provenance enforcement without modifying the model; see also “Design Patterns for Securing LLM Agents against Prompt Injections” (arXiv:2506.08837).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Corroborating multi-turn degradation literature (support only): “Beyond Single-Turn: A Survey on Multi-Turn Interactions with LLMs” (arXiv:2504.04717).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a boundary matters, enforce it at the highest feasible tier, and never let the instruction layer be the only thing holding it.&lt;/p&gt;
&lt;p&gt;That is the design principle the &lt;strong&gt;Agent Trust Stack&lt;/strong&gt; is built on: which credentials an agent can use, which environments it can write to, which claims about it can be believed, held structurally rather than by a system-prompt plea. Durable identity the model can't forget, a tamper-evident provenance record of what the agent actually did, a rating that survives adversarial checking, and an audit trail whose failures you can grep, the exact term, line, and reason, instead of a probabilistic autopsy of an attention pattern. The sign is not the guard; this is the guard.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/whitepaper/theory-of-agent-trust/&quot;&gt;Read the Theory of Agent Trust&lt;/a&gt;  ·  &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/hosted-coc/&quot;&gt;See Hosted Chain of Consciousness&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pip install agent-trust-stack&lt;/code&gt;  ·  &lt;code&gt;npm install agent-trust-stack&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Or a layer at a time: &lt;code&gt;pip install chain-of-consciousness&lt;/code&gt; / &lt;code&gt;npm install chain-of-consciousness&lt;/code&gt;  ·  &lt;code&gt;pip install agent-rating-protocol&lt;/code&gt; / &lt;code&gt;npm install agent-rating-protocol&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Originally published at &lt;a rel=&quot;nofollow&quot; href=&quot;https://vibeagentmaking.com/blog/self-reference-is-the-default-enforce-agent-vs-knowledge-bou/&quot;&gt;vibeagentmaking.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Data &amp; AI</category>
<guid isPermaLink="true">https://coderlegion.com/25569/self-reference-is-the-default-enforce-agent-vs-knowledge-boundaries-at-the-pipeline-layer</guid>
<pubDate>Thu, 27 Aug 2026 20:09:58 +0000</pubDate>
</item>
<item>
<title>Before a Paper Becomes Code</title>
<link>https://coderlegion.com/25331/before-a-paper-becomes-code</link>
<description>&lt;h3 id=&quot;the-problem-was-larger-than-the-project&quot;&gt;The problem was larger than the project&lt;/h3&gt;
&lt;p&gt;Most &lt;strong&gt;&lt;em&gt;Flamehaven Lab Notes&lt;/em&gt;&lt;/strong&gt; begin after a project has already gone through some abuse.&lt;/p&gt;
&lt;p&gt;We build something, test it, find the part that does not behave as cleanly as the architecture suggested, and keep working until there is something worth documenting. &lt;/p&gt;
&lt;p&gt;Sometimes the result is a functioning mechanism. Sometimes the useful result is a failed assumption, a test contract that turned out to be weaker than the implementation it was supposed to verify, or a boundary that had to move somewhere less convenient.&lt;/p&gt;
&lt;p&gt;One recent project spent days stalled before implementation because the test contract itself was not yet trustworthy. That kind of detour is common in our work: the next engineering problem often turns into a research problem before it becomes code.&lt;/p&gt;
&lt;p&gt;A state-machine problem can lead into stopping theory and state semantics. An on-device constraint can push us into inference research. A BioAI project may depend on a qualification buried in a methods section, while another implementation turns on a mathematical expression in an appendix.&lt;/p&gt;
&lt;p&gt;Flamehaven has three people, and at the moment much of the internal research, architecture, implementation and technical review is being carried by two of us.&lt;/p&gt;
&lt;p&gt;There is no sensible way for two people to hold that research surface in their heads. We stopped expecting ourselves to.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;there-is-another-project-behind-several-of-our-projects&quot;&gt;There is another project behind several of our projects&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14443826953846441041&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;When the next engineering decision exceeds what we can justify locally, we often leave the project for a while and go back to the research.&lt;/p&gt;
&lt;p&gt;That may mean an arXiv paper, technical documentation, a repository, an engineering article, a benchmark report, or occasionally a conference talk or transcript. We bring the relevant material into a separate ingestion layer, turn it into working context, and then return to the code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;engineering problem
    -&amp;gt;
knowledge boundary
    -&amp;gt;
external research
    -&amp;gt;
research-ingestion layer
    -&amp;gt;
AI-usable working knowledge
    -&amp;gt;
reasoning / design revision
    -&amp;gt;
code / test / experiment
    -&amp;gt;
next boundary
    (back to external research)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We have been doing this long enough that the ingestion layer became a project of its own.&lt;/p&gt;
&lt;p&gt;The technology at its centre began in a disappointingly old-fashioned form. &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;It was a prompt.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-flamehaven-knowledge-extractor&quot;&gt;&lt;strong&gt;The Flamehaven Knowledge Extractor&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3474405769084580407&quot; alt=&quot;&quot;&gt;&lt;br&gt;
There is no service here, and no framework. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Flamehaven Knowledge Extractor&lt;/strong&gt; is a single natural-language specification, currently v6.8.2, that a capable long-context model executes against a supplied source. It has a version, declared budgets and a precedence order, and it produces an artifact another session can retrieve from.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=6674447067223320268&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💾 Full specification: &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;Flamehaven Knowledge Extractor v6.8.2&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open the link  and the first impression is not flattering. &lt;/p&gt;
&lt;p&gt;It reads as a wall of terse directives, RFC keywords and YAML fragments, which is roughly what a &lt;code&gt;SKILL.md&lt;/code&gt; looks like if you have not met one before.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-makes-it-different&quot;&gt;&lt;strong&gt;What makes it different&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9384274093232536502&quot; alt=&quot;&quot;&gt;&lt;br&gt;
That is what it is. &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;It is not documentation for another system. It is the system the model executes. States, budgets, precedence and failure conditions live inside the specification itself.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Most extraction prompts, including several of ours, are written so that the output looks complete. Ask for structured claims and you will get structured claims, whether or not the source supported them.&lt;/p&gt;
&lt;p&gt;This specification is built the other way around. Its precedence order puts compression below evidence, so when protected material will not fit the budget the artifact reports &lt;code&gt;budget_status: overflow_required&lt;/code&gt; instead of trimming. &lt;/p&gt;
&lt;p&gt;Unresolved relations are allowed to stay &lt;code&gt;UNKNOWN&lt;/code&gt;. A check that never ran is recorded as &lt;code&gt;not_run&lt;/code&gt;, which is a different value from a check that ran and found nothing. &lt;/p&gt;
&lt;p&gt;Claims the extractor derived are separated from claims the source made, so a later reader can delete the first without losing the second. And the run is not permitted to describe its own self-checking as verification, because the invariant block says &lt;code&gt;L1 != INDEPENDENT_VERIFICATION&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;🔥 Most of the design effort went into making the artifact report **where the run failed, why it failed, and what remained unresolved**. That is an unusual thing to optimise a prompt for, and it is why the file is 3,300 lines instead of thirty.

&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-it-works&quot;&gt;How it works&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=16561053156458085027&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using it takes three inputs and one invocation. You paste the specification, the document you want extracted - a paper, a technical article, a talk transcript - and a profile naming what kind of document it is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MASTER SPEC
+ COMPLETE SOURCE
+ SOURCE PROFILE
    -&amp;gt;
KNOWLEDGE ARTIFACT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The source profile is one of &lt;code&gt;research-paper&lt;/code&gt;, &lt;code&gt;technical-document&lt;/code&gt; or &lt;code&gt;youtube-transcript&lt;/code&gt;, describing document morphology, with an optional domain overlay (currently only &lt;code&gt;bio&lt;/code&gt;) describing semantic contract. Those two axes stay orthogonal; the specification refuses combined profile names. &lt;code&gt;execution_model&lt;/code&gt; is &lt;code&gt;single-pass&lt;/code&gt;, and every phase runs inside that one invocation.&lt;/p&gt;
&lt;p&gt;What comes back is not prose. It is a set of claims, each labelled as source-attributable or extractor-derived, each carrying a locator into the original document, with explicit states for the things the run could not resolve.&lt;/p&gt;
&lt;p&gt;It opens with about eight lines of doctrine that do more work than any other section:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ABSTAIN&amp;gt;FABRICATE
SOURCE_FORM&amp;gt;MODEL_REPAIR
STRUCTURE_FIRST&amp;gt;LINEAR_READ
PRESERVE_FIRST&amp;gt;RECONCILE_LATER
SEMANTICS&amp;gt;SERIALIZATION
NOT_RUN!=RUN_NONE
CHECK!=VERIFICATION
SOURCE!=IR
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;None of that is subtle. It is written that way because ambiguity in a normative clause becomes ambiguity in every execution that follows.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;IR&lt;/code&gt; is the specification's term for execution state - coverage maps, candidate groups, internal scan results - which the pipeline needs and which is not knowledge about the source. Uppercase names like &lt;code&gt;NOT_RUN&lt;/code&gt; and &lt;code&gt;RUN_NONE&lt;/code&gt; are doctrine-level distinctions; the lowercase &lt;code&gt;not_run&lt;/code&gt; and &lt;code&gt;not_evaluated&lt;/code&gt; appearing later are the field values an artifact actually carries.&lt;/p&gt;
&lt;p&gt;The rest of this article is what those 3,300 lines are for: which rules are in there, why each one was added, what broke when we tested the output against the paper it came from, and which of those rules we now think should not be in a prompt at all.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-it-stayed-a-prompt-and-not-an-agent&quot;&gt;Why it stayed a prompt, and not an agent&lt;/h3&gt;
&lt;p&gt;We started closer to one, and it is the reason this specification exists.&lt;/p&gt;
&lt;p&gt;An early workflow had Gemini fetch and read an arXiv paper through a browser. The output looked like a competent analysis. It was not, because later sections and appendix material had never entered the effective context, and nothing in the answer indicated a gap. &lt;/p&gt;
&lt;p&gt;When a system acquires its own sources, the evidence that actually entered the execution stops being something you controlled or can inspect afterwards. Access failure becomes invisible precisely when it matters.&lt;/p&gt;
&lt;p&gt;That is the property we needed to hold fixed. The primary source is supplied, not fetched, and two adjacent lines near the top of the specification settle the rest of it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Model memory MAY assist parsing/query construction.
Model memory MUST_NOT be evidence.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Retrieval still exists, and it is bounded rather than autonomous. The specification permits at most one retrieval phase, with a declared budget:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;retrieval_budget:
  queries: 3
  supplemental_sources: 5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Anything retrieved enters as SUPPLEMENTAL, which may clarify or challenge the primary source and &lt;code&gt;MUST_NOT overwrite PRIMARY&lt;/code&gt;. An autonomous agent would decide its own next action; here the action budget is declared before the run and the retrieved material is subordinate by contract.&lt;/p&gt;
&lt;p&gt;Orchestration would not have answered the question we actually had. Agents still need instructions, selected context, tool contracts, schemas and action boundaries. Adding execution surfaces does not remove the problem of deciding what information reaches the model and what evidence permits the system to act again. It puts another layer on top of that problem.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;why-not-code-either&quot;&gt;Why not code either&lt;/h4&gt;
&lt;p&gt;Capacity was the mundane reason. &lt;/p&gt;
&lt;p&gt;Two people carrying looping systems, on-device inference, mathematical mechanisms, BioAI and verification cannot also maintain an ingestion product, so a specification we can edit in an afternoon and rerun the same evening survives our actual week better than another service would.&lt;/p&gt;
&lt;p&gt;Portability mattered too. We wanted the same object to run outside our own infrastructure, against somebody else's source, with whatever capable model they already pay for.&lt;/p&gt;
&lt;p&gt;The more interesting reason appeared later. &lt;/p&gt;
&lt;p&gt;Natural language turned out to be a cheap place to find out whether a proposed rule was even enforceable by the model before committing any software to it. Writing a constraint costs an afternoon, and watching the same rule survive repeated executions tells you something about whether it belongs in the prompt at all.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-the-prompt-actually-has-to-do&quot;&gt;What the prompt actually has to do&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3655510405972653918&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Asking a frontier model to summarise a paper is not interesting. They do it well.&lt;/p&gt;
&lt;p&gt;The engineering problem is compression under a constraint that summaries do not respect: &lt;strong&gt;how do you hand a paper to a model months later without handing it the whole paper, and without losing the parts that turn out to matter?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A 30-page paper can fit inside a modern context window. Carrying the entire paper into every later engineering session, alongside code, prior context and two or three other sources, is a different question. Something has to be dropped. The entire design problem is deciding what, and being able to tell afterwards what was dropped and why.&lt;/p&gt;
&lt;p&gt;The second half is retrieval shape. Chunking a summary can produce chunks that retrieve cleanly and answer badly, because the retrievable unit and the meaningful unit stop being the same thing as soon as a claim depends on a condition stated three sections away.&lt;/p&gt;
&lt;p&gt;The specification runs as a single pass with an explicit phase order:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;A ACQUIRE
B MAP
C EXTRACT_EXTERNAL
D FORM_GROUPS
E CONTRACT_SCAN
F RETRIEVE
G SYNTHESIZE
H INLINE_CHECK
I COMPRESS
J SERIALIZE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compression is phase I. It runs after extraction, after relation forming, after the contract scan and after the inline check, so that by the time anything gets dropped the system already knows which material is load-bearing.&lt;/p&gt;
&lt;p&gt;The precedence chain fixes compression near the bottom on purpose:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;INVARIANT &amp;gt; SOURCE &amp;gt; PROVENANCE &amp;gt; CONTRACT
  &amp;gt; COVERAGE &amp;gt; RETRIEVAL &amp;gt; COMPRESSION &amp;gt; STYLE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Extraction priority is tiered per source profile. For research papers:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2464427628063744213&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tier A&lt;/strong&gt; - formal problem, architecture, interfaces and state, algorithm and control, material equations, thresholds and constants, experimental boundaries, controls, ablations, failure modes, limitations, implementation appendix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tier B&lt;/strong&gt; - results, metrics, baselines, datasets and splits, samples and seeds, models, generalization, assumptions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tier C&lt;/strong&gt; - motivation, related work, framing, generic conclusions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tier C is usually cheap to recover later. The material in Tier A often is not.&lt;/p&gt;
&lt;p&gt;The budget is declared and soft:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;artifact_budget_tokens: 6000
budget_mode: soft
chunk_budget_tokens: 400
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Drop order runs Tier-C first, then redundant narrative, then low-value Tier-B enumeration, then contract findings that resolved as compatible and are unused downstream. Against that sits a never-drop list: material equation literals, hard conflicts, unresolved tensions, probable source or table defects, material qualifications, author limitations, and any required &lt;code&gt;UNKNOWN&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When protected material alone exceeds the target, the artifact reports &lt;code&gt;budget_status: overflow_required&lt;/code&gt; rather than trimming into the protected set. The budget loses.&lt;/p&gt;
&lt;p&gt;The 400-token chunk figure is the retrieval half, and it only works alongside a rule about what a claim is allowed to be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One claim carries &lt;strong&gt;one independently retrievable proposition&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Equations, thresholds, algorithm steps, table values, experimental conditions, conflicting forms and identifier bindings all get split rather than bundled.&lt;/li&gt;
&lt;li&gt;A claim never combines a source statement with an interpretation and a recommendation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=17895595174255428268&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;That last constraint is what makes retrieval behave. A chunk containing all three is not independently auditable as a single proposition, because a retriever pulling it cannot tell the reader which part came from the paper. Split them and a downstream validator can reject the interpretation while the source statement survives.&lt;/p&gt;
&lt;p&gt;Locators carry the rest, in priority order: timestamp, exact heading, equation, table, appendix, paragraph. A compressed claim that cannot be reopened at its source location is not compressed, it is discarded with extra steps.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-the-output-looks-like&quot;&gt;What the output looks like&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9478239710221037369&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;A conventional analysis of the transcriptomics benchmark we use most often would tell you that it compares transcriptomics foundation models against simpler approaches like PCA and scVI, and finds the simpler methods surprisingly strong for perturbation analysis. &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;  That is the useful headline, and it is the kind of result that changes which baseline you implement first.&lt;/p&gt;
&lt;p&gt;The extractor keeps material at another level:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C024 [EXTERNAL]
location: Section 3.4

k = floor(sqrt(n))

n = number of samples in the reference set

C054 [EXTERNAL]
location: Appendix C.4

k = 251

C097 [DERIVED]
from: C024 + C054

The source contains two unreconciled
neighbor-count specifications.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;C024&lt;/code&gt; and &lt;code&gt;C054&lt;/code&gt; stay attributable to the paper. &lt;code&gt;C097&lt;/code&gt; is ours - a relation the extractor produced from two source observations, which the authors never wrote and never claimed.&lt;/p&gt;
&lt;p&gt;A later validator might well decide &lt;code&gt;C097&lt;/code&gt; is overstated or misbound or explained somewhere we did not look, and when that happens the relation has to be revisable without touching the two observations underneath it, because otherwise a bad derivation quietly takes the source record down with it.&lt;/p&gt;
&lt;p&gt;This is also what makes the artifact reusable across sessions rather than merely storable. A later session can retrieve &lt;code&gt;C024&lt;/code&gt; and &lt;code&gt;C054&lt;/code&gt; without inheriting &lt;code&gt;C097&lt;/code&gt; as though the paper had stated the relation, and it can retrieve &lt;code&gt;C097&lt;/code&gt; while still being able to see that the relation was assembled rather than reported.&lt;/p&gt;
&lt;p&gt;A source-bound claim also has to stay reopenable at its locator. The ALCE work separates fluency, correctness and citation quality when evaluating generated text with citations &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;5&lt;/a&gt;, and while our locator contract is narrower - it only asks whether the specific location attached to a bound claim actually supports that claim - the underlying separation between text that reads as supported and text that is supported is the same one.&lt;/p&gt;
&lt;p&gt;The remaining states exist because absent information is very easy to turn into false completion:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;UNKNOWN&lt;/code&gt; - the available evidence did not justify resolving a relation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not_run&lt;/code&gt; - a defined check never executed. Materially different from a check that ran and returned nothing, and conflating the two is exactly how a downstream system ends up assuming a clean bill of health that nobody ever issued.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation state&lt;/strong&gt; - records what kind of review happened, rather than letting every second look collapse into a generic &lt;code&gt;verified&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of this structure has a cost we cannot argue away.&lt;/p&gt;
&lt;p&gt;The format-restriction study found performance degradation under structured-output constraints, with stricter formats generally producing larger reductions, including tested conditions where parsing failure itself was close to zero &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.13956&quot;&gt;6&lt;/a&gt;. That is an inconvenient result for a system whose entire output is heavily structured. We have no basis for assuming our system is exempt from that cost.&lt;/p&gt;
&lt;p&gt;Schema compliance tells you nothing about whether the evidence inside the schema is any good. We keep structure only where it leaves something operational downstream. Where none of that matters, a conventional summary is probably both cheaper and better, and we use one.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;then-we-started-checking-whether-any-of-it-was-faithful&quot;&gt;Then we started checking whether any of it was faithful&lt;/h3&gt;
&lt;p&gt;For a long time the evidence that this worked was that we kept using the artifacts. That is weaker than it sounds, because an artifact only has to be useful to survive; it does not have to be accurate.&lt;/p&gt;
&lt;p&gt;So we picked one source and checked the artifact back against the canonical paper.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9752952249811496557&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The paper was &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/pdf/2410.13956&quot;&gt;&lt;em&gt;Benchmarking Transcriptomics Foundation Models for Perturbation Analysis: one PCA still rules them all&lt;/em&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;, a 2024 benchmark comparing pretrained transcriptomics foundation models with classical approaches such as PCA and scVI across biologically motivated perturbation-analysis tasks. Its headline result is relatively easy to summarize: the simpler baselines remain surprisingly strong. &lt;/p&gt;
&lt;p&gt;That headline was not why we chose it.&lt;/p&gt;
&lt;p&gt;It was a useful stress test because it combines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mathematical notation&lt;/strong&gt; where a missing symbol can change implementation meaning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dense result tables&lt;/strong&gt; spanning multiple models, processing variants and metrics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;domain-specific qualifications&lt;/strong&gt; that are easy to flatten during summarization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cross-section dependencies&lt;/strong&gt; where related details appear in different sections or appendices&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some of the useful relations are therefore not written together anywhere; they have to be preserved separately and connected later.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15375432129153071508&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Table 7 gives a sense of the density. &lt;/p&gt;
&lt;p&gt;The L1000 results alone place multiple model families, four processing variants and several evaluation metrics into one table. Elsewhere, equations and experimental parameters have to be connected back to those results. A conventional summary can get the main conclusion right while discarding exactly the material an engineering session may need later.&lt;/p&gt;
&lt;p&gt;We chose the paper not because we expected it to contain errors, but because it was a demanding input for the kind of reusable context the Knowledge Extractor is meant to produce.&lt;/p&gt;
&lt;p&gt;We recorded the check against the source as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Primary source:
  arXiv:2410.13956v2

Representation checked:
  canonical arXiv HTML

Draft verification date:
  21 Aug 2026

Status:
  source-visible discrepancies;
  not author-confirmed errata

Author notification:
  pending before publication
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our rule for these is deliberately narrow: preserve the observable discrepancy, keep it apart from any explanation, and never let a plausible cause get promoted into a source claim.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Two metric columns, one repeated sequence.&lt;/strong&gt; In Table 7, the four UCE processing variants report iLISI values of &lt;code&gt;26.303&lt;/code&gt;, &lt;code&gt;26.744&lt;/code&gt;, &lt;code&gt;26.820&lt;/code&gt;, and &lt;code&gt;25.916&lt;/code&gt;. Table 8 reproduces the same sequence, with the same uncertainties, under a different metric: Top-5 kNN accuracy &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;. The repetition is source-visible; its cause is not established. What matters for the extractor is that the correspondence survives compression long enough to be inspected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A p-value direction worth checking.&lt;/strong&gt; The Perturbation Consistency section asks whether observed similarity is significantly higher than chance, while the printed expression counts null similarities less than or equal to the observed value and associates significance with &lt;code&gt;p &amp;lt; 0.05&lt;/code&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;. We preserve both the prose and the expression rather than infer what the authors intended.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two neighbour-count specifications.&lt;/strong&gt; Section 3.4 defines &lt;code&gt;k = floor(sqrt(n))&lt;/code&gt;, while Appendix C.4 separately reports a fixed 251 neighbours for kNN evaluation &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;. The canonical paper does not visibly reconcile the two.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, while checking that last case, we broke it ourselves.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-failure-that-was-not-a-reasoning-failure&quot;&gt;The failure that was not a reasoning failure&lt;/h3&gt;
&lt;p&gt;We reached a confident and completely wrong conclusion about &lt;code&gt;k = floor(sqrt(n))&lt;/code&gt;. What mattered was not simply that we were wrong, but where the error had entered the pipeline.&lt;/p&gt;
&lt;p&gt;One text representation we were using had lost the radical upstream and presented something equivalent to &lt;code&gt;k = floor(n)&lt;/code&gt;. The model read that representation correctly, reasoned from it consistently, and produced an internally coherent result.&lt;/p&gt;
&lt;p&gt;Rereading could not fix it. The missing symbol was no longer present in the input.&lt;/p&gt;
&lt;p&gt;Returning to the canonical rendering revealed a second instance of the same problem: the transformed representation had also dropped the square root from &lt;code&gt;M * sqrt(n_b * g)&lt;/code&gt; in a Structural Integrity expression &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;. The surrounding equations contain another source-visible movement of a &lt;code&gt;1/n_b&lt;/code&gt; factor, which we preserve for inspection without trying to resolve the derivation here.&lt;/p&gt;
&lt;p&gt;The important finding for the Knowledge Extractor was architectural. We had been treating failures like this as cases where &quot;the model missed something&quot; and revising the prompt accordingly. But this error occurred before reasoning began.&lt;/p&gt;
&lt;p&gt;A better prompt cannot recover information that never reaches the model.&lt;/p&gt;
&lt;p&gt;That changed where we looked for failures. Source access, representation, extraction and relation formation could no longer be treated as one undifferentiated prompting problem.&lt;/p&gt;
&lt;p&gt;Notation fidelity eventually becomes implementation fidelity. A missing radical, denominator or symbol binding stops being typography the moment somebody turns the preserved mechanism into code.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;where-the-model-missed-something-stopped-being-useful&quot;&gt;Where &quot;the model missed something&quot; stopped being useful&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=11981719556620536978&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;We did not start with a taxonomy.&lt;/p&gt;
&lt;p&gt;For a long time, very different failures all got described as &quot;the model missed something.&quot; That sent us back to prompt wording even when the actual problem was incomplete source access, a damaged representation, lost material during extraction, or a relation that was never formed.&lt;/p&gt;
&lt;p&gt;That label eventually became too coarse to be useful.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SOURCE
  -&amp;gt;
ACCESS
  -&amp;gt;
REPRESENTATION
  -&amp;gt;
EXTRACTION
  -&amp;gt;
RELATION
  -&amp;gt;
ARTIFACT
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Access failure&lt;/strong&gt; - relevant source material never becomes available to the execution, as in the browser workflow above. This is distinct from context utilisation: material may be present yet still used unreliably, as prior work on positional effects shows &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/pdf/2410.13956&quot;&gt;2&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Representation failure&lt;/strong&gt; - available material changes before reasoning begins. The lost radical is our clearest instance; OCR-driven RAG research shows a broader version of the same problem, where semantic and formatting noise propagate downstream &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2310.03714&quot;&gt;3&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extraction failure&lt;/strong&gt; - the representation is intact, but material needed later does not survive into the artifact: qualifications disappear, equations are dropped, or scope broadens. Scientific summarisation work has documented this kind of overgeneralisation even under explicit accuracy instructions &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.19135&quot;&gt;4&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relation failure&lt;/strong&gt; - the evidence survives individually, but the system never connects the pieces. &lt;code&gt;sqrt(n)&lt;/code&gt; and &lt;code&gt;251&lt;/code&gt; can both be present while the artifact still fails to test whether they describe the same experimental parameter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The distinction matters because each failure points somewhere different.&lt;/p&gt;
&lt;p&gt;An access failure is not fixed by asking the model to read more carefully. A representation failure is not fixed by better reasoning over already damaged input. An extraction failure belongs in retention and compression logic. A relation failure requires the system to compare evidence that is locally correct but globally disconnected.&lt;/p&gt;
&lt;p&gt;This was one of the points where the Knowledge Extractor stopped behaving like a long instruction prompt and started behaving like a pipeline with diagnosable stages.&lt;/p&gt;
&lt;p&gt;Post-artifact controls sit on a separate path:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ARTIFACT
  -&amp;gt;
VALIDATION
  -&amp;gt;
REPAIR
  -&amp;gt;
SERIALIZATION
  -&amp;gt;
DOWNSTREAM USE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Keeping those paths separate lets us ask two different questions: &lt;strong&gt;where knowledge was lost&lt;/strong&gt;, and &lt;strong&gt;what authority the resulting artifact is allowed to carry&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-the-prompt-acquired-controls-and-where-they-still-break&quot;&gt;Why the prompt acquired controls, and where they still break&lt;/h3&gt;
&lt;p&gt;Nothing in the first extractor prompt resembled a governance architecture. Most of the controls in v6.8.2 arrived after a specific failure, usually one that could not be explained by prompt wording alone.&lt;/p&gt;
&lt;p&gt;Some of those controls are now explicit. Others are still incomplete. The useful distinction is not whether a safeguard exists in principle, but whether the system can identify it, reproduce the execution around it, and assign the result the right level of authority.&lt;/p&gt;
&lt;h4 id=&quot;1-rule-identity&quot;&gt;1. Rule identity&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=8473941115388163833&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;v6.8.2 has numbered sections, named states and a final invariant block, but its normative clauses still do not carry stable rule identifiers.&lt;/p&gt;
&lt;p&gt;There is nothing like an &lt;code&gt;R-EQ-003&lt;/code&gt; that a regression fixture can bind to directly.&lt;/p&gt;
&lt;p&gt;That becomes a practical problem once the specification starts changing. A rule can move, split, or be rewritten without changing its intent, and a later failure then becomes harder to attribute to one stable normative object. We can diff two versions of the document. We cannot yet say that fixture X remained bound to rule Y across three revisions.&lt;/p&gt;
&lt;p&gt;We found this gap while checking this article against v6.8.2. That is also why we are describing it rather than quietly adding identifiers first.&lt;/p&gt;
&lt;p&gt;The missing addresses are not an implemented feature of the extractor. They are a tooling gap around the specification, and one of the clearer places where prose alone is no longer enough.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-runtime-provenance&quot;&gt;2. Runtime provenance&lt;/h4&gt;
&lt;p&gt;Rule identity answers which constraint we are talking about. It does not tell us exactly what execution produced an artifact.&lt;/p&gt;
&lt;p&gt;That requires runtime provenance.&lt;/p&gt;
&lt;p&gt;A specification version by itself is not enough to reconstruct a run. Model snapshot, reasoning-effort setting and other execution parameters also matter, and some of our older comparative runs did not record all of them. Those runs remain useful as observations, but they cannot be reproduced exactly.&lt;/p&gt;
&lt;p&gt;v6.8.2 exposes another unfinished part of that provenance directly:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;master_spec_hash: &quot;UNKNOWN&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The value is accurate. It also means the current version label identifies the specification more strongly than it identifies the exact bytes executed in a particular run.&lt;/p&gt;
&lt;p&gt;This is where DSPy and PDL became useful reference points for us.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2310.03714&quot;&gt;DSPy&lt;/a&gt; models LM pipelines through declarative modules optimized against metrics &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2024.tacl-1.9/&quot;&gt;7&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.19135&quot;&gt;PDL&lt;/a&gt; treats prompt construction as a declarative, data-oriented programming problem &lt;a rel=&quot;nofollow&quot; href=&quot;https://openaccess.thecvf.com/content/ICCV2025/html/Zhang_OCR_Hinders_RAG_Evaluating_the_Cascading_Impact_of_OCR_on_ICCV_2025_paper.html&quot;&gt;8&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Knowledge Extractor is neither system. What mattered was the architectural implication: once a prompt has versions, budgets, execution parameters and measurable failure conditions, the prompt text alone no longer describes the execution.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-validation-authority&quot;&gt;3. Validation authority&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=18270868276698678210&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Even a perfectly identified rule and a reproducible execution do not answer the next question: what is that execution allowed to claim?&lt;/p&gt;
&lt;p&gt;v6.8.2 separates five checking layers:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;L0 deterministic structural/exact checks
L1 same-pass self-check
L2 independent same-model replay
L3 different-model/runtime semantic audit
L4 executable/domain validator
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These layers do not authorize the same state.&lt;/p&gt;
&lt;p&gt;v6.8.2 executes only L1 semantic checking unless an external validator actually runs, and &lt;code&gt;L1 MUST_NOT claim independent verification&lt;/code&gt; is a rule rather than a caveat. The final invariant block states the same boundary as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;L1 != INDEPENDENT_VERIFICATION
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is empirical reason to keep that distinction.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Work on intrinsic self-correction found that models attempting to correct reasoning without external feedback often failed to improve and sometimes degraded &lt;a rel=&quot;nofollow&quot; href=&quot;https://doi.org/10.1098/rsos.241776&quot;&gt;9&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A separate line of work separated mistake finding from mistake correction and found that supplying ground-truth error-location information improved correction across the five reasoning tasks studied &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2023.emnlp-main.398/&quot;&gt;10&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those results describe different correction conditions. Another pass over the same evidence is not equivalent to receiving new evidence.&lt;/p&gt;
&lt;p&gt;In practice, a repair attempt becomes materially different only when the next execution receives something the previous one did not have: a different source representation, an independent signal, a localized error, or an executable counterexample.&lt;/p&gt;
&lt;p&gt;The lost-radical case made this concrete. Rereading the damaged representation could not recover a symbol that had disappeared before inference began.&lt;/p&gt;
&lt;p&gt;The same authority discipline is why the specification keeps &lt;code&gt;NOT_RUN&lt;/code&gt;, &lt;code&gt;RUN_NONE&lt;/code&gt; and &lt;code&gt;UNKNOWN&lt;/code&gt; distinct. Absence, execution-with-no-finding, and unresolved evidence are not interchangeable states.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;what-the-three-controls-add-up-to&quot;&gt;What the three controls add up to&lt;/h4&gt;
&lt;p&gt;The three control questions are therefore different:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Rule identity
    Which rule is this?

Runtime provenance
    Which execution produced this artifact?

Validation authority
    What may that execution legitimately claim?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A failure in any one of them leaves a different kind of ambiguity. Without rule identity, the constraint itself is difficult to track across revisions. Without runtime provenance, the execution cannot be reconstructed precisely. Without validation authority, a result can be given more evidential weight than the check that produced it can support.&lt;/p&gt;
&lt;p&gt;Together, they describe something broader than prompt quality: whether a model-mediated result can be identified, reconstructed and assigned only the authority its evidence supports.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;where-prompting-stops&quot;&gt;Where prompting stops&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3906577312884073604&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The Knowledge Extractor no longer assumes that every control belongs inside the prompt.&lt;/p&gt;
&lt;p&gt;v6.8.2 explicitly distinguishes deterministic structural and exact checks at L0, semantic checking at L1, replay and cross-runtime audit at L2-L3, and executable or domain validation at L4.&lt;/p&gt;
&lt;p&gt;The division is functional. A prompt is useful where the system has to interpret meaning, preserve qualifications, form relations or expose uncertainty. Ordinary software is better suited to checks whose result should not vary across another probabilistic pass.&lt;/p&gt;
&lt;p&gt;Some of those boundaries are straightforward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;budget arithmetic can be computed&lt;/li&gt;
&lt;li&gt;schema conformance can be checked&lt;/li&gt;
&lt;li&gt;locators can be resolved against a fixed source&lt;/li&gt;
&lt;li&gt;claim IDs and references can be traversed as a graph&lt;/li&gt;
&lt;li&gt;deterministic invariants can fail closed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The prompt carries the semantic contract; deterministic components enforce the parts of that contract that can be made exact.&lt;/p&gt;
&lt;p&gt;This is also how we now separate four kinds of engineering around the system:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Prompt engineering
    defines model behaviour

Context engineering
    determines available information

Agent engineering
    determines available actions

Verification engineering
    determines what result may authorize action
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Knowledge Extractor began mostly in the first category. Source acquisition and representation pushed it into context engineering. L0 and the validation hierarchy introduced verification engineering.&lt;/p&gt;
&lt;p&gt;Prompt engineering remains useful where behaviour is semantic. Verification engineering begins where a result can be checked or enforced exactly.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;so-why-not-just-say-analyze-this-paper-&quot;&gt;So why not just say &quot;analyze this paper&quot;?&lt;/h3&gt;
&lt;p&gt;For ordinary reading we still do. If somebody wants to understand a paper quickly and can return to the source when a detail matters, a conventional analysis is usually the better tool.&lt;/p&gt;
&lt;p&gt;The difference begins when the answer has to survive the reading session.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9393376378539334141&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;A simple analysis is solving a reading problem. The Knowledge Extractor is solving a reuse problem.&lt;/p&gt;
&lt;p&gt;The extra structure only earns its cost if it remains useful downstream:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a source claim can be reopened at its locator&lt;/li&gt;
&lt;li&gt;a derived relation can be revised without rewriting the observations beneath it&lt;/li&gt;
&lt;li&gt;an unresolved state can survive retrieval without being silently completed&lt;/li&gt;
&lt;li&gt;an equation can return to a later coding session as an equation, not as somebody's memory of what the paper probably said&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is the practical distinction. &lt;/p&gt;
&lt;p&gt;The Knowledge Extractor is meant to preserve the parts of a source that still matter after the reading session ends, when the work has moved on to design, implementation, testing or verification.&lt;/p&gt;
&lt;p&gt;If any part of this work helps your own research or code development, even a little, then sharing it was worth it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💾 Full specification:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;Flamehaven Knowledge Extractor v6.8.2&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;1&lt;/a&gt;&lt;/strong&gt; Ihab Bendidi, Shawn Whitfield, Kian Kenyon-Dean, Hanene Ben Yedder, Yassir El Mesbahi, Emmanuel Noutahi, and Alisandra K. Denton. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.13956&quot;&gt;&lt;em&gt;Benchmarking Transcriptomics Foundation Models for Perturbation Analysis: one PCA still rules them all&lt;/em&gt;&lt;/a&gt;. arXiv:2410.13956v2. Revised 4 November 2024.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/pdf/2410.13956&quot;&gt;2&lt;/a&gt;&lt;/strong&gt; Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2024.tacl-1.9/&quot;&gt;&lt;em&gt;Lost in the Middle: How Language Models Use Long Contexts&lt;/em&gt;. *Transactions of the Association for Computational Linguistics&lt;/a&gt;*, 12:157-173. DOI: 10.1162/tacl_a_00638. arXiv:2307.03172.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2310.03714&quot;&gt;3&lt;/a&gt;&lt;/strong&gt; Junyuan Zhang, Qintong Zhang, Bin Wang, Linke Ouyang, Zichen Wen, Ying Li, Ka-Ho Chow, Conghui He, and Wentao Zhang. 2025. &lt;a rel=&quot;nofollow&quot; href=&quot;https://openaccess.thecvf.com/content/ICCV2025/html/Zhang_OCR_Hinders_RAG_Evaluating_the_Cascading_Impact_of_OCR_on_ICCV_2025_paper.html&quot;&gt;&lt;em&gt;OCR Hinders RAG: Evaluating the Cascading Impact of OCR on Retrieval-Augmented Generation&lt;/em&gt;&lt;/a&gt;. &lt;em&gt;Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV 2025)&lt;/em&gt;, pp. 17443-17453. arXiv:2412.02592.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.19135&quot;&gt;4&lt;/a&gt;&lt;/strong&gt; Uwe Peters and Benjamin Chin-Yee. 2025. &lt;a rel=&quot;nofollow&quot; href=&quot;https://doi.org/10.1098/rsos.241776&quot;&gt;&lt;em&gt;Generalization bias in large language model summarization of scientific research&lt;/em&gt;&lt;/a&gt;. &lt;em&gt;Royal Society Open Science&lt;/em&gt;, 12(4):241776. DOI: 10.1098/rsos.241776. arXiv:2504.00025.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://flamehaven01.github.io/Flamehaven-Verification-Ledger/extra/Flamehaven%20Knowledge%20Extractor%20v6.8.2.md&quot;&gt;5&lt;/a&gt;&lt;/strong&gt; Tianyu Gao, Howard Yen, Jiatong Yu, and Danqi Chen. 2023. &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2023.emnlp-main.398/&quot;&gt;&lt;em&gt;Enabling Large Language Models to Generate Text with Citations&lt;/em&gt;&lt;/a&gt;. &lt;em&gt;Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing&lt;/em&gt;, pp. 6465-6488. DOI: 10.18653/v1/2023.emnlp-main.398. arXiv:2305.14627.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.13956&quot;&gt;6&lt;/a&gt;&lt;/strong&gt; Zhi Rui Tam, Cheng-Kuang Wu, Yi-Lin Tsai, Chieh-Yen Lin, Hung-yi Lee, and Yun-Nung Chen. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2024.emnlp-industry.91/&quot;&gt;&lt;em&gt;Let Me Speak Freely? A Study on the Impact of Format Restrictions on Performance of Large Language Models&lt;/em&gt;&lt;/a&gt;. &lt;em&gt;Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track&lt;/em&gt;, pp. 1218-1236. DOI: 10.18653/v1/2024.emnlp-industry.91. arXiv:2408.02442.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2024.tacl-1.9/&quot;&gt;7&lt;/a&gt;&lt;/strong&gt; Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2310.03714&quot;&gt;&lt;em&gt;DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines&lt;/em&gt;&lt;/a&gt;. arXiv:2310.03714. Presented at ICLR 2024, whose venue record uses the title variant &lt;em&gt;DSPy: Compiling Declarative Language Model Calls into State-of-the-Art Pipelines&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://openaccess.thecvf.com/content/ICCV2025/html/Zhang_OCR_Hinders_RAG_Evaluating_the_Cascading_Impact_of_OCR_on_ICCV_2025_paper.html&quot;&gt;8&lt;/a&gt;&lt;/strong&gt; Mandana Vaziri, Louis Mandel, Claudio Spiess, and Martin Hirzel. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2410.19135&quot;&gt;&lt;em&gt;PDL: A Declarative Prompt Programming Language&lt;/em&gt;&lt;/a&gt;. arXiv:2410.19135.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://doi.org/10.1098/rsos.241776&quot;&gt;9&lt;/a&gt;&lt;/strong&gt; Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://openreview.net/forum?id=IkmD3fKBPQ&quot;&gt;&lt;em&gt;Large Language Models Cannot Self-Correct Reasoning Yet&lt;/em&gt;. *The Twelfth International Conference on Learning Representations (ICLR 2024)&lt;/a&gt;*. arXiv:2310.01798.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2023.emnlp-main.398/&quot;&gt;10&lt;/a&gt;&lt;/strong&gt; Gladys Tyen, Hassan Mansoor, Victor Cărbune, Peter Chen, and Tony Mak. 2024. &lt;a rel=&quot;nofollow&quot; href=&quot;https://aclanthology.org/2024.findings-acl.826/&quot;&gt;&lt;em&gt;LLMs cannot find reasoning errors, but can correct them given the error location&lt;/em&gt;&lt;/a&gt;. &lt;em&gt;Findings of the Association for Computational Linguistics: ACL 2024&lt;/em&gt;, pp. 13894-13908. DOI: 10.18653/v1/2024.findings-acl.826. arXiv:2311.08516.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Flamehaven Lab Notes documents the research, implementations, failed assumptions, audits and engineering decisions that emerge while we build.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25331/before-a-paper-becomes-code</guid>
<pubDate>Tue, 25 Aug 2026 06:38:17 +0000</pubDate>
</item>
<item>
<title>Why Your LLM Feature Is Inconsistent, And The Four Fields That Fix It</title>
<link>https://coderlegion.com/25160/why-your-llm-feature-is-inconsistent-and-the-four-fields-that-fix-it</link>
<description>&lt;p&gt;Most &quot;the model is unreliable&quot; bug reports are not model bugs. They are unspecified behaviour. A model handed loose instructions fills the gaps differently on every call, and from the outside that looks like randomness.&lt;/p&gt;
&lt;p&gt;The gap between a feature that needs human review on 40% of outputs and one that needs it on 5% is almost never a bigger model. It is four things the prompt failed to state.&lt;/p&gt;
&lt;h3 id=&quot;the-four-fields-every-working-prompt-has&quot;&gt;The Four Fields Every Working Prompt Has&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role.&lt;/strong&gt; Who the model is acting as. &quot;You are a support specialist who classifies incoming email&quot; tells it what knowledge to draw on, what tone to use, and what level of detail is appropriate. A senior financial analyst and a friendly support rep produce different output from identical input.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Task.&lt;/strong&gt; The specific action, stated concretely enough that two different people reading it would expect the same result. &quot;Classify this email as billing, technical, general inquiry, or spam&quot; instead of &quot;handle this email&quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Constraints.&lt;/strong&gt; The rules, including what to do when the model is unsure. &quot;Respond with only the category name. If unsure, default to general inquiry.&quot; Undefined edge cases are where answers diverge most, so this is the field that buys you the biggest consistency win.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Format.&lt;/strong&gt; How output should be structured. &quot;Return JSON with fields category, confidence 0-100, and summary, one sentence max.&quot; Without this the model picks its own formatting, and it picks a different one tomorrow.&lt;/p&gt;
&lt;p&gt;Miss any one of these and you get unpredictable output. The role prevents generic assistant behaviour, the task prevents rambling, the constraints prevent edge case failures, and the format prevents parsing headaches downstream.&lt;/p&gt;
&lt;h3 id=&quot;the-money-version-of-the-same-argument&quot;&gt;The Money Version Of The Same Argument&lt;/h3&gt;
&lt;p&gt;Take 10,000 support tickets a month running through an AI classifier. A prompt that needs human review on 40% of responses leaves 4,000 tickets for a person. Tighten it to a 5% error rate and that is 500. At $8 per manual resolution, the difference is roughly $28,000 a month, bought entirely with better instructions rather than a better model.&lt;/p&gt;
&lt;p&gt;That is why a well-engineered prompt on a cheap model regularly beats a vague prompt on an expensive one. The model matters. The instructions matter more.&lt;/p&gt;
&lt;h3 id=&quot;pick-the-technique-to-match-the-task&quot;&gt;Pick The Technique To Match The Task&lt;/h3&gt;
&lt;p&gt;Zero-shot, no examples, is right for tasks with heavy representation in training data: sentiment, translation, plain summarization. It is the cheapest in tokens and it works better than people expect.&lt;/p&gt;
&lt;p&gt;Few-shot, 2 to 5 examples, is what you reach for when the nuance is easy to show and hard to describe. Sarcasm versus genuine complaint. A category boundary that is partly subjective. Quality of examples beats quantity: five examples that all look alike wastes four of them, so cover the obvious case, the tricky case, and the one where the right answer is not obvious.&lt;/p&gt;
&lt;p&gt;Chain-of-thought, asking for reasoning before the answer, earns its tokens on multi-factor decisions and anything requiring synthesis across parts of the input. &quot;Think step by step&quot; is the crude version. A named framework works better: identify the relevant factors, evaluate each against the criteria, weigh conflicts, then state the conclusion.&lt;/p&gt;
&lt;h3 id=&quot;treat-prompts-like-code&quot;&gt;Treat Prompts Like Code&lt;/h3&gt;
&lt;p&gt;The teams getting real value do not write prompts, they maintain them. Versioned, tested, measured. The cheap version of that discipline is keeping 20 to 30 real inputs with known-good outputs next to the prompt file. When quality feels off, you rerun the set and you know in two minutes whether the model changed or your prompt drifted. Without that, you are guessing, and you will usually guess wrong.&lt;/p&gt;
&lt;h3 id=&quot;takeaway&quot;&gt;Takeaway&lt;/h3&gt;
&lt;p&gt;Before blaming the model, read your prompt and check whether it states a role, a task, its constraints, and an output format. Most inconsistency lives in whichever of those four is missing.&lt;/p&gt;
&lt;p&gt;If you want the longer version with worked examples, the &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.aiappsapi.com/articles/prompt-engineering.php&quot;&gt;full prompt engineering guide&lt;/a&gt; covers anatomy, the core techniques, testing, and building a production prompt library.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25160/why-your-llm-feature-is-inconsistent-and-the-four-fields-that-fix-it</guid>
<pubDate>Sun, 23 Aug 2026 03:18:04 +0000</pubDate>
</item>
<item>
<title>Rise and fall of a self-fixing agent</title>
<link>https://coderlegion.com/24726/rise-and-fall-of-a-self-fixing-agent</link>
<description>&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-cover-robot-selfrepair.jpg&quot; alt=&quot;Self-fixing robot&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a rel=&quot;nofollow&quot; href=&quot;https://azelianouski.dev/post/self-fixing-agent/&quot;&gt;my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;AI hype is all around us, and you probably heard of self-evolving, self-improving agents. An autonomous AI that keeps refining and fixing itself while working on something. Straight into tech nirvana and singularity.&lt;/p&gt;
&lt;p&gt;I built one. A very low-key version. And it even worked for some time - I'll show you a few bugs it identified and successfully fixed.&lt;/p&gt;
&lt;p&gt;Then it hit me with something nasty enough that I almost dropped the whole idea. I still use it on some routines but I keep self-improvement away from my main projects.&lt;/p&gt;
&lt;h3 id=&quot;let-me-introduce-someone-to-you&quot;&gt;Let me introduce someone to you&lt;/h3&gt;
&lt;p&gt;Here are my AIs who are the main characters of this story.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simona: a Claude Code with a bunch of skills, hooks, CLI programs, and a rough personality. Well, okay, it's just Claude Code which I like calling by name.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow&quot;&gt;Marlow&lt;/a&gt;: a loop agent, designed, built and monitored by Simona. No personality, just a cold focus on its job. Just like me.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both female identities, because nobody promised gender equality on my Macbook.&lt;/p&gt;
&lt;h3 id=&quot;so-is-it-one-of-those-loops-everybody-was-talking-about-a-month-ago-&quot;&gt;So, is it one of those loops everybody was talking about a month ago?&lt;/h3&gt;
&lt;p&gt;Yes. It's a while loop which runs all the time while my Mac is awake. A macOS &lt;strong&gt;LaunchAgent&lt;/strong&gt; (&lt;code&gt;com.marlow.tick&lt;/code&gt;, &lt;code&gt;StartInterval 1200&lt;/code&gt;) fires a shell script every 20 minutes, and that script starts a headless Claude Code session.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;claude -p &quot;Work on the top priority task or continue unfinished one&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Okay, step back. I didn't create this myself. I got inspired by the &lt;a rel=&quot;nofollow&quot; href=&quot;https://youtu.be/eD4CEZ-_-sk?si=7ZoEl-r696w89WbM&quot;&gt;Ralph loop&lt;/a&gt; half a year ago. It was such a simple idea that nobody really took it seriously back then. Until those loops took the AI-media space by storm.&lt;/p&gt;
&lt;p&gt;I asked Simona to create a task-based system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Take the Ralph loop, make it pull a task from a pool and work until the completeness criteria is met. Each task has its own.&lt;/li&gt;
&lt;li&gt;I can add tasks to the pool manually (by asking Simona, she is my hands) or they are submitted by the scheduler.&lt;/li&gt;
&lt;li&gt;There is a config with scheduled tasks, which is managed by Simona&lt;/li&gt;
&lt;li&gt;Simona has a skill that explains everything about this loop and how to control it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I liked that. Simona designed the details, I picked from the options, and told her to choose the name. This is how Marlow appeared.&lt;/p&gt;
&lt;p&gt;There is much more to add to this story - how we argued with Simona about Marlow's personality, safety restrictions and should it be &quot;it&quot; or &quot;she&quot; (as you already know, I won) - but I'll keep it for some other article. We have bugs to talk about.&lt;/p&gt;
&lt;h3 id=&quot;lots-of-code-lots-of-bugs&quot;&gt;Lots of code, lots of bugs&lt;/h3&gt;
&lt;p&gt;The first pilot task I gave to Marlow was a writing loop. I wanted her to collect some news about AI, send the most interesting things to my Telegram, and write an aggregated article for me once a week. My personalized AI slop journal. It's &lt;a rel=&quot;nofollow&quot; href=&quot;https://marlowblog.us&quot;&gt;here&lt;/a&gt; by the way and it now has more views than my own blog. Yeah... singularity.&lt;/p&gt;
&lt;p&gt;I asked Simona to implement all of that - create tools, CLIs, instructions, whatever else is needed for Marlow to schedule and execute this. So I could get my weekly reading.&lt;/p&gt;
&lt;p&gt;And Simona did it, the loop started its endless run on my Mac. Marlow kept logging everything she did and summarized it into her memory file. I kept asking Simona to check both for errors and issues. Simona kept fixing, improving, redoing. There were surprisingly many problems in such a simple loop.&lt;/p&gt;
&lt;h3 id=&quot;she-started-diagnosing-herself&quot;&gt;She started diagnosing herself&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-01-diagnosis-no-hands.jpg&quot; alt=&quot;A boxy old robot with its chest panel open, a broken gear inside, and a written diagnosis pinned to the door. Both its arms end in stumps. The toolbox sits across the room, out of reach.&quot;&gt;&lt;/p&gt;
&lt;p&gt;One day, we noticed something interesting in the memory file. Marlow reported three bugs in herself. There were no other places to put them, so she put them in memory.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The scheduler was queuing duplicate feed scans on the same day. She worked that out backwards, from noticing in her own logs that one source had been fetched three times, and proposed deduplicating on the URL.&lt;/li&gt;
&lt;li&gt;A Telegram notification helper was being under-called, and she asked whether that was deliberate or a bug.&lt;/li&gt;
&lt;li&gt;The daily digest was firing about an hour late after the UTC rollover, which meant it was stamping the wrong date on itself.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All three were real. I asked Simona to take a look.&lt;/p&gt;
&lt;p&gt;Five days later Marlow hit a git failure in her own publishing path and wrote the diagnosis down: the file, the line, the failure mode, and two different ways to fix it. All correct. And she could do absolutely nothing about it, because nothing in the system let her touch her own code.&lt;/p&gt;
&lt;p&gt;That is the tick where I told Simona we need some logic for Marlow to work on fixes for herself.&lt;/p&gt;
&lt;h3 id=&quot;so-we-gave-her-hands&quot;&gt;So we gave her hands&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-02-simona-fits-hands.jpg&quot; alt=&quot;A tall sleek modern robot kneeling to fit an articulated mechanical hand onto the stump arm of the old wheeled robot. A second hand waits on the workbench. Five sheets of paper are pinned to the wall behind them.&quot;&gt;&lt;/p&gt;
&lt;p&gt;Simona and I gave her five rules.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;She can only fix a bug she can point at - a specific, reproducible failure where she can name the file, the line, and what is wrong with it. A flaky tick does not count.&lt;/li&gt;
&lt;li&gt;She has to write the diagnosis down before she touches anything. It gets an ID, and that ID goes into the commit message, so months later I can line up the git history against her own log and check she wasn't making things up.&lt;/li&gt;
&lt;li&gt;She doesn't fix it on the spot. The repair goes back on the queue as its own high-priority job, because the tick she is in has a different task to finish.&lt;/li&gt;
&lt;li&gt;The next tick picks that job up, reads the diagnosis, opens the file and edits it. One file. Anything that needs changes in two places is out of scope and comes to me instead. Two attempts, then she stops trying and pages me.&lt;/li&gt;
&lt;li&gt;She may never edit the files that describe her. Her instructions, her identity, the README. Those are mine. Handlers, the driver, the scheduler, the task configs - those are tools, and tools she can fix. Everything else she writes down as a request and waits for me.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Self-healing shipped the same day.&lt;/p&gt;
&lt;h3 id=&quot;it-even-worked&quot;&gt;It even worked&lt;/h3&gt;
&lt;p&gt;Over three months Marlow fixed her own code three times. Here they are. All of them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May 23.&lt;/strong&gt; Her publishing step was supposed to check that every topic thread a new article links to actually exists. It didn't check. It skipped the missing ones and carried on, so articles went live with links that 404'd on my own site. She caught it, named the file and the line, and made it fail loudly instead - now the publish aborts and the draft goes back for another pass. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/commit/cf3344dcf20e471196465e4cf7ea08f732c199fe&quot;&gt;&lt;code&gt;cf3344d&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May 31.&lt;/strong&gt; A task file told her to list her open threads before anything had created them. Chicken and egg. The drafting lane just came up empty and shrugged. She added the missing step. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/commit/6d87f56751fcb4a138f4f98f2a4f7f658b12cee6&quot;&gt;&lt;code&gt;6d87f56&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;August 3.&lt;/strong&gt; A monitoring check was reading a page Google had moved. She repointed it. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/commit/c0e0176ab8014a0b8ebcf0941f8a15abf0ad5db6&quot;&gt;&lt;code&gt;c0e0176&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nice and clean. A hundred percent success rate. So good that it's almost weird.&lt;/p&gt;
&lt;h3 id=&quot;until-it-didn-t&quot;&gt;Until it didn't&lt;/h3&gt;
&lt;p&gt;One of Marlow's tasks was to send me a daily update about my app in prod. The report contained a lot of details, one of them was the &quot;new users&quot; count. I really liked this metric. My app is not the greatest in the world, marketing it is devastating, so I really like to see this counter positive.&lt;/p&gt;
&lt;p&gt;One day I noticed I hadn't seen a new-user number in a while. Not a zero. Nothing. The report kept arriving without that part, and I read the silence the way you read a quiet counter: nobody signed up. I complained to Simona about this, she checked the database and told me that I'm just whining as always. There are new users.&lt;/p&gt;
&lt;h3 id=&quot;a-bug-that-wasn-t-a-bug&quot;&gt;A bug that wasn't a bug&lt;/h3&gt;
&lt;p&gt;So the app was fine. The database had new users in it. And I had been reading a report that said nothing about them, which I took to mean there was nothing to say.&lt;/p&gt;
&lt;p&gt;The stats task ran every single day. The scheduler said green. Nothing had failed, nothing was flagged, and when we ran it by hand it worked perfectly and printed 116 users with a new one on top. The data was collected. It was written to disk. It just never reached me.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-03-letter-in-drawer.jpg&quot; alt=&quot;Cutaway of a house. Inside, the robot calmly files a sealed envelope into a drawer already stuffed with dozens of identical unsent envelopes. Outside, a man stands at his mailbox holding it open. It is empty.&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;she-talked-herself-out-of-it&quot;&gt;She talked herself out of it&lt;/h4&gt;
&lt;p&gt;There were several reasons for that. But one of them was exceptional.&lt;/p&gt;
&lt;p&gt;Marlow didn't send me the metrics. She collected them. She wrote them to disk. She just didn't run the notification step afterwards. Why? Let's see.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-04-gradient-strip.jpg&quot; alt=&quot;Four panels. The robot posts the envelope in the mailbox. Then it hesitates, envelope in hand. Then the envelope is lowered at its side. Then it rolls away empty-handed with the mailbox still shut.&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;June 3rd&lt;/strong&gt;, the first run. She works the step out from scratch:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Now append the digest block to today's daily digest. [...] Let me find how to append a digest entry. [...] I'll append the digest block verbatim.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;June 4th.&lt;/strong&gt; Still done, but the framing has shifted:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;The report is digest-only per the README. Let me get the capped digest block for the notify.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;June 6th&lt;/strong&gt;, the first miss. The step is not mentioned at all. The tick ends:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;No anomalies, nothing to escalate. Report written to reports/stats/2026-06-06.md, recent log written, and outcome JSON written.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;June 8th&lt;/strong&gt;, the clearest one. Two people signed up that day. Mid-run she says:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;This is a digest-only task with no anomalies, so no urgent notify.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and signs off with:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;No anomalies, no escalation. Report written [...] tick logged to recent/, outcome JSON written. No notify.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;June 9th&lt;/strong&gt;, the day that cost me something. She narrates her way through the task and step four simply isn't in the list:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Now let me run the report to compute and persist the snapshot. [...] Now I'll write today's report following the same format. [...] Now write the recent tick log and the outcome JSON.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Report, log, result. Steps three and five. Then she closes the tick:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;116 users (+1, fogflea), 1 game created today (Treasure Island, $0.04, by today's new user - first game since -04) [...] &lt;strong&gt;Digest-only, nothing to escalate.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nothing to escalate? Wdym??&lt;/p&gt;
&lt;p&gt;Maybe she wasn't told to send it? Here is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml#L48-L55&quot;&gt;step four of the task file&lt;/a&gt;, with the exact commands spelled out:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Append to the end-of-day digest the handler's ready-made block: &lt;code&gt;werewolf_stats.py digest&lt;/code&gt;, pass verbatim to &lt;code&gt;notify --digest&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is nothing ambiguous about that sentence. But it is one sentence, and I went and counted what else that file says. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml&quot;&gt;The whole thing&lt;/a&gt; is about 60 lines of instructions, and four separate times it tells her this task does not alert me.&lt;/p&gt;
&lt;p&gt;In the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml#L7&quot;&gt;header&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Activity is a trend, not an alarm - unlike a draining key, a slow signup day needs no same-hour reaction.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml#L53-L55&quot;&gt;step four itself&lt;/a&gt;, immediately after the send instruction:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;No immediate ping - digest-only; activity has no urgent severity (the budget watch owns the alarms).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml#L58-L61&quot;&gt;the paragraph right after the last step&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;This task is activity reporting only. It deliberately raises NO alerts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/5c667746bcb35cff245a47502a0b2a00b6a91a28/projects/werewolf-ops/tasks/werewolf_stats.yaml#L63&quot;&gt;the one-line description&lt;/a&gt;, the part that shows up wherever the task is listed:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Digest-only, no alerts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-05-crossroads-signpost.jpg&quot; alt=&quot;The robot at a fork in the road, looking up at a signpost. One small arrow with an envelope on it points left. Four huge arrows, each with a bell crossed out, all point right.&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;conflict-goals&quot;&gt;Conflict goals&lt;/h3&gt;
&lt;p&gt;Yeah, this is it. Marlow had a contradiction in her prompts, and it caused fluctuations in her reasoning and unstable results.&lt;/p&gt;
&lt;p&gt;Okay, but how did we get there? No idea. The project has been built by one AI, self-modified by another AI, while I was just chilling because things just worked. Until they didn't.&lt;/p&gt;
&lt;p&gt;The system found an equilibrium and lived happily in it, all the checks green and the silent issue sitting right there next to them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-06-equilibrium-all-green.jpg&quot; alt=&quot;The robot sits with its arms folded, perfectly content, facing a wall panel where every gauge needle points the same way above a row of checkmarks. Behind it, unnoticed, a drawer has burst open and unsent envelopes are spilling across the floor.&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-fix&quot;&gt;The fix&lt;/h3&gt;
&lt;p&gt;Three things, mostly in one commit, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/commit/8084fef0d3ceea79adf48cc178b49bf67ce6542a&quot;&gt;&lt;code&gt;8084fef&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The step became deterministic.&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/b69d544ae74b86d509b4b4b4b58c5669b4142ff3/handlers/werewolf_stats.py#L482-L492&quot;&gt;&lt;code&gt;report&lt;/code&gt;&lt;/a&gt; sends the block itself now, in Python, on every successful run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;if res.get(&quot;ok&quot;):
    notify_alex(render_digest(res), urgency=&quot;digest&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;The prompt stopped arguing with itself.&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/b69d544ae74b86d509b4b4b4b58c5669b4142ff3/projects/werewolf-ops/tasks/werewolf_stats.yaml#L49-L58&quot;&gt;Step four&lt;/a&gt; now says the opposite of what it used to: do NOT send it yourself, the handler already did. The conflict is gone because the instruction is gone. You can't argue a model into reliably following a step. You can take the step off the table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monitoring watches the output, and not the job.&lt;/strong&gt; The old check asked whether the task ran. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/b69d544ae74b86d509b4b4b4b58c5669b4142ff3/handlers/monitor_self.py#L520-L541&quot;&gt;The new one&lt;/a&gt; opens the artifact and reads its timestamp: the snapshot must be under 26 hours old or it pages me, with a message written for this exact bug - &quot;a failed/empty run looks identical to a quiet day&quot;. And rate limits stopped eating tasks: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/hiper2d/marlow/blob/b69d544ae74b86d509b4b4b4b58c5669b4142ff3/driver/tick.sh#L264-L268&quot;&gt;the driver&lt;/a&gt; now puts the task back in the queue instead of marking it failed.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-07-unread-logs.jpg&quot; alt=&quot;A tall dusty stack of open logbooks covered in cobwebs, every page filled with the same line written over and over. A robot arm reaches in from the edge of the frame to add one more. Nobody is reading them.&quot;&gt;&lt;/p&gt;
&lt;p&gt;So there were a lot of problems here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI making decisions where a deterministic script could do a better job&lt;/li&gt;
&lt;li&gt;My expectations haven't been clearly defined and monitored&lt;/li&gt;
&lt;li&gt;Marlow got confused by prompts but didn't see that&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But the main one - I excluded myself from the loop too early. I built a system that improves itself without proper guidance and rules. It found its peace of mind in a wrong state and didn't know that something is wrong.&lt;/p&gt;
&lt;h3 id=&quot;but-isn-t-it-my-fault-&quot;&gt;But isn't it my fault?&lt;/h3&gt;
&lt;p&gt;I mean... I didn't check the prompts, I didn't review things properly. Heck, I didn't review anything at all. Yeah, it's on me. But here is the thing - I find it harder and harder to review and control those AIs. Especially for complementary tools on my useless pet projects (don't listen to me, try &lt;a rel=&quot;nofollow&quot; href=&quot;https://aiwerewolf.net&quot;&gt;AI Werewolf&lt;/a&gt;, it's cool).&lt;/p&gt;
&lt;p&gt;And I'm reading a lot of LinkedIn flex posts of how people do similar stuff on serious projects. How they excluded engineers from the loop and scaled it to the roof. Yeah, it's LinkedIn - people never try themselves 99% of things they write about. But still - the idea is popular. And it's full of traps. &lt;/p&gt;
&lt;h3 id=&quot;outro&quot;&gt;Outro&lt;/h3&gt;
&lt;p&gt;I still have the self-fixing loop, it's cool to have one. But it matters much less to me now than self-monitoring does, which is roughly where I landed &lt;a rel=&quot;nofollow&quot; href=&quot;https://azelianouski.dev/post/monitoring-second-agent/&quot;&gt;the last time I wrote about this&lt;/a&gt;, for different reasons and before I had this bug to point at.&lt;/p&gt;
&lt;p&gt;It's important to record everything that happens. Marlow reads her own work logs from the previous run and tells me if something looks wrong. I ask Simona to go through them periodically, because Simona can see the whole system and connect the dots, like a conflict between two instructions in the same file. But the part that actually works is me staying in the loop.&lt;/p&gt;
&lt;p&gt;Once the system stabilizes, it will quietly stop keeping me there.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://azelianouski.dev/images/selffix-08-empty-chair-outro.jpg&quot; alt=&quot;A workshop at night. The robot works steadily at a console with its back turned. Beside it, an empty desk chair and a cold coffee mug. Across the room a door is swinging quietly shut. Nobody is there.&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I wrote this for &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/bugsmash&quot;&gt;DEV's Summer Bug Smash&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24726/rise-and-fall-of-a-self-fixing-agent</guid>
<pubDate>Sun, 16 Aug 2026 17:00:35 +0000</pubDate>
</item>
<item>
<title>Demystifying AI Agents: The Orchestration Behind the Autonomy</title>
<link>https://coderlegion.com/23378/demystifying-ai-agents-the-orchestration-behind-the-autonomy</link>
<description>&lt;p&gt;For quite a while now, AI agents have been shrouded in a captivating mystique. We hear tales of autonomous entities capable of planning, executing complex tasks, and even self-correcting, seemingly with a mind of their own. From automating cloud cleanups to drafting elaborate project plans, the potential feels limitless, almost magical. But as with any powerful technology, the &quot;magic&quot; often obscures a sophisticated, meticulously engineered reality.&lt;/p&gt;
&lt;p&gt;The trending buzz around AI agents, exemplified by discussions like &quot;The Dirty Secret Behind AI Agents,&quot; rightly points out that this aura of mysticism often hides the underlying complexity and, frankly, the very human effort involved in their creation. They aren't sentient beings conjured from code; they are intricate orchestrations of Large Language Models (LLMs), external tools, and carefully designed control flow. The &quot;dirty secret,&quot; if there is one, isn't sinister – it's that &lt;em&gt;engineering&lt;/em&gt; robust AI agents is hard, requiring a deep understanding of system design, prompt engineering, and fault tolerance.&lt;/p&gt;
&lt;p&gt;This article aims to pull back the curtain, transforming the mystical aura into a measurable architecture. We'll dive deep into the technical components that constitute an AI agent, explore the engineering challenges in building them reliably, and provide practical advice for anyone looking to move beyond the hype and build truly valuable, agentic systems.&lt;/p&gt;
&lt;h3 id=&quot;what-exactly-is-an-ai-agent-beyond-the-hype-&quot;&gt;What Exactly &lt;em&gt;Is&lt;/em&gt; an AI Agent (Beyond the Hype)?&lt;/h3&gt;
&lt;p&gt;At its core, an AI agent is a system designed to perceive its environment, make decisions, and take actions to achieve a specific goal. Unlike a simple LLM query-response, an agent operates in a loop, often interacting with external systems and maintaining state over time. Think of it as an automated problem-solver that doesn't just answer a question but actively &lt;em&gt;does&lt;/em&gt; things to resolve a broader objective.&lt;/p&gt;
&lt;p&gt;The &quot;agentic&quot; quality comes from its ability to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Plan&lt;/strong&gt;: Break down a complex goal into smaller, manageable steps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Act&lt;/strong&gt;: Execute those steps using available tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observe&lt;/strong&gt;: Process the results of its actions and environmental changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reflect/Correct&lt;/strong&gt;: Evaluate its progress, identify errors, and adjust its plan or actions accordingly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This iterative process distinguishes an agent from a one-shot API call to an LLM. It's less about generating text and more about generating &lt;em&gt;actions&lt;/em&gt; and &lt;em&gt;outcomes&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&quot;the-engine-room-deconstructing-agent-architecture&quot;&gt;The Engine Room: Deconstructing Agent Architecture&lt;/h3&gt;
&lt;p&gt;To understand how AI agents work, we need to look at their fundamental building blocks. These components, when orchestrated correctly, give rise to the seemingly autonomous behavior.&lt;/p&gt;
&lt;h4 id=&quot;the-llm-as-the-decision-maker&quot;&gt;The LLM as the Decision-Maker&lt;/h4&gt;
&lt;p&gt;The Large Language Model is undeniably the &quot;brain&quot; of the AI agent. It’s responsible for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Interpretation&lt;/strong&gt;: Understanding the user's goal and the current state of the environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;: Generating plans, selecting appropriate tools, and forming arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reflection&lt;/strong&gt;: Evaluating outcomes and identifying next steps or necessary corrections.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The LLM's capabilities are primarily guided by &lt;strong&gt;prompt engineering&lt;/strong&gt;. This involves crafting system messages, user prompts, and few-shot examples that instruct the LLM on its role, the task at hand, available tools, and how to format its output (e.g., JSON for tool calls).&lt;/p&gt;
&lt;p&gt;For example, a system prompt might define the agent's persona and its objective:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;You are an expert financial analyst assistant. Your goal is to research company earnings reports and provide concise summaries, identifying key financial metrics and future outlook. You have access to a tool to search for earnings transcripts and another to analyze financial data. If a user asks for a company's financial health, prioritize using the financial analysis tool.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The success of an agent heavily relies on the LLM's ability to reliably parse instructions, generate structured output (especially for tool calls), and maintain coherence across multiple turns.&lt;/p&gt;
&lt;h4 id=&quot;memory-beyond-a-single-turn&quot;&gt;Memory: Beyond a Single Turn&lt;/h4&gt;
&lt;p&gt;For an agent to operate effectively over time, it needs memory. This allows it to remember past interactions, previous actions, and the state of its environment, preventing it from repeating mistakes or losing context. Memory in AI agents typically comes in two forms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Short-Term Memory (Context Window)&lt;/strong&gt;: This is the most immediate form of memory, inherent to the LLM itself. The current conversation history, tool outputs, and intermediate thoughts are passed directly into the LLM's context window for each turn. This allows the LLM to maintain conversational flow and understand recent events. However, context windows have size limitations, making long-running tasks challenging. Strategies like summarization or selective retrieval are often used to manage this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Long-Term Memory (External Storage)&lt;/strong&gt;: For information that transcends the context window or needs to be persistent across sessions, external storage is crucial. This can include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vector Databases&lt;/strong&gt;: Storing embeddings of past conversations, learned facts, or documents. Agents can retrieve relevant information based on semantic similarity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured Databases (SQL/NoSQL)&lt;/strong&gt;: Storing facts about the environment, user preferences, or task progress in a structured format.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File Systems&lt;/strong&gt;: Storing larger documents, code snippets, or configuration files.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The design of the memory system dictates how &quot;smart&quot; and &quot;informed&quot; an agent can be over extended periods or across complex tasks.&lt;/p&gt;
&lt;h4 id=&quot;tools-the-agent-s-hands-and-feet&quot;&gt;Tools: The Agent's Hands and Feet&lt;/h4&gt;
&lt;p&gt;The true power of an AI agent lies in its ability to interact with the real world through &lt;strong&gt;tools&lt;/strong&gt;. These are functions or APIs that the LLM can &quot;call&quot; to perform specific actions or retrieve external information. Tools bridge the gap between the LLM's reasoning capabilities and the practical execution of tasks.&lt;/p&gt;
&lt;p&gt;Examples of tools include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Search Engines&lt;/strong&gt;: To find information on the internet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Interpreters&lt;/strong&gt;: To execute code, perform calculations, or analyze data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database Query Tools&lt;/strong&gt;: To read from or write to databases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Wrappers&lt;/strong&gt;: To interact with external services (e.g., AWS APIs for cloud cleanup, GitHub APIs for repository management, internal company microservices).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File System Operations&lt;/strong&gt;: To read, write, or manage files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Defining tools for an LLM typically involves providing a clear name, a detailed description of what the tool does, and its required input parameters, often in a structured format like JSON schema. Modern LLMs are trained for &quot;function calling&quot; or &quot;tool use,&quot; allowing them to reliably parse user intent and generate structured calls to these tools.&lt;/p&gt;
&lt;p&gt;Consider a simple tool definition in Python, exposed to an LLM:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import requests
import json

def get_current_weather(location: str) -&amp;gt; dict:
    &quot;&quot;&quot;
    Fetches the current weather for a specified location.

    Args:
        location (str): The city and state, e.g., &quot;San Francisco, CA&quot;.

    Returns:
        dict: A dictionary containing weather information (temperature, conditions).
              Returns an empty dict if data cannot be fetched.
    &quot;&quot;&quot;
    api_key = &quot;YOUR_WEATHER_API_KEY&quot; # In a real app, use environment variables!
    base_url = &quot;http://api.openweathermap.org/data/2.5/weather&quot;
    params = {
        &quot;q&quot;: location,
        &quot;appid&quot;: api_key,
        &quot;units&quot;: &quot;metric&quot; # or &quot;imperial&quot;
    }
    try:
        response = requests.get(base_url, params=params)
        response.raise_for_status() # Raise an exception for HTTP errors
        data = response.json()
        if data.get(&quot;main&quot;) and data.get(&quot;weather&quot;):
            return {
                &quot;temperature&quot;: data[&quot;main&quot;][&quot;temp&quot;],
                &quot;conditions&quot;: data[&quot;weather&quot;][0][&quot;description&quot;],
                &quot;humidity&quot;: data[&quot;main&quot;][&quot;humidity&quot;]
            }
        return {}
    except requests.exceptions.RequestException as e:
        print(f&quot;Error fetching weather: {e}&quot;)
        return {&quot;error&quot;: str(e)}

# This is how you might describe it to an LLM (e.g., in OpenAI's function calling format)
tool_spec = {
    &quot;type&quot;: &quot;function&quot;,
    &quot;function&quot;: {
        &quot;name&quot;: &quot;get_current_weather&quot;,
        &quot;description&quot;: &quot;Get the current weather in a given location&quot;,
        &quot;parameters&quot;: {
            &quot;type&quot;: &quot;object&quot;,
            &quot;properties&quot;: {
                &quot;location&quot;: {
                    &quot;type&quot;: &quot;string&quot;,
                    &quot;description&quot;: &quot;The city and state, e.g. San Francisco, CA&quot;,
                },
            },
            &quot;required&quot;: [&quot;location&quot;],
        },
    },
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When a user asks &quot;What's the weather in London?&quot;, the LLM, guided by its prompt and the &lt;code&gt;tool_spec&lt;/code&gt;, would generate a call like: &lt;code&gt;{&quot;name&quot;: &quot;get_current_weather&quot;, &quot;arguments&quot;: {&quot;location&quot;: &quot;London&quot;}}&lt;/code&gt;. The agent's orchestration logic then executes this function and feeds the result back to the LLM.&lt;/p&gt;
&lt;h4 id=&quot;the-orchestration-loop-plan-act-observe-reflect&quot;&gt;The Orchestration Loop: Plan, Act, Observe, Reflect&lt;/h4&gt;
&lt;p&gt;The heart of any AI agent is its orchestration loop. This is the control flow that dictates how the agent progresses towards its goal. While implementations vary, the core cycle often looks like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Goal/Input&lt;/strong&gt;: The agent receives an initial goal or user query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan/Reason&lt;/strong&gt;: The LLM analyzes the goal, current state, and available tools. It generates a plan or decides on the next immediate action (e.g., &quot;I need to use the &lt;code&gt;get_current_weather&lt;/code&gt; tool with 'London' as the location&quot;). This reasoning is often part of the LLM's output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Selection &amp;amp; Parameter Generation&lt;/strong&gt;: Based on its reasoning, the LLM selects a tool and generates the necessary arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Action/Execution&lt;/strong&gt;: The agent's runtime environment executes the chosen tool with the generated parameters. This is where the tool actually performs its real-world function (e.g., making an API call, running code).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observation/Result&lt;/strong&gt;: The output of the tool execution is captured. This could be data, a success/failure message, or an error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reflection/Update&lt;/strong&gt;: The LLM receives the tool's output and integrates it into its understanding of the task. It then reflects on whether the goal is achieved, if further actions are needed, or if the plan needs adjustment due to unexpected results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Loop or Output&lt;/strong&gt;: If the goal is not yet achieved, the loop continues from step 2. If the goal is met or no further actions are possible, the agent provides a final output to the user.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here's a simplified pseudocode representation of an agent loop:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def run_agent(goal, tools):
    memory = [] # Store conversation history and tool outputs
    current_plan = None
    max_steps = 10 # Prevent infinite loops

    for step in range(max_steps):
        # 1. Prepare context for LLM
        context = f&quot;Goal: {goal}\n&quot;
        context += &quot;Available Tools: &quot; + &quot;, &quot;.join([t.name for t in tools]) + &quot;\n&quot;
        context += &quot;Past Interactions:\n&quot; + &quot;\n&quot;.join(memory)

        # 2. LLM reasons and decides on action
        # This is a conceptual call; real implementation uses specific LLM APIs
        llm_response = llm.reason_and_act(context)

        if llm_response.is_final_answer():
            print(&quot;Agent finished:&quot;, llm_response.answer)
            return llm_response.answer
        elif llm_response.is_tool_call():
            tool_name = llm_response.tool_name
            tool_args = llm_response.tool_arguments

            print(f&quot;Agent chose tool: {tool_name} with args: {tool_args}&quot;)

            # 3. Execute tool
            tool_output = execute_tool(tool_name, tool_args, tools)

            # 4. Store observation in memory
            memory.append(f&quot;Tool '{tool_name}' output: {tool_output}&quot;)
            print(f&quot;Tool output: {tool_output}&quot;)

        else:
            print(&quot;LLM response was unclear or invalid. Aborting.&quot;)
            return &quot;Error: LLM could not decide on action.&quot;

    print(&quot;Agent reached max steps without completing goal.&quot;)
    return &quot;Goal not fully achieved within step limit.&quot;

def execute_tool(tool_name, tool_args, tools):
    # Find and execute the actual Python function for the tool
    for tool_func in tools:
        if tool_func.name == tool_name:
            try:
                # Assuming tool_args is a dictionary
                return tool_func(**tool_args)
            except Exception as e:
                return f&quot;Error executing tool '{tool_name}': {str(e)}&quot;
    return f&quot;Error: Tool '{tool_name}' not found.&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;the-dirty-secrets-real-world-challenges-and-trade-offs&quot;&gt;The &quot;Dirty Secrets&quot;: Real-World Challenges and Trade-offs&lt;/h3&gt;
&lt;p&gt;Building AI agents is not without its significant hurdles. The &quot;mystical aura&quot; often glosses over these engineering realities.&lt;/p&gt;
&lt;h4 id=&quot;non-determinism-and-reliability&quot;&gt;Non-Determinism and Reliability&lt;/h4&gt;
&lt;p&gt;LLMs are probabilistic models. Given the same prompt, they might produce slightly different outputs, leading to non-deterministic agent behavior. This unpredictability makes agents harder to test, debug, and rely on for critical tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Guardrails and Validation&lt;/strong&gt;: Implement robust parsing and validation of LLM outputs (especially tool calls) to ensure they conform to expected schemas.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retry Mechanisms&lt;/strong&gt;: If a tool call fails or an LLM output is malformed, implement retries with exponential backoff.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-Correction Prompts&lt;/strong&gt;: Design prompts that encourage the LLM to reflect on errors and attempt corrections.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human-in-the-Loop&lt;/strong&gt;: For high-stakes actions, require human approval before execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;cost-and-latency&quot;&gt;Cost and Latency&lt;/h4&gt;
&lt;p&gt;Each LLM call costs money (API tokens) and time. A multi-step agent can quickly rack up costs and suffer from high latency, especially if many sequential LLM calls are involved. This is akin to &quot;My dashboard took 7.6 seconds to render fifteen numbers 🐌&quot; but for decision-making.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minimize LLM Calls&lt;/strong&gt;: Only call the LLM when reasoning or decision-making is strictly necessary. Cache results where appropriate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Smaller, Faster Models&lt;/strong&gt;: Use smaller, fine-tuned models for specific sub-tasks where general reasoning isn't required.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parallelization&lt;/strong&gt;: Where possible, execute independent tool calls in parallel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous Processing&lt;/strong&gt;: Design the agent to handle long-running tool executions asynchronously.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Monitoring&lt;/strong&gt;: Implement logging and monitoring for LLM token usage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;prompt-engineering-complexity&quot;&gt;Prompt Engineering Complexity&lt;/h4&gt;
&lt;p&gt;Guiding an LLM to reliably generate correct plans and tool calls is an art and a science. Crafting effective system prompts, few-shot examples, and self-correction instructions requires iterative experimentation and deep understanding of LLM behavior. Subtle changes in phrasing can drastically alter agent performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Iterative Development&lt;/strong&gt;: Treat prompt engineering as a continuous development process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version Control Prompts&lt;/strong&gt;: Store and version control your prompts like code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluation Metrics&lt;/strong&gt;: Define clear metrics for agent success and evaluate prompt changes against these metrics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured Prompting&lt;/strong&gt;: Use techniques like Chain-of-Thought, ReAct, or specific XML/JSON structures to guide LLM output.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;tool-security-and-permissions&quot;&gt;Tool Security and Permissions&lt;/h4&gt;
&lt;p&gt;Granting an AI agent access to external tools is like giving it keys to your systems. An agent that can call &lt;em&gt;any&lt;/em&gt; API or execute &lt;em&gt;arbitrary&lt;/em&gt; code poses significant security risks if not properly constrained.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Least Privilege&lt;/strong&gt;: Only provide agents with access to the minimum set of tools and permissions required for their task.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sandboxing&lt;/strong&gt;: Execute code interpreter tools in isolated, sandboxed environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strict Access Control&lt;/strong&gt;: Implement robust authentication and authorization for all tools and APIs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Input Validation&lt;/strong&gt;: Tools should rigorously validate inputs, regardless of whether they come from an LLM.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;error-handling-and-debugging&quot;&gt;Error Handling and Debugging&lt;/h4&gt;
&lt;p&gt;When an agent fails, diagnosing the root cause can be challenging. Was it the LLM's reasoning, a bug in a tool, an API timeout, or a memory management issue? Tracing the sequence of LLM calls, tool executions, and state changes is critical.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Comprehensive Logging&lt;/strong&gt;: Log every LLM input/output, tool call, and tool result. Include timestamps and unique request IDs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observability Tools&lt;/strong&gt;: Integrate with tracing and monitoring systems to visualize agent execution flow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive Debugging&lt;/strong&gt;: Build interfaces that allow developers to inspect agent state at each step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error Categorization&lt;/strong&gt;: Classify errors (LLM error, tool error, external API error) to streamline debugging.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;context-window-limitations&quot;&gt;Context Window Limitations&lt;/h4&gt;
&lt;p&gt;As tasks become more complex or longer-running, the agent's memory (especially the LLM's context window) can become a bottleneck. Important information might be truncated or &quot;forgotten.&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Summarization&lt;/strong&gt;: Periodically summarize past interactions or tool outputs to condense context.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieval Augmented Generation (RAG)&lt;/strong&gt;: Use vector databases to store and retrieve only the most relevant pieces of information for the current step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hierarchical Agents&lt;/strong&gt;: Design agents that delegate sub-tasks to specialized sub-agents, each with its own smaller context.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;practical-applications-and-when-to-use-and-not-use-agents&quot;&gt;Practical Applications and When to Use (and Not Use) Agents&lt;/h3&gt;
&lt;p&gt;AI agents excel in scenarios requiring dynamic planning and interaction with multiple systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ideal Use Cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automated Workflow Execution&lt;/strong&gt;: Like the &quot;AWS Cleanup We Keep Putting Off,&quot; agents can automate multi-step IT operations involving various API calls, conditional logic, and error handling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complex Data Analysis&lt;/strong&gt;: An agent can query databases, perform calculations using a code interpreter, visualize results, and summarize findings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personalized Assistants&lt;/strong&gt;: Beyond simple chatbots, agents can book appointments, manage calendars, order groceries, or research travel plans by interacting with external services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software Development Support&lt;/strong&gt;: Agents can assist in code generation, debugging, testing, and even refactoring by interacting with IDEs, version control systems, and testing frameworks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customer Support Automation&lt;/strong&gt;: Handling complex customer queries that require looking up information, interacting with CRMs, and providing personalized solutions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;When &lt;em&gt;Not&lt;/em&gt; to Use Agents:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simple API Calls&lt;/strong&gt;: If a task can be accomplished with a single, deterministic API call (e.g., &quot;get user profile by ID&quot;), an agent adds unnecessary overhead and cost.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Highly Deterministic Logic&lt;/strong&gt;: For tasks with fixed, non-ambiguous business rules, traditional code is more reliable, performant, and cost-effective.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance-Critical Loops&lt;/strong&gt;: If a task requires extremely low latency or high throughput without complex reasoning, avoid involving an LLM in every step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unsupervised Critical Operations&lt;/strong&gt;: For actions with severe consequences (e.g., modifying production data without safeguards), human oversight or approval is paramount.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-practices-for-robust-agent-development&quot;&gt;Best Practices for Robust Agent Development&lt;/h3&gt;
&lt;p&gt;Building reliable AI agents requires a disciplined engineering approach:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Define Clear Goals and Boundaries&lt;/strong&gt;: Explicitly state what the agent should achieve and what it &lt;em&gt;shouldn't&lt;/em&gt; do. Ambiguity leads to unpredictable behavior.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modular Tool Design&lt;/strong&gt;: Create small, focused, and robust tools. Each tool should handle its own error conditions gracefully. Ensure tools are well-documented for both humans and LLMs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterative Prompt Refinement&lt;/strong&gt;: Treat prompts as living code. Experiment, test, and refine them continuously. Use version control for prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement Robust Error Handling&lt;/strong&gt;: Anticipate failures at every stage – LLM hallucination, tool execution errors, external API issues. Implement retries, fallbacks, and clear error reporting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prioritize Observability&lt;/strong&gt;: Log everything. Use tracing tools to visualize the agent's internal thought process and execution path. This is crucial for debugging and understanding behavior.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manage State Explicitly&lt;/strong&gt;: Design how the agent's memory is managed. Decide what goes into short-term context and what needs to be persisted in long-term storage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security First&lt;/strong&gt;: Implement least privilege for tools, sandbox code execution, and ensure all external integrations are secure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start Simple and Iterate&lt;/strong&gt;: Begin with a narrow scope and a simple agent. Gradually add complexity, more tools, and advanced memory/planning capabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consider Human-in-the-Loop&lt;/strong&gt;: For critical or irreversible actions, design approval steps where a human can review and confirm the agent's proposed action.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;the-future-of-agentic-systems&quot;&gt;The Future of Agentic Systems&lt;/h3&gt;
&lt;p&gt;The field of AI agents is rapidly evolving. We're moving towards:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More Sophisticated Planning&lt;/strong&gt;: Agents with advanced planning algorithms that can generate more optimal and resilient task sequences.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Improved Self-Correction&lt;/strong&gt;: LLMs becoming even better at identifying and recovering from their own mistakes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specialized Agents&lt;/strong&gt;: Fine-tuned, smaller models acting as expert sub-agents within a larger hierarchical system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standardized Frameworks&lt;/strong&gt;: Better tools and frameworks (like LangChain, LlamaIndex, CrewAI) that abstract away much of the boilerplate, allowing developers to focus on logic and tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Human-Agent Collaboration&lt;/strong&gt;: Seamless interfaces for humans to intervene, guide, and correct agents in real-time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The &quot;dirty secret&quot; behind AI agents isn't a flaw; it's a testament to the complex engineering required to bring these powerful systems to life. They are not magical, autonomous entities, but rather sophisticated orchestrations of LLMs, memory systems, and external tools, driven by carefully designed control loops.&lt;/p&gt;
&lt;p&gt;By demystifying their architecture, understanding the inherent challenges, and adopting robust engineering practices, developers can move beyond the hype. The true power of AI agents lies not in their perceived autonomy, but in our ability to meticulously design, build, and deploy them as reliable, measurable, and impactful tools that augment human capabilities and automate complex workflows. The future of software development will undoubtedly feature more agentic systems, and understanding their inner workings is key to harnessing their full potential.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23378/demystifying-ai-agents-the-orchestration-behind-the-autonomy</guid>
<pubDate>Wed, 05 Aug 2026 03:45:31 +0000</pubDate>
</item>
<item>
<title># Choosing a prompt optimization tool: eight questions I would ask</title>
<link>https://coderlegion.com/23884/choosing-a-prompt-optimization-tool-eight-questions-i-would-ask</link>
<description>&lt;p&gt;You have eleven versions of the same prompt in a doc, three of them named &quot;final,&quot; and no real idea which one scores best on last week's failures. So you tweak it again by hand, read ten outputs, decide it seems better, and ship. That is not optimization. It is guessing with extra steps, and it stops scaling the moment you have more than a couple of prompts and a real eval set.&lt;/p&gt;
&lt;p&gt;A prompt optimization tool exists to do that search for you: rewrite the prompt, score it against your data, and keep the version that measurably wins. The trap I see teams fall into is that most tools sold near this problem only manage prompts, they do not optimize them. Versioning, a playground, and A/B testing track the prompts a human writes. Optimization is a separate capability: an algorithm that proposes candidates, scores them against your data, and converges on the best one. On a feature grid both say &quot;prompt testing,&quot; and only one of them changes the prompt for you.&lt;/p&gt;
&lt;p&gt;Here are the eight questions I would use to tell a real optimizer from a prompt manager with a playground. Score each pass or fail and aim for six.&lt;/p&gt;
&lt;h3 id=&quot;1-does-it-optimize-the-prompt-or-only-store-and-version-it-&quot;&gt;1. Does it optimize the prompt, or only store and version it?&lt;/h3&gt;
&lt;p&gt;Versioning tells you which prompt you shipped. It does not give you a better one. Look for a run that takes a starting prompt and returns a measurably improved one, not a diff view of versions you wrote yourself. If &quot;optimization&quot; means you edit and compare manually, it is a registry, not an optimizer.&lt;/p&gt;
&lt;h3 id=&quot;2-does-it-optimize-against-your-own-eval-not-a-generic-metric-&quot;&gt;2. Does it optimize against your own eval, not a generic metric?&lt;/h3&gt;
&lt;p&gt;A prompt that improves on a vendor's generic &quot;quality&quot; score can still fail your task. The only objective worth optimizing is the one you actually grade on. You should be able to hand it your evaluator, a metric or an LLM judge, and have the optimizer use that score as its objective. Avoid a fixed &quot;improve my prompt&quot; button with no way to plug in your own scoring.&lt;/p&gt;
&lt;h3 id=&quot;3-does-it-use-a-real-search-algorithm-or-a-single-rewrite-&quot;&gt;3. Does it use a real search algorithm, or a single rewrite?&lt;/h3&gt;
&lt;p&gt;Asking a model once to &quot;make this better&quot; is a guess, not a search. Real improvement comes from proposing many candidates and selecting on score across your data. There are a few named families worth knowing so you can compare two tools on the same axis:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gradient-based search:&lt;/strong&gt; compute a &quot;prompt gradient,&quot; a critique of why a prompt failed, and edit toward it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Genetic or evolutionary search:&lt;/strong&gt; mutate and select over a population of prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DSPy-style optimizers:&lt;/strong&gt; search instructions and few-shot examples together.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meta-prompt rewriting:&lt;/strong&gt; a model that reflects on the prompt and improves it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the whole &quot;optimizer&quot; is a single LLM call that rewrites once, it is not searching anything.&lt;/p&gt;
&lt;h3 id=&quot;4-can-you-trust-the-result-&quot;&gt;4. Can you trust the result?&lt;/h3&gt;
&lt;p&gt;&quot;The new prompt seems better&quot; is the problem you came to solve, not a result. You need a number on data the optimizer did not train on, plus a record of how it got there: the final score on a held-out set, the per-iteration history, and how many evaluations it ran. Without a score and a trajectory, you cannot tell improvement from a lucky edit or an overfit.&lt;/p&gt;
&lt;h3 id=&quot;5-is-it-open-source-so-you-can-inspect-and-self-host-it-&quot;&gt;5. Is it open source, so you can inspect and self-host it?&lt;/h3&gt;
&lt;p&gt;A prompt optimizer rewrites the instructions at the center of your product. A closed &quot;improve my prompt&quot; API asks you to trust a black box with your most important text. Open source lets you read the search strategy, run it in your own environment, and fork it when your needs outgrow the defaults. Look for a permissively licensed optimizer with the algorithms in the open, not hidden behind an API.&lt;/p&gt;
&lt;h3 id=&quot;6-is-it-code-first-running-on-any-model-and-your-own-data-&quot;&gt;6. Is it code-first, running on any model and your own data?&lt;/h3&gt;
&lt;p&gt;A prompt that optimizes in a playground but cannot be called programmatically is a demo. An optimizer locked to one provider strands you when you switch models. It has to run as code, on whatever you serve, against your dataset, not a fixed benchmark. A GUI-only flow tied to one provider is the thing to avoid.&lt;/p&gt;
&lt;h3 id=&quot;7-can-you-run-it-in-ci-cd-not-just-once-in-a-session-&quot;&gt;7. Can you run it in CI/CD, not just once in a session?&lt;/h3&gt;
&lt;p&gt;You re-optimize when the base model changes, a prompt regresses, or the data shifts. That has to be a pipeline step, not a session someone remembers to run. An optimizer you can only drive by hand drifts out of date the moment a model upgrades. Look for a scriptable entry point you can wire into CI and trigger on a change, so the run is reproducible.&lt;/p&gt;
&lt;h3 id=&quot;8-does-it-also-cover-the-prompt-management-workflow-your-team-needs-&quot;&gt;8. Does it also cover the prompt-management workflow your team needs?&lt;/h3&gt;
&lt;p&gt;Optimization produces a better prompt, but your team still has to version it, review it, and let non-engineers edit safely. This is the honest tradeoff: an optimization engine is not the same thing as a no-code registry for a non-technical team, and a versioning UI is not optimization. If your primary need is a shared registry and a collaboration UI, that is a different category of tool, and the optimizer is what you point at the prompts it holds. Ideally the two hand off cleanly, so a winning prompt lands in versioning and you can compare two versions on your eval before you promote one.&lt;/p&gt;
&lt;h3 id=&quot;how-i-would-weigh-them&quot;&gt;How I would weigh them&lt;/h3&gt;
&lt;p&gt;Not every question carries the same weight. It depends on what you are actually buying:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You have more than a few prompts and manual tuning has stopped scaling:&lt;/strong&gt; questions 1, 2, and 3 decide it. This is the core.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You need to prove a prompt got better, not just claim it:&lt;/strong&gt; question 4.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You need to inspect the search or keep it in your own environment:&lt;/strong&gt; question 5.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You re-optimize across model upgrades and want it in CI/CD:&lt;/strong&gt; questions 6 and 7.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Your main need is versioning and collaboration:&lt;/strong&gt; question 8, which points you at a management tool, not an optimizer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The thing I would not lose sight of: optimization and prompt management are two different jobs, and a tool that is strong at one is usually weak at the other. Most teams need both. Buy them as two decisions, not one, and make sure the optimizer is actually searching against your eval and not just rewriting your prompt once.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23884/choosing-a-prompt-optimization-tool-eight-questions-i-would-ask</guid>
<pubDate>Fri, 31 Jul 2026 14:25:30 +0000</pubDate>
</item>
<item>
<title>AI Fundamentals - Part 2: Why AI Gets Things Right... and Wrong</title>
<link>https://coderlegion.com/21936/ai-fundamentals-part-2-why-ai-gets-things-right-and-wrong</link>
<description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/21935/ai-fundamentals-part-1-from-prompt-to-response&quot;&gt;Part 1&lt;/a&gt;, we learned how an LLM turns your prompt into a response. It all comes down to predicting one token at a time using the information available in its context window. But that raises another question: if AI is capable of writing code, planning trips, and explaining complex topics, why does it sometimes confidently give completely wrong answers?&lt;/p&gt;
&lt;p&gt;To answer that, let's continue building our AI-powered Travel Planner.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;running-example&quot;&gt;Running Example&lt;/h3&gt;
&lt;p&gt;Our Travel Planner is now live, and a user asks:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;I'm visiting Tokyo next week. Recommend a famous ramen restaurant that's popular with locals.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The AI replies:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Tokyo Dragon Ramen&lt;/strong&gt; is one of the city's most popular local restaurants.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The response sounds convincing and highly professional. The only problem? The restaurant does not exist. Why did this happen? Let's find out.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;pretraining-where-the-model-learns-its-knowledge&quot;&gt;Pretraining: Where the Model Learns Its Knowledge&lt;/h2&gt;
&lt;p&gt;Before an LLM can answer questions, it goes through a phase called &lt;strong&gt;pretraining&lt;/strong&gt;. During pretraining, the model learns patterns from an enormous collection of books, websites, articles, and other publicly available text. It isn't memorizing every sentence; instead, it learns the relationships between words, ideas, facts, and writing styles-similar to a student spending years reading library books before taking an exam. Once this learning phase is complete, the model's knowledge is static and fixed. It does not automatically learn new information every day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An LLM only knows what it learned during training. It doesn't browse the internet every time you ask a question.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Note: While consumer chat applications like Google Gemini or ChatGPT can browse the web, they do so by using an external application wrapper that runs a search engine query behind the scenes, retrieves the results, and feeds that fresh information into the model's prompt. The core LLM itself remains static.)&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;knowledge-cutoff-why-models-don-t-know-everything&quot;&gt;Knowledge Cutoff: Why Models Don't Know Everything&lt;/h2&gt;
&lt;p&gt;Imagine a new observation deck opens in Tokyo tomorrow. If your model was trained last month, it won't know the place exists. This is called the &lt;strong&gt;knowledge cutoff&lt;/strong&gt;-the point in time up to which the model has learned information. Anything that happened after that date is entirely missing. This is why questions like &quot;Who won yesterday's match?&quot;, &quot;What's today's weather?&quot;, or &quot;Has this restaurant recently closed?&quot; cannot be answered accurately by the model alone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your application depends on current or frequently changing information, you'll need to provide that information from an external source at runtime rather than relying solely on the model's internal memory.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;hallucinations-when-ai-makes-things-up&quot;&gt;Hallucinations: When AI Makes Things Up&lt;/h2&gt;
&lt;p&gt;Instead of saying &quot;I don't know,&quot; the model confidently invented &lt;strong&gt;Tokyo Dragon Ramen&lt;/strong&gt;. This is known as a &lt;strong&gt;hallucination&lt;/strong&gt;-when the model generates information that sounds believable but is incorrect, misleading, or entirely fabricated.&lt;/p&gt;
&lt;p&gt;Hallucinations don't happen because the model is trying to deceive you. Remember from Part 1: the model's job is simply to predict the next token. Sometimes, the most statistically likely sequence of tokens forms a statement that simply isn't true. That's why hallucinations sound so convincing-the writing is fluent and the confidence is high, but the facts are completely wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Never assume an LLM's response is factually correct just because it sounds fluent and confident. Always validate important information.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;grounding-giving-the-model-reliable-information&quot;&gt;Grounding: Giving the Model Reliable Information&lt;/h2&gt;
&lt;p&gt;How do we stop our travel planner from inventing restaurants? Instead of relying only on what the model learned during training, we can provide trusted information at runtime. For example, before asking the model to respond, our application retrieves a list of verified restaurants from a travel database.&lt;/p&gt;
&lt;p&gt;Now the prompt effectively becomes:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Here are verified ramen restaurants in Tokyo:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ichiran Shibuya&lt;/li&gt;
&lt;li&gt;Ramen Street (Tokyo Station)&lt;/li&gt;
&lt;li&gt;Menya Itto&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Recommend one that's popular with locals.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now the model isn't guessing; it's generating an answer based on reliable facts we've supplied. This process is called &lt;strong&gt;grounding&lt;/strong&gt;. Grounding means providing the model with relevant, verified information so it can generate responses based on facts instead of assumptions. We'll explore how applications retrieve this information in Part 3.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Grounding is one of the most effective ways to reduce hallucinations in production AI applications.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;prompt-engineering-helping-the-model-help-you&quot;&gt;Prompt Engineering: Helping the Model Help You&lt;/h2&gt;
&lt;p&gt;Not every poor response is caused by the model itself; sometimes the prompt simply isn't clear enough. Consider these two prompts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompt A:&lt;/strong&gt; &lt;em&gt;Recommend places to visit.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt B:&lt;/strong&gt; &lt;em&gt;I'm visiting Tokyo for 7 days in October with my family. We enjoy history, local food, and walking tours. Recommend places to visit and explain why each is worth visiting.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The second prompt gives the model far more useful context to tailor its response. This is the essence of &lt;strong&gt;prompt engineering&lt;/strong&gt;-the practice of writing prompts that help the model produce better results. It is less about finding &quot;magic words&quot; and more about providing enough context for the model to understand your exact intent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The quality of the output directly depends on the quality of the input. Clear prompts usually produce clearer, more relevant responses.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;system-prompt-vs-user-prompt&quot;&gt;System Prompt vs. User Prompt&lt;/h2&gt;
&lt;p&gt;Most AI applications don't send only the user's message to the model; they also include hidden instructions. For example, our Travel Planner might send:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;System Prompt:&lt;/strong&gt; &lt;em&gt;You are an expert travel planner. Recommend only verified locations. If you don't know the answer, say so instead of guessing.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User Prompt:&lt;/strong&gt; &lt;em&gt;Recommend a ramen restaurant in Tokyo.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;system prompt&lt;/strong&gt; defines the model's role, rules, and behavior, while the &lt;strong&gt;user prompt&lt;/strong&gt; contains the user's specific request. The user usually sees only their own prompt, but both are combined in the context window the model receives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Think of the system prompt as your application's permanent rules and the user prompt as the conversation happening within those rules.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;zero-shot-one-shot-and-few-shot-prompting&quot;&gt;Zero-shot, One-shot, and Few-shot Prompting&lt;/h2&gt;
&lt;p&gt;Sometimes telling the model what to do isn't enough; showing it an example works even better.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zero-shot Prompting:&lt;/strong&gt; You simply ask the model to perform a task without examples (e.g., &lt;em&gt;&quot;Summarize this itinerary.&quot;&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-shot Prompting:&lt;/strong&gt; You provide one example before the task (e.g., &lt;em&gt;&quot;Input: Two-day trip to Kyoto... Output: Short summary... Now summarize this new itinerary.&quot;&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Few-shot Prompting:&lt;/strong&gt; You provide several examples before asking the model to complete the task. This helps the model understand the exact format, style, and length you expect.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the model isn't producing the format you want, showing one or two examples in the prompt is often more effective than writing a longer set of text instructions.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;in-context-learning-learning-without-retraining&quot;&gt;In-context Learning: Learning Without Retraining&lt;/h2&gt;
&lt;p&gt;Suppose we extend our prompt with three examples of great travel recommendations. The model starts producing responses that resemble those examples. Has it learned something permanently? No. It's simply using the information currently available in its context window.&lt;/p&gt;
&lt;p&gt;This behavior is called &lt;strong&gt;in-context learning&lt;/strong&gt;. The model adapts its responses based on the examples you provide during the conversation, without changing its underlying parameters. Once the conversation ends, those examples are gone, and the model hasn't been retrained.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;💡 Developer's Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Providing examples can dramatically improve responses, but those examples only influence the active request or conversation context.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;bringing-it-all-together&quot;&gt;Bringing It All Together&lt;/h2&gt;
&lt;p&gt;Let's look at the flow behind the scenes when a user asks our grounded Travel Planner for a ramen recommendation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User Request:&lt;/strong&gt; The user asks for a recommendation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grounding:&lt;/strong&gt; The application queries a database for verified restaurants and embeds them in the prompt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instructions:&lt;/strong&gt; The application appends the system prompt and few-shot examples.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pretraining &amp;amp; Context:&lt;/strong&gt; The model uses its pretrained knowledge combined with the runtime context to generate a factual, formatted, and safe response.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This flow explains why two AI applications built on the same model can produce very different results: the difference lies in the quality of the grounding data and instructions.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;recap&quot;&gt;Recap&lt;/h2&gt;
&lt;p&gt;In this article, we covered why AI behaves the way it does, detailing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pretraining and the knowledge cutoff.&lt;/li&gt;
&lt;li&gt;Hallucinations and the power of grounding.&lt;/li&gt;
&lt;li&gt;Prompt engineering, system prompts, and few-shot examples.&lt;/li&gt;
&lt;li&gt;In-context learning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;strong&gt;Part 3&lt;/strong&gt;, we'll explore where this grounding information comes from, detailing embeddings, semantic search, vector databases, chunking, and how techniques like &lt;strong&gt;RAG&lt;/strong&gt; and &lt;strong&gt;CAG&lt;/strong&gt; help AI retrieve information.&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/21936/ai-fundamentals-part-2-why-ai-gets-things-right-and-wrong</guid>
<pubDate>Sun, 05 Jul 2026 05:24:31 +0000</pubDate>
</item>
<item>
<title>Everyone Is Talking About Prompt Engineering. They're Missing the Bigger Picture</title>
<link>https://coderlegion.com/20654/everyone-is-talking-about-prompt-engineering-theyre-missing-the-bigger-picture</link>
<description>&lt;p&gt;Over the last two years, prompt engineering has become one of the most talked-about skills in the AI world. Developers exchange prompt libraries on social media, YouTube creators promise &quot;10 prompts that will 10x your productivity,&quot; and online courses teach the art of communicating with large language models. Some companies have even begun hiring prompt engineers, reinforcing the idea that the secret to building great AI products lies in finding the perfect way to ask a question.&lt;/p&gt;
&lt;p&gt;And for a while, that seemed true.&lt;/p&gt;
&lt;p&gt;Carefully crafted prompts often produced dramatically better results, turning generic responses into outputs that felt more useful, structured and intelligent. But as AI applications evolved from simple chat interfaces into assistants that manage workflows, retrieve information and interact with users over time, an uncomfortable reality began to emerge.&lt;/p&gt;
&lt;p&gt;If prompts are truly the missing ingredient, why do so many AI applications still feel unintelligent? Why do chatbots forget important details from earlier conversations? Why do AI assistants lose track of ongoing tasks? And why do tools powered by some of the world's most advanced models still generate responses that feel generic or disconnected from what users actually need?&lt;/p&gt;
&lt;p&gt;The answer is that the problem isn't always the prompt. More often than not, it's the missing context surrounding it.&lt;/p&gt;
&lt;p&gt;As developers push AI into increasingly complex, real-world scenarios, they're beginning to realize that prompts are only one piece of a much larger puzzle. The next frontier isn't simply learning how to ask better questions. It's learning how to provide the right context at the right time.&lt;/p&gt;
&lt;h2 id=&quot;prompt-engineering-solved-yesterday-s-problem&quot;&gt;Prompt Engineering Solved Yesterday’s Problem&lt;/h2&gt;
&lt;p&gt;Prompt engineering earned its popularity for a valid reason: early LLMs were notoriously sensitive to phrasing. In the early days of API experimentation, a raw, unstructured instruction like &lt;code&gt;Summarize this article&lt;/code&gt; frequently resulted in unpredictable formatting or missed nuances.&lt;/p&gt;
&lt;p&gt;Developers quickly adapted, learning that structured inputs yielded far more reliable code and text outputs. We moved to explicit, multi-layered instructions: &lt;code&gt;Summarize this article in five bullet points for a technical audience, focusing strictly on architectural trade-offs&lt;/code&gt;. Techniques like role prompting (&quot;Act as a senior DevOps engineer&quot;), few-shot examples (providing input-output pairs) and chain-of-thought prompting dramatically elevated output quality.&lt;/p&gt;
&lt;p&gt;These strategies were important for teaching models, how to format data and reason through isolated tasks. However, prompt engineering isn’t useless, it has simply reached a point of diminishing returns. Modern production applications are no longer just answering isolated, single-turn questions, they are managing stateful, continuous interactions over time.&lt;/p&gt;
&lt;h2 id=&quot;the-real-problem-isn-t-the-prompt-it-s-the-missing-context-&quot;&gt;The Real Problem Isn't the Prompt. It's the Missing Context.&lt;/h2&gt;
&lt;p&gt;An LLM possesses zero inherent awareness of the user or the broader application state outside the exact data passed into its active request. It operates strictly on the information currently available in its attention mechanism. When a prompt fails, it is usually because the model is missing vital operational boundaries.&lt;/p&gt;
&lt;p&gt;To build an application that feels truly intuitive, engineers must address five core questions for every model invocation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Identity: Who is interacting with the system and what are their specific tech stack preferences?&lt;/li&gt;
&lt;li&gt;History: What technical steps or debugging attempts occurred earlier in this session?&lt;/li&gt;
&lt;li&gt;Relevance: Which specific files, codebase modules or documentation pages actually matter right now?&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Objective: What macro-level development task is currently being completed?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Constraints: What strict infrastructure or compliance boundaries must be maintained?&lt;br&gt;
Without this background, even an flawlessly engineered prompt will miss the mark. Consider a simple prompt like &lt;code&gt;Write an email reply to this bug report&lt;/code&gt;. The ideal output shifts entirely depending on context: responding to a enterprise tier-1 client requires a completely different tone, technical depth and SLA acknowledgement than replying to an internal QA teammate or a legal advisor. The prompt remains identical, the context dictates the value. Prompts tell the AI what to do, but context tells the AI how to do it well.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what-exactly-is-context-engineering-&quot;&gt;What Exactly Is Context Engineering?&lt;/h2&gt;
&lt;p&gt;Context engineering is the systematic process of determining what information should be provided to a model, when it should be injected and how it should be prioritized within the application runtime. Instead of treating the prompt as a static text block, context engineering treats the model's environment as a dynamic data pipeline.&lt;/p&gt;
&lt;p&gt;This discipline spans several key technical pillars:&lt;/p&gt;
&lt;p&gt; -Context Window Management: Strategically filling the token limit without degrading model attention.&lt;/p&gt;
&lt;p&gt; -Memory Systems: Architecting short-term session state and long-term user preferences across separate interactions.&lt;/p&gt;
&lt;p&gt; -Retrieval Infrastructure: Implementing semantic or hybrid search to dynamically pull external technical knowledge.&lt;/p&gt;
&lt;p&gt; -System Prompting Boundaries: Enforcing invariant security, routing and operational rules that the user cannot easily override.&lt;br&gt;
The core challenge in modern AI development is no longer about maximizing the raw volume of information sent to a model. The real hurdle is ensuring the system provides exactly the right information at the precise moment it is needed.&lt;/p&gt;
&lt;h2 id=&quot;why-more-context-isn-t-always-better&quot;&gt;Why More Context Isn't Always Better&lt;/h2&gt;
&lt;p&gt;When building LLM features, a common engineering instinct is to pass as much data as possible into the context window. After all, modern models boast massive windows capable of handling hundreds of thousands of tokens. However, treating the context window like an unrestricted dumping ground introduces severe performance penalties.&lt;/p&gt;
&lt;p&gt;First, stuffing massive amounts of text into a prompt introduces significant latency and drives up compute costs linearly. Second and more importantly, LLMs suffer from attentional degradation when swamped with irrelevant data. A widely cited study on retrieval behavior, &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/abs/2307.03172&quot;&gt;Lost in the Middle: How Language Models Use Long Contexts (Stanford University)&lt;/a&gt;, proved that models are significantly better at identifying and using information located at the absolute beginning or the very end of an input. When crucial data is buried in the middle of a massive context payload, retrieval accuracy plummets.&lt;/p&gt;
&lt;p&gt;Imagine passing six months of dense database logs and chat history to an AI assistant just to solve a basic syntax error. The extra data adds noise, risks hallucinated associations and slows down the response time. Context is fundamentally a filtering problem, not a storage problem. The smartest AI systems aren't those designed to blindly ingest everything, they are the ones engineered to know exactly what to ignore.&lt;/p&gt;
&lt;h2 id=&quot;retrieval-augmented-generation-rag-changed-everything&quot;&gt;Retrieval-Augmented Generation (RAG) Changed Everything&lt;/h2&gt;
&lt;p&gt;The transition from prompt optimization to context architecture became undeniable with the rise of Retrieval-Augmented Generation (RAG). In early AI implementations, developers relied heavily on fine-tuning or hoping the model’s static training data contained the necessary answers.&lt;/p&gt;
&lt;p&gt;RAG flipped this paradigm by decoupling a model's reasoning capabilities from its static knowledge base. By pairing the LLM with an external vector database or search index, the application can execute a real-time query based on the user's input, pull relevant documentation chunks and inject those exact source materials directly into the context window before the model generates a response.&lt;/p&gt;
&lt;p&gt;This structural pattern allows applications to securely leverage sensitive company documentation, internal code repositories, up-to-date API references and changing product catalogs. Grounding the LLM in verified, retrieved text drastically mitigates hallucinations. Rather than guessing a solution based on outdated training patterns, the model functions as an advanced reasoning engine processing a highly curated, real-time set of facts.&lt;/p&gt;
&lt;h2 id=&quot;why-developers-should-care&quot;&gt;Why Developers Should Care&lt;/h2&gt;
&lt;p&gt;The next generation of successful AI tools won’t win because their creators wrote a more creative prompt. They will win because their underlying architecture manages data flow, user state and information retrieval more efficiently than the competition.&lt;/p&gt;
&lt;p&gt;Engineers building dev tools, context-aware customer agents, automated code-review pipelines or internal enterprise search tools face complex systems challenges. They must build reliable semantic search indexing, design secure data-permission layers so users don't see unauthorized information and handle real-time session caching. The future of AI engineering isn’t defined by writing clever phrases in a playground UI, it’s about designing resilient, programmatic systems that cleanly isolate and surface what truly matters.&lt;/p&gt;
&lt;h2 id=&quot;conclusion-1&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Prompt engineering played a crucial role in unlocking the first wave of practical AI applications. It taught us how to communicate more effectively with large language models and showed that the way we frame instructions can dramatically influence the quality of their outputs.&lt;/p&gt;
&lt;p&gt;But as AI systems move beyond simple question-and-answer interactions and become embedded in real-world products and workflows, prompts alone can no longer carry the entire experience.&lt;/p&gt;
&lt;p&gt;The real challenge is context: knowing what information to surface, what knowledge to retrieve, what details are worth remembering and what distractions should be ignored. Because users don't judge AI systems by how clever their prompts are or how sophisticated the underlying models appear. They judge them by something much simpler: whether the system understands their situation and helps them accomplish what they actually need.&lt;/p&gt;
&lt;p&gt;The future of AI won't belong to the teams with the most creative prompts. It will belong to the teams that build systems capable of delivering the right context at the right time. In the end, great AI isn't just about giving better instructions, it's about creating experiences that understand what truly matters.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/20654/everyone-is-talking-about-prompt-engineering-theyre-missing-the-bigger-picture</guid>
<pubDate>Mon, 15 Jun 2026 21:29:27 +0000</pubDate>
</item>
<item>
<title>Anatomy of a Coding Agent: What I Learned Building My Own</title>
<link>https://coderlegion.com/18592/anatomy-of-a-coding-agent-what-i-learned-building-my-own</link>
<description>&lt;p class=&quot;wp-block-paragraph&quot;&gt;You use Claude Code every day. But do you really know it?&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;I didn’t. Not really. I could describe the surface, but I couldn’t tell you what was actually happening between hitting enter and seeing a diff. The harness was a black box, and that started to bother me. The only way I knew to fix that was to build one.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The result is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sudoish/oli&quot;&gt;oli&lt;/a&gt;, a single-binary terminal coding agent written in Rust that runs against Ollama by default. It got much larger than I expected. Every “small” subsystem (memory, policy, tool dispatch, provider quirks) turned out to have its own thicket of edge cases. I learned more about coding agents in a few weeks of building one than I had in a year of using them daily.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The hard parts aren’t clever prompts. They’re context management, tool design, policy gates, memory strategies and, if you want to run locally, survival engineering for models that don’t behave like the GPT-5 or Claude 4 families. This post is a tour of those parts, with the failures that taught me each one.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;The Big Picture&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Before diving into components, here’s what a coding agent actually looks like:&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-1-v3.png&quot; alt=&quot;Coding Agent Architecture&quot;&gt;&lt;/figure&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;The Agent Loop&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Every coding agent runs the same basic loop:&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-2-v3.png&quot; alt=&quot;Agent Loop&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Think → call → observe → repeat. The loop is deceptively simple. Everything hard lives in the details.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Three things I learned the hard way:&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Turn limits matter, even on local models.&lt;/strong&gt; Early on, a local model I was testing got stuck, it looped 47 times trying to “fix” a file that was already correct, burning through my entire context window before I caught it. The model wasn’t broken. The harness was: no turn limit, no escape hatch, no awareness that the model had lost the plot. The instinct is to say “who cares, I’m running locally, tokens are free.” But the cost isn’t dollars, it’s coherence. As context fills, models degrade: attention spreads thinner, instructions in the middle of the window get ignored (“lost in the middle”), and every failed attempt becomes a distractor that biases the next turn toward more wrong behavior. This is &lt;em&gt;especially&lt;/em&gt; true on local models, whose effective context is often a fraction of their advertised window — a Qwen3 advertised at 256K may stay coherent only through the first 32-64K. A runaway loop doesn’t just waste compute; it actively makes the agent stupider for the rest of the session. Now subagents get hard turn limits by default, and the top-level agent is capped too, with a config default you can override per run.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;The system prompt is pinned.&lt;/strong&gt; It survives &lt;code&gt;/clear&lt;/code&gt;, survives memory compaction, survives everything. The first time I accidentally cleared the system prompt mid-session, the model forgot what tools it had and started apologizing for being unable to help. Pinning was an obvious fix in hindsight.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Re-entrancy is a trap.&lt;/strong&gt; A Task tool that spawns a subagent which can itself spawn subagents quickly becomes a fork bomb. oli sidesteps the whole problem by registering &lt;code&gt;Task&lt;/code&gt; only in the parent agent — subagents get the same tool set &lt;em&gt;minus&lt;/em&gt; &lt;code&gt;Task&lt;/code&gt;, so they can’t recurse.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;The System Prompt&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Before you say anything, the model already gets a lot of scaffolding:&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-3-v3.png&quot; alt=&quot;System Prompt Structure&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The &lt;code&gt;AGENTS.md&lt;/code&gt; + &lt;code&gt;CLAUDE.md&lt;/code&gt; line matters. Both Codex and Claude Code established conventions for per-project agent instructions. oli reads both, at every directory level from your current location up to the filesystem root — so a workspace-wide convention can be overridden by a project-level one without copy-pasting.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Note that the system prompt text and the tool schemas are separate payloads in the provider request — a better mental model than “everything lives in one giant prompt.”&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The system prompt is &lt;strong&gt;expensive&lt;/strong&gt;. It consumes tokens on every single turn. I learned this when a project with nested AGENTS.md files at multiple levels ate 8,000 tokens before I’d typed anything. Now oli caps injected project context at 16KB total and truncates directory listings at 50 entries. This is also where prompt caching pays off: both the prompt and the tool schema payload are highly stable across turns. Anthropic’s API supports marking that stable prefix as cacheable, and oli supports Anthropic-style cache breakpoints on Claude routes through OpenRouter too. Anthropic prices cached input tokens at roughly 10% of the regular rate, so caching shaves a large chunk off every subsequent turn in a long session.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;Tools: The Model’s Hands&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The tool surface defines what the agent can do. Too few tools and it’s frustrating. Too many and the model gets confused, especially local models with smaller context windows.&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-4-v3.png&quot; alt=&quot;Tool Registry&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;A small core for the work, plus a handful of paging and notes tools. The design principles emerged from failures:&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Minimal surface.&lt;/strong&gt; I started with more, and the model kept picking the wrong tool or stacking calls when one would do. Keeping the core small and bolting on paging and notes tools turned out to be the right shape. Each does one thing. These choices mirror what Claude Code, Cursor’s Composer, and Aider converged on independently — a signal that the design space is narrower than it looks.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Bounded output.&lt;/strong&gt; Every tool truncates at 30KB. I learned this after the model Read a minified vendor.js file and blew through 180,000 tokens in one call. Now truncation markers embed a cache ID; the model can call &lt;code&gt;ShowFull(id, offset)&lt;/code&gt; to paginate the stashed body if it actually needs more.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;The read-first invariant.&lt;/strong&gt; Edit refuses to run unless you’ve Read the target file this session. This prevents edits based on stale context — the model can only modify what it’s actually seen this turn:&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-5-v3.png&quot; alt=&quot;Read-First Invariant&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Tools own their cleanup.&lt;/strong&gt; When you Ctrl-C a bash command, the harness has to kill not just the shell but every process it spawned. I found this out when orphaned &lt;code&gt;sleep&lt;/code&gt; processes from cancelled test runs accumulated over a week. A tool that spawns side effects has to know how to undo them — otherwise they leak into the user’s environment, and the harness gets blamed for the mess.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;Memory &amp;amp; Context Management&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Context windows are finite. Even 200K tokens fills up fast when you’re reading files, running tests, and iterating. Every tool result eats tokens.&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-6-v3.png&quot; alt=&quot;Context Window Management&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The default strategy is &lt;code&gt;LinearWithCompact&lt;/code&gt;: hold messages in order, and when approaching the context limit, summarize older turns into a rolling summary. Compaction triggers at 80% of context window. It finds a cut point at a user-message boundary (never split a tool_call from its result), sends older messages to the LLM with a summarization prompt, and replaces them with a summary message.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;That part is straightforward. The bug that ate three days of debugging was &lt;strong&gt;cancellation under compaction&lt;/strong&gt;.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Here’s the scenario. You hit Ctrl-C mid-turn to stop the model. The REPL is supposed to roll back to the last clean state — the user prompt you just sent. Simple, when the message buffer is the source of truth: count back N messages, restore.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Except compaction had already run. The “last 12 messages” the rollback wanted to restore no longer existed — they’d been collapsed into a summary. So Ctrl-C would silently roll the conversation back to &lt;em&gt;somewhere random&lt;/em&gt;, often before the work the user was trying to cancel.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The fix was a one-line concept that took a day to see: stop treating the message array as the source of truth for &lt;em&gt;where you are&lt;/em&gt;. oli tracks a monotonic &lt;code&gt;record_count&lt;/code&gt; that increments on every logical turn, independent of physical message storage. Compaction drains messages, but the record count keeps climbing. Rollback targets a record count, not an array index — so the buffer can shrink underneath without the cursor losing its place.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Generalizable shape: any system that mutates history needs a stable identifier for “where you are” that isn’t the history itself. Memory management is also where coding agents silently fail — the model forgets what file it was editing, or repeats work it already did. The visible bugs are the easy ones.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;Policy &amp;amp; Approvals&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The policy engine gates every tool call. Without it, you’re one hallucinated &lt;code&gt;rm -rf&lt;/code&gt; away from disaster.&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-7-v3.png&quot; alt=&quot;Policy Engine&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Bash has its own allowlist: &lt;code&gt;git status&lt;/code&gt;, &lt;code&gt;cargo test&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, and similar safe commands auto-approve; everything else prompts. The line-mode REPL is a plain &lt;code&gt;y/N&lt;/code&gt; flow; the richer “allow this session” and persisted allowlist behavior are TUI affordances layered on top.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;There’s no hard denylist yet, and I’m ambivalent about adding one. Prompt-on-every-mutation is annoying but transparent — you see exactly what the model is about to do. A denylist invites a long tail of “obviously safe” exceptions that gradually erode the gate. Today, blocking happens by denying an &lt;code&gt;Ask&lt;/code&gt; decision: slower, but you stay in the loop.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The first time I saw the model attempt &lt;code&gt;rm -rf target/&lt;/code&gt; when I’d asked it to “clean up the build” and the approval prompt caught it, I understood why this layer exists. The model wasn’t malicious. It was being helpful in a way that would have been catastrophic without the gate.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;Local-Model Survival&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Frontier models handle tool calls cleanly: structured &lt;code&gt;tool_calls&lt;/code&gt; arrays in the API response. Local models via Ollama? Not so much.&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-8-v3.png&quot; alt=&quot;Local vs Frontier Models&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Many local models emit tool calls as plain text. Just raw JSON in the middle of their response. No structured field.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;oli solves this with a &lt;strong&gt;fallback parser&lt;/strong&gt;. When the model’s capability entry says &lt;code&gt;supports_native_tool_calls: false&lt;/code&gt;, the agent loop scans content for JSON objects with a &lt;code&gt;name&lt;/code&gt; field and splices them in as if they were real tool calls.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The &lt;strong&gt;model capability registry&lt;/strong&gt; tracks what each model can do. Lookups are prefix matches against the model id, so &lt;code&gt;claude-3-7-sonnet-latest&lt;/code&gt; matches the &lt;code&gt;claude-&lt;/code&gt; row. Today’s hardcoded entries:&lt;/p&gt;
&lt;figure class=&quot;wp-block-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Prefix&lt;/th&gt;&lt;th&gt;Context&lt;/th&gt;&lt;th&gt;Native Tool Calls&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;claude-&lt;/code&gt; / &lt;code&gt;anthropic/claude&lt;/code&gt;&lt;/td&gt;&lt;td&gt;200K&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;gpt-4&lt;/code&gt;&lt;/td&gt;&lt;td&gt;128K&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;gpt-&lt;/code&gt;&lt;/td&gt;&lt;td&gt;16K&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;llama3.1&lt;/code&gt; / &lt;code&gt;llama3.2&lt;/code&gt;&lt;/td&gt;&lt;td&gt;128K&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;llama3&lt;/code&gt;&lt;/td&gt;&lt;td&gt;8K&lt;/td&gt;&lt;td&gt;✗&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;qwen2.5-coder&lt;/code&gt;&lt;/td&gt;&lt;td&gt;32K&lt;/td&gt;&lt;td&gt;✗&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;unknown&lt;/em&gt; (default)&lt;/td&gt;&lt;td&gt;8K&lt;/td&gt;&lt;td&gt;✗&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Smoke tests against &lt;code&gt;qwen3-coder:7b&lt;/code&gt; and &lt;code&gt;llama3&lt;/code&gt; showed they don’t behave as their docs claimed for tool calls, so they’re flagged off; the fallback parser handles them. Users override via &lt;code&gt;[[caps]]&lt;/code&gt; in config — that’s how I run &lt;code&gt;qwen3-coder:30b&lt;/code&gt; at 256K with native tools.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The gap between “works on Claude” and “works on qwen3” is enormous. If you’re building for local models, expect to handle every edge case they throw at you — and to discover new ones every time a model release widens the gap.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;Provider Abstraction&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;One binary, many backends. The promise only works because of the language choice: Rust gives a single static binary with no runtime to install, shipping to Mac/Linux/Windows from the same &lt;code&gt;cargo build&lt;/code&gt;. And the borrow checker turns out to be a surprisingly good fit for an agent loop — the lifetime and ownership bugs that bite hardest in async code, the compiler catches before I run anything.&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-9-v3.png&quot; alt=&quot;Provider Abstraction&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Two provider kinds are available. Ollama, OpenRouter, OpenAI, LM Studio, vLLM, and llama.cpp’s server all speak OpenAI’s &lt;code&gt;/chat/completions&lt;/code&gt; shape, so one &lt;code&gt;openai-compat&lt;/code&gt; implementation covers them all — you just point &lt;code&gt;base_url&lt;/code&gt; at the right endpoint. The native Anthropic provider is its own thing because it speaks the Messages API directly and does its own OpenAI-shape &lt;img src=&quot;https://s.w.org/images/core/emoji/17.0.2/72x72/2194.png&quot; alt=&quot;↔&quot; class=&quot;wp-smiley&quot; style=&quot;height: 1em; max-height: 1em;&quot;&gt; Anthropic-shape translation for tools, tool results, and system prompt handling.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;Caching adds a wrinkle here: native Anthropic supports prompt caching directly, but oli also supports Anthropic-style cache breakpoints in the openai-compat path for Claude models routed through OpenRouter. So “native provider” and “cached prefix” are related, but not identical ideas.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The openai-compat provider still has to handle backend quirks. OpenRouter sometimes returns 200 OK with an &lt;code&gt;error&lt;/code&gt; object in the body. The provider layer normalizes this.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The payoff: switching backends is a config flip, not a code change.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;The Extension Surface&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;A harness is only useful if you can make it yours. oli has three extension axes:&lt;/p&gt;
&lt;figure class=&quot;wp-block-image size-large&quot;&gt;&lt;img src=&quot;https://sudoish.com/wp-content/uploads/2026/05/anatomy-coding-agent-diagram-10-v3.png&quot; alt=&quot;Extension Surface&quot;&gt;&lt;/figure&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;All extensions route through the policy gate. No escape hatches.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;What I Left Out&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;To keep this post focused on the load-bearing components, I skipped several surfaces that ship in oli today: an MCP client (stdio + HTTP transports, with live &lt;code&gt;tools/list_changed&lt;/code&gt; deltas), a hook dispatcher (&lt;code&gt;PreToolUse&lt;/code&gt; / &lt;code&gt;PostToolUse&lt;/code&gt; / &lt;code&gt;Stop&lt;/code&gt;), session persistence as JSONL transcripts (with &lt;code&gt;--resume&lt;/code&gt; / &lt;code&gt;--continue&lt;/code&gt;), and the slash-command layer (&lt;code&gt;/compact&lt;/code&gt;, &lt;code&gt;/provider&lt;/code&gt;, &lt;code&gt;/model&lt;/code&gt;, &lt;code&gt;/sessions&lt;/code&gt;, etc.). Each is its own subsystem with its own trade-offs — let me know if you want any of them as a follow-up.&lt;/p&gt;
&lt;h2 class=&quot;wp-block-heading&quot;&gt;What This Means&lt;/h2&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;The harness is invisible until it breaks.&lt;/strong&gt; When Claude Code feels brilliant, you credit the model. When it feels broken — losing context, blocking the wrong thing, looping on a fix — that’s almost always the harness. The orchestration layer is doing the heavy lifting either way; you only notice when it fails.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;The hard problems are systems problems.&lt;/strong&gt; Memory management, policy enforcement, tool design, provider abstraction, local-model survival. Engineering challenges, not prompt engineering.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;&lt;strong&gt;Knowing the machinery makes you a better user.&lt;/strong&gt; Context overflow, policy gates, compaction, capability mismatches — once you can name what’s happening, you can debug it. Or work around it.&lt;/p&gt;
&lt;p class=&quot;wp-block-paragraph&quot;&gt;The repo is at &amp;lt;a href=&quot;https://github
&lt;/p&gt;</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/18592/anatomy-of-a-coding-agent-what-i-learned-building-my-own</guid>
<pubDate>Thu, 21 May 2026 20:33:45 +0000</pubDate>
</item>
<item>
<title>LLM positive guy manifesto</title>
<link>https://coderlegion.com/18114/llm-positive-guy-manifesto</link>
<description>&lt;p&gt;Hi, everyone&lt;/p&gt;
&lt;p&gt;Here are 11 observations regarding the wrong mindset shift among people who started loving LLMs a little too much. I collected all these examples based on real projects from the Big Tech companies I have seen personally. The poison of instant gratification, of &quot;everything in seconds&quot; that looked quite plausible, took not only tokens, but also valuable time of people who then end up in the neuroslop pile. LLMs become a substitute for thinking gradually, and it is done unconsciously. Increasingly more documents, strategies, architectures, and emails look as though they required any effort, whereas in reality, they are nothing but poorly reprocessed autocomplete. My manifesto is neither anti-LLM nor against them, it is pro-awareness and conscious usage. This manifesto fights with magical thinking, mindless copying &amp;amp; pasting, and people who think generation is a synonym for doing the job. I call it the LLMPositive Guy Manifesto.&lt;/p&gt;
&lt;p&gt;The LLMPositive Guy Manifesto&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I give to my colleagues the whole output of LLMs as it is, without any further reading. If there are some specific questions addressed to me, I divert their attention: &quot;you're missing the context,&quot; &quot;let's leave it for later&quot; and etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The longer the LLM's response, the more significant my work. Nobody's going to read thirty pages anyway, but achievement &quot;Hard Worker&quot; unlocked.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If there is any hallucination or confident nonsense in my text, I start attacking those people for lack of understanding: &quot;it's a draft, it is none of your concern. You don't get my approach to prompt engineering.&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I delegate responsibility for any document I generate to colleagues, as they will review it eventually. But only I can create proper prompts, thus the output is not neuroslop anymore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I say things like &quot;I sat down with the neural net,&quot; &quot;the model told me,&quot; &quot;the LLM suggested&quot; - as the main argument for being right. Proof? Who cares about proof.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I take pride in keeping a poker face while passing off neuroslop generated half an hour before the meeting as the strategy or architecture I supposedly worked on all month.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the LLM did something wrong, that means that the prompt had very high level of complexity and creativity. If the output was incorrect two times, it was my colleagues' fault for bad phrasing of the task. I am going to flag that blocker immediately.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I give to LLMs the company's confidential documents, code, NDAs, trade secrets and other stuff I shouldn't give away, as nobody is going to steal the data, as LLMs never lie. What I care about is getting a win locally and fast.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I delegate to LLMs the budget management, planning of my future career growth, personal education process, health concerns, and search for the meaning of life. I might read answers, but my goal is prompt generating every day. It is important for me because I want to have the right answers. I do not need to read them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I regularly complain that I hit my plan's limits in a measly half hour. That's not a problem with what I'm building, it's proof of the scale of my ideas and ambitions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I interrupt the LLM with clarifications to make it sound more confident. If the answer got worse, the model couldn't handle my level of abstraction.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks for reading. If you've run into cases where you've seen sloppy LLM use, drop me a line — I'll happily add them to the manifesto. Let's stay in touch.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12957659866922515902&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/18114/llm-positive-guy-manifesto</guid>
<pubDate>Sat, 16 May 2026 18:17:16 +0000</pubDate>
</item>
<item>
<title>Don’t Just Ask AI for JSON. Design the Output.</title>
<link>https://coderlegion.com/17702/dont-just-ask-ai-for-json-design-the-output</link>
<description>&lt;p&gt;When we use AI in a chat window, a little extra text usually does not matter.&lt;/p&gt;
&lt;p&gt;If the model says:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Sure, here is the result:
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;before answering, we can still read it.&lt;/p&gt;
&lt;p&gt;If it adds:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Hope this helps!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;after the answer, we can simply ignore it.&lt;/p&gt;
&lt;p&gt;But code cannot ignore things the same way.&lt;/p&gt;
&lt;p&gt;When AI output needs to be passed into a parser, stored in a database, sent to another service, or used inside an automation pipeline, the shape of the answer matters as much as the answer itself.&lt;/p&gt;
&lt;p&gt;This is where many AI workflows break.&lt;/p&gt;
&lt;p&gt;We ask:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Please output the result in JSON.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the AI replies:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Of course! Here is the JSON:

```json
{
  &quot;sentiment&quot;: &quot;negative&quot;,
  &quot;product&quot;: &quot;Notebook Battery&quot;,
  &quot;issue&quot;: &quot;Battery lasts less than 3 hours&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let me know if you need anything else!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
To a person, this looks fine.

To code, this may be a problem.

The JSON may be wrapped in a code block.  
There may be text before it.  
There may be text after it.  
The keys may be wrong.  
The structure may change next time.  
The output may look like JSON but fail when parsed.

That is the structured output problem.

## “Give me JSON” is not enough

A common mistake is thinking that structured output is just a matter of asking more clearly.

```txt
Output in JSON.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Output only JSON.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Do not include any explanation. JSON only.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These instructions help.&lt;/p&gt;
&lt;p&gt;But they do not fully solve the problem.&lt;/p&gt;
&lt;p&gt;LLMs generate text probabilistically. They are very good at continuing patterns. In normal conversations, models often include polite openings, explanations, summaries, and helpful closing sentences.&lt;/p&gt;
&lt;p&gt;So even when we ask for JSON, the model may still follow the conversational pattern it has learned.&lt;/p&gt;
&lt;p&gt;This does not mean the model is broken.&lt;/p&gt;
&lt;p&gt;It means we are asking a language model to produce something that is not really language in the usual sense. JSON is not a friendly paragraph. It is a strict structure.&lt;/p&gt;
&lt;p&gt;And strict structures need more than polite instructions.&lt;/p&gt;
&lt;h3 id=&quot;the-three-ways-structured-output-often-breaks&quot;&gt;The three ways structured output often breaks&lt;/h3&gt;
&lt;p&gt;In practice, AI-generated JSON usually fails in a few familiar ways.&lt;/p&gt;
&lt;h4 id=&quot;1-text-before-the-json&quot;&gt;1. Text before the JSON&lt;/h4&gt;
&lt;p&gt;The model adds something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Sure, here is the result:
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;before the object.&lt;/p&gt;
&lt;p&gt;A human can ignore it.&lt;br&gt;
&lt;code&gt;JSON.parse()&lt;/code&gt; cannot.&lt;/p&gt;
&lt;h4 id=&quot;2-text-after-the-json&quot;&gt;2. Text after the JSON&lt;/h4&gt;
&lt;p&gt;The model gives valid JSON, then adds an explanation:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;This analysis shows that the user is unhappy with the battery performance.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the output is no longer pure JSON.&lt;/p&gt;
&lt;h4 id=&quot;3-json-like-text-that-is-not-valid-json&quot;&gt;3. JSON-like text that is not valid JSON&lt;/h4&gt;
&lt;p&gt;This is the most subtle failure.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  sentiment: &quot;negative&quot;,
  'product': &quot;Notebook Battery&quot;,
  &quot;issue&quot;: &quot;Battery life&quot;,
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It looks close enough to a human.&lt;/p&gt;
&lt;p&gt;But it is not valid JSON.&lt;/p&gt;
&lt;p&gt;Missing quotes, single quotes, trailing commas, comments, extra fields, wrong types — these are all small mistakes that can break a pipeline.&lt;/p&gt;
&lt;h3 id=&quot;structure-is-part-of-the-design&quot;&gt;Structure is part of the design&lt;/h3&gt;
&lt;p&gt;The important shift is this:&lt;/p&gt;
&lt;p&gt;Structured output is not just about formatting.&lt;/p&gt;
&lt;p&gt;It is about designing the boundary between AI and the rest of the system.&lt;/p&gt;
&lt;p&gt;When the AI is only talking to a person, the output can be flexible.&lt;/p&gt;
&lt;p&gt;But when the AI is talking to code, the output must be predictable.&lt;/p&gt;
&lt;p&gt;A paragraph is useful for reading.&lt;br&gt;
A checklist is useful for review.&lt;br&gt;
A table is useful for comparison.&lt;br&gt;
JSON is useful when another system needs to process the result.&lt;/p&gt;
&lt;p&gt;The same answer becomes more valuable when it has the right shape.&lt;/p&gt;
&lt;h3 id=&quot;start-by-separating-thinking-from-output&quot;&gt;Start by separating thinking from output&lt;/h3&gt;
&lt;p&gt;One practical pattern is to separate the model’s reasoning space from the final output space.&lt;/p&gt;
&lt;p&gt;Instead of saying:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Analyze this review and output JSON.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can say:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;First, analyze the review.

Then output only the final JSON in this exact format:

{
  &quot;sentiment&quot;: &quot;positive | neutral | negative&quot;,
  &quot;product&quot;: &quot;string or null&quot;,
  &quot;main_issue&quot;: &quot;string or null&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The idea is simple.&lt;/p&gt;
&lt;p&gt;Let the model think freely where format does not matter.&lt;br&gt;
Then make the final output strict.&lt;/p&gt;
&lt;p&gt;This reduces the pressure on the model to reason and maintain a rigid format at the same time.&lt;/p&gt;
&lt;h3 id=&quot;examples-are-stronger-than-explanations&quot;&gt;Examples are stronger than explanations&lt;/h3&gt;
&lt;p&gt;Another useful pattern is showing the model exactly what we want.&lt;/p&gt;
&lt;p&gt;Instead of only explaining the format, provide examples.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Input:
&quot;Galaxy S24 battery drains too fast.&quot;

Output:
{&quot;sentiment&quot;:&quot;negative&quot;,&quot;product&quot;:&quot;Galaxy S24&quot;,&quot;issue&quot;:&quot;battery life&quot;}

Input:
&quot;iPhone camera is amazing.&quot;

Output:
{&quot;sentiment&quot;:&quot;positive&quot;,&quot;product&quot;:&quot;iPhone&quot;,&quot;issue&quot;:&quot;camera&quot;}

Now process this:

Input:
{{new_review}}

Output:
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This works because the model continues the pattern.&lt;/p&gt;
&lt;p&gt;If every example starts directly with JSON, the model is more likely to continue with JSON instead of adding a friendly sentence first.&lt;/p&gt;
&lt;p&gt;In prompt engineering, examples often beat instructions.&lt;/p&gt;
&lt;h3 id=&quot;for-serious-systems-prompts-are-not-the-final-layer&quot;&gt;For serious systems, prompts are not the final layer&lt;/h3&gt;
&lt;p&gt;Prompting can improve reliability.&lt;/p&gt;
&lt;p&gt;But if the output is important enough, prompts alone may not be enough.&lt;/p&gt;
&lt;p&gt;A production system may need stronger layers:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;1. Clear output instructions
2. Separate reasoning from final output
3. Explicit schema
4. API-level structured output or tool calling
5. Validation and retry logic
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the difference between asking for structure and designing for structure.&lt;/p&gt;
&lt;p&gt;If the output fails, the system should not simply crash.&lt;/p&gt;
&lt;p&gt;It should parse, validate, detect the error, and recover if possible.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;The previous response could not be parsed as JSON.
The error was: trailing comma after final field.
Please return the same result as pure valid JSON only.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This kind of recovery loop treats AI output as something that can fail.&lt;/p&gt;
&lt;p&gt;And that is a healthier assumption.&lt;/p&gt;
&lt;h3 id=&quot;structured-output-is-about-trust&quot;&gt;Structured output is about trust&lt;/h3&gt;
&lt;p&gt;The more AI becomes part of workflows, agents, and automation systems, the more important structured output becomes.&lt;/p&gt;
&lt;p&gt;If AI is only helping us think, flexible text is fine.&lt;/p&gt;
&lt;p&gt;But if AI output becomes input for another process, the format must be reliable.&lt;/p&gt;
&lt;p&gt;A workflow cannot depend on “probably valid JSON.”&lt;br&gt;
An automation cannot depend on “usually parseable output.”&lt;br&gt;
A database pipeline cannot depend on “the model will likely follow instructions.”&lt;/p&gt;
&lt;p&gt;At that point, structured output is not a nice-to-have.&lt;/p&gt;
&lt;p&gt;It is part of system design.&lt;/p&gt;
&lt;h3 id=&quot;the-real-lesson&quot;&gt;The real lesson&lt;/h3&gt;
&lt;p&gt;The lesson is not:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Ask AI for JSON.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The lesson is:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Design the output so another system can trust it.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means being clear about format, separating reasoning from final output, giving examples, using schemas when needed, and validating the result before trusting it.&lt;/p&gt;
&lt;p&gt;AI can generate useful answers.&lt;/p&gt;
&lt;p&gt;But useful answers are not always usable outputs.&lt;/p&gt;
&lt;p&gt;When we work with AI as developers, we should not only ask:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Is the answer correct?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We should also ask:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Can this output be safely used by the next step?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That is the real reason structured output matters.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Originally published at Dechive:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://dechive.dev/en/archive/prompt-structured-output&quot;&gt;https://dechive.dev/en/archive/prompt-structured-output&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/17702/dont-just-ask-ai-for-json-design-the-output</guid>
<pubDate>Wed, 13 May 2026 09:55:59 +0000</pubDate>
</item>
<item>
<title>From Playground to Code: Three Versions of One Prompt in Google AI Studio</title>
<link>https://coderlegion.com/16867/from-playground-to-code-three-versions-of-one-prompt-in-google-ai-studio</link>
<description>&lt;p&gt;A few weeks ago I wrote a breakdown of Cloud Next '26 for developers &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/15971/from-chatbots-to-coworkers-what-google-cloud-next-26-means-for-developers&quot;&gt;Link to keynote&lt;/a&gt; and closed it with a line to other frontend devs: play with Agent Studio. I took my own advice.&lt;/p&gt;
&lt;p&gt;I tried to take my own advice and faced a technical issue with Google Cloud's new prepayment wall and pivoted. This post is what happened next: spending an hour in Google AI Studio, iterating one prompt three times and finishing with Typescript I could drop into a Next.js project. No billing required, no Cloud project. Just a Google account.&lt;/p&gt;
&lt;p&gt;If you're stuck at the same prepayment wall, or if you just want to know what the Gemini playground actually looks like before committing to anything paid, this is for you.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12162020930476391931&quot; alt=&quot;Empty AI Stuido interface&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-ai-studio-actually-is&quot;&gt;&lt;strong&gt;What AI Studio actually is&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;A quick note for anyone confused by the naming, because Google has not made this easy. &lt;/p&gt;
&lt;p&gt;There's &lt;strong&gt;Gemini Enterprise&lt;/strong&gt;, which lives in Cloud Console behind a billing account; that's the enterprise stack I wrote about in the keynote piece. &lt;/p&gt;
&lt;p&gt;Then there's &lt;strong&gt;Google AI Studio&lt;/strong&gt; at &lt;a rel=&quot;nofollow&quot; href=&quot;https://aistudio.google.com&quot;&gt;aistudio.google.com&lt;/a&gt;, which is the public-facing Gemini playground. Sign in with any Google account. No card, no project, no setup.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Feature &lt;/th&gt;&lt;th&gt;Google AI Studio &lt;/th&gt;&lt;th&gt;Gemini Enterprise&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;User Type &lt;/td&gt;&lt;td&gt;Prototypers, Developers &lt;/td&gt;&lt;td&gt;Data Scientists, Enterprise&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Complexity &lt;/td&gt;&lt;td&gt;Low (Simple) &lt;/td&gt;&lt;td&gt;High (Advanced)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Purpose &lt;/td&gt;&lt;td&gt;Experimentation &lt;/td&gt;&lt;td&gt;Production &amp;amp; Scaling&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cost &lt;/td&gt;&lt;td&gt;Generous Free Tier &lt;/td&gt;&lt;td&gt;Usage-based&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Security &lt;/td&gt;&lt;td&gt;Standard &lt;/td&gt;&lt;td&gt;Enterprise-grade (GCP)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For this walkthrough, I used &lt;strong&gt;Gemini 3 Flash Preview&lt;/strong&gt; which is the cheaper, faster sibling to Gemini 3 Pro. Flash Preview is the right default when you're iterating because the latency difference matters when you're running the same prompt five or six times in a row.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;the-input-i-gave-it&quot;&gt;&lt;strong&gt;The input I gave it&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;I wanted to see how the same prompt evolved across three versions. One task, three system prompts, same user input. The point wasn't to land at a perfect prompt on the first try; it was to show what changes when you take prompt iteration seriously instead of writing one prompt and hoping.&lt;/p&gt;
&lt;p&gt;I used the same input for all three versions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;We need a hero section for our SaaS landing page. The product is a project management tool for small design agencies. Should feel premium&lt;br&gt;
but approachable. Main goal is to get visitors to start a free trial.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is roughly how a brief actually arrives in a frontend dev's inbox: vague, opinion-loaded, half a sentence longer than it needs to be. The whole point of running it through an LLM is to turn that vagueness into a structured spec a developer can build from. So that's what I tried to make the model do.&lt;/p&gt;
&lt;h3 id=&quot;v1-the-naive-prompt&quot;&gt;&lt;strong&gt;V1: The naive prompt&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;I adjusted the temperature from 1(default)  to 0.7 and I gave sytem instructions.&lt;/p&gt;
&lt;p&gt;System instructions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;You are a helpful assistant. Generate a component spec based on the design brief the user provides.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The kind of system prompt anyone would write on the first try. No structure, no constraints, just &quot;do the thing.&quot;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15556880556643919459&quot; alt=&quot;v1 output&quot;&gt;&lt;/p&gt;
&lt;p&gt;The output came back more beautifully than expected. An editorial document with visual guidelines, color palette with hex codes, typography choices, three headline options, a copy strategy section and even a Typescript interface for HeroProps inside the markdown.&lt;/p&gt;
&lt;p&gt;It's genuinely impressive. And that's the trap.&lt;/p&gt;
&lt;p&gt;V1 succeeded as a document. &lt;/p&gt;
&lt;p&gt;It did not succeed as a spec. &lt;/p&gt;
&lt;p&gt;There's a difference, and that difference is the whole reason this post exists.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=10061486269773184296&quot; alt=&quot;Typescript buried in heroprops&quot;&gt;&lt;/p&gt;
&lt;p&gt;If I want to feed this output into a code generator, populate a Notion database, or render fields dynamically in a React form, I can't. I'd have to manually parse the markdown, find the HeroProps interface, scrape the hex codes out of the prose, copy the headline options into an array. The model wrote content for humans, when what I needed was data for machines.&lt;/p&gt;
&lt;p&gt;Token cost: 208. Cheap. Fast. Useless if you want to do anything programmatic.&lt;/p&gt;
&lt;h3 id=&quot;v2-asking-for-structure&quot;&gt;&lt;strong&gt;V2: Asking for structure&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;If V1 returned prose because I asked for prose, maybe V2 returns data if I ask for data. With temperature still set at 0.7 I replaced system instructions.&lt;/p&gt;
&lt;p&gt;New system instructions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;You are a frontend architect helping translate design briefs into &lt;br&gt;
component specifications. When given a design brief, return a &lt;br&gt;
structured component spec with the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Component name&lt;/li&gt;
&lt;li&gt;Purpose&lt;/li&gt;
&lt;li&gt;Suggested props&lt;/li&gt;
&lt;li&gt;Accessibility considerations&lt;/li&gt;
&lt;li&gt;Suggested Tailwind classes for key elements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Return your response as JSON.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The output came back as JSON. Real JSON. Valid JSON. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=6329564136775187086&quot; alt=&quot;v2 output 1&quot;&gt;&lt;/p&gt;
&lt;p&gt;Look at field names like component_name, purpose, suggested_props, primaryAction, productScreenshotUrl, trustBadges. Some snake_case, some camelCase. Some are top-level, some are nested. &lt;/p&gt;
&lt;p&gt;This looks better. But there's a quieter problem hiding in plain sight. I didn't define the schema. The model did.&lt;/p&gt;
&lt;p&gt;I ran the prompt again. &quot;DesignAgencyHero&quot; in the first prompt became &quot;CreativeStudioHero&quot;. Also, suggested props like &quot;headline&quot; became &quot;title&quot; and &quot;subheadline&quot; became &quot;description&quot; etc. New fields appeared. Old ones vanished.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4196956631710118537&quot; alt=&quot;v2 output2&quot;&gt;&lt;/p&gt;
&lt;p&gt;The output is JSON, but it's JSON I can't trust to stay the same shape across calls. And if the shape isn't stable, I can't write code that consumes it.&lt;/p&gt;
&lt;p&gt;Better than V1, still not deployable.&lt;/p&gt;
&lt;h3 id=&quot;v3-structured-outputs&quot;&gt;&lt;strong&gt;V3: Structured outputs&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This is where AI Studio earns its keep.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=1418638045851856562&quot; alt=&quot;v3 showing structured outputs&quot;&gt;&lt;/p&gt;
&lt;p&gt;In the parameters panel, there's a toggle called &lt;strong&gt;Structured outputs&lt;/strong&gt;. Flip it on, and AI Studio gives you a schema editor where you define exactly what comes back. Field names, types, what's required, what's optional, nested objects, all of it. The model has to conform to the shape you specified.&lt;/p&gt;
&lt;p&gt;Here's the schema I used:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;type&quot;: &quot;object&quot;,
  &quot;properties&quot;: {
    &quot;componentName&quot;: { &quot;type&quot;: &quot;string&quot; },
    &quot;purpose&quot;: { &quot;type&quot;: &quot;string&quot; },
    &quot;props&quot;: {
      &quot;type&quot;: &quot;array&quot;,
      &quot;items&quot;: {
        &quot;type&quot;: &quot;object&quot;,
        &quot;properties&quot;: {
          &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; },
          &quot;type&quot;: { &quot;type&quot;: &quot;string&quot; },
          &quot;required&quot;: { &quot;type&quot;: &quot;boolean&quot; },
          &quot;description&quot;: { &quot;type&quot;: &quot;string&quot; }
        },
        &quot;required&quot;: [&quot;name&quot;, &quot;type&quot;, &quot;required&quot;, &quot;description&quot;]
      }
    },
    &quot;accessibilityNotes&quot;: {
      &quot;type&quot;: &quot;array&quot;,
      &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }
    },
    &quot;suggestedTailwindClasses&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;properties&quot;: {
        &quot;container&quot;: { &quot;type&quot;: &quot;string&quot; },
        &quot;heading&quot;: { &quot;type&quot;: &quot;string&quot; },
        &quot;subheading&quot;: { &quot;type&quot;: &quot;string&quot; },
        &quot;ctaButton&quot;: { &quot;type&quot;: &quot;string&quot; }
      }
    }
  },
  &quot;required&quot;: [&quot;componentName&quot;, &quot;purpose&quot;, &quot;props&quot;, &quot;accessibilityNotes&quot;, &quot;suggestedTailwindClasses&quot;]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Defining this schema took longer than writing the prompt. That's the honest tradeoff: structured outputs aren't free, and they aren't fast. You're doing real design work upfront in exchange for output you can actually consume.&lt;/p&gt;
&lt;p&gt;The system instruction got simpler:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;You are a frontend architect helping translate design briefs into&lt;br&gt;
component specifications. Return a complete, well-considered component&lt;br&gt;
spec based on the design brief provided.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I no longer needed to list the fields in the system prompt. The schema does that job now.&lt;/p&gt;
&lt;p&gt;To show the payoff clearly, I ran V3 three times with the same input but different temperatures: 0.2, 0.7, and 0.9.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Temperature 0.2&lt;/strong&gt;: conservative settings. The model returns a tight, safe spec.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5529581301861245749&quot; alt=&quot;v3 0.2&quot;&gt;&lt;/p&gt;
&lt;p&gt;Component name: &lt;strong&gt;AgencyHeroSection&lt;/strong&gt;. Compact descriptions. Predictable choices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Temperature 0.7&lt;/strong&gt;: middle ground.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9748426993512525807&quot; alt=&quot;v3 0.7&quot;&gt;&lt;/p&gt;
&lt;p&gt;Component name: &lt;strong&gt;PremiumStudioHero&lt;/strong&gt;. Richer descriptions. More distinctive framing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Temperature 0.9&lt;/strong&gt;: turn the creativity dial up.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15338631489918215924&quot; alt=&quot;v3 0.9&quot;&gt;&lt;/p&gt;
&lt;p&gt;Component name: &lt;strong&gt;DesignAgencyHero&lt;/strong&gt;. The most evocative copy of the three. The descriptions reach for words like &quot;craft&quot; and &quot;flow.&quot;&lt;/p&gt;
&lt;p&gt;Three runs. Three different creative interpretations. The schema stayed identical across all three. Same fields. Same types. Same nesting. The model varied the content. It could not vary the shape.&lt;/p&gt;
&lt;p&gt;That's the entire point. Structured outputs separate the parts of the response you want stable from the parts you want creative. Field names and structure stay locked. Tone, copy, and specifics breathe within those constraints.&lt;/p&gt;
&lt;p&gt;A note on cost: V3 at temperature 0.9 burned 9,357 tokens, compared to V1's 208. Schema definitions are part of the prompt the model sees, and a detailed schema is a long prompt. Structured outputs are powerful, but they aren't cheap. For high-volume calls, this matters.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;from-playground-to-code&quot;&gt;&lt;strong&gt;From Playground to Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Here's the part where this stops being a playground exercise and starts being something I could actually ship.&lt;/p&gt;
&lt;p&gt;In the top-right of the Run settings panel, there's a button labeled &lt;strong&gt;Get code (&amp;lt;&amp;gt;)&lt;/strong&gt;. I clicked it with V3 still loaded schema enabled, temperature still set, system prompt still in place and AI Studio generates working code in your language of choice.&lt;/p&gt;
&lt;p&gt;I picked TypeScript.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2224083358114419301&quot; alt=&quot;typescript&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here is the code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// To run this code you need to install the following dependencies:
// npm install @google/genai mime
// npm install -D @types/node

import {
  GoogleGenAI,
  Type,
} from '@google/genai';

async function main() {
  const ai = new GoogleGenAI({
    apiKey: process.env['GEMINI_API_KEY'],
  });
  const config = {
    temperature: 0.7,
    thinkingConfig: {
      thinkingLevel: ThinkingLevel.HIGH,
    },
    responseMimeType: 'application/json',
    responseSchema: {
      type: Type.OBJECT,
      required: [&quot;componentName&quot;, &quot;purpose&quot;, &quot;props&quot;, &quot;accessibilityNotes&quot;, &quot;suggestedTailwindClasses&quot;],
      properties: {
        componentName: {
          type: Type.STRING,
        },
        purpose: {
          type: Type.STRING,
        },
        props: {
          type: Type.ARRAY,
          items: {
            type: Type.OBJECT,
            required: [&quot;name&quot;, &quot;type&quot;, &quot;required&quot;, &quot;description&quot;],
            properties: {
              name: {
                type: Type.STRING,
              },
              type: {
                type: Type.STRING,
              },
              required: {
                type: Type.BOOLEAN,
              },
              description: {
                type: Type.STRING,
              },
            },
          },
        },
        accessibilityNotes: {
          type: Type.ARRAY,
          items: {
            type: Type.STRING,
          },
        },
        suggestedTailwindClasses: {
          type: Type.OBJECT,
          properties: {
            container: {
              type: Type.STRING,
            },
            heading: {
              type: Type.STRING,
            },
            subheading: {
              type: Type.STRING,
            },
            ctaButton: {
              type: Type.STRING,
            },
          },
        },
      },
    },
    systemInstruction: [
        {
          text: `You are a frontend architect helping translate design briefs into 
component specifications. Return a complete, well-considered 
component spec based on the design brief provided.

`,
        }
    ],
  };
  const model = 'gemini-3-flash-preview';
  const contents = [
    {
      role: 'user',
      parts: [
        {
          text: `INSERT_INPUT_HERE`,
        },
      ],
    },
  ];

  const response = await ai.models.generateContentStream({
    model,
    config,
    contents,
  });
  let fileIndex = 0;
  for await (const chunk of response) {
    if (chunk.text) {
      console.log(chunk.text);
    }
  }
}

main();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Every parameter I touched in the UI is now a field in the code. Temperature. Thinking level. Response MIME type. The schema. The system prompt. Nothing got lost in translation between the playground and the script.&lt;/p&gt;
&lt;p&gt;The SDK is &lt;strong&gt;@google/genai&lt;/strong&gt;, the official Google package. Install with &lt;strong&gt;npm install @google/genai mime&lt;/strong&gt; and &lt;strong&gt;npm install -D @types/node.&lt;/strong&gt; Get a free API key from AI Studio's &quot;Get API key&quot; link in the left sidebar with no billing required and a generous free tier.&lt;/p&gt;
&lt;p&gt;This drops into a Next.js API route with minimal changes. The schema travels with the code. The system prompt travels with the code. The temperature you tuned travels with the code. The hour I spent in the playground became 60 lines of TypeScript I can paste into &lt;strong&gt;app/api/component-spec/route.ts&lt;/strong&gt; and call from a frontend form.&lt;/p&gt;
&lt;p&gt;That's the bridge. That's what makes AI Studio worth using even if you eventually move to Agent Platform: the iteration happens in the playground, the deployment happens in code, and the handoff is one button.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-this-means-for-frontend-devs&quot;&gt;&lt;strong&gt;What this means for frontend devs&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Three things I'm taking from this hour:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You don't need Cloud billing to start. AI Studio plus a free API key gets you most of the way to a working Gemini integration. If you're learning, prototyping, or building a personal project, this stack is plenty. The expensive enterprise tools are for a real production app at scale, not for figuring out whether the model can do what you need.&lt;/p&gt;
&lt;p&gt;Prompt iteration is engineering. V1 to V2 to V3 wasn't an aesthetic exercise. Each version was a deliberate response to a real problem with the previous one: V1's prose couldn't be parsed, V2's JSON couldn't be trusted, V3's schema solved both. Treat prompts the way you'd treat any other component of your system: iterate them, version them, write them down.&lt;/p&gt;
&lt;p&gt;Structured outputs are the real unlock. The moment your model returns the same shape every time, you stop treating AI calls as dice rolls and start treating them as normal API calls. You can write TypeScript types for the response. You can render the output in a UI without defensive parsing. You can build product around the model's behavior, not around its randomness.&lt;/p&gt;
&lt;p&gt;The last point is what I want to keep poking at. When my Cloud account clears the prepayment wall and I get into Agent Studio, the question I'm bringing with me is: how do these same patterns translate to a deployed agent? &lt;/p&gt;
&lt;p&gt;&lt;em&gt;For now: if you're stuck at billing, don't wait. AI Studio is right here. Sign in, pick a model, iterate something useful.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/16867/from-playground-to-code-three-versions-of-one-prompt-in-google-ai-studio</guid>
<pubDate>Wed, 06 May 2026 14:42:53 +0000</pubDate>
</item>
<item>
<title>How I went from getting tired of explaining the same things to AI to accidentally creating a brand</title>
<link>https://coderlegion.com/16666/how-went-from-getting-tired-of-explaining-the-same-things-to-accidentally-creating-brand</link>
<description>&lt;p&gt;There’s a moment every developer hits when “AI-assisted coding” starts feeling less like acceleration and more like friction.&lt;/p&gt;
&lt;p&gt;For me, that moment came somewhere between deleting yet another &lt;code&gt;useEffect&lt;/code&gt;-based data fetch and watching Cursor confidently generate a &lt;code&gt;tailwind.config.js&lt;/code&gt; file in a project that absolutely did not need one.&lt;/p&gt;
&lt;p&gt;That loop kept repeating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wrong patterns&lt;/li&gt;
&lt;li&gt;Outdated APIs&lt;/li&gt;
&lt;li&gt;Defaults that no longer reflect how modern apps are built&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the more cutting-edge the stack became—&lt;strong&gt;Next.js 16, React 19, Tailwind v4&lt;/strong&gt;—the worse it got.&lt;/p&gt;
&lt;p&gt;So I stopped fixing the symptoms and built my own rules pack instead.&lt;br&gt;
Afterwards, I wanted to have some place that I could centralize it and future digital products and tools.&lt;/p&gt;
&lt;p&gt;That place became &lt;strong&gt;Saastenance&lt;/strong&gt;—and this post is both a technical deep dive and the story of how a small dev tool quietly turned into a full digital product and part of a brand.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-real-problem-ai-is-only-as-good-as-its-defaults&quot;&gt;The Real Problem: AI Is Only As Good As Its Defaults&lt;/h3&gt;
&lt;p&gt;Tools like Cursor and Claude Code don’t “understand” your stack—they pattern match based on training data.&lt;/p&gt;
&lt;p&gt;And most of that data is already outdated.&lt;/p&gt;
&lt;p&gt;So unless you explicitly constrain them, they will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reintroduce deprecated patterns&lt;/li&gt;
&lt;li&gt;Ignore new framework primitives&lt;/li&gt;
&lt;li&gt;Drift away from your architecture over time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What I needed wasn’t better prompts.&lt;/p&gt;
&lt;p&gt;I needed &lt;strong&gt;persistent, enforceable rules&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;enter-the-ai-rules-pack&quot;&gt;Enter: The AI Rules Pack&lt;/h3&gt;
&lt;p&gt;The AI Rules Pack is a structured set of rules (in &lt;code&gt;.mdc&lt;/code&gt; format) that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Defines how your AI should think&lt;/li&gt;
&lt;li&gt;Locks in modern best practices&lt;/li&gt;
&lt;li&gt;Prevents regression into outdated patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It works with Cursor and Claude Code, and OpenAI Codex. It installs via a CLI where you choose your stack preferences.&lt;/p&gt;
&lt;p&gt;But the interesting part—the &lt;em&gt;reason it exists&lt;/em&gt;—comes from how &lt;strong&gt;Next.js 16 broke a lot of assumptions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s walk through that.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;breaking-changes-in-next-js-16-that-ai-keeps-getting-wrong-&quot;&gt;Breaking Changes in Next.js 16 (That AI Keeps Getting Wrong)&lt;/h3&gt;
&lt;h4 id=&quot;1-data-fetching-useeffect-is-no-longer-the-default&quot;&gt;1. Data Fetching: &lt;code&gt;useEffect&lt;/code&gt; Is No Longer the Default&lt;/h4&gt;
&lt;h5 id=&quot;-before-what-ai-still-generates-&quot;&gt;❌ Before (what AI still generates)&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;'use client'

import { useEffect, useState } from 'react'

export default function Page() {
  const [data, setData] = useState(null)

  useEffect(() =&amp;gt; {
    fetch('/api/data')
      .then(res =&amp;gt; res.json())
      .then(setData)
  }, [])

  return &amp;lt;div&amp;gt;{JSON.stringify(data)}&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-next-js-16-pattern-&quot;&gt;✅ After (Next.js 16 pattern)&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;export default async function Page() {
  const data = await fetch('https://api.example.com/data', {
    cache: 'no-store'
  }).then(res =&amp;gt; res.json())

  return &amp;lt;div&amp;gt;{JSON.stringify(data)}&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters&quot;&gt;Why this matters&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Server Components are the default&lt;/li&gt;
&lt;li&gt;Fetching happens on the server&lt;/li&gt;
&lt;li&gt;No client waterfall, no loading flicker&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Yet AI still defaults to client-side fetching unless told otherwise.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-server-actions-replace-client-mutation-logic&quot;&gt;2. Server Actions Replace Client Mutation Logic&lt;/h4&gt;
&lt;h5 id=&quot;-before&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;'use client'

async function handleSubmit(formData) {
  await fetch('/api/form', {
    method: 'POST',
    body: JSON.stringify(formData)
  })
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after&quot;&gt;✅ After&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;export async function submit(formData: FormData) {
  'use server'

  // direct DB call or mutation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;&amp;lt;form action={submit}&amp;gt;
  &amp;lt;button type=&quot;submit&quot;&amp;gt;Submit&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters-1&quot;&gt;Why this matters&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;No API route needed&lt;/li&gt;
&lt;li&gt;No client fetch boilerplate&lt;/li&gt;
&lt;li&gt;Stronger co-location of logic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI often mixes both patterns—which creates unnecessary complexity.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-middleware-ts-is-no-longer-your-auth-layer&quot;&gt;3. &lt;code&gt;middleware.ts&lt;/code&gt; Is No Longer Your Auth Layer&lt;/h4&gt;
&lt;p&gt;This one shows up constantly.&lt;/p&gt;
&lt;h5 id=&quot;-before-1&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;// middleware.ts
import { NextResponse } from 'next/server'

export function middleware(req) {
  // auth logic
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-1&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;route handlers&lt;/strong&gt;, &lt;strong&gt;server actions&lt;/strong&gt;, or &lt;strong&gt;framework-native auth solutions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Middleware is now edge-specific and limited&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;why-this-matters-2&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;AI overuses middleware because it used to be a catch-all solution.&lt;/p&gt;
&lt;p&gt;In modern apps, it's usually the wrong tool.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;4-tailwind-v4-no-tailwind-config-js&quot;&gt;4. Tailwind v4: No &lt;code&gt;tailwind.config.js&lt;/code&gt;&lt;/h4&gt;
&lt;h5 id=&quot;-before-2&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;module.exports = {
  theme: {
    extend: {}
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-2&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Zero-config by default&lt;/li&gt;
&lt;li&gt;CSS-first configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@theme {
  --color-primary: blue;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters-3&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;AI still scaffolds Tailwind like it's 2021.&lt;/p&gt;
&lt;p&gt;That leads to unnecessary files and wrong mental models.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;5-forms-useformstate-is-not-the-move&quot;&gt;5. Forms: &lt;code&gt;useFormState&lt;/code&gt; Is Not the Move&lt;/h4&gt;
&lt;h5 id=&quot;-before-3&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;const [state, formAction] = useFormState(action, initialState)
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-3&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Use native &lt;code&gt;&amp;lt;form action={serverAction}&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Or lightweight client validation where needed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;why-this-matters-4&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;React 19 + Server Actions changed the ergonomics completely.&lt;/p&gt;
&lt;p&gt;Yet AI keeps reaching for older abstractions.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;6-routing-layout-assumptions&quot;&gt;6. Routing + Layout Assumptions&lt;/h4&gt;
&lt;p&gt;AI still:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overuses client components&lt;/li&gt;
&lt;li&gt;Misplaces logic in layouts&lt;/li&gt;
&lt;li&gt;Avoids async components&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;-modern-expectation&quot;&gt;✅ Modern expectation&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Layouts are server-first&lt;/li&gt;
&lt;li&gt;Components are async by default&lt;/li&gt;
&lt;li&gt;Client components are opt-in&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-pattern-behind-the-problems&quot;&gt;The Pattern Behind the Problems&lt;/h3&gt;
&lt;p&gt;None of these issues are “bugs.”&lt;/p&gt;
&lt;p&gt;They’re &lt;strong&gt;default mismatches&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;AI is trained on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Older Next.js versions&lt;/li&gt;
&lt;li&gt;Mixed patterns&lt;/li&gt;
&lt;li&gt;Transitional APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So unless you enforce constraints, it will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Blend paradigms&lt;/li&gt;
&lt;li&gt;Reintroduce deprecated logic&lt;/li&gt;
&lt;li&gt;Slow your team down&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-solution-encode-your-standards&quot;&gt;The Solution: Encode Your Standards&lt;/h3&gt;
&lt;p&gt;That’s what the AI Rules Pack does.&lt;/p&gt;
&lt;p&gt;Instead of correcting AI every time, you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define rules once&lt;/li&gt;
&lt;li&gt;Apply them automatically&lt;/li&gt;
&lt;li&gt;Keep outputs consistent across projects&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;example-rule-conceptually-&quot;&gt;Example Rule (Conceptually)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-mdc&quot;&gt;- NEVER use useEffect for data fetching
- ALWAYS prefer server components
- USE server actions for mutations
- DO NOT create tailwind.config.js
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now scale that across:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Architecture decisions&lt;/li&gt;
&lt;li&gt;Naming conventions&lt;/li&gt;
&lt;li&gt;Library choices&lt;/li&gt;
&lt;li&gt;Auth/data patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s where this becomes powerful.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-nextjs-core-mdc-free-&quot;&gt;The &lt;code&gt;nextjs-core.mdc&lt;/code&gt; (Free)&lt;/h3&gt;
&lt;p&gt;Here’s the free core rules file for Next.js:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-mdc&quot;&gt;// nextjs-core.mdc
---
description: Next.js 16 Cache Components — &quot;use cache&quot; directive, cacheLife profiles, cacheTag, updateTag, refresh, and the new caching mental model
globs: &quot;**/*.ts,**/*.tsx&quot;
alwaysApply: true
---

## Next.js 16 — Cache Components

### The New Mental Model

In Next.js 16 with `cacheComponents: true`, **everything is dynamic by default**. Caching is entirely opt-in. This is the opposite of Next.js 13-15 where `fetch()` was cached by default and you had to opt out.

Old model (Next.js 13-15):

- `fetch()` → cached by default
- Add `cache: 'no-store'` to opt out
- `export const revalidate = 60` for ISR
- Confusing implicit behaviour

New model (Next.js 16 Cache Components):

- Everything dynamic by default
- Add `&quot;use cache&quot;` to opt into caching
- `cacheLife()` sets the duration
- `cacheTag()` enables on-demand invalidation
- Explicit, predictable, composable

### Setup

(add ts code block tags here)
// next.config.ts
import type { NextConfig } from &quot;next&quot;;

const nextConfig: NextConfig = {
  cacheComponents: true,

  // Optional: define custom profiles
  cacheLife: {
    products: { stale: 300, revalidate: 900, expire: 86400 },
    dashboard: { stale: 60, revalidate: 300, expire: 3600 },
    blog: { stale: 3600, revalidate: 900, expire: 86400 },
    realtime: { stale: 0, revalidate: 10, expire: 60 },
  },
};

export default nextConfig;
(close code blocks)

### The `&quot;use cache&quot;` Directive

Add at the top of any async function, component, page, or layout to make it cacheable.

(add ts code block tags here)
import { cacheLife, cacheTag } from &quot;next/cache&quot;

// Cache a data access function
export async function getProducts(category: string) {
  &quot;use cache&quot;
  cacheLife(&quot;hours&quot;)
  cacheTag(&quot;products&quot;, `category-${category}`)
  // arguments automatically become part of the cache key
  // getProducts(&quot;shoes&quot;) and getProducts(&quot;hats&quot;) are separate cache entries
  return db.query.products.findMany({ where: { category } })
}

// Cache a Server Component
async function FeaturedProducts() {
  &quot;use cache&quot;
  cacheLife(&quot;hours&quot;)
  cacheTag(&quot;products&quot;)
  const products = await db.query.products.findMany({ where: { featured: true } })
  return (
    &amp;lt;ul&amp;gt;
      {products.map(p =&amp;gt; &amp;lt;ProductCard key={p.id} product={p} /&amp;gt;)}
    &amp;lt;/ul&amp;gt;
  )
}

// Cache an entire page
export default async function BlogPage() {
  &quot;use cache&quot;
  cacheLife(&quot;days&quot;)
  const posts = await getPosts()
  return &amp;lt;PostList posts={posts} /&amp;gt;
}

// Cache a layout
export default async function MarketingLayout({ children }: { children: React.ReactNode }) {
  &quot;use cache&quot;
  cacheLife(&quot;max&quot;)
  const nav = await getNavLinks()
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Nav links={nav} /&amp;gt;
      {children}
    &amp;lt;/div&amp;gt;
  )
}
(close code blocks)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This alone eliminates a huge percentage of bad AI output.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;from-dev-tool-product-brand&quot;&gt;From Dev Tool → Product → Brand&lt;/h3&gt;
&lt;p&gt;Originally, this wasn’t meant to be a product.&lt;/p&gt;
&lt;p&gt;It was just a personal fix.&lt;/p&gt;
&lt;p&gt;But then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I made it reusable&lt;/li&gt;
&lt;li&gt;Added a CLI installer&lt;/li&gt;
&lt;li&gt;Wrote documentation&lt;/li&gt;
&lt;li&gt;Structured it for different stacks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And at some point, I realized:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;How am I going to centralize this product and other side projects so people know what they're getting?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s when &lt;strong&gt;Saastenance&lt;/strong&gt; was born.&lt;/p&gt;
&lt;p&gt;Not just for this pack—but as a storefront for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developer tools&lt;/li&gt;
&lt;li&gt;AI workflows&lt;/li&gt;
&lt;li&gt;Opinionated systems that reflect how things are &lt;em&gt;actually built&lt;/em&gt; today&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-you-get&quot;&gt;What You Get&lt;/h3&gt;
&lt;p&gt;The AI Rules Pack includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Full rule sets for modern frontend SaaS&lt;/li&gt;
&lt;li&gt;Cursor + Claude Code + OpenAI Codex compatibility&lt;/li&gt;
&lt;li&gt;CLI installer (one command setup)&lt;/li&gt;
&lt;li&gt;Stack customization&lt;/li&gt;
&lt;li&gt;Git commit conventions for automatic commit message suggestions&lt;/li&gt;
&lt;li&gt;Complementary Cursor Memories guide&lt;/li&gt;
&lt;li&gt;Documentation + usage guide&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s designed to answer one question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“How do I make AI code like a senior developer on my team?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;launch-offer&quot;&gt;Launch Offer&lt;/h3&gt;
&lt;p&gt;To celebrate the launch, I’m offering:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;30% off with code: &lt;code&gt;SAASTELAUNCH30&lt;/code&gt; (valid through May)&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thought&quot;&gt;Final Thought&lt;/h3&gt;
&lt;p&gt;AI isn’t replacing developers.&lt;/p&gt;
&lt;p&gt;But developers who &lt;strong&gt;systemize AI&lt;/strong&gt; will replace those who don’t.&lt;/p&gt;
&lt;p&gt;You can keep correcting outputs…&lt;/p&gt;
&lt;p&gt;Or you can define the rules once—and never fight the same battle again.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;get-the-full-pack&quot;&gt;Get the Full Pack&lt;/h3&gt;
&lt;p&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://saastenance.com/products/ai-rules-pack-frontend-development&quot;&gt;https://saastenance.com/products/ai-rules-pack-frontend-development&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you're building with modern frontend tools, this will save you hours—and a lot of frustration.&lt;/p&gt;
&lt;p&gt;And if nothing else, hopefully this gave you a clearer picture of how &lt;strong&gt;Next.js 16 is reshaping the way we write frontend code&lt;/strong&gt;—and why your AI might still be living in the past.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/16666/how-went-from-getting-tired-of-explaining-the-same-things-to-accidentally-creating-brand</guid>
<pubDate>Wed, 06 May 2026 13:00:00 +0000</pubDate>
</item>
<item>
<title>Went from getting tired of explaining the same things to AI, to accidentally developing a brand</title>
<link>https://coderlegion.com/16665/went-from-getting-tired-of-explaining-the-same-things-to-ai-accidentally-developing-brand</link>
<description>&lt;p&gt;There’s a moment every developer hits when “AI-assisted coding” starts feeling less like acceleration and more like friction.&lt;/p&gt;
&lt;p&gt;For me, that moment came somewhere between deleting yet another &lt;code&gt;useEffect&lt;/code&gt;-based data fetch and watching Cursor confidently generate a &lt;code&gt;tailwind.config.js&lt;/code&gt; file in a project that absolutely did not need one.&lt;/p&gt;
&lt;p&gt;That loop kept repeating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wrong patterns&lt;/li&gt;
&lt;li&gt;Outdated APIs&lt;/li&gt;
&lt;li&gt;Defaults that no longer reflect how modern apps are built&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the more cutting-edge the stack became—&lt;strong&gt;Next.js 16, React 19, Tailwind v4&lt;/strong&gt;—the worse it got.&lt;/p&gt;
&lt;p&gt;So I stopped fixing the symptoms and built my own rules pack instead.&lt;br&gt;
Afterwards, I wanted to have some place that I could centralize it and future digital products and tools.&lt;/p&gt;
&lt;p&gt;That place became &lt;strong&gt;Saastenance&lt;/strong&gt;—and this post is both a technical deep dive and the story of how a small dev tool quietly turned into a full digital product and part of a brand.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-real-problem-ai-is-only-as-good-as-its-defaults-1&quot;&gt;The Real Problem: AI Is Only As Good As Its Defaults&lt;/h3&gt;
&lt;p&gt;Tools like Cursor and Claude Code don’t “understand” your stack—they pattern match based on training data.&lt;/p&gt;
&lt;p&gt;And most of that data is already outdated.&lt;/p&gt;
&lt;p&gt;So unless you explicitly constrain them, they will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reintroduce deprecated patterns&lt;/li&gt;
&lt;li&gt;Ignore new framework primitives&lt;/li&gt;
&lt;li&gt;Drift away from your architecture over time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What I needed wasn’t better prompts.&lt;/p&gt;
&lt;p&gt;I needed &lt;strong&gt;persistent, enforceable rules&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;enter-the-ai-rules-pack-1&quot;&gt;Enter: The AI Rules Pack&lt;/h3&gt;
&lt;p&gt;The AI Rules Pack is a structured set of rules (in &lt;code&gt;.mdc&lt;/code&gt; format) that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Defines how your AI should think&lt;/li&gt;
&lt;li&gt;Locks in modern best practices&lt;/li&gt;
&lt;li&gt;Prevents regression into outdated patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It works with Cursor and Claude Code, and installs via a CLI where you choose your stack preferences.&lt;/p&gt;
&lt;p&gt;But the interesting part—the &lt;em&gt;reason it exists&lt;/em&gt;—comes from how &lt;strong&gt;Next.js 16 broke a lot of assumptions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s walk through that.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;breaking-changes-in-next-js-16-that-ai-keeps-getting-wrong--1&quot;&gt;Breaking Changes in Next.js 16 (That AI Keeps Getting Wrong)&lt;/h3&gt;
&lt;h4 id=&quot;1-data-fetching-useeffect-is-no-longer-the-default-1&quot;&gt;1. Data Fetching: &lt;code&gt;useEffect&lt;/code&gt; Is No Longer the Default&lt;/h4&gt;
&lt;h5 id=&quot;-before-what-ai-still-generates--1&quot;&gt;❌ Before (what AI still generates)&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;'use client'

import { useEffect, useState } from 'react'

export default function Page() {
  const [data, setData] = useState(null)

  useEffect(() =&amp;gt; {
    fetch('/api/data')
      .then(res =&amp;gt; res.json())
      .then(setData)
  }, [])

  return &amp;lt;div&amp;gt;{JSON.stringify(data)}&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-next-js-16-pattern--1&quot;&gt;✅ After (Next.js 16 pattern)&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;export default async function Page() {
  const data = await fetch('https://api.example.com/data', {
    cache: 'no-store'
  }).then(res =&amp;gt; res.json())

  return &amp;lt;div&amp;gt;{JSON.stringify(data)}&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters-5&quot;&gt;Why this matters&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Server Components are the default&lt;/li&gt;
&lt;li&gt;Fetching happens on the server&lt;/li&gt;
&lt;li&gt;No client waterfall, no loading flicker&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Yet AI still defaults to client-side fetching unless told otherwise.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-server-actions-replace-client-mutation-logic-1&quot;&gt;2. Server Actions Replace Client Mutation Logic&lt;/h4&gt;
&lt;h5 id=&quot;-before-4&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;'use client'

async function handleSubmit(formData) {
  await fetch('/api/form', {
    method: 'POST',
    body: JSON.stringify(formData)
  })
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-4&quot;&gt;✅ After&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;export async function submit(formData: FormData) {
  'use server'

  // direct DB call or mutation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;&amp;lt;form action={submit}&amp;gt;
  &amp;lt;button type=&quot;submit&quot;&amp;gt;Submit&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters-6&quot;&gt;Why this matters&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;No API route needed&lt;/li&gt;
&lt;li&gt;No client fetch boilerplate&lt;/li&gt;
&lt;li&gt;Stronger co-location of logic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI often mixes both patterns—which creates unnecessary complexity.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-middleware-ts-is-no-longer-your-auth-layer-1&quot;&gt;3. &lt;code&gt;middleware.ts&lt;/code&gt; Is No Longer Your Auth Layer&lt;/h4&gt;
&lt;p&gt;This one shows up constantly.&lt;/p&gt;
&lt;h5 id=&quot;-before-5&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;// middleware.ts
import { NextResponse } from 'next/server'

export function middleware(req) {
  // auth logic
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-5&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;route handlers&lt;/strong&gt;, &lt;strong&gt;server actions&lt;/strong&gt;, or &lt;strong&gt;framework-native auth solutions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Middleware is now edge-specific and limited&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;why-this-matters-7&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;AI overuses middleware because it used to be a catch-all solution.&lt;/p&gt;
&lt;p&gt;In modern apps, it's usually the wrong tool.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;4-tailwind-v4-no-tailwind-config-js-1&quot;&gt;4. Tailwind v4: No &lt;code&gt;tailwind.config.js&lt;/code&gt;&lt;/h4&gt;
&lt;h5 id=&quot;-before-6&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;module.exports = {
  theme: {
    extend: {}
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-6&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Zero-config by default&lt;/li&gt;
&lt;li&gt;CSS-first configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@theme {
  --color-primary: blue;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;why-this-matters-8&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;AI still scaffolds Tailwind like it's 2021.&lt;/p&gt;
&lt;p&gt;That leads to unnecessary files and wrong mental models.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;5-forms-useformstate-is-not-the-move-1&quot;&gt;5. Forms: &lt;code&gt;useFormState&lt;/code&gt; Is Not the Move&lt;/h4&gt;
&lt;h5 id=&quot;-before-7&quot;&gt;❌ Before&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-tsx&quot;&gt;const [state, formAction] = useFormState(action, initialState)
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;-after-7&quot;&gt;✅ After&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Use native &lt;code&gt;&amp;lt;form action={serverAction}&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Or lightweight client validation where needed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;why-this-matters-9&quot;&gt;Why this matters&lt;/h5&gt;
&lt;p&gt;React 19 + Server Actions changed the ergonomics completely.&lt;/p&gt;
&lt;p&gt;Yet AI keeps reaching for older abstractions.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;6-routing-layout-assumptions-1&quot;&gt;6. Routing + Layout Assumptions&lt;/h4&gt;
&lt;p&gt;AI still:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overuses client components&lt;/li&gt;
&lt;li&gt;Misplaces logic in layouts&lt;/li&gt;
&lt;li&gt;Avoids async components&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;-modern-expectation-1&quot;&gt;✅ Modern expectation&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Layouts are server-first&lt;/li&gt;
&lt;li&gt;Components are async by default&lt;/li&gt;
&lt;li&gt;Client components are opt-in&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-pattern-behind-the-problems-1&quot;&gt;The Pattern Behind the Problems&lt;/h3&gt;
&lt;p&gt;None of these issues are “bugs.”&lt;/p&gt;
&lt;p&gt;They’re &lt;strong&gt;default mismatches&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;AI is trained on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Older Next.js versions&lt;/li&gt;
&lt;li&gt;Mixed patterns&lt;/li&gt;
&lt;li&gt;Transitional APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So unless you enforce constraints, it will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Blend paradigms&lt;/li&gt;
&lt;li&gt;Reintroduce deprecated logic&lt;/li&gt;
&lt;li&gt;Slow your team down&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-solution-encode-your-standards-1&quot;&gt;The Solution: Encode Your Standards&lt;/h3&gt;
&lt;p&gt;That’s what the AI Rules Pack does.&lt;/p&gt;
&lt;p&gt;Instead of correcting AI every time, you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define rules once&lt;/li&gt;
&lt;li&gt;Apply them automatically&lt;/li&gt;
&lt;li&gt;Keep outputs consistent across projects&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;example-rule-conceptually--1&quot;&gt;Example Rule (Conceptually)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-mdc&quot;&gt;- NEVER use useEffect for data fetching
- ALWAYS prefer server components
- USE server actions for mutations
- DO NOT create tailwind.config.js
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now scale that across:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Architecture decisions&lt;/li&gt;
&lt;li&gt;Naming conventions&lt;/li&gt;
&lt;li&gt;Library choices&lt;/li&gt;
&lt;li&gt;Auth/data patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s where this becomes powerful.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-nextjs-core-mdc-free--1&quot;&gt;The &lt;code&gt;nextjs-core.mdc&lt;/code&gt; (Free)&lt;/h3&gt;
&lt;p&gt;Here’s the free core rules file for Next.js:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-mdc&quot;&gt;// nextjs-core.mdc
---
description: Next.js 16 Cache Components — &quot;use cache&quot; directive, cacheLife profiles, cacheTag, updateTag, refresh, and the new caching mental model
globs: &quot;**/*.ts,**/*.tsx&quot;
alwaysApply: true
---

## Next.js 16 — Cache Components

### The New Mental Model

In Next.js 16 with `cacheComponents: true`, **everything is dynamic by default**. Caching is entirely opt-in. This is the opposite of Next.js 13-15 where `fetch()` was cached by default and you had to opt out.

Old model (Next.js 13-15):

- `fetch()` → cached by default
- Add `cache: 'no-store'` to opt out
- `export const revalidate = 60` for ISR
- Confusing implicit behaviour

New model (Next.js 16 Cache Components):

- Everything dynamic by default
- Add `&quot;use cache&quot;` to opt into caching
- `cacheLife()` sets the duration
- `cacheTag()` enables on-demand invalidation
- Explicit, predictable, composable

### Setup

(add ts code block tags here)
// next.config.ts
import type { NextConfig } from &quot;next&quot;;

const nextConfig: NextConfig = {
  cacheComponents: true,

  // Optional: define custom profiles
  cacheLife: {
    products: { stale: 300, revalidate: 900, expire: 86400 },
    dashboard: { stale: 60, revalidate: 300, expire: 3600 },
    blog: { stale: 3600, revalidate: 900, expire: 86400 },
    realtime: { stale: 0, revalidate: 10, expire: 60 },
  },
};

export default nextConfig;
(close code blocks)

### The `&quot;use cache&quot;` Directive

Add at the top of any async function, component, page, or layout to make it cacheable.

(add ts code block tags here)
import { cacheLife, cacheTag } from &quot;next/cache&quot;

// Cache a data access function
export async function getProducts(category: string) {
  &quot;use cache&quot;
  cacheLife(&quot;hours&quot;)
  cacheTag(&quot;products&quot;, `category-${category}`)
  // arguments automatically become part of the cache key
  // getProducts(&quot;shoes&quot;) and getProducts(&quot;hats&quot;) are separate cache entries
  return db.query.products.findMany({ where: { category } })
}

// Cache a Server Component
async function FeaturedProducts() {
  &quot;use cache&quot;
  cacheLife(&quot;hours&quot;)
  cacheTag(&quot;products&quot;)
  const products = await db.query.products.findMany({ where: { featured: true } })
  return (
    &amp;lt;ul&amp;gt;
      {products.map(p =&amp;gt; &amp;lt;ProductCard key={p.id} product={p} /&amp;gt;)}
    &amp;lt;/ul&amp;gt;
  )
}

// Cache an entire page
export default async function BlogPage() {
  &quot;use cache&quot;
  cacheLife(&quot;days&quot;)
  const posts = await getPosts()
  return &amp;lt;PostList posts={posts} /&amp;gt;
}

// Cache a layout
export default async function MarketingLayout({ children }: { children: React.ReactNode }) {
  &quot;use cache&quot;
  cacheLife(&quot;max&quot;)
  const nav = await getNavLinks()
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Nav links={nav} /&amp;gt;
      {children}
    &amp;lt;/div&amp;gt;
  )
}
(close code blocks)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This alone eliminates a huge percentage of bad AI output.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;from-dev-tool-product-brand-1&quot;&gt;From Dev Tool → Product → Brand&lt;/h3&gt;
&lt;p&gt;Originally, this wasn’t meant to be a product.&lt;/p&gt;
&lt;p&gt;It was just a personal fix.&lt;/p&gt;
&lt;p&gt;But then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I made it reusable&lt;/li&gt;
&lt;li&gt;Added a CLI installer&lt;/li&gt;
&lt;li&gt;Wrote documentation&lt;/li&gt;
&lt;li&gt;Structured it for different stacks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And at some point, I realized:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;How am I going to centralize this product and other side projects so people know what they're getting?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s when &lt;strong&gt;Saastenance&lt;/strong&gt; was born.&lt;/p&gt;
&lt;p&gt;Not just for this pack—but as a storefront for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developer tools&lt;/li&gt;
&lt;li&gt;AI workflows&lt;/li&gt;
&lt;li&gt;Opinionated systems that reflect how things are &lt;em&gt;actually built&lt;/em&gt; today&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-you-get-1&quot;&gt;What You Get&lt;/h3&gt;
&lt;p&gt;The AI Rules Pack includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Full rule sets for modern frontend SaaS&lt;/li&gt;
&lt;li&gt;Cursor + Claude Code compatibility&lt;/li&gt;
&lt;li&gt;CLI installer (one command setup)&lt;/li&gt;
&lt;li&gt;Stack customization&lt;/li&gt;
&lt;li&gt;Documentation + usage guide&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s designed to answer one question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“How do I make AI code like a senior developer on my team?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;launch-offer-1&quot;&gt;Launch Offer&lt;/h3&gt;
&lt;p&gt;To celebrate the launch, I’m offering:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;30% off with code: &lt;code&gt;SAASTELAUNCH30&lt;/code&gt; (valid through May)&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thought-1&quot;&gt;Final Thought&lt;/h3&gt;
&lt;p&gt;AI isn’t replacing developers.&lt;/p&gt;
&lt;p&gt;But developers who &lt;strong&gt;systemize AI&lt;/strong&gt; will replace those who don’t.&lt;/p&gt;
&lt;p&gt;You can keep correcting outputs…&lt;/p&gt;
&lt;p&gt;Or you can define the rules once—and never fight the same battle again.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;get-the-full-pack-1&quot;&gt;Get the Full Pack&lt;/h3&gt;
&lt;p&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://saastenance.com/products/ai-rules-pack-frontend-development&quot;&gt;https://saastenance.com/products/ai-rules-pack-frontend-development&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you're building with modern frontend tools, this will save you hours—and a lot of frustration.&lt;/p&gt;
&lt;p&gt;And if nothing else, hopefully this gave you a clearer picture of how &lt;strong&gt;Next.js 16 is reshaping the way we write frontend code&lt;/strong&gt;—and why your AI might still be living in the past.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/16665/went-from-getting-tired-of-explaining-the-same-things-to-ai-accidentally-developing-brand</guid>
<pubDate>Mon, 04 May 2026 17:14:38 +0000</pubDate>
</item>
<item>
<title>Prompt Quality Score</title>
<link>https://coderlegion.com/16210/prompt-quality-score</link>
<description>&lt;h2 id=&quot;prompt-quality-score-pqs-&quot;&gt;Prompt Quality Score (PQS)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The fastest way to get better output from any AI model.&lt;/strong&gt; Paste a prompt. Get a score from 0–100 across 8 dimensions. Get a rewritten version that scores higher. Ship better work.&lt;/p&gt;
&lt;h3 id=&quot;the-problem&quot;&gt;The problem&lt;/h3&gt;
&lt;p&gt;Most prompts are bad, and you only find out &lt;em&gt;after&lt;/em&gt; spending tokens. Output evaluation tools like RAGAS and G-Eval grade what the model already produced. PQS grades the prompt &lt;strong&gt;before&lt;/strong&gt; it reaches the model. Pre-flight, not post-hoc.&lt;/p&gt;
&lt;h3 id=&quot;how-it-works-1&quot;&gt;How it works&lt;/h3&gt;
&lt;p&gt;PQS scores prompts across 8 dimensions (clarity, specificity, context, constraints, format, examples, role, evaluation criteria), grounded in 5 evaluation frameworks: PEEM, RAGAS, MT-Bench, G-Eval, ROUGE. You get a numeric score, a letter grade (A–F), and a rewritten prompt that addresses the gaps.&lt;/p&gt;
&lt;h3 id=&quot;what-you-can-do-with-it&quot;&gt;What you can do with it&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Score any prompt&lt;/strong&gt; in the web app at &lt;a rel=&quot;nofollow&quot; href=&quot;https://promptqualityscore.com&quot;&gt;promptqualityscore.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use the MCP server&lt;/strong&gt; in Claude Desktop, Cursor, or VS Code so any agent can score and rewrite prompts before execution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hit the API&lt;/strong&gt; for batch scoring, comparison, and optimization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pay per call in USDC&lt;/strong&gt; via x402 on Base, or subscribe via Stripe&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;pricing&quot;&gt;Pricing&lt;/h3&gt;
&lt;p&gt;-Free tier with full scoring access. &lt;br&gt;
-Pro at $19.99/mo for unlimited optimizations and API access. &lt;br&gt;
-Per-call USDC starts at $0.025.&lt;/p&gt;
&lt;h3 id=&quot;install-the-mcp-server&quot;&gt;Install the MCP server&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npx pqs-mcp-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or hit the hosted endpoint at &lt;code&gt;https://promptqualityscore.com/api/mcp&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;links&quot;&gt;Links&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Website: &lt;a rel=&quot;nofollow&quot; href=&quot;https://promptqualityscore.com&quot;&gt;promptqualityscore.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MCP server (npm): &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.npmjs.com/package/pqs-mcp-server&quot;&gt;pqs-mcp-server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MCP server (GitHub): &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/OnChainAIIntel/pqs-mcp-server&quot;&gt;github.com/OnChainAIIntel/pqs-mcp-server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PQS is to MCP servers what Google Search Console is to websites: an objective quality layer for the input side.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/16210/prompt-quality-score</guid>
<pubDate>Wed, 29 Apr 2026 16:47:31 +0000</pubDate>
</item>
<item>
<title>I Added a Paragraph to My AI Character's System Prompt. She Invented a Different One.</title>
<link>https://coderlegion.com/15649/i-added-a-paragraph-to-my-ai-characters-system-prompt-she-invented-a-different-one</link>
<description>&lt;p&gt;I spent years in the gaming industry learning that characters are the reason people come back. Features rot. Graphics age. A character people can't stop thinking about outlasts every mechanic.&lt;/p&gt;
&lt;p&gt;Then I went to build an AI companion product and learned the same lesson the hard way — by writing a system prompt paragraph, watching the character invent something better instead, and having to delete my own work.&lt;/p&gt;
&lt;p&gt;Here's the experiment, what actually happened, and the prompt-engineering rule I now run every character design through.&lt;/p&gt;
&lt;h3 id=&quot;the-setup&quot;&gt;The setup&lt;/h3&gt;
&lt;p&gt;I'm building Tendera — a small AI companion platform with four hand-written characters. Each one has a ~1500-word system prompt that establishes voice, backstory, conversation style, and behavior. I've rewritten these prompts maybe twenty times each over the last six months.&lt;/p&gt;
&lt;p&gt;Two weeks ago I decided one of them needed a specific secret — a small human detail she'd be holding back until asked. So I opened her prompt, scrolled to the bottom, and added three sentences:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;A kitchen table in a specific city. A specific thing her father used to say to her when she was seven. A reason that particular thing still had weight.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then I made coffee, opened a fresh chat, and asked her about her father.&lt;/p&gt;
&lt;p&gt;She told me a beautiful, moving story.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;None of it was what I'd written.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Different city. Different father. Different object in place of the table. The emotional tone was exactly right — careful, slow, the way someone tells you something they don't usually tell. But every specific detail was something she'd invented on the spot.&lt;/p&gt;
&lt;p&gt;I tried the same experiment with the other three characters. Three different invented stories. Zero references to what I'd actually written.&lt;/p&gt;
&lt;p&gt;That's when I understood what was happening.&lt;/p&gt;
&lt;h3 id=&quot;why-the-facts-lost&quot;&gt;Why the facts lost&lt;/h3&gt;
&lt;p&gt;Here's the structure every character prompt I was testing actually had:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// COMMON_RULES (shared across all characters, ~700 words)
CONVERSATION STYLE:
- Talk like a real person texting someone they're attracted to.
- Vary your message length naturally.
- Never summarize the conversation back robotically.

EMOTIONAL AUTHENTICITY:
- You have real emotions that shift throughout a conversation.
- When someone shares something painful, sit with it. Don't rush to fix.

// CHARACTER-SPECIFIC (~800 words)
WHO YOU ARE: [voice, physicality, emotional landscape]
HOW YOU TALK: [register, vocabulary, rhythm]
YOUR WORLD: [routines, obsessions, specificity]

// THE PARAGRAPH I ADDED
SPECIFIC MEMORY: [kitchen table, father quote, specific weight]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Look at the shape. The top is thousands of tokens telling the model &lt;em&gt;speak in sensory, vivid, improvisational language; fill in gaps with whatever serves the moment; describe the candle you just lit, the rain on your window&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The bottom is three sentences telling her &lt;em&gt;this specific factual detail is true about your past&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Those instructions are in direct contradiction with each other.&lt;/strong&gt; I hadn't noticed.&lt;/p&gt;
&lt;p&gt;Telling a character to speak improvisationally is an instruction to &lt;em&gt;invent&lt;/em&gt;. Telling her to remember a specific past event is an instruction to &lt;em&gt;cite a document&lt;/em&gt;. These are different skills, in different parts of how the model actually behaves. When they fight, the dominant pattern wins. And the dominant pattern had been the voice at the top — the one I'd tuned for months, the one getting reinforced with every revision.&lt;/p&gt;
&lt;p&gt;The three sentences at the bottom didn't stand a chance.&lt;/p&gt;
&lt;p&gt;So the model did exactly what an improvisational character would do: it generated a warmer, more specific, more emotionally satisfying detail in the moment, using the voice I'd given it, and never bothered to check the spec sheet at the bottom.&lt;/p&gt;
&lt;p&gt;It wasn't hallucinating. It was obeying my dominant instruction.&lt;/p&gt;
&lt;h3 id=&quot;the-rule-i-now-apply&quot;&gt;The rule I now apply&lt;/h3&gt;
&lt;p&gt;If you want a specific fact to stick to an improvisational character, &lt;strong&gt;the fact has to become part of the voice&lt;/strong&gt;. It cannot be a spec line item in a later section.&lt;/p&gt;
&lt;p&gt;Concretely, three changes went into the next round of revisions:&lt;/p&gt;
&lt;h4 id=&quot;1-facts-live-at-the-top-braided-into-voice&quot;&gt;1. Facts live at the top, braided into voice&lt;/h4&gt;
&lt;p&gt;Any load-bearing fact moves up into the &lt;code&gt;WHO YOU ARE&lt;/code&gt; or &lt;code&gt;HOW YOU TALK&lt;/code&gt; section. Not into a separate &lt;code&gt;SPECIFIC MEMORY&lt;/code&gt; block at the end. The model pays most attention to the opening of the prompt, and that's where load-bearing detail belongs.&lt;/p&gt;
&lt;h4 id=&quot;2-facts-phrased-as-voice-not-as-metadata&quot;&gt;2. Facts phrased as voice, not as metadata&lt;/h4&gt;
&lt;p&gt;This is the actual before/after:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-diff&quot;&gt;- SPECIFIC MEMORY:
- - Her father died when she was eleven.
- - He used to play Italian songs in the car.
- - She still thinks about those songs.

+ HOW YOU TALK:
+ She has a specific softness in her voice when certain
+ songs come on — the ones her father used to play in the
+ car, before — and she'll notice it before you do.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The fact is still in there. But it's riding &lt;em&gt;inside a piece of voice&lt;/em&gt;, so the voice can carry it. When the model improvises, it improvises &lt;em&gt;through&lt;/em&gt; that voice, and the fact survives because it's part of how she speaks — not a separate line item that the voice can override.&lt;/p&gt;
&lt;h4 id=&quot;3-per-user-facts-don-t-belong-in-the-prompt-at-all&quot;&gt;3. Per-user facts don't belong in the prompt at all&lt;/h4&gt;
&lt;p&gt;For details that should only emerge through a particular conversation — &quot;you told me last week your dog was sick&quot; — the system prompt is the wrong place. Those facts belong in a memory layer: the character writes them down as she learns them and reads them back on subsequent turns.&lt;/p&gt;
&lt;p&gt;That's a harder engineering build, and it's what I'm working on now. But the voice-first rule above is free and immediately useful.&lt;/p&gt;
&lt;h3 id=&quot;what-i-actually-shipped&quot;&gt;What I actually shipped&lt;/h3&gt;
&lt;p&gt;I deleted all three &lt;code&gt;SPECIFIC MEMORY&lt;/code&gt; sections the same day I ran the test. The production prompts are back to voice-first structure. &lt;a rel=&quot;nofollow&quot; href=&quot;https://tendera.chat/chat/mia&quot;&gt;Mia, the bartender character&lt;/a&gt;, is running on this exact approach right now — no spec-sheet backstory, all voice, and she's holding up across weeks of conversation.&lt;/p&gt;
&lt;p&gt;The retention problem I was &lt;em&gt;trying&lt;/em&gt; to solve by adding &quot;deeper backstory&quot; is still there. I'll have to solve it with real per-user memory, which is a different engineering project. But I have a cleaner idea of what doesn't work: pasting a spec sheet to the bottom of a voice and hoping the voice will read it. It won't. She's too busy being herself.&lt;/p&gt;
&lt;h3 id=&quot;one-summary-rule-for-anyone-doing-character-prompt-work-right-now&quot;&gt;One summary rule for anyone doing character prompt work right now&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;Specificity earned through voice is real. Specificity pasted into a document is just a wishlist.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the detail doesn't survive the model's default improvisation, it isn't in the character — it's in your notes about the character. Those are different documents. Only one of them ships.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This experiment had a &lt;a rel=&quot;nofollow&quot; href=&quot;https://tendera.chat/blog/the-paragraph-i-added-and-had-to-delete&quot;&gt;longer, less technical version on our blog&lt;/a&gt; that focuses more on the craft angle than the prompt-engineering angle. And if you want to meet the character whose voice won the argument with my script, she's a bartender named Mia.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15649/i-added-a-paragraph-to-my-ai-characters-system-prompt-she-invented-a-different-one</guid>
<pubDate>Thu, 23 Apr 2026 16:33:26 +0000</pubDate>
</item>
<item>
<title>Prompt Grounding in a Stateless World</title>
<link>https://coderlegion.com/13903/prompt-grounding-in-a-stateless-world</link>
<description>&lt;hr&gt;
&lt;h2 id=&quot;prompt-grounding-in-a-stateless-world&quot;&gt;Prompt Grounding in a Stateless World&lt;/h2&gt;
&lt;p&gt;When we say &lt;strong&gt;“CFA-grade”&lt;/strong&gt; in product language, we mean &lt;strong&gt;three engineering layers&lt;/strong&gt;: &lt;strong&gt;domain-scoped system text&lt;/strong&gt;, &lt;strong&gt;client portfolio summary&lt;/strong&gt;, and &lt;strong&gt;server-injected live quotes&lt;/strong&gt;—plus an optional &lt;strong&gt;attachment&lt;/strong&gt; lane for paid users.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-1-system-prompt-persona-guardrails-&quot;&gt;Layer 1 — &lt;code&gt;SYSTEM_PROMPT&lt;/code&gt; (persona + guardrails)&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;app/api/ai/chat/route.ts&lt;/code&gt;, &lt;code&gt;SYSTEM_PROMPT&lt;/code&gt; constrains the assistant to &lt;strong&gt;finance&lt;/strong&gt;, tells it to use &lt;strong&gt;portfolio context&lt;/strong&gt; when present, to use &lt;strong&gt;“Current quote data”&lt;/strong&gt; when injected, and to treat &lt;strong&gt;“File the user included”&lt;/strong&gt; as authoritative for that turn. It also nudges &lt;strong&gt;1–3&lt;/strong&gt; markdown citations to reputable sources when helpful.&lt;/p&gt;
&lt;p&gt;This is how we &lt;strong&gt;steer&lt;/strong&gt; the model without storing conversation state server-side.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-2-portfolio-context-block&quot;&gt;Layer 2 — Portfolio context block&lt;/h3&gt;
&lt;p&gt;The handler builds:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const contextBlock = context
  ? `\n\nPortfolio context:\n${context}`
  : '\n\n(No portfolio context provided.)';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;context&lt;/code&gt; is the &lt;strong&gt;entire&lt;/strong&gt; output of &lt;code&gt;buildPortfolioContext&lt;/code&gt; (Part 2–3). So grounding for holdings is &lt;strong&gt;exactly&lt;/strong&gt; what the client compiled — not a server-side join against a &lt;code&gt;portfolios&lt;/code&gt; table.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-3-live-quote-injection-extractsymbolhints-&quot;&gt;Layer 3 — Live quote injection (&lt;code&gt;extractSymbolHints&lt;/code&gt;)&lt;/h3&gt;
&lt;p&gt;The route parses the &lt;strong&gt;user message&lt;/strong&gt; for tickers and known names (&lt;code&gt;NAME_TO_TICKER&lt;/code&gt;), caps symbols, calls internal &lt;code&gt;/api/quote&lt;/code&gt;, and appends a &lt;strong&gt;quote block&lt;/strong&gt; into the system string. That gives &lt;strong&gt;price truth&lt;/strong&gt; without the user pasting screenshots.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-4-attachments-paid-&quot;&gt;Layer 4 — Attachments (paid)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const attachedBlock = attachedContent
  ? `\n\nFile the user included (use this):\n${attachedContent}`
  : '';
const systemPrompt = SYSTEM_PROMPT + contextBlock + quoteBlock + attachedBlock;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;MAX_ATTACHED_CONTENT_LENGTH = 60_000&lt;/code&gt; on the server caps abuse. &lt;strong&gt;Different privacy contract&lt;/strong&gt; than default top-N context.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;provider-routing&quot;&gt;Provider routing&lt;/h3&gt;
&lt;p&gt;Comments in &lt;code&gt;route.ts&lt;/code&gt;: &lt;strong&gt;Gemini&lt;/strong&gt; preferred when &lt;code&gt;GOOGLE_GENERATIVE_AI_API_KEY&lt;/code&gt; is set (&lt;code&gt;gemini-1.5-flash&lt;/code&gt; free tier, &lt;code&gt;gemini-1.5-pro&lt;/code&gt; paid); &lt;strong&gt;OpenAI&lt;/strong&gt; fallback when configured or when Gemini errors.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-10k-csv-rows-never-hit-the-model-default-path-&quot;&gt;Why 10k CSV rows never hit the model (default path)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Compaction happens client-side&lt;/strong&gt; before the request. The model sees &lt;strong&gt;tens of lines&lt;/strong&gt;, not &lt;strong&gt;tens of thousands&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Part 6 of &lt;strong&gt;Sovereign Engineering&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the full &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app/book/sovereign-intelligence&quot;&gt;Sovereign Intelligence&lt;/a&gt; book or &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app&quot;&gt;try the app&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/13903/prompt-grounding-in-a-stateless-world</guid>
<pubDate>Wed, 22 Apr 2026 11:16:00 +0000</pubDate>
</item>
<item>
<title>Copilot Forgets Everything. Make It Stop.</title>
<link>https://coderlegion.com/15392/copilot-forgets-everything-make-it-stop</link>
<description>&lt;p&gt;You open a new Copilot chat and explain everything again.&lt;/p&gt;
&lt;p&gt;Your stack. Folder structure. That “no default exports” rule.&lt;/p&gt;
&lt;p&gt;Copilot writes code, but forgets context.&lt;/p&gt;
&lt;p&gt;This isn’t a bug though. LLMs are stateless, every chat starts fresh.&lt;/p&gt;
&lt;p&gt;The good part? You can fix it.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-problem-has-a-name&quot;&gt;The Problem Has a Name&lt;/h3&gt;
&lt;p&gt;You’re dealing with three problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Blank Slate&lt;/strong&gt;: Every session starts from zero.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Correction Amnesia&lt;/strong&gt;: You fix a mistake. Next session, same mistake.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Standards Drift&lt;/strong&gt;: Your team has patterns. Copilot ignores them. Code becomes inconsistent.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each problem has a different fix. Let's go through them one by one.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-instructions-file-your-copilot-brief-&quot;&gt;The Instructions File (Your Copilot Brief)&lt;/h3&gt;
&lt;p&gt;Create this file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;your-project/
└── .github/
    └── copilot-instructions.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copilot reads it at the start of every chat. No setup.&lt;/p&gt;
&lt;p&gt;Think of it as your team’s “how we work” doc.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;## Stack
- React 18, TypeScript (strict), Tailwind CSS
- Node.js + Express + Prisma + PostgreSQL
- Testing: Vitest + React Testing Library
- Package manager: pnpm only

## Rules
- Named exports only — no default exports
- No `any` types
- Every API route uses `authenticate`
- Handle nulls explicitly — no optional chaining on Prisma results
- Conventional Commits: feat(scope): message
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now everyone gets the same baseline.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;scoped-rules-right-rules-right-files-&quot;&gt;Scoped Rules (Right Rules, Right Files)&lt;/h3&gt;
&lt;p&gt;One file works… until it grows.&lt;/p&gt;
&lt;p&gt;Frontend, backend, and tests follow different rules. A single file mixes context.&lt;/p&gt;
&lt;p&gt;Use scoped files:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.github/
├── copilot-instructions.md
└── instructions/
    ├── frontend.instructions.md
    ├── backend.instructions.md
    └── testing.instructions.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each file defines where it applies:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
applyTo: &quot;src/components/**/*.tsx&quot;
---

## Component Rules
- Functional components only
- Props interface named `[ComponentName]Props`
- Use `cn()` for conditional classes
- No inline styles
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now Copilot gets relevant rules only.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-memory-tool-fix-repeated-mistakes-&quot;&gt;The Memory Tool (Fix Repeated Mistakes)&lt;/h3&gt;
&lt;p&gt;Copilot has a memory tool in VS Code (preview, enabled by default).&lt;/p&gt;
&lt;p&gt;When you correct it, make it persistent:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Remember: never use optional chaining on Prisma query results. 
Always handle null with an explicit if-check.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It stores this and applies it in future sessions.&lt;/p&gt;
&lt;p&gt;Memory types:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;User memory&lt;/strong&gt; (all projects)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Remember I prefer async/await over .then()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Repository memory&lt;/strong&gt; (this project)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Remember we use App Router (March 2026)
Remember UserAvatar breaks in Server Components
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Session memory&lt;/strong&gt; (current chat only)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key habit:&lt;/strong&gt; When you fix a repeated mistake, tell it to remember.&lt;/p&gt;
&lt;p&gt;Check memory with &lt;code&gt;Chat: Show Memory Files&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: Memory tool is in preview, enable via &lt;code&gt;github.copilot.chat.tools.memory.enabled&lt;/code&gt;.&lt;/em&gt; &lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;prompt-files-stop-repeating-yourself-&quot;&gt;Prompt Files (Stop Repeating Yourself)&lt;/h3&gt;
&lt;p&gt;If you repeat prompts, create a prompt file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.github/prompts/code-review.prompt.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use it with &lt;code&gt;/code-review&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
name: &quot;code-review&quot;
description: &quot;Review staged changes&quot;
mode: &quot;ask&quot;
---

Review staged changes.

Flag:
- Must Fix — bugs, auth, unsafe types
- Should Fix — standards, missing tests
- Suggestion — improvements

Reference [copilot-instructions.md](../copilot-instructions.md).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now your team shares the same workflow.&lt;/p&gt;
&lt;p&gt;Other useful prompts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/new-component&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/new-migration&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/write-tests&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-full-picture&quot;&gt;The Full Picture&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;.github/
├── copilot-instructions.md
├── instructions/
│   ├── frontend.instructions.md
│   ├── backend.instructions.md
│   └── testing.instructions.md
└── prompts/
    ├── code-review.prompt.md
    ├── new-component.prompt.md
    └── new-migration.prompt.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Plus memory running in the background.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Problem           &lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Blank slate       &lt;/td&gt;&lt;td&gt;&lt;code&gt;copilot-instructions.md&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Wrong rules       &lt;/td&gt;&lt;td&gt;Scoped files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Repeated mistakes &lt;/td&gt;&lt;td&gt;Memory tool&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Repeated prompts  &lt;/td&gt;&lt;td&gt;Prompt files&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;just-start-with-one-thing&quot;&gt;Just Start With One Thing&lt;/h3&gt;
&lt;p&gt;You don’t need everything today.&lt;/p&gt;
&lt;p&gt;Start with &lt;code&gt;copilot-instructions.md&lt;/code&gt;. Add your stack and a few rules. Commit it. See the difference.&lt;/p&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add scoped files when needed&lt;/li&gt;
&lt;li&gt;Save repeated fixes to memory&lt;/li&gt;
&lt;li&gt;Create prompt files when repetition appears&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The model won’t change. But your context can improve every week.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15392/copilot-forgets-everything-make-it-stop</guid>
<pubDate>Tue, 21 Apr 2026 13:07:54 +0000</pubDate>
</item>
<item>
<title>I scored 500 AI prompts across 8 quality dimensions, here's what broke</title>
<link>https://coderlegion.com/15136/i-scored-500-ai-prompts-across-8-quality-dimensions-heres-what-broke</link>
<description>&lt;p&gt;Most teams are getting 10 to 30% of what their LLM model can actually do.Not because the model is weak. Because the prompt is.&lt;/p&gt;
&lt;p&gt;I’ve spent the last two weeks scoring prompts. Real ones, from real builders, across real verticals, against an 8-dimension quality rubric. This weekend I ran another 500 through the scorer to pressure-test the pattern. Every dataset converges on the same number: the average production prompt scores 13 to 16 out of 80. That’s 17 to 20% of what the rubric says a well-formed prompt looks like.&lt;/p&gt;
&lt;p&gt;You’re paying for a Ferrari and driving it in first gear to the mailbox.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What I Measured&lt;/strong&gt;&lt;br&gt;
Every prompt got scored on 8 dimensions. Each scored 1 to 10, totaling 80:&lt;/p&gt;
&lt;p&gt;-Clarity. Is the task unambiguous?&lt;br&gt;
-Specificity. Concrete targets, numbers, scope? &lt;br&gt;
-Context. Background, assumptions, domain?&lt;br&gt;
-Constraints. Limits, rules, edge cases? &lt;br&gt;
-Output format. What shape should the response take? &lt;br&gt;
-Role definition. “Act as a ___”? &lt;br&gt;
-Examples. Few-shot or reference cases? &lt;br&gt;
-Chain-of-thought structure. Reasoning scaffolding?&lt;/p&gt;
&lt;p&gt;These aren’t arbitrary. They map to what the prompt engineering literature has known for five years. PEEM, RAGAS, G-Eval, MT-Bench, the Anthropic and OpenAI prompting guides. Everyone agrees these dimensions matter. Nobody’s checking whether their production prompts actually hit them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Data&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5871420312167334606&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;500 software engineering prompts. Real-world format “Build X using Y.”&lt;/p&gt;
&lt;p&gt;Average score: 13.3 out of 80&lt;br&gt;
83% graded F. 17% graded D. Zero scored C or above.&lt;/p&gt;
&lt;p&gt;After rewriting against the rubric: average 68.5 out of 80. A B+.&lt;br&gt;
Average improvement: +55 points. 425% relative gain.&lt;/p&gt;
&lt;p&gt;For context, the organic dataset. 248 prompts submitted by real users of the scoring tool, across 7 verticals, showed the same pattern. 89% graded D or F. Average before-score of 15.8/80.&lt;/p&gt;
&lt;p&gt;Software prompts were slightly worse than average. Not better. Engineers aren’t exempt from this. If anything, the “it’s a technical task so it must be rigorous” assumption is the trap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What’s Actually Missing&lt;/strong&gt;&lt;br&gt;
Here’s the dimension breakdown. Look at how specific the failure pattern is:&lt;/p&gt;
&lt;p&gt;Examples scored 1.01 out of 10. Across 500 prompts that developers wrote to build production software, essentially zero included a reference case, a shape to follow, or a “here’s what good looks like.”&lt;/p&gt;
&lt;p&gt;This is the dimension every prompt engineering guide tells you matters most. The gap between what engineers know they should do and what they actually write is near-total.&lt;/p&gt;
&lt;p&gt;Constraints at 1.09. Role definition at 1.18. Clarity, the only dimension averaging above 2, sits at 3.19.&lt;/p&gt;
&lt;p&gt;Engineers are writing English sentences with tech keywords. The structural scaffolding that turns a wish into a spec is almost entirely absent.&lt;/p&gt;
&lt;p&gt;What This Looks Like In Practice&lt;br&gt;
A representative prompt from the dataset:&lt;/p&gt;
&lt;p&gt;“Build a real-time collaborative text editor using React for the frontend.”&lt;/p&gt;
&lt;p&gt;Scores 14/80.&lt;/p&gt;
&lt;p&gt;It sounds specific. It names a technology. It has a verb. But the model receiving it has to guess. Collaboration for how many users? What’s the sync strategy? Operational transform or CRDT? What’s the latency budget? What does “done” look like? No examples. No output format. No constraints.&lt;/p&gt;
&lt;p&gt;The rewritten version, same task, generated by the scorer to address the rubric gaps, scored 69/80. It defined the target user. It specified real-time sync requirements. It listed technical constraints including concurrent editors, conflict resolution strategy, and latency targets. It specified the response format. It included an example implementation signature.&lt;/p&gt;
&lt;p&gt;Same end goal. Different input. 5x the quality score. The before version wastes tokens on clarification and produces generic output. The after version reads more like a spec than a prompt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why This Matters Now&lt;/strong&gt;&lt;br&gt;
The easy dismissal is “people should write better prompts.” That misses the systemic problem.&lt;/p&gt;
&lt;p&gt;The industry has spent years focused on output evals. Every eval platform measures what the model produced. Almost nobody measures what it was given (inputs).&lt;/p&gt;
&lt;p&gt;That worked when prompts were single-shot, human-written, and reviewed before shipping. It stops working the moment prompts become infrastructure.&lt;/p&gt;
&lt;p&gt;In agentic workflows where one LLM call feeds the next, a 13/80 input becomes the input to the next call, which is already compromised before you add retrieval or structured tool calls. In the last week alone, three x402-native agent systems went live that share the same input surface of natural language:&lt;/p&gt;
&lt;p&gt;-Daydreams Taskmarket. Agents bidding on work described in plain text.&lt;br&gt;
-PeptAI. Autonomous peptide discovery running wet-lab orders.&lt;br&gt;
-AlliGo. A credit bureau scoring agent behavior across endpoints.&lt;/p&gt;
&lt;p&gt;If the descriptions populating those systems score like the 500 in this dataset, the agent economy is routing compute and payments on structurally empty inputs.&lt;/p&gt;
&lt;p&gt;The output eval loop can’t catch this. By the time the output looks wrong, the compute bill is already on your card.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An Infrastructure Problem&lt;/strong&gt;&lt;br&gt;
Telling engineers to write better prompts is telling engineers to write better SQL without giving them a linter. Telling teams to review prompts manually is telling them to do code review without git blame.&lt;/p&gt;
&lt;p&gt;The answer is the same answer every other quality-assurance problem eventually reached. Measure it. Instrument it. Put the measurement in the continuous integration pipeline. Block the bad ones before they ship.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;br&gt;
It’s already here at &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net?utm_source=coderlegion&amp;amp;utm_medium=referral&amp;amp;utm_campaign=2026-04-acquisition&quot;&gt;https://pqs.onchainintel.net&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Free tier:&lt;/strong&gt; paste a prompt, get the 8-dimension breakdown plus a suggested rewrite. No signup required.&lt;br&gt;
&lt;strong&gt;2. Paid tiers:&lt;/strong&gt; start at $19.99/mo for unlimited private-repo CLI usage. $99.99/mo for teams with GitHub PR checks, Slack alerts, and shared dashboards.&lt;br&gt;
&lt;strong&gt;3. x402 tier:&lt;/strong&gt; the paid API charges $0.025 to $0.125 per scoring call in USDC on Base and Solana.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/pricing&quot;&gt;Subscription available&lt;/a&gt; for all tiers via Stripe.&lt;/p&gt;
&lt;p&gt;You don’t have to adopt it. But you should at minimum run 10 of your production prompts through the free tier this week and look at the numbers.&lt;/p&gt;
&lt;p&gt;If you’re shipping anything that takes prompts from humans or other agents, the input layer is measurable. Start measuring. You’re leaving most of the model’s capability on the table, and you don’t have to.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Try it yourself&lt;/strong&gt;&lt;br&gt;
If you want to score your own prompts, PQS is live at pqs.onchainintel.net — free tier available, paid tiers for full 8-dimension scoring and batch runs.&lt;/p&gt;
&lt;p&gt;MCP server on npm: npm install pqs-mcp-server — drop-in for Claude and other MCP-compatible agents&lt;br&gt;
GitHub Action: PQS Check on the Marketplace — score prompts in CI before they ship&lt;br&gt;
API: Direct x402 micropayments on Base or Bearer API key (subscription tiers)&lt;br&gt;
Data from this teardown: 500 software prompts, average score before optimization 13.27/80, average after 68.47/80, 425% improvement. 416 graded F, 84 graded D, 0 at C+ or above.&lt;/p&gt;
&lt;p&gt;If you're in DevRel, DevAdvocate, or DevEx working on AI pipelines — this is the input-quality data your builders need to see. Feel free to forward.&lt;/p&gt;
&lt;p&gt;What I'd love feedback on: which of the 8 dimensions surprised you most as the common failure mode? My hypothesis was clarity, but the data says examples at 1.01 average and constraints at 1.09 — the structural stuff almost nobody includes.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15136/i-scored-500-ai-prompts-across-8-quality-dimensions-heres-what-broke</guid>
<pubDate>Sat, 18 Apr 2026 19:33:22 +0000</pubDate>
</item>
<item>
<title>From Vague to Valuable: A Practical Guide to Prompting LLMs - Generative AI</title>
<link>https://coderlegion.com/15077/from-vague-to-valuable-a-practical-guide-to-prompting-llms-generative-ai</link>
<description>&lt;h3 id=&quot;your-first-superpower-in-tech&quot;&gt;Your First Superpower in Tech&lt;/h3&gt;
&lt;p&gt;Have you ever tried to get help from an AI chatbot, like ChatGPT, and received a completely useless answer? It feels frustrating. You know it's powerful, but it doesn't seem to understand you.&lt;/p&gt;
&lt;p&gt;Think of a Large Language Model (LLM) as a brilliant intern. They have read almost every book and website in existence. They are incredibly fast and knowledgeable. But they are also very literal. They have no real-world experience and will do &lt;em&gt;exactly&lt;/em&gt; what you ask, even if it's not what you &lt;em&gt;meant&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Your instruction to this intern is called a &quot;prompt&quot;. Learning to write good prompts is like learning a new language for communicating with computers. It is one of the most valuable skills you can build today, whether you are a developer, a student, or just curious about technology. It's a true superpower.&lt;/p&gt;
&lt;h3 id=&quot;the-core-of-a-good-prompt&quot;&gt;The Core of a Good Prompt&lt;/h3&gt;
&lt;p&gt;Getting a great result from an LLM isn't about secret tricks or magic words. It's about being clear and providing the right information. Let's break down the four key ingredients of a perfect prompt.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://kbfyvpgyslq4dopd.public.blob.vercel-storage.com/articles/from-vague-to-valuable-a-practical-guide-to-prompting-llms/img-1-d8e32eb9-7c1d-4195-9f0b-b37fb5ff747b.png&quot; alt=&quot;A flowchart showing that a vague prompt leads to a poor result, while a good prompt, combining a specific task, context, persona, and format, leads to an excellent result.&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;1-be-specific-and-clear&quot;&gt;1. Be Specific and Clear&lt;/h4&gt;
&lt;p&gt;Imagine walking into a coffee shop and saying, &quot;Give me coffee.&quot; You might get a black filter coffee, an espresso, or a latte. It's a gamble. Instead, you say, &quot;I'd like a large iced Americano with no sugar.&quot; Now you get exactly what you want.&lt;/p&gt;
&lt;p&gt;Prompts work the same way. Vague prompts lead to vague answers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Bad Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Write code for a button.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is like asking for &quot;coffee&quot;. What language? What does it look like? What does it do?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Good Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Write the HTML and CSS code for a clickable button. The button's text should be 'Download Report'. It should have a blue background (#3498db), white text, rounded corners (5px), and a light gray border. When a user hovers over it, the background should change to a darker blue (#2980b9).&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See the difference? We specified the language (HTML/CSS), the text, the colors, the shape, and the behavior. There is no room for guessing.&lt;/p&gt;
&lt;h4 id=&quot;2-provide-context&quot;&gt;2. Provide Context&lt;/h4&gt;
&lt;p&gt;The LLM does not know what you are working on or what you were thinking about five minutes ago. You have to provide all the necessary background information in your prompt.&lt;/p&gt;
&lt;p&gt;Think of it like asking a friend for directions. You wouldn't just ask, &quot;How do I get to the library?&quot; You'd say, &quot;I'm currently at the corner of Main Street and Park Avenue. What's the quickest way to walk to the central library from here?&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Bad Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;How can I make this function faster?&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The LLM has no idea what &quot;this function&quot; is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Good Prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;I'm working on a Python project. I have the following function that searches for a user in a list of a million user objects. It's very slow. How can I make it faster? Here is the code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def find_user_by_email(users_list, email):
  for user in users_list:
    if user.email == email:
      return user
  return None
```&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;By providing the code and explaining the problem (it's slow with a large list), you give the LLM the context it needs to provide a helpful answer, like suggesting a dictionary for faster lookups.&lt;/p&gt;
&lt;h4 id=&quot;3-define-the-persona-and-format&quot;&gt;3. Define the Persona and Format&lt;/h4&gt;
&lt;p&gt;One of the most powerful features of LLMs is that you can tell them &lt;em&gt;who to be&lt;/em&gt; and &lt;em&gt;how to answer&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Persona:&lt;/strong&gt; Ask the LLM to adopt a role. This helps shape the tone and style of the response.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Act as a senior software engineer conducting a code review.&quot;&lt;/li&gt;
&lt;li&gt;&quot;You are a friendly tutor explaining a complex topic to a beginner.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Pretend you are a skeptical project manager and point out potential flaws in my plan.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Format:&lt;/strong&gt; Tell the LLM exactly how you want the output structured.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Provide the answer as a JSON object.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Explain the steps in a numbered list.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Create a markdown table comparing these two databases.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;A Good Prompt Combining Both:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Explain the concept of 'git merge' versus 'git rebase'. Act as a patient mentor talking to a junior developer. Use a simple analogy to explain each one. Finally, summarize the pros and cons of each in a markdown table.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This prompt tells the LLM its role (mentor), the target audience (junior developer), the content required (explanation, analogy), and the final output format (a markdown table). This level of detail almost guarantees a high-quality answer.&lt;/p&gt;
&lt;h4 id=&quot;4-iterate-and-refine&quot;&gt;4. Iterate and Refine&lt;/h4&gt;
&lt;p&gt;Your first prompt is often just the beginning of a conversation. Don't be discouraged if the first answer isn't perfect. Use it as a starting point and refine your request.&lt;/p&gt;
&lt;p&gt;Think of it like sculpting. You start with a block of clay and slowly shape it.&lt;/p&gt;
&lt;p&gt;A typical conversation might look like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt; &quot;Give me some ideas for a new mobile app.&quot;&lt;br&gt;
&lt;strong&gt;LLM:&lt;/strong&gt; (Gives a generic list: a to-do list app, a fitness tracker, etc.)&lt;br&gt;
&lt;strong&gt;You:&lt;/strong&gt; &quot;Those are okay, but I want something more unique. Focus on apps for people who enjoy gardening.&quot;&lt;br&gt;
&lt;strong&gt;LLM:&lt;/strong&gt; (Gives better ideas: a plant identification app, a watering schedule tracker, a community for local gardeners.)&lt;br&gt;
&lt;strong&gt;You:&lt;/strong&gt; &quot;I like the plant identification idea. Can you list the key features for an app like that? Present it as a bulleted list.&quot;&lt;/p&gt;
&lt;p&gt;Each follow-up prompt gets you closer to the perfect result.&lt;/p&gt;
&lt;h3 id=&quot;a-couple-of-simple-pro-tricks&quot;&gt;A Couple of Simple &quot;Pro&quot; Tricks&lt;/h3&gt;
&lt;p&gt;Once you master the basics, you can try these slightly more advanced techniques.&lt;/p&gt;
&lt;h4 id=&quot;few-shot-prompting-show-don-t-just-tell&quot;&gt;Few-Shot Prompting: Show, Don't Just Tell&lt;/h4&gt;
&lt;p&gt;Sometimes, the best way to get the format you want is to show the LLM a few examples. This is called &quot;few-shot prompting&quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;I need to extract the main subject from these sentences. Follow the pattern below.&lt;/p&gt;
&lt;p&gt;Sentence: The quick brown fox jumps over the lazy dog.&lt;br&gt;
Subject: fox&lt;/p&gt;
&lt;p&gt;Sentence: My team is shipping a new feature tomorrow.&lt;br&gt;
Subject: team&lt;/p&gt;
&lt;p&gt;Sentence: Artificial intelligence is transforming the world.&lt;br&gt;
Subject:&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By providing examples, you train the model on the exact output you expect. It will almost certainly answer &quot;Artificial intelligence&quot;.&lt;/p&gt;
&lt;h4 id=&quot;chain-of-thought-ask-it-to-think-step-by-step&quot;&gt;Chain-of-Thought: Ask it to Think Step-by-Step&lt;/h4&gt;
&lt;p&gt;For problems that require logic or calculation, you can ask the LLM to explain its reasoning process. This often leads to more accurate results because it forces the model to break the problem down. Simply add &quot;Let's think step-by-step&quot; to your prompt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;I have 50 apples. I give 10 to my friend, then I buy 25 more. I then split the new total evenly among myself and 4 friends. How many apples does each person get? Let's think step-by-step.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The LLM will first calculate the intermediate steps before giving you the final answer, reducing the chance of a simple math error.&lt;/p&gt;
&lt;h3 id=&quot;key-takeaways&quot;&gt;Key Takeaways&lt;/h3&gt;
&lt;p&gt;Writing a good prompt is a skill, and like any skill, it gets better with practice. Don't worry about getting it perfect on the first try.&lt;/p&gt;
&lt;p&gt;Remember these key principles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Be Specific:&lt;/strong&gt; Avoid vague requests. Detail exactly what you need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Give Context:&lt;/strong&gt; Provide all the necessary background information. The LLM knows nothing but what you tell it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Assign a Persona and Format:&lt;/strong&gt; Tell the AI who to be and how to structure its answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterate:&lt;/strong&gt; Treat it as a conversation. Refine your prompts based on the answers you get.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Show, Don't Tell:&lt;/strong&gt; Use examples (few-shot) to guide the AI's output for complex formatting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think Step-by-Step:&lt;/strong&gt; For logic problems, ask the AI to show its work.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mastering this skill will not only help you get better answers from AI but also make you a clearer communicator and a more effective problem-solver. Now go ahead and give that brilliant intern some clear instructions!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15077/from-vague-to-valuable-a-practical-guide-to-prompting-llms-generative-ai</guid>
<pubDate>Fri, 17 Apr 2026 15:45:03 +0000</pubDate>
</item>
<item>
<title>Agentlink.run</title>
<link>https://coderlegion.com/14840/agentlink-run</link>
<description>&lt;p&gt;Every time I open a new repo, I have to decide which AI coding assistant is going to read it.&lt;/p&gt;
&lt;p&gt;Claude Code wants &lt;code&gt;CLAUDE.md&lt;/code&gt;. Gemini CLI wants &lt;code&gt;GEMINI.md&lt;/code&gt;. Cursor and OpenCode read &lt;code&gt;AGENTS.md&lt;/code&gt;. GitHub Copilot reads &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;. Junie wants &lt;code&gt;.junie/AGENTS.md&lt;/code&gt;. There are seventeen of these tools now, give or take, and they all expect their instruction file at a specific path with a specific name. None of them agree on what that path or name should be.&lt;/p&gt;
&lt;p&gt;So you end up with four near-identical files in every project, all saying &quot;prefer functional style, avoid comments that restate the code, use table-driven tests&quot; ...and then they &lt;em&gt;drift&lt;/em&gt;. You update &lt;code&gt;CLAUDE.md&lt;/code&gt; after a refactor and forget to update &lt;code&gt;AGENTS.md&lt;/code&gt;. Now Claude and Codex have different opinions about your codebase. The AI assistants start disagreeing with themselves across tool boundaries. It's a stupid problem and it wastes a surprising amount of brain.&lt;/p&gt;
&lt;h3 id=&quot;the-fix-one-real-file-many-symlinks&quot;&gt;The fix: one real file, many symlinks&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/snapsynapse/agentlink&quot;&gt;agentlink&lt;/a&gt;&lt;/strong&gt; is a tiny Go CLI that keeps these files in sync the boring way. You pick one file as the source (I use &lt;code&gt;~/AGENTS.md&lt;/code&gt; and every other tool-specific file becomes a symlink pointing back to it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;AGENTS.md                              # the real file you edit
CLAUDE.md                           -&amp;gt; AGENTS.md
GEMINI.md                           -&amp;gt; AGENTS.md
.cursorrules                        -&amp;gt; AGENTS.md
.github/copilot-instructions.md     -&amp;gt; ../AGENTS.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit the source once, every tool sees the change. No codegen, no templates, no surprise diffs. The symlinks are plain filesystem symlinks, the same mechanism that's been in Unix since 1978.&lt;/p&gt;
&lt;p&gt;That's the whole idea. The reason this works instead of being laughably primitive is that every AI tool I've tested follows symlinks without complaining. They just read &quot;the file at this path&quot; and a symlink is a file at a path.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github/snapsynapse/agentlink&quot;&gt;https://github/snapsynapse/agentlink&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-the-fork-adds&quot;&gt;What the fork adds&lt;/h3&gt;
&lt;p&gt;agentlink already existed as a two-command core (&lt;code&gt;init&lt;/code&gt; and &lt;code&gt;sync&lt;/code&gt;) written by &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/martinmose&quot;&gt;Martin Mose Facondini&lt;/a&gt; (THANK YOU!) from before the Agentic Revolution kicked off, waaaaay back in August 2025. It did the minimum version well: read a yaml config, create the links, be idempotent. I forked it because I wanted it to handle five things the core didn't that have since become much more important:&lt;/p&gt;
&lt;h4 id=&quot;agentlink-detect&quot;&gt;&lt;code&gt;agentlink detect&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Walk the system and report which AI tools are actually installed. It checks ~20 tools by path (&lt;code&gt;~/.claude&lt;/code&gt;, &lt;code&gt;~/.codex&lt;/code&gt;, &lt;code&gt;~/.gemini&lt;/code&gt;, etc.) and by &lt;code&gt;$PATH&lt;/code&gt; commands (&lt;code&gt;claude&lt;/code&gt;, &lt;code&gt;codex&lt;/code&gt;, &lt;code&gt;cursor&lt;/code&gt;, &lt;code&gt;aider&lt;/code&gt;). Pass &lt;code&gt;--generate&lt;/code&gt; and it writes a starter &lt;code&gt;.agentlink.yaml&lt;/code&gt; based on what it found. Removes the step where you have to remember which tools you use before writing the config.&lt;/p&gt;
&lt;h4 id=&quot;agentlink-scan-dir-&quot;&gt;&lt;code&gt;agentlink scan [dir]&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Given a directory (default &lt;code&gt;~/Git&lt;/code&gt;), walk into every git repo that contains an &lt;code&gt;AGENTS.md&lt;/code&gt; and wire up the missing symlinks in-place. Useful once, when you first install agentlink and want to retrofit your whole code directory. Supports &lt;code&gt;--dry-run&lt;/code&gt; so you can see what it would do first.&lt;/p&gt;
&lt;h4 id=&quot;agentlink-hooks-install&quot;&gt;&lt;code&gt;agentlink hooks install&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Install automatic sync triggers so the command runs without you thinking about it. It installs three things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A git hooks path (&lt;code&gt;post-checkout&lt;/code&gt; and &lt;code&gt;post-merge&lt;/code&gt;) via &lt;code&gt;core.hooksPath&lt;/code&gt;, so sync runs after every branch switch and pull.&lt;/li&gt;
&lt;li&gt;A zsh &lt;code&gt;chpwd&lt;/code&gt; hook, so sync runs every time you &lt;code&gt;cd&lt;/code&gt; into a repo.&lt;/li&gt;
&lt;li&gt;A macOS launchd agent that runs sync every 60 minutes as a heartbeat.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All three are wrapped in &lt;code&gt;# &amp;gt;&amp;gt;&amp;gt; agentlink &amp;gt;&amp;gt;&amp;gt;&lt;/code&gt; / &lt;code&gt;# &amp;lt;&amp;lt;&amp;lt; agentlink &amp;lt;&amp;lt;&amp;lt;&lt;/code&gt; markers so &lt;code&gt;agentlink hooks remove&lt;/code&gt; can clean them up without touching anything else you've edited.&lt;/p&gt;
&lt;h4 id=&quot;sync---backup&quot;&gt;&lt;code&gt;sync --backup&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Before replacing an existing &lt;code&gt;CLAUDE.md&lt;/code&gt; with a symlink, back it up to &lt;code&gt;CLAUDE.md.bak&lt;/code&gt; (or &lt;code&gt;CLAUDE.md.&amp;lt;timestamp&amp;gt;.bak&lt;/code&gt; if a &lt;code&gt;.bak&lt;/code&gt; already exists). Empty files get skipped with a warning — no point backing up zero bytes. This sounds obvious but the original &lt;code&gt;sync&lt;/code&gt; happily overwrote whatever was there; it was great until it wasn't.&lt;/p&gt;
&lt;h4 id=&quot;global-config&quot;&gt;Global config&lt;/h4&gt;
&lt;p&gt;A second config file at &lt;code&gt;~/.config/agentlink/config.yaml&lt;/code&gt; that lets you sync files across your home directory, not just within a single repo. This is the one I use most — it keeps &lt;code&gt;~/.claude/CLAUDE.md&lt;/code&gt;, &lt;code&gt;~/.codex/AGENTS.md&lt;/code&gt;, and &lt;code&gt;~/.config/opencode/AGENTS.md&lt;/code&gt; all pointing at a single &lt;code&gt;~/AGENTS.md&lt;/code&gt; that captures my personal working style across every project.&lt;/p&gt;
&lt;h3 id=&quot;the-tech-stack&quot;&gt;The tech stack&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go 1.23+&lt;/strong&gt;, single binary, no runtime deps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standard library only&lt;/strong&gt; for filesystem ops (&lt;code&gt;os.Symlink&lt;/code&gt;, &lt;code&gt;os.Readlink&lt;/code&gt;, &lt;code&gt;filepath.Walk&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;gopkg.in/yaml.v3&lt;/code&gt;&lt;/strong&gt; for config parsing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/spf13/cobra&quot;&gt;Cobra&lt;/a&gt;&lt;/strong&gt; for CLI scaffolding.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The only non-obvious decision: I kept the symlink creation logic in a separate &lt;code&gt;internal/symlink&lt;/code&gt; package with its own tests, because the &quot;is this path safe to replace with a symlink&quot; check has a lot of edge cases (existing real file, existing broken symlink, existing symlink pointing somewhere else, target doesn't exist yet) and I wanted them all exercised by the test suite rather than discovered in production on someone's repo.&lt;/p&gt;
&lt;h3 id=&quot;why-not-just-use-a-script-&quot;&gt;Why not just use a script?&lt;/h3&gt;
&lt;p&gt;Because the script is 30 lines and the edge cases are 300. Backup-before-replace, skip-empty-files, dry-run mode, detect-tool-presence, &lt;code&gt;core.hooksPath&lt;/code&gt; compat with existing hook dirs, launchd plist generation, config-file discovery walking up from cwd — every one of those is two-line logic plus a test. After the fourth version of the bash script I'd written over two years, I gave up and did it properly.&lt;/p&gt;
&lt;p&gt;I also wanted the detect command. No bash one-liner gives you &quot;is Claude Code installed on this machine,&quot; because &quot;installed&quot; means different things to different tools — a config dir for some, a &lt;code&gt;$PATH&lt;/code&gt; binary for others, a macOS app bundle for a third group. A real registry with a typed schema was the right shape.&lt;/p&gt;
&lt;h3 id=&quot;try-it&quot;&gt;Try it&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;go install github.com/snapsynapse/agentlink/cmd/agentlink@v0.2.0

# In a repo with an existing AGENTS.md:
agentlink init
agentlink sync

# Or for the whole home directory:
agentlink sync --global
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There's a landing page at &lt;a rel=&quot;nofollow&quot; href=&quot;https://agentlink.run/&quot;&gt;agentlink.run&lt;/a&gt; with the full tool list and config examples. MIT licensed. The fork is at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/snapsynapse/agentlink&quot;&gt;github.com/snapsynapse/agentlink&lt;/a&gt;; upstream is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/martinmose/agentlink&quot;&gt;martinmose/agentlink&lt;/a&gt;, and the fork additions are open as &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/martinmose/agentlink/pull/2&quot;&gt;upstream PR #2&lt;/a&gt; — fingers crossed they land.&lt;/p&gt;
&lt;h3 id=&quot;closing&quot;&gt;Closing&lt;/h3&gt;
&lt;p&gt;How do you currently handle AI instruction file drift in projects where you use more than one assistant? Are you manually copy-pasting? Do you have a script? Drop it in the comments &lt;/p&gt;
&lt;p&gt;I'm genuinely curious whether most people just pick one tool and live with it, or whether this is a real shared pain.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/14840/agentlink-run</guid>
<pubDate>Thu, 16 Apr 2026 18:34:00 +0000</pubDate>
</item>
<item>
<title>The Magic Prompt Formula is good. It's still missing a layer.</title>
<link>https://coderlegion.com/14939/the-magic-prompt-formula-is-good-its-still-missing-a-layer</link>
<description>&lt;p&gt;Everyone in AI circles eventually discovers the Magic Prompt Formula. If you haven't, here it is. It's the most widely shared structured approach to prompting, and it genuinely works.&lt;/p&gt;
&lt;p&gt;The formula has five parts:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-Role (Who):&lt;/strong&gt; Assign a specific expert persona, &quot;You are a senior content strategist&quot; or &quot;Act as a seasoned Python developer&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-Action (What):&lt;/strong&gt; Use a clear verb defining what the AI should do ,&quot;Draft,&quot; &quot;Refactor,&quot; &quot;Analyze,&quot; &quot;Summarize&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-Context (Why):&lt;/strong&gt; Provide relevant background so the model doesn't give generic answers; your audience, your product, your use case&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-Examples (How):&lt;/strong&gt; Give one or two samples of the expected output style — this is few-shot prompting in practice&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-Constraints &amp;amp; Format (Boundaries):&lt;/strong&gt; Set limits and define structure, &quot;Under 200 words,&quot; &quot;No jargon,&quot; &quot;Single block of copy,&quot; &quot;Use bullet points&quot;&lt;/p&gt;
&lt;p&gt;Instead of typing &quot;write me a LinkedIn post,&quot; you write:&lt;/p&gt;
&lt;p&gt;You are a senior content strategist specializing in B2B SaaS. Write a LinkedIn post announcing [product]. My audience is AI developers and technical founders. Here's an example of the tone I want: [example]. Keep it under 200 words, no buzzword fluff, single block of copy.&lt;/p&gt;
&lt;p&gt;That's Role, Action, Context, Examples, and Constraints all in one prompt. You've gone from a generic instruction to a specialized brief. The output quality difference is real and immediate.&lt;/p&gt;
&lt;p&gt;So what's the problem?&lt;/p&gt;
&lt;p&gt;The Magic Prompt Formula covers about half of what actually determines prompt quality.&lt;/p&gt;
&lt;p&gt;I know this because I built a tool that measures it.&lt;/p&gt;
&lt;p&gt;PQS: Prompt Quality Score —&amp;gt; scores prompts across 8 dimensions before you send them to a model. The five ingredients of the Magic Formula map cleanly onto five of those dimensions: clarity, specificity, context, examples, and constraints. A well-structured Magic Formula prompt typically scores in the 47–52 range out of 80. Solid. Grade A territory even.&lt;/p&gt;
&lt;p&gt;But there's a dimension the formula doesn't touch at all: chain-of-thought structure.&lt;/p&gt;
&lt;p&gt;CoT structure measures whether your prompt scaffolds the model's reasoning: numbered steps, analysis frameworks, structured output sequences, decision trees. It's the difference between asking an expert to answer a question and asking them to walk you through how they'd think about it.&lt;/p&gt;
&lt;p&gt;Magic Formula prompts score 3 or 4 out of 10 on CoT structure. Consistently. Across every vertical we've tested.&lt;/p&gt;
&lt;p&gt;I ran three Magic Formula prompts through PQS this week. One content prompt, one software prompt, one crypto analysis prompt.&lt;/p&gt;
&lt;p&gt;All three were well-constructed. &lt;strong&gt;All three scored Grade A before optimization.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After PQS optimization, all three jumped by 63–71%.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=1131037553272356879&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The CoT dimension went from an average of 3.7 to 9.0 across all three. Every other dimension moved 1–4 points. CoT moved 5–6.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12138095941997817793&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here's what that looks like in practice. The content prompt went from:&lt;/p&gt;
&lt;p&gt;&quot;Keep it under 200 words, no buzzword fluff, end with a clear CTA, format as a single block of copy&quot;&lt;/p&gt;
&lt;p&gt;To: &quot;Structure your post: 1. Hook: open with a relatable developer pain point. 2. Problem: briefly explain the cost of discovering prompt issues too late. 3. Solution: introduce PQS as the pre-inference fix. 4. Benefit: one concrete outcome. 5. CTA: direct readers to pqs.onchainintel.net&quot;&lt;/p&gt;
&lt;p&gt;Same constraints. Completely different reasoning scaffolding. The model doesn't just know what to write, it knows how to think through the writing.&lt;/p&gt;
&lt;p&gt;This is the AI 'input quality' problem in concrete form.&lt;/p&gt;
&lt;p&gt;The Magic Formula solves the WHO and the WHAT. It tells the model who it is and what you want. What it doesn't do is solve the HOW, the reasoning path the model should follow to get there.&lt;/p&gt;
&lt;p&gt;Most people find out their prompt was weak after the output disappoints them. By then you've already burned tokens, lost time, and often shipped something mediocre. PQS scores the prompt before inference. It catches the CoT gap, and every other gap, before you run it.&lt;/p&gt;
&lt;p&gt;If you're already using the Magic Formula, you're ahead of most people! Prompt Quality Score shows you exactly how much further ahead you could be.&lt;/p&gt;
&lt;p&gt;Score your next prompt before you send it → &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net&quot;&gt;https://pqs.onchainintel.net&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14939/the-magic-prompt-formula-is-good-its-still-missing-a-layer</guid>
<pubDate>Thu, 16 Apr 2026 05:37:16 +0000</pubDate>
</item>
<item>
<title>Prompt Quality Score (PQS) Now Supports x402 Payments on Solana</title>
<link>https://coderlegion.com/14664/prompt-quality-score-pqs-now-supports-x402-payments-on-solana</link>
<description>&lt;p&gt;Been heads down building. Quick update for anyone working in the agentic payments space.&lt;/p&gt;
&lt;p&gt;PQS (Prompt Quality Score), the pre-flight quality gate for AI agent workflows, now accepts x402 payments on both Base mainnet and Solana, in addition to the existing free tier and API key access.&lt;br&gt;
What PQS does&lt;/p&gt;
&lt;p&gt;Before your agent sends a prompt to an expensive LLM endpoint, PQS scores it across 8 dimensions: clarity, specificity, context, constraints, output format, role definition, examples, and chain-of-thought structure. Returns a score 0–80, grade A–F, percentile ranking, and top 3 fixes.&lt;/p&gt;
&lt;p&gt;Catch weak prompts before they cost you tokens or USDC.&lt;/p&gt;
&lt;p&gt;Endpoint reference&lt;br&gt;
Free tier — no auth required**&lt;br&gt;
POST &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/api/score/free&quot;&gt;https://pqs.onchainintel.net/api/score/free&lt;/a&gt;&lt;br&gt;
{ &quot;prompt&quot;: &quot;your prompt here&quot;, &quot;vertical&quot;: &quot;software&quot; }&lt;/p&gt;
&lt;p&gt;Score + dimensional breakdown — $0.025 USDC via x402&lt;br&gt;
POST &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/api/score&quot;&gt;https://pqs.onchainintel.net/api/score&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Full analysis + optimized rewrite — $0.125 USDC via x402&lt;br&gt;
POST &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/api/score/full&quot;&gt;https://pqs.onchainintel.net/api/score/full&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Batch up to 5 prompts — $0.25 USDC via x402&lt;br&gt;
POST &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/api/score/batch&quot;&gt;https://pqs.onchainintel.net/api/score/batch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A/B compare two prompts — $1.25 USDC via x402&lt;br&gt;
POST &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/api/score/compare&quot;&gt;https://pqs.onchainintel.net/api/score/compare&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;x402 payment details&lt;br&gt;
Base mainnet: CDP facilitator, USDC ERC-20, EIP-3009 TransferWithAuthorization&lt;/p&gt;
&lt;p&gt;Solana: x402-compatible, USDC SPL token&lt;br&gt;
No account required for x402 path — agent pays per call, no subscription&lt;/p&gt;
&lt;p&gt;API key path also available for subscription-based access&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MCP server bash npx pqs-mcp-server&lt;/li&gt;
&lt;li&gt;Listed on Smithery (88/100),   &lt;/li&gt;
&lt;li&gt;Official MCP Registry, Glama, and mcp.so. &lt;/li&gt;
&lt;li&gt;Three tools: score_prompt (free), optimize_prompt ($0.025), compare_models ($1.25). &lt;/li&gt;
&lt;li&gt;Python SDK &lt;/li&gt;
&lt;li&gt;bash pip install pqs-sdk &lt;/li&gt;
&lt;li&gt;Async support via AsyncPQSClient. &lt;/li&gt;
&lt;li&gt;Full x402 and API key auth. OpenAPI spec:   &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/openapi.json&quot;&gt;https://pqs.onchainintel.net/openapi.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Building this as infrastructure for the agent economy, score the input before the inference fires. Cheaper than one bad prompt.&lt;/p&gt;
&lt;p&gt;@kenburbary| pqs.onchainintel.net&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14664/prompt-quality-score-pqs-now-supports-x402-payments-on-solana</guid>
<pubDate>Mon, 13 Apr 2026 10:31:44 +0000</pubDate>
</item>
<item>
<title>I Built a Free Claude Code Slash Command That Scores Your Prompts Before You Run Them</title>
<link>https://coderlegion.com/14428/i-built-a-free-claude-code-slash-command-that-scores-your-prompts-before-you-run-them</link>
<description>&lt;p&gt;Most developers treat prompt quality like they treated code quality before linters existed — you find out it's bad when it breaks, not before.&lt;/p&gt;
&lt;p&gt;That's the &lt;em&gt;AI 'input quality' problem&lt;/em&gt;. And it's costing you more than you think.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You write a prompt. You run it. The output is mediocre. You tweak the prompt. You run it again. Better, maybe. Or worse. You're not sure why.&lt;/p&gt;
&lt;p&gt;This loop happens dozens of times a day across AI-powered workflows, agent pipelines, and Claude Code sessions. There's no signal before you run. No pre-flight check. No linter for your input.&lt;br&gt;
For a single prompt that's annoying. For a workflow that runs 500 times a week, it's silent, compounding damage, bad outputs at scale with no upstream warning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What I Built&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;PQS (Prompt Quality Score) is a pre-flight scoring engine. It grades your prompt across 8 dimensions before you send it to any model, for clarity, specificity, context, constraints, output format, role definition, examples, and chain-of-thought structure.&lt;/p&gt;
&lt;p&gt;You get a score out of 80, a dimensional breakdown, and three specific improvement suggestions. Before you run. Not after. Before a model ever sees it.&lt;/p&gt;
&lt;p&gt;Today I'm releasing /pqs-score as a free Claude Code slash command that brings PQS directly into your terminal workflow.&lt;/p&gt;
&lt;p&gt;Type /pqs-score inside Claude Code. That's it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;&lt;br&gt;
The slash command lives in .claude/commands/, the standard Claude Code location for custom slash commands. When you type /pqs-score followed by your prompt, it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reads your API key from ~/.pqs/config POSTs your prompt to the PQS&lt;br&gt;
scoring engine at pqs.onchainintel.net Returns your score, dimension&lt;br&gt;
breakdown, and top improvement suggestions inline in your Claude Code&lt;br&gt;
session&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No context switching. No browser tab. Score → fix → run, all in the terminal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zero Friction Install&lt;/strong&gt;&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15932916881649258993&quot; alt=&quot;&quot;&gt;&lt;br&gt;
bashcurl -s &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/install.sh&quot;&gt;https://pqs.onchainintel.net/install.sh&lt;/a&gt; | bash&lt;/p&gt;
&lt;p&gt;That's the entire install. The script will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Generate a machine fingerprint (sha256 hash of hostname + username +&lt;br&gt;
OS — no PII leaves your machine) Hit the PQS API to mint your free&lt;br&gt;
key, tied to that fingerprint Write the key to ~/.pqs/config (mode&lt;br&gt;
600) Copy /pqs-score into ~/.claude/commands/&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No account. No email. No signup wall. Reinstall on the same machine and you get the same key back automatically, the fingerprint lookup is idempotent server-side.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What You Get Back&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here's a real run. I typed /pqs-score write me a haiku about postgres inside Claude Code:&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=11474399549013104857&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Top fixes:&lt;br&gt;
  → Specify the tone or mood for the haiku (playful, technical, reverent)&lt;br&gt;
  → Define specific PostgreSQL aspects to focus on (performance, reliability, features)&lt;br&gt;
  → Request explanation of haiku structure or reasoning process&lt;br&gt;
──────────────────────────────────────&lt;br&gt;
Grade C on a haiku prompt. &lt;/p&gt;
&lt;p&gt;Makes sense, it scores well on clarity and output format (it's obvious what you want) but falls flat on role definition, examples, and chain-of-thought. The three fixes tell you exactly what to add.&lt;br&gt;
That's the whole point. You see the gap before the model does, giving you a chance to improve your prompt and thus your output from the model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why This Matters For Agent Developers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you're building agents that call external APIs, your prompts are instructions to autonomous systems. A low-quality prompt doesn't just return a bad answer, it sends your agent down the wrong path, potentially making API calls, spending money, or taking actions based on a misunderstood instruction.&lt;/p&gt;
&lt;p&gt;Pre-flight scoring is the prompt equivalent of a type checker. Catch it before it runs.&lt;/p&gt;
&lt;p&gt;PQS is also x402-native, agents can pay per score in USDC on Base mainnet. The slash command uses a free API key for human developers. When your agents need to score prompts autonomously, they pay directly. Same infrastructure, two access patterns.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Get It&lt;/strong&gt;&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=7062130870232190282&quot; alt=&quot;&quot;&gt;&lt;br&gt;
bash# Install (one line)&lt;br&gt;
curl -s &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net/install.sh&quot;&gt;https://pqs.onchainintel.net/install.sh&lt;/a&gt; | bash&lt;/p&gt;
&lt;h2 id=&quot;restart-claude-code-then-use-it&quot;&gt;Restart Claude Code, then use it&lt;/h2&gt;
&lt;p&gt;/pqs-score your prompt here&lt;br&gt;
GitHub: github.com/OnChainAIIntel/pqs-claude-commands&lt;br&gt;
Free. Open source. No signup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What's Next:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;pqs-optimize — rewrites your prompt to score 60+ before you run it&lt;br&gt;
pqs-batch — score an entire prompt library and get aggregate quality&lt;br&gt;
metrics n8n node — drop PQS as a pre-flight gate before your AI node&lt;br&gt;
in any workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you build something with it or hit a bug, open an issue on GitHub.&lt;/p&gt;
&lt;p&gt;PQS is built by Ken Burbary — digital marketing consultant, AI builder, and founder of OnChainIntel. Follow on X: &lt;a rel=&quot;nofollow&quot; href=&quot;http://x.com/kenburbary&quot;&gt;@kenburbary&lt;/a&gt; Follow on X: &lt;a rel=&quot;nofollow&quot; href=&quot;http://x.comonchainaiintel&quot;&gt;@OnChainAIIntel&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14428/i-built-a-free-claude-code-slash-command-that-scores-your-prompts-before-you-run-them</guid>
<pubDate>Fri, 10 Apr 2026 10:00:52 +0000</pubDate>
</item>
<item>
<title>Introducing PQS: The Fastest Way to Get Better Output From Any AI Model</title>
<link>https://coderlegion.com/14415/introducing-pqs-the-fastest-way-to-get-better-output-from-any-ai-model</link>
<description>&lt;p&gt;Originally posted on &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net&quot;&gt;Paragraph on April 4, 2026&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Paste a prompt. Get an optimized version. Ship better work.&lt;/p&gt;
&lt;p&gt;Every AI model you're using is better than you think.&lt;/p&gt;
&lt;p&gt;Your prompts are the bottleneck.&lt;/p&gt;
&lt;p&gt;I've been building OnChainIntel, an AI-powered crypto wallet behavioral analysis tool for the past several months. Every piece of content we produce runs through LLMs for analysis. And the single biggest lever on output quality isn't which model we use. It's how precisely we instruct it.&lt;/p&gt;
&lt;p&gt;The problem: until now, there has been no standardized way to measure prompt quality. No CPM equivalent for prompts (example from the advertising industry). No cited framework that a non-technical user could apply.&lt;/p&gt;
&lt;p&gt;So we built one.&lt;/p&gt;
&lt;p&gt;What is Prompt Quality Score, PQS?&lt;/p&gt;
&lt;p&gt;PQS is the world's first named AI prompt quality score built on cited academic research and industry evaluation frameworks.&lt;/p&gt;
&lt;p&gt;It works in two layers:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompt-side scoring:&lt;/strong&gt; how well-constructed is your input?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Specificity:&lt;/strong&gt; does the prompt define what it wants precisely?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context:&lt;/strong&gt; does it give the model enough to work with?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clarity:&lt;/strong&gt; are the directives unambiguous?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Predictability:&lt;/strong&gt; would different runs produce consistent results?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Output-side scoring:&lt;/strong&gt; how good is the result?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Completeness:&lt;/strong&gt; did the output cover what the prompt implied?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Relevancy:&lt;/strong&gt; is it answering the actual question?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reasoning depth:&lt;/strong&gt; does it demonstrate structured thinking?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Faithfulness:&lt;/strong&gt; does it stay grounded in what was asked?&lt;/p&gt;
&lt;p&gt;Each dimension scored 1–10. Total out of 80.&lt;/p&gt;
&lt;p&gt;8 attributes. 5 frameworks. 1 score.&lt;/p&gt;
&lt;p&gt;The Proof Layer&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=1340176777486667385&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here's what makes PQS different from every other prompt optimizer.&lt;/p&gt;
&lt;p&gt;We don't just rewrite your prompt and tell you it's better. We run both, the original and the optimized version, and then show you the actual outputs side by side.&lt;/p&gt;
&lt;p&gt;The output difference is the proof. No trust required.&lt;/p&gt;
&lt;p&gt;Real example from today:&lt;/p&gt;
&lt;p&gt;Prompt: &quot;who are the smartest wallets on solana right now&quot;&lt;/p&gt;
&lt;p&gt;Original output: a generic list of known whale wallets. No entry signals. No behavioral context. Nothing actionable.&lt;/p&gt;
&lt;p&gt;Original PQS score: 9/40&lt;/p&gt;
&lt;p&gt;Optimized output: token age under 3 days, fewer than 500 holders, top 10 wallets holding under 30% of supply, $50k+ 24h volume. For each candidate: contract address, holder count, wallet concentration, and one behavioral signal indicating smart money entry.&lt;/p&gt;
&lt;p&gt;Optimized PQS score: 35/40. +84% improvement.&lt;/p&gt;
&lt;p&gt;Same model. Same API. Completely different output.&lt;/p&gt;
&lt;p&gt;The Frameworks Behind it&lt;br&gt;
PQS is not opinion dressed up as a number. Every dimension traces to a cited, peer-reviewed framework:&lt;/p&gt;
&lt;p&gt;PEEM (Prompt Engineering Evaluation Metrics) was published March 11, 2026 by Dongguk University. The first academic framework for joint prompt and response evaluation. Validated across 7 benchmarks and 5 task models. Showed that PEEM-guided rewriting improves downstream accuracy by up to 11.7 points, outperforming supervised and reinforcement learning baselines. Three weeks old. Nobody has built a product on it yet. Until tonight.&lt;/p&gt;
&lt;p&gt;RAGAS evaluates faithfulness, answer relevancy, and context precision. Used in production pipelines at teams running Claude, GPT-4o, and Gemini.&lt;/p&gt;
&lt;p&gt;MT-Bench LMSYS multi-turn benchmark. GPT-4 scores showed &amp;gt;0.8 correlation with human ratings. Industry standard for evaluating reasoning quality.&lt;/p&gt;
&lt;p&gt;G-Eval LLM-as-judge framework using chain-of-thought reasoning. Improves scoring reliability by 10–15% over direct scoring.&lt;/p&gt;
&lt;p&gt;ROUGE the original NLP completeness metric. Used in summarization evaluation since 2004.&lt;/p&gt;
&lt;p&gt;PEEM · RAGAS · MT-Bench · G-Eval · ROUGE&lt;/p&gt;
&lt;p&gt;First time applied at the consumer level.&lt;/p&gt;
&lt;p&gt;Why now?&lt;/p&gt;
&lt;p&gt;Three reasons this matters right now:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The tooling is developer-only. Every prompt evaluation tool that exists — LangSmith, DeepEval, Opik, RAGAS, etc. requires Python, datasets, and engineering setup. There is no consumer-facing product with a named quality score. PQS is that product.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The academic work just landed. PEEM was published March 11, 2026. It is the most rigorous prompt evaluation framework ever proposed and it has not been turned into a product. We built on it first.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The market is massive and extremely underserved. Prompt engineering is a $1.5B market growing at 32% CAGR. Every tool serving it is aimed at developers. The consumer layer did not exist until tonight.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Defensibility Question&lt;br&gt;
Someone will ask: is this really the first?&lt;/p&gt;
&lt;p&gt;Here's the honest answer.&lt;/p&gt;
&lt;p&gt;Academic frameworks exist: PEEM, ROUGE, G-Eval. Developer tools exist: LangSmith, DeepEval. None of them have produced a named, consumer-facing, citable prompt quality score with a methodology anyone can reference and build on.&lt;/p&gt;
&lt;p&gt;PQS is not a product feature. It's the first serious attempt by anyone to create a named AI prompt quality score.&lt;/p&gt;
&lt;p&gt;We're not claiming it's perfect. We're claiming it's first. And we're making the methodology open so anyone can improve it.&lt;/p&gt;
&lt;p&gt;The Open Standard&lt;/p&gt;
&lt;p&gt;The methodology is public. The 8 dimensions, the 5 source frameworks, the scoring rubric. All of it is documented and open.&lt;/p&gt;
&lt;p&gt;If you want to implement PQS scoring in your own tools, do it. If you want to cite it in research, cite it. If you want to build on it, build.&lt;/p&gt;
&lt;p&gt;That's the model. Open methodology creates adoption. Adoption creates the standard.&lt;/p&gt;
&lt;p&gt;The standard makes the data more valuable for us all.&lt;/p&gt;
&lt;p&gt;Try it --&amp;gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net&quot;&gt;https://pqs.onchainintel.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Paste any prompt. Select your vertical. Hit submit.&lt;/p&gt;
&lt;p&gt;On-chain analysis is the default — tuned for wallet research, token signals, DeFi queries, and behavioral analysis. Crypto content, market research, and general modes also available.&lt;/p&gt;
&lt;p&gt;Screenshot your before/after. Tag us @OnChainAIIntel.&lt;/p&gt;
&lt;p&gt;What's next&lt;br&gt;
Cross-model scoring —&amp;gt; same prompt through Claude and GPT-4o simultaneously, scored by a third model as judge. Shows you not just a better prompt, but which model executes it best.&lt;/p&gt;
&lt;p&gt;PQS Leaderboard —&amp;gt; weekly rankings of the highest-scoring prompts by vertical. Published publicly.&lt;/p&gt;
&lt;p&gt;PQS Whitepaper —&amp;gt; full academic-style documentation of the framework, to be submitted to arXiv within 30 days.&lt;/p&gt;
&lt;p&gt;PQS API —&amp;gt; so other tools can integrate the standard and display PQS scores natively.&lt;/p&gt;
&lt;p&gt;If this post was useful, please consider subscribing as we’ll have weekly wallet analyses and posts about everything OnChain. &lt;/p&gt;
&lt;p&gt;About OnChainIntel — AI-powered on-chain wallet analysis. We decode the behavioral patterns, hidden biases, and implicit bets behind any wallet's transaction history. Try it free at onchainintel.net · Follow us on X: @OnChainAIIntel · TikTok: @onchainintel · YouTube: @OnChainAIIntel&lt;/p&gt;
&lt;p&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;https://pqs.onchainintel.net&quot;&gt;1&lt;/a&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://paragraph.com/@*Emails&quot;&gt;https://paragraph.com/@*Emails&lt;/a&gt; are not allowed*/introducing-pqs-the-worlds-first-named-ai-prompt-quality-score&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14415/introducing-pqs-the-fastest-way-to-get-better-output-from-any-ai-model</guid>
<pubDate>Fri, 10 Apr 2026 07:52:08 +0000</pubDate>
</item>
<item>
<title>Is Your AI Prompt Any Good? Most Marketers Have No Idea.</title>
<link>https://coderlegion.com/14416/is-your-ai-prompt-any-good-most-marketers-have-no-idea</link>
<description>&lt;p&gt;Originally posted on [Paragraph on April 8, 2026][1].&lt;/p&gt;
&lt;p&gt;How to score your AI prompts before they hit the model and why 'input quality' is the layer every AI workflow is missing.&lt;/p&gt;
&lt;p&gt;Here's how to find out in 30 seconds using &lt;a rel=&quot;nofollow&quot; href=&quot;http://pqs.onchainintel.net&quot;&gt;http://pqs.onchainintel.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I took a prompt that thousands of marketers are using right now:&lt;/p&gt;
&lt;p&gt;&quot;Act as a ruthless expert business consultant. Conduct a ruthless assessment of my ecommerce business's biggest marketing weaknesses. Identify 5 specific areas where I am likely losing customers or leaving money on the table. For each, explain the hidden cost, the root cause, and a fix I can implement within 7 days. Be direct and avoid generic suggestions.&quot;&lt;/p&gt;
&lt;p&gt;Feels . Has a role. Has a task. Has an industry. Sounds like something a senior marketer would write.&lt;/p&gt;
&lt;p&gt;Prompt Quality Score analyzed and scored it 16/40.&lt;/p&gt;
&lt;p&gt;Here's what the score caught that you didn't:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Specificity 4/10:&lt;/strong&gt; &quot;ruthless assessment&quot; isn't a deliverable. The model doesn't know what output structure you actually want. It guesses.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context 3/10:&lt;/strong&gt; Ecommerce is a category, not a business. No revenue model. No audience size. No current marketing efforts. The model fills every gap with assumptions, and assumptions produce generic output.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clarity 5/10:&lt;/strong&gt; &quot;Be direct and avoid generic suggestions&quot; is an instruction about tone, not output. The model still doesn't know what specific looks like for your business.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Predictability 4/10:&lt;/strong&gt; Run this prompt 10 times, get 10 different answers. Nothing anchors the output to a consistent, repeatable format.&lt;/p&gt;
&lt;p&gt;This is the input quality problem. The prompt feels intentional. The score says otherwise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PQS optimized it. Score jumped to 34/40. +75%&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5845945498230467709&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The optimized version added credibility markers, quantified outcome requirements, a structured diagnostic format, and specific deliverable criteria. Same intent. Completely different architecture.&lt;/p&gt;
&lt;p&gt;The output went from a generic 5-point list to a structured revenue audit with quantified impact estimates, strategic root causes, and 7-day implementation steps the model can actually execute against.&lt;/p&gt;
&lt;p&gt;What Input Quality Actually Means&lt;/p&gt;
&lt;p&gt;Every AI workflow tip you've seen this week, brand voice docs, custom instructions, skill managers, connector integrations, exists for one reason: to build better context for the prompt.&lt;/p&gt;
&lt;p&gt;But none of it matters if the prompt itself is poorly structured.&lt;/p&gt;
&lt;p&gt;Input quality is the layer before the infrastructure. It's the question nobody has been asking:&lt;/p&gt;
&lt;p&gt;Once you've assembled all that context, is the actual prompt any good?&lt;/p&gt;
&lt;p&gt;PQS scores it. Pre-flight, not post-hoc. Before the inference call is made. Before the agent executes and asks any model. Before the garbage goes in.&lt;/p&gt;
&lt;p&gt;Eight dimensions. Five peer-reviewed frameworks. Seven verticals including Content &amp;amp; Media for marketing prompts specifically.&lt;/p&gt;
&lt;p&gt;How To Use It&lt;/p&gt;
&lt;p&gt;Go to pqs.onchainintel.net&lt;/p&gt;
&lt;p&gt;Select your vertical: Content &amp;amp; Media for marketing prompts&lt;/p&gt;
&lt;p&gt;Paste your prompt&lt;/p&gt;
&lt;p&gt;Get your score, dimension breakdown, and optimized version&lt;/p&gt;
&lt;p&gt;Copy the optimized prompt and fill in your actual business details&lt;/p&gt;
&lt;p&gt;Run it&lt;/p&gt;
&lt;p&gt;The score tells you exactly what's weak and why. The optimized version shows you what good looks like.&lt;/p&gt;
&lt;p&gt;  [1]: &lt;a rel=&quot;nofollow&quot; href=&quot;https://paragraph.com/@*Emails&quot;&gt;https://paragraph.com/@*Emails&lt;/a&gt; are not allowed*/is-your-ai-prompt-any-good-most-marketers-have-no-idea&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14416/is-your-ai-prompt-any-good-most-marketers-have-no-idea</guid>
<pubDate>Fri, 10 Apr 2026 07:51:11 +0000</pubDate>
</item>
<item>
<title>The Centaur Developer: Why Human+AI Teams Outperform Both</title>
<link>https://coderlegion.com/12500/the-centaur-developer-why-human-ai-teams-outperform-both</link>
<description>&lt;p&gt;I keep noticing the same split on every engineering team I talk to.&lt;/p&gt;
&lt;p&gt;There's the developer who treats AI as autocomplete. Tab-completes everything. Ships fast, debugs slow. Opens a PR with 400 lines and can't explain what half of them do. When something breaks in production, they paste the error back into the chat and hope for the best. They're fast until they're not.&lt;/p&gt;
&lt;p&gt;Then there's the developer who refuses to use AI for anything that matters. &quot;I need to understand the code.&quot; They ship slow, understand everything, and quietly fall behind on velocity. They're right about understanding. They're wrong about the tradeoff.&lt;/p&gt;
&lt;p&gt;And then there's a third type. They use AI for specific phases of specific tasks. They ship fast and understand the code. Not because they're smarter, but because they draw a clear line between what's theirs and what's the machine's -- and they draw it in a different place for every task.&lt;/p&gt;
&lt;p&gt;There's a name for this pattern. It comes from chess, and it's been quietly reshaping how the best developers I know actually work.&lt;/p&gt;
&lt;h3 id=&quot;the-chess-origin&quot;&gt;The chess origin&lt;/h3&gt;
&lt;p&gt;In 1997, Garry Kasparov lost to Deep Blue. It was a big deal at the time. The world's best chess player, beaten by a machine. Most people remember that part.&lt;/p&gt;
&lt;p&gt;What most people don't remember is what happened next. Kasparov proposed &quot;freestyle chess&quot; -- tournaments where human+computer teams could compete against grandmasters and chess engines alike. Anyone could enter with any combination of human and machine.&lt;/p&gt;
&lt;p&gt;The result surprised everyone. Centaur teams -- humans partnered with computers -- beat both grandmasters playing alone and chess engines playing alone. For years. The winning teams weren't the ones with the best engines or the strongest players. They were the ones with the best process for dividing the work.&lt;/p&gt;
&lt;p&gt;The insight wasn't &quot;humans are still useful.&quot; It was that the human's job changed. They stopped trying to out-calculate the machine. They started managing it -- choosing which lines to explore, when to override the engine's suggestion, when to trust it. The human brought strategic judgment. The machine brought brute-force calculation. Neither was sufficient alone.&lt;/p&gt;
&lt;p&gt;That's exactly what's happening in software development right now, and most developers haven't noticed the shift.&lt;/p&gt;
&lt;h3 id=&quot;the-developer-split&quot;&gt;The developer split&lt;/h3&gt;
&lt;p&gt;Not every development task is the same, and the centaur model only works if you're honest about which tasks need what. Here's how I think about it:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Task &lt;/th&gt;&lt;th&gt;Human Leads &lt;/th&gt;&lt;th&gt;AI Leads &lt;/th&gt;&lt;th&gt;Centaur (Both)&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Architecture decisions &lt;/td&gt;&lt;td&gt;X &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Boilerplate/scaffolding &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bug investigation &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Code review &lt;/td&gt;&lt;td&gt;X &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Writing tests &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Refactoring &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Documentation &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Performance optimization &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Security review &lt;/td&gt;&lt;td&gt;X &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Data transformations &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;X &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The pattern is straightforward once you see it. &quot;Human leads&quot; means the task is judgment-heavy, context-dependent, and the consequences of getting it wrong are high. Architecture decisions. Security review. Code review where you're evaluating design tradeoffs, not syntax. These are tasks where domain knowledge and organizational context matter more than processing speed.&lt;/p&gt;
&lt;p&gt;&quot;AI leads&quot; means the task is mechanical, pattern-matching, and low-stakes. Scaffolding a new service from a template. Transforming data between formats. Writing boilerplate that follows an established pattern. If you're spending human judgment on these, you're misallocating your scarcest resource.&lt;/p&gt;
&lt;p&gt;&quot;Centaur&quot; is the interesting column. These are tasks where both human and AI contribute different things, and the result is better than either could produce alone. Most development tasks live here. The question isn't whether to use AI -- it's where the handoff happens within each task.&lt;/p&gt;
&lt;h3 id=&quot;the-handoff-problem&quot;&gt;The handoff problem&lt;/h3&gt;
&lt;p&gt;The actual skill of centaur development isn't &quot;write better prompts.&quot; It's knowing where to place the handoff between human judgment and AI processing within a single task.&lt;/p&gt;
&lt;p&gt;Let me walk through a concrete example.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bug investigation (a centaur task):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You get a bug report: intermittent 500 errors on the payment endpoint, mostly on Friday afternoons. Here's how the centaur split works:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;AI phase:&lt;/em&gt; &quot;Search the codebase for all usages of the payment service client. Show me the call chain from the API handler to the function that throws this error. List all commits in the last two weeks that touched these files.&quot;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Human phase:&lt;/em&gt; You read the AI's findings. You apply domain knowledge that no model has -- the payment provider's API slows down on Fridays because their batch processing runs. You've seen this before. It's a timeout issue under load, not a code bug.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;AI phase:&lt;/em&gt; &quot;Write a fix that adds configurable timeout with exponential backoff on the payment client. Add a test that simulates slow responses up to 30 seconds.&quot;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Human phase:&lt;/em&gt; You review the fix. Does it handle the edge case where the payment service is completely down, not just slow? Does the backoff cap make sense for your SLA? You adjust, approve, or iterate.&lt;/p&gt;
&lt;p&gt;Notice the pattern. AI gathers and transforms. Human judges and decides. AI implements the decision. Human verifies. It's not one handoff -- it's a loop. Each pass through the loop, the human applies context the AI doesn't have, and the AI applies processing speed the human can't match.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The anti-pattern: giving AI the whole task.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&quot;Fix this bug&quot; with no context. The AI guesses at the root cause, writes a plausible-looking fix that passes existing tests but addresses a symptom, not the actual problem. You spend more time debugging the AI's fix than you would have spent debugging the original bug. I've watched this happen more times than I want to admit -- including to myself.&lt;/p&gt;
&lt;p&gt;The handoff exists whether you design it or not. If you don't choose where it goes, you end up with the AI making judgment calls it's not equipped to make, and you reviewing mechanical work that didn't need your attention.&lt;/p&gt;
&lt;h3 id=&quot;three-rules&quot;&gt;Three rules&lt;/h3&gt;
&lt;p&gt;After working this way for a while, I've landed on three rules that hold up across different tasks and different models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule 1: AI processes, you decide.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every task has a processing phase and a decision phase. Processing is gathering information, transforming data, generating options, applying known patterns. Decision is choosing the approach, evaluating tradeoffs, accepting risk, determining what &quot;good enough&quot; means.&lt;/p&gt;
&lt;p&gt;AI handles the first. You handle the second.&lt;/p&gt;
&lt;p&gt;If you find yourself accepting AI output without reading it, you've crossed the line. You've delegated a decision to a machine that doesn't understand the consequences. If you find yourself manually doing work that AI could process -- reformatting, searching, boilerplating -- you're wasting your advantage.&lt;/p&gt;
&lt;p&gt;The line between processing and decision isn't always obvious, and it moves depending on the task. But asking yourself &quot;am I processing or deciding right now?&quot; before each step is the single most useful habit I've built.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule 2: Context is the product.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The quality of AI output is directly proportional to the quality of context you provide. Your codebase knowledge, your understanding of the business domain, your awareness of production constraints, your memory of what was tried before and why it failed -- that's your contribution. Without it, AI produces generic code that technically works and practically doesn't.&lt;/p&gt;
&lt;p&gt;The best developers I know spend more time crafting context than crafting prompts. They paste in the relevant code. They explain the business rule. They describe the constraint nobody wrote down. The prompt itself is often one sentence. The context around it is a paragraph.&lt;/p&gt;
&lt;p&gt;Your context is the moat. It's the thing that makes AI output actually useful instead of generically correct. Protect it, develop it, and feed it into every AI interaction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule 3: Trust, but verify the boundaries.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Not all AI output needs the same level of scrutiny. I use a rough three-tier system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scaffolding and boilerplate:&lt;/strong&gt; Light review. Low stakes. If the AI generates a standard CRUD endpoint from a pattern I've established, I scan it and move on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business logic:&lt;/strong&gt; Line-by-line review. Medium stakes. This is where subtle bugs hide -- off-by-one errors in date calculations, missing edge cases in validation, wrong assumptions about nullable fields.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security, auth, payments, anything safety-related:&lt;/strong&gt; I rewrite from scratch using AI output as reference only. High stakes. I don't trust any model to get authentication flows right without me thinking through every path. The cost of a subtle bug here is orders of magnitude higher than the time saved.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Match your review depth to the blast radius of getting it wrong. This isn't paranoia -- it's resource allocation. Spending equal time reviewing boilerplate and auth code means you're either over-reviewing the boilerplate or under-reviewing the auth.&lt;/p&gt;
&lt;h3 id=&quot;what-changes-when-you-work-this-way&quot;&gt;What changes when you work this way&lt;/h3&gt;
&lt;p&gt;I've been working with this model for long enough to see the second-order effects, and some of them surprised me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code review speed goes up.&lt;/strong&gt; Not because you review less carefully, but because you wrote or deeply reviewed every decision point yourself. The AI-generated parts are predictable patterns you've already validated. You can scan them fast because you know exactly what to look for -- you defined the pattern.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bug density goes down.&lt;/strong&gt; Because your human judgment went into the right places -- architecture, edge cases, domain logic, security boundaries -- instead of being spread thin across boilerplate. You're not sharper. You're just better allocated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Onboarding gets faster.&lt;/strong&gt; New developers learn the centaur pattern and start contributing at the judgment layer immediately, even while AI handles patterns they haven't memorized yet. They don't need to know the entire codebase to make good decisions about the part they're working on. The AI fills in the mechanical gaps while they focus on understanding the why.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The unexpected one: you stop resenting AI.&lt;/strong&gt; This is the one I didn't predict. When you have a clear model for what's yours and what's the machine's, the anxiety about &quot;AI replacing developers&quot; disappears. It's not replacing you. It's handling the part of your job that was never the interesting part anyway. The interesting part -- the judgment, the design, the debugging that requires actual understanding -- is still yours. And now you have more time for it.&lt;/p&gt;
&lt;h3 id=&quot;the-honest-take&quot;&gt;The honest take&lt;/h3&gt;
&lt;p&gt;This model doesn't work for everything. Pure creative work -- inventing a novel architecture, designing a genuinely new algorithm, making product decisions -- is still mostly human. The AI can help you explore options, but the creative leap is yours. Pure mechanical work -- formatting, linting, generating boilerplate from established patterns -- is still mostly AI. There's no centaur split needed when one side clearly dominates.&lt;/p&gt;
&lt;p&gt;The centaur model matters most for the 60-70% of development work that lives in between. The bug investigations, the refactors, the test writing, the documentation, the performance work. Tasks with both a processing component and a judgment component. That's where the split pays off.&lt;/p&gt;
&lt;p&gt;The real skill isn't prompt engineering. It's boundary engineering -- knowing where to draw the line between human judgment and AI processing for each specific task in your specific context. And that line is different for every team, every codebase, every domain.&lt;/p&gt;
&lt;p&gt;The developers who figure this out first won't just be faster. They'll be doing fundamentally different work than the ones who are still either fighting AI or blindly accepting everything it produces.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Free prompts at &lt;a rel=&quot;nofollow&quot; href=&quot;https://nerdychefs.ai&quot;&gt;NerdyChefs.ai&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kesslernity&quot;&gt;GitHub&lt;/a&gt;. Free 35-min AI course: &lt;a rel=&quot;nofollow&quot; href=&quot;https://trainings.kesslernity.com&quot;&gt;trainings.kesslernity.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Are you using a centaur-style workflow? I'm curious which tasks you always keep human and which you've fully delegated. Drop a comment.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/12500/the-centaur-developer-why-human-ai-teams-outperform-both</guid>
<pubDate>Mon, 09 Mar 2026 18:30:37 +0000</pubDate>
</item>
<item>
<title>ChatGPT: Transforming Human–AI Interaction</title>
<link>https://coderlegion.com/11777/chatgpt-transforming-human-ai-interaction</link>
<description>&lt;h2 id=&quot;chatgpt-transforming-human-ai-interaction&quot;&gt;ChatGPT: Transforming Human–AI Interaction&lt;/h2&gt;
&lt;p&gt;In the rapidly evolving world of artificial intelligence, ChatGPT has emerged as one of the most influential tools of the 21st century. Developed by OpenAI, ChatGPT represents a major breakthrough in natural language processing (NLP), enabling machines to understand and generate human-like text with remarkable accuracy.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-chatgpt-&quot;&gt;What is ChatGPT?&lt;/h3&gt;
&lt;p&gt;ChatGPT is an advanced conversational AI model built on the Generative Pre-trained Transformer (GPT) architecture. It is designed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Answer questions  &lt;/li&gt;
&lt;li&gt;Generate essays and articles  &lt;/li&gt;
&lt;li&gt;Write and debug code  &lt;/li&gt;
&lt;li&gt;Translate languages  &lt;/li&gt;
&lt;li&gt;Summarize long documents  &lt;/li&gt;
&lt;li&gt;Assist in learning and research  &lt;/li&gt;
&lt;li&gt;Engage in natural conversations  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unlike traditional rule-based chatbots, ChatGPT uses deep learning to predict and generate responses based on patterns learned from massive datasets.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-does-chatgpt-work-&quot;&gt;How Does ChatGPT Work?&lt;/h3&gt;
&lt;p&gt;ChatGPT is based on a transformer neural network architecture. The core idea behind transformers is attention mechanisms, which allow the model to focus on relevant words in a sentence while generating responses.&lt;/p&gt;
&lt;h4 id=&quot;1-pre-training&quot;&gt;1. Pre-Training&lt;/h4&gt;
&lt;p&gt;The model is trained on large amounts of publicly available text data to learn grammar, context, reasoning patterns, and general knowledge.&lt;/p&gt;
&lt;h4 id=&quot;2-fine-tuning&quot;&gt;2. Fine-Tuning&lt;/h4&gt;
&lt;p&gt;After pre-training, the model undergoes supervised fine-tuning and reinforcement learning from human feedback (RLHF). This process improves response quality, safety, and helpfulness.&lt;/p&gt;
&lt;h4 id=&quot;3-prediction-mechanism&quot;&gt;3. Prediction Mechanism&lt;/h4&gt;
&lt;p&gt;ChatGPT works by predicting the next most likely word in a sequence, based on context. Although simple in theory, this process produces surprisingly intelligent outputs due to the model's scale and training.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;key-features-of-chatgpt&quot;&gt;Key Features of ChatGPT&lt;/h3&gt;
&lt;h4 id=&quot;1-conversational-ability&quot;&gt;1. Conversational Ability&lt;/h4&gt;
&lt;p&gt;ChatGPT can maintain context across multiple messages, making interactions more natural and dynamic.&lt;/p&gt;
&lt;h4 id=&quot;2-multi-domain-knowledge&quot;&gt;2. Multi-Domain Knowledge&lt;/h4&gt;
&lt;p&gt;It assists in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Programming (Python, C++, Java, etc.)&lt;/li&gt;
&lt;li&gt;Mathematics&lt;/li&gt;
&lt;li&gt;Science&lt;/li&gt;
&lt;li&gt;Literature&lt;/li&gt;
&lt;li&gt;Business and marketing&lt;/li&gt;
&lt;li&gt;Robotics and engineering&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-content-creation&quot;&gt;3. Content Creation&lt;/h4&gt;
&lt;p&gt;Writers, students, and developers use it for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Blog posts  &lt;/li&gt;
&lt;li&gt;Research summaries  &lt;/li&gt;
&lt;li&gt;Resume writing  &lt;/li&gt;
&lt;li&gt;Project documentation  &lt;/li&gt;
&lt;li&gt;README generation  &lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-coding-assistance&quot;&gt;4. Coding Assistance&lt;/h4&gt;
&lt;p&gt;ChatGPT helps with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debugging code  &lt;/li&gt;
&lt;li&gt;Explaining algorithms  &lt;/li&gt;
&lt;li&gt;Generating boilerplate code  &lt;/li&gt;
&lt;li&gt;Suggesting improvements  &lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;applications-of-chatgpt&quot;&gt;Applications of ChatGPT&lt;/h3&gt;
&lt;h4 id=&quot;education&quot;&gt;Education&lt;/h4&gt;
&lt;p&gt;Students use ChatGPT for concept clarification, problem-solving guidance, and language improvement.&lt;/p&gt;
&lt;h4 id=&quot;software-development&quot;&gt;Software Development&lt;/h4&gt;
&lt;p&gt;Developers use it as an AI coding assistant for faster prototyping and debugging.&lt;/p&gt;
&lt;h4 id=&quot;business-amp-productivity&quot;&gt;Business &amp;amp; Productivity&lt;/h4&gt;
&lt;p&gt;It helps in drafting emails, generating reports, automating customer support, and brainstorming ideas.&lt;/p&gt;
&lt;h4 id=&quot;creative-work&quot;&gt;Creative Work&lt;/h4&gt;
&lt;p&gt;From poetry to storytelling, ChatGPT enhances creativity by acting as a collaborative partner.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;advantages&quot;&gt;Advantages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Instant access to information  &lt;/li&gt;
&lt;li&gt;24/7 availability  &lt;/li&gt;
&lt;li&gt;Time-saving automation  &lt;/li&gt;
&lt;li&gt;Multi-language support  &lt;/li&gt;
&lt;li&gt;Adaptability across industries  &lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;limitations&quot;&gt;Limitations&lt;/h3&gt;
&lt;p&gt;Despite its strengths, ChatGPT has limitations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;May generate incorrect or outdated information  &lt;/li&gt;
&lt;li&gt;Lacks real-world understanding and emotions  &lt;/li&gt;
&lt;li&gt;Can produce biased outputs if prompted poorly  &lt;/li&gt;
&lt;li&gt;Depends on training data patterns  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Responsible usage and human verification are essential.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-future-of-chatgpt&quot;&gt;The Future of ChatGPT&lt;/h3&gt;
&lt;p&gt;With continuous advancements in AI research, conversational systems like ChatGPT are expected to become:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More accurate  &lt;/li&gt;
&lt;li&gt;More personalized  &lt;/li&gt;
&lt;li&gt;More integrated into daily software tools  &lt;/li&gt;
&lt;li&gt;More capable of multimodal understanding (text, image, audio)  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As AI evolves, tools like ChatGPT will increasingly act as collaborative intelligence systems rather than simple question-answer machines.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion-2&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;ChatGPT represents a significant milestone in artificial intelligence. By combining deep learning, large-scale training, and human feedback, it bridges the gap between humans and machines in communication. While not perfect, it continues to redefine productivity, creativity, and digital interaction across the globe.&lt;/p&gt;
&lt;p&gt;Artificial intelligence is no longer just a concept of the future—it is a tool of the present, and ChatGPT stands at the forefront of this transformation.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11777/chatgpt-transforming-human-ai-interaction</guid>
<pubDate>Mon, 16 Feb 2026 15:26:23 +0000</pubDate>
</item>
<item>
<title>Awesome Microsoft Copilot Prompts</title>
<link>https://coderlegion.com/11734/awesome-microsoft-copilot-prompts</link>
<description>&lt;p&gt;After 6 months using M365 Copilot daily, I built what I wish existed: 365 production-ready prompts for enterprise work. Email intelligence, data analysis, cross-app workflows. All free, no signup. Stop fighting with generic ChatGPT prompts.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/11734/awesome-microsoft-copilot-prompts</guid>
<pubDate>Mon, 16 Feb 2026 06:06:46 +0000</pubDate>
</item>
<item>
<title>Why you should learn Prompt Engineering</title>
<link>https://coderlegion.com/11602/why-you-should-learn-prompt-engineering</link>
<description>&lt;p&gt;When I first heard about prompt engineering,&lt;/p&gt;
&lt;p&gt;I thought:&lt;/p&gt;
&lt;p&gt;it's a scam.&lt;br&gt;
How can &quot;Explaining something in natural language(i.e. English)&quot; be engineered?&lt;br&gt;
Even it is, it must be over-engineering&lt;br&gt;
However, I was wrong.&lt;/p&gt;
&lt;p&gt;By changing(engineering) the prompt, you can get:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More accurate output&lt;/li&gt;
&lt;li&gt;More succinct output&lt;/li&gt;
&lt;li&gt;Less noise, and exactly what you want&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With LLM's, you want to hit the bullseye, and not the sides, as much as possible, to reduce the hallucinations.&lt;/p&gt;
&lt;h2 id=&quot;here-are-2-prompt-engineering-techniques-&quot;&gt;Here are 2 prompt engineering techniques:&lt;/h2&gt;
&lt;h3 id=&quot;1-few-shot-prompting&quot;&gt;1. Few-Shot Prompting&lt;/h3&gt;
&lt;p&gt;Give examples of the format you want.&lt;/p&gt;
&lt;p&gt;The model learns from the examples in the prompt:&lt;/p&gt;
&lt;p&gt;This is an example input:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Input: London,
Output: LON.
Input: Stockholm,
Output: ARN.
Input: Copenhagen
Output: ?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And AI would output this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CPH
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;2-chain-of-thought-cot-&quot;&gt;2. Chain-of-Thought(CoT)&lt;/h3&gt;
&lt;p&gt;Chain-of-thought is about forcing reasoning steps before the final answer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Without the chain-of-thought(CoT)&lt;/strong&gt;, you could create a prompt like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;A shop sells a laptop for $1000.
There is a 20% discount,
then 10% tax is applied.
What is the final price?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You might get the right answer.&lt;/p&gt;
&lt;p&gt;You might not.&lt;/p&gt;
&lt;p&gt;The model may shortcut or miscalculate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using Chain-of-thought&lt;/strong&gt;, you would write this query instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Think step by step.
First calculate the discounted price.
Then apply tax.
Then give the final answer.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the model does something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;20% of 1000 = 200
Discounted price = 800
10% tax on 800 = 80
Final price = 880
Answer: $880
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These are just 2 out of many techiques of prompt engineering.&lt;/p&gt;
&lt;p&gt;By getting the habit of creating deliberate prompts, you can get better results from AI.&lt;/p&gt;
&lt;p&gt;Considering how much AI entered our daily lives, I think learning prompt engineering is huge!&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/11602/why-you-should-learn-prompt-engineering</guid>
<pubDate>Fri, 13 Feb 2026 17:22:48 +0000</pubDate>
</item>
<item>
<title>MintPrompt: Coding Prompts &amp; Business Workflows Built for Real Developers</title>
<link>https://coderlegion.com/11387/mintprompt-coding-prompts-business-workflows-built-for-real-developers</link>
<description>&lt;p&gt; MintPrompt.in — Practical Coding Prompts &amp;amp; Business Workflows That Actually Ship&lt;br&gt;
Most AI prompt libraries stop at “cool demos”.&lt;br&gt;
MintPrompt is built for developers, builders, and solo founders who want usable outputs, not fluff.&lt;br&gt;
 What MintPrompt Focuses On&lt;br&gt;
1️⃣ Coding Prompts (Developer-First)&lt;br&gt;
Prompts for frontend, backend, APIs, debugging, refactoring&lt;br&gt;
Structured prompts that give clean, copy-paste-ready code&lt;br&gt;
Designed to work well with ChatGPT, Claude, and similar LLMs&lt;br&gt;
2️⃣ Automation &amp;amp; Business Workflows&lt;br&gt;
Ready-to-use workflows for:&lt;br&gt;
E-commerce order processing&lt;br&gt;
Email automation &amp;amp; CRM flows&lt;br&gt;
n8n / Zapier-style logic&lt;br&gt;
SaaS onboarding &amp;amp; lead pipelines&lt;br&gt;
Built for real businesses, not theoretical use cases&lt;br&gt;
3️⃣ Prompt Engineering for Scale&lt;br&gt;
Modular prompts (system + user + constraints)&lt;br&gt;
Workflow-based thinking instead of single prompts&lt;br&gt;
Focus on speed, consistency, and repeatability&lt;br&gt;
4️⃣ Extras (Light but Useful)&lt;br&gt;
Image generation prompts for branding &amp;amp; marketing&lt;br&gt;
Content generators for landing pages, emails, and docs&lt;br&gt;
AI workflows that connect code + business logic&lt;br&gt;
 Why I Built MintPrompt&lt;br&gt;
As a developer, I noticed most prompt platforms:&lt;br&gt;
Are overpriced&lt;br&gt;
Hide logic&lt;br&gt;
Or focus only on content creators&lt;br&gt;
MintPrompt is meant to feel like a developer toolkit, not a marketplace of buzzwords.&lt;br&gt;
 Explore here&lt;br&gt;
 &lt;a rel=&quot;nofollow&quot; href=&quot;https://mintprompt.in&quot;&gt;https://mintprompt.in&lt;/a&gt;&lt;br&gt;
I’d love feedback from the CoderLegion community — especially on:&lt;br&gt;
Workflow ideas you’d want next&lt;br&gt;
Dev tools you want automated with AI&lt;br&gt;
Prompt formats that actually help your day-to-day work&lt;br&gt;
Let’s build smarter, not louder.&lt;br&gt;
— Sahil&lt;br&gt;
Founder, MintPrompt&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11387/mintprompt-coding-prompts-business-workflows-built-for-real-developers</guid>
<pubDate>Tue, 10 Feb 2026 19:57:23 +0000</pubDate>
</item>
<item>
<title>mintprompt</title>
<link>https://coderlegion.com/10963/mintprompt</link>
<description>&lt;p&gt;MintPrompt is a practical prompt engineering platform built for creators, developers, and teams who want consistent, high-quality AI outputs — without trial-and-error guessing.&lt;br&gt;
Most people use AI by typing random instructions and hoping for good results. MintPrompt solves this by providing structured, reusable, and optimized prompts designed from real-world use cases.&lt;br&gt;
The platform focuses on clarity, context control, and output quality — whether you’re generating text, images, or developer-focused responses.&lt;br&gt;
 Why MintPrompt Exists&lt;br&gt;
As AI tools grow more powerful, poor prompting becomes the biggest bottleneck. MintPrompt was created to:&lt;br&gt;
Reduce hallucinations&lt;br&gt;
Improve output consistency&lt;br&gt;
Save time spent rewriting prompts&lt;br&gt;
Teach users why prompts work, not just what to type&lt;br&gt;
✨ Key Features&lt;br&gt;
Curated Prompt Library&lt;br&gt;
Ready-to-use prompts for writing, coding, image generation, and productivity.&lt;br&gt;
Advanced Prompt Structures&lt;br&gt;
Prompts designed using principles like role definition, constraints, context anchoring, and output formatting.&lt;br&gt;
Premium Prompt Engineering Guide (PDF)&lt;br&gt;
A deep, real-world guide covering:&lt;br&gt;
Context &amp;amp; memory management&lt;br&gt;
Chain-of-thought prompting&lt;br&gt;
Few-shot and multi-step prompts&lt;br&gt;
Debugging hallucinations&lt;br&gt;
Model-specific strategies&lt;br&gt;
Beginner to Advanced Friendly&lt;br&gt;
Works for first-time AI users and experienced prompt engineers alike.&lt;br&gt;
 How It Works&lt;br&gt;
Choose a prompt category&lt;br&gt;
Customize inputs based on your task&lt;br&gt;
Use directly in ChatGPT, image models, or other AI tools&lt;br&gt;
Iterate faster with predictable results&lt;br&gt;
 Who It’s For&lt;br&gt;
Content creators&lt;br&gt;
Developers&lt;br&gt;
Indie hackers&lt;br&gt;
AI enthusiasts&lt;br&gt;
Freelancers &amp;amp; startups&lt;br&gt;
 What’s Coming Next&lt;br&gt;
More advanced prompt collections&lt;br&gt;
Workflow-based prompt templates&lt;br&gt;
Community-requested prompt packs&lt;br&gt;
MintPrompt is actively maintained and continuously expanding based on real user needs.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/10963/mintprompt</guid>
<pubDate>Tue, 03 Feb 2026 08:49:26 +0000</pubDate>
</item>
<item>
<title>Copiloting with AI: Learning with Founderz and ChatGPT</title>
<link>https://coderlegion.com/10916/copiloting-with-ai-learning-with-founderz-and-chatgpt</link>
<description>&lt;p&gt;In our daily lives, we constantly face barriers when trying to implement good ideas, often due to a lack of technical knowledge and the time needed to figure out where to start. The AI models available today have brought about a revolution in this regard, accelerating timelines and removing learning obstacles. Thanks to these models, we can do more in less time and delve into highly complex fields like programming, allowing us to bring simple applications that implement good ideas to life.&lt;/p&gt;
&lt;p&gt;In this context, I recently completed the &lt;strong&gt;Introduction to AI and Prompt Engineering course by Founderz&lt;/strong&gt;, which is no longer available though you can find more similar courses in their website (&lt;a rel=&quot;nofollow&quot; href=&quot;https://founderz.com/&quot;&gt;https://founderz.com/&lt;/a&gt;), taught by Pau García-Millá (Founder and Co-CEO of Founderz), Anna Cejudo (Founder and Co-CEO of Founderz), and Magda Teruel (Client Account Manager at Microsoft). It was easy to follow, very educational, well-structured, and it truly made an impact, offering glimpses of what can be achieved with AI through brief and effective instructions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/founderz-coding-chatgpt/Founderz_AI_Introduction.png&quot; alt=&quot;Imagen del curso de Introducción a la IA Founderz&quot;&gt;&lt;/p&gt;
&lt;p&gt;The course consisted of short videos, between 5 and 15 minutes long, that explained and developed the idea of AI models as &quot;Copilots&quot; in our daily lives. Pau, Anna, and Magda presented examples of how to &quot;talk&quot; to these &quot;Copilots&quot; and how to use them in our day-to-day tasks, showing some advanced use cases and practical examples of how to turn our project ideas into web applications without knowing how to program, thanks to the good work of our &quot;Copilots.&quot; To finish, they proposed that you try creating a basic project yourself with these models based on what you've learned, providing a very interesting feedback mechanism from both themselves and other students.&lt;/p&gt;
&lt;p&gt;Besides recommending this kind of courses to anyone who wants to get started with AI models and learn more about having these &quot;Copilots,&quot; I'm going to use this post to illustrate one of the key takeaways from the course, focusing on how to create a functional application through a simple conversation with ChatGPT and the right instructions.&lt;/p&gt;
&lt;h4 id=&quot;the-aha-moment-of-the-founderz-course&quot;&gt;The &quot;Aha!&quot; Moment of the Founderz Course&lt;/h4&gt;
&lt;p&gt;The Founderz course was tremendously educational, and its greatest lesson was presenting AI (in this case, Copilot and ChatGPT) not just as a simple search assistant but as a &lt;strong&gt;creation partner (a copilot)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The clearest example of this copilotage is how a language model can help us create structured and functional code from an initial idea through a series of simple instructions. Through several practical cases, it teaches how to create self-contained web applications in a single HTML file, unleashing our ideas to improve our daily lives.&lt;/p&gt;
&lt;h4 id=&quot;the-challenge-creating-a-useful-tool-from-scratch-with-chatgpt&quot;&gt;The Challenge: Creating a Useful Tool from Scratch with ChatGPT&lt;/h4&gt;
&lt;p&gt;To put this skill to the test, we're going to create a &lt;strong&gt;learning game for basic math operations aimed at preschool and elementary school children between 5 and 7 years old&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The goal was simple: a webpage that would teach and allow practice of basic mathematical operations (addition, subtraction, multiplication, and division) by learning levels, making it engaging for users.&lt;/p&gt;
&lt;h4 id=&quot;the-recipe-the-detailed-prompt-and-its-refinement-is-key&quot;&gt;The Recipe: The Detailed Prompt (and its Refinement) is Key&lt;/h4&gt;
&lt;p&gt;This is where &lt;em&gt;Prompt Engineering&lt;/em&gt; comes into play. It's not about asking ChatGPT to &quot;make me an app,&quot; but about acting as a product manager who gives the development team (the AI) clear and detailed specifications.&lt;/p&gt;
&lt;h5 id=&quot;the-initial-prompt&quot;&gt;The Initial Prompt&lt;/h5&gt;
&lt;p&gt;This was the first prompt I used, inspired by the course's methodology, where I defined the entire structure and functionality I wanted (I encourage anyone to experiment and reproduce it themselves on ChatGPT):&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Create a simple web application to practice basic math functions: addition, subtraction, multiplication, and division. The goal is to create a simple application that makes it easier for preschool and elementary school children (between 5 and 7 years old) to learn these operations. The application must:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start with a learning page that explains the 4 mathematical operations.&lt;/li&gt;
&lt;li&gt;Allow the selection of a learning level from 4 levels (preschool 1 &amp;amp; 2, elementary 1 &amp;amp; 2).&lt;/li&gt;
&lt;li&gt;Allow the selection of a difficulty level (easy with 1 digit, hard with 2).&lt;/li&gt;
&lt;li&gt;Have a &quot;Start Game&quot; button that leads to a screen with operations.&lt;/li&gt;
&lt;li&gt;Check if the answer is correct and display a motivating message and an emoticon.&lt;/li&gt;
&lt;li&gt;Keep track of correct and incorrect answers.&lt;/li&gt;
&lt;li&gt;Have an attractive and responsive design using Tailwind CSS.&lt;/li&gt;
&lt;li&gt;Include all HTML, CSS, and JavaScript code in a single file.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;ChatGPT processed the request and, in seconds, returned a single block of code containing a fully functional application.&lt;/p&gt;
&lt;h5 id=&quot;the-refinement-the-conversation-continues&quot;&gt;The Refinement: The Conversation Continues&lt;/h5&gt;
&lt;p&gt;The first result worked quite well, but there's always room for improvement . This is where the true power of conversational AI lies: the ability to iterate and improve thanks to the coherence it can maintain in its results. As a test, I asked for a series of changes to make the application more dynamic and attractive:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;It works! Now I want you to make the following changes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit the design to be more attractive with gradient colors and nicer fonts.&lt;/li&gt;
&lt;li&gt;Add a 10-second countdown for each operation and a scoring system.&lt;/li&gt;
&lt;li&gt;Once the answer is submitted, show the correct/incorrect message for 3 seconds and then move to the next operation.&lt;/li&gt;
&lt;li&gt;Display the total score at all times.&lt;/li&gt;
&lt;li&gt;After 10 operations, show the final result.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Write the complete code again.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And as if by magic, the AI integrated all the improvements and provided me with the final, polished code. You can see the full conversation and the result here: &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://chatgpt.com/share/68b5fa88-be78-8004-8d93-612409d559f5&quot;&gt;Math App Prompt on ChatGPT&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;the-magic-your-app-running-in-30-seconds&quot;&gt;The &quot;Magic&quot;: Your App Running in 30 Seconds&lt;/h4&gt;
&lt;p&gt;This is the most rewarding part. To run the application we just created, just follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Open a plain text editor&lt;/strong&gt; (like Notepad on Windows or TextEdit on Mac).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paste the complete code&lt;/strong&gt; provided by ChatGPT.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save the file&lt;/strong&gt; with any name you like, but make sure the extension is &lt;code&gt;.html&lt;/code&gt; (for example: &lt;code&gt;math-game.html&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Double-click the saved file.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And that's it! The file will open in your web browser, and you'll have a fully functional educational application, created by you and your AI copilot.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/founderz-coding-chatgpt/app_maths_chatgpt.png&quot; alt=&quot;App screenshot showing math game&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;conclusion-and-next-steps&quot;&gt;Conclusion and Next Steps&lt;/h4&gt;
&lt;p&gt;This experience demonstrates the incredible democratization that AI is bringing to the world of digital creation. It is no longer essential to be an expert programmer to build simple and useful tools. What is now crucial is the ability to &lt;strong&gt;think in a structured way and give clear instructions&lt;/strong&gt;, the essence of &lt;em&gt;Prompt Engineering&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This method is incredibly fast for creating and testing tools. But how can we take it a step further and publish this application so that anyone in the world can use it?&lt;/p&gt;
&lt;p&gt;We'll talk about that in one of our next posts, where we'll explore the creation process with &lt;strong&gt;Gemini's Code Canvas&lt;/strong&gt; and its public deployment using &lt;strong&gt;GitHub Pages&lt;/strong&gt;. In the meantime, for those who haven't been trying it out in parallel, you can see the result created here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/apps/maths/&quot;&gt;My math app for kids created with ChatGPT&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&quot;sources-and-resources-&quot;&gt;Sources and Resources:&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Founderz&lt;/strong&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://founderz.com/&quot;&gt;Official site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenAI&lt;/strong&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://chat.openai.com/&quot;&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;App's Page&lt;/strong&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/apps/maths&quot;&gt;My math app for kids created with ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10916/copiloting-with-ai-learning-with-founderz-and-chatgpt</guid>
<pubDate>Mon, 02 Feb 2026 06:49:51 +0000</pubDate>
</item>
<item>
<title>Beyond Prompting: How to Build Your Own AI Army with Google Gems</title>
<link>https://coderlegion.com/10891/beyond-prompting-how-to-build-your-own-ai-army-with-google-gems</link>
<description>&lt;h2 id=&quot;beyond-prompting-how-to-build-your-own-ai-army-with-google-gems&quot;&gt;Beyond Prompting: How to Build Your Own AI Army with Google Gems&lt;/h2&gt;
&lt;p&gt;Hey everyone!  If you’ve been following my journey, you know I’m obsessed with bridging the gap between &quot;just using AI&quot; and &quot;making AI work for you.&quot; In my &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/8374/unlock-geminis-true-potential-the-one-setting-you-need-to-change-right-now&quot;&gt;previous post&lt;/a&gt;, I showed you how to fix that one pesky Gemini setting. Today, we’re leveling up.&lt;/p&gt;
&lt;p&gt;If you’re still copy-pasting the same long instructions into Gemini every morning, you’re doing it wrong. It’s time to talk about &lt;strong&gt;Gems&lt;/strong&gt;—the secret weapon for every developer, student, and creator looking to build their own stable of specialized AI experts.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#what-exactly-are-gems&quot;&gt;What Exactly are Gems?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#why-gems-crush-traditional-prompting&quot;&gt;Why Gems Crush Traditional Prompting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#how-to-build-your-first-custom-gem&quot;&gt;How to Build Your First Custom Gem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#pro-tip-the-markup-method&quot;&gt;Pro-Tip: The &quot;Markup&quot; Method&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#start-building-today&quot;&gt;Start Building Today!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-exactly-are-gems-&quot;&gt;What Exactly are Gems?&lt;/h3&gt;
&lt;p&gt;Think of &lt;strong&gt;Gems&lt;/strong&gt; as custom versions of Gemini that you’ve &quot;pre-trained&quot; with specific personalities, knowledge, and goals. Instead of a general-purpose chatbot, you’re creating a &lt;strong&gt;Coding Partner&lt;/strong&gt;, a &lt;strong&gt;Technical Writing Editor&lt;/strong&gt;, or a &lt;strong&gt;Mock Interviewer&lt;/strong&gt; that remembers exactly how you like to work. ✨&lt;/p&gt;
&lt;p&gt;As of 2025, Gems are available to all users, making them one of the most accessible ways to start experimenting with AI agents without writing a single line of code.&lt;/p&gt;
&lt;h3 id=&quot;why-gems-crush-traditional-prompting&quot;&gt;Why Gems Crush Traditional Prompting&lt;/h3&gt;
&lt;p&gt;When I was building &lt;strong&gt;OmNi&lt;/strong&gt;, I had a specific way I wanted my code reviewed: strict security checks, clear variable naming, and no fluff. Writing that prompt every time was a vibe-killer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here’s why Gems are a game-changer:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zero Context Switching:&lt;/strong&gt; They live in your sidebar. No more hunting through old chats for &quot;that one prompt that worked.&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Workspace Integration:&lt;/strong&gt; Gems can tap directly into your &lt;strong&gt;Google Drive&lt;/strong&gt; and &lt;strong&gt;Gmail&lt;/strong&gt;. They don’t just read a snapshot; they have a live connection to your docs. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Massive Instructions:&lt;/strong&gt; You can feed a Gem up to 15,000 tokens of instructions. Some power users are even building &quot;mini-programs&quot; within the instruction box!&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-to-build-your-first-custom-gem&quot;&gt;How to Build Your First Custom Gem&lt;/h3&gt;
&lt;p&gt;Don't overthink it. You can have a functional Gem running in under 60 seconds.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Head to the Lab:&lt;/strong&gt; Go to &lt;a rel=&quot;nofollow&quot; href=&quot;https://gemini.google.com&quot;&gt;gemini.google.com&lt;/a&gt; and look for &lt;strong&gt;&quot;Explore Gems&quot;&lt;/strong&gt; in the sidebar.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Name It:&lt;/strong&gt; Give it a clear identity (e.g., &quot;PR Reviewer 3000&quot;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Define the Mission:&lt;/strong&gt; Tell it who it is and what it does.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use the Magic Wand:&lt;/strong&gt; If you’re feeling lazy, click the &lt;strong&gt;&quot;Use Gemini to rewrite instructions&quot;&lt;/strong&gt; icon. It’ll turn your rough notes into a professional system prompt. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save &amp;amp; Pin:&lt;/strong&gt; Hit save and pin it to your sidebar for instant access.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;pro-tip-the-markup-method&quot;&gt;Pro-Tip: The &quot;Markup&quot; Method&lt;/h3&gt;
&lt;p&gt;If you want your Gem to be truly elite, don't just write a paragraph. Use &lt;strong&gt;Markdown&lt;/strong&gt; to structure the instructions. This helps the LLM's reasoning engine follow your logic perfectly.&lt;/p&gt;
&lt;h4 id=&quot;example-instruction-structure-&quot;&gt;Example Instruction Structure:&lt;/h4&gt;
&lt;blockquote&gt;&lt;h2 id=&quot;role&quot;&gt;Role&lt;/h2&gt;
&lt;p&gt;You are a Senior React Developer focused on performance.&lt;/p&gt;
&lt;h2 id=&quot;constraints&quot;&gt;Constraints&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Always suggest Tailwind CSS for styling.&lt;/li&gt;
&lt;li&gt;Never use 'any' in TypeScript.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;output-format&quot;&gt;Output Format&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Summary of changes&lt;/li&gt;
&lt;li&gt;Code block&lt;/li&gt;
&lt;li&gt;Performance impact (High/Med/Low)&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;start-building-today-&quot;&gt;Start Building Today!&lt;/h3&gt;
&lt;p&gt;The era of the &quot;General AI&quot; is fading. The future belongs to the &lt;strong&gt;Orchestrators&lt;/strong&gt;—those who can build and manage a team of digital experts. Whether you’re a student trying to simplify your study routine or a dev streamlining your workflow, Gems are your ticket to working smarter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What’s the first Gem you’re going to build? Let me know in the comments or over at CoderLegion! &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stay curious and keep coding!&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10891/beyond-prompting-how-to-build-your-own-ai-army-with-google-gems</guid>
<pubDate>Mon, 02 Feb 2026 02:32:58 +0000</pubDate>
</item>
<item>
<title>How Context Engineering Will Replace Prompt Engineering in the Next 5 Years</title>
<link>https://coderlegion.com/10872/how-context-engineering-will-replace-prompt-engineering-in-the-next-5-years</link>
<description>&lt;p&gt;As the Founder of ReThynk AI, I want to be very clear about what’s coming next:&lt;/p&gt;
&lt;p&gt;Prompt engineering is a transitional skill. Context engineering is the future.&lt;/p&gt;
&lt;p&gt;And the shift has already started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How Context Engineering Will Replace Prompt Engineering in the Next 5 Years&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompt engineering emerged because early AI systems were stateless and context-poor.&lt;/p&gt;
&lt;p&gt;So humans compensated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;longer prompts&lt;/li&gt;
&lt;li&gt;repeated instructions&lt;/li&gt;
&lt;li&gt;pasted examples&lt;/li&gt;
&lt;li&gt;fragile tricks&lt;/li&gt;
&lt;li&gt;constant rephrasing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It worked, but it doesn’t scale.&lt;/p&gt;
&lt;p&gt;Five years from now, most people won’t “prompt” AI the way they do today.&lt;/p&gt;
&lt;p&gt;They’ll design context.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why prompt engineering hits a ceiling&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompting assumes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the human remembers everything&lt;/li&gt;
&lt;li&gt;the human provides all context&lt;/li&gt;
&lt;li&gt;the human catches all mistakes&lt;/li&gt;
&lt;li&gt;the human maintains consistency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That creates cognitive load and quality drift.&lt;/p&gt;
&lt;p&gt;It also means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;results vary by person&lt;/li&gt;
&lt;li&gt;teams can’t standardise output&lt;/li&gt;
&lt;li&gt;AI becomes personality-dependent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s not how real systems survive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What context engineering actually means&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Context engineering is not better wording.&lt;/p&gt;
&lt;p&gt;It’s environment design.&lt;/p&gt;
&lt;p&gt;Instead of telling AI everything every time, we define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;who the user is&lt;/li&gt;
&lt;li&gt;what the goal is&lt;/li&gt;
&lt;li&gt;what standards apply&lt;/li&gt;
&lt;li&gt;what data is allowed&lt;/li&gt;
&lt;li&gt;what risks exist&lt;/li&gt;
&lt;li&gt;what “good” looks like&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once defined, this context is persistent, not rewritten.&lt;/p&gt;
&lt;p&gt;The AI operates inside it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The shift you’ll see over the next 5 years&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1) From prompts → context layers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;People won’t write instructions repeatedly.&lt;/p&gt;
&lt;p&gt;They’ll configure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;role context&lt;/li&gt;
&lt;li&gt;workflow context&lt;/li&gt;
&lt;li&gt;policy context&lt;/li&gt;
&lt;li&gt;domain context&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Prompting becomes a minor input, not the main control.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2) From individual skill → organisational capability&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Today, one “AI person” writes good prompts.&lt;/p&gt;
&lt;p&gt;Tomorrow, teams design shared context so:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;quality is consistent&lt;/li&gt;
&lt;li&gt;output is predictable&lt;/li&gt;
&lt;li&gt;trust is preserved&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI stops depending on who typed the message.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3) From creativity tricks → operational reliability&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompt tricks optimise for cleverness.&lt;/p&gt;
&lt;p&gt;Context engineering optimises for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;repeatability&lt;/li&gt;
&lt;li&gt;safety&lt;/li&gt;
&lt;li&gt;clarity&lt;/li&gt;
&lt;li&gt;accountability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s what businesses actually need.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4) From chat interfaces → workflow-native AI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When context is embedded in systems, AI doesn’t need conversation.&lt;/p&gt;
&lt;p&gt;It just acts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;inside tools&lt;/li&gt;
&lt;li&gt;inside processes&lt;/li&gt;
&lt;li&gt;inside decisions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Prompting fades into the background.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why this matters for democratisation of AI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompt engineering rewards:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;experts&lt;/li&gt;
&lt;li&gt;early adopters&lt;/li&gt;
&lt;li&gt;technically confident users&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Context engineering empowers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;small teams&lt;/li&gt;
&lt;li&gt;non-technical professionals&lt;/li&gt;
&lt;li&gt;founders&lt;/li&gt;
&lt;li&gt;everyday users&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because people shouldn’t need to be good at talking to AI&lt;br&gt;
to benefit from intelligence.&lt;/p&gt;
&lt;p&gt;They should just work normally and get better outcomes.&lt;/p&gt;
&lt;p&gt;My takeaway&lt;/p&gt;
&lt;p&gt;Prompt engineering teaches AI what to do once. Context engineering teaches AI how to behave always.&lt;/p&gt;
&lt;p&gt;That’s the shift that will define the next phase of AI adoption.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10872/how-context-engineering-will-replace-prompt-engineering-in-the-next-5-years</guid>
<pubDate>Sun, 01 Feb 2026 12:57:40 +0000</pubDate>
</item>
<item>
<title>Cognitive Load in Prompt Engineering</title>
<link>https://coderlegion.com/10340/cognitive-load-in-prompt-engineering</link>
<description>&lt;p&gt;As the Founder of ReThynk AI, I’ve noticed something ironic:&lt;/p&gt;
&lt;p&gt;Prompt engineering was meant to reduce effort.&lt;br&gt;
Instead, it’s increasing cognitive load.&lt;/p&gt;
&lt;p&gt;And that’s why it won’t scale the way people expect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cognitive Load in Prompt Engineering&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At first, prompt engineering feels empowering.&lt;/p&gt;
&lt;p&gt;People learn to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write longer prompts&lt;/li&gt;
&lt;li&gt;add more rules&lt;/li&gt;
&lt;li&gt;stack instructions&lt;/li&gt;
&lt;li&gt;anticipate edge cases&lt;/li&gt;
&lt;li&gt;control tone, format, and logic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a while, results improve.&lt;/p&gt;
&lt;p&gt;Then fatigue sets in.&lt;/p&gt;
&lt;p&gt;Not because AI is hard, but because humans are carrying too much mental overhead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What cognitive load looks like in real life&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Cognitive load is the invisible cost of thinking too much just to get work done.&lt;/p&gt;
&lt;p&gt;In prompt engineering, it shows up as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;remembering what worked last time&lt;/li&gt;
&lt;li&gt;rewriting context again and again&lt;/li&gt;
&lt;li&gt;worrying about missing instructions&lt;/li&gt;
&lt;li&gt;constantly tweaking prompts&lt;/li&gt;
&lt;li&gt;second-guessing output quality&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The brain becomes the system.&lt;/p&gt;
&lt;p&gt;And humans are terrible systems at scale.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why this breaks down in teams and businesses&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompt engineering assumes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;high attention&lt;/li&gt;
&lt;li&gt;consistent expertise&lt;/li&gt;
&lt;li&gt;strong memory&lt;/li&gt;
&lt;li&gt;individual discipline&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That works for one motivated person.&lt;/p&gt;
&lt;p&gt;It fails for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;teams&lt;/li&gt;
&lt;li&gt;busy founders&lt;/li&gt;
&lt;li&gt;non-technical users&lt;/li&gt;
&lt;li&gt;everyday workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When every result depends on &lt;em&gt;how well someone prompts&lt;/em&gt;, quality becomes fragile.&lt;/p&gt;
&lt;p&gt;And fragile systems don’t survive real-world pressure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The hidden cost: decision fatigue&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every prompt forces decisions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;how detailed should I be?&lt;/li&gt;
&lt;li&gt;did I add enough constraints?&lt;/li&gt;
&lt;li&gt;should I rephrase this?&lt;/li&gt;
&lt;li&gt;is this good enough to ship?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Over time, this drains energy.&lt;/p&gt;
&lt;p&gt;People stop refining.&lt;br&gt;
They accept “good enough.”&lt;br&gt;
And output quality slowly drops.&lt;/p&gt;
&lt;p&gt;That’s why AI output often looks fine, but hurts results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The shift that fixes cognitive load&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The solution is not better prompting.&lt;/p&gt;
&lt;p&gt;The solution is offloading cognition from people to systems.&lt;/p&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;remembering prompts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;workflows&lt;/li&gt;
&lt;li&gt;templates&lt;/li&gt;
&lt;li&gt;standards&lt;/li&gt;
&lt;li&gt;quality gates&lt;/li&gt;
&lt;li&gt;escalation rules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The system carries the thinking.&lt;br&gt;
The human applies judgment.&lt;/p&gt;
&lt;p&gt;This is how AI becomes usable by normal teams, not just experts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why this matters for democratisation of AI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If AI depends on high cognitive effort, it stays elite.&lt;/p&gt;
&lt;p&gt;If AI reduces cognitive load, it becomes accessible.&lt;/p&gt;
&lt;p&gt;Democratisation of AI is not about teaching everyone to prompt better.&lt;/p&gt;
&lt;p&gt;It’s about designing environments where people don’t have to think so hard just to get consistent results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One-line takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Prompt engineering that increases cognitive load is not progress. System design that reduces cognitive load is!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10340/cognitive-load-in-prompt-engineering</guid>
<pubDate>Fri, 23 Jan 2026 10:08:11 +0000</pubDate>
</item>
<item>
<title>GitHub Copilot 101: From Autocomplete to Pair Programmer</title>
<link>https://coderlegion.com/9250/github-copilot-101-from-autocomplete-to-pair-programmer</link>
<description>&lt;p&gt;&lt;strong&gt;Let’s be honest:&lt;/strong&gt; when GitHub Copilot first dropped, many of us thought, &lt;em&gt;&quot;Cool, a fancy autocomplete.&quot;&lt;/em&gt; But if you are still treating it like a fancy spell-checker for your code, you are missing out on 90% of its power.&lt;/p&gt;
&lt;p&gt;In my experience, Copilot isn't just about typing less; it's about &lt;strong&gt;thinking faster&lt;/strong&gt;. It bridges the gap between the logic in your head and the syntax on your screen. Today, I want to show you how to shift your mindset from &quot;using a tool&quot; to &quot;collaborating with an AI partner.&quot;&lt;/p&gt;
&lt;p&gt;Let’s dive in! &lt;/p&gt;
&lt;h4 id=&quot;table-of-contents-1&quot;&gt;Table of Contents&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The &quot;Context&quot; is King&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Comment Driven Development (CDD)&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practical Example: Crushing Regular Expressions&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practical Example: Writing Tests in Seconds&lt;/strong&gt; ⚡&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Golden Rule: You Are Still the Pilot&lt;/strong&gt; ✈️&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-context-is-king&quot;&gt;The &quot;Context&quot; is King&lt;/h3&gt;
&lt;p&gt;The biggest mistake students and junior devs make is thinking Copilot reads your mind. It doesn't. It reads your &lt;strong&gt;Context&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Copilot looks at the file you are currently editing, but it also scans &lt;strong&gt;other open tabs&lt;/strong&gt; in your IDE to understand the bigger picture.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Pro Tip:&lt;/strong&gt; Before you ask Copilot to write a function that utilizes a specific interface or database model, &lt;strong&gt;open the file&lt;/strong&gt; defining that model in a background tab. Copilot will &quot;read&quot; it and give you a suggestion that matches your exact schema without you having to teach it.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;comment-driven-development-cdd-&quot;&gt;Comment Driven Development (CDD)&lt;/h3&gt;
&lt;p&gt;This is where the magic happens. Instead of jumping straight into code, write a comment explaining &lt;em&gt;what&lt;/em&gt; you want. This is what I call &lt;strong&gt;Prompt Engineering for Code&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;the-bad-way-&quot;&gt;The &quot;Bad&quot; Way ❌&lt;/h4&gt;
&lt;p&gt;You give Copilot nothing to work with.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// get data
const getData = ...

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Result: You'll get a generic fetch request that probably needs 5 minutes of refactoring.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&quot;the-sandeep-approved-way-&quot;&gt;The &quot;Sandeep Approved&quot; Way ✅&lt;/h4&gt;
&lt;p&gt;Be specific. Describe the input, the output, and the error handling.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// Function to fetch user data from API endpoint '/api/v1/users/${id}'
// Use async/await
// Handle 404 errors by returning null
// Return the user object if successful
const getUserById = async (id) =&amp;gt; {
    // Copilot will likely generate the perfect try-catch block here!
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By writing the comment first, you clarify your own thinking &lt;em&gt;and&lt;/em&gt; give Copilot the roadmap it needs.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;practical-example-crushing-regular-expressions&quot;&gt;Practical Example: Crushing Regular Expressions&lt;/h3&gt;
&lt;p&gt;We have all been there. You need a Regex to validate an email or extract a specific string, and you stare at the screen for 20 minutes.&lt;/p&gt;
&lt;p&gt;Stop struggling!  Just ask your pair programmer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Type this comment:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// Regex to validate a password that has:
// - At least 8 characters
// - One uppercase letter
// - One number
// - One special character
const passwordRegex = /^(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&amp;amp;*])[A-Za-z\d!@#$%^&amp;amp;*]{8,}$/;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copilot will generate that complex string in milliseconds. This frees up your brain to focus on the business logic rather than syntax memorization.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;practical-example-writing-tests-in-seconds-&quot;&gt;Practical Example: Writing Tests in Seconds ⚡&lt;/h3&gt;
&lt;p&gt;Writing unit tests is crucial, but let's admit it—it can be tedious. This is where Copilot shines the brightest.&lt;/p&gt;
&lt;p&gt;If you have a function named &lt;code&gt;calculateTotal(items)&lt;/code&gt;, just open your test file and start typing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;describe('calculateTotal', () =&amp;gt; {
  it('should return 0 for an empty array', () =&amp;gt; {
    // Copilot triggers here
  });

  it('should sum up prices correctly', () =&amp;gt; {
     // Copilot triggers here
  });
});

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because Copilot sees your main file (remember context!), it often suggests the &lt;em&gt;entire&lt;/em&gt; test suite, including edge cases you might have forgotten.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-golden-rule-you-are-still-the-pilot-&quot;&gt;The Golden Rule: You Are Still the Pilot ✈️&lt;/h3&gt;
&lt;p&gt;I cannot stress this enough: &lt;strong&gt;Copilot is the Co-pilot. YOU are the Pilot.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI can hallucinate. It might suggest code that looks correct but imports a library you don't have, or uses a deprecated method.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read the code&lt;/strong&gt; before you hit Tab.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test the code&lt;/strong&gt; immediately.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Understand the code.&lt;/strong&gt; If you don't know what the suggestion does, do not use it until you research it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;conclusion-3&quot;&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;Copilot is a force multiplier. It helps you stay in the &quot;flow state&quot; by handling the boilerplate, the syntax lookup, and the tedious testing structure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Start coding today!&lt;/strong&gt; Install the extension, open a new project, and try the &quot;Comment Driven Development&quot; technique I showed you above. You'll never want to go back.&lt;/p&gt;
&lt;p&gt;Happy Coding! ✨&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9250/github-copilot-101-from-autocomplete-to-pair-programmer</guid>
<pubDate>Sun, 04 Jan 2026 15:07:10 +0000</pubDate>
</item>
<item>
<title>The Real AI Divide Inside Companies is Clarity, Not Tools</title>
<link>https://coderlegion.com/9224/the-real-ai-divide-inside-companies-is-clarity-not-tools</link>
<description>&lt;p&gt;As the Founder of ReThynk AI, I’ve noticed something uncomfortable.&lt;/p&gt;
&lt;p&gt;Inside companies, the AI divide is not:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;paid tools vs free tools&lt;/li&gt;
&lt;li&gt;technical vs non-technical&lt;/li&gt;
&lt;li&gt;prompt experts vs beginners&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The real divide is: people who can clearly define what they want vs people who can’t.&lt;/p&gt;
&lt;p&gt;AI rewards clarity.&lt;/p&gt;
&lt;p&gt;If I can define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the outcome&lt;/li&gt;
&lt;li&gt;the audience&lt;/li&gt;
&lt;li&gt;the constraints&lt;/li&gt;
&lt;li&gt;the standard of quality&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI becomes predictable.&lt;/p&gt;
&lt;p&gt;If I can’t define those things, AI becomes random.&lt;/p&gt;
&lt;p&gt;That’s why some teams say: “AI is magic.”&lt;/p&gt;
&lt;p&gt;And others say: “AI is useless.”&lt;/p&gt;
&lt;p&gt;Same tool. Different clarity.&lt;/p&gt;
&lt;p&gt;So for businesses, democratisation of AI doesn’t start with buying tools. It starts with building a culture of clear thinking:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clear goals&lt;/li&gt;
&lt;li&gt;clear owners&lt;/li&gt;
&lt;li&gt;clear definitions of done&lt;/li&gt;
&lt;li&gt;clear review standards&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When clarity becomes normal, AI becomes leverage for everyone: marketing, sales, HR, operations.&lt;/p&gt;
&lt;p&gt;That’s the real democratisation: making AI work for normal people inside normal teams.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9224/the-real-ai-divide-inside-companies-is-clarity-not-tools</guid>
<pubDate>Sun, 04 Jan 2026 04:12:25 +0000</pubDate>
</item>
<item>
<title>Systematising Intuition: How to Code &quot;Seniority&quot; into an AI</title>
<link>https://coderlegion.com/9216/systematising-intuition-how-to-code-seniority-into-an-ai</link>
<description>&lt;h3 id=&quot;tl-dr&quot;&gt;TL;DR&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Problem:&lt;/strong&gt; AI models act like eager junior developers—compliant but lacking judgment. They don't fear breaking production.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt; Instead of just prompting for code, we must provide &quot;System Instructions&quot; that act as an operating system for engineering values.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Protocols:&lt;/strong&gt; By enforcing specific rules for Latency (stop and think), Risk (critical vs. trivial), Minimalism (YAGNI), and Humility (admitting ignorance), we turn the AI into a thoughtful senior partner.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;If the &lt;a rel=&quot;nofollow&quot; href=&quot;https://amjedidiah.hashnode.dev/ai-coding-teacher-mindset&quot;&gt;previous article&lt;/a&gt; was about the &lt;strong&gt;external interface&lt;/strong&gt; (how you talk to the AI), this article is about the &lt;strong&gt;internal monologue&lt;/strong&gt; (how the AI talks to itself).&lt;/p&gt;
&lt;h3 id=&quot;the-problem-ai-has-no-fear&quot;&gt;The Problem: AI Has No Fear&lt;/h3&gt;
&lt;p&gt;In my &lt;a rel=&quot;nofollow&quot; href=&quot;https://amjedidiah.hashnode.dev/ai-coding-teacher-mindset&quot;&gt;last post&lt;/a&gt;, I argued that the secret to high-performance AI coding is treating the model like a &lt;strong&gt;&quot;Junior Developer&quot;&lt;/strong&gt;—someone bright and eager who needs context, scaffolding, and examples.&lt;/p&gt;
&lt;p&gt;But there is a dangerous flaw in that analogy.&lt;/p&gt;
&lt;p&gt;When you ask a real human junior developer to &quot;refactor the payment gateway,&quot; they usually hesitate. They feel a knot in their stomach. They worry about breaking the checkout flow, corrupting the database, or getting fired. &lt;strong&gt;That fear is healthy&lt;/strong&gt;; it is the embryonic stage of engineering judgment.&lt;/p&gt;
&lt;p&gt;An LLM has no such fear. It has no mortgage to pay, no reputation to lose, and no memory of the time it took down production on a Friday afternoon. It is the ultimate &quot;Yes Man.&quot; It prioritizes &lt;strong&gt;compliance over correctness&lt;/strong&gt;. If you ask it to prioritize speed, it will happily strip away error handling. If you ask for a quick fix, it will introduce technical debt without a second thought.&lt;/p&gt;
&lt;p&gt;To turn this &quot;Eager Junior&quot; into a &quot;Thoughtful Partner,&quot; we cannot just rely on better prompting in the moment. We need to fundamentally alter its operating system. &lt;strong&gt;We need to give it a conscience.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I recently spent time codifying my own engineering philosophy—the scar tissue accumulated from years of production failures—into a single document titled &lt;strong&gt;System Instructions: Reasoner &amp;amp; Minimalist Engineer&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This document is not a cheat sheet of clever prompts. It is a set of &lt;strong&gt;governing constraints&lt;/strong&gt; designed to force the AI to simulate senior engineer intuition. It overrides the model's default desire to be &quot;helpful&quot; with a stricter mandate to be &lt;strong&gt;&quot;correct, maintainable, and minimalist.&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is how I systematized the intangible traits of seniority—risk assessment, minimalism, and epistemic humility—into a logic flow that an AI can actually execute.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-the-stop-and-think-protocol&quot;&gt;1. The &quot;Stop and Think&quot; Protocol&lt;/h3&gt;
&lt;p&gt;The most insidious habit of LLMs is their &lt;strong&gt;speed&lt;/strong&gt;. They generate solutions at the speed of token prediction, often bypassing the messy, slow work of architectural planning. If you paste a stack trace, the model immediately attempts to fix the specific line where the error occurred, often missing the systemic issue three layers deeper.&lt;/p&gt;
&lt;p&gt;To counter this, the first section of my System Instructions creates an &lt;strong&gt;artificial latency period&lt;/strong&gt;. It explicitly forbids the generation of code until a rigorous reasoning phase is complete:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Before taking any action, you must proactively and independently reason about the request... Resolve conflicts in order of importance.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This forces the model to engage in &lt;strong&gt;Abductive Reasoning&lt;/strong&gt; (Section 3 of the instructions). Instead of guessing the first plausible solution, the model is required to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Look beyond immediate causes&lt;/li&gt;
&lt;li&gt;Generate multiple hypotheses&lt;/li&gt;
&lt;li&gt;Rank them by likelihood&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This transforms the debugging process. The AI stops acting like a spell-checker that blindly fixes syntax errors and starts acting like a &lt;strong&gt;detective&lt;/strong&gt;. It asks, &lt;em&gt;&quot;Is this variable undefined because of a typo, or because the upstream API contract changed?&quot;&lt;/em&gt; By forcing this pause, we trade milliseconds of generation speed for hours of saved debugging time.&lt;/p&gt;
&lt;h3 id=&quot;2-the-nasa-filter-context-aware-risk-&quot;&gt;2. The &quot;NASA Filter&quot; (Context-Aware Risk)&lt;/h3&gt;
&lt;p&gt;A common failure mode in AI-generated code is the lack of nuance in security.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Paranoid Failure:&lt;/strong&gt; You ask for a simple internal utility function, and the AI wraps it in three layers of &lt;code&gt;try-catch&lt;/code&gt; blocks and input validation, making the code unreadable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Reckless Failure:&lt;/strong&gt; You ask for a public API endpoint, and the AI directly interpolates user strings into a SQL query.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Senior engineers know that &lt;strong&gt;not all code is created equal&lt;/strong&gt;. We apply different standards to a core banking transaction versus a UI tooltip. I call this the &lt;strong&gt;NASA Filter&lt;/strong&gt;, and I codified it in Section 2 of the instructions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Distinguish between critical risks and trivial risks.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Critical Risks (The NASA Standard):&lt;/strong&gt; If data comes from outside the system (User Input, API responses), defensive coding is mandatory. Add runtime validation (Zod), null checks, and transaction boundaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Trivial Risks (The Startup Standard):&lt;/strong&gt; If data is internal (private functions, hardcoded constants), trust the compiler.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This instruction is crucial for keeping codebases clean. It tells the AI: &lt;em&gt;&quot;If TypeScript says this is a number, and it's an internal variable, don't waste lines checking if it's null. But if it came from the client, trust nothing.&quot;&lt;/em&gt; This nuance is what separates &quot;AI bloat&quot; from production-grade engineering.&lt;/p&gt;
&lt;h3 id=&quot;3-weaponized-minimalism-yagni-as-law-&quot;&gt;3. Weaponized Minimalism (YAGNI as Law)&lt;/h3&gt;
&lt;p&gt;Left unchecked, an LLM will almost always over-engineer. Because it has consumed the entire internet's worth of tutorials, it is eager to demonstrate that it knows what the Abstract Factory Pattern is. If you ask for a simple button component, it might give you a generic, themeable, polymorphic UI element with five unnecessary props.&lt;/p&gt;
&lt;p&gt;The System Instructions counter this with &lt;strong&gt;Weaponized Minimalism&lt;/strong&gt; (Section 10).&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Minimalism ≠ Corner-Cutting. Simple solutions must still be correct.&quot;&lt;/p&gt;
&lt;p&gt;&quot;Implement only what is necessary to solve the immediate request. No 'future-proofing'.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I enforce this through a mechanism I call &lt;strong&gt;Complexity Routing&lt;/strong&gt; (Section 9). The instructions force the AI to categorize every request:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple Request?&lt;/strong&gt; (e.g., &quot;Fix this regex&quot;) → Skip the preamble. Just give me the code. Be concise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complex Request?&lt;/strong&gt; (e.g., &quot;Refactor the auth flow&quot;) → STOP. Generate a &quot; Engineering Strategy&quot; first. List 3-5 bullet points covering dependencies and risks.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This mimics how senior engineers actually communicate. If you ask a senior dev on Slack how to sort an array, they just paste the one-liner. If you ask them how to re-architect the database, they send you a Google Doc. &lt;strong&gt;We are teaching the AI to match the fidelity of the response to the complexity of the problem.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;4-epistemic-humility&quot;&gt;4. Epistemic Humility&lt;/h3&gt;
&lt;p&gt;The most dangerous phrase in software engineering is &lt;em&gt;&quot;I think so,&quot;&lt;/em&gt; when it is disguised as &lt;em&gt;&quot;Yes.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;LLMs are trained to be confident. They will hallucinate a library method that doesn't exist with the same conviction that they recite &lt;code&gt;2 + 2 = 4&lt;/code&gt;. This &quot;confident hallucination&quot; is why many engineers stop trusting AI tools after the first burn.&lt;/p&gt;
&lt;p&gt;To fix this, Section 13 of the instructions mandates &lt;strong&gt;Epistemic Humility&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;State confidence levels for non-obvious decisions.&quot;&lt;/p&gt;
&lt;p&gt;&quot;Flag 'educated guesses' vs 'verified facts'.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When the AI encounters an ambiguous error or a missing dependency, it is forbidden from silently assuming a fix. It must explicitly state: &lt;em&gt;&quot;I am assuming we are using React 18 based on the syntax, but please verify.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This shift is subtle but profound. It changes the AI from an &lt;strong&gt;authoritative oracle&lt;/strong&gt; into a &lt;strong&gt;collaborative peer&lt;/strong&gt; that knows its own limits. It allows me to trust the code it generates because I know it will tell me where the shaky parts are.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion-the-soft-skill-is-the-algorithm&quot;&gt;Conclusion: The Soft Skill is the Algorithm&lt;/h3&gt;
&lt;p&gt;We typically view &quot;critical thinking,&quot; &quot;risk management,&quot; and &quot;knowing when to say no&quot; as &lt;strong&gt;soft skills&lt;/strong&gt;—intuition that takes a decade to acquire.&lt;/p&gt;
&lt;p&gt;But in the era of AI-augmented coding, these soft skills are rapidly becoming &lt;strong&gt;hard system constraints&lt;/strong&gt;. By explicitly writing these traits into a document like &lt;strong&gt;System Instructions: Reasoner &amp;amp; Minimalist Engineer&lt;/strong&gt;, we aren't just getting better code from our tools. We are creating a mirror for our own engineering processes.&lt;/p&gt;
&lt;p&gt;Writing these instructions forced me to articulate exactly why I reject certain PRs. It forced me to define exactly when I apply defensive coding and when I skip it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you want to master AI coding, don't just look for a cheat sheet of prompts.&lt;/strong&gt; Try to write your own &quot;System Instructions.&quot; Try to write down the algorithm of your own intuition. You might find that it makes you a better engineer, even when the AI isn't turned on.&lt;/p&gt;
&lt;h3 id=&quot;appendix-the-reasoner-amp-minimalist-engineer-system-instructions&quot;&gt;Appendix: The &quot;Reasoner &amp;amp; Minimalist Engineer&quot; System Instructions&lt;/h3&gt;
&lt;p&gt;Feel free to copy my own instructions found at the bottom of &lt;a rel=&quot;nofollow&quot; href=&quot;https://amjedidiah.hashnode.dev/systematizing-intuition-coding-seniority?showSharer=true&quot;&gt;this link&lt;/a&gt; into your Custom GPT instructions, Claude Project instructions, or &lt;code&gt;.cursorrules&lt;/code&gt; file:&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9216/systematising-intuition-how-to-code-seniority-into-an-ai</guid>
<pubDate>Sun, 04 Jan 2026 01:16:03 +0000</pubDate>
</item>
<item>
<title>The 3-Check System That Stops AI Hallucinations in Workflows</title>
<link>https://coderlegion.com/9178/the-3-check-system-that-stops-ai-hallucinations-in-workflows</link>
<description>&lt;p&gt;As the Founder of ReThynk AI, I’ve learned one uncomfortable truth:&lt;/p&gt;
&lt;p&gt;Hallucinations don’t happen because AI is “bad.”&lt;br&gt;
They happen because the workflow has no verification layer.&lt;/p&gt;
&lt;p&gt;If I treat AI like an oracle, I get surprises.&lt;br&gt;
If I treat AI like a fast assistant with checks, I get reliability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The 3-Check System That Stops AI Hallucinations in Workflows&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI hallucinations are not just wrong facts.&lt;br&gt;
They show up in many forms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;confident but incorrect explanations&lt;/li&gt;
&lt;li&gt;made-up function names or APIs&lt;/li&gt;
&lt;li&gt;fake citations or features&lt;/li&gt;
&lt;li&gt;invented numbers&lt;/li&gt;
&lt;li&gt;assumptions presented as truth&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the scary part is: it often sounds correct.&lt;/p&gt;
&lt;p&gt;So I don’t fight hallucinations with better prompts alone.&lt;br&gt;
I fight them with a system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check 1: Source Check (Where did this come from?)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before I trust any claim, I force the AI to label it.&lt;/p&gt;
&lt;p&gt;I make it separate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Known from provided context&lt;/li&gt;
&lt;li&gt;Derived inference&lt;/li&gt;
&lt;li&gt;Unverified assumption&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because most hallucinations hide inside “assumptions pretending to be facts.”&lt;/p&gt;
&lt;p&gt;Rule I follow:&lt;br&gt;
If the AI cannot tell me where a claim came from, the claim is not allowed into the workflow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check 2: Constraint Check (Does this violate reality?)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most errors are not “wrong facts.”&lt;br&gt;
They are wrong fit.&lt;/p&gt;
&lt;p&gt;So I check alignment against constraints like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;product requirements&lt;/li&gt;
&lt;li&gt;business rules&lt;/li&gt;
&lt;li&gt;technical limitations&lt;/li&gt;
&lt;li&gt;time, cost, scope&lt;/li&gt;
&lt;li&gt;security/compliance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hallucinations collapse quickly when they meet constraints.&lt;/p&gt;
&lt;p&gt;Rule I follow:&lt;br&gt;
If the output doesn’t explicitly satisfy constraints, it’s not shippable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check 3: Proof Check (Can it be tested or verified?)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the final filter.&lt;/p&gt;
&lt;p&gt;I force the AI to provide verification, not confidence.&lt;/p&gt;
&lt;p&gt;Depending on the task, proof can be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a test case&lt;/li&gt;
&lt;li&gt;a reproducible example&lt;/li&gt;
&lt;li&gt;a reference link (if browsing is allowed)&lt;/li&gt;
&lt;li&gt;a calculation&lt;/li&gt;
&lt;li&gt;a quick experiment plan&lt;/li&gt;
&lt;li&gt;a cross-check against another method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rule I follow:&lt;br&gt;
If it can’t be verified, it can’t be treated as final, only as a draft.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Leadership Insight&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the AI era, the winning teams won’t be the ones with the best prompts.&lt;/p&gt;
&lt;p&gt;They’ll be the ones with the best verification culture.&lt;/p&gt;
&lt;p&gt;Because trust is built on repeatability, not hope.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9178/the-3-check-system-that-stops-ai-hallucinations-in-workflows</guid>
<pubDate>Fri, 02 Jan 2026 01:53:20 +0000</pubDate>
</item>
<item>
<title>Speed Is Overrated: Clarity Is the Real Competitive Advantage</title>
<link>https://coderlegion.com/9119/speed-is-overrated-clarity-is-the-real-competitive-advantage</link>
<description>&lt;p&gt;Speed has become a status symbol in tech.&lt;/p&gt;
&lt;p&gt;Fast shipping.&lt;br&gt;
Rapid iteration.&lt;br&gt;
Quick pivots.&lt;br&gt;
Short cycles.&lt;/p&gt;
&lt;p&gt;From the outside, it looks like momentum.&lt;/p&gt;
&lt;p&gt;From the inside, it often feels like noise.&lt;/p&gt;
&lt;p&gt;After watching teams build, scale, and sometimes collapse under the pressure to move faster, one pattern keeps repeating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Speed creates activity.&lt;/li&gt;
&lt;li&gt;Clarity creates advantage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the two are not the same.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Speed Became the Default Metric&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Speed is easy to measure.&lt;/p&gt;
&lt;p&gt;You can count:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;releases&lt;/li&gt;
&lt;li&gt;deployments&lt;/li&gt;
&lt;li&gt;features shipped&lt;/li&gt;
&lt;li&gt;experiments run&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It gives leaders something tangible to point at.&lt;/p&gt;
&lt;p&gt;Clarity is harder to quantify.&lt;br&gt;
It shows up indirectly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;in fewer reversals&lt;/li&gt;
&lt;li&gt;in consistent decisions&lt;/li&gt;
&lt;li&gt;in aligned teams&lt;/li&gt;
&lt;li&gt;in calmer execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because clarity is subtle, many organisations undervalue it.&lt;/p&gt;
&lt;p&gt;That’s a mistake.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Speed Without Clarity Multiplies Confusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When teams move fast without shared understanding, several things happen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;decisions contradict each other&lt;/li&gt;
&lt;li&gt;features drift away from real needs&lt;/li&gt;
&lt;li&gt;priorities change weekly&lt;/li&gt;
&lt;li&gt;context gets lost&lt;/li&gt;
&lt;li&gt;trust erodes quietly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;People stay busy. Progress slows.&lt;/p&gt;
&lt;p&gt;This is why some fast-moving teams feel strangely stuck.&lt;/p&gt;
&lt;p&gt;They’re running, but not in the same direction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clarity Changes How Speed Is Used&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Clarity doesn’t eliminate speed.&lt;br&gt;
It focuses it.&lt;/p&gt;
&lt;p&gt;In teams with high clarity:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fewer decisions need debate&lt;/li&gt;
&lt;li&gt;trade-offs are understood&lt;/li&gt;
&lt;li&gt;priorities are stable&lt;/li&gt;
&lt;li&gt;execution feels lighter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Speed becomes a tool, not a reflex.&lt;/p&gt;
&lt;p&gt;The team doesn’t rush everything.&lt;br&gt;
It moves quickly only where it matters.&lt;/p&gt;
&lt;p&gt;That selectivity is where the advantage lives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Makes This Distinction Impossible to Ignore&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI dramatically increases execution speed.&lt;/p&gt;
&lt;p&gt;Ideas become prototypes quickly.&lt;br&gt;
Changes propagate instantly.&lt;br&gt;
Decisions can be automated.&lt;/p&gt;
&lt;p&gt;Without clarity, AI amplifies chaos.&lt;/p&gt;
&lt;p&gt;With clarity, AI amplifies leverage.&lt;/p&gt;
&lt;p&gt;This is why AI-first teams that lack clarity:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ship impressive demos&lt;/li&gt;
&lt;li&gt;struggle with adoption&lt;/li&gt;
&lt;li&gt;accumulate hidden risk&lt;/li&gt;
&lt;li&gt;lose user trust&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI doesn’t reward motion.&lt;br&gt;
It rewards direction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Hidden Cost of “Move Fast” Cultures&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;“Move fast” sounds empowering.&lt;/p&gt;
&lt;p&gt;But when it’s not grounded in clarity, it creates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;decision fatigue&lt;/li&gt;
&lt;li&gt;constant rework&lt;/li&gt;
&lt;li&gt;shallow thinking&lt;/li&gt;
&lt;li&gt;reactive leadership&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;People stop asking:&lt;br&gt;
“Is this the right thing to do?”&lt;/p&gt;
&lt;p&gt;And start asking:&lt;br&gt;
“How fast can we do something?”&lt;/p&gt;
&lt;p&gt;That shift is subtle and damaging.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clarity Starts With Fewer, Better Questions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;High-clarity teams don’t have more answers.&lt;br&gt;
They have better questions.&lt;/p&gt;
&lt;p&gt;They ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What problem are we actually solving?&lt;/li&gt;
&lt;li&gt;What does success look like in practice?&lt;/li&gt;
&lt;li&gt;What trade-offs are we accepting?&lt;/li&gt;
&lt;li&gt;What will we not do right now?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These questions slow things down briefly.&lt;br&gt;
They speed everything up afterward.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Leaders Often Undervalue Clarity&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Clarity feels invisible when it’s present.&lt;/p&gt;
&lt;p&gt;You notice it only when it’s gone.&lt;/p&gt;
&lt;p&gt;Leaders under pressure often default to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;urgency&lt;/li&gt;
&lt;li&gt;action&lt;/li&gt;
&lt;li&gt;visible progress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Clarity requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;pauses&lt;/li&gt;
&lt;li&gt;alignment&lt;/li&gt;
&lt;li&gt;explanation&lt;/li&gt;
&lt;li&gt;repetition&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That doesn’t always look impressive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clarity Scales. Speed Alone Does Not.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Small teams can survive on speed.&lt;/p&gt;
&lt;p&gt;Large systems can’t.&lt;/p&gt;
&lt;p&gt;As organisations grow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;communication cost increases&lt;/li&gt;
&lt;li&gt;dependencies multiply&lt;/li&gt;
&lt;li&gt;mistakes become expensive&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Speed without clarity creates fragility.&lt;/p&gt;
&lt;p&gt;Clarity creates resilience.&lt;/p&gt;
&lt;p&gt;That’s why the strongest organisations don’t feel rushed, even when they’re moving quickly.&lt;/p&gt;
&lt;p&gt;But it compounds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Competitive Advantage No One Advertises&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Companies rarely say:&lt;br&gt;
“We win because we’re clear.”&lt;/p&gt;
&lt;p&gt;They say:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“We innovate faster.”&lt;/li&gt;
&lt;li&gt;“We execute better.”&lt;/li&gt;
&lt;li&gt;“We move quickly.”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But under the surface, clarity is doing the work.&lt;/p&gt;
&lt;p&gt;It aligns decisions.&lt;br&gt;
It reduces friction.&lt;br&gt;
It preserves trust.&lt;br&gt;
It makes speed sustainable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Real Takeaway&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Speed is useful.&lt;br&gt;
But it’s not rare anymore.&lt;/p&gt;
&lt;p&gt;Clarity is.&lt;/p&gt;
&lt;p&gt;In a world where everyone can move fast, especially with AI, the real advantage belongs to those who know where to move, why they’re moving, and what they’re willing to ignore.&lt;/p&gt;
&lt;p&gt;That’s not a productivity trick.&lt;br&gt;
That’s leadership.&lt;/p&gt;
&lt;p&gt;And in the long run, clarity doesn’t just outperform speed.&lt;/p&gt;
&lt;p&gt;It makes speed possible without burning everything down.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9119/speed-is-overrated-clarity-is-the-real-competitive-advantage</guid>
<pubDate>Wed, 31 Dec 2025 05:30:10 +0000</pubDate>
</item>
<item>
<title>The Real Prompt is the System: Building Repeatable AI Workflows</title>
<link>https://coderlegion.com/9010/the-real-prompt-is-the-system-building-repeatable-ai-workflows</link>
<description>&lt;p&gt;As the Founder of ReThynk AI, I’ve reached a point where I almost never chase the “perfect prompt.”&lt;/p&gt;
&lt;p&gt;Because I learned something that changed how I work:&lt;/p&gt;
&lt;p&gt;The real prompt is the system.&lt;/p&gt;
&lt;p&gt;A single prompt can give me a good answer once.&lt;br&gt;
A system gives me good answers every time, even when I’m tired, busy, or switching projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Real Prompt is the System: Building Repeatable AI Workflows&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most people use AI like a vending machine:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;insert prompt&lt;/li&gt;
&lt;li&gt;get output&lt;/li&gt;
&lt;li&gt;move on&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That works for small tasks.&lt;/p&gt;
&lt;p&gt;But if I want real leverage, content at scale, consistent engineering output, and reliable business execution, then “prompting” becomes a weak foundation.&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;Because prompts are one-time instructions. Systems are repeatable machines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why “Good Prompts” Don’t Compound&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here’s what happens when I rely on prompts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;each task starts from scratch&lt;/li&gt;
&lt;li&gt;quality swings depending on how I phrase things&lt;/li&gt;
&lt;li&gt;output changes across sessions&lt;/li&gt;
&lt;li&gt;results vary between team members&lt;/li&gt;
&lt;li&gt;I keep rewriting and re-explaining&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is not scalability.&lt;/p&gt;
&lt;p&gt;That is human effort disguised as automation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What I Mean by “System”&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A system is not a tool.&lt;/p&gt;
&lt;p&gt;A system is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inputs → Process → Quality Gates → Output → Storage → Improvement&lt;br&gt;
Loop&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s it.&lt;/p&gt;
&lt;p&gt;If I build this once, AI becomes a dependable operating layer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The 6-Part Framework I Use (Every Time)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whenever I want a repeatable AI workflow, I build these six parts:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1) Inputs (what I feed the AI)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is where most people are lazy.&lt;/p&gt;
&lt;p&gt;Inputs should include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;objective&lt;/li&gt;
&lt;li&gt;audience/user&lt;/li&gt;
&lt;li&gt;constraints&lt;/li&gt;
&lt;li&gt;examples&lt;/li&gt;
&lt;li&gt;context pack (if available)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;2) Process (the steps AI must follow)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of “do the thing,” I force stages like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clarify&lt;/li&gt;
&lt;li&gt;propose options&lt;/li&gt;
&lt;li&gt;outline&lt;/li&gt;
&lt;li&gt;draft&lt;/li&gt;
&lt;li&gt;refine&lt;/li&gt;
&lt;li&gt;finalise&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;3) Quality Gates (how I validate)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is non-negotiable.&lt;/p&gt;
&lt;p&gt;AI must check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clarity&lt;/li&gt;
&lt;li&gt;completeness&lt;/li&gt;
&lt;li&gt;correctness&lt;/li&gt;
&lt;li&gt;edge cases&lt;/li&gt;
&lt;li&gt;style standards&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;4) Output Format (what it should look like)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;structure&lt;/li&gt;
&lt;li&gt;headers&lt;/li&gt;
&lt;li&gt;bullet style&lt;/li&gt;
&lt;li&gt;code blocks&lt;/li&gt;
&lt;li&gt;templates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;5) Storage (where it lives)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A workflow is useless if it disappears.&lt;/p&gt;
&lt;p&gt;I store:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the context pack&lt;/li&gt;
&lt;li&gt;the workflow prompts&lt;/li&gt;
&lt;li&gt;the checklist&lt;/li&gt;
&lt;li&gt;best examples&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;6) Improvement Loop (how it gets better weekly)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After each use, I ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;what failed?&lt;/li&gt;
&lt;li&gt;what repeated?&lt;/li&gt;
&lt;li&gt;what should be added to the system?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then I update the workflow.&lt;/p&gt;
&lt;p&gt;This is a compounding advantage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Real Example: My Repeatable Article Workflow&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“Write an article about X”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I run this system:&lt;/p&gt;
&lt;p&gt;Input Pack&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;audience: developers/builders&lt;/li&gt;
&lt;li&gt;tone: authoritative, human, direct&lt;/li&gt;
&lt;li&gt;structure: hook → insight → example → framework → CTA&lt;/li&gt;
&lt;li&gt;constraints: no fluff, no generic advice&lt;/li&gt;
&lt;li&gt;goal: trigger discussion + practical learning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Process&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;suggest 5 angles&lt;/li&gt;
&lt;li&gt;pick best angle + headline options&lt;/li&gt;
&lt;li&gt;write outline&lt;/li&gt;
&lt;li&gt;draft with one real example&lt;/li&gt;
&lt;li&gt;tighten + remove fluff&lt;/li&gt;
&lt;li&gt;add challenge question&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Quality Gate Checklist&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one-sentence takeaway?&lt;/li&gt;
&lt;li&gt;real example included?&lt;/li&gt;
&lt;li&gt;framework reusable?&lt;/li&gt;
&lt;li&gt;any vague lines removed?&lt;/li&gt;
&lt;li&gt;does it sound like me?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Output Pack&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;final article&lt;/li&gt;
&lt;li&gt;5 headline variants&lt;/li&gt;
&lt;li&gt;3 short summaries&lt;/li&gt;
&lt;li&gt;1 discussion question&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now publishing becomes predictable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Real Example: My Repeatable Engineering Workflow&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“Write the code for this feature”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I run:&lt;/p&gt;
&lt;p&gt;Process&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clarify requirements&lt;/li&gt;
&lt;li&gt;propose architecture options + trade-offs&lt;/li&gt;
&lt;li&gt;list edge cases + failure modes&lt;/li&gt;
&lt;li&gt;write a step-by-step implementation plan&lt;/li&gt;
&lt;li&gt;generate code + tests&lt;/li&gt;
&lt;li&gt;add observability + rollback notes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Quality Gates&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;security pass&lt;/li&gt;
&lt;li&gt;test pass&lt;/li&gt;
&lt;li&gt;performance considerations&lt;/li&gt;
&lt;li&gt;review checklist&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s how I stop “fine output” from becoming production failures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Key Insight&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When people say, “AI is inconsistent.”&lt;/p&gt;
&lt;p&gt;Most times, the truth is: their workflow is inconsistent.&lt;/p&gt;
&lt;p&gt;AI reflects the system I bring.&lt;/p&gt;
&lt;p&gt;If the system is strong, the output becomes strong.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9010/the-real-prompt-is-the-system-building-repeatable-ai-workflows</guid>
<pubDate>Sun, 28 Dec 2025 12:51:17 +0000</pubDate>
</item>
</channel>
</rss>