Versions in this module Expand all Collapse all v0 v0.27.0 Dec 2, 2026 Changes in this version + const LensPattern + const RiskHigh + const RiskNotHigh + const RiskUnknown + var RiskTiers = []string + func NormalizeLenses(lenses []string, field, fix string) ([]string, error) + func SetContext(d *Draft, c Context, by string) error + type Context struct + Lenses []string + Risk *Risk + SetLenses bool + SetRisk bool type Draft + Lenses []string + Risk *Risk type EditInput + Lenses json.RawMessage type Finding + Lenses []string type FindingInput + Lenses []string + type Risk struct + Reasons []string + Tier string + func CheckRisk(r *Risk, fix string) (*Risk, error) v0.26.0 Nov 20, 2026 Changes in this version type Draft + Verdict string v0.25.2 Nov 17, 2026 v0.25.1 Nov 17, 2026 v0.25.0 Nov 16, 2026 v0.24.2 Nov 13, 2026 v0.24.1 Nov 12, 2026 Changes in this version + const ByAgent + const ByHuman + const DecisionAccepted + const DecisionExcluded + const DispositionAccepted + const DispositionExcluded + const DispositionPending + const DispositionWithdrawn + const HandBackSchema + const LabelPattern + const MaxReturnNoteRunes + const NoteDismissed + const NoteOpen + const NoteResolved + const ReturnFile + const ReturnSchema + const SchemaVersion + const SideLeft + const SideRight + const StatusAddressed + const StatusOpen + var ErrNoChange = errors.New("draft unchanged") + func Accept(d *Draft, findingID, choice string, now time.Time) ([]string, error) + func AcceptWithNote(d *Draft, findingID, choice, note string, now time.Time) ([]string, error) + func AgentChangedHumanText(f Finding) bool + func Assess(d *Draft, against AssessedAgainst, earlier []EarlierFinding, ...) (dropped int, err error) + func AssessmentCounts(d *Draft, earlier []EarlierFinding) (open, addressed, unassessed int) + func Awaiting(d *Draft, h *HandBack) []string + func CheckBatch(inputs []FindingInput, failed []EntryFailure, dif *diff.Diff, rules Rules) error + func Digest(d *Draft) string + func DismissNote(d *Draft, noteID string, now time.Time) error + func Dispositions(d *Draft) map[string]string + func EarlierRef(i int) string + func Exclude(d *Draft, findingID string, now time.Time) ([]string, error) + func ExcludeWithReason(d *Draft, findingID, reason string, now time.Time) ([]string, error) + func FindingState(d *Draft, findingID string) ([]byte, error) + func IncludedCount(d *Draft) int + func NextFindingID(d *Draft) string + func NextNoteID(d *Draft) string + func NextReplyID(d *Draft) string + func ReadinessRefusal(d *Draft) error + func Recalibratable(f Finding) error + func RecordHandBack(dir string, getenv func(string) string) (added int, err error) + func Reinstate(d *Draft, findingID, choice string, rules Rules, now time.Time) ([]string, error) + func ResolveNote(d *Draft, noteID string, now time.Time) error + func Restore(d *Draft, findingID string) error + func Rewritable(f Finding) error + func Seal(dir string, expectVersion int, note string, getenv func(string) string, ...) error + func SetSummary(d *Draft, summary string, expectFindings *int, by string) error + func ValidateExcludeReason(reason string) error + func ValidateLabel(label string) error + func ValidateReason(r Reason) error + func ValidateReferences(refs []string, fix string) error + func ValidateReturnNote(note string) error + type AssessInput struct + Ref string + Status string + type AssessedAgainst struct + From string + PublicationID string + ReviewURL string + Round int + type Assessment struct + Finding EarlierFinding + Ref string + Status string + type Decision struct + At time.Time + Choice string + Decision string + FindingID string + FindingRev int + Note string + type Draft struct + AssessedAgainst *AssessedAgainst + Assessments []Assessment + ChangedIn map[string]int + Decisions map[string]Decision + Findings []Finding + Notes []Note + Replies []Reply + Schema int + Summary string + Version int + func Load(dir string) (*Draft, error) + func Mutate(dir, command string, expectVersion *int, getenv func(string) string, ...) (*Draft, error) + func MutateFinding(dir, command, findingID string, expectVersion *int, getenv func(string) string, ...) (*Draft, error) + func NewEmpty() *Draft + type EarlierFinding struct + Blocking bool + Body string + FiledIn FiledIn + ID string + Label string + Location *Location + Title string + type EditInput struct + Blocking json.RawMessage + Body json.RawMessage + Confidence json.RawMessage + General json.RawMessage + Impact json.RawMessage + Label json.RawMessage + Location json.RawMessage + Options json.RawMessage + Proposal json.RawMessage + References json.RawMessage + Severity json.RawMessage + SuggestedFix json.RawMessage + Title json.RawMessage + Verified json.RawMessage + WithdrawReason json.RawMessage + type EntryFailure struct + Decoding bool + Entry int + Err error + type FiledIn struct + Commit string + ReviewURL string + Round int + type Finding struct + Blocking bool + Body string + By string + Confidence string + CreatedAt time.Time + General bool + History []HistoryEntry + ID string + Impact string + Included bool + Label string + Location *FindingLocation + Options []Option + Proposal string + References []string + Rev int + Severity string + SuggestedFix string + Title string + UpdatedAt time.Time + Verified string + func Add(d *Draft, inputs []FindingInput, dif *diff.Diff, rules Rules, by string, ...) ([]Finding, error) + func Edit(d *Draft, findingID string, in EditInput, included *bool, dif *diff.Diff, ...) (f Finding, cleared bool, err error) + func Ordered(d *Draft) []Finding + func PublishableSet(d *Draft) []Finding + func Recalibrate(d *Draft, findingID, label string, blocking bool, dif *diff.Diff, rules Rules, ...) (Finding, error) + func Rewrite(d *Draft, findingID, title, body string, rules Rules, dif *diff.Diff, ...) (Finding, error) + type FindingGate struct + Disposition string + Regraded bool + Reinstated bool + func GateOf(d *Draft, f Finding) FindingGate + type FindingInput struct + Blocking bool + Body string + Confidence string + General bool + Impact string + Label string + Location *LocationInput + Options []OptionInput + Proposal string + References []string + Severity string + SuggestedFix string + Title string + Verified string + type FindingLocation struct + Heading string + Line int + Path string + Side string + StartLine int + func (l FindingLocation) Published() Location + type GateCounts struct + Excluded int + Regraded int + Reinstated int + Withdrawn int + func GateCountsOf(d *Draft) GateCounts + type HandBack struct + Notes []string + Schema int + func LoadHandBack(dir string) (*HandBack, error) + type HistoryEntry struct + At time.Time + By string + Changed map[string]any + Reason *Reason + type Location struct + Line int + Path string + Side string + StartLine int + type LocationInput struct + Heading *string + Line int + Path string + Side string + StartLine int + type Note struct + At time.Time + Body string + ClosedAt *time.Time + FindingID string + ID string + Status string + func SendBack(d *Draft, findingID, body string, now time.Time) (Note, error) + type Option struct + Key string + Label string + Proposal string + Recommended bool + type OptionInput struct + Label string + Proposal string + Recommended bool + type Readiness struct + Accepted []string + Excluded []string + OpenNotes []string + Pending []string + Ready bool + Withdrawn []string + func ReadinessOf(d *Draft) Readiness + type Reason struct + Code string + Text string + func CurrentReason(f Finding) *Reason + type Reply struct + At time.Time + Body string + By string + ID string + NoteID string + func AddReply(d *Draft, noteID, body, by string, now time.Time) (Reply, error) + type Return struct + DraftVersion int + Note string + ReturnedAt time.Time + Schema int + func LoadReturn(dir string) (r Return, ok bool, err error) + type Rules struct + AllowProposal bool + GeneralOnly bool