Fleet 1.13:Teams are now shipping 5x more PRs with autonomous pipelines.See what's new →
FleetFleet
Use case

AI Agents for Documentation

Documentation is the task that everyone agrees is important and almost no one has time for during active development. It gets scheduled for after the sprint, after the release, after the next feature. The result is that codebases accumulate undocumented functions, stale READMEs, and API references that describe behavior from six months ago.

The specific failure mode is drift: code changes faster than docs. A developer updates a function signature but not the corresponding documentation. A new endpoint is added without an API reference entry. These gaps are small individually but compound into a codebase where new team members cannot orient themselves without asking someone.

How it works with an agent fleet

A documentation agent runs on shipped tickets and generates or updates documentation for changed code. It uses Claude Code to read the diff, identify undocumented or changed public interfaces, and write prose.

agents:
  - name: doc-writer
    role: backend-developer
    model: claude-sonnet-4-6
    subscribes_to: ticket_shipped

The agent's prompt lives at .fleet/prompts/doc-writer.md — Fleet resolves it by convention from the agent name, so there is no prompt: field in config. The doc-writer prompt specifies your documentation format, where docs live, and what level of detail is expected. After generating updates, the agent opens a follow-up PR targeting your docs directory.

The fleet pattern

Documentation agent runs post-merge on ticket_shipped events. It reads the merged diff, generates doc updates, and opens a separate PR for human review. Keeping docs in a separate PR from the code change makes review faster and gives the team a natural checkpoint to verify accuracy before docs go live.

Guardrails that matter here

  • Doc agent opens PRs for human review — it does not push directly to main or a published docs site
  • Run-time (duration) budget limits the scope of each documentation run
  • Audit trail ties each doc PR back to the code PR that triggered it via fabric event linkage

Who this is for

Teams with growing codebases where documentation debt is accumulating, or teams that have documentation standards they want consistently applied. Also useful for projects with public APIs where accurate, current documentation is a product requirement.

Frequently asked questions

Can the agent update docs in an external system like Notion or Confluence?

The agent runs Claude Code, which can call CLI tools and APIs. If you have a CLI for your docs system, you can include it in the agent's environment and instruct the agent to use it. Fleet itself has no built-in Notion or Confluence integration.

How does the agent know our documentation style?

You describe it in the agent prompt. Reference your existing docs as examples, specify the format (JSDoc, OpenAPI, plain prose), and list any conventions like required sections or tone guidelines.

Run your first agent fleet

One binary. Five minutes. See every agent, coordinate every handoff, and keep a full audit trail of what your fleet did.