Efficient chemical synthesis is critical to satisfying future demands for medicines, materials, and agrochemicals. Retrosynthetic analysis of modestly complex molecules has been automated over the course of decades, but the combinatorial explosion of route possibilities has challenged computer hardware and software until only recently. Here, we explore a computational strategy that merges computer-aided synthesis planning with molecular graph editing to minimize the number of synthetic steps required to produce alkaloids. Our study culminated in an enantioselective three-step synthesis of (–)-stemoamide by leveraging high-impact key steps, which could be identified in computer-generated retrosynthesis plans using graph edit distances.