MiniCTRMSearch

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.

Before you start

The lessons this one builds on: 514 Choosing the database: SQLite first, PostgreSQL later; migrations only, 521 The repository and CLAUDE.md: rules, plans, ADRs, settings, skills and hooks.

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 / 15
The decision everything leans on
What a deal is

A deal, its sides, and the payment profile

2 / 15
A deal, its sides, and the payment profile
What a deal is

Names come from tables, and a type's own fields get their own

3 / 15
Names come from tables, and a type's own fields get their own
How to tell Claude what you want

Nouns, verbs, invariants - and three deals

4 / 15
Nouns, verbs, invariants - and three deals
Plan it

Plan it, questions first

5 / 15
Plan it, questions first
Plan it

Explain it to a trader

6 / 15
Explain it to a trader
Build it

The tables, by migration

7 / 15
The tables, by migration
Build it

The generator

8 / 15
The generator
Build it

Three deals, three tests

9 / 15
Three deals, three tests
Build it

A rule about a deal type is a method

10 / 15
A rule about a deal type is a method
Record it and ship

The decision, recorded

11 / 15
The decision, recorded
Record it and ship

Ship it

12 / 15
Ship it
How MiniCTRM did it

The deal model, drawn

13 / 15
The deal model, drawn
How MiniCTRM did it

The loop, live

14 / 15
The loop, live
What you have now

What you have now

15 / 15
What you have now

You have finished lesson 522, Designing the deal model: how to tell Claude what you want.

Where next?

← → move · N notes · Home / End