There's a lot of people here that clearly haven't ever tried what you're describing op (or maybe tried recent AI at all).
I have. I think it's a totally valid question. Sometimes when I'm getting AI to do stuff it reads the docs and then tries stuff anyway and finds the docs are wrong.
I also often use AI to generate docs for undocumented things.
But I think it does still make sense to have docs for a few reasons:
- They show the intent explicitly, rather than having it inferred. Same reason anything explicit is better than implicit, e.g. static types.
- It spends fewer tokens to read docs than to constantly reverse engineer software.
- It's also quicker.
- Sometimes you do still want to understand the thing...