Plumbref verifies AI coding-agent claims against source references.
Project description
Plumbref
Plumbref is a local verification harness for coding agents.
It gives agents an evidence gate: before they answer confidently, they break the answer into claims, search the repository, read bounded source snippets, record conservative judgments, and return an inspectable report.
Ask natural questions about your repository:
How does the nightly account cleanup job work?
What should we consider if we move customer_external_id from Account to AccountConnection?
Could this code change affect downstream consumers or adjacent flows?
The goal is fewer "are you sure?" loops, less blind source reading, and answers your team can check.
Plumbref is local-first. It does not call a model API, require an API key, upload your repository, use a database, depend on a vector store, or run a hosted service.
Why
Prompts and skills can ask an agent to be careful, but they do not preserve a structured verification trail. Plumbref gates coding-agent answers against recorded source evidence.
The agent still extracts claims and reasons over evidence. Plumbref supplies the source-grounded workflow, budgets, redaction, status semantics, and report artifacts.
How It Works
- Install Plumbref once.
- Add it to your MCP-capable coding agent for a repository.
- Ask repo questions naturally in chat.
- The agent uses Plumbref tools to verify claims against source evidence.
- You get a concise answer with cited files, supported claims, uncertain areas, limits, and safer wording.
You should not need to manually run verification commands during normal use. The CLI exists mainly for setup, smoke tests, debugging, and report rendering.
Mental Model
- repository: the local codebase being checked
- question: the user's natural-language repo question
- claim: one atomic statement the agent wants to make
- evidence: bounded source snippets read from the repo
- judgment:
supported,too_broad,uncertain,contradicted,not_found, ornot_verifiable - template: a verification playbook for a class of engineering question
- report: the source-backed trail the user can inspect
Batteries Included
- MCP server for agent-driven verification
- CLI for setup, doctor checks, templates, smoke tests, and report rendering
- built-in templates for flow explanation, field migration, change impact, downstream consumers, and external integrations
- Markdown and JSON reports
- broad-claim detection for words like
only,always,never,all,every, andguarantee - local repository search through ripgrep
- source snippet bounds, redaction patterns, budgets, and cache metrics
Install
Install the latest published package:
pipx install plumbref
Or install directly from GitHub:
pipx install git+https://github.com/ftaboadac/plumbref.git
For local development:
python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
Plumbref uses rg/ripgrep for repository search:
rg --version
Quick Start
From the repository you want an agent to verify:
cd /path/to/repo
plumbref init
plumbref doctor
plumbref init prints repo-specific MCP configuration and recommended agent
instructions. plumbref doctor checks local readiness: repo root, ripgrep,
config loading, templates, report-path writability, and optional MCP startup.
Any MCP-capable client can launch Plumbref as a stdio server:
plumbref mcp --repo-root /path/to/repo
Example MCP config:
{
"mcpServers": {
"plumbref": {
"command": "plumbref",
"args": ["mcp", "--repo-root", "/path/to/repo"]
}
}
}
For agent-specific usage guidance and conversational examples, see Agent Usage Guide.
Templates
Templates are versioned verification playbooks. They define evidence categories, required search passes, contradiction searches, budgets, report sections, and unchecked-area prompts for a class of engineering question.
Built-in templates:
generic_verification: fallback protocol for unsupported or unusual casesexplain_flow: explain how a workflow or integration worksfield_migration: check impact of moving or changing a fieldchange_impact: evaluate likely downstream effects of a diff or changed filedownstream_consumers: find direct and likely consumers of a contract or APIexternal_integration: inspect vendor syncs, webhooks, pushes, pulls, and clients
List templates:
plumbref templates --repo-root /path/to/repo
Inspect one template:
plumbref templates --repo-root /path/to/repo --template-id field_migration
Custom templates can live in .plumbref/templates/, in
~/.config/plumbref/templates/, or in shared template-pack directories listed
in template_paths. Later sources can override earlier templates with the same
ID, so teams can adapt a built-in playbook without forking Plumbref.
Reports And Cache
Reports are written under:
.cache/plumbref/reports/
Reports lead with a verification outcome: whether the agent can answer from checked evidence, must qualify the answer, or should avoid the claim as written. They also include broad-claim findings, safer wording, cited evidence, search traces, limits, and cache metrics.
Searches are cached by query/options and repository state. Evidence snippets are cached by file path, line range, file hash, and privacy settings. Cache hits and in-session evidence reuse can return compact evidence references without repasting source text.
Checked-in example reports:
- Dogfood template-loading demo
- Real MCP template-loading report
- Real MCP template_id migration report
- Real MCP onboarding change-impact report
Early Dogfood Results
In real MCP runs against this repository:
- 3 sessions
- 12 claims checked
- 29 searches run
- 28 bounded evidence snippets read
- 12/12 contradiction passes on judged claims
- 3 unsupported or over-broad claims caught
Plumbref also reduced source text compared with opening every matched file, but it does not claim to always use fewer tokens than a careful expert agent. See Real Workflow Test Results for the measurement details and limitations.
Config
Config discovery order:
- explicit
--config <repo-root>/.plumbref.local.toml<repo-root>/.plumbref.toml~/.config/plumbref/config.toml
Minimal example:
ignored_paths = [".git", ".venv", "node_modules", ".cache"]
privacy_patterns = [
"(?i)(api[_-]?key|secret|token|password)\\s*[:=]\\s*['\\\"][^'\\\"]+['\\\"]",
]
default_budget_mode = "normal"
default_output_modes = ["engineer", "json"]
default_template_id = "generic_verification"
template_paths = ["plumbref-template-pack"]
redaction_patterns is accepted as an alias for privacy_patterns.
template_paths entries are resolved relative to the repository root unless
they are absolute paths.
Development
Run tests:
python -m pytest
Run lint:
ruff check .
See ROADMAP.md for the implementation roadmap. For public-demo readiness and honest positioning, see Launch Checklist.
Limitations
- Plumbref does not extract claims by itself.
- Plumbref does not decide truth with an LLM.
- Plumbref search is lexical and repo-local.
supportedmeans supported by the cited source evidence, not globally true for every deployment or runtime state.- Plumbref cannot verify claims that require production data, private services, or external systems unless the relevant evidence exists in the local repository.
Non-Goals
- no model API dependency
- no hosted service
- no database
- no vector store
- no UI
- no automatic code review replacement
- no production-data inspection
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plumbref-0.1.1.tar.gz.
File metadata
- Download URL: plumbref-0.1.1.tar.gz
- Upload date:
- Size: 875.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
922d1edabb8a90e760f852ac0eeb063e3f976dd12dd87e13014ab8ab76063434
|
|
| MD5 |
820f0b8a05cbb35c149925468b5ec537
|
|
| BLAKE2b-256 |
96017e6d94464ffa63842b2b64b90b772ebdc375cd5c2e62b459d11c3025099f
|
File details
Details for the file plumbref-0.1.1-py3-none-any.whl.
File metadata
- Download URL: plumbref-0.1.1-py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
767bc4f2224da55d0251958cd40c43e2a642b28a95d9bd9e50558e3ef1265e32
|
|
| MD5 |
207169b2f55e9a9797233a55a09baf91
|
|
| BLAKE2b-256 |
6d033c61b42dfea2899bc317296c372c718887fdd63cdfb75cfebb943ac77342
|