Δ Delta
Read Online · Appendix E

Domain Prompt Templates

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.

E Domain Prompt Templates E.1 HIPAA Healthcare <domain_rules> PHI: PatientName, DOB, SSN, DiagnosisCode, MedicationList, Email, ,→ Phone. 1. @AuditLog on EVERY method accessing PHI 2. PHI NEVER in log statements — IDs only 3. @Transactional: update+audit atomic 4. Deceased patient guard before any update 5. Merged patient guard before any update </domain_rules>

E.2 PCI-DSS Financial E

Domain Prompt Templates

<domain_rules> 1. Money<T> (C#) or Money (Java) for ALL amounts. Never double/ ,→ float. 2. Card data NEVER in logs, files, or exceptions 3. All POST endpoints: idempotent via X-Idempotency-Key 4. Rounding: MidpointRounding.AwayFromZero / HALF_UP 5. Internal 4dp precision. Output 2dp via forOutput(). 6. Events dispatched AFTER database commit </domain_rules>
E.3 High-Concurrency E-Commerce <domain_rules> 1. No check-then-act: @Version (Java) / rowversion (C#) 2. Overselling is P0: InsufficientStockException NEVER swallowed 3. Optimistic locking retry: max 3, exponential backoff 4. Events: AFTER transaction commit, NEVER inside @Transactional 5. Cache TTL: exact seconds specified. No defaults. </domain_rules>

152

Cite this appendix
Dhuri, Sandeep. (2026). Delta: Closing the Specification Gap. Acuity Press. Appendix E.
DOI