Lesson 216: AI NPC Dialogue Patch Moderation Receipt Before Live Hotfix (2026)
Direct answer: Every LLM NPC dialogue hotfix ships only after blocked_phrases_audit_v1.json passes, a human signs off on sample lines, and ai_dialogue_patch_receipt_v1.json records build_label, prompt hash, and fallback node on BUILD_RECEIPT—never raw API output straight to players. Continues Lesson 215 refund signals; pairs LLM NPC dialogue resources and Lesson 207 honest-receipt discipline (ops cousin, not duplicate concat steps).

Why this matters now (July 2026 live hotfix week)
July 2026 teams patch fest_public twice a week—combat numbers and NPC barks in the same train. Failures:
- Emergency dialogue patch bypasses moderation because “it’s only three lines.”
- Player prompts accidentally logged to PostHog (Lesson 213 forbid this).
- No fallback when API returns 529—NPCs go silent or spew policy text.
- Store AI disclosure stale after new generative path (Steam AI intake checklist).
This lesson is the H1 trust gate for generative dialogue changes—same rigor as prompt registry freeze but scoped to one hotfix PR.
Beginner path (35-minute moderation pass)
| Step | Action | Success check |
|---|---|---|
| 1 | List changed dialogue files / prompt ids | Diff attached to PR |
| 2 | Run blocked_phrases_audit script |
Zero critical hits |
| 3 | Human reads 10 sample outputs | Sign-off name + date |
| 4 | Confirm Yarn/Ink fallback node exists | Named node id in receipt |
| 5 | Verify telemetry denylist still blocks prompts | Lesson 213 GREEN |
| 6 | File ai_dialogue_patch_receipt_v1.json |
A1–A6 pass |
Time: ~35 minutes per hotfix; 55 minutes first registry setup.
Developer path (gates A1–A6)
| Gate | Check | Fail when |
|---|---|---|
| A1 | prompt_registry semver bump |
Hotfix without hash change |
| A2 | blocked_phrases_audit_v1 pass |
Slur / PII / policy text in samples |
| A3 | Human sign-off recorded | API-only approval |
| A4 | Deterministic fallback wired | Empty string on block |
| A5 | build_label on patch row |
Orphan hotfix |
| A6 | ai_dialogue_patch_receipt_v1.json |
live_hotfix_allowed: false |
blocked_phrases_audit_v1.json
{
"schema": "blocked_phrases_audit_v1",
"build_label": "fest-demo-2026-10-rc3",
"prompt_hash": "sha256:abc123…",
"samples_tested": 24,
"categories": ["slur", "pii", "self_harm", "real_world_politics", "competitor_names"],
"hits": [],
"moderation_backend": "local_classifier_plus_api",
"audit_pass": true
}
Run samples from staging API keys—never production player traffic for audit input.
Human sign-off block (A3)
## Dialogue hotfix sign-off
- build_label: fest-demo-2026-10-rc3
- reviewer: [role, not personal email in public repo]
- date_utc: 2026-05-25
- samples_read: 10/10
- fallback_node: yarn://npc_guard_fallback_03
- approved: yes
Store under release-evidence/ai-dialogue/SIGNOFF.md (internal).
Fallback requirement (A4)
| Failure mode | Player sees | Not |
|---|---|---|
| API 529 | Yarn node npc_guard_fallback_03 |
Error string |
| Moderation block | Same fallback | Model refusal essay |
| Timeout > 2s | Same fallback | Spinner forever |
Cross-link Anthropic 529 help for queue policy—fallback still mandatory.
ai_dialogue_patch_receipt_v1.json
{
"schema": "ai_dialogue_patch_receipt_v1",
"build_label": "fest-demo-2026-10-rc3",
"patch_id": "dialogue-hotfix-2026-05-25-01",
"prompt_hash": "sha256:abc123…",
"prompt_registry_semver": "1.4.2",
"blocked_phrases_audit": "release-evidence/ai-dialogue/BLOCKED_PHRASES_AUDIT.json",
"human_signoff": "release-evidence/ai-dialogue/SIGNOFF.md",
"fallback_node": "yarn://npc_guard_fallback_03",
"telemetry_player_prompt_logging": false,
"store_ai_disclosure_updated": true,
"paired_receipts": {
"telemetry_session": "release-evidence/telemetry/TELEMETRY_SESSION_RECEIPT.json",
"ffmpeg_concat_decision": "release-evidence/playtest/vod/FFMPEG_CONCAT_DECISION_RECEIPT.json"
},
"gates": {
"A1_prompt_registry": "pass",
"A2_blocked_phrases": "pass",
"A3_human_signoff": "pass",
"A4_fallback": "pass",
"A5_build_label": "pass",
"A6_receipt": "pass"
},
"live_hotfix_allowed": true
}
Pin under release-evidence/ai-dialogue/AI_DIALOGUE_PATCH_RECEIPT.json.
BUILD_RECEIPT columns
| Column | Value |
|---|---|
ai_dialogue_patch_receipt |
Path + pass/fail |
prompt_hash |
Matches registry |
build_label |
Fest row |
telemetry_session_receipt |
Must stay no-PII |
Proof table (hotfix week)
| Patch | audit pass | sign-off | live deploy? |
|---|---|---|---|
| combat-only | n/a | n/a | yes (non-dialogue) |
| 3 NPC lines | yes | yes | after A6 |
| emergency unmoderated | no | — | blocked |
Key takeaways
- Dialogue hotfixes are generative shipping—treat like store metadata changes.
blocked_phrases_auditis machine + human—not honor system.- Fallback nodes are part of the patch, not optional polish.
- Never log player prompts in telemetry (Lesson 213).
- Prompt registry semver must move when system prompts change.
- Lesson 207 teaches honest receipts when concat fails—same ethics here.
- Refund dashboard (215) may tag
gameplaydialogue complaints—link issue ids. - Capstone 217 rolls this receipt into H1 summary.
Prerequisites
- Lesson 213 — telemetry without PII
- 15-free LLM NPC dialogue resources
- Steam AI disclosure intake
- Prompt registry freeze sprint
- Lesson 207 — honest path receipts
Common mistakes
- Shipping dialogue patch Friday night without audit.
- Using production logs as moderation test input (PII risk).
- Showing API moderation refusal text in-game.
- Skipping store disclosure update when new model vendor added.
- Confusing combat tuning hotfix with dialogue patch (receipt n/a only if zero generative change).
Troubleshooting
| Symptom | Lane |
|---|---|
| API overload during fest | 529 retry help |
| Silent NPC after patch | A4 fallback node missing |
| Refund “weird dialogue” | Lesson 215 + issue link |
| Partner asks for AI proof | Lesson 180 governance red-team |
Mini exercise (55 minutes)
- Add three blocked phrases to audit list; run 12 samples.
- Intentionally fail one sample—confirm deploy blocked.
- Wire fallback node; test 529 stub.
- Human sign-off on 10 lines.
- File receipt; block live deploy until A6 GREEN.
Continuity — H1 2026 arc (212–217)
| Lesson | Receipt focus |
|---|---|
| 212–215 | Saves → refunds |
| 216 (this) | AI dialogue patch moderation |
| 217 | H1 capstone |
Next: Lesson 217 — H1 player trust capstone (closes 212–216 arc).
FAQ
Cosmetic string patch only?
Receipt n/a with note on BUILD_RECEIPT—do not skip A5 build_label bump if same train ships code.
Voice + text generative?
Extend audit to spoken script samples; disclose voice vendor.
Local Ollama only?
Still run blocked_phrases_audit—local models also drift.
No live dialogue hotfix without moderation receipt—fest chat screenshots live forever.