What the agent does
The agent starts from how the site already turns its posts into a machine-readable file, because the cheapest llms.txt reuses that path. In a blog laid out like vuejs/blog, package.json pins vitepress at ^1.3.4 (the lockfile resolves 1.3.4), names pnpm@9.8.0 as packageManager, and has four scripts: dev, build (vitepress build), serve and preview. .vitepress/config.ts sets the title The Vue Point, a one-line description, cleanUrls: true, a head with Twitter card metas and a Fathom script, and buildEnd: genFeed. .vitepress/genFeed.ts is the model: it calls createContentLoader('posts/*.md', { excerpt: true, render: true }), sorts the posts by their date front matter, and writes feed.rss into config.outDir with the feed package, each item linked at https://blog.vuejs.org plus the post's URL. .vitepress/theme/posts.data.ts uses the same loader for the home page list. The fifteen files in posts/ carry title, date, author, gravatar and twitter in their front matter and nothing else; index.md is the home page with index: true. There is no .github directory, so nothing runs in CI; vercel.json repeats cleanUrls and caches /assets/.
The agent adds .vitepress/genLlms.ts beside genFeed.ts rather than a plugin, since the project already has every piece. It loads the posts with createContentLoader('posts/*.md', { excerpt: true, includeSrc: true }), so each entry carries its raw Markdown as src, and sorts them newest first the way genFeed.ts does. For llms.txt it writes an # The Vue Point heading, the site description from the config as a blockquote, and a ## Posts list with one line per post: the title linked to https://blog.vuejs.org/posts/<name>.md, the date, and the author. For llms-full.txt it concatenates every post's src in the same order, with the front matter removed by gray-matter, which is already a devDependency, and a # <title> heading and the date and author restored above each body. It writes both files into config.outDir, and beside them a posts/<name>.md copy of each post so the links in llms.txt resolve to Markdown; with cleanUrls on, posts/vue-3-5 stays the HTML page and posts/vue-3-5.md is the source. config.ts changes one line: buildEnd becomes an async function that awaits genFeed(config) and then genLlms(config). The posts.data.ts loader and the theme are untouched.
Two details come from reading the posts rather than guessing. date is a bare YYYY-MM-DD in the front matter, so the agent formats it the way posts.data.ts does, with UTC noon to avoid an off-by-one day. And the post bodies use [[TOC]] and ​ entities, which genFeed.ts already strips from the rendered HTML, so the agent strips both from the Markdown before it lands in llms-full.txt. tsconfig.json includes ./.vitepress/**/* under strict, so the new file type-checks with the rest and uses the SiteConfig type that genFeed.ts imports.
To check it, the agent runs pnpm install --frozen-lockfile and pnpm build in its sandbox, reads .vitepress/dist/llms.txt to confirm one line per file in posts/, in date order, with the newest first, greps llms-full.txt for the heading of the oldest post to confirm nothing is cut, confirms feed.rss is still written and unchanged against a build from the current branch, and fetches one posts/<name>.md from pnpm preview to confirm the links resolve. Because deploys are Vercel builds of the same vitepress build, no workflow or hosting change is needed.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Add llms.txt and llms-full.txt to this VitePress blog without adding a dependency. Read package.json, .vitepress/config.ts, .vitepress/genFeed.ts, .vitepress/theme/posts.data.ts, a few files in posts/ and vercel.json first. Write .vitepress/genLlms.ts modelled on genFeed.ts: load posts/*.md with createContentLoader using includeSrc, sort newest first, write llms.txt with the site title, the description as a blockquote and one linked line per post with its date and author, write llms-full.txt with every post's Markdown with the front matter removed and a heading, date and author restored, and copy each post's Markdown into the output directory so the links resolve. Chain it after genFeed in the config's buildEnd. Strip the same entities genFeed strips. Run pnpm install --frozen-lockfile and pnpm build, show llms.txt, check llms-full.txt is complete and feed.rss is unchanged, and open a pull request with the output.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The pull request adds .vitepress/genLlms.ts and changes one line of .vitepress/config.ts. Its description pastes the generated llms.txt in full, the first lines of llms-full.txt, the build output, and a diff between the old and new feed.rss that shows nothing changed in the feed.
There is no workflow to run, so the evidence is the run's record: the pnpm build output, the directory listing of .vitepress/dist/ with the two new text files and the posts/*.md copies, and the pnpm preview request that fetched one of them.
Before merging, a reviewer reads the blockquote and the per-post lines for wording, decides whether llms-full.txt should also carry the home page's index.md, and checks that the Vercel preview for the branch serves /llms.txt as plain text. The theme, the posts and the feed are unchanged.
Run it on every VitePress site without an llms.txt
A team with several VitePress sites sends this body once per repository to POST /o/{org}/sessions, each with its own repository in resources and a request_id that is a UUID v5 of the repository's full name, so a retried call returns the run already started. Each run reads its own config.ts: a docs site with a sidebar gets llms.txt sections from the sidebar groups instead of a flat post list, and a site that already has a buildEnd hook gets the new call chained after it.
Once the hook is in the config, no further run is needed when posts change, because every vitepress build regenerates both files. A webhook_url on the key reports each run.completed with the pull request in result, and a run.failed names a site whose build broke, for instance one whose content glob matched a draft with no title.
The use case this job follows, with its automation and trigger: Hand off a long task.
Why run it on Rush?
The change is thirty lines of TypeScript, but getting it right means reading how this site already loads content, how it formats dates, which entities it strips and where its output goes, and then proving the feed it already publishes did not move. The agent does that reading in its own sandbox, builds the site there, and quotes the files rather than describing them.
The build output, the generated files and the feed diff stay with the run and are pasted into the pull request. Several sites can get the same change at once, each in its own sandbox, each with its own evidence, while the person who asked keeps writing.
Frequently asked questions
Why not use a VitePress llms.txt plugin?
A blog with fifteen posts and a working buildEnd hook already has the loader, the sort order and the output directory it needs, so a plugin would add a dependency to do what genFeed.ts does. A larger docs site with nested sidebars may prefer a plugin; the agent says so in the pull request and leaves the choice to you.
Do the links in llms.txt point at HTML or Markdown?
Markdown. The agent copies each post's source into the output directory as posts/<name>.md, next to the HTML page that cleanUrls serves at posts/<name>, so a model that follows a link gets the text rather than a rendered page. llms-full.txt carries the same text inline for readers that want one file.
Will it break the RSS feed?
No. genFeed runs first inside the same buildEnd, exactly as before, and the agent diffs feed.rss from the current branch against the new build to show it. If genLlms throws, the build fails loudly rather than shipping a site without the feed.
What about the draft and future posts?
The loader reads every file the glob matches, so a draft in posts/ lands in both files as it already lands in the feed and on the home page. If you keep drafts in the directory, the agent adds the same draft front-matter check to all three loaders so they stay consistent.