Skip to content

Agent memory and code decision concepts

Definitions used in Selvedge’s documentation for preserving and retrieving coding decisions. Start with the question you need to answer, then follow a concept to its practical guide. General concepts are distinguished from Selvedge-specific behavior; examples illustrate the workflow and are not customer results.

QuestionConcept
Where did this change come from, and what evidence explains it?AI code provenance
What should an agent retain across sessions?Agent memory
Was this approach considered or tried before?Prior attempt
How do I find decisions about a function or column?Entity-level tracking
Which recorded decisions belong to the same task?Changeset
What would justify reconsidering an old decision?Stale decision
Was the explanation supplied during the work or reconstructed later?Recorded versus inferred reasoning

Selvedge is a local MCP server and CLI for recording code decisions, stated reasons, and outcomes. Selvedge’s log_change writes the event; Selvedge’s prior_attempts retrieves recorded approaches and outcomes before a later edit. This workflow needs both capture and retrieval. A connected server does not automatically preserve every decision or guarantee that an agent follows it.

Start with the worked rejection-and-revisit guide. It shows how to record a constraint, retrieve it in another session, and preserve the original explanation when new evidence justifies a revision.

If you are choosing how to keep this history, compare instruction files, ADRs, and event records. A maintained document can be sufficient; choose a format your project will actually use. For commands and parameters, use the MCP tool reference and quickstart.