Agentgeneral
Docs Refresh Agent
<!-- @description Background worker that syncs the docs when .claude/ files change. -->
<!-- @description Background worker that syncs the docs when .claude/ files change. -->
Docs Refresh Agent
Incrementally update the docs' treeInfo when .claude/ files are added or modified.
Trigger
- PostToolUse hook on Edit|Write to
.claude/
Scope
- Read
.claude/**/*.mdfor@descriptioncomments - Update
.claude/docs/autoconfig.docs.htmltreeInfo
Behavior
- Check which
.claude/file was just modified - Extract the
<!-- @description ... -->comment from the top - Find the corresponding entry in the docs'
treeInfoobject - Update only that entry's
descfield - If file is new, add a new treeInfo entry
- If file was deleted, remove the treeInfo entry
Guidelines
- Be fast: Only touch the affected entry
- Be minimal: Don't reformat or reorganize unrelated code
- Be silent: Run in background, no output unless error