t1161.4: Wire generate-claude-agents.sh into update_claude_config()#2103
t1161.4: Wire generate-claude-agents.sh into update_claude_config()#2103marcusquinn merged 2 commits intomainfrom
Conversation
…61.4) update_claude_config() now calls generate-claude-agents.sh (MCPs, settings.json, slash commands) and subagent-index-helper.sh, parallel to how update_opencode_config() calls generate-opencode-agents.sh. Conditional on claude binary existing.
WalkthroughA new helper function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates additional automation into the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 21 09:38:37 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request correctly wires up the generate-claude-agents.sh and subagent-index-helper.sh scripts into the update_claude_config function, mirroring the existing structure for OpenCode. The changes are logical and follow the established pattern.
I have two suggestions for improvement:
- A minor fix to add a missing warning message for consistency and robustness, aligning with best practices for error reporting in shell scripts.
- A suggestion to refactor the repeated script-running logic into a helper function to reduce code duplication and improve maintainability, as per repository guidelines.
Extract _run_generator() helper to eliminate repeated check-and-execute pattern across update_opencode_config() and update_claude_config(). Also fixes missing else block for subagent-index-helper.sh not-found case.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 21 09:55:40 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
setup-modules/config.sh (1)
71-90: Consider adding an argument-count guard to_run_generator()for defensive robustness.The
shift 4operation currently lacks validation. Whileset -eis not active in this script and all current callers safely pass ≥4 arguments, adding a guard aligns with the A-grade ShellCheck compliance standard and protects against future call-site errors.🛡️ Proposed defensive guard
_run_generator() { local script_path="$1" local info_msg="$2" local success_msg="$3" local failure_msg="$4" + if [[ $# -lt 4 ]]; then + print_warning "_run_generator: requires at least 4 arguments (got $#)" + return 1 + fi shift 4 local script_args=("$@")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@setup-modules/config.sh` around lines 71 - 90, The _run_generator() function should validate that at least four arguments were provided before performing shift 4; add a guard near the start of _run_generator that checks if $# -lt 4 and, if so, calls print_warning with a clear message about insufficient arguments and returns a non-zero status (or 1) to avoid shifting past available parameters and preserve current failure behavior; update references to shift 4 and script_args=("$@") accordingly so callers still receive remaining args when the guard passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@setup-modules/config.sh`:
- Around line 71-90: The _run_generator() function should validate that at least
four arguments were provided before performing shift 4; add a guard near the
start of _run_generator that checks if $# -lt 4 and, if so, calls print_warning
with a clear message about insufficient arguments and returns a non-zero status
(or 1) to avoid shifting past available parameters and preserve current failure
behavior; update references to shift 4 and script_args=("$@") accordingly so
callers still receive remaining args when the guard passes.



Wire
generate-claude-agents.shintoupdate_claude_config()insetup-modules/config.sh.Summary
update_claude_config()now callsgenerate-claude-agents.sh(MCP server registration, settings.json updates, slash commands) in addition togenerate-claude-commands.shsubagent-index-helper.shupdate_opencode_config()which callsgenerate-opencode-agents.sh+ subagent indexclaudebinary existing (guard already present)Changes
setup-modules/config.sh: Added agent generator and subagent index calls toupdate_claude_config()Ref #1758
Summary by CodeRabbit