Enterprise Brand Governor
Policy-as-code for AI-generated imagery. Every prompt is pre-validated against brand.md, every output is post-checked, violations escalate to a human approver, and every decision is logged. Built for regulated industries and any enterprise where an off-brand asset in production is a material risk.
When to Use
- Multiple teams (marketing, product, sales, agency partners) generating on the same brand system
- Regulated industries (pharma, finance, alcohol, kids) where imagery has legal constraints
- Brand-safety SLA — zero tolerance for competitor logos, restricted props, or off-palette output reaching production
- Agency handoff — external vendor generating on your brand, you need a gate you control
- Pre-production review cycle needs automation; humans only review escalations
Do not use for: quick exploration / mood-board work (gating slows ideation), or accounts without a written brand system yet (build brand.md first).
Prerequisites
Before rolling the governor across teams:
- Brand system location — path / repo / URL for
brand.md. Who owns it? What's the change-control process?
- Policy strictness — reject (halt), flag (log + allow), or tier by asset destination (production = reject, internal = flag)?
- Approval chain — who reviews flagged items? What's the SLA for escalation turnaround (1h, 24h, 3 business days)?
- Logging destination — local
~/.gen-ai/audit/, S3 bucket, or ship to SIEM (Splunk, Datadog)?
- Compliance constraints — GDPR / HIPAA / COPPA / financial-services rules that must be encoded in
brand.md?
- Rollback plan — if the governor blocks a legitimate launch, who has override authority and how is that logged?
How to Run
The governor runs at three checkpoints: prompt, generation, output.
- Author
brand.md — palette, typography, allowed/denied props, imagery style, voice, regulated-category rules. Versioned in git. Commit SHA is the policy ID.
- Pre-flight (prompt lint) —
gen-ai validate against the prompt before spending credits. Catches banned terms, disallowed concepts, missing required elements (e.g., disclaimer placement).
- Brand-context generation — every
gen-ai generate and gen-ai batch run prompt includes the relevant brand.md constraints. Review violations during QA.
- Post-flight (output check) — for critical assets, a second-pass model (
gemini-3-pro-image or vision check) verifies the output matches policy. Palette sampling, logo presence detection, prop allow-list.
- Escalation — any
violation status routes to the approver queue. Humans review, approve or reject, decision is logged against the audit ID.
- Audit export — daily / weekly export of all decisions to the configured SIEM or compliance archive.
Quick Reference
The governor adds policy metadata to every job record.
{
"defaults": {
"model": "flux-2-pro"
},
"metadata": {
"policy_id": "brand.md@sha:a4f1c9",
"policy_version": "2.3.0",
"policy_mode": "reject",
"approver": "brand-governance@company.com",
"escalation_channel": "#brand-review",
"audit_id": "GOV-2026-04-CAMPAIGN-LAUNCH",
"compliance_tags": ["GDPR", "US-FTC-native-ad"],
"data_residency": "eu-west-1"
},
"jobs": [
{
"id": "launch-hero-001",
"prompt": "Production launch hero. Editorial hero, team of four diverse professionals collaborating, modern office, natural light, brand palette. Apply brand.md constraints and require legal review before publishing."
}
]
}
Record policy decisions in the downstream audit ledger: approved, flagged, or rejected with the reason.
Quick Reference
| Sub-task |
Model |
Notes |
| Prompt compliance check |
gpt-image-1.5 / text reasoner |
Cheap pre-flight before image spend |
| Primary generation (brand-safe) |
flux-2-pro |
Strong prompt adherence, commercial-safe |
| Primary generation (product accuracy) |
flux-kontext-pro |
Edit-mode when subject must be preserved |
| Post-generation vision audit |
gemini-3-pro-image |
Strong scene understanding for policy checks |
| Upscale approved outputs only |
topaz-upscale-image |
Never upscale before approval — wastes credits |
Confirm commercial-use status per provider with gen-ai models info <id>. Pharma and financial services should maintain a short allow-list of pre-cleared models.
Procedure
- Treat
brand.md as code. Versioned, reviewed, signed. The file's commit SHA is the policy ID in every audit record.
- Always pin the model version. Policy interpretation changes when models change. Pair with
enterprise-pinned-registry.
- Pre-flight before spend.
gen-ai validate catches 80% of violations for $0.
- Human-in-the-loop on rejects. A reject is a business decision, not a tool decision. Route to the approver.
- Default to reject, not flag. Flag mode is for drafts only; production must reject.
- Log everything. Every prompt, every decision, every override. No silent approvals.
- Rotate the audit log. Daily JSONL, shipped off the dev machine. Local logs disappear; SIEM doesn't.
- Test the governor with adversarial prompts. Red-team your own policy quarterly — does it actually catch competitor logos, prohibited claims?
- Document the override path. There will be legitimate exceptions. Make the override visible, logged, and time-boxed.
Pitfalls
brand.md too vague — "use the brand palette" is not enforceable. Hex codes, prop allow-lists, explicit denies.
- No override path — legitimate exceptions get bypassed outside the system, breaking the audit. Build the override in.
- Logs only local — dev machines die. Ship to SIEM or a durable archive from day one.
- Flag-mode in production — "we'll review later" never happens. Default reject.
- Unaudited model swaps — someone swaps
flux-2-pro for a new model mid-campaign and policy interpretation changes. Pin.
- Missing post-check on hero assets — prompt passed, output didn't. For production heroes, always run the vision audit.
Verification
Run gen-ai whoami to confirm authentication, then re-run the failed command with --debug.
Commands
# Pre-flight validate a prompt before spending credits
gen-ai validate --model flux-2-pro --file prompt.json
# Gated single generation
gen-ai generate --model flux-2-pro --prompt "$PROMPT" \
--save-to-drive --drive-folder "Gated-Output"
# Gated batch with retry on transient failures only (not violations)
gen-ai batch run campaign.json \
--concurrency 4 --output ./runs/campaign-2026-04
# Flag mode — for internal / draft contexts
gen-ai batch run drafts.json \
--output ./runs/drafts-2026-04
Cost & time
Governance overhead is tiny relative to generation. Pre-flight + post-check adds ~10–15% to credit cost on critical assets, ~0% on non-critical.
| Scenario |
Governance overhead |
| Single gated generate |
+0 credits (policy passed in-call) |
| Single gen + vision audit |
+1–2 credits |
| Batch of 100, pre-flight only |
+~5 credits (text reasoner) |
| Batch of 1,000, full pipeline |
+~50 credits + 1 approver hour |
| Quarterly red-team audit |
~1 engineer-day + ~200 credits |
Violations rejected = credits saved. A single blocked off-brand production asset typically saves multiples of the governor's overhead.
See also
1---2name: enterprise-brand-governor3description: Gate every generation through a brand policy file.4license: MIT5---67# Enterprise Brand Governor89Policy-as-code for AI-generated imagery. Every prompt is pre-validated against `brand.md`, every output is post-checked, violations escalate to a human approver, and every decision is logged. Built for regulated industries and any enterprise where an off-brand asset in production is a material risk.1011---1213## When to Use1415- Multiple teams (marketing, product, sales, agency partners) generating on the same brand system16- Regulated industries (pharma, finance, alcohol, kids) where imagery has legal constraints17- Brand-safety SLA — zero tolerance for competitor logos, restricted props, or off-palette output reaching production18- Agency handoff — external vendor generating on your brand, you need a gate you control19- Pre-production review cycle needs automation; humans only review escalations2021Do **not** use for: quick exploration / mood-board work (gating slows ideation), or accounts without a written brand system yet (build `brand.md` first).2223---2425## Prerequisites2627Before rolling the governor across teams:28291. **Brand system location** — path / repo / URL for `brand.md`. Who owns it? What's the change-control process?302. **Policy strictness** — reject (halt), flag (log + allow), or tier by asset destination (production = reject, internal = flag)?313. **Approval chain** — who reviews flagged items? What's the SLA for escalation turnaround (1h, 24h, 3 business days)?324. **Logging destination** — local `~/.gen-ai/audit/`, S3 bucket, or ship to SIEM (Splunk, Datadog)?335. **Compliance constraints** — GDPR / HIPAA / COPPA / financial-services rules that must be encoded in `brand.md`?346. **Rollback plan** — if the governor blocks a legitimate launch, who has override authority and how is that logged?3536---3738## How to Run3940The governor runs at three checkpoints: prompt, generation, output.41421. **Author `brand.md`** — palette, typography, allowed/denied props, imagery style, voice, regulated-category rules. Versioned in git. Commit SHA is the policy ID.432. **Pre-flight (prompt lint)** — `gen-ai validate` against the prompt before spending credits. Catches banned terms, disallowed concepts, missing required elements (e.g., disclaimer placement).443. **Brand-context generation** — every `gen-ai generate` and `gen-ai batch run` prompt includes the relevant `brand.md` constraints. Review violations during QA.454. **Post-flight (output check)** — for critical assets, a second-pass model (`gemini-3-pro-image` or vision check) verifies the output matches policy. Palette sampling, logo presence detection, prop allow-list.465. **Escalation** — any `violation` status routes to the approver queue. Humans review, approve or reject, decision is logged against the audit ID.476. **Audit export** — daily / weekly export of all decisions to the configured SIEM or compliance archive.4849## Quick Reference5051The governor adds policy metadata to every job record.5253```json54{55 "defaults": {56 "model": "flux-2-pro"57 },58 "metadata": {59 "policy_id": "brand.md@sha:a4f1c9",60 "policy_version": "2.3.0",61 "policy_mode": "reject",62 "approver": "brand-governance@company.com",63 "escalation_channel": "#brand-review",64 "audit_id": "GOV-2026-04-CAMPAIGN-LAUNCH",65 "compliance_tags": ["GDPR", "US-FTC-native-ad"],66 "data_residency": "eu-west-1"67 },68 "jobs": [69 {70 "id": "launch-hero-001",71 "prompt": "Production launch hero. Editorial hero, team of four diverse professionals collaborating, modern office, natural light, brand palette. Apply brand.md constraints and require legal review before publishing."72 }73 ]74}75```7677Record policy decisions in the downstream audit ledger: `approved`, `flagged`, or `rejected` with the reason.7879---8081## Quick Reference8283| Sub-task | Model | Notes |84|----------|-------|-------|85| Prompt compliance check | `gpt-image-1.5` / text reasoner | Cheap pre-flight before image spend |86| Primary generation (brand-safe) | `flux-2-pro` | Strong prompt adherence, commercial-safe |87| Primary generation (product accuracy) | `flux-kontext-pro` | Edit-mode when subject must be preserved |88| Post-generation vision audit | `gemini-3-pro-image` | Strong scene understanding for policy checks |89| Upscale approved outputs only | `topaz-upscale-image` | Never upscale before approval — wastes credits |9091Confirm commercial-use status per provider with `gen-ai models info <id>`. Pharma and financial services should maintain a short allow-list of pre-cleared models.9293---9495## Procedure9697- **Treat `brand.md` as code.** Versioned, reviewed, signed. The file's commit SHA is the policy ID in every audit record.98- **Always pin the model version.** Policy interpretation changes when models change. Pair with `enterprise-pinned-registry`.99- **Pre-flight before spend.** `gen-ai validate` catches 80% of violations for $0.100- **Human-in-the-loop on rejects.** A reject is a business decision, not a tool decision. Route to the approver.101- **Default to reject, not flag.** Flag mode is for drafts only; production must reject.102- **Log everything.** Every prompt, every decision, every override. No silent approvals.103- **Rotate the audit log.** Daily JSONL, shipped off the dev machine. Local logs disappear; SIEM doesn't.104- **Test the governor with adversarial prompts.** Red-team your own policy quarterly — does it actually catch competitor logos, prohibited claims?105- **Document the override path.** There will be legitimate exceptions. Make the override visible, logged, and time-boxed.106107---108109## Pitfalls110111- **`brand.md` too vague** — "use the brand palette" is not enforceable. Hex codes, prop allow-lists, explicit denies.112- **No override path** — legitimate exceptions get bypassed outside the system, breaking the audit. Build the override in.113- **Logs only local** — dev machines die. Ship to SIEM or a durable archive from day one.114- **Flag-mode in production** — "we'll review later" never happens. Default reject.115- **Unaudited model swaps** — someone swaps `flux-2-pro` for a new model mid-campaign and policy interpretation changes. Pin.116- **Missing post-check on hero assets** — prompt passed, output didn't. For production heroes, always run the vision audit.117118---119120## Verification121122Run `gen-ai whoami` to confirm authentication, then re-run the failed command with `--debug`.123124### Commands125126```bash127# Pre-flight validate a prompt before spending credits128gen-ai validate --model flux-2-pro --file prompt.json129130# Gated single generation131gen-ai generate --model flux-2-pro --prompt "$PROMPT" \132 --save-to-drive --drive-folder "Gated-Output"133134# Gated batch with retry on transient failures only (not violations)135gen-ai batch run campaign.json \136 --concurrency 4 --output ./runs/campaign-2026-04137138# Flag mode — for internal / draft contexts139gen-ai batch run drafts.json \140 --output ./runs/drafts-2026-04141```142143---144145## Cost & time146147Governance overhead is tiny relative to generation. Pre-flight + post-check adds ~10–15% to credit cost on critical assets, ~0% on non-critical.148149| Scenario | Governance overhead |150|----------|--------------------|151| Single gated generate | +0 credits (policy passed in-call) |152| Single gen + vision audit | +1–2 credits |153| Batch of 100, pre-flight only | +~5 credits (text reasoner) |154| Batch of 1,000, full pipeline | +~50 credits + 1 approver hour |155| Quarterly red-team audit | ~1 engineer-day + ~200 credits |156157Violations rejected = credits saved. A single blocked off-brand production asset typically saves multiples of the governor's overhead.158159---160161## See also162163- [enterprise-pinned-registry](../enterprise-pinned-registry/SKILL.md) — pin model versions so policy interpretation stays stable164- [product-photo-studio](../product-photo-studio/SKILL.md) — brand-gated catalog pipeline (reshoot mode)165- [enterprise-press-batch](../enterprise-press-batch/SKILL.md) — brand-gated PR pipeline with embargo handling166- [gen-ai-use](../gen-ai-use/SKILL.md) — CLI reference