{"modulePath":"github.com/memcode-ai/memcode","version":"v0.56.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package acceptance\n\nPackage acceptance closes memcode's interaction loop by reading the room AFTER the work: did the agent's changes survive contact with the human? Git is the objective evidence most agents never look at — a commit is the strongest \"yes\", a revert the strongest \"no\", a manual edit a \"close, but\".\n\n\tagent acts → user reacts → git reveals accepted/corrected/rejected → memory adjusts\n\nIt compares each finished agent session's per-file result hashes against the current git state and records a session\\_outcome event (only when the verdict is definitive — an undecided session is re-checked on the next scan). The room reducer already consumes those outcomes, and \\`learn\\` weighting will next.\n\n## Constants\n\n```go\nconst (\n\tAccepted  = \"accepted\"  // committed substantially intact (high confidence)\n\tCorrected = \"corrected\" // agent's files manually changed after (medium)\n\tRejected  = \"rejected\"  // patch reverted / reset / discarded (high)\n\tUnknown   = \"unknown\"   // undecided — not recorded, re-checked later\n)\n```\nOutcome verdicts (string values match what room.Gather reads).\n\n## Functions\n\n```go\nfunc CorroborateClaim(ctx context.Context, root, path, claimedHash string, since time.Time) (verdict, confidence, evidence string)\n```\nCorroborateClaim checks ANY claimed file edit — not just one of memcode's own agent sessions — against CURRENT git/filesystem state: committed intact, changed since, reverted/absent, or still-dirty (matching or differing). It is the same deterministic evidence Reconcile already uses for memcode's own session outcomes (classifyFile), made callable for a claim from ANY source — an external tool's transcript, a focus.FileClaim. This is a NEW, separate call path: Reconcile's own event-log-driven loop, and what it records, are completely untouched.\n\nThe claim and this corroboration are two different kinds of evidence about two different questions (what a tool SAYS it did vs. what survived to disk) — never collapse them into one number; show both.\n\n## Types\n\n```go\ntype Result struct {\n\tSessionID  string `json:\"session_id\"`\n\tOutcome    string `json:\"outcome\"`\n\tConfidence string `json:\"confidence\"` // high | medium\n\tEvidence   string `json:\"evidence\"`\n}\n```\nResult is one reconciled session.\n\n```go\nfunc Reconcile(ctx context.Context, st store.Store, root string) ([]Result, error)\n```\nReconcile scans the event log for finished, not-yet-reconciled agent sessions and records a session\\_outcome for each one whose fate git can now confirm. No-op outside a git repo. Returns the outcomes it recorded.\n\n","path":"github.com/memcode-ai/memcode/internal/agent/acceptance","name":"acceptance","synopsis":"Package acceptance closes memcode's interaction loop by reading the room AFTER the work: did the agent's changes survive contact with the human? Git is the objective evidence most agents never look at — a commit is the strongest \"yes\", a revert the strongest \"no\", a manual edit a \"close, but\".","isRedistributable":true}
