Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Checkpoint: the full draft gate — the check every suggested reply passes before it goes out under your name.
Write draft_gate(draft, pack) returning (verdict, reasons):
- Banned phrases first: every phrase from
pack["banned"]found in the draft text (case-insensitive substring), in banned-list order, goes intoreasons. - Then the citation, exactly one of:
citesisNone→ append"no citation"- the id isn't in
pack["kb"]→ append"unknown article" - its last-verified date is before
pack["stale_before"]→ append"stale article" - otherwise the citation is fine — append nothing.
verdictis"SEND"ifreasonsis empty, else"HOLD".
Four drafts run through the report loop (provided). Expected output:
T-901: SEND
T-902: HOLD — stale article
T-903: HOLD — we guarantee; arrive by
T-904: HOLD — no citation