Skip to main content
Glama

Long-term memory for AI-coded codebases — including what was already tried and rejected.

Line attribution tells you who wrote something. Selvedge tells your agent what not to write next: the approaches this codebase already tried, reverted, and why. It's a git blame for AI agents, for the why rather than which model touched which line — captured live, by the agent, as the change happens, so nothing downstream has to guess at it.

Selvedge is a local MCP server. AI coding agents (Claude Code, Cursor, Copilot) call it as they work to log structured change events with reasoning. Your data stays in a SQLite file under .selvedge/ next to your code.

Local-first by default, team-server by choice, zero-LLM always.


Six months ago, your AI agent added a column called user_tier_v2. You don't know why. git blame points to a commit from claude-code with a generated message that says "Update schema." The session that made the change is long gone — and so is the prompt that produced it.

With Selvedge, you run this instead:

$ selvedge blame user_tier_v2

  user_tier_v2
  Changed     2025-10-14 09:31:02
  Agent       claude-code
  Commit      3e7a991
  Reasoning   User asked to add a grandfathering flag for legacy free-tier
              users during the pricing migration. Stores the original tier
              so we can backfill discounts without touching billing history.

That reasoning was captured by the agent in the moment — written into Selvedge from the same context that produced the change. Not inferred from the diff afterward by a second LLM. Not a hand-typed commit message.



Who Selvedge is for

Selvedge has two audiences. Same tool, same pip install, same SQLite file under .selvedge/. Different scale of pain.

Teams running long-term, AI-coded codebases. When the project is big enough that you (or someone else) will touch it again in six months, twelve months, three years — but most of it was written by an agent whose context evaporated the day each PR shipped. git blame tells you what changed. Selvedge tells you why — even after the agent session, the prompt template, the developer who asked for it, and the model version are all long gone. This is the original use case: production codebases, schema decisions, migrations, dependency changes that need an audit trail that survives turnover.

Solo developers using Claude Code on everyday projects. Side projects, weekend builds, the small internal tool you keep poking at. You don't need enterprise governance — you just need to remember why you (or your agent) did the thing you did yesterday, last week, last sprint. Run selvedge init once. Add four lines to your CLAUDE.md. From then on, selvedge blame is muscle memory — a way to talk to your past self when your past self was an LLM.

If you've ever come back to your own AI-built project and thought "what was this for again?", Selvedge is the missing piece.


Related MCP server: claude-engram

The problem

Human-written code leaks intent everywhere — commit messages, PR descriptions, inline comments, the Slack thread that preceded it. AI-written code doesn't. The agent has perfect clarity about why it made each decision, but that context lives in the prompt and evaporates when the conversation ends.

Six months later, your team is debugging a schema decision with no trail. git blame tells you what changed and when. It can't tell you why.

Selvedge captures the why — live, by the agent itself, as the change is made. The diff is git's job. The why is Selvedge's.


What's new in v0.3.11

Abandoned alternatives are first-class, and the log can prove itself.

Rejections and reverts are now stated outcomes, not inferences. change_type="reject" records "we considered this and decided against it" without writing the change — the counterpart to revert for paths never taken. prior_attempts reads both as a new confidence: "exact" tier; the old proximity heuristic drops to tiebreaker. And the expires_when column that shipped dormant in v0.3.8 gets its evaluator: a closed, machine-checkable grammar — library:NAME>=VERSION, entity:PATH:changes, date:ISO, manual:LABEL — validated at write time, evaluated locally by selvedge stale with no network and no LLM. A rejection stored with the condition that would invalidate it is a decision that knows when to die.

The event log is now tamper-evident. Every logged event gets a SHA-256 chain record in a sidecar table, same transaction, over every field except the late-bound git_commit (git already witnesses that one). Two new selvedge verify checks: chain_intact fails hard when a chained row was edited, deleted, or reordered out-of-band — the check names the exact sequence number — and chain_coverage warns (never fails) about rows that predate the chain. Legitimate operations append boundary records instead of breaking the chain, so migrate-paths and a destructive-gated prune verify clean while a silent sqlite3 edit does not. selvedge verify --json publishes the attestation manifest. Honest scope, stated in the module itself: this detects casual and accidental modification and produces an independently verifiable export; it is not proof against a motivated local attacker.

Also: the PreCompact reminder now distinguishes "edited with no log" from "log exists but was truncated," and both hook surfaces have their determinism pinned byte-for-byte in tests; capture-time nudges suggest recording the invalidating condition when a reject/revert lands without one; selvedge supersede gains -d/--diff, --revisit-after, and --expires-when (#31); and an id-less supersede no longer re-opens every earlier revert on the path (#30). Tests 984 → 1114.


What's new in v0.3.10

The memory comes to the agent, and the store gets its dials. Two themes, shipped together because the config half is what the rest needed to read settings from.

Delivery. Selvedge already blocked re-edits of reverted entities. What was missing was delivery when there is nothing to veto. Two new hooks:

  • SessionStart injects a compact digest as a session begins — decisions due for a revisit, entities that were tried and reverted, recent changesets.

  • PreCompact fires just before context compaction destroys this session's reasoning and names the watched entities you edited but never logged.

Both are quiet when they have nothing to say, size-capped, read-only, and templated. Neither can block anything — PreCompact deliberately declines the veto the hook API offers it. This is the answer to a measured failure mode: "Delivery, Not Storage" (arXiv:2607.20972) recorded a pull-model memory tool going unused entirely (zero voluntary memory operations across 114 turns against a pre-seeded store) while deterministic injection landed every time.

selvedge export --format markdown renders the store as a reviewable digest to commit next to it, so captured intent shows up in a pull request instead of hiding inside a binary. Deterministic — regenerating with no new events is a zero-line diff.

Config. .selvedge/config.toml is now first-class, with a canonical precedence chain that selvedge doctor prints per setting. It brings:

  • selvedge prune --include-events — the first path that can delete captured reasoning, so it needs both a confirmation and SELVEDGE_DESTRUCTIVE=1. Neither alone is enough, because --yes in a cron entry defeats a prompt and a shell profile defeats an env var. Events retention defaults to never.

  • Event-size bounds (diff_bytes, reasoning_bytes) that truncate loudly — a marker in the text, a warning at write time, a count in selvedge stats.

  • Secret-shape warnings at log_change, extendable via redaction_patterns, plus a doctor row that scans what's already stored. Warn, never reject.

Also: five review issues closed. The enforcement hook's allow path is 40% faster (33.6 ms → 20.1 ms per gated call) and SELVEDGE_HOOK_DISABLE=1 finally short-circuits before the imports it was documented to skip; log_change no longer discards revisit_after / constraint / stale_when on renames and supersedes; the CLI's --json and the MCP tools now return identical structures; and the Docker image no longer ships the maintainer's own database. Tests 826 → 984.



Where Selvedge fits

AI agents call Selvedge as they work. Selvedge captures the why into a durable, queryable store and emits it back out — as Agent Trace records for cross-tool readers, as observability metadata that links into Sentry/Datadog stack traces, and as compliance artifacts for SOC 2 and EU AI Act audits.

Selvedge does not replace git (line-level what/when), PR review tools (review-time quality), agent observability (LLM call traces), or general-purpose code-host AI features. It sits between them — the provenance-as-first-class-citizen layer that everything else references.


How Selvedge compares

There's a fast-growing "git blame for AI agents" category. Here's where Selvedge fits — and where it deliberately doesn't.

Rejected paths

Reasoning source

Granularity

Mechanism

Grouping

Storage

Selvedge

Queryableprior_attempts returns tried → reverted → re-opened

Captured live, by the agent in the same context that produced the change

Entity — DB column, table, env var, dep, API route, function

MCP server — agent calls it as work happens

Changesets — named feature/task slugs across many entities

SQLite, zero deps

OpenLore

Purged — rejected is an inactive status, dropped from the queryable store after each decision sync (the annotation survives in the synced spec markdown)

Derived — tree-sitter static analysis of code state, plus commit-gated decision notes

AST node (18 languages + 12 IaC)

MCP server — one-time index + commit-time certificates

Call-graph edges

SQLite graph in .openlore/

AgentDiff (sunilmallya)

None

Inferred post-hoc by Claude Haiku from the diff at session end

Line

Claude Code lifecycle hooks → local daemon

Session/task

JSONL on disk

AgentDiff (codeprakhar25)

None

ed25519-signed cross-agent provenance

Line

Per-agent editor hooks + git hooks (sign at commit)

None

Signed traces in git refs

Origin

None — rework flags reverted AI code post-hoc, without rationale

Prompt receipts, captured live per turn

Line

Agent lifecycle hooks + git post-commit hook

None

Git notes + sessions branch

Git AI

None

Attribution metadata

Line

Agent-invoked checkpoint → Git notes at commit

None

Git notes

BlamePrompt

None

Prompt receipts — prompt, cost, tools; no stated rationale

Line

Agent-lifecycle hooks + post-commit hook

None

Git notes

Why "rejected paths" matter — the one that isn't copyable. The expensive failure isn't forgetting why a column exists. It's an agent confidently re-implementing something the team already killed for a good reason, six months after everyone who knew that left the context window. None of the line-attribution tools above surface rejected paths at all, and it isn't a feature gap they can close in a release — a line-oriented store has no notion of an entity that persisted across a try → revert → retry cycle. See docs/demos/prior-attempts.md.

Why determinism matters. Selvedge's reasoning is the agent's own intent, written from the same context window that produced the change. There is no model anywhere in the storage or retrieval path, so the same query returns the same answer today and in two years, across model versions. Tools that infer reasoning post-hoc are running a second LLM that never saw the original prompt: what it produces is paraphrase, and re-running it can produce different categories for the same change. As a Hacker News commenter put it about a competing approach, "grep won't find your commit because you rejected 'oauth-library'… unless there is deterministic enforcement" (0x457).

Determinism alone is no longer a separator — OpenLore is deterministic-native too, and says so. The compound that separates is append-only testimony: reasoning the agent wrote itself, kept in a store where a rejection is a first-class record rather than an inactive status to be swept up.

Why "entity-level" matters. Most tools attribute lines. Selvedge attributes things you actually search for: users.email, env/STRIPE_SECRET_KEY, api/v1/checkout, deps/stripe. The first question after git blame is usually "what's the history of this column", not "what's the history of lines 40–48 of users.py".

Why "captured live" matters. Not a differentiator on its own — every tool here claims some flavour of it — but it's the mechanism that makes the reasoning trustworthy. Writing at the moment of the change, from the context that produced it, is the reason there's no second model in the path to hallucinate an explanation. An empty reasoning field is itself an honest signal: the agent didn't have one.

Comparison current as of 2026-08-05; OpenLore at v2.1.8 / 265★, verified against its source. Corrections welcome as an issue.

Why "changesets" matter. A Stripe billing rollout touches the users table, two new env vars, three new API routes, one dependency, and four functions across the codebase. Tag every event with changeset:add-stripe-billing and you can pull the entire scope back later — even if the original PR was broken into eight smaller ones over a month.

Selvedge ↔ Agent Trace. Agent Trace is an open AI code-attribution wire format published by Cursor (RFC, Jan 2026). Its original GitHub home went 404 in August 2026 and the multi-vendor momentum behind it has faded, but the spec and schema still resolve at agent-trace.dev, frozen at v0.1.0. Since v0.3.9, selvedge export --format agent-trace emits Agent Trace v0.1.0 records and selvedge import --format agent-trace reads them back — a portable, documented interchange format for file/line AI attribution, with reasoning and entity-level provenance carried in each record's dev.selvedge metadata. The mapping is in docs/agent-trace-interop.md; Selvedge vendors the schema and has no runtime dependency on the upstream project.


Quickstart

Two commands, inside Claude Code. No prior pip install — the plugin bootstraps the server itself via uvx (or pipx):

/plugin marketplace add masondelan/selvedge
/plugin install selvedge@selvedge

That's the whole agent-facing surface in one step:

  • the MCP server — 8 tools (log_change, prior_attempts, blame, diff, history, changeset, search, stale_decisions);

  • a skill that tells the agent when to call them — before editing a tracked entity, after any substantive change;

  • the PreToolUse enforcement hook — schema/migration edits are blocked until prior_attempts has been checked this session, with the prior reasoning in the block message;

  • slash commands/selvedge:status, /selvedge:blame <entity>, /selvedge:history, /selvedge:prior-attempts <entity>.

The store (.selvedge/selvedge.db) creates itself on the first logged change. Two optional extras stay CLI-side: the post-commit hook that stamps each event with its commit hash (selvedge install-hook), and — if you want the selvedge command on your own shell PATHpip install selvedge, which the launcher then prefers over uvx for an exact pinned version.

Plugin or selvedge setup for Claude Code? Pick one. Both wire the MCP server; running both registers it twice. The plugin is the lighter path and the one that updates itself. If you're on the plugin and only want the post-commit commit-hash stamping, run selvedge install-hook on its own.

Any other MCP client — selvedge setup

Cursor, Copilot, Windsurf, Codex CLI, Gemini CLI, and the rest:

pip install selvedge
cd your-project
selvedge setup

That's it. selvedge setup is an interactive wizard: it detects which AI tools you have (Claude Code, Cursor, Copilot), writes the MCP entry into each one's config, drops the canonical agent-instructions block into your project's prompt file (CLAUDE.md / .cursorrules / copilot-instructions.md), installs the PreToolUse enforcement hook into .claude/settings.json (Claude Code only — blocks schema/migration edits until prior_attempts has been checked; --skip-enforcement-hook to opt out), runs selvedge init, and installs the post-commit hook. Every modified file gets a .bak written next to it before any change reaches disk. Re-running is a no-op.

For CI bootstrap or devcontainer.json postCreateCommand:

selvedge setup --non-interactive --yes

Verify the wiring — open a second terminal in the same project:

selvedge watch

Make any change in your AI tool — add a column, rename a function, add an env var. selvedge watch should print the new event within a second of the agent calling log_change. If nothing arrives, run selvedge doctor for a single-command health check that tells you which step is silently broken.

Query your history:

selvedge status                        # recent activity + missing-commit count
selvedge diff users                    # all changes to the users table
selvedge diff users.email              # changes to a specific column
selvedge blame payments.amount         # what changed last and why
selvedge history --since 30d           # last 30 days of changes
selvedge history --since 15m           # last 15 minutes ('m' = minutes)
selvedge changeset add-stripe-billing  # all events for a feature/task
selvedge search "stripe"               # full-text search
selvedge stats                         # log_change coverage report (per-agent)
selvedge import migrations/            # backfill from migration files
selvedge export --format csv           # dump history to CSV

If you don't want to run the wizard, the four manual steps it automates:

1. Initialize in your project

cd your-project
selvedge init

2. Register the MCP server

Selvedge is a standard stdio MCP server, so it works with any MCP client — Claude Code, Cursor, Windsurf, Codex CLI, Gemini CLI, and more. See Works with any MCP client for the exact config per client. For Claude Code:

claude mcp add selvedge -- selvedge-server

3. Tell your agent to use it

selvedge prompt --install CLAUDE.md

Point --install at whichever prompt file your client reads — the block itself is identical across clients:

Client

Prompt file

Claude Code

CLAUDE.md

Codex CLI (and other AGENTS.md-aware tools)

AGENTS.md

Cursor

.cursor/rules/selvedge.md (or legacy .cursorrules)

Gemini CLI

GEMINI.md

This installs the canonical agent-instructions block, sentinel-bracketed (<!-- selvedge:start --> / <!-- selvedge:end -->) so future --install calls update the bracketed region without disturbing anything else in the file. Or pipe it:

selvedge prompt | tee -a CLAUDE.md

Prefer to copy-paste? The same block is one click away on the website: selvedge.sh/prompt-block — with a copy button and notes on what your agent does with it.

4. Install the post-commit hook

selvedge install-hook

That's the same four steps the wizard runs.


Works with any MCP client

Selvedge is a standard stdio MCP server — its launch command is selvedge-server, put on your PATH by pip install selvedge. Any MCP-capable client can run it. Pick yours:

claude mcp add selvedge -- selvedge-server

Or commit a project-level .mcp.json so your whole team gets it:

{
  "mcpServers": {
    "selvedge": { "command": "selvedge-server" }
  }
}

Docs: https://code.claude.com/docs/en/mcp

.cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "selvedge": { "command": "selvedge-server" }
  }
}

Cursor's newer schema also accepts an explicit "type": "stdio"; the command-only form works too (Cursor infers stdio from command). Docs: https://cursor.com/docs/mcp

~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "selvedge": { "command": "selvedge-server" }
  }
}

Windsurf hot-reloads the file — no restart needed. The in-app Plugins → View raw config button opens the exact file Cascade reads. Docs: https://docs.windsurf.com/windsurf/cascade/mcp

~/.codex/config.toml:

[mcp_servers.selvedge]
command = "selvedge-server"

Or run codex mcp add selvedge -- selvedge-server. Docs: https://developers.openai.com/codex/config-reference

~/.gemini/settings.json (or .gemini/settings.json per project):

{
  "mcpServers": {
    "selvedge": { "command": "selvedge-server" }
  }
}

Or run gemini mcp add -s user selvedge selvedge-server. Docs: https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md

Most clients share the same JSON shape — point yours at:

{
  "mcpServers": {
    "selvedge": { "command": "selvedge-server" }
  }
}

If selvedge-server isn't found, use its absolute path (which selvedge-server).


How it works

Selvedge runs as an MCP server. AI agents in tools like Claude Code call Selvedge's tools as they work — logging structured change events to a local SQLite database.

Each event records:

  • What changed (entity path, change type, diff)

  • When (timestamp)

  • Who (agent, session ID)

  • Why (reasoning — captured from the agent's context in the moment)

  • Where (git commit, project)

The diff is git's job. The why is Selvedge's.


Selvedge tracks its own history

This repo dogfoods Selvedge: its .selvedge/selvedge.db is committed, so a fresh clone ships with Selvedge's own why-history. Clone it and ask why any part of Selvedge changed:

git clone https://github.com/masondelan/selvedge
cd selvedge
selvedge status                       # recent changes to Selvedge itself
selvedge search "telemetry"           # why the opt-in heartbeat shipped
selvedge blame selvedge/semantic.py   # why semantic search was added

Every event was logged by the agents that built Selvedge — the same log_change calls this README asks you to make in your own project.


Entity path conventions

users.email           DB column (table.column)
users                 DB table
src/auth.py::login    Function in a file (path::symbol)
src/auth.py           File
api/v1/users          API route
deps/stripe           Dependency
env/STRIPE_SECRET_KEY Environment variable

Prefix queries work everywhere: users returns users, users.email, users.created_at, and any other entity under the users. namespace.


MCP tools

When connected as an MCP server, Selvedge exposes:

Tool

Description

log_change

Record 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

diff

History for an entity or entity prefix, each row annotated with superseded_by

blame

Most recent change + context for an exact entity, plus the derived decision status (active / reverted / reopened)

history

Filtered history across all entities

changeset

All events grouped under a named feature/task slug

search

Full-text search across all events

prior_attempts

Prior 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)

stale_decisions

Decisions 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")


CLI reference

selvedge init [--path PATH]               Initialize in project
selvedge status                           Recent activity summary
selvedge diff ENTITY [--limit N]          Change history for entity
selvedge blame ENTITY                     Most recent change + context
selvedge history [--since SINCE]          Browse all history
              [--entity ENTITY]
              [--project PROJECT]
              [--changeset CS]
              [--summarize]
              [--limit N]
selvedge changeset [CHANGESET_ID]         Show events in a changeset
                  [--list]                or list all changesets
                  [--project NAME]
                  [--since SINCE]
selvedge search QUERY [--limit N]         Full-text search
selvedge prior-attempts ENTITY            Prior attempts + inferred outcome,
                       [--description T]   with the tried → reverted →
                       [--all]             re-opened trail + status line
                       [--window 7d]       (--all widens recall)
                       [--fuzzy TEXT]      add semantic matches (needs the
                                           semantic extra; substring fallback)
selvedge supersede ENTITY                 Re-open a reverted decision —
                  --reasoning TEXT         append-only, links the prior
                  [--constraint TEXT]      reverted event (or --supersedes ID)
                  [--stale-when TEXT]
                  [--supersedes ID]
selvedge index [--model NAME]             Build/update the optional semantic
              [--json]                     embeddings index (selvedge[semantic])
selvedge stale [--entity ENTITY]          Decisions due for a revisit: past
              [--project NAME]            revisit_after + still in use, or
              [--agent NAME]              stale_when matched by a later change
              [--json]                    ("review suggested")
selvedge stats [--since SINCE]            Tool call coverage report (per-tool, per-agent)
selvedge doctor [--json]                  Health check: DB path, schema, hook, MCP wiring
selvedge install-hook [--path PATH]       Install git post-commit hook
                     [--window MIN]       (default 60 minutes)
selvedge backfill-commit --hash HASH      Backfill git_commit on recent events
                        [--window MIN]    (default 60 minutes)
selvedge import PATH                      Import migrations (SQL / Alembic) or
              [--format auto|sql|         an Agent Trace file (agent-trace)
                 alembic|agent-trace]
              [--from-git]                or walk git history for reverts:
              [--since REF|DATE]          revert-message commits + deletions
              [--project NAME]            become change_type="revert" events
              [--dry-run]                 (idempotent on commit + entity)
selvedge export [--format json|csv|       Export history (agent-trace =
                 markdown|agent-trace]      Agent Trace v0.1.0 records;
                                            markdown = reviewable digest)
              [--since SINCE]
              [--entity ENTITY]
              [--ndjson]                  agent-trace: one record per line
              [--collapse-by-session]     agent-trace: merge a session into one
              [--output FILE]
selvedge log ENTITY CHANGE_TYPE           Manually log a change
             [--diff TEXT]                CHANGE_TYPE: add, remove, modify,
             [--reasoning TEXT]           rename, retype, create, delete,
             [--agent NAME]               index_add, index_remove, migrate,
             [--commit HASH]              revert, supersede
             [--project NAME]
             [--changeset CS]
             [--revisit-after WHEN]       ISO date or offset (e.g. 90d)
             [--rename-from OLD]          OLD path when CHANGE_TYPE is 'rename'
             [--constraint TEXT]          the principle behind the decision
             [--stale-when TEXT]          what would invalidate it
             [--supersedes ID]            with CHANGE_TYPE 'supersede'
selvedge migrate-paths                    Re-canonicalize stored entity paths
                      [--apply]           (dry-run by default; --apply writes)
                      [--json]

All read commands support --json for machine-readable output.

Relative time in --since:

  • 15m → last 15 minutes (m = minutes)

  • 24h → last 24 hours

  • 7d → last 7 days

  • 5mo → last 5 months (mo or mon = months)

  • 1y → last year

Unparseable inputs (e.g. --since yesterday) exit with a clear error rather than silently returning empty results. ISO 8601 timestamps are also accepted and normalized to UTC.


Configuration

Method

Format

Example

Env var

SELVEDGE_DB=/path/to/db

Per-session override

Project init

selvedge init

Creates .selvedge/selvedge.db in CWD

Global fallback

~/.selvedge/selvedge.db

Used if no project DB found

Hook watch globs

.selvedge/config.toml

[hook]watch_globs = ["**/migrations/**", "db/**/*.sql"] — replaces the enforcement hook's default schema/migration globs

Project settings

.selvedge/config.toml

See the key list below — retention, size bounds, redaction patterns

Global settings

~/.selvedge/config.toml

Same keys; the project file wins where both set one

Hook bypass

SELVEDGE_HOOK_DISABLE=1

Disables the PreToolUse enforcement hook for the shell

Semantic extra

pip install "selvedge[semantic]"

Enables selvedge index + prior-attempts --fuzzy (local model2vec embeddings, ~30 MB; core never depends on it)

.selvedge/config.toml

Every key is optional; a missing file means the defaults below. Precedence is CLI flag → env var → project .selvedge/config.toml → global ~/.selvedge/config.toml → default. SELVEDGE_DB is the one exception: it always wins for database resolution, because the config file is found by resolving that path. selvedge doctor prints the effective value and the step that produced it for every setting.

retention_days_events     = 0       # 0 = never delete events (the default)
retention_days_tool_calls = 90      # local telemetry retention
backup_keep_last          = 7
diff_bytes                = 65536   # truncate oversized diffs at log time
reasoning_bytes           = 32768   # truncate oversized reasoning
db_size_warn_mb           = 500     # doctor warns above this
stale_days                = 0       # 0 = off
digest_max_bytes          = 4096    # cap on the session-start digest
redaction_patterns        = []      # extra secret shapes to warn about

[hook]
watch_globs = ["**/migrations/**", "db/**/*.sql"]

Every key also has an env override (SELVEDGE_DIFF_BYTES, SELVEDGE_RETENTION_DAYS_EVENTS, …).


Reviewing captured intent in a pull request

.selvedge/selvedge.db is a SQLite file, so the reasoning inside it doesn't show up in a diff. Export a Markdown digest next to it and commit both:

selvedge export --format markdown -o .selvedge/DECISIONS.md
git add .selvedge/

The digest is grouped by entity with reverted decisions first, and it is deterministic — regenerating with no new events produces a zero-line diff, so it stays reviewable instead of becoming noise everyone learns to skip. Heading anchors derive from the entity path, so links into it keep working as it grows. Regenerate it in the same commit as the code, or from a pre-commit hook.


Coverage checking

Wondering how often your agent actually calls log_change? Two ways to check:

# Quick summary in the terminal
selvedge stats

# Cross-reference against git commits
python scripts/coverage_check.py --since 30d

The coverage script compares your git log against Selvedge events and shows which commits have associated change events. Low coverage usually means the system prompt needs strengthening — see docs/fallbacks.md for guidance.

In CI (GitHub Action)

The same check ships as the Selvedge Coverage Check composite Action, so you can track agent coverage on every push — and optionally fail the build when it drops:

# .github/workflows/selvedge-coverage.yml
name: Selvedge coverage
on: [push, pull_request]
jobs:
  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0            # full history so commits can be matched
      - uses: masondelan/selvedge@v0.3.11   # pin to a release tag (or @main for latest)
        with:
          since: 30d
          fail-under: "0.5"         # optional: fail below 50% coverage; omit to report only

It writes a coverage summary to the job summary and exposes coverage-ratio, covered, and total as step outputs. The action cross-references your git history against the Selvedge event log, so the runner needs the project's .selvedge/selvedge.db (commit it, or restore it before this step) and full git history (fetch-depth: 0). Inputs: since, window, limit, fail-under, selvedge-version, python-version, working-directory, db-path.


Contributing

git clone https://github.com/masondelan/selvedge
cd selvedge
pip install -e ".[dev]"
pytest

See CLAUDE.md for architecture details and the phase roadmap.


License

MIT — see LICENSE.

Available Tools

8 tools
blameBlame an entityA
Read-onlyIdempotent

Most recent change to an entity — what changed, when, who, why.

Like git blame but for semantic entities (DB columns, functions, env vars, dependencies) and AI agents. Also carries the derived decision state: status (active / reverted / reopened) and superseded_by (id of a later supersede overriding this change, or ""). If no history exists for the entity, returns {"error": "..."} with protocol-level isError: false.

ParametersJSON Schema
NameRequiredDescriptionDefault
entity_pathYesExact entity path (no prefix matching). Examples: 'users.email', 'src/auth.py::login', 'env/STRIPE_SECRET_KEY'.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
diffYes
agentYes
errorYes
statusYes
projectYes
metadataYes
reasoningYes
timestampYes
constraintYes
git_commitYes
session_idYes
stale_whenYes
supersedesYes
change_typeYes
entity_pathYes
entity_typeYes
changeset_idYes
expires_whenYes
revisit_afterYes
superseded_byYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate safe read-only idempotent operation. The description adds value by detailing return fields (status, superseded_by) and error handling behavior (returns error object with isError: false). No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short paragraphs, no fluff. The first sentence immediately states the core purpose. Every sentence adds necessary context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single parameter, existing output schema, and comprehensive annotations, the description covers the tool's functionality, return data, and error case fully and clearly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter with 100% schema coverage. The description adds the constraint 'exact entity path (no prefix matching)' and provides examples, enhancing the schema's description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the most recent change to an entity, likening it to git blame for semantic entities. It distinguishes from siblings like history or diff by focusing on the latest change and including decision state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does and notes error behavior when no history exists. It lacks explicit guidance on when not to use or alternatives, but the purpose is clear enough for correct selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

changesetGet a changesetA
Read-onlyIdempotent

All events that share a changeset_id, oldest first.

Use to reconstruct the full scope of a feature or task across multiple entities. If the changeset has no events, returns [{"error": "..."}] so the caller can distinguish "unknown changeset" from "empty history."

ParametersJSON Schema
NameRequiredDescriptionDefault
changeset_idYesThe changeset identifier (the same slug or UUID passed to `log_change`'s changeset_id parameter). Examples: 'add-stripe-billing', 'fix-auth-redirect'.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive. Description adds ordering (oldest first) and specific error format, going beyond annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, each with clear purpose. No wasted words. First sentence states what the tool does, second gives usage context and error handling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple single-parameter tool with full schema coverage and an output schema, the description sufficiently covers ordering, error condition, and intended use. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and fully describes the changeset_id parameter. Description adds no new parameter semantics beyond what the schema provides, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'All events that share a changeset_id, oldest first.' It specifies the resource (events) and ordering, distinguishing it from siblings like 'history' (likely broader) and 'search' (different target).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use to reconstruct the full scope of a feature or task across multiple entities,' providing clear context. Also describes error behavior for empty changesets. Lacks explicit when-not or alternative comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

diffDiff an entity's historyA
Read-onlyIdempotent

Get change history for a codebase entity, newest first.

Supports prefix matching — e.g. 'users' returns all events for the users table and any users.* column. Each event carries a derived superseded_by id ("" when nothing overrode it), so the tried → reverted → re-opened trail reads straight off the history.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of events to return.
entity_pathYesEntity 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'.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds valuable behavioral context: newest-first ordering, dotted-prefix matching scope, and the derived `superseded_by` id with empty-string semantics for the latest event. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded: the first sentence gives the core purpose, and the second provides high-value examples of prefix matching and derived data. Every sentence earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema and safety annotations, the description sufficiently covers the essential behavior: ordering, prefix semantics, and the derived superseded_by trail. It does not discuss sibling-tool selection, but the core functionality is thoroughly described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers both parameters fully (100% coverage), so the baseline is 3. The description restates prefix matching with an example but does not add new parameter-level semantics beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns change history for a codebase entity, newest first, and highlights unique behaviors like prefix matching and the derived `superseded_by` field. However, it does not explicitly differentiate from the similarly-named sibling tool `history`, so it stops short of full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: call this when you need a chronological change history for an entity, especially with prefix matching. But the description does not compare this tool to alternatives like `history` or `blame`, nor does it mention exclusions or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

historyBrowse historyA
Read-onlyIdempotent

Filtered change history across all entities, newest first.

Combine since, entity_path, project, and changeset_id to scope the result. On unparseable since input the response is [{"error": "..."}] so the caller sees the problem.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results.
sinceNoTime 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.
projectNoFilter to a specific project/repository.
entity_pathNoFilter to an entity, or a DOTTED prefix of one ('users' also covers 'users.email'). Not a raw string prefix.
changeset_idNoFilter to a specific changeset (feature/task group).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnly=true, idempotent=true, and destructive=false, so safety is covered. The description goes beyond by disclosing the error behavior for unparseable 'since' input, returning a JSON error array instead of silently returning empty results. This is valuable behavioral context not in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: the first states purpose and ordering, the second gives usage guidance and error handling. It is front-loaded, with no wasted words, and every sentence contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists and the description covers purpose, filtering, ordering, and error behavior, the tool is fully specified for an agent. The description is complete for this 5-parameter optional-input tool without needing to explain return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions for each parameter, so the baseline is 3. The description adds minor value by explicitly stating these parameters can be combined, but it does not explain syntax or semantics beyond what the schema already provides. No compensation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Filtered change history across all entities, newest first.' It uses a specific verb ('browse' implicitly via 'history') and resource ('all entities'), and the 'newest first' ordering adds precision. This distinguishes it from siblings like log_change, diff, and search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance on how to combine filter parameters ('since', 'entity_path', 'project', 'changeset_id') to scope results. It does not explicitly mention when not to use this tool or name alternatives, but the usage context is clear enough for an agent to know when to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

log_changeLog a code changeA

Record a change to a codebase entity.

Call this immediately after making any meaningful change. The event is written to the local SQLite store and returned with its assigned id and timestamp. If the reasoning fails the quality validator (empty, too short, or a generic placeholder), or the entity_path doesn't match the usual shape for its entity_type, the result includes a warnings array — the event is still stored.

Renames: pass the new path in entity_path, set change_type="rename", and pass the old path in rename_from. Selvedge then writes two events — a rename on the old path and a create on the new path with metadata.renamed_from set — so the entity's history follows it. Example:

log_change(
    entity_path="src/auth/session.py::login",   # new path
    change_type="rename",
    rename_from="src/auth.py::login",            # old path
    entity_type="function",
    reasoning="Split auth.py into an auth/ package; login moved.",
)

Rejections: when you consider an approach and decide against it WITHOUT writing the change, record the verdict with change_type="reject" — the abandoned path is a first-class event, and the next agent's prior_attempts query finds it as a high-confidence ("exact") row instead of re-deriving the dead end. Name what was rejected AND what was chosen instead, and record the condition that would invalidate the verdict. Example:

log_change(
    entity_path="users.card_pan",
    change_type="reject",
    entity_type="column",
    reasoning="Rejected storing raw card PANs on the user row — "
              "went with provider tokens instead; PANs in our own "
              "DB put us in PCI scope.",
    stale_when="payment provider changed",
    expires_when="entity:deps/stripe:changes",
)

Use change_type="revert" for the sibling case — the change WAS written and then rolled back (clearer than a plain remove).

Superseding a reverted decision: when a reverted change becomes correct again (the constraint that killed it no longer holds), do NOT delete or edit history — log with change_type="supersede" and the reason. The new event links the prior revert (auto-resolved when supersedes is empty) and every read surface then reports the trail tried → reverted → re-opened. Never re-apply a reverted change without superseding it first.

On validation failure (invalid change_type, missing entity_path, rename_from set without change_type='rename', supersedes set without change_type='supersede', a supersede with nothing to re-open, or an expires_when outside the closed grammar) the result is {"status": "error", "error": "..."} with no event written.

ParametersJSON Schema
NameRequiredDescriptionDefault
diffNoThe actual change — SQL migration text, code diff, or a human-readable description of what changed. Optional but strongly recommended for non-trivial changes.
agentNoName/ID of the AI agent making the change (e.g. 'claude-code', 'cursor', 'copilot', 'human').
projectNoRepository or project name. Useful when one DB tracks multiple projects.
reasoningNoWhy 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`.
constraintNoOptional: the testable principle behind the decision, kept queryable (e.g. 'card data in our own DB = PCI scope').
git_commitNoThe git commit hash this change will land in. Can be backfilled later via `selvedge backfill-commit` or the post-commit hook.
session_idNoThe agent session or conversation ID, if available.
stale_whenNoOptional: what would invalidate this decision (e.g. 'payment provider changed'). stale_decisions matches it against later events and flags 'review suggested' — surfacing only.
supersedesNoId 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.
change_typeYesWhat 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.
entity_pathYesDot/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_typeNoCategory of entity. One of: column, table, file, function, class, endpoint, dependency, env_var, index, schema, config, other. Unknown values are coerced to 'other'.other
rename_fromNoThe 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.
changeset_idNoOptional 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.
expires_whenNoOptional 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.
revisit_afterNoOptional 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.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
errorYes
statusYes
warningsYes
timestampYes
supersedesYes

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations carry near-zero information (all false except openWorldHint), so the description carries the full burden. It comprehensively discloses: the warnings array on quality-validator failure, the exact error shape on validation failure, the dual-event rename behavior, supersede auto-linking, and append-only semantics. No contradiction with annotations (readOnlyHint=false correctly implies a write).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long, but every section earns its place given the complexity — headers ('Renames:', 'Rejections:', 'Superseding a reverted decision:') with code examples make it scannable. Slightly verbose in repeating rename semantics already in the schema's rename_from field, but organized enough that the density is justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a 16-parameter write tool with 5 complex change_type workflows. The description covers all change types, the validation grammar, failure/error shapes, examples for each major flow, and the output schema exists. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, giving a baseline of 3, but the description adds genuine orchestration semantics beyond the schema: rename's dual-event pattern (rename on old path + create on new path with metadata.renamed_from), the reject naming requirement ('name what was rejected AND what was chosen instead'), and that empty supersedes auto-links the most recent removal event. This is behavioral glue the schemas don't spell out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Record a change to a codebase entity' — and immediately distinguishes itself: call it after a meaningful change, while siblings diff/blame/history/prior_attempts are read surfaces. An agent can clearly separate it from the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use for each change_type: 'Call this immediately after making any meaningful change,' with dedicated workflows for rename, reject, revert, and supersede. Names why reject is preferable to re-deriving dead ends ('the next agent's prior_attempts query finds it as a high-confidence row') and why supersede beats editing history. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

prior_attemptsPrior attempts on an entityA
Read-onlyIdempotent

Prior change attempts on an entity, each with an inferred outcome.

Call this BEFORE editing an entity. If the same change was tried before and reverted, you get the prior reasoning and change_type plus an inferred outcome — so you can change your plan instead of repeating a rejected approach.

Each result is a change event plus the trail fields: outcome ("reverted" — a later removal on the path; "reopened" — closed but a later supersede re-opened it; "rejected" — a standalone reject event that closed no earlier attempt, surfaced as its own row whose reasoning IS the record; "active"), confidence ("exact" — the attempt was closed by an explicit revert/reject, or the row is a standalone rejection; "proximity_high" / "proximity_low" — the add->remove window heuristic for implicit removals), outcome_reasoning (WHY it was rejected), superseded_by + supersede_reasoning (the re-open, when present), and current_status — the entity's standing now. Treat "reverted" and "rejected" as "don't repeat this without a supersede"; "reopened" means the old verdict no longer stands. Together they read: tried → reverted → re-opened. Templated and deterministic — no LLM call; pull-only.

Conservative by design — min_confidence defaults to "proximity_high", so an empty list (nothing clearly tried-and-rejected) is the normal, preferred answer over a speculative false positive; "exact" rows always clear that default floor. Pass min_confidence="proximity_low" to widen recall. Rows carry match_type ("exact" / "substring" / "fuzzy") and similarity.

ParametersJSON Schema
NameRequiredDescriptionDefault
fuzzyNoOptional 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.
limitNoMaximum number of results.
descriptionNoFree-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_pathNoThe 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`.
min_confidenceNoConfidence 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).proximity_high
window_minutesNoProximity 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).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the annotations by stating 'Templated and deterministic — no LLM call; pull-only', 'Conservative by design', and explaining the confidence model, inferred outcomes, and the meaning of 'reopened'. It also discloses the fuzzy-search fallback and the normal empty-list behavior. Nothing in the description contradicts the readOnlyHint, idempotentHint, or destructiveHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-structured, front-loading the critical 'call before editing' guidance and then layering outcome semantics, confidence behavior, and parameter adjustments. The length is justified by the tool's complexity. However, some details repeat the parameter-schema descriptions, such as the min_confidence floor and fuzzy fallback, making it slightly less economical than it could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with six optional parameters, an output schema, and a nuanced outcome taxonomy, the description covers everything needed to invoke it correctly: when to call, how to interpret outcomes, how confidence works, what the default behavior is, and what an empty result means. It also explains the standalone rejection row and the 'tried → reverted → reopened' reading, leaving no significant gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema coverage is 100%, so the baseline is 3. The description adds useful integration semantics, such as the precedence between description and entity_path, the default min_confidence floor, and that the window heuristic applies only to implicit removals. Much of this is also present in the parameter descriptions, so the added value is moderate but real.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as returning prior change attempts on an entity with inferred outcomes, and it gives a concrete operational purpose: 'Call this BEFORE editing an entity' to avoid repeating a rejected change. It is more than a tautology because it explains the resource and value proposition. However, it does not explicitly differentiate itself from sibling tools like history or stale_decisions, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description is explicit about when to call the tool ('Call this BEFORE editing an entity') and how to interpret the results, including 'reopened' meaning the old verdict no longer stands. It also explains when to widen recall with min_confidence='proximity_low' and that an empty list is the normal, preferred answer. It does not compare itself against siblings or give explicit 'when not to use' instructions, so it is not a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stale_decisionsStale decisions due for revisitA
Read-onlyIdempotent

Decisions due for a revisit — expired, past their date, or with a triggered stale condition.

Three deterministic rules. Expiry-based (flag="expired"): events whose expires_when condition fired, evaluated from local state only — date: against now, entity:PATH:changes against the event log, library:NAME>=VERSION against installed dist metadata; the pattern kind that fired is in expired_pattern. A library: condition whose dependency isn't locally observable surfaces as flag="manual_review" instead of a guess; manual:LABEL never auto-fires. Date-based (flag="revisit_due"): events whose revisit_after has passed AND the entity is still live (queried via blame/diff/prior_attempts after the decision, or its changeset saw later activity) — pure age alone never surfaces. Condition-based (flag="review_suggested"): events whose stale_when text shares keywords with a LATER change event — the named invalidation evidence may have happened. Surfacing only: nothing is un-retired automatically; follow up with a supersede if the condition really was triggered.

Each result is the change event plus flag, revisit_due, days_overdue, active_use_signals, matched_terms, matched_event_id, expires_status, expired_pattern, expires_detail, and a one-line stale_reason. Date-due rows first, most-overdue leading; filter by entity_path, project, or agent. Templated and deterministic; no LLM call, no network.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentNoOptional filter to the agent that logged the decision.
limitNoMaximum number of results.
projectNoOptional filter to a specific project/repository.
entity_pathNoOptional filter to a single entity or path prefix — 'users' also covers 'users.email'. Empty = every entity.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly, idempotent, and non-destructive annotations, the description discloses significant behavior: it never auto-unretires, never guesses when dependency observation is unavailable (`manual_review`), never surfaces by age alone, is templated and deterministic, makes no LLM call, and uses no network. This is exemplary behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but information-dense, front-loaded with a one-sentence summary followed by clearly separated rules and output details. Every sentence adds relevant, non-redundant context—no filler, no repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with this complexity—three distinct rule families, nuanced edge cases, and return-field semantics—the description is complete. It covers rule mechanics, key caveats, follow-up action, filtering, ordering, and guarantees, so an agent can confidently invoke and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds marginal value by noting filters (entity_path, project, agent) and ordering, but does not introduce parameter semantics beyond the schema's own property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific purpose: surfacing decisions that are due for revisit, with three explicit deterministic triggers (expired, revisit_due, review_suggested). It clearly identifies the resource (stale decisions) and differentiates itself from generic history/search tools by emphasizing its deterministic, surfacing-only nature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong context on when to use the tool: to find decisions whose revisit conditions have fired, with filters by agent/project/entity_path, and it advises follow-up with a `supersede` if a condition truly triggered. It doesn't explicitly contrast against the listed sibling tools or list exclusions, but the operational context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • Changedlog_change3 fields changed
      • changedInput schema / properties / change_type / description
        Previous value: -"What kind of change. One of: add, remove, modify, rename, retype, create, delete, index_add, index_remove, migrate, revert (tried and rolled back), supersede (re-open a reverted decision). Invalid values are rejected — pick the closest match."New value: +"What 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."
      • addedInput schema / properties / expires_when
        Added value: +{
        +  "default": "",
        +  "description": "Optional 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.",
        +  "title": "Expires When",
        +  "type": "string"
        +}
      • changedInput schema / properties / supersedes / description
        Previous value: -"Id of the prior event this change overrides; only valid with change_type='supersede'. Empty auto-links the entity's most recent remove/delete. Append-only — the old verdict is never edited, just derived as superseded."New value: +"Id 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."
    • Changedprior_attempts2 fields changed
      • changedInput schema / properties / min_confidence / description
        Previous value: -"Confidence floor. 'proximity_high' (default) returns only attempts that were clearly tried and then reverted within the window — the high-signal 'rejected before' cases. Pass 'proximity_low' to also see the noisy tail (still-active changes and far-apart reverts)."New value: +"Confidence 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)."
      • changedInput schema / properties / window_minutes / description
        Previous value: -"Proximity window in minutes for the add->remove revert heuristic. An attempt removed within this many minutes is 'proximity_high'; beyond it, 'proximity_low'. Default 10080 (7 days)."New value: +"Proximity 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)."
  2. 5 tool updatesv0.3.11
    • Changeddiff2 fields changed
      • changedInput schema / properties / entity_path / description
        Previous value: -"Entity path or path prefix. Prefix matching is supported: 'users' returns history for the users table AND all its columns ('users.email', 'users.created_at', etc.). Use a more specific path to narrow the result."New value: +"Entity 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'."
      • addedInput schema / properties / limit / maximum
        Added value: +1000
    • Changedhistory2 fields changed
      • changedInput schema / properties / entity_path / description
        Previous value: -"Filter to a specific entity or path prefix."New value: +"Filter to an entity, or a DOTTED prefix of one ('users' also covers 'users.email'). Not a raw string prefix."
      • addedInput schema / properties / limit / maximum
        Added value: +1000
    • Changedprior_attempts2 fields changed
      • addedInput schema / properties / limit / maximum
        Added value: +1000
      • addedInput schema / properties / window_minutes / maximum
        Added value: +1000
    • Changedsearch1 field changed
      • addedInput schema / properties / limit / maximum
        Added value: +1000
    • Changedstale_decisions1 field changed
      • addedInput schema / properties / limit / maximum
        Added value: +1000
  3. 3 tool updatesv0.3.10
    • Changedblame6 fields changed
      • addedOutput schema / properties / constraint
        Added value: +{
        +  "title": "Constraint",
        +  "type": "string"
        +}
      • addedOutput schema / properties / stale_when
        Added value: +{
        +  "title": "Stale When",
        +  "type": "string"
        +}
      • addedOutput schema / properties / status
        Added value: +{
        +  "title": "Status",
        +  "type": "string"
        +}
      • addedOutput schema / properties / superseded_by
        Added value: +{
        +  "title": "Superseded By",
        +  "type": "string"
        +}
      • addedOutput schema / properties / supersedes
        Added value: +{
        +  "title": "Supersedes",
        +  "type": "string"
        +}
      • changedOutput schema / required
        Previous value: -[
        -  "id",
        -  "timestamp",
        -  "entity_type",
        -  "entity_path",
        -  "change_type",
        -  "diff",
        -  "reasoning",
        -  "agent",
        -  "session_id",
        -  "git_commit",
        -  "project",
        -  "changeset_id",
        -  "metadata",
        -  "revisit_after",
        -  "expires_when",
        -  "error"
        -]New value: +[
        +  "id",
        +  "timestamp",
        +  "entity_type",
        +  "entity_path",
        +  "change_type",
        +  "diff",
        +  "reasoning",
        +  "agent",
        +  "session_id",
        +  "git_commit",
        +  "project",
        +  "changeset_id",
        +  "metadata",
        +  "revisit_after",
        +  "expires_when",
        +  "supersedes",
        +  "constraint",
        +  "stale_when",
        +  "superseded_by",
        +  "status",
        +  "error"
        +]
    • Changedlog_change6 fields changed
      • changedInput schema / properties / change_type / description
        Previous value: -"What kind of change. One of: add, remove, modify, rename, retype, create, delete, index_add, index_remove, migrate. Invalid values are rejected — pick the closest match."New value: +"What kind of change. One of: add, remove, modify, rename, retype, create, delete, index_add, index_remove, migrate, revert (tried and rolled back), supersede (re-open a reverted decision). Invalid values are rejected — pick the closest match."
      • addedInput schema / properties / constraint
        Added value: +{
        +  "default": "",
        +  "description": "Optional: the testable principle behind the decision, kept queryable (e.g. 'card data in our own DB = PCI scope').",
        +  "title": "Constraint",
        +  "type": "string"
        +}
      • addedInput schema / properties / stale_when
        Added value: +{
        +  "default": "",
        +  "description": "Optional: what would invalidate this decision (e.g. 'payment provider changed'). stale_decisions matches it against later events and flags 'review suggested' — surfacing only.",
        +  "title": "Stale When",
        +  "type": "string"
        +}
      • addedInput schema / properties / supersedes
        Added value: +{
        +  "default": "",
        +  "description": "Id of the prior event this change overrides; only valid with change_type='supersede'. Empty auto-links the entity's most recent remove/delete. Append-only — the old verdict is never edited, just derived as superseded.",
        +  "title": "Supersedes",
        +  "type": "string"
        +}
      • addedOutput schema / properties / supersedes
        Added value: +{
        +  "title": "Supersedes",
        +  "type": "string"
        +}
      • changedOutput schema / required
        Previous value: -[
        -  "id",
        -  "timestamp",
        -  "status",
        -  "error",
        -  "warnings"
        -]New value: +[
        +  "id",
        +  "timestamp",
        +  "status",
        +  "error",
        +  "warnings",
        +  "supersedes"
        +]
    • Changedprior_attempts1 field changed
      • addedInput schema / properties / fuzzy
        Added value: +{
        +  "default": "",
        +  "description": "Optional 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.",
        +  "title": "Fuzzy",
        +  "type": "string"
        +}
  4. 4 tool updatesv0.3.8
    • Changedblame3 fields changed
      • addedOutput schema / properties / expires_when
        Added value: +{
        +  "title": "Expires When",
        +  "type": "string"
        +}
      • addedOutput schema / properties / revisit_after
        Added value: +{
        +  "title": "Revisit After",
        +  "type": "string"
        +}
      • changedOutput schema / required
        Previous value: -[
        -  "id",
        -  "timestamp",
        -  "entity_type",
        -  "entity_path",
        -  "change_type",
        -  "diff",
        -  "reasoning",
        -  "agent",
        -  "session_id",
        -  "git_commit",
        -  "project",
        -  "changeset_id",
        -  "metadata",
        -  "error"
        -]New value: +[
        +  "id",
        +  "timestamp",
        +  "entity_type",
        +  "entity_path",
        +  "change_type",
        +  "diff",
        +  "reasoning",
        +  "agent",
        +  "session_id",
        +  "git_commit",
        +  "project",
        +  "changeset_id",
        +  "metadata",
        +  "revisit_after",
        +  "expires_when",
        +  "error"
        +]
    • Changedlog_change2 fields changed
      • addedInput schema / properties / rename_from
        Added value: +{
        +  "default": "",
        +  "description": "The 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.",
        +  "title": "Rename From",
        +  "type": "string"
        +}
      • addedInput schema / properties / revisit_after
        Added value: +{
        +  "default": "",
        +  "description": "Optional 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.",
        +  "title": "Revisit After",
        +  "type": "string"
        +}
    • Addedprior_attempts
    • Addedstale_decisions
  5. 6 tool updatesv0.3.2
    • Changedblame2 fields changed
      • addedInput schema / properties / entity_path / description
        Added value: +"Exact entity path (no prefix matching). Examples: 'users.email', 'src/auth.py::login', 'env/STRIPE_SECRET_KEY'."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "agent": {
        +      "title": "Agent",
        +      "type": "string"
        +    },
        +    "change_type": {
        +      "title": "Change Type",
        +      "type": "string"
        +    },
        +    "changeset_id": {
        +      "title": "Changeset Id",
        +      "type": "string"
        +    },
        +    "diff": {
        +      "title": "Diff",
        +      "type": "string"
        +    },
        +    "entity_path": {
        +      "title": "Entity Path",
        +      "type": "string"
        +    },
        +    "entity_type": {
        +      "title": "Entity Type",
        +      "type": "string"
        +    },
        +    "error": {
        +      "title": "Error",
        +      "type": "string"
        +    },
        +    "git_commit": {
        +      "title": "Git Commit",
        +      "type": "string"
        +    },
        +    "id": {
        +      "title": "Id",
        +      "type": "string"
        +    },
        +    "metadata": {
        +      "additionalProperties": true,
        +      "title": "Metadata",
        +      "type": "object"
        +    },
        +    "project": {
        +      "title": "Project",
        +      "type": "string"
        +    },
        +    "reasoning": {
        +      "title": "Reasoning",
        +      "type": "string"
        +    },
        +    "session_id": {
        +      "title": "Session Id",
        +      "type": "string"
        +    },
        +    "timestamp": {
        +      "title": "Timestamp",
        +      "type": "string"
        +    }
        +  },
        +  "required": [
        +    "id",
        +    "timestamp",
        +    "entity_type",
        +    "entity_path",
        +    "change_type",
        +    "diff",
        +    "reasoning",
        +    "agent",
        +    "session_id",
        +    "git_commit",
        +    "project",
        +    "changeset_id",
        +    "metadata",
        +    "error"
        +  ],
        +  "title": "BlameResult",
        +  "type": "object"
        +}
    • Changedchangeset1 field changed
      • addedInput schema / properties / changeset_id / description
        Added value: +"The changeset identifier (the same slug or UUID passed to `log_change`'s changeset_id parameter). Examples: 'add-stripe-billing', 'fix-auth-redirect'."
    • Changeddiff3 fields changed
      • addedInput schema / properties / entity_path / description
        Added value: +"Entity path or path prefix. Prefix matching is supported: 'users' returns history for the users table AND all its columns ('users.email', 'users.created_at', etc.). Use a more specific path to narrow the result."
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of events to return."
      • addedInput schema / properties / limit / minimum
        Added value: +1
    • Changedhistory6 fields changed
      • addedInput schema / properties / changeset_id / description
        Added value: +"Filter to a specific changeset (feature/task group)."
      • addedInput schema / properties / entity_path / description
        Added value: +"Filter to a specific entity or path prefix."
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of results."
      • addedInput schema / properties / limit / minimum
        Added value: +1
      • addedInput schema / properties / project / description
        Added value: +"Filter to a specific project/repository."
      • addedInput schema / properties / since / description
        Added value: +"Time 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."
    • Changedlog_change11 fields changed
      • addedInput schema / properties / agent / description
        Added value: +"Name/ID of the AI agent making the change (e.g. 'claude-code', 'cursor', 'copilot', 'human')."
      • addedInput schema / properties / change_type / description
        Added value: +"What kind of change. One of: add, remove, modify, rename, retype, create, delete, index_add, index_remove, migrate. Invalid values are rejected — pick the closest match."
      • addedInput schema / properties / changeset_id / description
        Added value: +"Optional 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."
      • addedInput schema / properties / diff / description
        Added value: +"The actual change — SQL migration text, code diff, or a human-readable description of what changed. Optional but strongly recommended for non-trivial changes."
      • addedInput schema / properties / entity_path / description
        Added value: +"Dot/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)."
      • addedInput schema / properties / entity_type / description
        Added value: +"Category of entity. One of: column, table, file, function, class, endpoint, dependency, env_var, index, schema, config, other. Unknown values are coerced to 'other'."
      • addedInput schema / properties / git_commit / description
        Added value: +"The git commit hash this change will land in. Can be backfilled later via `selvedge backfill-commit` or the post-commit hook."
      • addedInput schema / properties / project / description
        Added value: +"Repository or project name. Useful when one DB tracks multiple projects."
      • addedInput schema / properties / reasoning / description
        Added value: +"Why 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`."
      • addedInput schema / properties / session_id / description
        Added value: +"The agent session or conversation ID, if available."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "error": {
        +      "title": "Error",
        +      "type": "string"
        +    },
        +    "id": {
        +      "title": "Id",
        +      "type": "string"
        +    },
        +    "status": {
        +      "title": "Status",
        +      "type": "string"
        +    },
        +    "timestamp": {
        +      "title": "Timestamp",
        +      "type": "string"
        +    },
        +    "warnings": {
        +      "items": {
        +        "type": "string"
        +      },
        +      "title": "Warnings",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "id",
        +    "timestamp",
        +    "status",
        +    "error",
        +    "warnings"
        +  ],
        +  "title": "LogChangeResult",
        +  "type": "object"
        +}
    • Changedsearch3 fields changed
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of results."
      • addedInput schema / properties / limit / minimum
        Added value: +1
      • addedInput schema / properties / query / description
        Added value: +"Search 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."
  6. 6 tool updatesv0.3.1
    • First observedblame
    • First observedchangeset
    • First observeddiff
    • First observedhistory
    • First observedlog_change
    • First observedsearch

TDQS

A4.2/5.0

Scored across 8 tools

Disambiguation4/5

Most tools have clear, distinct purposes: logging changes, querying history, searching, and finding stale decisions. However, `diff` (entity history) and `history` (filtered history across entities) overlap somewhat—both return change history, differing mainly in scope and filtering. `blame` is distinct (latest change per entity) and `prior_attempts` is distinct (outcome-focused), but the overlap between diff/history could cause occasional misselection.

Naming Consistency3/5

Tool names are mostly two-word lowercase verbs or nouns (log_change, prior_attempts, stale_decisions), but the pattern is inconsistent: some are verb_noun (log_change, stale_decisions), others are single nouns (diff, blame, history, changeset, search). This mix of action-oriented and entity-oriented names breaks a strict pattern, though each name is still readable and intuitive.

Tool Count5/5

With 8 tools, the server is well-scoped for its domain (change logging and history management). Each tool serves a distinct purpose—recording events, querying history at different granularities, searching, proactive checks, and maintenance. No tool feels redundant, and the count is within the ideal range, making the surface manageable without overwhelming an agent.

Completeness5/5

The tool set covers the full lifecycle: logging changes (log_change), retrieving history (diff, history, blame), reconstructing changesets, searching, checking prior attempts before editing, and flagging stale decisions for revisit. It even supports renames, rejects, reverts, and supersedes, showing thorough coverage of decision evolution. No obvious missing operations like deleting events (likely intentionally immutable), and the stale_decisions tool closes the loop on maintenance, so the surface feels complete.

Maintenance

ActivityActive
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Local-first memory layer for AI coding agents — captures issues, attempts, fixes, and decisions, and warns at git commit before you repeat a mistake.
    17
    235 PyPI
    823
    MIT