promptdojo_

Variants at scale — twelve on-voice, and a kill log for the rest — step 7 of 8

Wednesday night. Six variants back from the model, gate time. Write voice_gate(variants, pack) returning a list of (id, verdict) tuples, one per variant, in order. Checks run in priority order — first failure wins, later checks don't run:

  1. Any banned phrase in the lowercased text -> "KILL (banned: <phrase>)" (first banned phrase in pack order)
  2. Any "!" -> "KILL (exclamation)"
  3. Longest sentence over pack["max_sentence_words"] -> "KILL (long sentence: <n> words)". Sentences: non-empty pieces after splitting on [.!?]+; words: whitespace split.
  4. len(text) over the channel's budget in pack["max_chars"] -> "KILL (over-limit by <n>)"
  5. Otherwise -> "SHIP"

Expected output:

V01: SHIP
V02: KILL (banned: unleash)
V03: KILL (exclamation)
V04: KILL (over-limit by 15)
V05: KILL (long sentence: 24 words)
V06: SHIP

full-screen editor opens — close anytime to keep reading.