Documentation
¶
Overview ¶
Package kbvalidate provides deterministic structural validation of OKF knowledge-base entries (the merge gate) and an LLM-assisted semantic advisory. The structural checks mirror what curator.draftKBEntry emits and what catalog.parseEntry consumes, so a RunLore-authored entry that passes meetsBar also passes ValidateStructural by construction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WarnInvalid ¶
WarnInvalid runs ValidateStructural over entries and calls onInvalid(path, errs) for each entry that has structural Errors. It is the load-time strict-warn hook: the caller logs + increments a metric, but the entry is still served (one bad entry never empties the catalog). Returns the count of invalid entries. Warnings are not reported here.
Types ¶
type Advisory ¶
Advisory is the LLM-assisted semantic review of an entry. It is ADVISORY only — never a merge gate. Skipped is true when no model is configured or the review could not be obtained (the structural gate still applies).
func ReviewSemantic ¶
func ReviewSemantic(ctx context.Context, e catalog.Entry, m providers.ModelProvider) (Advisory, error)
ReviewSemantic asks the model to judge cause-explains-symptom and durability. It NEVER gates: a nil model, a model error, or a missing tool-call all return an Advisory with Skipped=true. The returned error is for logging only.
type Issue ¶
Issue is one validation finding against a frontmatter field or body section.
func ValidateStructural ¶
ValidateStructural runs deterministic structural checks on a parsed catalog entry. Errors fail the merge gate; warnings are advisory.