Skip to content

Add CI count validation — auto-check README/ROADMAP numbers - #20

Merged
5uck1ess merged 2 commits into
mainfrom
fix/ci-count-validation
Apr 5, 2026
Merged

Add CI count validation — auto-check README/ROADMAP numbers#20
5uck1ess merged 2 commits into
mainfrom
fix/ci-count-validation

Conversation

@5uck1ess

@5uck1ess 5uck1ess commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

New validate-counts CI job that checks documented counts match actual file counts on every push/PR.

What it validates

Count Source of truth Checked in
Slash commands ls commands/*.md README.md tree, ROADMAP.md
Skills ls -d skills/*/SKILL.md README.md tree, ROADMAP.md
Workflows ls workflows/*.yml README.md tree, ROADMAP.md
Hooks Unique scripts in hooks.json ROADMAP.md

Why

This session had 3 separate count mismatches caught only by manual review agents:

  • "9 hooks" → actually 10
  • "14 skills" → actually 15
  • "12 workflows" → actually 13

This was the single most common review finding across PRs #17, #18, and #19.

Test plan

  • CI passes on this PR (counts currently match)
  • Intentionally break a count locally and verify CI would fail

5uck1ess added 2 commits April 5, 2026 18:24
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)
@5uck1ess
5uck1ess merged commit 900d2ec into main Apr 5, 2026
2 checks passed
@5uck1ess
5uck1ess deleted the fix/ci-count-validation branch April 5, 2026 22:30
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