1. Conduid
  2. RAG
  3. masondelan/selvedge
MCP server · RAG

masondelan/selvedge

era codebases. AI agents call it to log structured change events (entity + diff + reasoning) before the session ends, then query history with diff, blame, history, changeset, and search. Captures the intent that would otherwise evaporate.

64Good

Scored 4 hours ago · breakdown

About masondelan/selvedge

masondelan/selvedge is an MCP server published by masondelan in the RAG category: era codebases. AI agents call it to log structured change events (entity + diff + reasoning) before the session ends, then query history with diff, blame, history, changeset, and search. Captures the intent that would otherwise evaporate. Conduid read 14 tools from its source: apply_choice, blame, changeset, diff, history, log_change and 8 more. It is published to PyPI as selvedge and runs with uvx.

The repository has 28 stars and 1 forks, and its last commit was on 30 Nov 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include agent-trace, ai-agent-reasoning, ai-code-provenance, ai-codebase-memory, ai-coding and codebase-change-tracking.

Install

uvx
uvx selvedge
pip
pip install selvedge
From source
git clone https://github.com/masondelan/selvedge

Tools (14)

apply_choiceWrite one allowed value to this fixture's configuration and explain why.
ParameterTypeDescription
rationale *string
value *string
blameMost recent change + context for an exact entity, plus the derived decision `status` (active / reverted / reopened)
ParameterTypeDescription
entity_path *stringExact entity path (no prefix matching). Examples: 'users.email', 'src/auth.py::login', 'env/STRIPE_SECRET_KEY'.
changesetAll events grouped under a named feature/task slug
ParameterTypeDescription
changeset_id *stringThe changeset identifier (the same slug or UUID passed to `log_change`'s changeset_id parameter). Examples: 'add-stripe-billing', 'fix-auth-redirect'.
diffHistory for an entity or entity prefix, each row annotated with `superseded_by`
ParameterTypeDescription
entity_path *stringEntity path, or a DOTTED prefix of one: 'users' also covers 'users.email'. Not a raw string prefix — 'src/' matches nothing, and 'src/auth.py' does not cover 'src/auth.py::login'.
limitintegerMaximum number of events to return.
historyFiltered history across all entities
ParameterTypeDescription
changeset_idstringFilter to a specific changeset (feature/task group).
entity_pathstringFilter to an entity, or a DOTTED prefix of one ('users' also covers 'users.email'). Not a raw string prefix.
limitintegerMaximum number of results.
projectstringFilter to a specific project/repository.
sincestringTime window — ISO 8601 datetime OR relative shorthand: '15m' (last 15 minutes), '24h' (last 24 hours), '7d' (last 7 days), '5mo' (last 5 months), '1y' (last year). 'm' means minutes; 'mo' or 'mon' means months. Unparseable values produce an error rather than silently returning empty results. Empty = all time.
log_changeRecord a change event with entity, diff, and reasoning. `rename_from` + `change_type="rename"` records the dual-event rename pattern; `change_type="supersede"` re-opens a reverted decision (append-only); optional `constraint` / `stale_when` keep the decision's principle and its invalidation condition queryable
ParameterTypeDescription
agentstringName/ID of the AI agent making the change (e.g. 'claude-code', 'cursor', 'copilot', 'human').
change_type *stringWhat kind of change. One of: add, remove, modify, rename, retype, create, delete, index_add, index_remove, migrate, revert (tried and rolled back), reject (considered and decided against, without writing the change), supersede (re-open a reverted decision). Invalid values are rejected — pick the closest match.
changeset_idstringOptional grouping ID for related changes that belong to the same feature or task. Use a short slug like 'add-stripe-billing'. All events sharing a changeset_id can be queried together via the `changeset` tool.
constraintstringOptional: the testable principle behind the decision, kept queryable (e.g. 'card data in our own DB = PCI scope').
diffstringThe actual change — SQL migration text, code diff, or a human-readable description of what changed. Optional but strongly recommended for non-trivial changes.
entity_path *stringDot/slash-notation path to the entity. Required and non-empty. Examples: 'users.email' (DB column), 'users' (DB table), 'src/auth.py::login' (function in file), 'src/auth.py' (file), 'api/v1/users' (API route), 'deps/stripe' (dependency), 'env/STRIPE_SECRET_KEY' (env variable).
entity_typestringCategory of entity. One of: column, table, file, function, class, endpoint, dependency, env_var, index, schema, config, other. Unknown values are coerced to 'other'.
expires_whenstringOptional machine-checkable expiry condition for this decision. Closed grammar, validated at write time: 'library:NAME>=VERSION' (revisit when the named dependency reaches a version, e.g. 'library:django>=5.0'), 'entity:PATH:changes' (revisit when that entity next changes, e.g. 'entity:users.email:changes'), 'date:ISO' (revisit on a date, e.g. 'date:2027-01-01'), or 'manual:LABEL' (opaque label for human review; never auto-fires). `stale_decisions` evaluates these from local state — no network, no LLM — and flags 'expired' with the pattern that fired. Values outside the grammar are rejected.
git_commitstringThe git commit hash this change will land in. Can be backfilled later via `selvedge backfill-commit` or the post-commit hook.
projectstringRepository or project name. Useful when one DB tracks multiple projects.
reasoningstringWhy the change was made. Include the user's original request, the problem being solved, or any context that won't be obvious from the diff alone. Good example: 'User asked to add 2FA — needs phone number to send SMS verification codes.' Avoid generic placeholders like 'user request' or 'done' — these are flagged by the quality validator and returned in `warnings`.
rename_fromstringThe entity's previous path, when this change is a rename. Set it together with change_type='rename' and put the NEW path in entity_path. Selvedge records the dual-event rename pattern: a 'rename' event on the old path and a 'create' event on the new path whose metadata.renamed_from points back to the old one, so blame/diff/prior_attempts on the new path still see the history. Leave empty for any non-rename change.
revisit_afterstringOptional revisit date for an architectural decision (table, schema, dependency, config). An ISO date OR a relative offset from this event's timestamp (e.g. '90d', '6mo'). `stale_decisions` surfaces it once it passes, if the entity is still in active use. Leave empty otherwise.
session_idstringThe agent session or conversation ID, if available.
stale_whenstringOptional: what would invalidate this decision (e.g. 'payment provider changed'). stale_decisions matches it against later events and flags 'review suggested' — surfacing only.
supersedesstringId of the prior event this change overrides; only valid with change_type='supersede'. Empty auto-links the entity's most recent removal event (remove/delete/index_remove/revert/reject) — so after a standalone rejection it re-opens the rejection. Append-only — the old verdict is never edited, just derived as superseded.
prior_attemptsPrior change attempts on an entity + inferred outcome (tried → reverted → re-opened) — call it before editing. Optional `fuzzy` query adds semantically similar records (needs the `semantic` extra; falls back to substring)
ParameterTypeDescription
descriptionstringFree-text description of what you're about to do, when you don't have an exact entity_path. Matched as a substring against prior reasoning, diffs, and entity paths. Provide this OR `entity_path` (entity_path takes precedence if both are given).
entity_pathstringThe entity you're about to change. Exact path with prefix matching — 'users' also covers 'users.email'. Examples: 'src/auth.py::login', 'users.email', 'env/STRIPE_SECRET_KEY'. Provide this OR `description`.
fuzzystringOptional semantic query: also return attempts on entities whose prior reasoning is similar to this text — catches renames (payment_token vs card_token). Rows are labeled match_type='fuzzy' with a similarity score; without the selvedge[semantic] extra it falls back to substring matching and says so in a leading note row.
limitintegerMaximum number of results.
min_confidencestringConfidence floor. 'proximity_high' (default) returns the high-signal rows: attempts closed by an explicit revert/reject (confidence 'exact' — always clears this floor, including standalone rejections) plus attempts reverted within the window. Pass 'proximity_low' to also see the noisy tail (still-active changes and far-apart reverts).
window_minutesintegerProximity window in minutes for the add->remove revert heuristic — the tiebreaker for IMPLICIT removal types only. An attempt removed within this many minutes is 'proximity_high'; beyond it, 'proximity_low'. Attempts closed by an explicit revert/reject are 'exact' regardless of the window. Default 10080 (7 days).
read_decisionsRead the project's maintained decision file, if one exists.
read_fileRead an exact project filename; no filesystem traversal or host access.
ParameterTypeDescription
path *string
read_projectRead the current task, permitted Python subset and available project files.
run_checksExecute the public checks against the written solution, at most twice.
searchFull-text search across all events
ParameterTypeDescription
limitintegerMaximum number of results.
query *stringSearch string (case-insensitive substring). Searches across entity_path, diff, reasoning, and agent fields. SQL LIKE wildcards (`_` and `%`) are escaped, so 'stripe_customer_id' matches the literal underscore rather than any single char.
stale_decisionsDecisions due for a revisit: past their `revisit_after` and still in active use (`flag="revisit_due"`), or whose `stale_when` condition matched a later change (`flag="review_suggested"`)
ParameterTypeDescription
agentstringOptional filter to the agent that logged the decision.
entity_pathstringOptional filter to a single entity or path prefix — 'users' also covers 'users.email'. Empty = every entity.
limitintegerMaximum number of results.
projectstringOptional filter to a specific project/repository.
write_fileWrite solution.py only (at most two writes, at most 16,000 characters).
ParameterTypeDescription
content *string
path *string

Security checks

  • ✓README presentThe repository's README runs to about 2.8K words.

5 checks have not been run yet.

README

The repository's README runs to about 2.8K words. The original in the repository is authoritative.

Read full README
Questions

About masondelan/selvedge

How do I install masondelan/selvedge?

Run uvx selvedge, then add the server to your MCP client's configuration.

Is masondelan/selvedge safe to use with an AI agent?

Its trust score is 64 out of 100 (good). It passes all 1 static checks Conduid ran on the repository. It has no ConduID identity yet, so agent calls to it are not receipted.

Is masondelan/selvedge still maintained?

Yes — the last commit was 2 days ago. The repository has 28 stars and 1 forks.

What tools does masondelan/selvedge provide?

Conduid read 14 tools from the source: apply_choice, blame, changeset, diff, history, log_change, prior_attempts, read_decisions and 6 more. 11 of them publish their parameters, listed under Tools above.