You can ask cursor itself to create and update the tasks.md file.
Tell it to remove the task from the file after it's done, then do a commit. That way if it screws up at some point you can checkout the last good commit and start from there in a new chat.