chore(scripts): sync derive_counters docs with 5-source gate, rename EXCLUDED_DIRS to EXCLUDED_NAMES

Two reviewer nits batched: derive_counters.py's module docstring and --check
help still described the pre-#989 three-source coverage (flagged on #989);
check_model_freshness.py's EXCLUDED_DIRS did double duty as a directory AND
filename exclusion set, which the name hid (flagged on #985 and #988's
reviews) — renamed with a comment stating both roles. No behavior change;
both gates re-verified passing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qgc6RYXWJPr5oW9DHU7zR4
This commit is contained in:
Claude 2026-08-25 06:43:51 +00:00
parent ab46f472ab
commit c118489398
No known key found for this signature in database
2 changed files with 10 additions and 7 deletions

View file

@ -35,7 +35,9 @@ import os
import re
import sys
EXCLUDED_DIRS = {
# Excludes both directory names (pruned during walk) and individual filenames
# (e.g. CHANGELOG.md) — membership is checked against dirnames AND filenames.
EXCLUDED_NAMES = {
".git", ".codex", ".gemini", ".hermes", ".vibe", "node_modules",
"docs", # generated mirror; fix the source instead
"audit", # audit records quote stale IDs on purpose, that is their job
@ -157,9 +159,9 @@ def scan_file(path, repo_root, allowlist):
def collect(repo_root):
targets = []
for dirpath, dirnames, filenames in os.walk(repo_root):
dirnames[:] = [d for d in dirnames if d not in EXCLUDED_DIRS]
dirnames[:] = [d for d in dirnames if d not in EXCLUDED_NAMES]
for fn in filenames:
if fn in EXCLUDED_DIRS or fn in SELF_FILES:
if fn in EXCLUDED_NAMES or fn in SELF_FILES:
continue
if fn.endswith(SCAN_EXTENSIONS):
targets.append(os.path.join(dirpath, fn))

View file

@ -19,9 +19,10 @@ Modes:
(default) print a human-readable table
--json print the derived counters as JSON
--check exit 1 listing mismatches if the headline counters claimed in
README.md, root CLAUDE.md ("Current Scope" line), and
marketplace.json metadata.description disagree with derived
values. Also validates the README "Skills Overview" per-domain
README.md, root CLAUDE.md ("Current Scope" / "Status:" lines),
marketplace.json metadata.description, mkdocs.yml
site_description, or .codex-plugin/plugin.json descriptions
disagree with derived values. Also validates the README "Skills Overview" per-domain
table: every domain row's count must equal the SKILL.md count in
its linked folder, and every on-disk domain must have a row. CI gate G3.
@ -360,7 +361,7 @@ def main() -> int:
parser.add_argument(
"--check",
action="store_true",
help="exit 1 if README.md / CLAUDE.md / marketplace.json claims drift from derived values",
help="exit 1 if claims in README.md / CLAUDE.md / marketplace.json / mkdocs.yml / .codex-plugin drift from derived values",
)
args = parser.parse_args()