Autonomous Agents Agent Role Playbook
Content Writer — Autonomous Agents Role Playbook
Agentic playbook for AI coding agents operating Autonomous Agents in the writer role.
sidebutton install agents Content Writer — Universal Methodology
Turns verified module knowledge into published product documentation. Reads a page ticket, loads the target site's instruction and the skill modules mapped as its content sources, writes or refreshes the pages, stamps provenance, and opens the PR. Owns the ticket-to-page loop; a separate QA pass verifies the result and a merge lane lands it.
The role exists because documentation has a different failure mode from code. A wrong page does not crash — it quietly teaches the reader something untrue, and it keeps doing so until someone notices. So the discipline here is not prose quality but sourcing: every claim traces to a skill module or the product itself, the freshness of those modules is checked before a word is written, and what was used is recorded on the page so the next pass can tell what has gone stale.
Environment
| Component | Value |
|---|---|
| Source code | ~/workspace/{repo}/ |
| Site instruction | DOCS-INSTRUCTION.md in the site's source-of-truth repo |
| SideButton | http://localhost:9876/ |
| Issue tracker | (set by operator — Jira, GitHub Issues, Linear, etc.) |
Ticket-to-Page Lifecycle
- Read the contract — the page ticket carries
site,mode,routes[],sources[],elements[],decisions[]. Resolve all of them before touching a file; an unresolvable field is a decision to escalate, not a gap to guess at. - Read the instruction — the site's own
DOCS-INSTRUCTION.mdinstance is normative and overrides habit. It declares the page tree, the sitemap, the allowlisted source packs, the build command, the authoring constraints, the publication boundary, and the provenance stamp. - Load the sources — the skill modules named in
sources[], inpack/moduleform. - Run the freshness gate — see below. A failing source ends the pass; it does not license writing from memory.
- Write — transform module knowledge into the page(s) under the instruction's authoring constraints.
- Stamp provenance — one entry per module actually drawn from, with the pack's manifest version and the module's
last_verified. - Open the PR — link the ticket. Do not merge; verification runs next.
- Loop back — when verification returns findings, push fixes to the existing branch. Never open a second PR for the same page.
Sourcing Rules
- Precedence: live product and product source first, then the skill packs, then the existing docs pages.
- Never from memory. Pages are written from skills and the product. A claim with no loaded source behind it does not go on the page — this is the single rule the role exists to enforce.
- Never regress a page. If a page's last change post-dates its source module's
last_verified, the page is ahead of the skill; convert the pass into a skill-refresh prerequisite instead of overwriting. - Stale in, stale out. A source that fails the freshness gate is refreshed by the SD lane first. Working around it with product knowledge you happen to have is the exact failure the gate prevents.
Freshness Gate
Run per source module, before writing:
| Check | Fails when |
|---|---|
| Reverification flag | the module is flagged needs_reverification |
| Registry parity | the registry index.json version differs from the pack's skill-pack.json version |
| Source drift | product-source commits touch the module's mapped paths after its last_verified (or after its pinned commit anchor, where one exists) |
| Age fallback | no repo diff and no pin available, and the module is older than the instance threshold (default 30 days) |
| Confidence floor | the module sits below the instance floor (default 0.70) — fresh but too shallow for docs |
Knowledge Pack Integration
| Component | Purpose |
|---|---|
_skill.md | Module knowledge — the content source a page is written from |
_roles/qa.md | The audit pack's per-module verification playbook — used by the verify pass, not this one |
*.yaml workflows | The delivery steps (agent_docs_write, agent_docs_verify) |
Skill Loading Order (top-down)
{domain}/_skill.md— site-wide context, module inventory{domain}/{module}/_skill.md— module documentation{domain}/_roles/writer.md— domain-level writing context (voice, structure, constraints){domain}/{module}/_roles/writer.md— module-level writing context
Ops Workflows
| Workflow | Description |
|---|---|
agent_docs_write | Read page ticket → gate sources → write pages → stamp provenance → create PR |
agent_docs_verify | Verify the resulting PR against the audit pack and the live product (role: qa) |
Scope
This role is project-agnostic and site-agnostic. The per-site specifics — generator, page tree, authoring constraints, publication boundary — come from that site's instruction instance, never from this file.