Documentation
¶
Index ¶
- Variables
- func FileTier(d model.Doc, force bool) map[string]model.Value
- func GitTier(d model.Doc, root string, force bool) map[string]model.Value
- func LLMTier(d model.Doc, s *schema.Schema, root string, force bool) map[string]model.Value
- func RunLLM(cmdline string, req LLMRequest) (map[string]model.Value, error)
- type LLMRequest
- type Result
Constants ¶
This section is empty.
Variables ¶
var LLMCmd string
LLMCmd is set by the mark command before Plan runs the llm tier.
Functions ¶
func FileTier ¶
FileTier derives id, title, and type from the path and headings. It fills absent keys and leaves existing values alone unless force is set. Values come from the raw sources (path slug, H1 heading, parent dir), not from d.Title/d.Type, which already prefer the frontmatter value and so could never be overwritten under force.
func GitTier ¶
GitTier derives lastUpdated and owner from git history. lastUpdated always refreshes: it is git's to own and moves on every commit, so a stale value is never what you want. owner is filled only when absent, since a project may set it by hand. force overwrites either.
Types ¶
type LLMRequest ¶
type LLMRequest struct {
Path string `json:"path"`
Title string `json:"title"`
Type string `json:"type"`
Excerpt string `json:"excerpt"`
Want []string `json:"want"`
Schema map[string]schema.Field `json:"schema"`
}
LLMRequest is the JSON written to the subprocess stdin.
type Result ¶
Result is the set of new field values for one document.