Keep the why
with your code.
Save project decisions and rejected approaches, so your next coding session can pick up where you left off.
$ selvedge demo
One decision. Two sessions.
Session 1 · save a rejected approach
Rejected storing API keys in users.api_key: plaintext credentials would be exposed in a database leak. Store a hash instead.
Session 2 · ask prior_attempts
rejected · confidence: exact
Revisit when: the credential storage and threat model change.
Temporary database removed.
Your project is untouched.
$
A shortened view of the included demo. Run it locally below.
Choose your agent
Section titled “Choose your agent”Open a terminal in your project folder. Pick your agent, copy the commands, and follow the setup prompts.
uv tool install --upgrade selvedge
selvedge setup --agent claude-code Requires uv and Python 3.10+. Use pip instead →
What setup changes
Writes .mcp.json and CLAUDE.md, plus Claude Code lifecycle hooks. Already using the Selvedge plugin? Keep that installation instead. Setup asks before changes and backs up modified files.
2. Restart Claude Code in this project. Enable Selvedge’s tools if prompted.
Full Claude Code instructions →uv tool install --upgrade selvedge
selvedge setup --agent codex Requires uv and Python 3.10+. Use pip instead →
What setup changes
Writes project .codex/config.toml and AGENTS.md. Open this project in Codex and trust it to load project configuration. Setup asks before changes and backs up modified files.
2. Restart Codex in this project. Enable Selvedge’s tools if prompted.
Full Codex instructions →uv tool install --upgrade selvedge
selvedge setup --agent copilot Requires uv and Python 3.10+. Use pip instead →
What setup changes
Writes .vscode/mcp.json and .github/copilot-instructions.md. Use Copilot’s Agent mode and enable the server’s tools. Setup asks before changes and backs up modified files.
2. Restart Copilot in this project. Enable Selvedge’s tools if prompted.
Full Copilot instructions →uv tool install --upgrade selvedge
selvedge setup --agent cursor Requires uv and Python 3.10+. Use pip instead →
What setup changes
Adds the server to ~/.cursor/mcp.json and instructions to this project’s .cursorrules. Setup asks before changes and backs up modified files.
2. Restart Cursor in this project. Enable Selvedge’s tools if prompted.
Full Cursor instructions →uv tool install --upgrade selvedge
selvedge setup --agent gemini Requires uv and Python 3.10+. Use pip instead →
What setup changes
Writes this project’s .gemini/settings.json and GEMINI.md. Restart Gemini CLI in the project and approve the server if prompted. Setup asks before changes and backs up modified files.
2. Restart Gemini CLI in this project. Enable Selvedge’s tools if prompted.
Full Gemini CLI instructions →uv tool install --upgrade selvedge
selvedge setup --agent windsurf Requires uv and Python 3.10+. Use pip instead →
What setup changes
Adds the server to ~/.codeium/windsurf/mcp_config.json and instructions to this project’s .windsurfrules. Setup asks before changes and backs up modified files.
2. Restart Windsurf in this project. Enable Selvedge’s tools if prompted.
Full Windsurf instructions →Choose an agent above to see its setup commands.
Use Selvedge to record one approach we considered and rejected in this project. Include why we rejected it and what would change our mind. Then look it up with prior_attempts. Start a new session and ask it to look up the same entity. That’s your first saved decision carried forward.
Connected successfully?
You can send one anonymous confirmation to help improve setup. No project contents or contact details are sent.
MCP and CLI work across these agents. Session-start reminders and the edit gate are currently Claude Code features. Agents must call Selvedge to record decisions.
Try the demo
Section titled “Try the demo”Want to see it work first? The demo saves a rejection and reads it back through a fresh database connection. It uses a temporary database, so your project stays untouched.
uv tool install --upgrade selvedge
selvedge demo Requires uv and Python 3.10+. Prefer pip? Installation instructions →
What gets remembered
Section titled “What gets remembered”The decision
What changed and why. Find it by the function, table, dependency or endpoint it belongs to.
The rejected approach
What you considered or rolled back, with the reason. Your next session can check before trying it again.
When to revisit it
What would change your mind. Add a review date or supported expiry condition so a past decision can be reconsidered.
Explore memory across coding sessions, try a recorded rejection and retrieval, or learn how to keep a decision audit trail.
A small tool that stays with your project
Section titled “A small tool that stays with your project”Selvedge is a local MCP server for AI coding agents. Decisions live in .selvedge/selvedge.db, a local SQLite file. Selvedge makes no LLM calls and needs no account or subscription. It’s open source under the MIT license.
Connect agents to the same project and database to share the history. Moving to another machine? Carry the database with the project, or export a readable decision log. Your chosen coding agent still follows its own data policy.
Selvedge records what you or your agent explicitly save. The installed instructions help the agent use it; they don’t guarantee that every decision is captured.
Find Selvedge
Section titled “Find Selvedge”Available through the package registry and MCP directories you already use.