MiniCTRM - Build Tutorial 522: Designing the deal model: how to tell Claude what you want
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
The tables a trade lives in - a deal header, its sides, the derived payment profile and a reference table for every name - created by migrations, a generator that regenerates the month-by-month cashflows on every save, unit tests on three deals, the deal-type rule as a method, and an ADR recording it all.
What a deal is – A deal, its sides, and the payment profile regenerated on every save; names from tables; a type's own fields in their own.
How to tell Claude what you want – Nouns, verbs and invariants; three example deals; what must never happen; say this, not that.
Plan it – The model in your words, Claude's questions, a plan, and a page a trader can read.
Build it – The tables by migration, the generator, three tested deals, and the deal-type rule as a method.
Record it and ship – An ADR for the decision, three hard rules in CLAUDE.md, and /ship.
How MiniCTRM did it – The Data Model diagram, and the loop running live on a swap ticket.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
The decision everything leans on
1 / 15What a deal is
A deal, its sides, and the payment profile
2 / 15What a deal is
Names come from tables, and a type's own fields get their own
3 / 15How to tell Claude what you want
Nouns, verbs, invariants - and three deals
4 / 15Plan it
Plan it, questions first
5 / 15Plan it
Explain it to a trader
6 / 15Build it
The tables, by migration
7 / 15Build it
The generator
8 / 15Build it
Three deals, three tests
9 / 15Build it
A rule about a deal type is a method
10 / 15Record it and ship
The decision, recorded
11 / 15Record it and ship
Ship it
12 / 15How MiniCTRM did it
The deal model, drawn
13 / 15How MiniCTRM did it
The loop, live
14 / 15What you have now
What you have now
15 / 15
You have finished lesson 522, Designing the deal model: how to tell Claude what you want.