amanah-debt-domain
Enforce Amanah debt, payment, evidence, status, currency, and audit business rules.
SKILL.mdskills/amanah-debt-domain/SKILL.md
GitHubPurpose
Preserve accurate, reviewable debt histories.
Scope
Debt, DebtParty, Payment, Evidence, DebtStatus, Currency, and AuditEvent.
Rules
Store original amount and ISO currency; record payments separately; derive remaining balance; retain settled debts; create an audit event for meaningful mutations.
Required patterns
Use integer minor units or fixed precision, transactions for balance-affecting work, immutable-style timelines, and explicit ownership.
Forbidden patterns
Never overwrite original amounts, hide history, silently change currency, delete settled records automatically, or allow overpayment without a defined rule.
Relevant modules
Debt, payment, evidence, currency, database, API, and audit.
Testing
Test partial/full payments, concurrent writes, rounding, settlement, currency immutability, and ownership.
Definition of done
Balances derive correctly, histories remain intact, and every mutation is authorized, transactional, and audited.