Files
ECC/scripts/ci
sybertoooth7-lgtm 8c560ac0cd fix(ci): close catalog gate holes on README project tree
The catalog gate validated only the first README project-tree block and
had no skills/commands counterpart to the agents pattern, so:

- README.md project tree (skills) and (commands) were never checked.
- A stale count in a second tree block was invisible because the agents
  pattern used String.match with a non-global regex, which reads only the
  first occurrence.

Both are now fail-closed. parseReadmeExpectations walks every tree block
for all three categories via matchAll, reports the offending line number
in the source label, and throws when an entry is missing entirely rather
than skipping it. syncEnglishReadme uses replaceAllOrThrow so --write
repairs every block instead of only the first; replaceOrThrow could not
be reused because it replaces only the first match and its regex.test()
probe is unsafe once the pattern carries the g flag.

README.md:847 documented 67 agents against an actual 68 and was never
checked, so it was corrected.

Fixtures in tests/ci/catalog.test.js and tests/ci/validators.test.js now
emit the skills and commands tree lines the gate requires, and both gain
regression coverage that fails against the previous parser (5 new tests).
2026-10-05 19:20:13 +03:00
..