Governed, bitemporal reconciliation between a codebase and the documentation that describes it. Built on Ontolith.
Plumbline ingests a repository's source code and its documentation
(docstrings, README, docs/, CHANGELOG, GitHub wiki) into an Ontolith
knowledge base. Every documented statement that can be checked against code
becomes a provenanced assertion. Code changing over time is recorded as
supersession ā expected, no review needed. Documentation disagreeing with
code, or with other documentation, becomes a flagged contradiction, routed
to a human. Nothing is silently overwritten; nothing is auto-resolved.
š§ Pre-Alpha. What works today, checked end to end against a real Ontolith knowledge base:
plumb ingestreplays a Git repository's history into a knowledge base, resumably and read-only: static analysis of Python source (symbols, signatures, deprecation, namespace closure), claims read from Python docstrings (Google, NumPy, Sphinx), and a drift projector that states the code's value in the same slot as each documented claim.plumb driftlists the resulting open contradictions, strongest first.
What does not exist yet: README, docs-page and CHANGELOG importers (so today it finds
docstring drift only), CLI/env/project facts, the review and resolution workflow, GitHub
integration, and plumb explain / as-of / blame / check. See the
Implementation Plan, the
full product spec, and the first run on a real repository.
See the PRD for the full problem statement. In short: code changes are enforced (tests fail); doc changes aren't. The same fact lives in many places (a signature, its docstring, a README table, a changelog entry), and a PR updates one or two of them. Drift is invisible until it costs something. Plumbline makes documentation drift a first-class, governed, auditable thing ā using Ontolith's own conflict-routing and provenance model as the actual mechanism, not a bolted-on diff tool.
# Clone git clone https://github.com/mattbv/plumbline.git cd plumbline # Install (requires Python >=3.11 and uv: https://github.com/astral-sh/uv) uv sync --all-extras # Run the test suite uv run pytest # Replay a repository's history into a knowledge base (the repository is only read) uv run plumb ingest --repo /path/to/your/repo --kb /tmp/plumbline.db # See what the docs and the code disagree about uv run plumb drift --kb /tmp/plumbline.db
Or, to keep the configuration and knowledge base inside a project, run
uv run plumb init --admin [email protected] there first, then plumb ingest and plumb drift.
Plumbline follows the same ports-and-adapters (hexagonal) architecture
Ontolith itself uses, enforced by an import-linter contract:
src/plumbline/
āāā domain/ # Pure logic: the aspect catalog, canonicalization,
ā # anchor URIs, dispositions. No I/O, no Ontolith import.
āāā application/ # Use cases, depending only on abstract ports.
ā āāā ports.py # RepoReader, CodeImporter, DocImporter, KnowledgeBase,
ā ā # ReviewSurface ā Protocols, not concrete classes.
ā āāā use_cases/
āāā adapters/ # Concrete implementations: the real Ontolith-backed
ā # knowledge base, the schema, Git access, extractors.
āāā interfaces/
āāā cli.py # `plumb` ā the CLI entrypoint.
The core modeling decision (see
ADR-0001): code
history lives on time_varying Ontolith properties; reconciliation lives on
one static slot per checkable fact. Drift detection is Ontolith's own
static conflict routing ā there is no separate diffing engine.
Apache-2.0 ā see LICENSE.