l3dg3rr
Note on naming: This project uses multiple names (l3dg3rr, ledgerr-mcp, ledgrrr, ledg3rr) depending on context. See POLYSEME-MAP.md for the mapping.

l3dg3rr is a general-purpose, git-versioned systems modeling and action/decision registry: a strongly typed, ontologically linked graph of scriptable, visual-first workflows, where Rust owns structural invariants, Rhai owns editable classification and workflow rules, and AI/LLM agents drive supervised ETL through MCP tools without taking custody of credentials or approval authority. Local-first bookkeeping — turning financial documents into an accountant-usable, CPA-auditable source of truth — is the first dogfood vertical proving out that substrate, not the project's purpose. Requirements (ReqIF), schema/data modeling (LinkML), and a decision+cost ledger are newer verticals sitting on the same substrate: the ontology graph, the evidence chain, Rhai policy, and KerML/OWL2 metamodel work.
Read the live book: https://promptexecution.github.io/ledgrrr/
Bookkeeping vertical's primary outcome: ingest raw historical statements, classify and reconcile transactions, preserve evidence and mutation history, then export a CPA-reviewable Excel workbook without requiring private data to leave the local machine.
System Thesis
The project is intentionally not just a PDF parser, a rules folder, or a visualization experiment. Those are subsystems of one general process/action control plane, expressed here through its original bookkeeping vertical:
fn source_documents() -> typed_document_graph
fn typed_document_graph() -> extraction_and_normalization
fn extraction_and_normalization() -> transaction_classification
fn transaction_classification() -> validation_and_legal_checks
fn validation_and_legal_checks() -> reconciliation
fn reconciliation() -> workbook_export
fn workbook_export() -> cpa_review
fn cpa_review() -> audit_history
The workbook remains that vertical's human and accounting interface. The graph, sidecar state, Rhai rules, MCP tools, and visualization layers exist to make it reproducible, explainable, and agent-accessible — and the same typed-state machine now also governs non-bookkeeping verticals (requirements, decisions, costs) and agent capability discovery/skill lifecycle, not just financial documents.
Design Lens: TRIZ + MECE
l3dg3rr resolves recurring product contradictions by separating concerns instead of adding one-off glue:
| Contradiction | Resolution |
|---|
| Accountant-readable vs machine-replayable | Excel is the CPA-facing artifact; journal and sidecar state preserve deterministic replay. |
| Runtime-editable rules vs financial correctness | Rhai handles heuristics at controlled boundaries; Rust types enforce money, identity, validation, and workbook contracts. |
| Agent autonomy vs operator control | MCP exposes capability families; host policy, audit, approvals, notifications, and credentials remain owned by l3dg3rr. |
| Rich visual workflows vs stable execution | A narrow Rhai diagram DSL renders Mermaid and isometric views while typed Rust workflow structs own execution contracts. |
| Xero integration vs local-first privacy | Xero is a supervised capability reached through worker tools and reconciled evidence, not raw credential leakage to a model. |
| Claude/Desktop installability vs privileged Windows control | MCPB installs only the Claude-facing controller; a native Windows installer owns service, tray, repair, update, and UAC boundaries. |
| Office-native diagrams vs local evidence ownership | OneNote/Office and SharePoint publish versioned playbook artifacts; ledgrrr remains the source of truth for evidence, simulation, and refresh provenance. |
MECE module grouping keeps the logic approachable: