Claude Templates / C-tier · Discipline

Discipline

The AI Compliance Gate Playbook

Brand safety for AI-generated output — banned words, anti-tells, injection defense.

AI-COMPLIANCE-GATE-PLAYBOOK.md · 13 sections · 2,183 words · 16 KB · markdown

If your app publishes model output under a customer's name, something has to stand between the model and the world. A banned-word lint, an anti-AI-tell pass, prompt double-injection prevention, and length defense — enforced in code, not in the prompt.

What's inside

When to use it

Any app that publishes AI output on a user's behalf.

Build these first

Nothing. This one stands alone.

Straight from the file

Applies only to apps that generate AI content (Kompozy-class). If the app doesn't ship LLM/image/video output to end users, skip this playbook. Built from the BKE / Kompozy implementation. Reference repo: reference app.

Table of contents

  1. 0. Use this spec
  2. 1. Why this matters
  3. 2. The Persona Brief (foundation)
  4. 3. Compliance matrix (per-format flags)
  5. 4. buildCompliantImagePrompt() — the composer
  6. 5. The double-injection footgun
  7. 6. Banned-word lint
  8. 7. Anti-AI-tells matrix
  9. 8. Length defense
  10. 9. Pre-render audit (video/blog scripts)
  11. 10. Auditable trail (complianceUsed)
  12. 11. Common pitfalls
  13. 12. Kickoff prompt

How to run it

Drop AI-COMPLIANCE-GATE-PLAYBOOK.md into your repo, then tell Claude Code: “Read AI-COMPLIANCE-GATE-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

More discipline playbooks

← All 28 Claude templates