finders

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package finders processes domain query structs into results. Finders encapsulate the actual read logic and hold injected dependencies. Pure reads — no side effects of their own (though injected dependencies may perform IO, e.g. the LLM call behind the pre-flight runner).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder

type Finder struct {
	// contains filtered or unexported fields
}

Finder holds dependencies and config shared across query methods.

func New

func New(preflightRunner llm.Runner) *Finder

New constructs a Finder with the given dependencies.

func (*Finder) Lint

func (f *Finder) Lint(q query.LintQuery) (*query.LintResult, error)

Lint returns every entry in the graph that has at least one warning, alongside the total warning count. Pure read — graph validation runs at graph-construction time, this just collects the results. Also checks summary hash staleness.

func (*Finder) List

func (f *Finder) List(q query.ListQuery) (*query.ListResult, error)

List returns entries matching q.Filter from q.Graph.

func (*Finder) LoadGraph

func (f *Finder) LoadGraph(dir string) (*model.Graph, error)

LoadGraph reads all .md files from dir (hierarchical YYYY/MM/ layout) and builds the graph.

func (*Finder) LoadWIPMarkers

func (f *Finder) LoadWIPMarkers(graphDir string) ([]*model.WIPMarker, error)

LoadWIPMarkers reads all marker files from the wip/ subdirectory of graphDir.

func (*Finder) Preflight

Preflight runs the pre-flight validator against the given query. Delegates to the llm package for prompt rendering, LLM invocation, and result parsing. Returns the parsed result regardless of finding count or severity; the caller decides what to block on via HasBlocking. Returns an error only for infrastructure failures.

func (*Finder) SchemaStatus added in v0.2.0

SchemaStatus reads .sdd/meta.json (if present) and evaluates its compatibility fields against the calling binary's version and schema version. Pure read; no side effects.

When meta.json is absent the result reports MetaExists = false and Compatible = true — an uninitialised graph is the init command's responsibility, not the write gate's.

func (*Finder) Show

func (f *Finder) Show(q query.ShowQuery) (*query.ShowResult, error)

Show resolves the entries named in q and returns groups with upstream and downstream chains. The heavy lifting (tree traversal, dedup, depth limiting) is delegated to model.Graph.BuildShowTree.

func (*Finder) SkillStatus added in v0.2.0

SkillStatus loads the embedded skill bundle for the query's target, then walks each entry to compare its embedded content against the file on disk. Classification happens in model.ComputeSkillStatus — the finder only supplies inputs.

func (*Finder) Status

func (f *Finder) Status(q query.StatusQuery) (*query.StatusResult, error)

Status assembles the per-section snapshots used by the status view. Pure read — every section comes from in-memory graph filters.

func (*Finder) WIPList

func (f *Finder) WIPList(q query.WIPListQuery) (*query.WIPListResult, error)

WIPList loads every active WIP marker from the wip/ subdirectory of q.GraphDir. Returns an empty result (not an error) when no markers exist.

Jump to

Keyboard shortcuts

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