From 836185a17468de0e72526d5f1788dd83233c1e4b Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 09:41:24 +0700 Subject: [PATCH] A diagnostic's clauses have a fixed order, and a stable kind waits for the docs it would link to --- CLAUDE.md | 2 ++ TODO.org | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index fe9b2fdc..3a08fcc2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -76,6 +76,8 @@ named. Beyond that: history. Never "X is now Y", never "X was renamed", never our rationale. If `defvar` no longer exists, the message says `defvar` does not exist — not that it became something else. +- The clauses come in one order: what the compiler understood, then what + conflicts with it, then the fix — "expected i32, found string". - Every suggestion a message prints must compile. - An assertion about the compiler's own invariants is prefixed `internal:` and says it is a compiler bug. A user never caused one. diff --git a/TODO.org b/TODO.org index 8f7a1357..da4fb6eb 100644 --- a/TODO.org +++ b/TODO.org @@ -2069,10 +2069,11 @@ understood, say what conflicts, name the fix. Two behaviour changes came with it an unannotated two-name parameter vector compiles as two dyn parameters, and a =defn= named after a builtin stopped being unreachable. -** TODO Three structural diagnostics questions are still the author's -Printing the stable kind at the end of the first line, the understood-then- -conflicted clause order as a writing rule, and non-cascading multiple errors. Each -needs a decision rather than work. +** WAIT Every diagnostic carries a stable kind at the end of its first line +Decided 2026-09-25: wanted, in the shape =... found string [type-mismatch]=. Waits +for the documentation rewrite, which is what a kind would link to. The clause +order — understood, then the conflict, then the fix — is a rule in =CLAUDE.md=, +and reporting every error in a form is its own entry under the Editor heading. ** DONE docs/BUILT.md still describes (Handle T) and the pool as built CLOSED: [2026-09-25]