Documentation
¶
Overview ¶
Package propose turns what a candidate missed in a contest into one change to the skill's prose.
It is given the missed expectations and the judge's evidence, and never the task prompts, the suite or the workspace. A proposer that cannot read a task cannot write a change tailored to one, which is the whole overfitting defence — there is no held-out split here, because one proposal validated once cannot compound the way an iterating loop does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoLosses = fmt.Errorf("propose: this candidate recorded no loss, so there is nothing to work from")
ErrNoLosses reports a candidate with nothing to work from. Inventing an improvement with no evidence is the edit this command exists to replace.
Functions ¶
Types ¶
type File ¶
type File struct {
// Path is relative to the bundle root, e.g. "SKILL.md".
Path string
Body string
}
File is one prose file from the bundle, as it stands.
type Input ¶
type Input struct {
Skill string
// Files are the bundle's prose. A contest compares whole bundles, so a
// skill often loses a task because a reference is wrong.
Files []File
// Losses are every recorded loss of one candidate, addressed together: a
// skill is prose read as a whole, so five edits to five missed
// expectations are one rewrite, not five proposals.
Losses []Loss
// Description is the spec's description when the skill has a stored spec.
// Empty when it has none.
Description string
}
Input is one proposal request.
type Loss ¶
Loss is one task a candidate failed. TaskID identifies it for a reader; the prompt sent to the model carries the expectations and the evidence only.
type Result ¶
type Result struct {
Changes []Change `json:"changes"`
// Description is the spec's new description, empty when unchanged or when
// the skill has no spec.
Description string `json:"description"`
// Rationale is one short paragraph a reader weighs the diff against.
Rationale string `json:"rationale"`
}
Result is what the model proposed.