2.8 KiB
FCS/1 — Function Composition Schema (Execution-Only)
Status: Approved Owner: Architecture Version: 1.0.0 SoT: Yes Last Updated: 2026-02-21 Linked Phase Pack: PH07 Tags: [execution, descriptor, deterministic]
Document ID: FCS/1
Layer: L2 — Function descriptor schema for deterministic execution
Depends on (normative):
DDS— canonical FCS/1 v1-min TLV layout and validation rulesPCB1— parameter block encoding rules (DDS §7.3)ASL/1-CORE v0.4.x— logical value model (Artifact,Reference)
0. Purpose & Scope
FCS/1 defines the execution-only descriptor schema for composite and
custom functions. It explicitly excludes policy, intent, scope, authority, and
other governance metadata (those belong in FCT/1).
FCS/1 descriptors are immutable and content-addressed; identical descriptors
MUST hash to identical CIDs.
1. Descriptor Model (logical)
An FCS/1 descriptor captures the deterministic execution recipe:
FCSDescriptor {
function_ptr : CID // FPS/1 primitive or nested FCS/1 descriptor
parameter_block : CID // PCB1 parameter block
arity : uint32
}
function_ptrMAY reference anotherFCS/1descriptor (composition), or a primitive function descriptor (e.g.,FPS/1).parameter_blockMUST reference a valid PCB1 payload.aritydefines the expected number of input slots (must match PCB1).
2. Canonical Encoding (v1-min)
The canonical byte encoding for FCS/1 descriptors is defined by DDS §7.2:
- COR/1 framing with strict TLV order.
- Required TLVs only:
function_ptr (0x30),parameter_block (0x31),arity (0x32).
No other TLVs are permitted in v1-min.
3. Validation Rules
Implementations MUST reject descriptors that violate any of the following:
- TLVs are not in strict ascending order, or appear more than once.
parameter_blockdoes not decode as a valid PCB1 envelope.aritydoes not match PCB1 slot manifest length.- The descriptor graph (following nested
function_ptrreferences) is cyclic. - Any legacy or unknown governance TLV appears.
Error mapping follows DDS (e.g., ERR_FCS_TAG_ORDER, ERR_FCS_PARAMETER_FORMAT,
ERR_PCB_ARITY_MISMATCH, ERR_FCS_CYCLE_DETECTED, ERR_FCS_UNKNOWN_TAG).
4. Composition Semantics
- Composition is pure: a descriptor that references another
FCS/1descriptor inherits its deterministic execution recipe. - The composed descriptor graph MUST be acyclic.
- Registries MUST admit only canonical, validated
FCS/1descriptors.
5. Conformance
An implementation is FCS/1–conformant if it:
- Accepts only v1-min canonical encodings.
- Enforces the validation rules in §3.
- Treats descriptors as immutable and content-addressed.
- Rejects any descriptor with policy/intent metadata embedded.