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:
- For each phrase in
pack["banned"](in list order): if it appears in the lowercasedtext, add the violation string"banned: <phrase>". - If the word count (
len(text.split())) is greater thanpack["max_words"], add"too long". - 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