Add CI count validation — auto-check README/ROADMAP numbers - #20
Merged
Conversation
New validate-counts job checks that documented counts (commands, skills, workflows, hooks) match actual file counts. Runs on every push/PR. This session alone had 3 count mismatches (9 vs 10 hooks, 14 vs 15 skills, 12 vs 13 workflows) caught only by manual review. Automates the most common review finding.
Fixes from PR review (code-reviewer + silent-failure-hunter): - Add set -uo pipefail to catch command failures - Verify directories exist before counting - Validate counts are non-zero (catches missing dirs) - Add || exit 1 on python3 hooks.json parse (catches malformed JSON) - Use grep -m1 + head -1 on all extractions (prevents multi-match bugs) - Use printf '%b' instead of printf "$var" (prevents format injection) - Track CHECKS counter, fail if no patterns found (prevents silent pass when count claims are removed from docs)
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
New
validate-countsCI job that checks documented counts match actual file counts on every push/PR.What it validates
ls commands/*.mdls -d skills/*/SKILL.mdls workflows/*.ymlhooks.jsonWhy
This session had 3 separate count mismatches caught only by manual review agents:
This was the single most common review finding across PRs #17, #18, and #19.
Test plan