financial-invariants
Installation
SKILL.md
Financial Invariants
Workflow
- Map the domain: list financial objects in scope, trace where data enters, and document balance source of truth, lifecycle states, identifiers, rounding rules, and audit records.
- State the invariants before editing (e.g. "posted ledger entries are immutable"). Inspect current behavior first; ask the user only when code/tests don't reveal the rule.
- Test the invariants through public services/APIs/commands/jobs: normal posting, boundary amounts, currency mismatch, invalid state transitions, reversal/correction, retried operations.
- Implement defensively: typed value objects/schemas/DB constraints, checks near the write boundary, DB transactions for multi-record writes, domain errors naming the invariant.