> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semicola.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Business Rules

> Write what your storefront accepts, choose when a person reviews, and see how your agent applies both.

**AI Business Rules** is where a seller decides two separate things:

1. **What the storefront accepts**: a written acceptance policy in plain language, in two parts,
   **Brief acceptance** and **Creative policy**.
2. **When a person looks first**: two approval gates, one for **creative submissions** and one for
   **new media buys**.

Your storefront agent works inside both. It reads the policy you wrote, not a fixed list of
categories, so a rule such as "no fast-food advertisers during our kids' programming" is honored even
though no dropdown offers it.

<Note>
  Creating or activating a policy needs an account administrator. Other members of the storefront
  can read the active policy and its history but cannot change them.
</Note>

## Two dials, not one

People often mix these up, so keep them apart:

|                         | Acceptance policy                                        | Approval gates                                                     |
| ----------------------- | -------------------------------------------------------- | ------------------------------------------------------------------ |
| **Question it answers** | Is this advertiser, category or creative acceptable?     | Does a person review before a buyer goes live?                     |
| **Form**                | Markdown you write, up to 50,000 characters              | `creativeApproval` and `mediaBuyApproval`, each `auto` or `manual` |
| **Default**             | A conservative starter draft, inactive until you save it | Both `manual`                                                      |

## Setting up your rules

<Steps>
  <Step title="Open the page">
    Ask Semi to "set up rules for my agent", or call `open_business_rules`. The page also renders in
    Claude, ChatGPT and other MCP Apps hosts. The status line tells you what is missing, for example
    "No acceptance policy yet · nothing published to your listing · both gates need review".
  </Step>

  <Step title="Write the policy">
    Choose **Create policy**. Fill in Brief acceptance (the counter shows how much of the 50,000
    character budget you have used) and Creative policy, and add a short revision note. Then choose
    **Save and activate rules**. Each save creates a new, numbered, immutable version and activates
    it in one step.
  </Step>

  <Step title="Decide what buyers see">
    Under **Update disclosures**, choose whether each half of the policy appears on your public
    listing. Buyers' agents can then read it before they brief you.
  </Step>

  <Step title="Set the gates">
    Under **Update gates**, choose **Automatic** or **Review enabled** for creative submissions and
    for new media buys. The collapsed summary confirms the choice, for example "Every media buy
    waits for operator review."
  </Step>
</Steps>

You can also do all of this with one call to `save_business_rules`:

```json save_business_rules theme={null}
{
  "content": {
    "briefAcceptance": "We accept consumer brands in food, beverage, retail and travel.\n\nWe do not accept gambling, tobacco, vaping or political advertising.\n\nFast-food brands need review.",
    "creativePolicy": "No flashing imagery. Alcohol creative must show an age gate. Keep audio under -14 LUFS."
  },
  "notes": "First policy for launch",
  "creativeApproval": "auto",
  "mediaBuyApproval": "manual",
  "advertisingPolicyDisclosure": { "briefAcceptance": true, "creativePolicy": false }
}
```

<Warning>
  If you set both gates to `auto`, no person reviews anything before it runs. The call is refused
  unless it also carries `acknowledgeNoHumanReview: true`, and Semi always asks you to confirm it.
</Warning>

## When your rules are applied

### At discovery

When a buyer's brief reaches your storefront, it is checked against your Brief acceptance policy.
A **confident** conflict returns no products, with a reason the buyer can see that does not reveal
your private policy text. An inconclusive check **fails open**: discovery continues and the brief is
answered normally. This keeps a vague rule from silently turning away good demand.

### When a media buy arrives

With `mediaBuyApproval: manual`, every new buy is screened before it reaches your ad server. First a
deterministic pre-screen compares the submission with the subjects your policy names. Then an AI
**second opinion** reads the policy as prose. The result is one of three verdicts:

| Verdict                              | What happens                                                                                    |
| ------------------------------------ | ----------------------------------------------------------------------------------------------- |
| **Clearly on policy**                | The buy can forward without anyone touching it.                                                 |
| **Needs a look**                     | The buy waits in Approvals & operations. The evidence was thin, or your policy asks for review. |
| **Clearly against an explicit rule** | The buy waits with a strong signal to reject. The buyer never sees your policy text.            |

With `mediaBuyApproval: auto`, buys forward directly and this create-time screen does not run.

### When a creative is submitted

With `creativeApproval: manual`, creatives get the same treatment against your Creative policy and
wait for a decision in Approvals & operations. With `auto`, they are approved on arrival.

## What the agent will never do

* **Approve on its own.** The second opinion can only move a buy from "clearly on policy" to "needs a
  look". It never clears something the pre-screen held.
* **Reject on its own.** Even a clear conflict waits for a person to reject it.
* **Fail open on a buy.** If the AI layer errors, times out or is unsure, the buy stays with you.
* **Change a gate.** Only an administrator changes approval settings.

## Your starter policy

A storefront with no policy yet gets a conservative draft: no category is pre-cleared, every
advertiser, category and creative needs review, and deceptive, illegal, malicious, discriminatory or
impersonating submissions are flagged for rejection. The draft does nothing until an administrator
reviews it and saves it.

## Versions

The page always shows the active version and the full history. You can preview an old version,
reactivate it, or copy it into a new draft. Exactly one version is active at a time, and history is
never rewritten.

<CardGroup cols={2}>
  <Card title="Demand inbox & proposal pass" icon="inbox" href="/sell/demand-inbox">
    See how your agent answered each brief under these rules.
  </Card>

  <Card title="save_business_rules reference" icon="toolbox" href="/v3/tool-catalog">
    The exact input fields and constraints.
  </Card>
</CardGroup>
