- Documentation
- AI
- Docs agent
Docs agent
Let Specly draft docs for your code changes, fix failed builds and answer in the editor, with you reviewing everything it writes.
The docs agent keeps your docs in step with your code. It drafts, fixes and suggests. Unless an admin lets it commit build fixes straight to your docs branch, nothing it writes reaches readers until a person merges or publishes it.
Open Docs agent in the sidebar. A badge beside its name says in one line what it is doing: on and watching your repo, working, paused, or stuck. The sidebar says Stuck beside it too, on every page. It has four tabs: Needs you, Pages, History and Settings.
What starts it
Section titled “What starts it”| Trigger | Default | What it does |
|---|---|---|
| A code pull request opens | On: Draft the docs change | Writes a docs pull request, linked from a comment on the code one. |
| Ask agent in the editor | On | Answers about your docs, or suggests changes. Press ⌘J to open it. |
| Ask the agent to fix it, on a comment | On | Suggests changes in the editor and replies in the thread. |
| Write this page, from Analytics | On | Suggests changes, or drafts a new page, for a search that found nothing or a reader’s feedback. |
| Translate with the agent, from Navigation | On | Drafts one language’s missing and out-of-date pages as a pull request, up to 20 at a time. |
| Fix failed builds | Off | Opens a pull request that fixes problems a failed build names. |
| Nightly check for stale pages | Off | Opens at most one pull request a week for pages whose code changed. |
The ones that need a person to ask are on from the start. The two that open pull requests by themselves start off. A reader’s words never start the agent on their own.
Code pull requests
Section titled “Code pull requests”Go to Docs agent › Settings. Under Code pull requests, Repos to watch lists the code repo you chose when you set up the site. Under When one opens, pick what happens:
- Draft the docs change writes a docs pull request, linked from a comment on the code pull request. It’s the default.
- Comment only lists the pages that need a change, without writing it.
- Do nothing posts nothing. Specly still reads the change to mark pages that may be stale.
To skip some pull requests, type a GitHub label in Skip pull requests labelled, such as no-docs. A pull request
with that label gets no docs, and its check says it was skipped. Leave it empty to skip none.
The docs check
Section titled “The docs check”Every code pull request also gets a GitHub check beside your tests, named after your site, such as
Specly docs (your-site). It says what happened to the docs the change affects: updated in the pull request, drafted
by Specly, suggested on someone’s draft in the editor, or not updated. It lists the pages by path.
Pages left as they were leave the check neutral, which doesn’t stop a merge. To stop one until the docs are done, turn on Fail the docs check when pages aren’t updated, then make the check required in your repo’s branch protection. Auto-merge Specly won’t commit into, and docs that changed while it drafted, count as not updated.
Specly’s own limits and trouble never fail the check: reaching its daily limit, a paused docs agent, or a docs repo it can’t reach leave it neutral. Pull requests Specly opens itself pass it, since they change docs only. When you accept Specly’s suggestions in the editor and publish, the check updates by itself; if you discard a draft it waited on instead, push a commit to check again. If your docs live in a repo of their own, pages listed but not drafted leave the check neutral, since it can’t see updates made in that repo. Do nothing posts no check, so don’t make it required then. If your repo uses a merge queue, don’t make the check required yet: Specly doesn’t check the merge queue’s commits.
If you installed Specly’s GitHub App before the check existed, GitHub asks an owner of the repo to accept its new Checks permission. Until then, pull requests get their docs as before, without a check.
Draft with the agent (beta) is on by default. It reads the code around a change, checks its own work and can add a page. Its drafts go where they go now. Pull requests from forks, and Comment only, work the same either way.
See every pull request it read
Section titled “See every pull request it read”Changes lists every code pull request Specly has read, and what it did to your docs: a docs pull request, Couldn’t read, Reading, or No docs change. It has three tabs:
- Needs you: docs pull requests waiting for your review, and pull requests Specly couldn’t read.
- In progress: pull requests Specly is reading, docs changes it is still drafting, and pull requests from forks it commented on.
- Done: docs pull requests merged or closed, and pull requests that needed no docs change.
Above the tabs, Changes says whether the agent is on, paused or stuck. When it’s stuck, editors and admins can choose Run all N again to read every pull request it couldn’t read once more. When it’s paused, an admin can choose Turn it on, unless it was paused for every site in the organization.
Pick a pull request Specly couldn’t read to see why. Editors and admins can choose Run it again; viewers, and everyone while the agent is paused, see the reason instead. A pull request that needed no docs change shows the agent’s reason and the pages it read.
Other work
Section titled “Other work”Under Other work, each switch saves as you flip it. Commit build fixes straight to your docs branch needs Fix failed builds on. It commits instead of opening a pull request, and only when every check passes.
Where a person’s draft of a page isn’t published yet, the agent never writes over it. Its change becomes a suggestion on the draft.
Monday email: pages that may be stale is coming. Specly doesn’t send that email yet, and the switch keeps your choice.
Choose the model that checks pages
Section titled “Choose the model that checks pages”Under Model, an admin picks the AI model that checks your pages against your code. It does the nightly check, Check every page and Check this page.
| Model | What it is |
|---|---|
| Haiku 5.5 | The default. The fastest and the cheapest: a check of one page costs a fraction of a cent. |
| Sonnet 5.5 | A larger model, which may catch subtler mistakes. A check costs about 20 times what it does on Haiku. |
| Opus 5.5 | The largest. A check costs about 40 times what it does on Haiku. |
The next check uses the model you save. Writing and fixing pages always use Opus 5.5.
Writing rules
Section titled “Writing rules”Under Writing rules, write down your voice, the words you use and what never to say, up to 4,000 characters:
Write in the second person.Say "workspace", never "project".The agent follows them whenever it writes. It doesn’t read AGENTS.md or CLAUDE.md for this, because those belong to
your coding agents.
Pause it
Section titled “Pause it”An admin can choose Pause the agent at the top of the page. While it’s paused, the agent starts nothing, a run stops at its next step, and Ask agent waits. Turn the agent on brings it back.
An admin can also pause it for every site at once with Docs agent on, for every site in Settings › Organization › General.
Only admins change these settings. Editors and viewers can read them.
Deal with what it needs from you
Section titled “Deal with what it needs from you”Docs agent › Needs you lists what is waiting for a person, and its tab shows how many. Pick an item on the left to see it on the right, with what you can do about it on the bar underneath. There are three kinds:
- Draft: a docs change the agent wrote for a code pull request, or edits it suggests on a page. Review it, then merge or decide it as usual.
- Wrong: a page that tells readers something your code no longer does, with the reason. Choose Fix with the agent and it opens a pull request with the page corrected; the item then shows that pull request until you merge it. Or edit the page yourself.
- Stuck: the agent’s last three or more runs all failed the same way, so nothing else is moving. It says why, who can fix it and how, and you can run the last one again.
An item leaves when it is dealt with: the change merged, the suggestion decided, the page fixed, or the agent working again. An empty list means nothing needs you.
Editors and admins can ask the agent for work here and on the other tabs. A viewer sees the same buttons, greyed, with the reason beside them.
You can work it from the keyboard: J and K move between items, and the letter on each button presses it.
See which pages match your code
Section titled “See which pages match your code”Docs agent › Pages shows your docs as folders of pages, each with its last check against your code: it matches, it is wrong, there is no code to compare it with, or it has not been checked since it was last edited.
The agent checks each page on its own. It reads the page, finds the code the page describes and compares the two. Pick a page to see what its check said: what is wrong, or why there was nothing to compare. A check that doesn’t finish leaves its page not checked, says why, and is tried again within a few days.
Choose Check this page to compare a page with your code now. Check every page takes up to 50 pages at a time, the ones never checked or edited since first, once a day. A page found wrong has Fix with the agent here too. Anyone who can’t start a check is told why.
Home shows the same count beside your live site, with See every page. Each page found wrong is under Needs you there, with Fix with the agent.
See what it did
Section titled “See what it did”Docs agent › History lists what the agent did, newest first, with how each job ended. Jobs that failed one after another for the same reason are one line with a count, so one cause reads as one entry. Over the list are your organization’s runs this month against its allowance, the site’s runs in the last 24 hours against its daily limit, and what the month has cost. A run the AI service refused used nothing and doesn’t count toward the day.
Pick a line to see how it ended and what it took, and open it to see every step. A failed job has Run it again. Every member can read this page.