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
- //A banned-word lint with a maintainable term list
- //An anti-AI-tell pass for the phrasing that gives output away
- //Prompt double-injection prevention
- //Length defense against runaway generations
- //Where the gate belongs in the pipeline (and why not in the prompt)
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
- 0. Use this spec
- 1. Why this matters
- 2. The Persona Brief (foundation)
- 3. Compliance matrix (per-format flags)
- 4. buildCompliantImagePrompt() — the composer
- 5. The double-injection footgun
- 6. Banned-word lint
- 7. Anti-AI-tells matrix
- 8. Length defense
- 9. Pre-render audit (video/blog scripts)
- 10. Auditable trail (complianceUsed)
- 11. Common pitfalls
- 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.
More discipline playbooks
Pre-Production Hardening
The last pass before public traffic — secrets, RLS, headers, limits, legal.
Read + download →C-tierSupabase Migrations
Migration discipline — numbering, guards, application, and the never-destructive rule.
Read + download →C-tierCore Web Vitals Audit
LCP, CLS, INP — measure it properly, then fix the things that actually move it.
Read + download →