spec/canonical.sx defines: - canonical-serialize: deterministic s-expression serialization (sorted dict keys, normalized numbers, minimal escaping) - content-id: SHA3-256 of canonical form = CID of any s-expression - Bytecode module format: (sxbc version source-hash (code ...)) - Provenance records linking source CID → bytecode CID → compiler CID The CID is the identity model for SX. A component, a bytecode module, a test suite — anything expressed as an s-expression — is addressable by content hash. Annotation layers (source maps, variable names, test results, documentation) reference CIDs without polluting the artifacts. Requires host primitives: sha3-256, sort. Tests in test-canonical.sx. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.5 KiB
2.5 KiB