Programmatic SCL Document Generation
SCL is the deterministic, cryptographic identity protocol for AI run declarations.
SDK Construction Model
SCL documents can be generated programmatically using compliant SDKs. Programmatic generation constructs valid SCL document bytes from application state without manually authoring text files.
API Surface
A compliant SDK exposes construction around the SCL:V1 document components:
- Version header
- Handle declarations
- Content block
- Serialization to SCL bytes
The API surface may vary by language, but the protocol result MUST remain identical for identical input bytes.
Handle Construction
Handles are defined as named declarations with required tags. A programmatic interface represents:
- Handle name
- One or more tags
- Ordered inclusion in the
handles { }block
Generated output MUST preserve protocol-valid syntax and ordering.
Content Construction
The scl { } block is constructed as declared execution content. Depending on the SDK, content may be represented as quoted mode, raw mode, or structured builder input that serializes to valid SCL bytes.
Serialization Requirement
The SDK must emit a valid SCL:V1 document with:
SCL:V1at byte 0- Exactly one blank line after the header
- Valid
handles { }declarations - Valid
scl { }content - No trailing bytes
Document identity is derived from the serialized result, not the in-memory object model.
Cross-Language Guarantee
For identical input bytes, all compliant implementations MUST produce identical canonical JSON bytes and identical SHA-256 identity. The reference engine provides verification.