PostHog has this feature today. They have the concept of "Scouts", which are agents that scour ingested event data, replay sessions, and possibly also other kinds of data (though I haven't looked into what that means in practice), triage what they see, and put up PRs against them.

Update: I hope that didn't come across as a detraction; it's cool that you're building this. PostHog is open source, so if you haven't looked at their implementation yet, take a look, maybe it'll be useful to you!

Thanks for the comment! I did come across posthog and it's a good validation that it is an important problem to solve!