From 1008b442cd69d4bf74a4f690edff8884e8c304f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 14:41:53 +0000 Subject: [PATCH] ABI choice 2: the stack effect is the ( -- ) comment, read strictly; every export must have one Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm --- docs/v4.0.0/ABI.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/v4.0.0/ABI.md b/docs/v4.0.0/ABI.md index 05abd3aa..94e37629 100644 --- a/docs/v4.0.0/ABI.md +++ b/docs/v4.0.0/ABI.md @@ -130,8 +130,9 @@ is verified (ADR §5); compatibility is checked against the old artifact's recor `.f18` to artifacts on the build machine. It is a second assembler beside the ROM's, so the two must agree: the tool's output is checked against what the ROM assembles from the same source, cell for cell, in the build and in CI. The compiler's identity in the provenance record is the tool's own hash. -2. **The stack-effect declaration:** written in the source as today's `( a b -- c )` comments, parsed - strictly, or a new form? +2. ~~The stack-effect declaration~~ **Ruled 2026-11-19: "The ( -- ) comment, strict".** The host tool reads + the first `( ... -- ... )` after an exported word's name and counts the items on each side, for example + `: NIP ( a b -- b )` is 2 taken and 1 left. Every exported word must have one, or the build fails. 3. **What a capsule carries:** an artifact alone, or the artifact and its source (provenance, ADR §3.1)? 4. **Imports by capsule hash:** a hash pins one exact build. Is an import of an older build of the same capsule a mismatch, or is the name of the capsule enough with the stack effect checked?