Documentation
¶
Overview ¶
Package bootstrap seeds a cold vault from the git history already on disk.
The problem it solves is the first session on an existing repository. Memory starts empty, so the first agent gets nothing — not because nothing is known about the project, but because nothing has been written down *here* yet. The repository has been recording the same kind of thing for months: who works on it, where the work concentrates, how changes are described. That is signal the product otherwise waits weeks to accumulate.
The hard constraint is that everything here must be something git *attests*, not something a model infers from it. A commit message says what its author claimed they did; it does not say why, and it does not say whether the approach survived. So this package computes and never summarises: counts, ratios, dates, names. There is no model call in this file and there should never be one — a bootstrap that invented plausible project history would poison the vault with exactly the confident-and-wrong memories the rest of the system works to keep out.
Everything produced is marked Source "git-history" and given a confidence below anything a human stated by hand, because a derived fact about a repository is weaker evidence than a person saying it. That also makes the whole seeding reversible: one DELETE on the source.
Index ¶
Constants ¶
const Source = "git-history"
Source is stamped on every memory this package produces. It is the undo: deleting by source removes the whole bootstrap and nothing a human wrote.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidate ¶
type Candidate struct {
Text string
Kind memory.Kind
Confidence float64
Salience float64
// Evidence is the git output the claim was computed from, one short line.
// Not stored in the memory; shown to the user deciding whether to accept.
Evidence string
}
Candidate is one memory bootstrap proposes, with the evidence that produced it. Evidence is kept separate from Text so a caller can show its work before writing anything — see cmd/brain, which prints it and asks.
func FromGitHistory ¶
FromGitHistory reads dir's history and returns what it can honestly say about the project. An empty slice is a legitimate answer: a repository with three commits has nothing worth seeding, and inventing something for it would be worse than starting cold.