Fix 1 of 2
Generate docs and READMEs from the code with AI, then edit
A coding agent can read the module and write a first draft of the README, architecture notes or API docs, so you edit for accuracy instead of writing from nothing.
- 1Run a coding agent in the repo and point it at the module.
- 2Use the prompt below and name the audience.
- 3Correct anything wrong and add the "why" that the code cannot show.
- 4Ask the agent to update the doc in the same PR whenever the code changes.
Read [MODULE OR FOLDER] and write a [README / design doc / runbook] for [AUDIENCE, e.g. a new engineer on the team]. Include: what it does, how to run and test it, the main components and how they talk to each other, config and environment variables, and known gotchas. Only describe what is in the code; mark anything you are inferring with [CHECK].
Tools: Claude Code, OpenAI Codex, Cursor, GitHub Copilot agent mode or Devin Desktop (ex-Windsurf)