Build a local double-entry personal ledger with proper investment lot tracking. Runs on one machine, touches no bank. Core ledger: accounts (checking, savings, credit, loan, brokerage), transactions with splits, transfers between accounts recorded as one transaction rather than two, payees, and a category tree. Every posting balances; a transaction that does not balance cannot be saved. Import: OFX/QFX and CSV. For CSV, saved per-bank column mappings including date format, sign convention and whether debits are negative. Detect duplicates on a fingerprint of date, amount and normalised description, and show suspected duplicates for confirmation rather than silently skipping. Keep an immutable import log recording the file, its hash, and every transaction it created, so a bad import can be reversed exactly. Categorisation rules: ordered, user-written rules matching on payee substring, amount range or account. Show which rule matched each transaction and let the user override a single instance without changing the rule. Never use a model to guess categories — a rule you can read is worth more than a classifier you cannot. Investment tracking, which is the substantial part. Model holdings as lots: each buy creates a lot with a date, quantity and cost basis. Sells consume lots by a selectable method (FIFO, LIFO, specific identification) and produce a realised gain or loss with its holding period. Handle dividends, dividend reinvestment (which creates a new lot), stock splits (which adjust quantity and per-share basis across every open lot), and return of capital (which reduces basis). Prices are entered manually or imported from a CSV; do not depend on a market data API. Reports: net worth over time, spending by category per period, budget versus actual, cash flow, account reconciliation against a statement balance, and a realised gains report grouped by holding period. Every report exports to CSV. Storage: SQLite, with an automatic timestamped backup before any import or bulk edit, and a documented restore procedure. Out of scope: connecting to any bank, screen-scraping account access, moving money, and generating filed tax forms. State clearly in the README that the gains report is an aid to preparing a return, not a substitute for one.