patterns

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package patterns implements learning pipeline D: an offline cross-branch pattern index. The learn worker compares each configured repo's branch tips against persisted state (milliseconds of git, zero LLM); only branches whose tips moved are re-mined — commit clusters become work units, one cheap call per branch turns them into repo-scoped pattern cards whose bodies carry representative diff hunks (the payload that makes "apply this pattern" work at retrieval time). Deleted branches retire their cards unless the work was merged.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Branches int // branches mined this run
	Created  []string
	Skipped  []string
	Retired  []string // cards of deleted, unmerged branches
	Notes    []string
	Usage    llmgen.Usage
}

Result reports one pattern-index run.

type Runner

type Runner struct {
	Base  string
	Store *store.Store
	Tier  *llmtier.Tier
	Logf  func(format string, args ...any)
}

Runner wires pipeline D's dependencies.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, repos []string) (Result, error)

Run indexes every configured repo. Per-repo failures degrade to notes — one broken checkout must not stall the others. ErrCapped stops the run with unmined tips left un-advanced (re-mined next run).

Jump to

Keyboard shortcuts

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