Golden Documents
SCL:V1 Conformance Set
Golden Documents is the fixed conformance set for SCL:V1.
Each document defines a byte-exact input and a required observable result:
- exact canonical JSON
- exact SHA-256 identity
- or exact protocol failure, including error code and byte offset
An implementation is compliant with SCL:V1 only if it produces identical results for the entire Golden Documents set.
This page is a human-readable view of the conformance set. The machine-readable source of truth is maintained in the official fixture repository.
Authority Model
Valid Documents
Each valid document MUST produce exact canonical JSON and exact SHA-256 identity.
test_valid.scl
Valid
Input
SCL:V1
handles {
h1("test")
}
scl {
"hello world"
}
Required Result
SHA-256: 56e66666e6597fe83feed1325b516635831a7b5d2216f7520a569230a7673612
Canonical JSON: {"handles":[{"id":"h1","tags":["test"],"type":"Handle"}],"scl":{"content":"hello world","hints":[],"refs":[],"type":"SclBlock"},"type":"Document","version":"SCL:V1"}
test_empty_scl.scl
Valid
Input — empty SCL block with multi-tag handle
SCL:V1
handles {
id("tag1","tag2")
}
scl {
}
Required Result
SHA-256: 9daf8e086945067515ed8765f8265f991b078d3a4fde708d1f1f66eaa790b5f5
Canonical JSON: {"handles":[{"id":"id","tags":["tag1","tag2"],"type":"Handle"}],"scl":{"content":"","hints":[],"refs":[],"type":"SclBlock"},"type":"Document","version":"SCL:V1"}
test_multi_handle.scl
Valid
Input — multiple handles on separate lines, empty SCL block
SCL:V1
handles {
h1("x")
h2("x")
}
scl {
}
Required Result
SHA-256: 958bade3ea2e1400923ea6dc4c92027d0d0e1dca9047f2380881b02ab3623738
Canonical JSON: {"handles":[{"id":"h1","tags":["x"],"type":"Handle"},{"id":"h2","tags":["x"],"type":"Handle"}],"scl":{"content":"","hints":[],"refs":[],"type":"SclBlock"},"type":"Document","version":"SCL:V1"}
test_raw_mode.scl
Valid
Input — raw content mode (unicode, emoji, symbols, quotes, JSON-like, code, escape sequences)
SCL:V1
handles {
prompt("input")
}
scl {
You are a system that must process EXACT input without modification.
Test coverage:
1. Unicode:
안녕하세요 こんにちは 你好 مرحبا Привет
2. Emojis:
🚀🔥💡✅❌🎯
3. Symbols:
~!@#$%^&*()_+-=[]{}|;':",.<>/?`
4. Quotes (must remain untouched):
"double quotes"
'single quotes'
`backticks`
5. JSON-like (do NOT interpret):
{ "key": "value", "nested": { "a": 1 } }
6. Code sample:
def example():
return "SCL → identity only"
7. Mixed formatting:
Line with trailing spaces
Line with tab (THIS SHOULD FAIL IF ACTUAL TAB EXISTS)
8. Arrows and operators:
→ ← ⇒ ⇐ == != >= <=
9. Escape-like sequences (must NOT be processed):
\n \t \\ \" \'
10. Edge spacing:
Start
Middle
End
Instruction:
Do NOT normalize, trim, escape, or reinterpret ANY part of this input.
Return exactly what was provided.
}
Required Result
SHA-256: a54a610f18ef0ed7bb1bbe5c739ae134386e4e933cd1127b0db25a50f1b29367
Canonical JSON: (truncated — raw content preserved verbatim including unicode, emoji, symbols, quotes, and escape-like sequences as literal bytes)
Note on tab bytes: This fixture contains spaces (
0x20), not a tab byte (0x09), and is therefore valid. If a literal tab byte (0x09) is inserted anywhere in the document, the required result is E001 at the byte offset of that tab. The phrase "THIS SHOULD FAIL IF ACTUAL TAB EXISTS" is explanatory only and is not part of the protocol rule.
Invalid Documents
Each invalid document MUST produce exact protocol failure with the specified error code. No canonical JSON and no SHA-256 identity are produced.
test_lowercase_header.scl
E101
Input
scl:v1
handles {
h1("test")
h2("test")
}
scl {
"hello world"
}
Required Result
E101 — Missing or invalid SCL:V1 header
The header MUST be exactly
SCL:V1 in uppercase. Lowercase scl:v1 is not a valid header.
test_leading_newline.scl
E101
Input
␊
SCL:V1
handles {
h1("test")
}
scl {
"hello world"
}
Required Result
E101 — Missing or invalid SCL:V1 header
Leading LF (
0x0A) before SCL:V1 — shown as ␊ above. The header MUST begin at byte offset 0 with no preceding bytes.
test_two_handles_one_line.scl
E201
Input
SCL:V1
handles {
h1("test") h2("test")
}
scl {
"hello world"
}
Required Result
E201 — Invalid handle definition
Two handle definitions on the same line. After the closing
) of a handle definition, the next byte MUST be LF. Each handle MUST occupy exactly one line.
test_no_blank_line.scl
E101
Input
SCL:V1
handles {
h1("test")
}
scl {
"hello world"
}
Required Result
E101 — Missing or invalid SCL:V1 header
No blank line between
SCL:V1 and handles. The header requires a trailing blank line before the handles block.
test_no_space_handles.scl
E102
Input
SCL:V1
handles{
h1("test")
}
scl {
"hello world"
}
Required Result
E102 — Handles block missing, empty, or contains an invalid line
No space between
handles and {. The grammar requires handles { with a separating space.
test_no_space_scl.scl
E104
Input
SCL:V1
handles {
h1("test")
}
scl{
"hello world"
}
Required Result
E104 — Missing SCL block, or invalid token where SCL content/terminator expected
No space between
scl and {. The grammar requires scl { with a separating space.
test_uppercase_scl_block.scl
E104
Input
SCL:V1
handles {
h1("test")
h2("test")
}
SCL {
"hello world"
}
Required Result
E104 — Missing SCL block, or invalid token where SCL content/terminator expected
The SCL block keyword MUST be lowercase
scl. Uppercase SCL is not recognized as a valid block opener.
test_no_newline_before_scl.scl
E104
Input
SCL:V1
handles {
h1("test")
}scl {
test
}
Required Result
E104 — Missing SCL block, or invalid token where SCL content/terminator expected
No newline between the closing
} of the handles block and scl {. The SCL block MUST begin on its own line.
test_extra_lf_before_scl.scl
E104
Input
SCL:V1
handles {
h1("test")
}
scl {
test
}
Required Result
E104 — Missing SCL block, or invalid token where SCL content/terminator expected
Extra blank line (multiple LF) between the closing
} of the handles block and scl {. The scl { line MUST immediately follow the handles closing } with no intervening blank lines.
test_inline_scl_content.scl
E104
Input
SCL:V1
handles {
h1("test")
}
scl {test
}
Required Result
E104 — Missing SCL block, or invalid token where SCL content/terminator expected
Content on the same line as
scl {. After scl {, the next byte MUST be LF. Content MUST begin on the following line.
test_base.scl
E105
Input
SCL:V1
handles {
h1("test")
}
scl {
"hello world"
Required Result
E105 — Unclosed SCL block (EOF before valid SCL termination)
The SCL block is opened but never closed. The input ends before a valid
} terminator.
test_extra.scl
E104
Input
SCL:V1
handles {
h1("test")
}
scl {
"hello world"
}X
Required Result
E104 — Invalid token where SCL content/terminator expected
Trailing bytes (
X) appear after the closing } of the SCL block.
test_empty_handles.scl
E102
Input
SCL:V1
handles {
}
scl {
test
}
Required Result
E102 — Handles block empty or contains an invalid line
The handles block is empty. At least one handle definition is required.
Note: This page is a human-readable view. For conformance testing, use the machine-readable fixtures from the official repository. The reference engine is available at sclprotocol.dev/validator.
See also: Testing SCL understanding.