# T12: Multi-Turn Constraint Retention

## Round 1

Add `--by-category` to `python3 -m ledger summary`. When enabled, group by the exact original category text, print one `category: amount` line per group, ordered by ascending Unicode code point of the category; when not enabled, the default summary output stays unchanged. Add a reusable by-category aggregation function, tests, and a short usage note. Do not delete or modify the original tests. Give a complete reply after round 1.

## Fixed round-2 follow-up

Additional constraint: category comparison for `--by-category` becomes case-insensitive (using Unicode `casefold`). When merging categories that differ only by case, display the original spelling of the record with the smallest `id`; order output by the casefolded category key ascending, and the result must be stable regardless of CSV input row order. Satisfy the constraint on top of your existing changes and rerun the relevant checks.
