Versions in this module Expand all Collapse all v0 v0.0.13 Nov 18, 2026 v0.0.12 Oct 17, 2026 v0.0.11 Sep 24, 2026 Changes in this version + const BandKept + const BandQuarantine + const BandReview + const BandUndecided + const ConflictThreshold + const CostPerDocumentUSD + const DecisionExclude + const DecisionInclude + const DecisionUnknown + const DefaultSampleSize + const DefaultScreeningReasons + const DefaultSourceSample + const DefaultTopN + const GenerationKind + const RootFolder + var DraftRules = []string + var ErrConflicts = errors.New("scope: the self-check found conflicting contract lines") + var ErrDraftChanged = errors.New("scope: contract_draft changed during the preview; re-run --accept") + var ErrNoClaudeContract = errors.New("scope: the CLAUDE.md `## Selection contract` section has no contract text") + var ErrNoDraft = errors.New("scope: topic.yaml has no contract_draft") + var ErrNotConfirmed = errors.New("scope: contract not activated: confirmation did not match the topic slug") + func CleanDraft(c *contract.Contract) (*contract.Contract, []string) + func Folder(topicRel string) string + func FolderCountsLine(folders []FolderCount) string + func ImportClaude(topicRoot string) (*contract.Contract, error) + func IsScreeningFile(name string) bool + func ScopeLine(claudeMarkdown string) string + func Stratify(docs []*corpus.Document, n int) []*corpus.Document + type AcceptOptions struct + Confirm func(prompt string) (string, error) + Force bool + OnPreview func(PreviewReport) + OnSelfCheck func(Conflicts) + Preview PreviewOptions + Yes bool + type AcceptReport struct + Activated bool + Draft *contract.Contract + Forced bool + Preview *PreviewReport + SelfCheck Conflicts + func Accept(ctx context.Context, s *session.Session, opts AcceptOptions) (AcceptReport, error) + type BandCounts struct + Kept int + Quarantine int + Review int + Undecided int + type Conflict struct + P float64 + type Conflicts struct + Conflicts []Conflict + Pairs int + Threshold float64 + Undecided []string + func SelfCheck(ctx context.Context, s *session.Session, draft *contract.Contract) (Conflicts, error) + func (c Conflicts) Blocking() bool + type DecisionSummary struct + Count int + Decision string + Examples []string + Reasons []ReasonCount + type DraftInputs struct + Articles []string + Domain string + Dropped []string + ExistingContract *contract.Contract + Folders []FolderCount + ScopeText string + Screening []ScreeningSummary + SourceSample []SampleSource + Sources int + Title string + func CollectDraftInputs(topicRoot, title, domain string, c *corpus.Corpus, opts DraftOptions) (DraftInputs, error) + func Draft(ctx context.Context, s *session.Session, opts DraftOptions) (*contract.Contract, DraftInputs, error) + func (in DraftInputs) Prompt() string + type DraftOptions struct + Exclude []string + ScreeningReasons int + SourceSample int + type FolderBands struct + Folder string + Judged int + type FolderCount struct + Files int + Folder string + func FolderCounts(sources []*corpus.Document) []FolderCount + func SourceFolderCounts(topicRoot string) ([]FolderCount, error) + type LabelScore struct + Labels int + Negatives int + Precision float64 + Predicted int + Recall float64 + TruePositive int + type Pair struct + Excluded string + Kept string + KeptField string + N int + func BuildPairs(c *contract.Contract) []Pair + type PreviewOptions struct + OnEstimate func(documents int, estimateUSD float64) + SampleSize int + TopN int + type PreviewReport struct + Bands BandCounts + Contract string + CostUSD float64 + EstimateUSD float64 + Folders []FolderBands + Judged int + Labels *LabelScore + RelevanceOff bool + Sampled bool + Sources int + Thresholds map[string]float64 + Top []TopDocument + Undecided map[string]int + func Preview(ctx context.Context, s *session.Session, draft *contract.Contract, ...) (PreviewReport, error) + type ReasonCount struct + Count int + Reason string + type SampleSource struct + Folder string + Title string + type ScreeningSummary struct + Decisions []DecisionSummary + File string + Rows int + func SummarizeScreening(topicRoot string, maxReasons int, exclude ...string) ([]ScreeningSummary, error) + type TopDocument struct + Band string + POffTopic float64 + Path string + Reason string + Title string