acceptance

package
v0.24.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 8 Imported by: 0

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

View Source
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

This section is empty.

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.

func Reconcile

func Reconcile(ctx context.Context, st store.Store, root string) ([]Result, error)

Reconcile 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL