Edit: there's no perfect way, but a broad start/stop
gate of creating then merging a branch gives a reasonable idea of time taken. Then you can use AI to trawl through high time-cost features and see if there's ugly implementation lurking.
I also considered that, but it'd require shortening the lifetime of a git branch to also capture interruptions across projects, meetings, etc. So the more you increase accuracy, the more tedious this gets.
I track branch time, which is the most honest I've found. I don't trust any self-reporting (me included).
It's pretty simple, and gives a broad view of feature dev time. Whether using AI to code or not.
https://github.com/thisdougb/git-time-hooks
Edit: there's no perfect way, but a broad start/stop gate of creating then merging a branch gives a reasonable idea of time taken. Then you can use AI to trawl through high time-cost features and see if there's ugly implementation lurking.
I also considered that, but it'd require shortening the lifetime of a git branch to also capture interruptions across projects, meetings, etc. So the more you increase accuracy, the more tedious this gets.
I just use a branch per feature or unit of work. The git hooks make the time measurement automatic.
probably about 10 seconds of effort, over the course of 1-3 days of coding time.