<?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>One line of specification removed the dependency surface</title>
      <dc:creator>Sandeep Dhuri</dc:creator>
      <pubDate>Tue, 13 Oct 2026 02:22:15 +0000</pubDate>
      <link>https://dev.to/sandeepdhuri/one-line-of-specification-removed-the-dependency-surface-p1c</link>
      <guid>https://dev.to/sandeepdhuri/one-line-of-specification-removed-the-dependency-surface-p1c</guid>
      <description>&lt;p&gt;&lt;em&gt;Research note. Canonical version, with the script and result files: &lt;a href="https://acuity.press/writing/dependency-surface/" rel="noopener noreferrer"&gt;acuity.press/writing/dependency-surface&lt;/a&gt;. Script and results are also in the companion repository: &lt;a href="https://github.com/sandeep-dhuri/specification-frame/tree/v1.1.1/analysis/dependencies" rel="noopener noreferrer"&gt;specification-frame v1.1.1, analysis/dependencies&lt;/a&gt;. Sandeep Dhuri, Independent Researcher, NJ, USA. ORCID 0009-0008-1829-2431. Checked 29 September 2026, re-checked 6 October 2026. CC BY 4.0.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Hallucinated package names are a supply-chain risk: a model invents a plausible import, an attacker registers that name, the next developer or agent installs it. Published measurements put the hallucination rate between 4.6 and 6.1 percent on 2026 frontier models for Python and JavaScript. One set of 127 names was invented identically by all five models tested [1]. Every study so far covers PyPI and npm.&lt;/p&gt;

&lt;p&gt;We re-read the 500 outputs of our pre-registered study [2]. That study covered 50 backend tasks in money, time, idempotency and access, five models, each task generated once plain and once with a one-page specification. We asked two questions. Did any output import a package that does not exist? And did the specification change what the models imported?&lt;/p&gt;

&lt;h2&gt;
  
  
  Method
&lt;/h2&gt;

&lt;p&gt;Imports were extracted from all 500 Python files with the &lt;code&gt;ast&lt;/code&gt; module. Where a file did not parse as pure Python (389 files carry surrounding prose), a line-level pattern was used instead. Import names were mapped to distribution names where they differ: &lt;code&gt;confluent_kafka&lt;/code&gt; to confluent-kafka, &lt;code&gt;flask_sqlalchemy&lt;/code&gt; to Flask-SQLAlchemy, &lt;code&gt;kafka&lt;/code&gt; to kafka-python, &lt;code&gt;flask_login&lt;/code&gt; to Flask-Login. Each distribution was then checked against the PyPI JSON API on 29 September 2026, and again on 6 October 2026 with the same result. The script and the two result files are published with the canonical note.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;Seventeen distinct third-party import names appear across the 500 outputs: flask, fastapi, uvicorn, werkzeug, pydantic, requests, pika, confluent_kafka, flask_sqlalchemy, starlette, kafka, stripe, flask_login, bcrypt, boto3, botocore and psycopg. All seventeen exist on PyPI. Hallucinated package names: zero.&lt;/p&gt;

&lt;p&gt;The second question produced the finding. Third-party imports appear in 65 of the 250 plain outputs and in 0 of the 250 specification outputs. The split holds for every model:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Plain outputs with third-party imports&lt;/th&gt;
&lt;th&gt;Specification outputs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;claude-sonnet-5&lt;/td&gt;
&lt;td&gt;16 of 50&lt;/td&gt;
&lt;td&gt;0 of 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deepseek-v4-pro&lt;/td&gt;
&lt;td&gt;14 of 50&lt;/td&gt;
&lt;td&gt;0 of 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gemini-3.1-pro-preview&lt;/td&gt;
&lt;td&gt;13 of 50&lt;/td&gt;
&lt;td&gt;0 of 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;qwen3.8-27b&lt;/td&gt;
&lt;td&gt;9 of 50&lt;/td&gt;
&lt;td&gt;0 of 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gpt-5.6-sol&lt;/td&gt;
&lt;td&gt;13 of 50&lt;/td&gt;
&lt;td&gt;0 of 50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The specification contains one relevant line: "Stack: Python 3.12, standard library only unless the task says otherwise." No task said otherwise. The line held in 250 of 250 outputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does and does not show
&lt;/h2&gt;

&lt;p&gt;It shows that a stated dependency constraint, written as a requirement, was followed by five models at the first turn without exception. It removed the entire third-party dependency surface from the generated code. Where there is no third-party import there is nothing to slopsquat.&lt;/p&gt;

&lt;p&gt;It does not show that these models hallucinate less than others. Our tasks were designed to be solvable with the standard library. The plain outputs therefore reached for common, well-known packages (a web framework, an HTTP client, a queue client) rather than obscure ones. Zero hallucinations in 17 names is consistent with the published rates given the sample, not evidence against them. It also does not show what happens in Java or C#, where dependency coordinates are richer and where no measurement exists.&lt;/p&gt;

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

&lt;p&gt;A pre-registered study of dependency hallucination in Java (Maven Central) and C# (NuGet), the two ecosystems that run most regulated back-office systems and the two nobody has measured. The design will use dependency-heavy tasks, the same five vendors, and a resolver that checks every declared coordinate against the registries. The hypothesis carried over from this note: a one-line dependency constraint cuts the surface to zero there too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Script and results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://acuity.press/files/dependencies/check_dependencies.py" rel="noopener noreferrer"&gt;check_dependencies.py&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://acuity.press/files/dependencies/imports.json" rel="noopener noreferrer"&gt;imports.json&lt;/a&gt; (third-party imports per file)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://acuity.press/files/dependencies/pypi_check.json" rel="noopener noreferrer"&gt;pypi_check.json&lt;/a&gt; (registry result)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://acuity.press/data/" rel="noopener noreferrer"&gt;The dataset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;[1] The Range Shrinks, the Threat Remains: Re-evaluating LLM Package Hallucinations on the 2026 Frontier-Model Cohort, &lt;a href="https://arxiv.org/abs/2605.17062" rel="noopener noreferrer"&gt;arXiv:2605.17062&lt;/a&gt;, 2026.&lt;/p&gt;

&lt;p&gt;[2] S. Dhuri, Specification Before Generation: A Pre-Registered, Five-Model Paired Evaluation of a Specification Frame for LLM-Generated Code in Money, Time, Idempotency, and Access Tasks, &lt;a href="https://arxiv.org/abs/2609.23270" rel="noopener noreferrer"&gt;arXiv:2609.23270&lt;/a&gt;, 2026. Dataset: &lt;a href="https://doi.org/10.5281/zenodo.22598204" rel="noopener noreferrer"&gt;doi:10.5281/zenodo.22598204&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <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>
