Read in Thunder · Semantic Zoom
Start with the Big Picture. Go as deep as you need.
Pick an example, or edit the code. Every program reads at the same five levels: Big Picture (what it is and can do), Flow (how it goes), Details (exactly what happens, and how sure Thunder is), Text (the same meaning in words), and Original (the code that proves it). All five come from one reading by the Thunder compiler, with no AI.
Big Picture: What is it, and what can it do? The Things, what each knows and can do, its doors (actions), its rules, and its data. For one action or rule: what you give it, what you get back, and what it uses.
A Thing
Library
Lends books to students and takes them back.
It knows
- books: a list, empty at first
- max books: a number, 3 unless told otherwise
It can
Data: choices
Status
- on shelf
- borrowed
- lost
Data: a record
Book
A book in the school library.
- title: words
- status: a Status, on shelf at first
- times borrowed: a number, 0 at first
Choose anything it can do to see its Flow.
Review in Thunder
Review a change by what it does, not by its diff.
Three files change: an admin job gets a secret check, a late fee's limit moves, and a function's local name changes. The compiler reads both versions and says what changed in meaning, with the before and after behind each sentence.
3 changes in meaning, 0 risks, 1 form-only. (3 files changed)
- Change in meaningPOST /api/admin/cron-generate-calibration-transcriptsserver.ts:4
Now stops with 403 Forbidden ("forbidden") when the x-admin-secret header is not the ADMIN_SECRET setting.
Before and after
Before
(nothing)
After
Is the x-admin-secret header the ADMIN_SECRET setting? No Stop: 403 Forbidden ("forbidden") - Change in meaningLate feefees.py:1
Late fee: the limit between Small fee and Big fee moved from 7 to 10 days late: Small fee now goes up to 10 (was 7).
Before and after
Run on both versions: when days late is 8, before it gave Big fee, now Small fee.
Before
No fee when the days late is at most 0 Small fee when the days late is at most 7 Big fee otherwise
After
No fee when the days late is at most 0 Small fee when the days late is at most 10 Big fee otherwise
- Change in meaningPOST /api/admin/cron-generate-calibration-transcriptsserver.ts:2
Now also takes the x-admin-secret header.
- Only the form changedSubtotalcart.ts:1
Only the form changed: only names it declares itself changed (sum is now total); the code is otherwise identical.
“Only the form changed” is said only when it is shown: the code is identical apart from spacing, comments, or names the function declares itself, or a rule gives the same answer on every edge case. When Thunder’s words read the same but the code differs, it says “changed, check”. Command line: thunder review main HEAD. In a pull request: the Thunder Review action.