feat: add docs-sync hook and agents for automatic doc updates#1098
Open
feat: add docs-sync hook and agents for automatic doc updates#1098
Conversation
6a6a983 to
91bbb8a
Compare
Add a Claude Code hook + skill system that detects recce_cloud/ changes and creates PRs to update recce-docs: - Hook: NotificationShown trigger checks for recce_cloud/ changes - Scanner skill: haiku-based triage to assess if docs need updating - Writer skill: sonnet-based writer that edits docs and opens PR Requires RECCE_DOCS_PATH env var to be set. If unset, the feature is silently disabled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
91bbb8a to
3a4b474
Compare
- Replace skills with agents that run autonomously via Task tool - Scanner subagent (haiku) for lightweight triage - Writer subagent (sonnet) with pre-approved git permissions - Update settings.json with default permissions for git/gh operations - Update hook to instruct spawning subagent instead of running skill This reduces user prompts during routine documentation updates. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
NotificationShown is not a valid Claude Code hook event. Use Stop event which fires when Claude finishes responding. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
Claude Code hooks require nested structure:
- matcher: {} (empty for all events)
- hooks: [{type: "command", command: "..."}]
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Kent <iamcxa@gmail.com>
Stop event doesn't support matchers - it always fires. Correct format: hooks array without matcher field. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
- recce/ contains the recce CLI (OSS) - recce_cloud/ contains the recce-cloud CLI Both directories contain user-facing code that may need documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
d5998f7 to
e113846
Compare
- Convert agents to YAML frontmatter format for Claude Code compatibility - Enhance hook to require docs update when CLI files are modified - Add docs-sync plugin structure for Task tool integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
- Remove Task tool dependency from hook - Simplify agent descriptions for auto-triggering - Hook now outputs message that triggers agent description - Team members get functionality automatically via git pull Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Kent <iamcxa@gmail.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a Claude Code hook + agent system that detects CLI code changes and automatically triggers documentation updates for
recce-docs.How it works:
recce/orrecce_cloud/files are modified (especiallycli.py)Key features:
git pullcli.py) trigger mandatory docs reviewUser Setup
export RECCE_DOCS_PATH=/path/to/recce-docsin shell profile or.envrcghCLI is authenticatedIf
RECCE_DOCS_PATHis unset, the feature is silently disabled.Files
Core:
.claude/settings.json— Stop hook configuration.claude/hooks/docs-sync-check.sh— Bash script that detects code changes.claude/agents/docs-sync-scanner.md— Haiku agent for change triage.claude/agents/docs-sync-writer.md— Sonnet agent for writing docs and creating PROptional plugin (for Task tool integration):
.claude/plugins/docs-sync/— Plugin structure if explicit Task invocation is preferredTest Plan
RECCE_DOCS_PATHto local recce-docs reporecce/cli.py(e.g., add a command)🤖 Generated with Claude Code