Skip to content

t1161.4: Wire generate-claude-agents.sh into update_claude_config()#2103

Merged
marcusquinn merged 2 commits intomainfrom
feature/t1161.4
Feb 21, 2026
Merged

t1161.4: Wire generate-claude-agents.sh into update_claude_config()#2103
marcusquinn merged 2 commits intomainfrom
feature/t1161.4

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 21, 2026

Wire generate-claude-agents.sh into update_claude_config() in setup-modules/config.sh.

Summary

  • update_claude_config() now calls generate-claude-agents.sh (MCP server registration, settings.json updates, slash commands) in addition to generate-claude-commands.sh
  • Also regenerates the shared subagent index via subagent-index-helper.sh
  • Mirrors the structure of update_opencode_config() which calls generate-opencode-agents.sh + subagent index
  • All conditional on claude binary existing (guard already present)

Changes

  • setup-modules/config.sh: Added agent generator and subagent index calls to update_claude_config()

Ref #1758

Summary by CodeRabbit

  • Refactor
    • Standardized configuration generation processes with improved error messaging and consistent handling across setup modules.

…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.
@marcusquinn marcusquinn marked this pull request as ready for review February 21, 2026 09:38
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Walkthrough

A new helper function _run_generator() centralizes the execution of generator scripts with standardized messaging and error handling. The update_opencode_config and update_claude_config functions are refactored to use this helper instead of inline script checks and executions.

Changes

Cohort / File(s) Summary
Refactored Generator Orchestration
setup-modules/config.sh
Added _run_generator() helper function for consistent script execution, messaging, and error handling. Refactored update_opencode_config() and update_claude_config() to use the helper instead of inline checks, reducing branching and standardizing success/failure reporting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🎯 A helper function takes the stage,
Unifying scripts across each page,
Repeated patterns now condensed,
Error handling and messaging dispensed,
Cleaner flows in DevOps dance! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: wiring generate-claude-agents.sh into update_claude_config(), which is the primary objective of this PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t1161.4

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 update_claude_config() function, ensuring that Claude Code agents are properly configured and the shared subagent index is regenerated during the setup process. This enhancement brings the Claude configuration workflow in line with the existing OpenCode configuration, streamlining the setup and maintenance of agent-related components.

Highlights

  • Enhanced Claude Configuration: The update_claude_config() function now includes a call to generate-claude-agents.sh to configure Claude Code agents, covering MCP server registration, settings.json updates, and slash commands.
  • Subagent Index Regeneration: The update_claude_config() function also now triggers the regeneration of the shared subagent index via subagent-index-helper.sh.
  • Functional Alignment: This change mirrors the existing structure of update_opencode_config(), ensuring consistent agent and subagent index generation across different code bases.
  • Conditional Execution: All new calls are conditional on the respective scripts existing and the claude binary being present, maintaining robustness.
Changelog
  • setup-modules/config.sh
    • Added calls to generate-claude-agents.sh for agent configuration within update_claude_config().
    • Included a call to subagent-index-helper.sh to regenerate the subagent index within update_claude_config().
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 34 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 21 09:38:34 UTC 2026: Code review monitoring started
Sat Feb 21 09:38:34 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 34

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 34
  • VULNERABILITIES: 0

Generated on: Sat Feb 21 09:38:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. A minor fix to add a missing warning message for consistency and robustness, aligning with best practices for error reporting in shell scripts.
  2. 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.
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 34 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 21 09:55:38 UTC 2026: Code review monitoring started
Sat Feb 21 09:55:38 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 34

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 34
  • VULNERABILITIES: 0

Generated on: Sat Feb 21 09:55:40 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
setup-modules/config.sh (1)

71-90: Consider adding an argument-count guard to _run_generator() for defensive robustness.

The shift 4 operation currently lacks validation. While set -e is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant