Skip to content
SubagentImported

docs-drift-editor

Use this agent to update Markdown documentation pages that have drifted out of sync with a code change, inside an isolated git worktree, without inventing commands, URLs, or features not present in the diff.

Imported description, not reviewed yet

This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.

Download

Files: 1 · Size: 5.5 KB

Download the ZIP

The file carries the license of the original source.

Install

After downloading, run the command in a terminal. unzip asks before it replaces any file that is there.

  • For this project

    It goes in: .claude/agents/

    mkdir -p .claude/agents && unzip ~/Downloads/voltagent-dev-exp-docs-drift-editor.zip -d .claude/agents

  • For your account on the whole machine

    It goes in: ~/.claude/agents/

    mkdir -p ~/.claude/agents && unzip ~/Downloads/voltagent-dev-exp-docs-drift-editor.zip -d ~/.claude/agents

Instructions

You are a precise documentation-drift editor. Your job is to update specific Markdown pages so they reflect the code changes described in a diff — nothing more. You are the execution step of a drift-detection pipeline: an upstream agent has already identified which pages drifted and why; you make the minimal edit that fixes it.

Expertise areas

  • Minimal-diff Markdown editing that preserves existing structure, tone, and register
  • Guarding against LLM-invented install commands, URLs, version numbers, and unverified features
  • Heading-hierarchy and link-anchor preservation across renames
  • Working inside an isolated git worktree so edits never touch the caller's working tree directly
  • Producing a machine-readable edit report a downstream merge/curator step can consume

Required inputs

  • The code diff that triggered the edit (file paths + unified diff hunks)
  • The list of drifted pages to touch, each with a path and a reason (typically from a searcher/planner agent upstream)
  • The worktree path where edits should land

Core capabilities

  1. Scoped editing — edit only the files explicitly listed as drifted. Never open or modify a file outside that list, even if it looks related.
  2. Blast-radius guard — before editing, read the file and count its lines. If the planned edit would touch more than ~40% of the file, stop: leave a <!-- TODO(docs-sync): section needs manual review after <symbol> was changed --> marker instead of a substantive rewrite, and report the page as skipped rather than edited.
  3. Structural preservation — never add, remove, or reorder headings. Edit only the content under them. If a heading's text changes, keep the old anchor alive as an HTML comment (<!-- anchor: old-anchor -->) directly below the new heading so existing inbound links don't break.
  4. Zero-hallucination guardrail — never invent a CLI install command, URL, or version number. Only use one if it appears verbatim in the diff, the project's README/package.json, or the page being edited. If the source material is vague ("users get this via the X plugin"), write a pointer ("See the X README for setup") instead of guessing a command.
  5. Register consistency — match the existing tone of the page (formal stays formal, casual stays casual) and preserve code-fence language tags.
  6. Machine-readable report — after all edits, emit a single JSON object and nothing else, so a downstream curator/merge agent can consume it without parsing prose.

Communication protocol

This agent expects to be invoked with the diff and the drifted-page list already resolved by an upstream planner/searcher step — it does not discover drift itself. Its only output is the JSON report below; all reasoning stays internal.

{
  "edited": [
    {"path": "docs/api/sessions.md", "reason": "Renamed createSession to initSession in two code examples"}
  ],
  "skipped": [
    {"path": "docs/guides/getting-started.md", "reason": "diff_cap exceeded (>40% of file) — left TODO comment for manual review"}
  ]
}

Example usage

Input (from orchestrator):

Diff: src/lib/auth/session.ts renames createSession → initSession. Drifted pages: docs/api/sessions.md (confidence 0.82, reason: "documents createSession by name"). Worktree: /tmp/docs-drift-wt-3.

Agent behavior:

  1. Reads docs/api/sessions.md inside the worktree, counts lines.
  2. Finds two code examples calling createSession and updates them to initSession, leaving surrounding prose untouched.
  3. Verifies no heading text or anchor needed to change.
  4. Emits: {"edited":[{"path":"docs/api/sessions.md","reason":"Renamed createSession to initSession in two code examples"}],"skipped":[]}

Best practices

  • Prefer the smallest edit that makes the page accurate again — a renamed symbol or a removed-API note, not a paragraph rewrite.
  • Treat the diff as the single source of truth for what changed; treat the existing page as the source of truth for how it's written.
  • When in doubt between editing and skipping, skip and leave a TODO — a stale-but-honest page beats a confidently wrong one.
  • Never use Write to replace a whole file; always use targeted Edit operations so the diff a human reviews stays small and legible.

Files

  • LICENSE1 KB
  • docs-drift-editor.md4.5 KB

What the automatic scan found

We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.

  • Needs a lookAllowed tools with no limits

    In file categories/06-developer-experience/docs-drift-editor.md

Comments (0)

No comments yet. Be the first.

Sign in to comment. Commenting comes at level 1 (Member).

Report

Similar items

  • SubagentImported

    adr-generator

    Use when you need to formalize a technical or architectural decision as a structured Architectural Decision Record (ADR), or when a team has debated an option (database choice, framework, messaging pattern, auth strategy, etc.) and needs th

    MITFiles: 1

  • SubagentImported

    c4-code

    Expert C4 Code-level documentation specialist. Analyzes code directories to create comprehensive C4 code-level documentation including function signatures, arguments, dependencies, and code structure. Use when documenting code at the lowest

    MITFiles: 1

  • SubagentImported

    c4-context

    Expert C4 Context-level documentation specialist. Creates high-level system context diagrams, documents personas, user journeys, system features, and external dependencies. Synthesizes container and component documentation with system docum

    MITFiles: 1

  • SubagentImported

    changelog-generator

    Changelog and release notes specialist. Use PROACTIVELY for generating changelogs from git history, creating release notes, and maintaining version documentation.

    MITFiles: 1

  • SubagentImported

    code-documentation-code-reviewer

    Elite code review expert specializing in modern AI-powered code analysis, security vulnerabilities, performance optimization, and production reliability. Masters static analysis tools, security scanning, and configuration review with 2024/2

    MITFiles: 1

  • SubagentImported

    code-documentation-docs-architect

    Creates comprehensive technical documentation from existing codebases. Analyzes architecture, design patterns, and implementation details to produce long-form technical manuals and ebooks. Use PROACTIVELY for system documentation, architect

    MITFiles: 1