@skillstech/thunderlang 1.0.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +221 -0
  2. package/README.md +4 -1
  3. package/dist/core.cjs +2568 -462
  4. package/dist/index.cjs +7562 -5084
  5. package/dist/learn.cjs +16994 -8339
  6. package/intent-graph.schema.json +11 -0
  7. package/package.json +6 -2
  8. package/src/cli-home.mjs +242 -0
  9. package/src/cli.mjs +241 -89
  10. package/src/codegen.mjs +145 -55
  11. package/src/conformance.mjs +15 -6
  12. package/src/core/check.mjs +725 -0
  13. package/src/core/cli.mjs +184 -0
  14. package/src/core/diagnostics.mjs +82 -0
  15. package/src/core/engine-core.mjs +572 -0
  16. package/src/core/engine-values.mjs +1054 -0
  17. package/src/core/engine-worker.mjs +15 -0
  18. package/src/core/engine.mjs +63 -0
  19. package/src/core/format.mjs +20 -0
  20. package/src/core/from-python.mjs +645 -0
  21. package/src/core/index.mjs +39 -0
  22. package/src/core/lexer.mjs +115 -0
  23. package/src/core/parser.mjs +742 -0
  24. package/src/core/project.mjs +177 -0
  25. package/src/core/round-trip.mjs +150 -0
  26. package/src/core/runtime-python.mjs +801 -0
  27. package/src/core/runtime-typescript.mjs +119 -0
  28. package/src/core/target-python.mjs +487 -0
  29. package/src/core/target-typescript.mjs +466 -0
  30. package/src/core/typescript-run.mjs +114 -0
  31. package/src/core.d.ts +5 -2
  32. package/src/core.mjs +5 -2
  33. package/src/data-schema.mjs +8 -1
  34. package/src/emit.mjs +1 -1
  35. package/src/evidence.mjs +1 -1
  36. package/src/expr.mjs +81 -4
  37. package/src/form-words.mjs +2 -0
  38. package/src/index.d.ts +8 -1
  39. package/src/index.mjs +5 -1
  40. package/src/intent-schema.mjs +1 -0
  41. package/src/learn-lessons.mjs +245 -1
  42. package/src/learn.d.mts +8 -0
  43. package/src/learn.mjs +40 -4
  44. package/src/mcp.mjs +23 -0
  45. package/src/meaning.mjs +45 -6
  46. package/src/model.d.mts +7 -3
  47. package/src/model.mjs +19 -6
  48. package/src/money.d.mts +18 -0
  49. package/src/money.mjs +124 -0
  50. package/src/plain-contract.mjs +18 -2
  51. package/src/read-level.mjs +146 -0
  52. package/src/read.d.mts +11 -0
  53. package/src/read.mjs +40 -6
  54. package/src/review-comment.d.mts +16 -0
  55. package/src/review-comment.mjs +145 -0
  56. package/src/say-less.mjs +1432 -0
  57. package/src/system.mjs +153 -44
  58. package/src/target-cs.mjs +39 -34
  59. package/src/target-elixir.mjs +40 -30
  60. package/src/target-go.mjs +41 -36
  61. package/src/target-java.mjs +34 -27
  62. package/src/target-kotlin.mjs +43 -35
  63. package/src/target-py.mjs +57 -55
  64. package/src/target-result.d.mts +48 -0
  65. package/src/target-result.mjs +112 -0
  66. package/src/target-rust.mjs +42 -38
  67. package/src/target-scala.mjs +45 -35
  68. package/src/target-ts.mjs +37 -45
  69. package/src/target-types.mjs +41 -5
  70. package/src/target-util.mjs +55 -2
  71. package/src/term.mjs +89 -0
  72. package/src/trace-cli.mjs +58 -0
  73. package/src/trace-fs.mjs +76 -0
  74. package/src/trace.mjs +261 -0
  75. package/src/translate.d.mts +3 -0
  76. package/src/translate.mjs +62 -32
  77. package/src/try-cli.mjs +225 -0
  78. package/src/why-cli.mjs +41 -0
  79. package/src/why.d.mts +38 -0
  80. package/src/why.mjs +613 -0
  81. package/src/write-steps.mjs +22 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,224 @@
1
+ # 1.2.0
2
+
3
+ **Upgrade note.** Every existing command, flag, and exit code is unchanged, with one JSON change: in `thunder why
4
+ --json`, a step's `effect` is now one of six kinds (`money`, `delete`, `send`, `create`, `change`, `read`; or
5
+ `unknown` / `none`) instead of `change`, and `changes[]` items gain `kind`. `thunder` with no command now prints a
6
+ short home screen; the full list is `thunder help --all`. Color is used only when the output is a terminal.
7
+
8
+ - **`thunder init` is friendlier, and mission rules can be tried without JSON.** `thunder init` now says what it made
9
+ (a starter mission: a product's rules and the examples that prove them), lists what to try next, and points
10
+ beginners to `thunder new hello`. Its template's comments name the right file (they said `Mission.intent`) and
11
+ suggest `thunder try`. `thunder try Mission.thunder` works on mission decisions: it asks for each value (or takes
12
+ `--with "age=20"`), says the kind each value should be (worked out from the rules), and explains the answer in words
13
+ ("age is at least 18 (age is 20)").
14
+ - **Trademark marks.** Thunder™ and ThunderLang™ now carry ™ where the brand is shown prominently: the CLI's home
15
+ screen, `thunder --version`, `thunder help --all`, `thunder doctor`, the npm and VS Code descriptions (and the
16
+ extension's display name), the compiler README, and the site's logo and footer.
17
+ - **Color in the terminal, and an easier full command list.** Screens people read (the home screen, `help`,
18
+ `doctor`, `new`, `why`, `try`, `read --level`, and the "did you mean" and "no project here" messages) use calm color:
19
+ green ✓, red ✗ only for real problems, yellow ! for warnings, commands to type in cyan, bold labels and headings.
20
+ Color is off for files, pipes, scripts, editors reading the output, `NO_COLOR`, and all JSON; `FORCE_COLOR=1` keeps
21
+ it. The words are identical with or without color (a test checks it). `thunder help --all` now starts with what most
22
+ people need (Start, Write and run programs, Read and understand code, Change code) and puts missions, proofs, and
23
+ editor tools under "Advanced"; every command is still listed. The home screen adds `thunder try`.
24
+ - **Thunder Core compiles to TypeScript.** `thunder build --target typescript` (or `target = "typescript"` in
25
+ thunder.toml) writes one readable `.ts` file per Thunder file into `generated/typescript/`, with `// thunder:N` line
26
+ marks, the runtime, its types, and a `tsconfig.json`; `thunder run --target typescript` and `thunder test --target
27
+ typescript` run it on Node (Node 22.6+ strips the types itself; on an older Node, Thunder uses the `typescript`
28
+ package when it can find it, and otherwise says what is needed). One meaning: the runtime is the Thunder engine's own
29
+ value code (engine-values.mjs, byte for byte), and every Core test program now runs three ways (Python, the Thunder
30
+ engine, and compiled TypeScript), with the same output, errors, and exit status required: 136 programs on Node 18,
31
+ 22, and 24. `tsc --strict` accepts the code generated for all of them. A program that uses a Python module (`Use`) is
32
+ refused for TypeScript before anything is written (new code TC405). The site lists Core → TypeScript as Available;
33
+ Java, C#, Go, and Rust stay Planned. CI now runs the compiler tests on Node 22, and the site job checks every
34
+ generated file with tsc.
35
+ - **The tutorial teaches writing and running Thunder.** `@skillstech/thunderlang/learn` gains part 2, "write and run":
36
+ seven lessons (`part: 'write'`), each naming the concept it teaches: your first program in two commands
37
+ (`thunder new hello`, `thunder run hello`, and why a bare `thunder run` right after fails), conditions, loops and
38
+ lists (positions from 1), records with a Never rule, reading Python as Thunder (and what is marked not translated),
39
+ check vs test vs verify, and `thunder why` with its limits. Every answer is worked out by running the lesson's
40
+ program on the Thunder engine. New optional lesson fields: `concept`, `commands` (what to type), and `output` (what
41
+ the program prints). Same schema (`thunder-learn-v1`); the 12 reading lessons are unchanged. The engine's language
42
+ core is now `engine-core.mjs` with no Node APIs, so the tutorial still runs in a browser.
43
+ - **Fix (Core → Python): a whole number written with leading zeros (`007`) compiled to Python that would not run**
44
+ (Python refuses `007`). It now compiles to `7`, as Thunder means it.
45
+ - When Python is missing, `thunder run` and `thunder test` now also say how to run without it: `--engine thunder`.
46
+ - **The Thunder engine: run Thunder Core without Python.** `thunder run --engine thunder` and
47
+ `thunder test --engine thunder` run a program on the Thunder engine, a second engine that runs the same checked
48
+ program the Python compiler uses. Python is not needed, and is still the default. Both engines must agree: every
49
+ Core test program now runs on both (output, errors with code, words, line and "reached from", and exit status),
50
+ and any difference fails the tests. A program that uses a Python module (`Use csv as csv`) is refused on the
51
+ Thunder engine before it runs; Thunder never imitates a library. Also available as `runWithEngine` /
52
+ `testWithEngine` in `src/core/engine.mjs`.
53
+ - **`thunder try`: what if?** Try a rule from your code with your own values: `thunder try register.ts --with
54
+ "age=15, parent approved=no"` prints the answer and why, check by check (✓/✗ with the value it saw). Without
55
+ `--with`, it asks for each value, explains a mistyped one, and offers another case. Only rules can be tried (they
56
+ change nothing); an action is refused with the command to read it, and a rule too complex for the engine is refused
57
+ with the reason. `--focus` picks a rule; `--json` gives data. Same engine as the web rule editor.
58
+ - **`thunder read --level`: read at one depth, in the terminal.** The five levels OpenThunder shows: `big-picture`
59
+ (the Things, what they know and can do), `flow` (one action or rule as a tree of questions, branches, error
60
+ handlers, and "always"), `details` (every way it ends, what it changes and when, and what the code cannot tell),
61
+ `text` (Thunder Text), and `original` (the exact lines, numbered). `--focus "<name>"` picks an action, rule, or
62
+ Thing; without it, `flow` and `details` list the choices as commands. Each level suggests the next. Steps Thunder
63
+ could not explain stay marked. `--json` prints the model level itself, the same data OpenThunder reads. Works on a
64
+ file or a folder. `thunder read` without `--level` is unchanged.
65
+ - **`thunder why` is short now, and says what the agent did to the world.** The first screen is a few lines: what
66
+ happened, why it stopped, what it did, and what to do next; `--steps` gives every step. Each step that does something
67
+ gets one kind, most serious first: moves money, deletes, sends, creates, changes, reads. The kind comes from the
68
+ strongest evidence: what the tool declares (its MCP annotations with `--tools tools.json`, or `thunder.effect` on the
69
+ span), then the request method or database operation, and only then the tool's name, where every word counts and the
70
+ most serious wins (`get_and_delete` now deletes; it was read as `get`). Guesses are labeled. `--allow read,send`
71
+ names anything beyond those kinds and exits 1. JSON: new `effects` (and `allowed`/`notAllowed`); `changes` items now
72
+ carry `kind`, and a step's `effect` is one of the six kinds (it was `change`).
73
+ - **A friendlier first minute in the terminal.** `thunder` on its own now shows a short home screen (five things
74
+ to do, with examples) instead of 120 lines; `thunder help --all` is the full list, and `thunder help <command>`
75
+ shows one command. A mistyped command says "Did you mean thunder read?" instead of failing later (it used to crash
76
+ reading a file). `thunder new hello` says exactly how to run it (`thunder run hello`), and `--run` runs it too.
77
+ `thunder run` (or test, build, check) outside a project says where the nearby projects are and the exact command.
78
+ New: `thunder doctor` checks Thunder, Node.js, Python 3.10+, PATH, Node versions (nvm) missing Thunder, and
79
+ optional toolchains, offline, with the fix for each problem; `thunder completion zsh|bash|fish` completes commands
80
+ on Tab. Every existing command, flag, exit code, and JSON output is unchanged.
81
+
82
+ # 1.1.0
83
+
84
+ - **Thunder Why: what an AI agent did, in plain words.** `thunder why run.json` reads an agent run's OpenTelemetry
85
+ record and says what the agent was asked and answered, what went wrong, what happened just before, what would have
86
+ changed the outcome, and what it changed, with every step in order. It reads OTLP JSON, the collector's file
87
+ exporter, the Python console exporter, and OpenInference span arrays, with the GenAI, OpenInference, HTTP, and
88
+ database conventions. Retries are one step ("3 tries"); a failed change is never reported as done; a tool whose
89
+ name doesn't say whether it changes anything is listed as "could not judge". Errors are in plain words, with the
90
+ original kept in the details. Values that look like secrets are hidden. `--step n` shows one step in full;
91
+ `--json` gives the same as data. Nothing is run and no AI is used. Also available as `@skillstech/thunderlang/why`.
92
+ - **Inputs with defaults.** `Receive price and rate (7% if not given)`: a call may leave the input out. A default
93
+ is a fixed value: a number, money, a percent, text, yes/no, `nothing`, or a kept value. It comes after the inputs
94
+ without one. A list or map default is an error (TC404), because Python would share it between calls. `--as-core`
95
+ reads Python's fixed defaults (`rate=0.07`, `label="x"`, `flag=None`, `rate=TAX`) this way, and still refuses list,
96
+ dict, and computed defaults. Real Python (150 files): 240 → 261 exact functions. Core text also accepts `\r`.
97
+ - **Core's standard operations for text, lists, numbers, and JSON.** The new forms:
98
+ - text: `names joined with ", "`, `line split at ","`, `the parts of text`, `date replacing "-" with "/"`,
99
+ `name starts with "Dr"`, `file ends with ".csv"`;
100
+ - lists and numbers: `scores sorted` and `sorted descending`, `the absolute value of x`;
101
+ - JSON: `the JSON data in text`, which reads numbers exactly, and `the JSON text of value`.
102
+ Each checks its kinds: before running when known, while running otherwise. Invalid JSON stops with TC509. The
103
+ words `joined`, `split`, `replacing`, `starts`, and `ends` now belong to Thunder and cannot be part of a name.
104
+ `--as-core` reads Python's `join`, `split`, `replace`, `startswith`/`endswith`, `abs`, `max`/`min` of several
105
+ values, `sorted(xs)`, `list()`, `dict()`, and `json.loads`/`json.dumps` (only when the file imports `json`) as
106
+ these forms. A call whose meaning differs is still refused: `maxsplit`, a replace count, a tuple of prefixes, or
107
+ `key=`. The benchmark's exact functions rose to 19 of 20, and all 19 give the same results as the original.
108
+ - **Methods read as Core.** `thunder read <file.py> --as-core` now prints each method of a class as a Core function
109
+ that receives the object first (`To Account withdraw:` / `Receive self and amount`). `self.other()` calls that
110
+ class's own function, and this is written down as an assumption, since a subclass could replace it. Static methods
111
+ are printed as plain functions. Special methods, inner functions, and `self.other()` calls the class does not
112
+ define are refused. The round trip now runs methods too, and compares the object afterwards. Benchmark:
113
+ `Account` 6 of 6 and `Cart` 4 of 5 methods printed exactly, all giving the same results. On 150 real Python
114
+ files, exact functions rose from 66 to 236 (3% to 12%), and every file's Core still compiles.
115
+ - **Fix (Core): changing a field or an entry whose kind is not known.** `Add 3 to box's items`, `Increase box's count
116
+ by 1`, and `Set xs at 1 to v` on a value from Python compiled to invalid Python (`get_field(...) = …`) or set the
117
+ wrong list position (`xs[1]` for Core's position 1). They now read and store through the same helpers as `Set`.
118
+ Reading `pair at 1` works on a Python tuple.
119
+ - **Read Python as Thunder Core: reading and writing are one language.** `thunder read <file.py> --as-core` prints
120
+ the reader's meaning tree as Core you can edit, compile, and run. It never prints from the English. A line Core
121
+ cannot say with the same meaning becomes `# Not translated (line N): <why>` plus a `Stop with` line. Such a
122
+ function is reported as not safely editable; Thunder never rewrites a line into something close. Assumptions are
123
+ written next to the line. The output always compiles. On the 20-function benchmark (`docs/core-read-write.md`),
124
+ the printed Core compiles 20 of 20, is exact 18 of 20, and the 18 exact ones give the same results as the
125
+ original Python on 52 of 52 sample inputs, checked by running both (`verifyRoundTrip`, `compiler/src/core/round-trip.mjs`).
126
+ - **Core is strict about yes/no and exact with Python floats.** A condition, `and`/`or`/`not`, or a comparison with
127
+ `true`/`false` on a value of unknown kind now checks it is yes/no while running. `1` or `"yes"` stops with a
128
+ clear error instead of being treated as true or false. A Python float reaching Core arithmetic or a comparison
129
+ becomes the exact decimal it is written as (`19.99`). Before, `float * Decimal` crashed, and a float `0.1`
130
+ compared as more than `0.1`.
131
+ - **Thunder Trace: how your repositories depend on each other.** `thunder trace <folder…>` links HTTP requests to
132
+ the routes that handle them and published events to their listeners, across repositories, and cites every link
133
+ `repo@sha:file:line`. `thunder trace impact "<route | event | repo:file[:line]>" <folder…>` and
134
+ `thunder trace impact --diff [--base ref] <folder…>` list what a change can affect, ranked high/medium/low, one
135
+ hop out. A route or event that was removed is caught by reading each changed file as it was before. Links are made
136
+ only on a fact: `/health`-style paths, paths with no fixed part, and two equal matches are never linked, and each
137
+ is listed with the reason. The graph (`thunder-trace-v1`) is fingerprinted. The MCP server offers it as
138
+ `intent_trace` (local only). Reference: `docs/trace.md`.
139
+ - **Routes include their controller's prefix.** ASP.NET `[Route("api/[controller]")]` and Spring
140
+ `@RequestMapping("/api")` on a class now prefix each handler's path (`POST /api/Orders`, not `POST`). An ASP.NET
141
+ path with no prefix now starts at the root (`/docs/{id}`).
142
+ - **Thunder Core: write a program in Thunder and run it (Python first).** `thunder new <dir>` creates a project
143
+ (`thunder.toml`, `src/main.thunder`, `tests/`); `thunder run`, `build`, `test`, `check` and `format` work in it,
144
+ or on one file with `--core`. Core has values, kept values, functions, conditions, loops, lists, maps, records with
145
+ `Never allow` rules, `If this fails:`, tests, and `Use <python module>` to reach the Python ecosystem. It compiles
146
+ to readable Python 3.10+ plus a standard-library-only `thunder_runtime.py`: division and money are exact, rounding
147
+ is half up, positions start at 1, `nothing` is never silently a value, and every failure names the Thunder line
148
+ (TC5xx). The site's playground example (several `Receive` lines, `yes or no`, a condition continued on an
149
+ `and …` line) compiles and runs as written. Reference: `docs/core.md`. Demos: `examples/core/`. Python is the only
150
+ target so far.
151
+ - **`thunder new` now creates a Core project.** For an intent mission file, use `thunder init <Name>` (or
152
+ `thunder new --mission <Name>`); `thunder new` says so when it runs.
153
+ - **Fix: a rule Thunder cannot translate never becomes `false`.** The scaffolds (`thunder gen`, all four targets),
154
+ the executable targets (TypeScript, Python, C#, Java, Go, Rust, Kotlin, Scala, Elixir) and the in-browser
155
+ translator used to replace an untranslatable rule condition with `false` (Python with no note at all), so generated
156
+ or executed code silently skipped that rule and returned another answer. Now generation reports the new diagnostic
157
+ **`IL-GEN-001`** ("Thunder could not translate the condition '…' for <target>: <reason>"), `thunder gen` prints it
158
+ on stderr and exits 1, the generated rule throws with that message (`throw new Error(...)`,
159
+ `raise NotImplementedError(...)`), and `thunder test --target`, `--all-targets` and `thunder conform --run` refuse
160
+ to run that decision and report its cases as *not translated*, never as an answer. New API:
161
+ `generateWithDiagnostics(ast, target)` and `translateDecisionsWithDiagnostics(ast, lang)`.
162
+ - **Fix: Money is exact, never binary floating point.** `Money` is a decimal with 2 minor units (or the currency's:
163
+ `Money(JPY)` 0, `Money(KWD)` 3); extra precision is an error, never rounded; rounding, where a spec asks, is half
164
+ up (a half goes away from zero), the same rule as Thunder Core's `round`. TypeScript Money was `number`; it is now `bigint` minor units with a generated zero-dependency
165
+ `parseMoney` / `formatMoney` helper. Python Money was `float`; it is now `decimal.Decimal`. Decision inputs typed
166
+ `Money` were `double`/`float64`/`f64` in every target; they are now `decimal` (C#), `BigDecimal` (Java), `int64`
167
+ (Go) and `i64` (Rust) minor units, and a Money comparison a target cannot do exactly (Kotlin, Scala, Elixir, or
168
+ multiplying Money) is refused with `IL-GEN-001`. The decision engine adds, subtracts and multiplies decimals
169
+ exactly, so `0.1 + 0.2 == 0.3`. Plain contracts read `$12.30` as exact cents (and show `$12.30`, not `$12.3`), and
170
+ reject `$12.305` instead of rounding it. JSON Schema / OpenAPI describe Money as a decimal string, not a number.
171
+ See "Money is exact" in `docs/spec.md`.
172
+ - **Fix: a failed run is never a `null` answer.** The live target runners turned a missing toolchain, a compile
173
+ failure, a crash or a timeout into `null` (and Python turned an exception into `None`), so a real null answer
174
+ looked the same as a failure. Each run now returns `{ status: 'ok', results }` with one
175
+ `{ status: 'ok', value }` or `{ status: 'error', kind, message }` per case (`kind`: `missing-toolchain`,
176
+ `compile-failed`, `runtime-error`, `timeout`, `assertion-failed`, `not-translated`, `missing-input`), or a whole-run
177
+ `{ status: 'error', kind, message }`. `thunder test --target` / `--all-targets` and `thunder conform` show
178
+ `ERROR` with the kind and reason (and fail the run); a missing toolchain is still skipped. Conformance evidence
179
+ counts an error as a failure. Types: `compiler/src/target-result.d.mts`. The playground's Code tab lists any rule
180
+ that was not translated.
181
+ - **Fix: a case is never run with a made-up input.** A test case that left out an input was run in Java, Go, Rust
182
+ and the others with `0`, `false`, `""` (or `$0` for Money), so a typed target answered for a value nobody wrote and
183
+ its FAIL blamed the target (Python crashed instead). Every target now reports such a case as `missing-input`,
184
+ naming the inputs to add. Target names print as TypeScript and C# (not Typescript and Csharp).
185
+ - **Say less: words only where Thunder is sure (`src/say-less.mjs`).** Every worded step is now checked after it is
186
+ read, and a step stays in words only when its form is recognized and the words account for its code (every word from
187
+ the code or Thunder's own wording, every value exact, no negation, and/or, comparison, arithmetic, cast, or named
188
+ argument part dropped, no ambiguous names, recognized endings, certain block structure, inputs from the signature).
189
+ Anything else is shown as its code, exactly as written. On new repositories graded independently the false rate fell
190
+ from 10.4% to 3–4% (target 1% not yet reached; see docs/accuracy.md); steps explained fell from 90.0% to 81.7%.
191
+ - **New fields (OpenThunder):** every step and flow node has `explained` and, when false, `notExplainedWhy`;
192
+ functions and members have `explainedSteps` / `totalSteps`; the model has `explainedSteps` / `totalSteps`.
193
+ - **C and C++ meaning trees:** `->`, unary `*` / `&`, C casts, typed and array declarations, `struct` / `static`
194
+ declarations, C++ template calls (`static_cast<T>(x)` is a call, never a comparison), range-for with `const auto&`.
195
+ Swift `try f()` is an expression, not a try block.
196
+ - **Rules** are drawn only for a certain yes/no answer (`state.copy_ || state.base_` is not a rule); **doc comments**
197
+ only from the `/** … */` right above a function (a `/*#__PURE__*/` no longer pulls in another function's doc).
198
+ - **Reviews:** a question's two sides keep quoted text exactly (`hasattr(fp, "read")`, never `hasattr(fp, 0)`).
199
+ - A length reads one way: "the length of password" (never "how many password").
200
+ - `scripts/form-words.mjs` regenerates the readers' fixed wording list; `SAYLESS_DEBUG=1` prints why each step was
201
+ shown as code.
202
+ - Tests changed only where a reading correctly became code: gin#13 (an `if` with a setup statement other than the
203
+ err idiom), ripgrep#3 (a loop over a pattern), Kingfisher#2 / Alamofire#3 (`guard case`), Rectangle#5 (`for …
204
+ where`), nvm#18 (`test && cmd || other`), neofetch#3 and nvm#2 (`ls` alone is not "the files in ".""), #179
205
+ (`out var`), vapor#8 (a closure with a capture list), the Swift `if let …, cond` reading, httr#19 (quotes inside a
206
+ value), jquery#15 (`queue || []` is not "when that has no value"), #165 (the shown code is the source as written),
207
+ and four expectations of "how many x" that now read "the length of x".
208
+ - **Fix (writing in Thunder):** an inline route handler's own model id (`auth.ts##POST/api/auth/register#3`) now resolves in `thunderWrite`, and `says` names only the changed step, once, when a one-line `if` holds several steps. Reported by OpenThunder.
209
+ - **Thunder review on every pull request (GitHub Action).** `uses: SkillsTechTalk/thunderlang@main` (the repository's
210
+ root `action.yml`) runs `thunder review` on the pull request's two commits with the published compiler, writes the
211
+ review to the job summary, and keeps one pull request comment up to date (found by `<!-- thunder-review -->`), with
212
+ the workflow's own `GITHUB_TOKEN`. Inputs: `base`, `head`, `comment`, `fail-on` (none | risk), `paths` (globs),
213
+ `version`. Pull requests from forks get the job summary only, and it says why; `pull_request_target` is never
214
+ needed. Runs in your CI: no code leaves GitHub, no AI. Docs: `docs/github-action.md`. The `.thunder` check action
215
+ moved to `SkillsTechTalk/thunderlang/check` (the old root action pointed at a package name that does not exist).
216
+ - **`renderReviewComment(review)`** (core, browser-safe): the comment, grouped by changed action, rule, or function,
217
+ risks first, with honest counts (explained in sentences, shown as code, Thunder cannot check), a link to
218
+ thunderlang.dev, and a size cap that leaves out whole entries and says "N more not shown".
219
+ - **`thunder review --base <ref> --head <ref> --format markdown|json --paths <glob,...>`**: flag forms of the existing
220
+ positional arguments and `--json`, and `--paths` to review only matching files.
221
+
1
222
  # 1.0.4
2
223
 
3
224
  - **Fix: no false readings left in the fresh audit outside SQL.** An independent review of 1.0.3 on 32 repositories
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @skillstech/thunderlang
2
2
 
3
- Deterministic ThunderLang compiler and CLI. **No AI required.** Turns a `.intent` file into
3
+ Deterministic ThunderLang™ compiler and CLI for Thunder™, the human programming language. **No AI required.** Turns a `.intent` file into
4
4
  the canonical **Intent Graph** plus diagnostics, docs, a test plan, and a proof artifact,
5
5
  and, for decisions, lifecycles, and outcomes, **executes the intent directly** (no code
6
6
  generated). Every output is pure and deterministic: the same source always yields the same
@@ -10,6 +10,9 @@ Part of [ThunderLang](https://thunderlang.dev), the intent language for AI-era s
10
10
 
11
11
  **Learn ThunderLang:** the [10-minute tutorial](https://thunderlang.dev/learn), then the
12
12
  [full course on Skills Tech Talk](https://app.skillstechtalk.com/learn/technology/t/thunderlang).
13
+ The tutorial also ships in this package as data (`@skillstech/thunderlang/learn`): 12 lessons on reading code, and
14
+ 7 on writing and running Thunder programs, each naming the programming concept it teaches. Every quiz answer is
15
+ worked out by the compiler, and for the writing lessons by running the program.
13
16
 
14
17
  ## Install
15
18