optimize-description.sh: the 60/40 split on mikefarah yq
The script split each eval file with yq -y '{... [:N] ...}'. That is python-yq syntax. The repo and CI ship mikefarah/yq (Go), which has no -y flag and no jq-style slicing, so npm run eval:optimize-desc died on the first skill. The fix routes YAML through jq, which already speaks the expression, and back.
What the shell sees
Before (main)
$ yq -y "{id: .id, trigger_evals: (...[:4]...)}" explore.eval.yaml
Error: unknown shorthand flag: 'y' in -y
rc=1
Measured 2026-08-25 with yq v4.53.3 on the dev machine.
After (this PR)
$ yq -o=json explore.eval.yaml \
| jq --argjson tp 4 --argjson tn 4 '{id: .id, trigger_evals: (...[:$tp]...)}' \
| yq -p=json -o=yaml -
rc=0 train=8 (4 true + 4 false) test=7 overlap=0
Same jq expression; the counts are bound with --argjson so they reach jq as data, which is what tests/security/test-jq-injection.sh requires.
Try the split
This runs the exact selection the fixed script performs: take the first train_pos positives and first train_neg negatives for training, the rest for testing. Edit the YAML-ish list or move the slider.
train_file
test_file
The equivalent jq, generated for your inputs
The script computes train_pos = total_positive * RATIO / 100 with bash integer math, so the floor you see here matches what runs in CI.