Skip to content

PTA Standards

Conformance Tests

Plain Text Accounting Standards: Specifications for Beancount, Ledger, and hledger formats.

[!NOTE] This project is in early development. Contributions welcome!

Overview

This repository contains formal specifications for plain text accounting formats:

Format Version Status
Beancount v3 Draft
Ledger v1 Planned
hledger v1 Planned

Structure

pta-standards/
├── core/           # Shared foundations (data model, types, numerics)
├── formats/        # Individual format specifications
│   ├── beancount/  # Beancount v2, v3
│   ├── ledger/     # Ledger v1
│   └── hledger/    # hledger v1
├── tests/          # Conformance test suites
├── tooling/        # CLI, LSP, error code specifications
└── meta/           # RFCs, ADRs, governance

Goals

  1. Precise: Unambiguous specifications that can be implemented correctly
  2. Testable: Comprehensive test suites for conformance verification
  3. Interoperable: Enable format conversion and tool compatibility
  4. Community-driven: Open process for evolution and extension

Specifications Include

  • Grammars: EBNF and ABNF formal grammars
  • Schemas: JSON Schema and Protocol Buffers for AST
  • Tree-sitter: Editor integration grammars
  • Formal models: Alloy specifications for invariants
  • Test vectors: Conformance test suites

License

  • Documentation (*.md, specs): CC-BY-4.0
  • Code (grammars, schemas, tests): MIT

Contributing

See CONTRIBUTING.md for guidelines.

Conformance Test Results

Results updated nightly. See conformance documentation for details.