Documentation
¶
Overview ¶
Package od carries OpenDesign's `od:` skill-frontmatter namespace, kept verbatim so a bundle written for either tool loads in the other. It is a leaf package on purpose: both the skills subsystem and the design subsystem read these types, and neither may depend on the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitFrontmatter ¶
SplitFrontmatter separates the YAML frontmatter of a Markdown document from its body. It lives here because the design subsystem parses embedded skill bundles without going through the skills manager.
func Strip ¶
Strip removes the top-level `od:` key from a frontmatter document and re-encodes the rest. It reports false when the frontmatter is not a mapping or carries no od key. Callers use it to keep a skill whose od block they cannot understand: an unreadable extension must not make the skill invisible.
Types ¶
type Craft ¶
type Craft struct {
Requires []string `yaml:"requires"`
}
Craft lists the craft references the template expects to read. Names are resolved inside the skill directory, never outside it.
type Critique ¶
type Critique struct {
Policy string `yaml:"policy"`
}
Critique carries the per-skill critic policy consumed in P8.
type DesignSystem ¶
type DesignSystem struct {
Requires bool `yaml:"requires"`
}
DesignSystem states whether the template needs a committed design system.
type Metadata ¶
type Metadata struct {
// Mode separates bundles that produce an artifact ("template") from the
// craft references a template pulls in ("reference"). An unknown or empty
// mode is treated as a template when a surface is declared.
Mode string `yaml:"mode"`
// Surface is the design kind the template targets ("web", "deck").
Surface string `yaml:"surface"`
// Category and Scenario group the bundle in the gallery.
Category string `yaml:"category"`
Scenario string `yaml:"scenario"`
// ExamplePrompt is the starter brief the gallery offers as "Try it".
ExamplePrompt string `yaml:"example_prompt"`
Preview Preview `yaml:"preview"`
DesignSystem DesignSystem `yaml:"design_system"`
Craft Craft `yaml:"craft"`
Critique Critique `yaml:"critique"`
}
Metadata is the `od:` frontmatter block, OpenDesign's namespace kept verbatim so a bundle written for either tool loads in the other. The block is optional: a skill without it is an ordinary skill and every field below keeps its zero value, which is why the parser exposes it as a pointer.