Financial Integrity

Enforce decimal arithmetic and append-only records for provable financial accuracy.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/captjay98/livestockai --skill financial-integrity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Financial Integrity
Source: https://github.com/captjay98/livestockai/tree/main/.kiro/skills/financial-integrity
Command: npx skills add https://github.com/captjay98/livestockai --skill financial-integrity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Financial calculations and revenue tracking must be provably accurate and auditable to prevent floating-point errors and ensure trust in financial reports.

Core Features & Use Cases

  • Penny Perfect Rule: enforce integer or high-precision decimal arithmetic for all monetary values.
  • Storage Standards: use DECIMAL(19, 4) for unit prices and DECIMAL(19, 2) for final transaction amounts; rely on decimal.js via currency utilities.
  • Invariant Testing: apply property-based tests (fast-check) to prove financial laws hold for all inputs.
  • Immutability & Audit Trails: maintain append-only financial records with reversal and correction transactions to preserve history.
  • Multi-Currency Safety: capture exchange rates at the time of transaction to avoid drift.

Quick Start

Adopt the Penny Perfect rule by using decimal arithmetic and currency utilities for all money calculations.

Frequently Asked Questions about Financial Integrity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent floating-point errors in financial calculations?

To prevent floating-point errors in financial calculations, enforce integer or high-precision decimal arithmetic using decimal.js. This Penny Perfect rule ensures provable monetary accuracy across all transactions.

What's the best way to maintain an immutable audit trail for revenue tracking?

Maintain an immutable audit trail for revenue tracking by using append-only financial records with reversal and correction transactions. This preserves historical data and ensures provably accurate financial reports.

Does invariant testing with fast-check work for proving financial calculation accuracy?

Invariant testing with fast-check proves financial calculation accuracy by applying property-based tests. This verifies that financial laws hold true for all possible inputs in your revenue calculations.

What DECIMAL storage standards should I use for transaction amounts and unit prices?

Use DECIMAL(19, 4) for unit prices and DECIMAL(19, 2) for final transaction amounts. These storage standards enforce high-precision decimal arithmetic and prevent rounding errors in invoicing.

How do I handle multi-currency exchange rates safely in invoicing systems?

Handle multi-currency exchange rates safely in invoicing by capturing the exchange rate at the exact time of transaction. This avoids exchange rate drift and ensures provable financial accuracy across multi-currency contexts.

When do I need high-precision decimal arithmetic for pricing calculations?

You need high-precision decimal arithmetic for pricing calculations whenever applying the Penny Perfect rule. It is required for all pricing, invoicing, and revenue calculations to ensure provable financial accuracy.