// "sum the transaction amounts" public double Total(List<Tx> t) => t.Sum(x => (double)x.Amount);
Outcome: a $2,341.17 reconciliation shortfall, compounding silently below monitoring thresholds for 23 days. Passes review. Passes tests.
// money is never a binary float public Money<USD> Total(List<Tx> t) => t.Aggregate(Money<USD>.Zero, (s,x) => s.Add(x.Amount));
Difference: one constraint sentence — "use Money<TCurrency> for all amounts; never double." Ten words.
The model was not wrong. It produced what was statistically most likely. The prompt asked for what was statistically most likely. That is the entire problem, stated precisely.
A four-element prompt structure — role, context, task, constraints — that closes the domain, context, and constraint gaps simultaneously. Read the overview →
A three-component diagnosis — domain, context, and constraint gaps — of why capable models still produce domain-incorrect code.
A six-section debugging protocol that turns "help, it's broken" into a systematic diagnosis, often before the prompt is sent.
A unified, numbered set of structural truths for enterprise AI prompting that hold regardless of which model is used.
HIPAA, PCI-DSS, GDPR, idempotency, money-types, and the AI security attack surface — applied where agents measurably struggle most: brownfield systems with undocumented conventions, not greenfield demos.
The book also includes 100+ compilable examples, 19 chapters, and 11 appendices spanning code generation, review, debugging, testing, MCP, security, and DevOps.
A BibTeX entry and the CITATION.cff file are available in the companion repository.
is the one an AI generated from a vague prompt on a quiet afternoon.
The EPUB is the recommended accessible edition (reflowable text, screen-reader friendly). Media: fact sheet.