Skip to content

Conversation

@marcusquinn
Copy link
Owner

Summary

Adds tooling to manage dynamic counts in README.md, preventing staleness issues identified in PR #130.

Changes

New Script: readme-helper.sh

# Show current counts
readme-helper.sh counts
# Output: Main agents: 13, Subagents: 193, Scripts: 131

# Check if README counts are stale
readme-helper.sh check

# Preview updates
readme-helper.sh update

# Apply updates
readme-helper.sh update --apply

Updated Workflows

File Change
full-loop.md Added README check step for aidevops repo
readme-create-update.md Added dynamic counts guidance and helper script reference
readme.md command Added helper script documentation

Testing

$ .agent/scripts/readme-helper.sh check
[INFO] Current counts:
  Main agents: 13
  Subagents: 193
  Scripts: 131

[SUCCESS] Main agents count is current (~15 vs 13)
[WARNING] Scripts count may be understated: README says 100+, actual is 131

Related

- 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.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 16 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 08013bd and 4a0b2cd.

📒 Files selected for processing (4)
  • .agent/scripts/commands/full-loop.md
  • .agent/scripts/commands/readme.md
  • .agent/scripts/readme-helper.sh
  • .agent/workflows/readme-create-update.md

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


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 introduces a new shell script, readme-helper.sh, designed to automate the management of dynamic numerical counts within the README.md file. This addresses the issue of stale information by providing tools to check, preview, and apply updates to agent and script counts, ensuring the documentation remains accurate and reducing manual maintenance effort. The script's usage is integrated into relevant workflows and documentation.

Highlights

  • New readme-helper.sh Script: A new bash script has been introduced to dynamically manage numerical counts (main agents, subagents, scripts) within the README.md file, preventing staleness.
  • Automated README Count Checks: The full-loop.md workflow now includes an automated step to check if README counts are stale, specifically for the aidevops repository.
  • Enhanced Documentation for Dynamic Counts: Existing documentation files (readme.md and readme-create-update.md) have been updated to provide clear guidance and examples on how to use the new readme-helper.sh script and adopt approximate counts to maintain accurate README information.
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, 324 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Jan 21 01:01:55 UTC 2026: Code review monitoring started
Wed Jan 21 01:01:55 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 324
Wed Jan 21 01:01:55 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Wed Jan 21 01:01:57 UTC 2026: Codacy analysis completed with auto-fixes
Wed Jan 21 01:01:58 UTC 2026: Applied 1 automatic fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 324
  • VULNERABILITIES: 0

Generated on: Wed Jan 21 01:02:41 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 introduces a very useful readme-helper.sh script to automate the management of dynamic counts in the README.md file. This is a great step towards improving maintainability and ensuring documentation doesn't become stale. The script is well-structured, and the updates to the documentation files are clear. I have a few suggestions for the script to improve its performance and robustness.

@@ -0,0 +1,309 @@
#!/bin/bash
# shellcheck disable=SC2034,SC2155

Choose a reason for hiding this comment

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

medium

The shellcheck disable=SC2034 for unused variables appears to be unnecessary as all variables seem to be used within the script. It's good practice to remove suppression comments that are no longer needed to ensure shellcheck can catch future issues. Could you please remove SC2034 from the disable list?

Suggested change
# shellcheck disable=SC2034,SC2155
# shellcheck disable=SC2155

Comment on lines 20 to 42
# Count main agents (*.md files in .agent/ root, excluding AGENTS.md)
count_main_agents() {
local count
count=$(find "$AGENT_DIR" -maxdepth 1 -name "*.md" -type f ! -name "AGENTS.md" 2>/dev/null | wc -l | tr -d ' ')
echo "$count"
return 0
}

# Count subagent markdown files (all .md files in subdirectories)
count_subagents() {
local count
count=$(find "$AGENT_DIR" -mindepth 2 -name "*.md" -type f 2>/dev/null | wc -l | tr -d ' ')
echo "$count"
return 0
}

# Count helper scripts
count_scripts() {
local count
count=$(find "$AGENT_DIR/scripts" -name "*.sh" -type f 2>/dev/null | wc -l | tr -d ' ')
echo "$count"
return 0
}

Choose a reason for hiding this comment

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

medium

The counting functions (count_main_agents, count_subagents, count_scripts) are called in multiple places, which results in running find repeatedly. On large repositories, this could be inefficient. To improve performance, you could calculate all counts once at the beginning of the script execution and store them in global variables. These cached values can then be used throughout the script.

For example, you could implement caching like this:

# At the top of the script
_main_agents_count=""
_subagents_count=""
_scripts_count=""

# A function to populate counts if not already done
_ensure_counts() {
    if [[ -z "$_main_agents_count" ]]; then
        _main_agents_count=$(find "$AGENT_DIR" -maxdepth 1 -name "*.md" -type f ! -name "AGENTS.md" 2>/dev/null | wc -l | tr -d ' ')
        _subagents_count=$(find "$AGENT_DIR" -mindepth 2 -name "*.md" -type f 2>/dev/null | wc -l | tr -d ' ')
        _scripts_count=$(find "$AGENT_DIR/scripts" -name "*.sh" -type f 2>/dev/null | wc -l | tr -d ' ')
    fi
}

# Modified counting function
count_main_agents() {
    _ensure_counts
    echo "$_main_agents_count"
}
# ... and so on for other count functions.

Comment on lines +282 to +285
case "$1" in
--apply) apply="true"; shift ;;
*) file="$1"; shift ;;
esac

Choose a reason for hiding this comment

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

medium

The argument parsing for the update command currently allows multiple file arguments, with the last one taking precedence. The help text update [file] suggests that only one file should be processed. To make the script more robust and prevent unexpected behavior, it would be better to add a check to ensure that only one file argument is provided.

Suggested change
case "$1" in
--apply) apply="true"; shift ;;
*) file="$1"; shift ;;
esac
case "$1" in
--apply) apply="true"; shift ;;
*)
if [[ -n "$file" ]]; then
print_error "The update command accepts only one file argument."
return 1
fi
file="$1"
shift
;;
esac

@augmentcode
Copy link

augmentcode bot commented Jan 21, 2026

🤖 Augment PR Summary

Summary: This PR adds a dedicated helper script to keep README “dynamic counts” (agents/subagents/scripts) from going stale and updates internal docs to reference the new workflow.

Changes:

  • Added .agent/scripts/readme-helper.sh with counts, check, and update commands for agent/subagent/script totals.
  • check compares computed totals against common README patterns (e.g. ~15 main agents, 200+ subagent…, 100+ helper scripts) and signals staleness via exit status.
  • update supports dry-run preview and an --apply mode that edits README counts in-place while saving a .bak backup.
  • Updated full-loop.md, readme.md command docs, and readme-create-update.md workflow to recommend the helper for aidevops-only README maintenance.
  • Added guidance to use approximate counts (~/+) to reduce churn while staying reasonably current.

Technical Notes: The script assumes the repo layout under .agent/, uses find/grep/sed for detection and updates, and returns non-zero from check when counts appear stale (useful for automation).

🤖 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. 2 suggestions posted.

Fix All in Augment

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

# Count helper scripts
count_scripts() {
local count
count=$(find "$AGENT_DIR/scripts" -name "*.sh" -type f 2>/dev/null | wc -l | tr -d ' ')
Copy link

Choose a reason for hiding this comment

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

With set -euo pipefail, a missing $AGENT_DIR/scripts directory will make this find pipeline fail and terminate the script (even though stderr is redirected), which makes counts/check brittle outside the expected repo layout. Consider guarding for missing dirs and treating the count as 0.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

# Calculate approximate values
local approx_scripts approx_subagents
approx_scripts=$((scripts / 10 * 10))
approx_subagents=$((subagents / 50 * 50))
Copy link

Choose a reason for hiding this comment

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

update_readme_counts floors approx_subagents to a multiple of 50 unconditionally, but get_approximate_counts rounds to nearest 10 when <200, so check can suggest e.g. 190+ while update writes 150+ for the same state. Consider aligning the rounding logic so check/update agree.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Jan 21 01:06:17 UTC 2026: Code review monitoring started
Wed Jan 21 01:06:17 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 324
Wed Jan 21 01:06:17 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Wed Jan 21 01:06:19 UTC 2026: Codacy analysis completed with auto-fixes
Wed Jan 21 01:06:20 UTC 2026: Applied 1 automatic fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 324
  • VULNERABILITIES: 0

Generated on: Wed Jan 21 01:07:00 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Fix Codacy markdown linting issues in full-loop.md and readme-create-update.md
@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, 324 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Jan 21 01:08:21 UTC 2026: Code review monitoring started
Wed Jan 21 01:08:22 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 324
Wed Jan 21 01:08:22 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Wed Jan 21 01:08:24 UTC 2026: Codacy analysis completed with auto-fixes
Wed Jan 21 01:08:25 UTC 2026: Applied 1 automatic fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 324
  • VULNERABILITIES: 0

Generated on: Wed Jan 21 01:09:06 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn merged commit 552c0d2 into main Jan 21, 2026
9 checks passed
marcusquinn added a commit that referenced this pull request Jan 21, 2026
- 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.
marcusquinn added a commit that referenced this pull request Jan 21, 2026
* 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
marcusquinn added a commit that referenced this pull request Jan 21, 2026
- 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.
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