pub enum Kind {
Doc,
Skill,
Agent,
Section,
Function,
Type,
Trait,
Module,
Unknown,
}Expand description
The 9 native base kinds, plus a tolerant Unknown sink.
Variants§
Doc
Skill
Agent
Section
A heading-delimited block within a Doc — its own groundable unit with a file:line span,
contains-edged from its parent Doc. Lets grounding return the right section of a long
doc, not the whole file. (Sprint 3.5.)
Function
Type
Trait
Module
Unknown
Any unrecognized kind string deserializes here instead of failing the parse.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn normalize(raw: &str) -> Kind
pub fn normalize(raw: &str) -> Kind
Map a raw kind string — including legacy names — to a native kind.
specialist -> agent, workflow|archetype -> doc (Sprint 7: Flow collapsed to Doc);
unknown -> Unknown.
Sourcepub fn resolve(raw: &str, overrides: Option<&BTreeMap<String, String>>) -> Kind
pub fn resolve(raw: &str, overrides: Option<&BTreeMap<String, String>>) -> Kind
Resolve a frontmatter type/kind string into a native kind, consulting an optional
project-profile vocabulary first. Resolution order: a case-insensitive hit in overrides
(whose mapped value is then parsed by Kind::normalize) wins; otherwise fall back to
Kind::normalize directly. With overrides == None this is byte-for-byte normalize.