amduat/registry/enc-pel1.schema.md
2025-12-20 12:54:32 +01:00

56 lines
1.8 KiB
Markdown

# ENC/PEL1 Registry Manifest (draft)
This file documents the JSONL rows in `registry/enc-pel1.jsonl`. Each line is
one entry descriptor for a single PEL encoding profile assignment. The key is
the profile ID (a concept); the descriptor is data.
## Field definitions
- `registry`: string. Constant `"ENC/PEL1"`.
- `profile_id`: string. Hex `u16` formatted as `0x0000`.
- `handle`: string. Stable concept handle for this profile assignment, e.g.
`amduat.enc.pel1.profile.0101@1`.
- `name`: string or null. Profile name if assigned (e.g.
`PEL_ENC_PROGRAM_DAG_V1`).
- `version`: string. Hex `u16` encoded version from the descriptor table.
- `status`: string. One of: `mandatory`, `reserved`, `deprecated`,
`experimental`.
- `spec_ref`: string. Document/version that defines the assignment.
- `notes`: string. Short human-readable note.
- `descriptor_sha256`: string. Lowercase hex SHA-256 digest of the canonical
descriptor (see below).
## Canonical registry key
`profile_id` is the registry key. Its key bytes are the big-endian `u16`
encoding defined in `ENC/ASL1-CORE` (see `amduat_enc_asl1_core_key` for the
encoding convention).
## Handle naming scheme
Handles are opaque identifiers in the `amduat` namespace:
```
amduat.enc.pel1.profile.<hex4>@1
```
`hex4` is the 4-digit lowercase hex of the profile ID (zero-padded).
## Descriptor digest rule
`descriptor_sha256` is computed as SHA-256 over the UTF-8 bytes of the
canonical JSON object with these fields **in order**:
```
registry, profile_id, handle, name, version, status, spec_ref, notes
```
The canonical JSON uses no extra whitespace and does **not** include the
`descriptor_sha256` field itself.
## Intended use
- Source of truth for codegen (C tables, enums) and documentation tables.
- `descriptor_sha256` can be treated as the stable digest for mapping entries
into graph references or evidence tables.