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

# Policy Profiles

> Use standard or strict profiles to set a consistent threshold without per-run flags.

A policy profile is a named threshold preset stored in `charter.yaml`. Configuring a profile means every invocation of `charter doctor` — on any machine, in any CI run — uses the same threshold without anyone needing to pass a flag.

## Available profiles

| Profile    | Threshold | When to use                                                                                                               |
| ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |
| `relaxed`  | 60        | Repos early in agent adoption that want a gate to clear today and ratchet up over time.                                   |
| `standard` | 80        | Default for most repos. A solid baseline for active development projects progressively adopting agent tooling.            |
| `strict`   | 90        | Security-sensitive repos, production services, or teams that have resolved the common findings and want to hold the line. |

## Setting a profile

```yaml theme={null}
# charter.yaml
policy:
  profile: strict
```

Place `charter.yaml` in the root of your repo. Charter discovers it automatically. With this config, every `charter doctor` invocation gates at 90 — no `--threshold` flag needed.

## Setting an exact threshold

If neither profile maps to the threshold you want, set an explicit numeric value:

```yaml theme={null}
policy:
  threshold: 85
```

You can use `policy.threshold` alongside `policy.profile` if you want to name the intent clearly:

```yaml theme={null}
policy:
  profile: standard
  threshold: 85
```

<Tip>
  When both `profile` and `threshold` are set, `threshold` always wins. The `profile` label becomes documentation only — it has no effect on the gate value.
</Tip>

## Threshold precedence

When multiple threshold sources are present, Charter applies them from highest to lowest priority:

1. `--threshold` flag on the command line
2. `policy.threshold` in `charter.yaml`
3. The default for the configured `policy.profile` (60 for `relaxed`, 80 for `standard`, 90 for `strict`)
4. Built-in default: **80** (when `charter.yaml` is absent or has no policy section)

## Command-line override

Passing `--threshold` at invocation time overrides everything in `charter.yaml`. The config file is not modified:

```bash theme={null}
# Temporarily lower the threshold during a migration
charter doctor --threshold 70

# One-off strict check without changing charter.yaml
charter doctor --threshold 90
```

This is useful for CI jobs that need a different gate than the repo default, or for one-off checks during development.

## Next steps

<CardGroup cols={2}>
  <Card title="charter.yaml Reference" icon="settings" href="/docs/config/charter-yaml">
    The full configuration file, fields, and validation rules.
  </Card>

  <Card title="Run Charter in GitHub Actions" icon="git-branch" href="/docs/how-to/run-in-github-actions">
    Apply a profile-backed gate to every pull request.
  </Card>

  <Card title="GitHub Action" icon="puzzle" href="/docs/ci/github-action">
    How the `threshold` input interacts with profiles.
  </Card>

  <Card title="Scoring and Caps" icon="calculator" href="/docs/concepts/scoring-and-caps">
    What the threshold is gating against.
  </Card>
</CardGroup>
