spec-driven development is pretty good at this