When should you use it?
- Docs fell behind after a restructure
- New hires keep asking how to run the project
- An autonomous coding agent can work on a branch in your repo
Not for: Explaining why the system is designed the way it is; that knowledge is not in the code; Repos the agent cannot build or run
What do you need, and what do you get?
You need
- Repository access on a working branch
- The current README, even if stale
- Any architecture notes or diagrams you have
You get
- An outline you approve before writing
- A new README with setup per OS, environment variables, local and container runs, and request and response examples
- A note of what changed and why
How does it work, step by step?
- State the target readerSay the README must let a new developer set up, understand the layout and make a first change without asking anyone.
- Approve an outline firstHave the agent read the code and current README, then propose headings before it writes.
- Write on its own branchAsk it to branch from your main development line and never force push.
- Make it test its own docsTell it to set aside what it knows, follow its setup steps line by line and fix anything missing or wrong.
- Add the design reasoning by handAdd design decisions and project purpose, which the agent cannot infer from code.
The prompt
Our own prompt, inspired by Wataru Takahashi and written to work in Custom agent. Values in lime are placeholders.
Rewrite README.md for [repo]. Audience: a developer new to the project who must run it locally and make a first change. First read the codebase and the current README, then send me a proposed outline and wait for approval. After writing, ignore what you learned, follow the README from a clean checkout step by step and fix any gap or error you hit. Include per-OS setup, environment variables, local and container runs, and request/response examples. Work on a new branch from [develop]; never force push. List your changes and why.
Inspired by Wataru Takahashi: Boosting Documentation with Devin AI: A Hands-On Experience. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Outlines can sprawl; trim sections nobody will read before approving.
- Give it internal design docs if you want rationale covered, otherwise expect that section to be thin.
Our take
After rearchitecting a codebase, Wataru Takahashi's team asked Devin to rewrite its README. The agent scanned the repo, proposed an outline for approval, drafted the file, then reread it as a newcomer and followed the setup line by line to catch gaps. It handled setup and endpoints well but missed design rationale. The self-test is the step to keep: asking the agent to forget its context and follow its own instructions catches the missing environment variable or skipped command that makes docs useless. He is honest about the limit, since code does not record why it was built that way. Pair the agent's draft with ten minutes from whoever made the key decisions, and have a new team member try the setup before you merge. Approve the outline first so structure is right. Keep the rewrite on its own branch. Add architecture decision records by hand where the why matters. Link to runbooks the README should not duplicate.
Where the time goes back: A README rewrite means reading the whole repo and re-running setup to check it; the agent does both, leaving you a review instead of a writing job.
FAQ
What did the agent do well?
What did it miss?
Source and credit
Inspired by Wataru Takahashi. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Boosting Documentation with Devin AI: A Hands-On Experience
- Creator
- Wataru Takahashi
- Published on
- Medium
- Original date
- Jan 18, 2025
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; nothing was sent, filed, purchased or published.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.