Skip to main content
ERPClaw OS

The self-improving ERP engine

Every ERP processes transactions. Only ERPClaw learns from them. 18 constitutional articles. 3 evolution phases. 701 OS-specific tests. The only ERP that detects gaps and generates modules while protecting financial integrity.

18 Constitutional Articles

Inviolable rules that govern every operation. The AI cannot override them. No admin can bypass them. They are the foundation of trust.

1

Financial data integrity is inviolable

2

Double-entry accounting is always enforced

3

GL entries are immutable -- cancel creates reversal

4

All financial amounts use Decimal (TEXT storage)

5

IDs use UUID4 (TEXT storage)

6

Submit operations are atomic (single transaction)

7

12-step GL validation on every posting

8

Only owning module can write its tables

9

Any module can read any table

10

Parameterized queries only -- no string interpolation

11

Output is always JSON to stdout

12

Errors are JSON with exit code 1

13

WAL mode and FK enforcement always ON

14

Draft-to-Submit lifecycle on all documents

15

Naming series follow deterministic patterns

16

RBAC governs all data access

17

AES-256 encryption for sensitive fields

18

Backup is always recoverable

Three Evolution Phases

ERPClaw OS grew through three phases, each adding more autonomy while maintaining safety.

Phase 1: Child

255 tests
  • Module generation from 7 deterministic patterns
  • SKILL.md validation and linting
  • Sandbox testing before deployment
  • Schema DDL generation and migration
  • Constitutional article compliance checks

Phase 2: Teenager

226 tests
  • Tier classification system (Tier 0-3 autonomy)
  • Schema migration engine
  • Deploy pipeline with safety gates
  • Install-suite for grouped installs
  • Adversarial audit and compliance weather

Phase 3: Adult

220 tests
  • Semantic correctness engine
  • Self-improvement log with change tracking
  • DGM variant engine (evolutionary optimization)
  • Heartbeat analysis per module
  • Gap detection across business workflows

Safety Model

Self-improvement sounds risky. Here is how ERPClaw OS ensures every change is safe.

11 Protected Files

Core financial files (gl_posting.py, stock_posting.py, etc.) can NEVER be modified by the AI. Hard-coded exclusion list.

Constitutional Tests

153 automated tests verify every article is enforced. Run before every deployment.

Tier Classification

Tier 0 (manual only) through Tier 3 (autonomous). Financial modules are always Tier 0.

23 Invariant Checks

GL double-entry balance, voucher balance, immutability verification per transaction batch.

Sandbox Validation

Every generated module runs in an isolated sandbox before deployment to production.

Semantic Verification

Changes are validated against business rules, not just syntax. Catches logic errors before they reach production.

See the code behind the OS

Every constitutional article, every safety check, every generation pattern -- open source under open source license.

View on GitHub

Related: read the architecture in AI-native ERP, see the test surface at quality, the foundation features, or the engineering deep-dive in building ERPClaw with Claude Code.