pub fn generate_spec_toml(
id: &str,
archetype: &str,
display_name: &str,
summary: &str,
category: &str,
) -> String {
let composition = if category == "A" {
"\n# Composition-backed ops must list composed dependencies.\ncomposition_of = []\n"
} else {
""
};
let intrinsic = if category == "C" {
"\n[intrinsic]\nwgsl = \"\"\nspirv = \"\"\ncuda = \"\"\nmetal = \"\"\n"
} else {
""
};
format!(
r##"schema_version = 1
id = "{id}"
archetype = "{archetype}"
display_name = "{display_name}"
summary = "{summary}"
category = "{category}"{composition}
{intrinsic}
[signature]
inputs = ["U32", "U32"]
output = "U32"
# Concrete laws from `vyre_spec::AlgebraicLaw` go here (Commutative,
# Associative, Identity {{ element = ... }}, …). An empty list is
# valid for ops that declare no algebraic claims; the conform gate
# then only checks parity, not law verification.
laws = []
# Adversarial equivalence classes for this op. Empty is valid; the
# adversarial gauntlet widens coverage later. Populate once mutation
# testing surfaces a defect the default classes miss.
equivalence_classes = []
workgroup_size = [64, 1, 1]
tags = []
"##
)
}