Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidTypes = []Type{ TypeFact, TypeDecision, TypePreference, TypeContext, TypeSkill, TypeIntent, TypeObservation, TypeNote, TypeDivergence, }
Functions ¶
func IsValidType ¶
func NewID ¶
NewID generates a trace ID from a title: YYYYMMDD-slugified-title.
If the slugified title already begins with a date prefix (either `YYYYMMDD-` or `YYYY-MM-DD-`), the leading date is stripped before today's date is prepended. This is a defensive measure: agents commonly include dates in titles to mark when an event occurred (e.g., "20260402 dadbot heartbeat check"), and without the strip the resulting ID would carry two date prefixes (`20260402-20260402-dadbot-heartbeat-check`). The strip does not validate that the digits form a real calendar date — its only job is to prevent visual prefix duplication in the final ID.
Types ¶
type Frontmatter ¶
type Frontmatter struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Type string `yaml:"type"`
Author string `yaml:"author,omitempty"`
Tags []string `yaml:"tags,omitempty"`
DerivedFrom []string `yaml:"derived_from,omitempty"`
Origin string `yaml:"origin,omitempty"`
Created string `yaml:"created"`
Updated string `yaml:"updated"`
}
type Trace ¶
type Trace struct {
Frontmatter
Body string
}
Click to show internal directories.
Click to hide internal directories.