Δ Delta
Read Online · Front Matter

Front Matter — Copyright & Reading Guide

From the free book Delta: Closing the Specification Gap (Dhuri, 2026). The PDF is the canonical edition — figures, tables, and code formatting are simplified online.

A PROMPT ENGINEERING FRAMEWORK DELTA Closing the Specification Gap what your domain requires Δ what the model produces .NET 9 · JAVA 21 · PYTHON · TYPESCRIPT The Ten Laws · The Specification Frame · 100+ recipes Sandeep Dhuri ACUITY PRESS DELTA Closing the Specification Gap A Prompt Engineering Framework for Enterprise Software Teams Sandeep Dhuri Acuity Press ii Copyright © 2026 Sandeep Dhuri. This work is licensed under a Creative Commons AttributionNonCommercial-NoDerivatives 4.0 International License (CC BY-NC-ND 4.0). You are free to share — copy and redistribute this book in any medium or format — for non-commercial purposes, provided you give appropriate credit to the author, include this notice, and do not modify or create derivative works from it. To view a copy of this license, visit: licenses/by-nc-nd/4.0/ https://creativecommons.org/ This book is offered free of charge. The author receives no royalties. Please download it only from official channels via https://acuity.press. First edition, 2026 Published by Sandeep Dhuri · Acuity Press ISBN: 979-8-9964807-0-8 (paperback) ISBN: 979-8-9964807-1-5 (ebook, EPUB) Printed in United States of America Disclaimer The information in this book is provided for educational and informational purposes only and reflects the author’s professional experience and research. The author and publisher have made every effort to ensure the accuracy of the content at press time but assume no responsibility for errors, omissions, or any losses or damages arising from reliance on the material. This book is not legal, financial, medical, regulatorycompliance, or other professional advice; readers operating in regulated environments (including but not limited to HIPAA, PCI-DSS, GDPR, and SOC 2 contexts) should consult qualified professionals for guidance specific to their circumstances. All code examples should be reviewed and tested in your own environment before any production use. Mentions of specific products, services, vendors, or model providers reflect the state of the field at press time; capabilities, pricing, and availability change frequently and should be verified with the relevant provider before use. The views and opinions expressed in this book are solely those of the author and do not represent the views, positions, or opinions of the author’s employer or any of its affiliates. The book was written in the author’s personal capacity; nothing in it should be attributed to, or construed as endorsed by, any current or former employer. iii Citing This Book When citing this book in academic work, articles, presentations, blog posts, or any other published form, please use the following citation format: Sandeep Dhuri. (2026). Delta: Closing the Specification Gap: A Prompt Engineering Framework for Enterprise Software Teams. Acuity Press. If referencing specific techniques, recipes, or patterns from this book, please attribute them as originating from this work. Attribution example: ”using the Specification Frame technique described by Sandeep Dhuri (2026).” Using Code Examples You may use and adapt the code examples from this book in your applications and internal documentation without permission. No permission is needed — the MIT license on the companion code covers commercial use; if the material travels somewhere interesting, a note to permissions@acuity.press is always welcome. Attribution is appreciated: // Adapted from Delta: Closing the Specification Gap by Sandeep Dhuri (2026) — acuity.press Trademarks All product names, company names, and trademarks mentioned in this book are the property of their respective owners. Specifically: Claude and Claude Code are trademarks of Anthropic PBC. GitHub, GitHub Copilot, Visual Studio, Visual Studio Code, TypeScript, Azure, EF Core, .NET, and the .NET logo are trademarks of Microsoft Corporation. Amazon Q and AWS are trademarks of Amazon Web Services, Inc. Cursor is a trademark of Anysphere Inc. Java and the Java logo are trademarks of Oracle Corporation. Spring®, Spring Boot, and the Spring logo are trademarks of Broadcom Inc. Stripe is a trademark of Stripe, Inc. Apache Kafka® and the Apache logo are trademarks of the Apache Software Foundation. PostgreSQL is a trademark of the PostgreSQL Global Development Group. Python® and the Python logo are trademarks of the Python Software Foundation. Kubernetes® is a registered trademark of the Linux Foundation. Docker® and the Docker logo are trademarks of Docker, Inc. JetBrains and IntelliJ IDEA are trademarks of JetBrains s.r.o. Flyway is a trademark of Redgate Software Ltd. Pydantic is a trademark of Pydantic Services Inc. Other brand and product names mentioned (including but not limited to Datadog, Splunk, NestJS, FastAPI, SQLAlchemy, MediatR, Mockito, JUnit, NSubstitute, xUnit, Serilog, SLF4J, Lombok, Liquibase, iv Hibernate, Maven, Gradle, NuGet, GitLab, Bitbucket, Cloudflare, Vercel, Tailscale, promptfoo, Braintrust, and LangSmith) are trademarks or registered trademarks of their respective owners. Use of these names in this book is descriptive and editorial only and does not imply any affiliation with, sponsorship by, or endorsement from their owners. Intellectual Property Note The following are original to this work: the Specification Gap (threecomponent framework), the Specification Frame (four-element XML structure), the Evidence Brief (six-section debugging protocol), the FourStage Pipeline, and the Ten Laws as a unified numbered set. The four-element prompt structure (role, context, task, constraints) builds on established conventions in the published prompt engineering literature, including the CO-STAR framework introduced by Sheila Teo (Towards Data Science, December 2023) and the RISEN framework introduced by Kyle Balmer (promptentrepreneur, 2023–2024), as well as Anthropic’s public prompting guidelines. The Specification Frame in this book specializes that structure for enterprise code generation: its XML sub-structure encoding domain types and existing interfaces, its <output_specification> element, and its integration with version-controlled prompt files are the original contributions. Full bibliographic detail for the prior-art citations appears in Appendix J. Three Laws apply well-established prior concepts: Law 5 applies the floating-point precision principle in financial computing (IEEE 754; Martin Fowler, Money pattern, 2002); Law 6 applies prompt injection concepts from the OWASP LLM Top 10 (current edition; genai.owasp.org/ llm-top-10); Law 8 applies the “prompts are code” principle widely used in the AI developer community since 2022. The numbered formulations and their application as a unified enterprise framework are original to this work. v DELTA CLOSING THE SPECIFICATION GAP A Prompt Engineering Framework for Enterprise Software Teams 100+ Examples 10 Laws 19 Chapters Hall of Shame Compilable code · .NET 9 · Java 21 · Python · TypeScript Enterprise AI Prompting 11 Appendices 10 Documented Failure Patterns Code Code Review Debugging Generation Tool Security Integration & DevOps & Database MCP Sandeep Dhuri · Tech Lead · Enterprise Software Development · Two Decades of Practice Acuity Press · 2026 For every developer who has stared at a blank prompt and typed “write me a payment service in C#.” This book is for you. And for the on-call engineers paged at 3am because the AI forgot that doubles are not money. And for those who gave the time. “The most expensive line of code you will ever write is the one an AI generates from a vague prompt on a Friday afternoon. The skill that prevents it is the one you build on purpose.” vi On Sources This book draws on three categories of source. First, the public technical literature: peer-reviewed software engineering research, vendor documentation, and the writing of practitioners who have published their experience with AI coding tools. Citations to specific papers, blog posts, and reports appear throughout, with a complete bibliography in Appendix J. Second, published post-mortem reports: regulatory disclosures, conference talks, and incident write-ups in which teams have described their AI-coding-tool failures publicly. Where a specific number, percentage, or pattern is attributed in this book, the source is named. Third, hands-on testing: the frames, laws, and core patterns in this book were developed and exercised against working code in .NET 9, Java 21, Python 3.12, and TypeScript, and the foundational implementations they rely on are published with runnable test suites in the companion repository. Where a claim about prompt effectiveness appears, an Author note will identify the basis — public literature, the author’s own experimentation, or the author’s own hands-on experimentation documented in Appendix J. The distinction matters. A book that conflates research, practice, and personal experience makes claims that are difficult to verify or extend. The convention in this book is to mark which is which. Where the marking is unclear or absent, the fault is the author’s, and corrections are welcomed in the next edition. About the Code The companion repository for this book — with implementations across C# / .NET 9, Java 21, Python 3.12, and TypeScript — is published at github.com/sandeep-dhuri/specification-frame (also reachable via acuity. press/code) alongside the book launch. The repository contains the foundational implementations the book’s recipes build on — the Money and Result types in all four languages, the secure prompt builder, the idempotent webhook handler — organized by language, plus the prompt templates and instruction-file configurations (CLAUDE.md and AGENTS.md) from Chapters 11 and 13. vii What is in the repository • Result<T> and Money<T> types in all four languages (Chapters 3 and 4, Appendix B, Appendix K) • SecurePromptBuilder structural-isolation defense (Chapter 15) • Idempotent Stripe webhook handler (Chapter 4, Recipe 2) • Prompt templates with YAML frontmatter (Chapter 11) • Instruction-file templates — CLAUDE.md and AGENTS.md (Chapter 13) • Ten Laws quick-reference card (repository docs/ folder) Where to find it The repository URL is announced at launch and maintained from the publisher landing page: acuity.press/code This page links to the current canonical repository, mirrors, and any errata. Bookmarking the publisher page rather than the underlying repository URL means your reference stays valid even if the repository moves between hosting providers or organizations. License and attribution The companion code is licensed under the MIT license: use, modify, and redistribute it in your own projects, commercial or otherwise. The license’s one condition is that the copyright and permission notice travel with copies or substantial portions of the code. Beyond that, no credit is required — but attribution helps other engineers find this material, and it is appreciated. A one-line comment works anywhere: // Adapted from Delta: Closing the Specification Gap by Sandeep Dhuri (2026) — acuity.press For formal citation, use the repository’s CITATION.cff — the “Cite this repository” button on GitHub — or the citation format on the copyright page. If the code ends up somewhere interesting, a note to permissions@acuity.press is welcome: no permission is needed, but knowing where the material travels helps the next edition. The repository is not a substitute for reading the surrounding chapter — the prose explains why each constraint matters. viii

Cite this section
Dhuri, Sandeep. (2026). Delta: Closing the Specification Gap. Acuity Press. Front Matter — Copyright & Reading Guide.
DOI