you can make almost any program self-improve btw
step 1: prompt your agent "help me plan comprehensive logging such that we can replay what the user experienced, meaningful internal operations, and visible outcomes"
step 2: setup a daily loop with this prompt "analyze my logs from this program in the past 24h thoroughly, identify broken behaviors, user friction, inefficiencies, and propose improvements sorted by estimated impact"
step 3: watch your code get better every day
if your program collect telemetry from users, you can do aggregated analysis which will give you even better results