I believe I've figured it out. When you open a position (whether net debit or credit), it's a buy, and when you close a position, it's a sell.