This is a report on how we used an AI editor, CursorAI, to rewrite a project. We will describe the context and explain how we leveraged existing tests to develop a new version of the tool we were using.
This is not a simple success story. We’ll try to explain our approach and the pitfalls we experienced, along with the different cases of hallucinations we encountered, and how our salvation is the attention we have and the reliance on our tests. We hope to give you an example of how rewriting code using AI can take place. It is also a reflection on how we can leverage old code and tests to ensure this success.