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

# Agent rule

> Copy this playbook into any coding agent so it certifies through Verdikt correctly.

Use this rule with **Cursor**, **Claude Code**, **Windsurf**, or any MCP-connected agent. It is host-agnostic — install it wherever your agent reads project instructions.

## Where to install

| Agent / IDE      | Typical location                                                |
| ---------------- | --------------------------------------------------------------- |
| **Cursor**       | `.cursor/rules/verdikt.mdc` (create `.cursor/rules/` if needed) |
| **Claude Code**  | `CLAUDE.md` or project-level instructions                       |
| **Other agents** | `AGENTS.md`, custom system prompt, or team runbook              |

<Note>
  **`@useverdikt/mcp`** already ships server `instructions` for connected agents. This project rule reinforces **`release_brief`** when the gate is blocked — especially in IDEs that also use `.cursor/rules` or similar.
</Note>

## Rule (copy below)

For **Cursor**, save as **`.cursor/rules/verdikt.mdc`**. For other agents, copy the body (you may omit the YAML frontmatter between the `---` lines).

```md theme={"dark"}
---
description: Certify GitHub PRs through Verdikt before merge — label trigger, signals, check_gate.action, release_brief, escalate
alwaysApply: false
---

# Verdikt agent playbook

Verdikt is the **trust layer between AI agents and production**. It certifies **signal metrics vs thresholds** for a specific **commit/PR** — it does not review git diffs.

## Production flow (preferred)

1. Open or update a PR on a GitHub repo connected in **Settings → Release Trigger**.
2. Apply label **`verdikt:rc`** (or configured label) → Verdikt opens a cert window for `commit_sha` + `pr_number` and **auto-pulls connected integrations**.
3. Signals arrive from integrations (Braintrust, BrowserStack, Sentry, Datadog) or **`post_signals`** / MCP with real CI output — do **not** invent values. No manual `sources/pull` needed after label.
4. Call **`check_gate(release_id)`** (workspace default mode in Settings → Governance; use `mode: strict` when in doubt).
5. Read **`action`**:
   - **`merge`** — merge/deploy allowed (`gate.exit_code === 0`)
   - **`self_heal`** — fix code, re-run evals/CI, post missing signals, check again
   - **`recover_certification`** — remediation debt blocks non-emergency merge; ship clean CERTIFIED to prod or use corroborated `incident_hotfix`
   - **`escalate`** — call **`escalate`** with reason + `blocking_signals`; human reviews **Escalations** inbox
6. When **`action` is not `merge`** and you need context (why blocked, what to do next), call **`release_brief(release_id)` once** — read `top_blockers`, `regression_story`, `gate_action`, and `suggested_verb`. Do **not** poll **`check_gate`** alone while debugging a block.

## MCP alternative (when not using label)

Use **`create_release`** with GitHub identity — always include:

- `commit_sha` (PR head SHA)
- `pr_number`
- `github_owner`, `github_repo`, `github_branch`
- `version` (e.g. PR title)

Repeat with same SHA returns `reused: true` — same cert window.

## Do not

- Open releases with bare version strings in production (demo only).
- POST signals from GHA unless you have metrics with no integration source.
- Merge when `action` is not `merge`.
- Poll **`check_gate`** repeatedly when blocked — use **`release_brief`** for narrative context, then act or escalate.
- Use API keys for human control-plane actions (thresholds, overrides) — escalate instead.

## MCP tools

`create_release` → `post_signals` → `check_gate` → if not `merge`: **`release_brief`** → fix | **`escalate`** | merge

Pass **`session_id`** per agent execution for audit attribution, or use the **`agent_session_id`** returned from **`create_release`**.

Config: [MCP setup](/agent/mcp-setup) and **Settings → Agent access** in the Verdikt app.
```

See also [MCP setup](/agent/mcp-setup) and [@useverdikt/mcp on npm](https://www.npmjs.com/package/@useverdikt/mcp).
