Pacioli
Least-privilege governance for ERPNext — the credential floor + a governed agent front door, MCP · A2A, one spine. No debit without a credit: PLAN · CONSENT · PROVE · UNDO.
- Author: john-broadway
- Repository: https://github.com/john-broadway/pacioli
- GitHub stars: 2
- Forks: 0
- License: Apache-2.0
- Category: Accounting
- Maintenance: Actively Maintained
Install Pacioli
bench get-app https://github.com/john-broadway/pacioli
Tags
- a2a
- accounting
- ai-agents
- api
- audit-trail
- double-entry
- erpnext
- frappe
- governance
- mcp
Add the Frappe Gems badge to your README
Maintain Pacioli? Paste this into your README:
[](https://frappegems.com/gems/apps/john-broadway/pacioli)
About Pacioli
Tavola I — The friar at his slate, attributed to Jacopo de' Barbari, 1495. The glass rhombicuboctahedron hangs at his left; the Summa sits under the dodecahedron at his right. This repo's device is that hanging solid.
### The Guard — the counting-house door *No one writes in the books but the appointed hand, and only in the books appointed to them.* A Frappe/ERPNext **bench app** (distribution name `pacioli-guard` on PyPI; installs as the `pacioli_guard` bench app). It binds any API credential — an integration, a Zapier/n8n flow, a script, a vendor token, a cron job, an AI agent — to an allowlist of methods (and, if granted, DocTypes), enforced at the credential layer through Frappe's public `auth_hooks` extension point, deny-by-default. No core fork. It governs **every** credential on the site, agent or not. ```bash # from your bench directory: wheel into the bench env, then install the app env/bin/pip install pacioli-guard bench --site install-app pacioli_guard ``` ### The Broker — the governed front door *The clerk may propose; only the merchant disposes.* A standalone, pip-installable broker (`pip install pacioli`) that gives an AI agent a governed way to touch ERPNext — through the door of your choosing: **MCP or A2A**, one spine behind both. Slice-one governs one write — submitting a Sales Invoice — through PLAN → CONSENT → execute → PROVE, deny-by-default beyond that. The door admits; the spine decides. ```bash pip install pacioli ``` ### How the instruments compose **Guard is the floor; the broker is one consumer that binds itself to it.** Guard scopes and enforces *any* credential on the site — you don't need to run an agent to need it. The broker is the agent-facing front door, and its own ERPNext credential must itself be `pacioli_guard`-scoped to exactly the calls it uses (read Sales Invoice, the ledger-preview method, submit on Sales Invoice). Without that scoping, anything holding the broker's raw credential can call ERPNext's REST API directly and bypass PLAN, CONSENT, and PROVE entirely — so the broker's own README states that scoping as a hard precondition, not an optional hardening step. This is composition, not coupling: Guard is independently useful for any credential on a site, agent or otherwise; the broker is the one piece that chooses to sit on top of it and honor the same floor it enforces on everything else.
| folio | *per* — his book (1494) | *a* — here | |---|---|---| | ¹ | The **memorandum** (*memoriale*) — every transaction written down first, roughly, before any formal entry | **PLAN** — `plan_submit` / `plan_cancel` write the memorandum: the projected GL and the risk flags, dated, bound to the draft. Nothing posts. | | ² | The **journal** (*giornale*) — each entry rewritten in fixed form, its debit marked *per*, its credit marked *a* | **PROVE** — the hash-chained receipt book. The intent receipt is the *per*, the outcome the *a*; an intent with no outcome is a debit with no credit, and the trial balance surfaces it as an orphan. | | ³ | The **ledger** (*quaderno*) — the book of account itself | **ERPNext's GL** — the broker never writes in it directly; every entry reaches the ledger through the journal's discipline. | And the same law runs across every pillar — for every action, its recorded counterpart: | folio | the action (*per*) | its recorded counterpart (*a*) | |---|---|---| | ⁴ | An agent wants to write | **PLAN** — the projected GL impact, written down *before* the act. The mirror entry precedes the entry. | | ⁵ | A plan exists | **CONSENT** — a human mints the marker, out of band. Agent proposes, human disposes: two hands on every posting, never one. | | ⁶ | The write fires | **PROVE** — an *intent* receipt before, an *outcome* receipt after. A write missing its outcome is an **orphan**, and it surfaces exactly the way an unbalanced trial balance does. | | ⁷ | A posting stands | **UNDO** — ERPNext's own cancel/amend is double-entry: the reversal posts equal-and-opposite rows. Nothing erased, everything answered. | | ⁸ | A credential exists | **Guard** — no capability without its explicit grant line. Deny-by-default is "no entry without authorization," applied at the credential layer. | Same law at every layer: **nothing moves without its counterpart.** A plan without consent doesn't post. A write without a receipt is flagged. A credential without a grant is refused. The one system you *can't* trust is the one where an action can happen alone — unplanned, unconsented, unreceipted. Everything Pacioli refuses is exactly that: the lone entry.
Tavola II — Vigintisex Basium Planum Vacuum: the same solid, drawn hollow by Leonardo da Vinci for Pacioli's De divina proportione. Leonardo illustrated Luca's book; the debt is repaid here.
Related Accounting apps for Frappe & ERPNext
- Books — Free Accounting Software
- Lending — Open Source Lending software
- Payments — A payments app for frappe
- Banking — Load your bank transactions into ERPNext and reconcile them with your vouchers.
- Erpnext Quota — App to manage ERPNext Site, User, Company and Space limitations
- Utility Billing — The Utility Billing & Property Management App is a powerful addition to ERPNext, designed to streamline utility billing, property leasing, and tenant management. Ideal for municipal utilities, real estate managers, and property developers.
- Expense Request — ERPNext Expense Requests
- Vendor Payments — A frappe app that has workflows and reports to make payments to vendors by a company and track them