Files
agency-agents/scripts
Michael Sitarzewski 93f3c5f818 check-divisions: enumerate git-tracked dirs, not a filesystem glob (#597)
actual_dirs() globbed the filesystem (`for d in */`), so it picked up gitignored
or otherwise untracked top-level directories — e.g. a local notes/ scratch dir —
and reported them as "division(s) not in divisions.json". That's a false
failure: CI uses a clean `actions/checkout` and never sees those dirs, so the
check passed in CI but failed locally, undermining a guard meant to be run
locally before pushing.

Use `git ls-files` to enumerate only top-level dirs that contain a tracked file,
keeping the dot-prefix and NON_DIVISION_DIRS filters. Local now matches CI.

Verified: passes at 16 divisions; an untracked dir is ignored; a tracked
unregistered division dir still fails the check.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 22:48:03 -05:00
..