promptdojo_

The voice pack is data — on-voice copy at batch volume — step 7 of 8

Write lint_copy(text, pack) — the voice check that runs on every AI draft before it reaches review.

These drafts are subject lines, and subject lines carry a tighter cap than the pack's 20-word body-sentence rule — Dana set max_words to 12 for this slot. The linter doesn't care: it reads whatever cap the pack states. That's the point of pack-as-data.

Rules, in order:

  1. For each phrase in pack["banned"] (in list order): if it appears in the lowercased text, add the violation string "banned: <phrase>".
  2. If the word count (len(text.split())) is greater than pack["max_words"], add "too long".
  3. Return the list of violations (empty list = on-voice).

Four AI drafts for the Fieldnote relaunch run through it. Expected output:

V1: PASS
V2: FAIL (banned: game-changing)
V3: FAIL (too long)
V4: PASS

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