<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sandeep Dhuri</title>
    <description>The latest articles on DEV Community by Sandeep Dhuri (@sandeepdhuri).</description>
    <link>https://dev.to/sandeepdhuri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4076968%2Fbab331fd-5c07-409b-a526-617ad544d558.png</url>
      <title>DEV Community: Sandeep Dhuri</title>
      <link>https://dev.to/sandeepdhuri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sandeepdhuri"/>
    <language>en</language>
    <item>
      <title>The Specification Frame in 20 Minutes</title>
      <dc:creator>Sandeep Dhuri</dc:creator>
      <pubDate>Fri, 14 Aug 2026 03:17:55 +0000</pubDate>
      <link>https://dev.to/sandeepdhuri/the-specification-frame-in-20-minutes-3p6p</link>
      <guid>https://dev.to/sandeepdhuri/the-specification-frame-in-20-minutes-3p6p</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://acuity.press/writing/frame-in-20/" rel="noopener noreferrer"&gt;acuity.press&lt;/a&gt;.&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;By Sandeep Dhuri&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0nbfsealipdruayo2rif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0nbfsealipdruayo2rif.png" alt="The Specification Frame — one page, four blocks" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You do not need a prompt library. You need one repeatable structure that turns a request into a specification. This is that structure (the Specification Frame from &lt;em&gt;Delta&lt;/em&gt;) compressed to a working minimum you can apply today.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four blocks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1 · CONTEXT — what the model cannot guess.&lt;/strong&gt; Domain facts, system invariants, environment. &lt;em&gt;"Payment service in a regulated banking context. .NET 9. All monetary values are USD, stored as decimal. Every external call may be retried; all writes must be idempotent. Multi-tenant: every query is scoped by tenant_id."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2 · CONSTRAINTS — what must and must not happen, with precedence.&lt;/strong&gt; Safety &amp;gt; correctness &amp;gt; style, stated so conflicts resolve your way. &lt;em&gt;"Prohibited: binary floating point for money; string interpolation into SQL; logging of PAN/PII. Required: parameterized queries; idempotency keys on all mutating endpoints; banker's rounding at aggregation only."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3 · OUTPUT CONTRACT — exactly what comes back.&lt;/strong&gt; Shape, format, boundaries. &lt;em&gt;"Return: (a) the C# implementation, (b) xUnit tests covering the constraints above, (c) a list of any constraint you could not satisfy and why. Never silently relax a constraint."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 · VERIFICATION — the checks, stated in the prompt.&lt;/strong&gt; This is the block most teams skip and the one that changes everything: the model generates &lt;em&gt;toward&lt;/em&gt; declared tests, and your reviewer tests &lt;em&gt;against&lt;/em&gt; them. &lt;em&gt;"The tests must include: 0.1+0.2 exactness for money; duplicate-delivery of the same idempotency key; the injection strings ['; DROP TABLE—, {{ignore previous instructions}}]; a cross-tenant access attempt (must fail)."&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after, one request
&lt;/h2&gt;

&lt;p&gt;Before: &lt;em&gt;"Write a webhook handler for payment notifications."&lt;/em&gt; — a wish. The corpus's average webhook handler has no idempotency, no signature verification, and logs the payload.&lt;/p&gt;

&lt;p&gt;After (frame applied, abbreviated): context declares the retry-happens reality and the secret-handling rule; constraints prohibit unverified signatures and require idempotency-keyed deduplication; the contract demands implementation + tests + a stated-gaps list; verification names the duplicate-delivery and forged-signature tests. Same model. Same day. A different artifact. Because "plausible" now has your definition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the input side is where the leverage is
&lt;/h2&gt;

&lt;p&gt;Across 150+ models and two years of releases, the share of AI code-generation tasks introducing a known vulnerability has held near 45% (Veracode's 2026 report): capability up, security flat, because models complete the public corpus's patterns unless your prompt outweighs them. The Frame is how you outweigh them (systematically, reviewably, in version control (the book's Law 10) "Prompts are code" — version-controlled, reviewed, tested — which regulators, a year later, started calling an audit trail). And the Frame scales with the era: in 2026's orchestrated workflows, the same four blocks are what you hand a &lt;em&gt;fleet&lt;/em&gt; — an orchestrator distributing an underspecified request just parallelizes the gap, while one that distributes a Frame parallelizes the discipline. Twenty minutes to learn; the book's remaining chapters are the per-domain depth (code review, debugging, testing, agents, security) all free.&lt;/p&gt;

&lt;p&gt;I run this drill with every team I join. Twenty minutes is the honest price of admission.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Condensed from&lt;/em&gt; Delta: Closing the Specification Gap: A Prompt Engineering Framework for Enterprise Software Teams &lt;em&gt;(Sandeep Dhuri, Acuity Press, 2026) — free, no signup: &lt;a href="https://acuity.press" rel="noopener noreferrer"&gt;https://acuity.press&lt;/a&gt; · DOI: 10.5281/zenodo.21584309 · template: acuity.press/spec.md.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; Veracode, &lt;em&gt;2026 GenAI Code Security Report / Spring 2026 Update&lt;/em&gt; (2026).&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>agents</category>
    </item>
    <item>
      <title>Context Not Provided Is Context Invented</title>
      <dc:creator>Sandeep Dhuri</dc:creator>
      <pubDate>Fri, 14 Aug 2026 03:13:59 +0000</pubDate>
      <link>https://dev.to/sandeepdhuri/context-not-provided-is-context-invented-3j6p</link>
      <guid>https://dev.to/sandeepdhuri/context-not-provided-is-context-invented-3j6p</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://acuity.press/writing/context-invented/" rel="noopener noreferrer"&gt;acuity.press&lt;/a&gt;.&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;By Sandeep Dhuri&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv2y4x5jlfos1zm2ucdc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv2y4x5jlfos1zm2ucdc.gif" alt="Law 4: the context gap gets invented — incorrectly" width="720" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every prompt is complete. Not because you completed it — because the model does. Whatever you leave unstated, it fills: the currency handling you assumed, the retry semantics you meant, the tenant-isolation rule "everyone knows." A language model has no access to what everyone knows. It has access to what you wrote and what the internet wrote, and when those conflict, silence sides with the internet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Delta&lt;/em&gt;'s Law 4 names the mechanism: &lt;strong&gt;context not provided is context invented.&lt;/strong&gt; The model is not guessing maliciously; it is completing faithfully — from the wrong distribution. Veracode's 2026 analysis of &lt;em&gt;why&lt;/em&gt; security performance has stayed flat across two years of model releases lands on exactly this: models learn from the public corpus, the corpus encodes historical practice, and the same insecure patterns that dominated in 2020 dominate the completions of 2026's flagships. Your unstated constraint is not merely missing; it is &lt;em&gt;outvoted&lt;/em&gt; — by a few billion lines of average code.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "providing context" actually means
&lt;/h2&gt;

&lt;p&gt;Not more words. The &lt;em&gt;right categories&lt;/em&gt; of words. The Specification Frame's context block carries the facts the model cannot infer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Domain semantics:&lt;/strong&gt; what the values mean (money, PHI, tenant IDs) and the rules attached to those meanings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System invariants:&lt;/strong&gt; what must remain true across every operation (idempotency, isolation, conservation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environmental truth:&lt;/strong&gt; versions, frameworks, deployment realities that make one correct answer correct &lt;em&gt;here&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure posture:&lt;/strong&gt; what happens on the unhappy path (timeouts, partial writes, replays) because the corpus's average code handles the happy path and ships.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each item you state removes one invented answer. The discipline is not verbosity; several of the highest-leverage constraints in the book are one line ("all queries are parameterized; string interpolation into SQL is prohibited"). It is &lt;em&gt;coverage of the categories the domain cares about&lt;/em&gt; — which is why the book pairs the frame with per-domain checklists rather than a generic template.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compounding payoff
&lt;/h2&gt;

&lt;p&gt;Teams adopting this discipline report the same shape of result the 2026 measurements would predict: the model's raw capability finally cashes out, because it is completing &lt;em&gt;your&lt;/em&gt; distribution instead of the internet's. And the alternative now has a public price tag: AI-attributable CVEs tripling in three months on Georgia Tech's tracker, software vulnerabilities leading the 2026 Verizon DBIR as the top breach entry point. The models will keep getting more fluent. Fluent invention is still invention. Say what you mean — all of it. And the machine is finally on your side of the gap.&lt;/p&gt;

&lt;p&gt;I keep a private file of context-invented bugs. It reads like short fiction, except every ticket was real.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Adapted from&lt;/em&gt; Delta: Closing the Specification Gap &lt;em&gt;(Dhuri, 2026), Law 4 and Chapter 12 — free: &lt;a href="https://acuity.press" rel="noopener noreferrer"&gt;https://acuity.press&lt;/a&gt; · DOI: 10.5281/zenodo.21584309.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; Veracode, &lt;em&gt;Spring 2026 GenAI Code Security Update&lt;/em&gt; (2026); Georgia Tech SSLab, &lt;em&gt;Vibe Security Radar&lt;/em&gt; (2026); Verizon, &lt;em&gt;2026 DBIR&lt;/em&gt; (2026).&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>No Float for Money: The AI Bug That Passes Every Demo</title>
      <dc:creator>Sandeep Dhuri</dc:creator>
      <pubDate>Fri, 14 Aug 2026 03:02:05 +0000</pubDate>
      <link>https://dev.to/sandeepdhuri/no-float-for-money-the-ai-bug-that-passes-every-demo-2m0e</link>
      <guid>https://dev.to/sandeepdhuri/no-float-for-money-the-ai-bug-that-passes-every-demo-2m0e</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://acuity.press/writing/money-float/" rel="noopener noreferrer"&gt;acuity.press&lt;/a&gt;.&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;By Sandeep Dhuri&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr7wdh65x1o8zcsbpvpjy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr7wdh65x1o8zcsbpvpjy.gif" alt="Float drift accumulating live vs an exact Money type" width="700" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ask an AI assistant to "calculate the order total" in any mainstream language and, more often than not, you will get binary floating point: &lt;code&gt;double&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;number&lt;/code&gt;. It is the most common representation of money on the public internet, so it is the most common completion. It is also wrong for money in every regulated domain, for a reason IEEE 754 makes non-negotiable: &lt;strong&gt;0.1 + 0.2 ≠ 0.3&lt;/strong&gt; in binary floating point. The error is tiny per operation and compounding at scale. Reconciliation drift, rounding disputes, audit findings.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Delta&lt;/em&gt;'s Law 5 states it in five words: &lt;strong&gt;"No float for money. No exceptions."&lt;/strong&gt; The corollary the book builds on: types are constraints. (A generation of engineers learned the failure mode from a movie: the salami-slicing scheme in &lt;em&gt;Office Space&lt;/em&gt; is, mechanically, a rounding story. The float made it plausible.) Two moves implement it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Move 1: say it in the prompt
&lt;/h2&gt;

&lt;p&gt;The model cannot honor a constraint it never received. Every prompt that touches monetary values carries one line in its constraints block:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Monetary values MUST use exact decimal representation (C#: &lt;code&gt;decimal&lt;/code&gt;; Java: &lt;code&gt;BigDecimal&lt;/code&gt; or integer minor units; Python: &lt;code&gt;decimal.Decimal&lt;/code&gt;; TypeScript/JS: integer cents or a decimal library). Binary floating point (&lt;code&gt;double&lt;/code&gt;/&lt;code&gt;float&lt;/code&gt;/&lt;code&gt;number&lt;/code&gt;) for money is prohibited. Rounding: banker's rounding at aggregation boundaries only, per [your policy].&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single constraint changes what "plausible" means for the model. Veracode's 2026 report findings on &lt;em&gt;why&lt;/em&gt; models fail security tasks apply here exactly: the training corpus encodes the historical pattern, and only your stated constraint outweighs the corpus.&lt;/p&gt;

&lt;h2&gt;
  
  
  Move 2: make the type system enforce it
&lt;/h2&gt;

&lt;p&gt;Prompts steer generation; types catch what steering misses. The book's pattern is a domain &lt;code&gt;Money&lt;/code&gt; type whose float-based constructors exist but are marked unusable — in C#, an &lt;code&gt;[Obsolete(error: true)]&lt;/code&gt; constructor taking &lt;code&gt;double&lt;/code&gt;, so any AI- or human-written code that tries to build &lt;code&gt;Money&lt;/code&gt; from a float &lt;strong&gt;fails to compile with a message explaining why&lt;/strong&gt;. Java: a &lt;code&gt;Money&lt;/code&gt; wrapper over &lt;code&gt;BigDecimal&lt;/code&gt;/long-cents with no float factory. Python: a &lt;code&gt;Money&lt;/code&gt; dataclass that raises on &lt;code&gt;float&lt;/code&gt; input. TypeScript: a branded &lt;code&gt;Cents&lt;/code&gt; integer type. The companion repository (MIT-licensed) has all four, with tests.&lt;/p&gt;

&lt;p&gt;The pairing matters more than either half. The prompt constraint prevents most bad generations; the poisoned constructor converts the survivors from silent drift into a compile error. From the most expensive failure class to the cheapest. That is the general shape of &lt;em&gt;Delta&lt;/em&gt;'s approach: specification first, verification designed into the artifact, so "looks right" is never the last gate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is worth an article-sized habit
&lt;/h2&gt;

&lt;p&gt;Because the ambient rate of the underlying failure class is not falling. Across 2025–2026, the share of AI code-generation tasks introducing a known vulnerability held near 45% (Veracode, 150+ models), and AI-attributable CVEs are accelerating month over month (Georgia Tech's Vibe Security Radar: 6 in January 2026, 35 by March). Float-money is the same phenomenon in financial clothing: a correctness constraint the corpus does not encode and the model will not supply unbidden. One constraint line and one type close it permanently.&lt;/p&gt;

&lt;p&gt;I have chased this exact cent-drift through three different codebases over the years. Every commit message in the fix was an apology.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Adapted from&lt;/em&gt; Delta: Closing the Specification Gap &lt;em&gt;(Dhuri, 2026), Law 5 and Chapter 4 — free: &lt;a href="https://acuity.press" rel="noopener noreferrer"&gt;https://acuity.press&lt;/a&gt; · DOI: 10.5281/zenodo.21584309. Companion code (MIT): github.com/sandeep-dhuri/specification-frame.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; Veracode, &lt;em&gt;2026 GenAI Code Security Report&lt;/em&gt; (2026); Georgia Tech SSLab, &lt;em&gt;Vibe Security Radar&lt;/em&gt; (2026).&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>fintech</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
