explore

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package explore runs a fan-out of read-only "reader" sub-agents over a repository and synthesizes their findings into one answer. It is the parallel half of memcode's "many readers, one serialized writer" model: every explorer is read-only (read_file/ripgrep/git_diff, no edits or commands), so any number can run concurrently with no write contention. A final synthesis pass merges the per-scope findings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, st store.Store, runner *llm.Runner, root, model, question string, concurrency int, out io.Writer) error

Run fans out read-only explorers across the repository's subsystems (each scoped to one), collects their findings, and prints a synthesized answer to out. The store and provider are shared; the SQLite WAL serializes the event writes the explorers emit.

func Scopes

func Scopes(ctx context.Context, st store.Store) []string

Scopes is the public picker for the subsystem keys to fan out over.

Types

type Finding

type Finding struct {
	Scope  string
	Answer string
	Err    error
}

Finding is one explorer's answer for a scope.

func FanOut

func FanOut(ctx context.Context, st store.Store, runner *llm.Runner, root, model, question string, scopes []string, concurrency int, progress Progress) []Finding

FanOut runs one read-only explorer per scope concurrently (capped by concurrency, 0 = the default), reporting lifecycle via progress (may be nil), and returns the findings. Each explorer is its own read-only session writing to io.Discard — its tool calls and narration never reach the user; only the orchestrator's progress + the final synthesis do. This is what keeps deep research QUIET.

type Progress

type Progress func(scope string, done bool, err error)

Progress reports an explorer's lifecycle to a front-end (started/finished per scope), so the UI can show compact per-agent progress instead of every call.

Jump to

Keyboard shortcuts

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