Versions in this module Expand all Collapse all v0 v0.2.0 May 15, 2026 Changes in this version + const AbstractionExtracted + const AbstractionInlined + const CategoryAbstraction + const CategoryComments + const CategoryErrorHandling + const CategoryFormatting + const CategoryNaming + const CategoryTesting + const DefaultDecay + const ErrorCustom + const ErrorPanic + const ErrorSentinel + const ErrorWrapped + const NamingCamelCase + const NamingKebabCase + const NamingPascalCase + const NamingSnakeCase + const TestAssertLib + const TestPlain + const TestSubtests + const TestTableDriven + func AllCategories() []string + func AnalyzeCode(code string) map[string]string + func DetectAbstractionLevel(code string) string + func DetectCommentDensity(code string) float64 + func DetectErrorPattern(code string) string + func DetectLanguage(code string) string + func DetectNamingStyle(code string) string + func DetectTestStyle(code string) string + type Collector struct + func NewCollector(profile *Profile) *Collector + func (c *Collector) Cleanup(maxAge time.Duration) + func (c *Collector) PendingCount() int + func (c *Collector) RecentSignals(n int) []DiffSignal + func (c *Collector) RecordEdit(id string, final string) + func (c *Collector) RecordOutcome(id string, outcome Outcome) + func (c *Collector) RecordProposal(id string, proposed string) + type DiffSignal struct + Actual string + Category string + Proposed string + func ComputeDiff(proposed, final string) []DiffSignal + type Hooks struct + func NewHooks(projectID string, store *Store) (*Hooks, error) + func (h *Hooks) Collector() *Collector + func (h *Hooks) OnCodeAccepted(sessionID, proposedCode string) + func (h *Hooks) OnCodeEdited(sessionID, proposedCode, finalCode string) + func (h *Hooks) OnCodeProposed(sessionID, proposedCode string) string + func (h *Hooks) OnCodeRejected(sessionID, proposedCode string) + func (h *Hooks) Profile() *Profile + func (h *Hooks) PromptContext() string + type Outcome int + const OutcomeAccept + const OutcomeEdit + const OutcomeReject + func (o Outcome) String() string + type Profile struct + CreatedAt time.Time + Preferences map[string]Signal + ProjectID string + UpdatedAt time.Time + Version int + func NewProfile(projectID string) *Profile + func (p *Profile) Get(category string) Signal + func (p *Profile) Merge(other *Profile) + func (p *Profile) Reset() + func (p *Profile) Summary() string + func (p *Profile) ToPromptContext() string + func (p *Profile) Update(category string, signal Signal) + type Proposal struct + Final string + ID string + Outcome Outcome + Proposed string + RecordedAt time.Time + Signals []DiffSignal + type Signal struct + Confidence float64 + Decay float64 + LastUpdated time.Time + SampleCount int + Value string + type Store struct + func NewStore(baseDir string) (*Store, error) + func (s *Store) Delete(projectID string) error + func (s *Store) Export(projectID string) ([]byte, error) + func (s *Store) Import(data []byte) error + func (s *Store) List() ([]string, error) + func (s *Store) Load(projectID string) (*Profile, error) + func (s *Store) Save(projectID string, profile *Profile) error