Skip to content

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 21, 2026

Summary

Fixes the issue where marketplace.json wasn't being updated during releases.

Problem

After PR #130 changed the README to use a dynamic GitHub release badge instead of a hardcoded version badge, the version-manager.sh script was:

  1. Trying to update the hardcoded badge pattern (Version-X.Y.Z-blue)
  2. Failing validation when the pattern wasn't found
  3. Returning early (line 436: return 1) before reaching the marketplace.json update

This is why during the v2.67.1 release, marketplace.json had to be updated manually.

Solution

Update the README badge handling logic to:

  1. Check for dynamic badge first - If img.shields.io/github/v/release is found, skip the update (GitHub handles it automatically)
  2. Update hardcoded badge if present - Only attempt sed replacement if the old pattern exists
  3. Warn if no badge found - Non-fatal warning instead of error

Testing

# Before fix - fails on README, never reaches marketplace.json
bash -x .agent/scripts/version-manager.sh bump patch
# [ERROR] Failed to update README.md version badge
# return 1  <-- exits before marketplace.json

# After fix - detects dynamic badge, continues to marketplace.json
bash -x .agent/scripts/version-manager.sh bump patch
# [SUCCESS] README.md uses dynamic GitHub release badge (no update needed)
# [SUCCESS] Updated .claude-plugin/marketplace.json

Files Changed

File Change
version-manager.sh Handle dynamic GitHub release badge, don't fail if no hardcoded badge

Summary by CodeRabbit

  • Chores
    • Improved version management script with better handling of release documentation badges. The system now intelligently manages different badge types (dynamic and hardcoded) in documentation, with enhanced validation and error reporting for more reliable version updates during releases.

✏️ Tip: You can customize this high-level summary in your review settings.

The README.md now uses a dynamic GitHub release badge instead of a
hardcoded version badge. The version-manager.sh was still trying to
update the hardcoded badge and failing when it wasn't found, which
caused it to return early before updating marketplace.json.

Changes:
- Check for dynamic badge (img.shields.io/github/v/release) first
- Skip README update if dynamic badge is used (GitHub handles it)
- Only update hardcoded badge if present
- Warn if no version badge found (non-fatal)

This fixes the issue where marketplace.json wasn't being updated
during releases because the README validation failed first.
@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 addresses a critical flaw in the release process where the version-manager.sh script would prematurely terminate. The script's previous logic for updating the README version badge was incompatible with the new dynamic GitHub release badges, causing it to fail and prevent subsequent updates to marketplace.json. The changes introduce robust handling for different badge types, ensuring the release script completes its tasks reliably without manual intervention.

Highlights

  • Robust README Badge Handling: Implemented conditional logic in version-manager.sh to correctly handle different types of README version badges, specifically distinguishing between dynamic GitHub release badges and hardcoded ones.
  • Ensured marketplace.json Updates: The script now correctly detects dynamic GitHub release badges and skips unnecessary updates, preventing previous failures that caused the script to exit prematurely before updating marketplace.json.
  • Improved Error Handling: Changed the behavior for missing README badges from a fatal error that halted the script to a non-fatal warning, allowing the release process to continue and complete all necessary updates.
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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Walkthrough

The version manager script now implements conditional README badge handling that detects dynamic GitHub release badges and skips updates, while validating updates to hardcoded version badges with enhanced error handling.

Changes

Cohort / File(s) Summary
Badge Detection Logic
\.agent/scripts/version-manager.sh
Modified update_version_in_files() to conditionally handle README badges: skip dynamic shields.io/github/v/release badges, validate and update hardcoded Version-X.Y.Z-blue badges, warn on missing badges. Replaces unconditional update behavior with branching logic and validation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • #130: Related modification of README version-badge handling and validation logic to prefer detection of dynamic GitHub release badges.

Poem

🏷️ Badges now wear masks of logic bright,
Some skip the dance, some shimmer with might,
Validation guards each version's call,
Smart shells script them, best of all! 🎯

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: handling dynamic GitHub release badges in version-manager.sh, which is the core fix addressing the post-PR #130 issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@sonarqubecloud
Copy link

@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, 328 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Jan 21 02:13:46 UTC 2026: Code review monitoring started
Wed Jan 21 02:13:46 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 328
Wed Jan 21 02:13:46 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Wed Jan 21 02:13:48 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 328
  • VULNERABILITIES: 0

Generated on: Wed Jan 21 02:14:28 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 effectively resolves a bug in the version-manager.sh script that caused release failures when a hardcoded version badge was not found in the README. The new logic correctly handles the dynamic GitHub release badge, provides a fallback for the old hardcoded badge, and gracefully warns instead of erroring if no badge is present. This makes the release process more robust. I've added one suggestion to improve maintainability by using variables for the badge patterns.

Comment on lines +426 to 444
if grep -q "img.shields.io/github/v/release" "$REPO_ROOT/README.md"; then
# Dynamic badge - no update needed, GitHub handles it automatically
print_success "README.md uses dynamic GitHub release badge (no update needed)"
elif grep -q "Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue" "$REPO_ROOT/README.md"; then
# Hardcoded badge - update it
sed -i '' "s/Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue/Version-$new_version-blue/" "$REPO_ROOT/README.md"

# Validate the update was successful
if grep -q "Version-$new_version-blue" "$REPO_ROOT/README.md"; then
print_success "Updated README.md version badge to $new_version"
else
print_error "Failed to update README.md version badge"
print_info "Please manually update the version badge in README.md"
return 1
fi
else
print_error "Failed to update README.md version badge"
print_info "Please manually update the version badge in README.md"
return 1
# No version badge found - that's okay, just warn
print_warning "README.md has no version badge (consider adding dynamic GitHub release badge)"
fi

Choose a reason for hiding this comment

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

medium

To improve maintainability and avoid repeating the badge patterns, consider storing them in local variables. This makes the code easier to read and update in the future if the patterns change.

        local dynamic_badge_pattern="img.shields.io/github/v/release"
        local hardcoded_badge_pattern="Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue"

        if grep -q "$dynamic_badge_pattern" "$REPO_ROOT/README.md"; then
            # Dynamic badge - no update needed, GitHub handles it automatically
            print_success "README.md uses dynamic GitHub release badge (no update needed)"
        elif grep -q "$hardcoded_badge_pattern" "$REPO_ROOT/README.md"; then
            # Hardcoded badge - update it
            sed -i '' "s/$hardcoded_badge_pattern/Version-$new_version-blue/" "$REPO_ROOT/README.md"
            
            # Validate the update was successful
            if grep -q "Version-$new_version-blue" "$REPO_ROOT/README.md"; then
                print_success "Updated README.md version badge to $new_version"
            else
                print_error "Failed to update README.md version badge"
                print_info "Please manually update the version badge in README.md"
                return 1
            fi
        else
            # No version badge found - that's okay, just warn
            print_warning "README.md has no version badge (consider adding dynamic GitHub release badge)"
        fi

@augmentcode
Copy link

augmentcode bot commented Jan 21, 2026

🤖 Augment PR Summary

Summary: Updates .agent/scripts/version-manager.sh to detect when README.md uses a dynamic GitHub release badge and avoid failing the release when no hardcoded badge is present.
This prevents early exits so the script can continue updating .claude-plugin/marketplace.json during version bumps.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@marcusquinn marcusquinn merged commit e8910f6 into main Jan 21, 2026
12 of 13 checks passed
marcusquinn added a commit that referenced this pull request Jan 21, 2026
The README.md now uses a dynamic GitHub release badge instead of a
hardcoded version badge. The version-manager.sh was still trying to
update the hardcoded badge and failing when it wasn't found, which
caused it to return early before updating marketplace.json.

Changes:
- Check for dynamic badge (img.shields.io/github/v/release) first
- Skip README update if dynamic badge is used (GitHub handles it)
- Only update hardcoded badge if present
- Warn if no version badge found (non-fatal)

This fixes the issue where marketplace.json wasn't being updated
during releases because the README validation failed first.
marcusquinn added a commit that referenced this pull request Jan 21, 2026
* docs: improve README maintainability and add AI-CONTEXT block

- Remove hardcoded version badge (2.66.0) - use dynamic GitHub release badge
- Remove hardcoded lines of code badge - goes stale quickly
- Add AI-CONTEXT block with quick reference for AI assistants
- Fix Architecture section: remove duplicates, add proper structure
- Update MCP badge to 20+ (approximate count)

These changes follow maintainability guidelines from workflows/readme-create-update.md

* fix: update version validator to accept dynamic GitHub release badge

The validator now recognizes the dynamic GitHub release badge
(img.shields.io/github/v/release) as the preferred approach over
hardcoded version badges that go stale.

This aligns with README maintainability guidelines that recommend
avoiding hardcoded counts and versions.

* fix: use approximate counts in AI-CONTEXT and Architecture sections

Address CodeRabbit review feedback:
- Change '14 main agents' to '~15 main agents' (approximate)
- Change '130+ helper scripts' to '100+ helper scripts' (round number)

This ensures counts remain accurate longer without frequent updates.

* style: use h3 headings in AI-CONTEXT block for better semantic structure

Address Gemini Code Assist feedback:
- Change 'Key Commands' from bold to ### heading
- Change 'Agent Structure' from bold to ### heading

This improves machine readability and semantic consistency.

* fix: make remaining agent count approximate

Missed one hardcoded '14 domain agents' at line 892.
Changed to '~15 domain agents' for consistency.

* 🤖 AUTO-FIX: Apply code quality improvements

  ✅ AUTOMATED FIXES:
  - Applied Qlty auto-formatting
  - Fixed common shellcheck issues
  - Updated code quality standards

  🔍 ANALYSIS:
  - SonarCloud: 323 code smells
  - Codacy: Analysis completed
  - Qlty: Auto-formatting applied

  Generated by: GitHub Actions Code Review Monitoring

* feat(plan-plus): add agent design subagents for planning discussions (#132)

Add build-agent and agent-review to Plan+ subagents list so users can
discuss agent design patterns during planning mode before implementation.

* feat: add readme-helper.sh for dynamic count management (#131)

* feat: add readme-helper.sh for dynamic count management

- New script: readme-helper.sh with commands:
  - counts: Show current agent/script counts
  - check: Verify if README counts are stale
  - update: Update README counts (with --apply flag)

- Updated full-loop.md: Added README check step for aidevops repo
- Updated readme-create-update.md: Added dynamic counts guidance
- Updated readme.md command: Added helper script reference

This enables automated README maintenance and prevents count staleness.

* fix: address review feedback for readme-helper.sh

- Remove unnecessary SC2034 shellcheck disable (Gemini feedback)
- Add caching for count functions to avoid repeated find calls (Gemini)
- Guard for missing directories, return 0 instead of failing (Augment)
- Align rounding logic between check and update commands (Augment)
  - Both now use round_scripts() and round_subagents() functions
  - Consistent output: 150+ subagents, 130+ scripts

* style: add blank lines before fenced code blocks

Fix Codacy markdown linting issues in full-loop.md and readme-create-update.md

* 🤖 AUTO-FIX: Apply code quality improvements

  ✅ AUTOMATED FIXES:
  - Applied Qlty auto-formatting
  - Fixed common shellcheck issues
  - Updated code quality standards

  🔍 ANALYSIS:
  - SonarCloud: 324 code smells
  - Codacy: Analysis completed
  - Qlty: Auto-formatting applied

  Generated by: GitHub Actions Code Review Monitoring

* chore(release): bump version to 2.67.0

- feat: add readme-helper.sh for dynamic count management (#131)
- feat(plan-plus): add agent design subagents for planning discussions (#132)
- docs: improve README maintainability and add AI-CONTEXT block (#130)

Also fixes version-manager.sh to accept dynamic GitHub release badges.

* 🤖 AUTO-FIX: Apply code quality improvements

  ✅ AUTOMATED FIXES:
  - Applied Qlty auto-formatting
  - Fixed common shellcheck issues
  - Updated code quality standards

  🔍 ANALYSIS:
  - SonarCloud: 328 code smells
  - Codacy: Analysis completed
  - Qlty: Auto-formatting applied

  Generated by: GitHub Actions Code Review Monitoring

* fix: consolidate version validation to single source of truth (#133)

- Update validate-version-consistency.sh with aidevops.sh, package.json, marketplace.json checks
- Refactor version-manager.sh to call standalone validator instead of duplicate logic
- Add validation after marketplace.json sed update to catch silent failures
- Update auto-version-bump.sh with complete file list

Fixes issue where version-manager.sh had its own validation logic that
drifted from validate-version-consistency.sh (used by CI), causing
release v2.67.0 to fail initially when PR #130 updated only the
standalone script.

* docs: add changelog entry for version validation fix

* chore(release): bump version to 2.67.1

* 🤖 AUTO-FIX: Apply code quality improvements

  ✅ AUTOMATED FIXES:
  - Applied Qlty auto-formatting
  - Fixed common shellcheck issues
  - Updated code quality standards

  🔍 ANALYSIS:
  - SonarCloud: 328 code smells
  - Codacy: Analysis completed
  - Qlty: Auto-formatting applied

  Generated by: GitHub Actions Code Review Monitoring

* fix: handle dynamic GitHub release badge in version-manager.sh (#134)

The README.md now uses a dynamic GitHub release badge instead of a
hardcoded version badge. The version-manager.sh was still trying to
update the hardcoded badge and failing when it wasn't found, which
caused it to return early before updating marketplace.json.

Changes:
- Check for dynamic badge (img.shields.io/github/v/release) first
- Skip README update if dynamic badge is used (GitHub handles it)
- Only update hardcoded badge if present
- Warn if no version badge found (non-fatal)

This fixes the issue where marketplace.json wasn't being updated
during releases because the README validation failed first.

* docs: add changelog entry for dynamic badge fix

* chore(release): bump version to 2.67.2

* docs: add /add-skill command to README

- Add /add-skill to Meta/Improvement slash commands table
- Add 'Importing External Skills' section under Cross-Tool Compatibility
- Document supported formats (SKILL.md, AGENTS.md, .cursorrules)
- Document features (conflict detection, version tracking, symlinks)

* style: add blank line before heading in CHANGELOG (MD022)

---------

Co-authored-by: GitHub Action <action@github.com>
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