I feel like this is doable with a good LLM-assisted coding tool, but it's just a hunch.