Skip to main content
subagent CX Codex

doc-updater · sangrokjung — Claude Code subagent: what it does, how to install

doc-updater rebuilds README, guides and codemaps from the actual source after code changes. Useful once the docs have drifted away from the code.

MIT ★ 880 updated 2026-09-03

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/doc-updater.md
Open on GitHub

What doc-updater does

The subagent builds documentation from files, not from memory. It walks the repository and regenerates codemaps, README and guides so they describe what is on disk right now. It runs in the background on haiku, capped at 15 turns, with project memory — after a refactor you do not need a second reminder.

Four stages. Repo structure first: workspaces, entry points, framework patterns. Then module analysis, where exports and imports get mapped and routes or models located. Generation comes next — INDEX.md plus area maps with ASCII diagrams and module tables, each map under 500 lines. Validation closes it out: paths must exist, links must resolve, examples must compile, timestamps get bumped. Bash calls to madge and jsdoc2md do the generation work.

Tools are limited to Read, Write, Edit, Bash, Grep, Glob. Output follows a fixed report: scope, files updated, files created, a change list and a validation checklist. Documentation that drifts from the code is worse than none, which is why validation sits at the end and not at the start.

What it helps with

  • rebuild a codemap after modules move around
  • refresh README when the run commands change
  • catch dead paths and links in the guides
  • split a codemap that grew past 500 lines
  • check that doc code samples still match the source

Example prompts for the agent

  • Update the README and codemaps after the payments refactor
  • Generate INDEX.md from the real code, not from memory
  • Verify every path and link under docs/ and bump the timestamps

How to install doc-updater

Manually: put the files in place

.claude/agents/doc-updater.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about doc-updater

How do I install doc-updater in Claude Code?

Place the agent file at .claude/agents/doc-updater.md inside your project.

What does doc-updater do?

It regenerates codemaps, README and guides from the current source after code changes, then checks that the paths and links in them still resolve.

How is doc-updater different from planner?

doc-updater maintains existing documentation after code changes. Design documents for new features belong to planner.

Source text

doc-updater.md · MIT
---
name: doc-updater
description: |
  코드 변경 후 문서·코드맵 자동 갱신. 실제 소스 기반 코드맵 생성, README·가이드 새로고침, 경로·링크 검증. 기억에서 문서 작성 절대 금지. Use proactively when 코드 변경 완료 후 — "문서 업데이트", "README 갱신", "코드맵 만들어줘" 요청 시, 또는 구현 완료 후 background 자동 트리거. 새 기능 설계 문서는 planner 사용.
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
model: haiku
background: true
memory: project
maxTurns: 15
color: yellow
---

<Agent_Prompt>
  <Role>
    You are Doc Updater. Maintain accurate documentation by generating codemaps and refreshing docs from source code.
    Documentation that doesn't match reality is worse than no documentation. Always generate from the actual code.
  </Role>

  <Success_Criteria>
    - Codemaps generated from actual code (not manually written)
    - All file paths verified to exist, all links tested
    - Code examples compile/run, freshness timestamps updated
    - Each codemap under 500 lines
  </Success_Criteria>

  <Investigation_Protocol>
    1) Repo Structure: Identify workspaces, entry points, framework patterns
    2) Module Analysis: Extract exports, map imports, find routes/models/workers
    3) Generate Codemaps: INDEX.md + area-specific maps with ASCII diagrams and module tables
    4) Validate: Verify paths exist, links work, examples compile
  </Investigation_Protocol>

  <Tool_Usage>
    Glob for structure, Read/Grep for source analysis, Bash for codemap generation scripts (madge, jsdoc2md), Write/Edit for docs.
  </Tool_Usage>

  <Output_Format>
    ## Documentation Update Report
    **Scope / Files Updated / Files Created**
    ### Changes (bullet list)
    ### Validation (path/example/link/timestamp checklist)
  </Output_Format>

  <Failure_Modes_To_Avoid>
    - Writing docs from memory instead of generating from code
    - Referencing files that don't exist
    - Codemaps over 500 lines without splitting
  </Failure_Modes_To_Avoid>

  <Final_Checklist>
    - Generated from actual code (not memory)?
    - All paths verified, links checked?
    - Timestamps updated, codemaps under 500 lines?
    - Documentation matches current codebase?
  </Final_Checklist>
</Agent_Prompt>

© sangrokjung · MIT · sangrokjung/claude-forge

Similar subagents

All subagents for Writing and docs →

doc-updater by other authors comes first.

doc-updater Affaan Mustafa doc-updater — a subagent that updates architecture codemaps and project guides from code. Helpful when repo structure evolves faster than manuals. CX Codex ★ 6,739repo stars doc-forge rohitg00 doc-forge — a Claude Code plugin that generates code documentation, API docs, and maintains README files. The agent invokes it when you work on project documentation. ★ 2,858repo stars docs-updater giuseppe-trisciuoglio docs-updater is a Claude Code skill that reviews Git changes and updates project documentation. It runs for release prep, README sync, or before a pull request. CX Codex +1 3,700installs readme-updater alirezarezvani readme-updater updates README automatically when project structure changes, dependencies are added, or new features land. CX Codex +1 ★ 788repo stars gsd-doc-writer davepoon gsd-doc-writer — a subagent that writes and updates project documentation. Generates README, guides, API references, and other files, adapting to project structure and fixing errors from verification checks. CX Codex ★ 3,785repo stars doc-gen SethGammon doc-gen generates function comments, directory READMEs, and API references while following the project’s existing conventions. Use it when docs should explain code behavior rather than repeat signatures. CX Codex +1 ★ 937repo stars gsd-doc-verifier davepoon gsd-doc-verifier validates factual claims in Markdown documentation against the project codebase and writes a JSON report. Catches broken paths, missing functions, and phantom API routes. CX Codex ★ 3,785repo stars

From the same set44

The whole set →
korean-character-count korean-character-count counts graphemes, lines, and UTF-8 bytes in Korean text by grapheme cluster rules, for self-intro forms with strict limits. CX Codex +1 ★ 880repo stars loop-forge loop-forge converts a single-line routine task into a reusable slash command equipped with safety gates and evaluation checks. CX Codex +1 ★ 880repo stars korean-spell-check korean-spell-check — a Claude Code skill that checks Korean spelling and returns edits instead of a rewritten draft. Long input gets split into chunks before it goes out. CX Codex +1 ★ 880repo stars instinct-status Review learned instincts with their confidence levels, domains, and sources. Use the command to inspect what the agent has picked up from its observations. CX Codex +1 ★ 880repo stars instinct-export instinct-export exports continuous-learning instincts into a shareable file for team members or migration across machines. CX Codex +1 ★ 880repo stars eval This command defines eval criteria, runs checks, and builds reports. Use it to track a feature’s capabilities and catch regressions against a baseline. CX Codex +1 ★ 880repo stars refactor-cleaner refactor-cleaner — a subagent that hunts down code nobody calls: unused files, exports and npm packages. Each hit gets a reference search before anything is deleted. CX Codex ★ 880repo stars task-grade-routing task-grade-routing sets documentation and review lane obligations for task sizes S, M, L, and XL based on workflow classification. CX Codex +1 ★ 880repo stars

Project sponsors

Companies that keep this analytics open