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
79
80
81
82
83
84
85
86
87
88
//! Substrate reference (`@`-prefixed nav-ref).
//!
//! `Ref` is a universal substrate-reference primitive — the path-shaped
//! type any prism consumer uses to name a substrate location. The name is
//! drawn from mirror's nav-ref vocabulary (`.`, `..`, `...`, `~`, `@`,
//! `^`, `HEAD`); `@`-prefixed refs name substrate actions, paths, or
//! addressable locations (e.g. `@kintsugi/fracture/rename`,
//! `@quantize`, `@cli/new`).
//!
//! ## Hoisting from mirror
//!
//! `Ref` previously lived in `mirror::bootstrap::crystallize` and was
//! mirror-specific. It moved to `prismqueer` per the
//! `[substrate-pull:realize]` discipline: every consumer of `prismqueer`
//! (mirror, cosmos-mirror, spectral-db, future engines) needs the same
//! `@`-prefixed substrate reference. The validating constructor stays
//! verbatim — non-empty, `@`-prefixed, no whitespace.
//!
//! ## No `Default`
//!
//! There is deliberately no `Default` impl. An "empty" `@`-prefixed ref
//! is meaningless. The structural payoff: [`Transparency<Ref>`] does not
//! require `Ref : Default` because `Transparency`'s identity element is
//! structural (the `Clear` variant), not synthesised from `P::default()`.
//!
//! ## Validator hardening
//!
//! The constructor rejects empty input, missing `@` prefix, the bare
//! `@` (no path), ASCII whitespace AND the full control-character range
//! (`char::is_control()` — C0 + DEL + C1). Per Seam I2 (pre-merge
//! adversarial review, 2026-05-30): the validator IS the hardening
//! boundary; it must reject obvious shenanigans (terminal escape
//! sequences, null bytes, DEL) even when no downstream consumer is
//! exploitable today.
//!
//! [`Transparency<Ref>`]: terni::Transparency
/// A substrate reference, like `"@kintsugi/fracture/rename"`. Newtype
/// with `@`-prefix, non-empty, no-whitespace validation at construction.
///
/// Hash-blind by design; carries no OID, performs no hash computation.
/// Suitable as a `BTreeMap` key (derives `Ord`) and as a `HashMap` key
/// (derives `Hash`). No `Default` — see the module docs.
;