ABI choice 2: the stack effect is the ( -- ) comment, read strictly; every export must have one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-19 14:41:53 +00:00
parent 0c2aab1ab5
commit 1008b442cd
+3 -2
View File
@@ -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?