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 ¶
- type Finder
- func (f *Finder) Lint(q query.LintQuery) (*query.LintResult, error)
- func (f *Finder) List(q query.ListQuery) (*query.ListResult, error)
- func (f *Finder) LoadGraph(dir string) (*model.Graph, error)
- func (f *Finder) LoadWIPMarkers(graphDir string) ([]*model.WIPMarker, error)
- func (f *Finder) Preflight(ctx context.Context, q query.PreflightQuery) (*query.PreflightResult, error)
- func (f *Finder) SchemaStatus(ctx context.Context, q query.SchemaStatusQuery) (*query.SchemaStatusResult, error)
- func (f *Finder) Show(q query.ShowQuery) (*query.ShowResult, error)
- func (f *Finder) SkillStatus(ctx context.Context, q query.SkillStatusQuery) (*query.SkillStatusResult, error)
- func (f *Finder) Status(q query.StatusQuery) (*query.StatusResult, error)
- func (f *Finder) WIPList(q query.WIPListQuery) (*query.WIPListResult, error)
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 (*Finder) Lint ¶
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) LoadGraph ¶
LoadGraph reads all .md files from dir (hierarchical YYYY/MM/ layout) and builds the graph.
func (*Finder) LoadWIPMarkers ¶
LoadWIPMarkers reads all marker files from the wip/ subdirectory of graphDir.
func (*Finder) Preflight ¶
func (f *Finder) Preflight(ctx context.Context, q query.PreflightQuery) (*query.PreflightResult, error)
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
func (f *Finder) SchemaStatus(ctx context.Context, q query.SchemaStatusQuery) (*query.SchemaStatusResult, error)
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 ¶
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
func (f *Finder) SkillStatus(ctx context.Context, q query.SkillStatusQuery) (*query.SkillStatusResult, error)
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.