r/ChatGPTCoding • • 23d ago

Question How detailed do you make docs? (agent guidelines vs human docs)

I mainly build web pages, and get confued about how to split documentaion between AI agents and developers

Things like adr or user scenarios doc - do they only need for humans? or the agent need to know them?

How detailed should i document, and how strictly should i separate agent guidelines from human docs?

Please share your tips on how you structure your docs and write guidelines!

5 Upvotes

13 comments sorted by

1

u/Eliran-Kotzero 22d ago

I'd stop thinking of it as agent docs vs human docs and split by when the info gets used. Anything the agent needs on every task (how to run tests, naming conventions, folders it must not touch) goes in one short AGENTS.md or CLAUDE.md. Things like ADRs and user scenarios stay as normal human docs, and the rules file just gets a one-line pointer like "read docs/adr before changing auth". That way the agent only pulls them in when the task touches that area, instead of carrying all of it in every session. Keep the always-loaded file to things that would change what it writes, since the longer it gets the more of it gets ignored.

1

u/punchman340 22d ago

That's cool! Keep claude.md short and usign pointers seems very efficient. Do you usually have the agent automatically fetch those pointers or do you manually feed them?

1

u/Eliran-Kotzero 21d ago

Mostly automatic. The one-line pointer in the rules file is enough for the agent to open the doc itself when the task touches that area, so I don't feed anything by hand. Naming the trigger (like 'before changing auth') is what makes it reliable.

1

u/ASIREXLABS 22d ago

We split it by purpose rather than by audience.

Agent guidelines (AGENTS.md or CLAUDE.md) stay short: how to run, test and lint the project, the conventions that are easy to get wrong, what not to touch, and pointers to where the deeper docs live. If a line doesn't change what the agent does, it doesn't belong there.

Human docs (ADRs, user scenarios, architecture notes) live in a normal docs/ folder. Agents do benefit from them, but only when they're relevant, so link to them from the guidelines ("for auth decisions, read docs/adr/004-auth.md") instead of copying them in. The agent reads them on demand, and you keep one source of truth.

For detail level, a useful test is: write the ADR so a new teammate could make the next decision without asking you. That's usually exactly what an agent needs too.

1

u/punchman340 22d ago

Splitting it by purpose..! Linking to deeper docs is a very good tip for saving context. Thx! Makes me wonder what kind of human docs to maintain in the docs/ folder... Always a struggle deciding how granular to break them down.

1

u/ASIREXLABS 21d ago

A rule of thumb that has worked for us: one doc per question someone will actually ask. "Why did we choose this auth flow?" is one ADR. "How does billing work end to end?" is one doc. If a doc starts answering two unrelated questions, split it.

Then keep a short docs/README.md index with one line per doc saying what it answers. The agent reads the index and opens only the one it needs, and humans use it the same way. That index is usually the highest-value file in the folder.

1

u/Competitive_Boot6914 21d ago

One feature can be the entry point into several small, linked specs. For password reset, I'd put intended behavior in a requirement, token fields and expiry constraints in a data spec, request/response rules in an API contract, and screen states in a UI spec. People and agents can read the same artifacts.

That's how we've structured Reqode's product model. Each artifact has a stable identity and responsibility, so shared data or API specs can support multiple features. Update the shared artifact once, then review the connected requirements and interfaces.

1

u/jleechanworldai 22d ago

Just make AI docs for AI to read lol. Which humans are gonna read your docs? Those sometimes better for human to outline it

1

u/punchman340 22d ago

Haha sad but true.. I can barely get through 100 lines these days. Ai fried my attention span

1

u/Difficult_Duty2198 22d ago

i only add a line to the agent file after it gets the same thing wrong twice. first time i just correct it in the prompt, second time it goes in as one short line plus an example. adrs stay with the human docs and i point at one only when the task actually touches that decision.

1

u/chriscanadian1991 16d ago

This might be overkill... but it also depends on what the purpose and the functions of the documents you are creating... for example - my project is upwards of 190+ python scripts (trying to make it modular instead of a monolith for debugging and troubleshooting) - with that many files and connections - one change could break everything.

I borrowed from my manufacturing background and created a... QA system of sorts.

ChatGPT generates workorders for itself and for me based on documentation standards I wrote - from that we work on that specific task and add notes where needed.

If there is an issue with something that I notice or if a concern is flagged within the system it generates a Non-conformance for investigation - I can mark it as Use-as-is, rework, or return (revert to older version) - included in the system control folder is also engineering drawings for integration, code flows, deployment, systems master, responsibilities master and so on... so far this has treated me well -- still working out some kinks though lol... working on automating the drawings and QA controls to integrate into my project to operate it itself :D.