Documentation
¶
Overview ¶
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".
agent acts → user reacts → git reveals accepted/corrected/rejected → memory adjusts
It 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.
Index ¶
Constants ¶
const ( Accepted = "accepted" // committed substantially intact (high confidence) Corrected = "corrected" // agent's files manually changed after (medium) Rejected = "rejected" // patch reverted / reset / discarded (high) Unknown = "unknown" // undecided — not recorded, re-checked later )
Outcome verdicts (string values match what room.Gather reads).
Variables ¶
This section is empty.
Functions ¶
func CorroborateClaim ¶ added in v0.46.0
func CorroborateClaim(ctx context.Context, root, path, claimedHash string, since time.Time) (verdict, confidence, evidence string)
CorroborateClaim 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.
The 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.
Types ¶
type Result ¶
type Result struct {
SessionID string `json:"session_id"`
Outcome string `json:"outcome"`
Confidence string `json:"confidence"` // high | medium
Evidence string `json:"evidence"`
}
Result is one reconciled session.