Alchemy framework formally verifies DDD aggregate invariants and cross-instance decisions
samgoodwin89 · x · 2026-11-21
samgoodwin89 demonstrates Alchemy's formal verification for domain-driven design: aggregates declare invariants (e.g. Purse.NeverNegative: balance >= 0) that are proven never invalidated, and decisions state what must hold across all instances they write, with Alchemy proving it for every state and input. The screenshot shows a real catch: when ChargeBoth is given the same purse as both first and second, the double charge drives the balance to -1 and the vitest test flags Purse.NeverNegative: violated — self-interaction edge cases surfaced automatically.
Related event: Alchemy merges formal verification: invariants as code(7 posts)→
More from coding & agent
- Claude builds Miami-style town with 2,538 Blender assets, rendered in Unreal in 74 minutes — piotrbinkowski · 2026-11-21
- Antigravity harness restrictions spark ban-risk concerns for Gemini subscribers — jeremyphoward · 2026-11-21
- Alchemy adds Decision primitive: atomic commands across aggregates, formally verified — samgoodwin89 · 2026-11-21
- Hamel Husain and sh_reya launch O'Reilly book 'Evals for AI Engineers' — sh_reya · 2026-11-21
- End-to-end walkthrough: fine-tuning adapters for Qwen3-27B with coding harnesses like pi and opencode — mrdbourke · 2026-11-21
- Ex-games founder prototyping an elemental-bending sports anime game with AI as collaborator — trq212 · 2026-11-21