Documentation
¶
Overview ¶
Package substrate classifies effective process docs (workflows, skills, principles) as default|edited|authored for the CLI list surface and the web effective-process view (sty_29e5a9a5 / sty_ba0eb5c6).
Pure over a docindex.Store + embedded defaults — no I/O beyond reading disk bodies when a path is real. documents and tasks are excluded (free-form and workitem plane).
Index ¶
- Constants
- func ApplyStamp(body, sha string) string
- func Classify(d docindex.Doc, emb map[string]string) string
- func EmbeddedBodies() map[string]string
- func IsUneditedSeed(diskBody, embeddedBody string) bool
- func SHA(body string) string
- func StripStamp(body string) (stripped, stamp string, stamped bool)
- type Row
Constants ¶
const StampKey = "embedded_sha"
StampKey is the frontmatter key carrying the seed provenance hash.
Variables ¶
This section is empty.
Functions ¶
func ApplyStamp ¶
ApplyStamp inserts the seed-provenance stamp as the LAST frontmatter line of body, in whichever form the file is authored in (sty_81bb0dde):
--- [meta] name: x name = "x" embedded_sha: <sha> embedded_sha = "<sha>" ---
FORMAT IS SNIFFED, the same way docindex.Frontmatter sniffs it: a body opening with `---` is markdown, anything else is TOML. A file with neither is returned unchanged — an unstampable body is operator-authored by definition, and the reconcile table already treats "no stamp" as untouchable.
ApplyStamp and StripStamp must remain EXACT byte inverses in both forms, or re-stamping an unedited seed registers as an operator edit and the file is backed up and surfaced on every init.
func EmbeddedBodies ¶
EmbeddedBodies maps kind\x00name → body for non-task embedded defaults.
func IsUneditedSeed ¶
IsUneditedSeed reports whether on-disk body is an unedited copy of embedded (stamped or stampless identical). Shared with prune.
func StripStamp ¶
StripStamp removes the single stamp line from body's frontmatter. Exact inverse of ApplyStamp, in both forms.