Documentation
¶
Overview ¶
Package learn is the background learning worker: it drains the SessionEnd inbox through the mining pipeline under a lockfile, per-transcript cursors, and the llmtier spend caps. Spawned detached by the session-end hook and runnable manually as `culi learn`. It must be safe to run at any moment: locked ⇒ exit quietly; capped ⇒ stop, keep the queue; no backend ⇒ report options, keep the queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
FromStart bool // ignore cursors, re-mine transcripts from the beginning
ForceStyle bool // bypass the style-synthesis trigger policy
}
Options tunes one worker run.
type Summary ¶
type Summary struct {
Backend string
Jobs int // jobs seen
Mined int // sessions that produced windows and a model call
Clean int // sessions with zero windows (free)
Created []string
Reinforced []string
Confirmed []string
Retired []string
StyleObs int
Style style.Result // pipeline B synthesis, when it fired
Patterns patterns.Result // pipeline D branch index
Usage llmgen.Usage
Notes []string
Capped bool
}
Summary reports one worker run.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package branchgen implements learning pipeline C (`culi gen`): repository git facts → two one-shot structured calls (Strong drafts CLAUDE.md sections, Cheap extracts repo-scoped cards) → idempotent writes.
|
Package branchgen implements learning pipeline C (`culi gen`): repository git facts → two one-shot structured calls (Strong drafts CLAUDE.md sections, Cheap extracts repo-scoped cards) → idempotent writes. |
|
Package gitfacts renders a deterministic, zero-LLM analysis of a git repository: modules and churn, commit conventions, dependencies, build/test layout, branch-unique work, and the existing CLAUDE.md as a prior.
|
Package gitfacts renders a deterministic, zero-LLM analysis of a git repository: modules and churn, commit conventions, dependencies, build/test layout, branch-unique work, and the existing CLAUDE.md as a prior. |
|
Package llmtier gives the learning pipelines their model access: an explicit Cheap/Strong generator pair (plan §cost control) behind the multi-backend llmgen seam, gated by a persistent daily spend ledger.
|
Package llmtier gives the learning pipelines their model access: an explicit Cheap/Strong generator pair (plan §cost control) behind the multi-backend llmgen seam, gated by a persistent daily spend ledger. |
|
Package mine implements learning pipeline A: deterministic signal windows from one session's transcript → a single cheap structured call (escalated once on failure) → deduplicated candidate cards with a reinforcement lifecycle.
|
Package mine implements learning pipeline A: deterministic signal windows from one session's transcript → a single cheap structured call (escalated once on failure) → deduplicated candidate cards with a reinforcement lifecycle. |
|
Package patterns implements learning pipeline D: an offline cross-branch pattern index.
|
Package patterns implements learning pipeline D: an offline cross-branch pattern index. |
|
Package queue manages the learn inbox: job files written by the SessionEnd hook, a lockfile so only one worker mines at a time, and per-transcript byte cursors.
|
Package queue manages the learn inbox: job files written by the SessionEnd hook, a lockfile so only one worker mines at a time, and per-transcript byte cursors. |
|
Package style implements learning pipeline B: periodic synthesis of the per-session style observations that the miner appends to state/style_observations.jsonl.
|
Package style implements learning pipeline B: periodic synthesis of the per-session style observations that the miner appends to state/style_observations.jsonl. |
|
Package transcript reads Claude Code session transcripts (JSONL) and extracts deterministic signal windows for the learning miner — the zero-LLM stage 0 that decides whether a session is worth any model call at all.
|
Package transcript reads Claude Code session transcripts (JSONL) and extracts deterministic signal windows for the learning miner — the zero-LLM stage 0 that decides whether a session is worth any model call at all. |
Click to show internal directories.
Click to hide internal directories.