# Your own rules

> Make a check stricter or gentler, within the stores' floors.

Every release is checked against the stores' style guides and a set of audio, artwork and name checks. In the console,
**QC rules** lists all of them in plain words, with how each one looks (exact, reads with AI, measures the audio, reads the cover
or matching) and, where one is not in use, why and how to have it. You can switch a check off, choose what happens when it fires,
change its numbers, and add rules of your own. **Approved names** holds the artists and labels you may release, and names a person should look at.

## Who sets the rules

- **You deliver your own releases.** You set your own rules above the stores' minimums. wavbee's delivery requirements (writers,
  credits, dates, files) are optional: switch them on under QC rules.
- **wavbee delivers your releases.** wavbee's rules apply and are locked. You can add to them or be stricter, never looser:
  every check wavbee uses stays on (one it does not use you may switch on), what it does can only become stricter, a number can only move to the stricter side, and the account
  trust scores can only go up. wavbee's delivery requirements are always checked.

Either way some things never change: covers under 1,400 px, audio under 44.1 kHz or 16-bit, files that are not lossless, covers
that are not square, and well-known artists' names, which a person always checks.

## What happens when a check fires

| In the console | `severities` | What it means |
|---|---|---|
| Note it | `warn` | Shown, and the release goes on. |
| Ask the artist | `clarify` | The artist is asked; their answer decides. |
| Send to a person | `manual_review` | A reviewer decides. |
| Refuse | `fail` | It must be put right first. |

Checks that read a title or a cover with AI can ask or send to a person. They refuse only where the store's own rule does.

## Rules of your own

Under **Your own rules**, *Add a rule* makes one of two kinds. It is checked from the next release on, in the live check of the
release builder and on every release sent.

**An exact rule** looks at one field of the release and compares it. It costs nothing and gives the same answer every time.

| It can be about | It can look for |
|---|---|
| Titles, versions, artists, any credited name, record label, genre, languages, copyright owner, barcode, ISRC, track origin | Contains or does not contain any of these words; is or is not one of; starts or ends with; is empty or filled in; longer or shorter than |
| Release date | Fewer or more days away than; empty or filled in |
| Number of tracks, track length | Less or more than; shorter or longer than |
| Explicit, instrumental, Various Artists, released before | Yes or no |
| Stores, territories | Include or do not include; none chosen; worldwide or limited |

Capitals, accents, spaces and quotation marks make no difference, and “whole words only” keeps “art” from being found in “party”.
A rule that is not “is empty” says nothing about an empty field. You choose what happens (note it, ask the artist, send to a person
or refuse) and write what the artist reads. When it asks, the artist can change the field, or say it is correct as submitted, which
sends the release to a person. Where no change could settle it, only that is offered. A rule that could not be checked (a release with
far more names than any store takes, say) is recorded as not run, and unless it only leaves a note the release goes to a person. *Try it* says how many of your last 25 releases the rule would have caught, before you save it.

**A written rule** is one sentence, read with AI. It can leave a note, ask, or send to a person, and never refuses a release. Those in
your [rulebook](https://activqc.wavbee.com/docs/rulebook.md)'s documents are listed too, and changed there.

Each rule can be changed, switched off and deleted. A release already checked keeps the rule as it was. You can have 100 exact rules;
how many written ones is on the page. Where wavbee delivers your releases your own rules only add to wavbee's, and any rule wavbee
added is shown as set by wavbee.

In the API a finding of an exact rule carries an id of its own (`OR-1`, `OR-2` …; wavbee's are `WR-…`), what the artist reads as
`statement`, `"source": "Your rulebook"`, and the rule as it was in `evidence.own_rule`.

## Saving

A change applies to new checks. Releases already checked keep their result. The page keeps a history of who changed what, and
a check can go back to the standard on its own or all together.

## Approved artists and labels

A main artist who is not an approved artist is asked about, and so is a record label that is not an approved one. While both
lists are empty nobody is asked, unless you switch the check on yourself. A well-known artist's name goes to a person whether
or not the lists are empty; when wavbee delivers, an approved artist of that name still does until wavbee approves it.

Add names in the console (typed, or a CSV file with one name in each row) or with the API:

```bash
curl https://your-host/v1/roster -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "artist", "names": ["Maya Ocean", "Aruvi"] }'
```

`kind` is `artist`, `label` or `high_profile`. `GET /v1/roster` lists the names and `DELETE /v1/roster/{id}` removes one.

## One run with other settings

Your server can send `config` with a run, a draft or a live check. It is merged over your saved rules.

```json
{
  "tier": 2,
  "config": {
    "thresholds": { "audio.edge_silence.leading_fail_s": 6, "audio.true_peak_dbtp_max": -1.5 },
    "checks_enabled": { "C1": false },
    "severities": { "T6": "clarify" }
  },
  "release": { "…": "…" }
}
```

`profile` picks the style guide for that run (`apple`, or `spotify` for Apple Music's with Spotify's on top). Without one, your
default style guide is used. Whether wavbee's delivery requirements apply is your account's setting: `config` cannot switch
them on or off.

A `config` is refused with `422 config_hard_floor`, and `field` names the setting, when it:

- goes below a store minimum, or switches off a check that never switches off;
- is looser than wavbee's rules, when wavbee delivers your releases;
- is not a setting: a number that is not one, a severity or a switch we do not know;
- is sent by an account that has no rule settings of its own. Saved settings are then ignored too.

A run that was already accepted is never refused later: if your rules changed in between, the stricter value is used.

The full list of rules and their thresholds is in the [API reference](https://activqc.wavbee.com/docs/api-reference.md).
