1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Contract kinds — declare which validation rules apply to a YAML file.
use ;
/// The kind of contract artifact. Determines which validation rules apply.
///
/// - `Kernel` (default): a mathematical kernel contract — the provability
/// invariant applies (must have `proof_obligations`, `falsification_tests`,
/// `kani_harnesses`).
/// - `Registry`: a data registry (lookup tables, enum definitions, config
/// bounds) — exempt from provability, validated for `metadata` + entries.
/// - `ModelFamily`: architecture metadata (`HuggingFace` family descriptors,
/// size variants, vendor) — exempt from provability, validated for
/// `metadata` fields. Custom top-level fields are preserved but not
/// enforced by the kernel schema.
/// - `ModelFamilyVariant`: a concrete size variant of a model family
/// (e.g. Llama 370M sovereign). Freezes hyperparameters (vocab, hidden
/// dim, layer count) and delta-dispatches invariants from the parent
/// family. Exempt from provability.
/// - `Tokenizer`: a concrete tokenizer contract — vocab bounds, required
/// special tokens, round-trip gate, normalization form. Exempt from
/// provability (gates are byte-exact tests, not Kani harnesses).
/// - `TrainingLoop`: a training-loop contract — loss schedule, optimizer
/// config, gradient-clipping policy, checkpoint cadence. Exempt from
/// provability; validated for `metadata` + schedule fields.
/// - `PretrainingCorpus`: a pretraining-corpus contract — dataset source,
/// license, total-bytes bound, shard layout. Exempt from provability.
/// - `TrainingPreconditionGate`: a hard precondition gate that must be
/// satisfied before training starts (e.g. Chinchilla compute-optimal
/// token/parameter ratio, GPU memory floor, dataset checksum). Exempt
/// from provability; validated for `metadata` + gate-formula fields.
/// - `CorpusAssembly`: a multi-source corpus assembly pipeline contract —
/// declares input shards, dedup strategy, license-merge policy, and
/// output manifest. Exempt from provability.
/// - `Pattern`: a cross-cutting verification pattern (threading safety,
/// async safety, compute parity) that applies across multiple kernels.
/// Exempt from the kernel provability invariant but still validated for
/// metadata and any proof/falsification data present.
/// - `Schema`: a generic reference/schema document — exempt from provability,
/// validated only for `metadata.id`, `metadata.version`, `metadata.description`,
/// and `metadata.references`.