Our in-app assistant answers “how do I do X?” from RAG over the UI docs. An agent that opens the app and writes those docs from the code diff can keep up.
By Alejandro Aboy
Published: 2026-11-26
URL: https://thepipeandtheline.substack.com/p/what-if-we-use-agents-to-write-docs
Hi there! Alejandro here 😊
Subscribe if you like to read about technical data & AI learnings and deep dives!
Enjoy the reading and let me know in the comments what you think about it 👨🏻💻
📝 TL;DR
-
Hand-written UI docs go stale, and a RAG over stale docs describes buttons that moved
-
An agent that reads the code changes, opens the app and tries the flows can write those docs as short task cards
-
Only the pages that changed get redone each week, and the pipeline is ordinary data engineering
I have heard this situation a lot, before AI times it was a hassle.
Product and Customer Sucess teams were not keeping documentation up to date because that was always deprioritised.
At work, we experienced that exact situation:
The web UI docs behind the assistant were Zendesk articles written by people, and the UI changed faster than anyone could document it. With AI coding? It just became worse.
Then you have an article saying you should click on “Settings → Team” when the UI shows “Settings → Members” and that’s enough to make users run away and report a bug.
Let’s see how AI can make this better, mixing Data & AI Engineering skills!
An Agent That Uses & Documents The App
Its pretty simple, and I still remember the first time I saw Claude Code controlling my chrome, it was a 😱 moment.
The agent runs with the Playwright MCP against the app, either a stack brought up locally or a Claude Code cloud environment if you want to go fancy.
A skill holds the card format and the MCP gives the agent its eyes and hands, the pairing I describe in Why Skills and MCP Work Better Together. It does three things in order:
-
Reads the frontend code to learn the routes, so it knows which pages exist and how to reach them.
-
Reads the week’s merged PRs to see what shipped.
-
Opens the affected pages, tries the flows and writes down what can be done on each page.
The output is a task card per page action, and every step in it is one the agent performed.
The agent does not write into the RAG store: it opens a PR with the .md cards, so the repo records every increment, and a separate pipeline ingests the files once they are merged.
Thanks for reading The Pipe & The Line! This post is public so feel free to share it.
Task cards: Your AI Guidance Snippets
Before any agent touched the app, the docs were rewritten as task cards:
One concrete task per card with only the relevant steps and the less prose possible.
The authoring skill now writes them that way and the RAG chunks one card per piece, so a chunk answers one question end to end (I wrote about chunking earlier in the RAG series).
Short cards also keep what the assistant loads small, the same idea as progressive disclosure.
The format was chosen for retrieval, and it also turned out to be one an agent can check, because a short list of steps is something you can run.
The agent you will use to answer questions about the UI won’t ever see images, it will rely semantically on task cards by semantic relevance.
Incremental Loading
Reopening every page every week would be slow, and it would rewrite cards that did not change.
So the pipeline remembers the last commit it processed. Each week it asks Git what changed since then, and only the pages touched by those changes go back to the agent.
The agent either rewrites the card or checks it against what it sees in the UI.
Once the cards are merged, a pipeline loads them into the RAG store.
It runs weekly in my case, which only reflects how often our UI ships. A team that ships daily would run it more often.
How The Work Is Changing
Before, documentation was left as the last priority because nobody was reading it.
Now users want to asks (or make their agents ask) about your product, so documentation has to be treated as a data product.
It has to be easy to discover and fast to understand for AI clients.
Ironically, we can remove the friction of maintaining documentation that involves opening tabs, clicking around and repeating the process every week.
And that’s why I have no before- after numbers, because the only thing to compare against is the human documentation that was always out of date 😂
If you enjoyed the content, hit the like ❤️ button, share, comment, repost, and all those nice things people do when like stuff these days. Glad to know you made it to this part!

Hi, I am Alejandro Aboy. Started in digital marketing, moved to website tracking, data analytics, analytics engineering, data engineering, AI engineering and right now I am still figuring out what my role will look like in the next 6 months.
I am just learning stuff and sharing it and hope that’s enough for you to learn great things about Data & AI overlaps!
