Help us shape the future of Go! Take the 2026 Go Developer Survey

mark

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LLMCmd string

LLMCmd is set by the mark command before Plan runs the llm tier.

Functions

func FileTier

func FileTier(d model.Doc) map[string]model.Value

FileTier derives id, title, and type from the path and headings. It returns only keys the doc does not already have.

func GitTier

func GitTier(d model.Doc, root string) map[string]model.Value

GitTier derives lastUpdated and owner from git history.

func LLMTier

func LLMTier(d model.Doc, s *schema.Schema, root string) map[string]model.Value

LLMTier builds a request for llm-derived fields the doc lacks and runs it.

func RunLLM

func RunLLM(cmdline string, req LLMRequest) (map[string]model.Value, error)

RunLLM runs cmdline, feeds it req as JSON, and returns validated values.

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

type Result struct {
	Path    string
	Updates map[string]model.Value
	Derived []string
}

Result is the set of new field values for one document.

func Plan

func Plan(docs []model.Doc, s *schema.Schema, root string, tiers []string) []Result

Plan runs the requested tiers over docs and returns one Result per doc that gained a field. Tiers run in order; each fills only absent keys. Later tiers see earlier tiers' additions through the merged view.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL