Rules reference
Rules are checks every change goes through. Each finding carries the rule’s action, and the findings decide the change’s risk.
Settings every rule has
| Setting | Meaning |
|---|---|
action | flag = medium risk; require_approval = high risk, always waits for a person; block = critical, never applied. |
contentTypes | Limit the rule to these content types. Empty = all types. |
enabled | Switch a rule off without deleting it. |
Field patterns
Fields are dot paths. * matches one segment, ** any number, and * inside a segment matches part of a name. A pattern also matches everything below it.
price: the top-level price field and anything inside it**.price: a price field at any depthvariants.*.price: the price of every variant**.legal*: any field whose name starts with “legal”
Rule types
Protected fields protected_fields
Fires when a change touches any field matching the patterns.
fields: Field patterns, e.g. slug, **.legal*, variants.*.price
Example: Legal and slug fields need approval.
Numeric limits numeric_change
Checks numbers in matching fields: percentage rises and falls, and absolute minimum and maximum. Also fires if the field is removed or stops being a number.
fields: Field patterns, e.g. **.price, **.regular_pricemaxIncreasePct / maxDecreasePct: Largest allowed rise or fall in percentminValue / maxValue: Allowed range for the new value
Example: Price changes over 20% need approval; price drops over 30% are blocked.
Banned phrases banned_phrases
Fires when a change adds a listed phrase (whole words, any whitespace between words). Only new text counts, so existing copy doesn’t trigger it again.
phrases: List of phrasescaseSensitive: Default off
Example: “guaranteed”, “risk-free”, “clinically proven” need approval.
Deletions content_deletion
Fires on any delete, and on updates that remove a top-level field.
Example: Deletions need approval.
Large rewrites large_rewrite
Fires when more than a set share of a text field’s words is changed.
maxChangedRatio: 0–1, e.g. 0.6 = 60% of the wordsminWords: Ignore fields shorter than this (default 20)
Example: Flag rewrites of more than 60% of any field over 40 words.
Allowed link domains link_domains
Fires when a change adds a link to a domain not on the list. Subdomains of listed domains are allowed.
allowedDomains: e.g. example.com, docs.example.com
Guarded content types content_types_guarded
Fires on any change to the content types the rule is limited to (set with contentTypes).
Example: Any change to legal pages or pricing tables needs approval.
Injected code and hidden content unsafe_markup
Fires when a change adds scripts, inline event handlers, javascript: links, forms, meta or base tags, hidden text, obfuscated code, or iframes from domains not on the list. This is how prompt-injected agents and compromised accounts usually plant spam and malware.
allowedEmbedDomains: Domains allowed in iframes, e.g. youtube.com, vimeo.com
Example: Block, with YouTube and Vimeo embeds allowed.
EU 30-day “was” price price_reference
When a product goes on sale, the crossed-out reference price must be the lowest price of the last N days (EU Omnibus Directive). Uses price history recorded by the WordPress plugin for WooCommerce.
referenceField: Default regular_pricesaleField: Default sale_pricedays: Default 30
AI policy ai_policy
A plain-language policy checked by an AI model, e.g. “No medical claims”. Only the proposed change is sent, not the whole page. Requires the AI judge to be configured (the Vercel AI Gateway).
instruction: The policy in plain words
Example: Flag content that promises investment returns or omits material risks.
Rule packs
- Essentials: deletions, injected code, price changes over 20%, legal and slug fields, large rewrites, risky marketing claims.
- E-commerce: price drops over 30% blocked, price changes over 10%, EU 30-day “was” price, discounts over 40%, scarcity and superlative claims.
- Financial services: promissory claims blocked, protected disclosures and rates, a “fair and balanced” AI policy.
- Health and wellness: medical claims and an AI policy for unqualified health claims.
Phrase lists are starting points, not legal advice. Review them with your compliance team.
Agents read the rules first
The get_rules tool gives agents every enabled rule in plain language, along with field notes you write (“price = regular price; use salePrice for sales”). With check_change they can dry-run a change and fix it before proposing, so fewer changes reach your inbox.