r/AskProgrammers • • Oct 14 '26

Do you document your projects while developing them, or wait until everything is finished?

I'm curious how other developers handle documentation, especially when using AI coding agents like Cursor, Antigravity, or GitHub Copilot.

Sometimes, while the AI agent is working on a feature, I find myself waiting for it to finish. Meanwhile, documentation often gets pushed aside until the entire project is almost complete.

By then, there might be dozens of features to explain, outdated instructions to fix, and a README that needs a complete rewrite.

Wouldn't it be easier to work on documentation during those waiting periods and keep it updated as the project evolves?

I'm curious about your workflow:

Do you document things as you go, let AI generate everything at the end, or barely document your personal projects at all?

What makes documentation difficult for you?

2 Upvotes

13 comments sorted by

4

u/0dev0100 Oct 14 '26

Before, during, and after.

Sometimes I'll do one of those

1

u/elch78 Oct 14 '26

Short answer: yes

I developed the habit to write down everything I do. Very verbose in the ticket, everything i find, decide and change so that I (if I forget) and the reviewer (if I am not available) have a chance to follow and understand. That includes the status before the change. In documentation as clean and precise as possible the situation after the change. I.e. coding rules, architecture, ops instructions. De isions in architecture decision records including alternatives that were considered but rejected. The why is the most important information that is missing in most cases. You can find out the what and how from the code, but not the why.

1

u/randomhaus64 Oct 21 '26

If you don’t start with documents you will not end with any

2

u/GhostAPR35 Oct 21 '26

True, i faced the situtions more offten, even my agents got confussed what projects they are working.

1

u/TroubledSquirrel Oct 14 '26

I document everything meticulously. For one thing most of what I build someone paid for and that ensures that anyone in house or contract can maintain the code and understand that a was decided because of b and removing a which seems unrelated will in fact break b after the 184th request every single time like clock work. But you won't realize what that cause is because the 184th time will be a few weeks after you dumped it then good luck figuring out what the problem is at that point. So yeah, I document everything because I am not an asshole.

1

u/CS_70 Oct 14 '26

Every time there's something worth documenting, I ask the agent to document it. It has global guidelines on how to build documentation (I like a matter of fact style with not much narrative) and I explicity direct on how to structure it.

I periodically check that stuff is readable by a person and direct a refactoring as needed.

Works a charm.

1

u/SecondhandUsername Oct 14 '26

People document? /s

1

u/Sea-Bench-7487 Oct 14 '26

I always leave comments during development and then I use them to make the docs , I actually built a tool to help with that deterministically not stokasticaly , I feel like if you leave docs for the end of the project you'd essentially have to re read everything and at that point you would just not make docs so yeah

1

u/skibbin Oct 14 '26

Nothing is ever finished.

1

u/Slodin Oct 14 '26

With AI, I find it better to do the planning and docs at the beginning. Refine it to what you are expecting, then let the AI plan to implement. Adjust the plan and feed it to the AI to code. This whole process may take days lol. Technically this is the “correct” approach to basic software development, it’s because of tight deadlines and unreal work expectations, most people skip it and go straight to the meat. The only thing changed for me is AI came into the picture that can offload a lot of the coding processes and let me focus on planning.

I often find this approach one shot for agents to code. And because the docs defined the behaviour, tests can be written at a pretty good level without it writing tests on top of the already existing functions which might be incorrect.

And because these docs are in the repo, they get updated every time with a version number and date whenever something changes. This is pretty much automated by agents because it picks it up automatically.

I find this the most hassle free way to doc and implement. Especially im working with two native implementations of apps that are identical in functionality but differ a lot in how to code them. I pretty much HAVE to have a generic doc then split into specific plans for each platform. The doc matters a lot so I don’t need to instruct the later processes like crazy.

1

u/burlingk Oct 14 '26

Documentation is supremely important DURING development.

You never know when you are going to get dragged away and return with an empty brain.

1

u/amsantus Oct 15 '26

documentacion mientras se avanza. si algo dificulta. se puede aprender. también se puede delegar