Skip to main content

diffpilot - project memory for coding agents

PyPI PyPI - Python Version

Coverage Quality Gate Status

Downloads GitLab stars GitLab last commit

Project memory for coding agents. The agent says what changed and why; diffpilot (its own small agent on a Codex subscription) finds where it belongs in the docs, edits surgically, logs the change and keeps the changelog — and answers questions about requirements and past decisions with citations, without bossing the calling agent around.

Features

  • Three Markdown stores with stable section IDs: docs/PRD.md (current product vision), docs/implementation.md (how and why), docs/instructions.md (project rules), plus docs/CHANGELOG.md.
  • Optional PRD categories: [prd_categories] mobs = "..." keeps the details of an area in docs/prd/mobs.md, while PRD.md holds the overview. An existing spec (a bestiary, a tower roster) is adopted in place, losslessly and without bootstrap extraction: mobs = { scope = "...", path = "docs/mobs.md" }. A spec written as one big nested bullet list is split into heading sections (one per top-level item with sub-items, recursively, while a section is over 2000 characters), so each creature gets its own section and ID.
  • Optional Jev (TypeSafe's decision model, via OpenRouter) reranks retrieval and routes input to stores: better context for fewer tokens. Falls back to BM25 without a key.
  • note captures decisions instantly during work; finish integrates them (plus the git diff) at the end of the task.
  • record writes immediately, routed to the right store(s); prd / impl / instruct force one. Edits are validated ops, never free-form rewrites; every write becomes a change event with before/after text and the reason.
  • ask and brief answer from the stores (and code) with citations; records are presented as context, not orders.
  • init --bootstrap seeds the stores from existing docs, with quote verification and safe, incremental re-runs.
  • git_diff_changelog_summary turns git diff + recorded changes into one clean changelog entry.
  • AGENTS.md gets a ## diffpilot section (how to use the tool) and, via update_agentsmd, a ## diffpilot - resume of project essentials that never repeats what the file already says.
  • Free, instant lookups without an LLM: outline, show, search, log.

Quick start

Requires a Codex login (codex login, ChatGPT subscription) — credentials are read from $CODEX_HOME/auth.json.

uvx diffpilot init --bootstrap      # global + project config, stores (seeded from existing docs), ## diffpilot in AGENTS.md
uvx diffpilot brief "Add 6 cards to the shop"
uvx diffpilot note "Shop shows 6 cards instead of 4; 2 slots are seasonal offers (user request)."   # instant
uvx diffpilot finish                # end of task: notes + git diff → docs, reviewed
uvx diffpilot ask "What are the shop requirements?"
uvx diffpilot git_diff_changelog_summary --write --version 1.2.0
uvx diffpilot update_agentsmd

Configuration: global ~/.diffpilot/diffpilot.toml (auth — Codex home, OpenRouter key —, models, Jev; shared by all projects) overridden key by key by the project's diffpilot.toml (paths, PRD categories, behavior). The project root is the nearest directory with diffpilot.toml, but the search never crosses a repository boundary (a .git directory or file), so a nested repo or submodule gets its own memory; init prints the root it uses. Environment overrides: DIFFPILOT_BACKEND, DIFFPILOT_MODEL, DIFFPILOT_FAST_MODEL, DIFFPILOT_REASONING, DIFFPILOT_LOG_LEVEL, DIFFPILOT_HOME (global config dir), OPENROUTER_API_KEY, CODEX_HOME.

Every command supports --json. Exit codes: 0 ok, 1 usage/config (also doctor with a FAIL check, show with a missing or ambiguous ref, finish that kept notes it could not write), 2 Codex auth, 3 LLM unavailable, 4 invalid model output (nothing written), 5 lock busy. On exit 3 the error says what was kept: finish keeps its notes (rerun it), record/prd/impl/instruct keep their input for diffpilot inbox --process, other commands are simply rerun. A Codex usage limit is reported in one line with the reset time and is not retried; with backend = "auto" and an OpenRouter key, that run falls back to OpenRouter.

finish adds a CHANGELOG entry only when the task diff changed code (not for notes only, docs only or --no-diff). init --bootstrap prints progress per batch, never reads AGENTS.md, and resumes after a failure without re-extracting facts.

diffpilot documents itself: requirements, design rationale and project rules live in docs/ and are maintained with diffpilot.

Contribute

Issue Tracker: https://gitlab.com/rocshers/python/diffpilot/-/issues
Source Code: https://gitlab.com/rocshers/python/diffpilot

Metadata

Release files for diffpilot 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffpilot 0.0.2
File Size Uploaded Provenance Actions
diffpilot-0.0.2.tar.gz 92.2 kB Without provenance Details for diffpilot-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diffpilot 0.0.2
File Interpreter ABI Platform Actions
diffpilot-0.0.2-py3-none-any.whl Python 3 none any Details for diffpilot-0.0.2-py3-none-any.whl

Total release size: 187.6 kB

Release files / diffpilot-0.0.2.tar.gz

Download URL diffpilot-0.0.2.tar.gz
Size 92.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8383525f04fb76a64a225f06a602fb59aa040622a76d31adb47525d8e37cc3
BLAKE2b-256 checksum
How to use checksums
f1567aa3a5fd0889e6cf407c83f23e31816cfffee0e0583256e927838c19dd86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / diffpilot-0.0.2-py3-none-any.whl

Download URL diffpilot-0.0.2-py3-none-any.whl
Size 95.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ccb9bbcfa21f560d5c6abe7134e2ff2a975b21695f3b38e01bc7489f16dec1f
BLAKE2b-256 checksum
How to use checksums
1eb724556d75dd14789912ad8d294195d9446e42bc10cad0fe97cb668cf20865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for diffpilot 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page