What is rigorous-erp-builder?
rigorous-erp-builder is an MIT-licensed agent skill and engineering guide for building ERP, billing and accounting software with AI coding agents. The repository describes itself as "an engineering guide and agent skill" and contains Markdown instructions for the agent, three reference playbooks and one Python test script. It does not contain an ERP, an invoicing engine or a validator: it tells an agent how such a system should be designed and checked, and the agent writes the code in the user's own project.
The repository was created on November 11, 2026 by the GitHub account bottamedigianluca, and all three commits so far were pushed that same day. The SKILL.md front matter gives the skill name rigorous-erp-builder, version 2.0.0 and the author line "Gianluca Bottamedi & Antigravity Engineering". There are no GitHub releases or tags; the version number exists only in that metadata. The GitHub topics include antigravity-skill, erp, invoicing, peppol, xsd and rust.
The core idea, which SKILL.md calls the Zero-Hallucination Doctrine, is that an agent must not infer tax rules, rounding behaviour or numbering rules from its training data. Instead it should download the official machine-readable schemas of the target jurisdiction (XSD, UBL, EDIFACT, JSON), use fixed-point decimal arithmetic, enforce double-entry invariants and compare its output with a reference system. The README condenses this into six rules: official schemas, no floating-point money, immutable gapless numbering, oracle testing with mutation fuzzing, keyboard-first data entry, and local storage with 3-2-1 backups.
Installation is documented for two cases. For Google Antigravity, the README says to clone the repository into ~/.gemini/config/skills/rigorous-erp-builder and then ask the agent to use the skill for a named country or sector. For Claude Code, Cursor, Windsurf and Codex, the README says to add SKILL.md to the custom system instructions or repository rules, naming .cursorrules, CLAUDE.md and AGENTS.md. SKILL.md starts with YAML front matter holding a name and a description, the same layout used by Agent Skills folders, but the README does not document a native skill install for agents other than Antigravity.
The examples are strongly shaped by Italian invoicing: FatturaPA schema files, SdI transmission, Italian table names such as sequenze_documenti, and terms like Arrotondamento, Bollo Virtuale and Sconti a Cascata. Other jurisdictions are covered as reference tables and pointers, not as worked examples. The guide makes no claim that code produced with it is certified or accepted by any tax authority, and the repository has no test fixtures or schema files of its own. For finished ERP software rather than build instructions, iThub lists products such as ERPNext and Odoo; another coding-agent guide in the same category is Trim Reaper.
Key capabilities
- Agent instructions in SKILL.md The main file, SKILL.md, is about 13 KB of Markdown that an agent reads as its working protocol. It opens with YAML front matter (name, description, version 2.0.0, author) and then sets out a gated build pipeline, the exit criterion of each gate and a list of anti-patterns the agent should reject. Everything in it is guidance text: nothing is executed when the skill loads.
- Gated build pipeline (gates 0 to 7) SKILL.md requires the work to run in a fixed order: regulatory discovery, relational data engine, financial kernel, general ledger, document lifecycle, serialization with XSD validation, keyboard-first UX and disaster recovery. The heading calls it a 7-gate pipeline, while the gates are numbered 0 to 7. The agent is told not to start on the UI or invoice generator before the earlier gates pass.
- Gate 0: official schema ingestion The agent is told to download the jurisdiction's official
.xsd,.jsonor.dtdfiles into the repository, underresources/schemas/, and to extract exemption natures (N1 to N7), reverse-charge triggers, withholding types (RT01 to RT06) and social security fund codes from them. It also asks for a native validator in Rust, Go or C# AOT that needs no separate JVM or .NET runtime on the customer machine. - Jurisdiction reference table references/jurisdiction-discovery.md lists authorities and formats for Italy (FatturaPA 1.2.x, Schema_VFPR12.xsd, Schema_VFSM10.xsd, document types TD01 to TD28), the EU (EN 16931, Peppol BIS Billing 3.0, UBL 2.1, CII, Schematron), France (Factur-X, Chorus Pro), Spain (TicketBAI, SII), Germany (XRechnung, ZUGFeRD), Poland (KSeF), the United States, OECD SAF-T, Mexico (CFDI 4.0), Brazil (NF-e) and Saudi Arabia (ZATCA Fatoora). It is a pointer table: the schemas themselves are not included in the repository.
- Gapless, immutable document numbering Gate 1 forbids generating invoice numbers in memory with
SELECT MAX(num) + 1and gives an atomicUPDATE ... RETURNINGstatement on a per-year, per-series sequence table instead. Committed invoices are never deleted; corrections go through credit notes (storno). If a numbering gap still occurs, for example after a power cut, the guide asks for an audit record with operator, timestamp and explanation. - Transactional outbox for transmission The guide bans dual writes, meaning a database commit and a call to a government or bank API in the same function. The document and an
outbox_eventsrow are inserted in one transaction, and an asynchronous worker sends the events idempotently. The README names SdI, Peppol and bank feeds as the external targets this applies to. - Storage choices with concrete settings For on-premise, LAN or embedded use, SKILL.md specifies SQLite in WAL mode and lists the PRAGMA settings (journal_mode WAL, busy_timeout 5000, foreign_keys ON, synchronous NORMAL). For distributed cloud deployments it points to PostgreSQL with strict constraints and a transactional outbox. No database code or migrations are shipped.
- Fixed-point decimal kernel Gate 2 bans
f32,f64,doubleand the JavaScriptnumbertype for money and names the decimal types to use:rust_decimal::Decimalin Rust,shopspring/decimalin Go,decimal.Decimalin Python, andDECIMAL(19, 4)for unit prices andDECIMAL(15, 2)for totals in SQL. It also explains compound cascading discounts: 20+10+5% equals a 31.60% total discount, not 35%. - Rounding and penny balancing references/financial-math-and-rounding.md compares banker's rounding (half-even) with commercial rounding (half-up) and works through the line-by-line versus grouped VAT problem: 100 items at 1.05 with 22% VAT give 23.00 of tax as a sum of rounded lines but 23.10 on the grouped base. The guide records the 0.10 difference in an Arrotondamento residual field so the document balances to the cent, and notes that FatturaPA uses the grouped base in DatiRiepilogo.
- Special tax regimes SKILL.md describes three Italian cases the engine has to model: split payment for public administration (the total includes VAT but the payable amount excludes it), reverse charge (0% line VAT with a reference to the legal article) and virtual stamp duty applied above a statutory threshold, given as 77.47 euro for Italy. These are described in prose; there are no rule tables or code.
- Double-entry general ledger Gate 3 requires debit and credit totals to balance to zero, enforced at database constraint level, and gives the journal entry for a standard sales invoice (receivables against revenue and VAT payable). Drafts create no ledger entries and no stock movements; committing a document writes the journal entry, the payment schedule and the warehouse depletion in one transaction.
- Document lifecycle and fulfilment lineage Gate 4 defines a state machine from draft to committed, transmitted and reconciled, with drafts purgeable and committed documents only offset by a credit note. When an invoice pulls rows from a delivery note or order, each line keeps a link to its parent row and tracks ordered, delivered, invoiced and residual quantities; a delivery note counts as fully fulfilled only when every residual is zero.
- Oracle replay and mutation fuzzing For projects replacing a legacy system (the README names Arca, SAP, Dynamics and QuickBooks), the guide asks for a replay of 10,000 or more archived invoices with an expected difference of zero on headers, VAT groups and payment terms. Gate 5 adds mutation fuzzing of valid XML: removed, duplicated or reordered tags and illegal values such as February 30, hour 25:00, negative amounts or over-length strings, with the internal validator expected to agree with the government or reference engine on every rejection.
- Keyboard-first data entry references/keyboard-first-ux.md specifies a key map for document grids: Enter advances to the next cell with the text selected, F3 opens a substring search, F8 opens a multi-row picker for earlier delivery notes or quotes, Esc steps back through three levels, and Ctrl+Enter or F10 commits. The Gate 6 exit criterion is a 20-line document entered by keyboard alone in under 30 seconds.
- Direct printing and draft recovery The UX playbook describes printing without the browser print dialog by sending raw bytes from a desktop shell or local agent (Tauri or Rust are named) to the Windows spooler via winspool.drv, to a CUPS raw queue on Linux and macOS, or as ESC/POS or ZPL to thermal and label printers. It also covers autosaving the active draft every 500 ms to IndexedDB or LocalStorage, a beforeunload guard and a restore prompt at startup.
- Backups and disaster recovery Gate 7 describes hot snapshots with SQLite
VACUUM INTOwhile users keep working, a retention plan of 14 daily, 4 weekly and 12 monthly copies, compression with zstandard or gzip, and client-side AES-256-GCM encryption before copying to two separate cloud providers (Google Drive, AWS S3 and Cloudflare R2 are named as examples). - Anti-pattern list SKILL.md ends with ten anti-patterns the agent should reject, including floating-point money, adding compound discounts linearly, hard-deleting issued documents, dual writes, in-memory sequence numbers, ignoring line versus document rounding differences, mouse-dependent forms, browser print dialogs in warehouses, JVM or .NET runtime dependencies for validation, and drafts lost on refresh.
- Math verification script and CI scripts/verify_financial_math.py is a 2.5 KB Python script that uses only the standard
decimalmodule. It runs three assertions: float addition of 0.1 and 0.2 differs from 0.3 while Decimal matches, half-even rounding of 2.545 and 2.555, and the 0.10 penny-balancing delta from the VAT example. A GitHub Actions workflow runs it on Python 3.11 for pushes and pull requests to main. It demonstrates the rules; it is not a test suite for the user's own ERP.
Where rigorous-erp-builder fits
Starting an ERP or billing engine with an agent
The documented Antigravity flow is to clone the repository into the skills directory and prompt the agent to use rigorous-erp-builder to architect the billing engine for a given country or sector. The skill then asks the agent to work through the gates in order, starting with regulatory discovery and the data model before any UI or invoice generator. In Claude Code, Cursor, Windsurf or Codex the same text is supplied as repository rules (CLAUDE.md, AGENTS.md or .cursorrules), as described in the README.
Grounding a new jurisdiction in official schemas
For a new country, the jurisdiction playbook asks the agent to find the official government developer portal, download the XSD or JSON schemas into the repository so builds work offline, model the company fiscal identity and customer classes (B2B, B2G, B2C, foreign), and map the transmission states from draft through delivered, rejected, not deliverable and final acceptance. The reference table covers Italy, the EU Peppol and EN 16931 stack, France, Spain, Germany, Poland, the US, OECD SAF-T, Latin America and Saudi Arabia.
Getting VAT totals to balance to the cent
The financial math playbook addresses the case where tax computed per line does not match tax computed on the grouped base. It shows both methods, the size of the difference on a worked example, and the residual field approach used by FatturaPA. The bundled Python script reproduces the example with decimal.Decimal, and running python scripts/verify_financial_math.py prints the three checks.
Replacing a legacy accounting system
Where an existing system is being replaced, the README describes historical replay: running archived invoices through the new engine and expecting zero difference in headers, VAT groups and payment terms. SKILL.md adds mutation fuzzing of valid invoices to compare rejection verdicts with the government or reference validator. The repository describes these methods but does not include a replay harness or fuzzer.
Designing fast data entry for counters and warehouses
The keyboard-first playbook gives a concrete key map, search behaviour (substring rather than prefix matching), a multi-row picker for pulling delivery note rows into an invoice, an Esc hierarchy, draft autosave and recovery, and direct printing to OS spoolers and thermal printers. It targets cashiers, warehouse pickers and accountants who enter many documents per hour.
Planning local storage and backups
For self-contained or on-premise deployments, the skill describes SQLite in WAL mode with specific PRAGMA settings, hot snapshots with VACUUM INTO, a 14 daily, 4 weekly and 12 monthly retention plan, and encrypted copies to two cloud providers. For distributed deployments it points to PostgreSQL with a transactional outbox. Full text and file list are in the GitHub repository under the MIT license.
Install
git clone https://github.com/bottamedigianluca/rigorous-erp-builder.git ~/.gemini/config/skills/rigorous-erp-builderReviews of rigorous-erp-builder
Be the first to share your experience with rigorous-erp-builder.
Write a review
Loading review form…
Found rigorous-erp-builder useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.
