How do you beat Lady Butterfly in Sekiro: Shadows Die Twice?

Quick answer: Shoot her down with the Shuriken when she leaps to the rafters, jump over her sweeps, and use Snap Seeds or kill her illusions fast in phase two.
Show walkthrough (quest spoilers)
Before the fight
Lady Butterfly is in the burning Buddha hall of Hirata Estate, opened with the Hidden Temple Key from Owl. Fit the Shuriken Wheel and buy Snap Seeds if you have them. She has two health bars.
Phase one
She throws kunai, which you can block or deflect. When she leaps up to the rafters, throw a Shuriken as soon as she jumps to knock her down. Punish her with charged attacks after missed ground combos and dash attacks.
Perilous attacks
For her perilous attack from above, step aside and strike while she recovers. For her perilous sweep, jump and kick off her for heavy posture damage. Jumping over her low attacks also gives you a free hit on landing.
Phase two: illusions
She summons illusions of enemies that slowly turn into homing butterflies. Run to the middle of them and use a Snap Seed to dispel them, or kill as many as you can; they drop Spirit Emblems. When she turns them into butterflies, hide behind a pillar.
Rewards
She gives 1,500 XP, Memory: Lady Butterfly and a Sakura Droplet. See the Hirata Estate walkthrough for the rest of the area.
