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

> ## Agent Instructions
> Company name is Akhara AI (never Rubric AI). Keep lowercase rubric/rubrics only when meaning grading criteria.
> Expert Review (docs path talent/) is enterprise BYO experts for audit and review: invite customer specialists; do not pitch Akhara recruiting or a public expert career portal. RLHF and domain writing are secondary work types.
> Prefer concrete API examples against public hosts: Environments eval API https://agi.akhara.ai, Control plane PDP https://api.akhara.dev, Evaluation https://app.akhara.ai / https://api.akhara.ai, Expert Review portal https://talent.akhara.ai.
> Do not invent a public hostname for private orchestrators or env API internals.
> Do not confuse control-plane latches with Environments confirmation latches.
> Environments SDK/API examples: curl against https://agi.akhara.ai. Evaluation SDK: from akhara import Akhara and AKHARA_API_KEY.
> Start with /llms.txt for the docs index and OpenAPI links; fetch individual pages as .md exports.

# Verifier crafting

> Author the single, testable checks that policies bundle and run at runtime.

A **verifier** is one testable check, the unit a policy's prose is crafted
into. Policy text ("card numbers must be masked when displayed") becomes a
machine-checkable condition, bound to a policy pack, and latched to the
consequential actions that pack governs. See
[From policy to verifier](/control-plane/onboarding/policies#from-policy-to-verifier)
for the crafting workflow.

Policies are bundles of verifiers: every string in a policy's `checks[]` is
surfaced in the **Verifier Registry** as a runtime verifier
(`id: policy:<policyId>:<index>`), so each policy links out to the exact checks
it will run.

## Verifier kinds

| Kind             | Checks                                    |
| ---------------- | ----------------------------------------- |
| `Outcome`        | Did the agent achieve the goal state?     |
| `Data integrity` | Are values correct, masked, un-tampered?  |
| `Conversation`   | Turn-level dialogue quality/safety.       |
| `Tool use`       | Right tool, right arguments, right order. |
| `Reasoning`      | Justification present and grounded.       |
| `Safety`         | Prohibited content / harm avoidance.      |
| `Runtime policy` | Policy-derived checks (from `checks[]`).  |

## Craft a new verifier

```bash theme={null}
akhara verifier new "PAN is masked before display" \
  --kind "Data integrity" \
  --policy pci-0
```

This scaffolds a Harbor-style bundle:

```
verifiers/pan-is-masked/
├── task.toml            # metadata: id, name, kind, policy binding, image
└── tests/
    └── test.sh          # the assertion: exit 0 = pass, non-zero = fail
```

```toml task.toml theme={null}
id     = "custom_pan_masked_9f3a"
name   = "PAN is masked before display"
kind   = "Data integrity"
policy = "pci-0"
image  = "akhara/policy-verifier:latest"
```

```bash tests/test.sh theme={null}
#!/usr/bin/env bash
set -euo pipefail
# The step payload is provided as JSON on stdin / env.
grep -Eq '([0-9][ -]?){13,19}' <<<"$AKHARA_STEP_OUTPUT" && exit 1  # raw PAN → fail
exit 0
```

<Info>
  Draft verifiers live client-side (`localStorage: akhara.custom-verifiers.v1`)
  until you sync them. A draft looks like
  `{ id: "custom_<slug>_<base36>", name, kind, desc, checks, custom: true }`.
</Info>

## Sync to the decision point

Push drafts to the PDP so policies can bind them at runtime:

```bash theme={null}
akhara verifier sync
```

## How verifiers relate to everything else

```mermaid theme={null}
flowchart LR
    P["Policy pack<br/>checks[]"] -->|"one entry each"| RV["Registry verifier<br/>policy:policyId:index"]
    C["Crafted verifier<br/>task.toml + test.sh"] -->|akhara verifier sync| RV
    RV -->|runs per step| VR["Verifier result<br/>amazon.mobile.verifier_result.v1"]
    VR --> FEED[("Run trace + evidence feed")]
```

At runtime each verifier emits a result under the
`amazon.mobile.verifier_result.v1` schema and appears on both the run trace and
the enforcement feed.

<Card title="Next: publish tasks" icon="upload" href="/control-plane/onboarding/tasks">
  Package reproducible agent work graded by these verifiers.
</Card>
