Skip to content

Commit a1b70f7

Browse files
TMHSDigitalclaude
andcommitted
ci: drop the repo-description count probe and the echo-only count step
The repo description deliberately carries no counts (#448, #486), so the probe warned on every compliant run and trained readers to skip Validate warnings. It also kept a second hand-rolled inventory counter that existed only to feed it; tests/check_counts.py is now the single counter. Closes #520 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LpkeXRvikhJZSVGBFM91Dv Signed-off-by: TM Hospitality Strategies <TMHospitalityStrategies@gmail.com>
1 parent 1fcdfad commit a1b70f7

1 file changed

Lines changed: 5 additions & 76 deletions

File tree

‎.github/workflows/validate.yml‎

Lines changed: 5 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,6 @@ jobs:
133133
fi
134134
echo "All template Python files have valid syntax."
135135
136-
- name: Count components
137-
run: |
138-
skill_count=$(ls -d skills/*/SKILL.md 2>/dev/null | wc -l)
139-
rule_count=$(ls rules/*.mdc 2>/dev/null | wc -l)
140-
template_count=$(find templates -mindepth 1 -maxdepth 1 -type d | wc -l)
141-
snippet_count=$(ls snippets/*.py 2>/dev/null | wc -l)
142-
echo "Skills: $skill_count"
143-
echo "Rules: $rule_count"
144-
echo "Templates: $template_count"
145-
echo "Snippets: $snippet_count"
146-
147136
validate-site:
148137
name: Build landing page and check site links
149138
# The landing page is built only at deploy (docs/index.html is untracked),
@@ -399,71 +388,11 @@ jobs:
399388
python-version: "3.12" # pinned: the runner image's python3 moves (#495)
400389

401390
- name: Check content counts match the repo
402-
env:
403-
GH_TOKEN: ${{ github.token }}
404-
run: |
405-
python3 << 'PYEOF'
406-
import os
407-
import sys
408-
409-
errors = []
410-
411-
skill_count = len([
412-
d for d in os.listdir('skills')
413-
if os.path.isdir(os.path.join('skills', d))
414-
and os.path.exists(os.path.join('skills', d, 'SKILL.md'))
415-
])
416-
rule_count = len([
417-
f for f in os.listdir('rules')
418-
if f.endswith('.mdc')
419-
])
420-
template_count = len([
421-
d for d in os.listdir('templates')
422-
if os.path.isdir(os.path.join('templates', d))
423-
])
424-
snippet_count = len([
425-
f for f in os.listdir('snippets')
426-
if f.endswith('.py')
427-
])
428-
example_count = len([
429-
d for d in os.listdir('examples')
430-
if os.path.isdir(os.path.join('examples', d))
431-
and os.path.exists(os.path.join('examples', d, 'README.md'))
432-
])
433-
showcase_count = 0
434-
if os.path.isdir('showcase'):
435-
showcase_count = len([
436-
d for d in os.listdir('showcase')
437-
if os.path.isdir(os.path.join('showcase', d))
438-
and os.path.exists(os.path.join('showcase', d, 'README.md'))
439-
])
440-
441-
# Every stated copy of every count, across README, CLAUDE.md, AGENTS.md,
442-
# CONTRIBUTING.md and docs/new-example-prompt.md, plus the snippet cap.
443-
import subprocess
444-
if subprocess.run([sys.executable, 'tests/check_counts.py']).returncode:
445-
errors.append('tests/check_counts.py found stale counts (see above)')
446-
447-
# The GitHub About text drifts silently otherwise. Warn only: it is
448-
# repo metadata edited by hand and must not block content PRs.
449-
try:
450-
about = subprocess.run(
451-
['gh', 'repo', 'view', '--json', 'description', '--jq', '.description'],
452-
capture_output=True, text=True, timeout=60, check=True,
453-
).stdout
454-
for needle in (f'{example_count} examples', f'{showcase_count} showcase'):
455-
if needle not in about:
456-
print(f'::warning::GitHub repo description is stale (missing "{needle}"): {about.strip()}')
457-
except (subprocess.SubprocessError, OSError) as exc:
458-
print(f'::warning::could not read the GitHub repo description: {exc}')
459-
460-
if errors:
461-
for e in errors:
462-
print(f'::error::{e}', file=sys.stderr)
463-
sys.exit(1)
464-
465-
print(f'Counts verified: {skill_count} skills, {rule_count} rules, {template_count} templates, {snippet_count} snippets, {example_count} examples, {showcase_count} showcase pieces')
466-
PYEOF
391+
# Every stated copy of every count, across README, CLAUDE.md, AGENTS.md,
392+
# CONTRIBUTING.md and docs/new-example-prompt.md, plus the snippet cap.
393+
# The GitHub repo description deliberately carries no counts (#448,
394+
# #486), so nothing here reads it (#520).
395+
run: python3 tests/check_counts.py
467396

468397
validate-harness:
469398
name: Validate smoke harness protocol

0 commit comments

Comments
 (0)