learn

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package learn is the reconciler: it turns source documents and deterministic evidence into adjudicated claims. A claim becomes "current" only when corroborated by hard evidence or a fresh source; it is "conflicted" when it contradicts deterministic facts WITHIN ITS SCOPE, and "stale" when its source lagged the code. Nothing is promoted to truth on sight.

All evidence is gathered from git-tracked / non-ignored files (see repofiles), so vendored, generated and gitignored files never count.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facts

type Facts struct {
	PackageManager string // pnpm | yarn | npm | bun | ""
	Go             bool   // a go.mod exists
	CGODisabled    bool   // .goreleaser pins CGO_ENABLED=0
}

Facts are hard, deterministic signals used to adjudicate softer claims. Scope-sensitive signals (e.g. TypeScript usage) are evaluated within a claim's scope at adjudication time, not stored as repo-wide booleans.

type Summary

type Summary struct {
	Total      int
	Current    int
	Conflicted int
	Stale      int
	Candidate  int
}

Summary reports what a learn run produced.

func Run

func Run(ctx context.Context, st store.Store, runner *llm.Runner, root string) (Summary, error)

Run discovers sources, extracts candidate claims (model), folds in deterministic claims, adjudicates against git-tracked evidence, and replaces the stored claim set.

Jump to

Keyboard shortcuts

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