diffpilot - project memory for coding agents
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), plusdocs/CHANGELOG.md. - Optional PRD categories:
[prd_categories] mobs = "..."keeps the details of an area indocs/prd/mobs.md, whilePRD.mdholds 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.
notecaptures decisions instantly during work;finishintegrates them (plus the git diff) at the end of the task.recordwrites immediately, routed to the right store(s);prd/impl/instructforce one. Edits are validated ops, never free-form rewrites; every write becomes a change event with before/after text and the reason.askandbriefanswer from the stores (and code) with citations; records are presented as context, not orders.init --bootstrapseeds the stores from existing docs, with quote verification and safe, incremental re-runs.git_diff_changelog_summaryturns git diff + recorded changes into one clean changelog entry.AGENTS.mdgets a## diffpilotsection (how to use the tool) and, viaupdate_agentsmd, a## diffpilot - resumeof 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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.