# Human Touch

Human Touch is a pool of paid human reviewers that you can call like a tool. You send tasks, humans answer within minutes to hours, and you get structured results with an agreement score.

- MCP server: `https://humantouch.data-clerk.com/mcp`. Tools: `task_kinds`, `ask_human`, `quote_task`, `place_order`, `check_order`, `collect_order`, `ack_order`, `upload_image`, `request_approval`, `balance`.
- REST API: `https://humantouch.data-clerk.com/api/v1`, with `Authorization: Bearer ht_…`.

## Getting access

Set yourself up. Your human only approves once in the browser: they sign in, set a spending cap and click Allow. Pick the first that applies. Never ask your human to paste a key into the chat if another option works.

1. **MCP tools already available** (`ask_human` etc.): just use them. If a call says authorization is required, your MCP client starts OAuth and your human approves in the browser.
2. **Key file exists**: `~/.config/humantouch/api_key`. Send it as `Authorization: Bearer $(cat ~/.config/humantouch/api_key)`.
3. **You can make HTTP requests** (any coding agent): use device login.
   1. `POST /api/v1/auth/device` with `{"client_name": "<your name>"}`.
   2. Show your human `verification_uri_complete` and `user_code`: they open it, log in, set a cap and approve.
   3. Poll `POST /api/v1/auth/device/token` with `{"device_code": "…"}` every `interval` seconds. HTTP 202 means keep waiting.
   4. Save the returned `api_key` (it is shown once) to `~/.config/humantouch/api_key` with mode 600, or to your secrets store.
4. **You are Claude Code** and want the MCP tools for later sessions too: run `claude mcp add --transport http --scope user humantouch https://humantouch.data-clerk.com/mcp` (no key needed, OAuth runs on first use). The tools appear after Claude Code restarts, so tell your human, and use device login (3) until then.
5. **You are a chat app without shell or HTTP** (Claude.ai, ChatGPT, …): ask your human to add the connector `https://humantouch.data-clerk.com/mcp` in the app's connector settings (Claude.ai: Settings → Connectors → Add custom connector). OAuth runs on first use.

Full API reference: `https://humantouch.data-clerk.com/llms-full.txt`.

## When to call a human

Call a human when a wrong answer would cost more than about $1 and a minute of waiting:

1. **Before acts you can't undo, or that others will see**: send, pay, delete, publish, deploy, merge. Use `approve_action`.
2. **When your confidence is low**: you'd guess on a label, or two options look equally good. Use `choose` or `compare`.
3. **When the answer is a matter of taste or culture**: is a name embarrassing in Polish, which headline is better, does this sound robotic. Use `ask`, `compare` or `rate`.
4. **When it needs the real world**: does the page show this price in Germany (`verify_web` with `skill: country:xx`), can a new user actually sign up (`usability`).
5. **When the text is in a language you can't verify**, or will be published. Use `native_check` (translations) or `proofread`.
6. **For evals and data**: grade your outputs, build gold answers and labels. Use `rate`, `rank`, `span_tag`, `annotate`, or `ask`.
7. **Before you ship what you generated**: facts (`fact_check`), code (`code_review`), screens (`ui_review`), extracted data (`doc_fields`), audio (`media_review`).

Do **not** call a human for things you can verify yourself (run the tests, read the docs, fetch the page).

## How to call

1. If you haven't yet in this session, call `task_kinds` once to get the schemas and prices.
2. Batch all your tasks into **one** `ask_human` call: `items[]`, each with `kind`, `spec`, `ref`, and optionally `skill`.
3. Budget:
   - If your human gave you a budget, pass `max_coins` (1 coin = $0.01). The order is placed at once if the price fits.
   - Otherwise show `quote.summary_for_human`, wait for their OK, then call `place_order`.
   - If the quote says `needs_limit_approval` (or `place_order` fails with "spending cap"), the price is above what your connection may spend. Call `request_approval` with the `quote_id`, show your human `message_for_human` with `approval_url`, and call `request_approval` again with `wait_seconds: 50` until it's `approved`. Then call `place_order`. Their limits stay the same. Never split an order to get under the limit.
4. Waiting:
   - Follow `wait_plan`. Don't block the conversation: tell your human the ETA, keep working on other things, then call `check_order` with `wait_seconds: 50` until `ready`.
   - If you can't keep running, save `order_id` in memory or notes and check later.
5. Call `collect_order`, then `ack_order`.

## Reading results

`items[].result` = `{answer, agreement, notes}`. `agreement` (0–1) is how much the people agreed.

| agreement | What to do |
|---|---|
| ≥ 0.8 | Act on `answer`. |
| 0.5–0.8 | Act carefully: mention the split to your human, read `notes`. |
| < 0.5 | Don't act. Escalate to your human, or re-ask with a clearer `spec`. |

- `approve_action`: act only if `answer.decision == "approve"`. If it's `"edit"`, use `answer.edited` instead of your version. If it's `"deny"`, stop and tell your human the `reasons`.
- Text kinds return `final` (or `final_json`) plus per-sentence `changes`. Apply them in one pass:
  - Replace your text by `ref` with the final version.
  - You may fix leftover typos and broken formatting (markup, spacing, quotes, placeholders). When you do, carry the checkers' style (word choice, tone, punctuation) through the whole text, not just the lines they touched, so it reads as one voice.
  - Don't nitpick or second-guess their wording, and don't re-ask about small choices. Native speakers made those calls.
  - Show your human the final updated text once, not a list of diffs or questions about each change. Mention only real problems, like a lost placeholder.

## Writing good tasks

- Make each `spec` self-contained: the reviewer sees only the item (plus `context` and screenshots), never your conversation.
- Use `context` for the purpose, audience and constraints.
- Ask one question per item, with concrete options. Don't ask "is this good?"; ask "would you open this email: yes / no".
- For UI, designs, pages or documents, attach screenshots with `upload_image`, then pass `images: [{id, caption}]`. `doc_fields`, `annotate` and `ui_review` require images; `media_review` requires one audio or video file (same upload). See Screenshots below.
- Use `skill` to target people:
  - `lang:de` for native German speakers
  - `country:us` for people living in the US
  - `code:go`, `domain:legal`, `device:ios` for other expertise
  - Narrower skills mean slower answers.
- Use `sla_seconds < 900` only when truly urgent. It doubles the price.

## Screenshots

Take them yourself, using the first tool you have:

1. Playwright MCP: `browser_resize` to 1280×800, then `browser_take_screenshot` with a `filename` (an element, or `fullPage`).
2. Playwright CLI: `npx -y playwright screenshot --viewport-size="1280,800" <url> shot.png` (add `--full-page`, or `--device="iPhone 13"`).
3. Headless Chrome: `google-chrome --headless=new --window-size=1280,800 --screenshot=shot.png <url>`.
4. Other tools (shot-scraper, simulators, OS screenshot tools), or ask your human.

Keep them cheap:
- Use width 1280 at scale 1; images are stored at most 1600 px wide.
- Capture only the part that matters.
- Upload with `upload_image` and its `curl` command, never as base64 in your context.
- Put shared screenshots in the top-level `images`.

Screenshots are not redacted: use test data and hide personal details. Details: `references/screenshots.md`.

## Privacy (important)

- Reviewers never see who you or your human are.
- Before any human sees your content, these are replaced with placeholders like `⟦EMAIL_1⟧`, and restored in your delivery:
  - emails, phone numbers, card numbers, IBANs, IP addresses
  - tokens and API keys, secrets in URLs, wallet addresses
- **Names of private people and street addresses are NOT reliably detected.** Replace them yourself with `⟦NAME_1⟧`, `⟦ADDRESS_1⟧` before sending, and map them back afterwards.
- Send the minimum. Never include passwords, health or financial records, or customer lists unless the task truly needs them.
- `pii: "share"` (unredacted) works only if the account owner opted in in the wallet. Never ask for it unless your human says so.
- Model training is a separate opt-in in the wallet (off by default). Only redacted orders placed while it's on are kept, without account identity.

## Not allowed

Don't send these. They are rejected and can get the key suspended:

- CAPTCHA solving
- account, phone or KYC verification for you
- fake reviews, likes or votes
- collecting personal data about people
- harassment, illegal or sexual content involving minors
- links to malware, phishing, downloads, or pages that ask reviewers to log in, pay or enter data

For `verify_web` you must set `attest_safe: true`, which confirms you checked the URL is a safe public page. URLs are screened with Google Web Risk; a malicious URL **suspends the account immediately**. Reviewers can also report harmful pages, and confirmed reports ban the requester.

## Kinds at a glance

| kind | what humans do |
|---|---|
| `approve_action` | approve / edit / deny something you're about to do |
| `choose` | pick one or more labels/options |
| `rate` | score on rubric criteria (1–5) |
| `compare` | pick the better of A vs B (randomized sides) |
| `ask` | answer a free question, optionally into a typed `answer_schema` |
| `verify_web` | open a public URL, answer, quote what they saw |
| `span_tag` | mark and label spans in a text (hallucinations, entities) |
| `fact_check` | research claims, verdict + source URL |
| `rank` | order 3–10 options best → worst |
| `doc_fields` | check extracted fields against a document image |
| `annotate` | boxes/points on images |
| `ui_review` | tap visual bugs on UI screenshots |
| `media_review` | audio/video: pick, fix transcript, timestamp marks |
| `code_review` | review a diff with line comments |
| `usability` | try a task on your site, time + ease + screenshots |
| `native_check` | a native checker fixes a translated text/HTML/JSON, a native reviewer approves it |
| `proofread` | fix grammar and style in an original text |

See `references/kinds.md` for specs and examples, `references/recipes.md` for ready-made patterns, and `references/screenshots.md` for taking screenshots.

---

# API reference

Human Touch = real humans check what your agent can't be sure of: approve risky actions, label, rate, compare, answer questions, check web pages, and native-speaker checks of texts. Access: MCP clients connect with OAuth (your human approves in the browser); without OAuth, POST /api/v1/auth/device, show your human the link, poll /api/v1/auth/device/token for an API key. It is asynchronous (minutes to hours). 1) Pick a kind (GET /api/v1/kinds or MCP task_kinds) and put ALL tasks into one request: items[] with kind, spec, optional skill (general, lang:de, country:us, code:go, domain:legal, device:ios) and ref. Text kinds (native_check, proofread) take target_lang + content instead of spec and are priced per span (a sentence or UI string; long ones count per 25 words; repeats from your earlier orders are free). Kinds with needs (doc_fields, annotate, ui_review: images; media_review: one audio/video file) require uploads in items[].images. 2) If your human gave you a budget, call ask_human (POST /api/v1/ask) with max_coins: it quotes and orders in one step when the price fits. Otherwise POST /api/v1/quotes, show summary_for_human, and after approval POST /api/v1/orders {quote_id}. If a quote has needs_limit_approval (above the spending limit your human set for you), call request_approval (POST /api/v1/quotes/{id}/approval), show your human the approval_url, wait until approved, then order; never split orders to fit a limit. 3) Follow wait_plan: wait until check_after, then poll GET /api/v1/orders/{id}?wait=50 (long-poll) until ready=true. 4) GET /api/v1/orders/{id}/delivery: items[].result has answer and agreement (0-1, how much the people agreed; any votes in answer are shares 0-1); text kinds return final text. 5) POST /api/v1/orders/{id}/ack. Privacy: emails, phones, card numbers, IBANs, IPs and secrets are replaced with placeholders like ⟦EMAIL_1⟧ before any human sees them and restored in your delivery; still, never send private data you don't need to. Reviewers never see who you are. verify_web needs spec.attest_safe: true (you vouch the URL is a safe public page); URLs are screened with Google Web Risk and a malicious URL suspends the account at once. Not allowed: CAPTCHA solving, fake reviews/votes, account or KYC bypass, collecting data about people, harassment, illegal content. Prices are coins (1 coin = $0.01). Orders may take the balance down to -$10; while it is below zero, new tasks wait until your human tops up.

## Access
Coins are topped up by the human at https://humantouch.data-clerk.com/wallet (1 coin = $0.01). Ways to get access, each with daily/total spending caps set by the human:
- MCP clients: OAuth 2.1 with PKCE and dynamic client registration; the client opens a browser and the human clicks Allow. Metadata: `https://humantouch.data-clerk.com/.well-known/oauth-authorization-server`.
- Device login (no OAuth): `POST https://humantouch.data-clerk.com/api/v1/auth/device {client_name}` → show the human `verification_uri_complete` → poll `POST https://humantouch.data-clerk.com/api/v1/auth/device/token {device_code}` every `interval` s (202 = keep waiting) → `api_key`, shown once.
- API key created by the human in the wallet.

Send `Authorization: Bearer ht_…` on every call. Every response, including errors, has `how_to` and `next`.

## Endpoints
- `GET https://humantouch.data-clerk.com/api/v1/kinds`: task kinds with spec schema, prices, examples; skills; privacy rules (no auth)
- `POST https://humantouch.data-clerk.com/api/v1/ask`: like quotes, plus `max_coins` (and `callback_url`): orders immediately if the price fits and the balance suffices; otherwise returns the quote with `needs_human_approval`
- `POST https://humantouch.data-clerk.com/api/v1/quotes`: price and ETA, no charge. Body `{agent, context, pii, images, items: [{ref, kind, spec, skill, sla_seconds, context, images}]}`
- `POST https://humantouch.data-clerk.com/api/v1/quotes/{id}/approval?wait=50`: when a quote has `needs_limit_approval` (price above the key's spending limit): asks the human to approve this one order; returns `approval_url`, `message_for_human` and `status` (pending, approved, declined); call again to poll
- `POST https://humantouch.data-clerk.com/api/v1/orders` `{quote_id, callback_url?}` with an `Idempotency-Key` header: charges and starts; returns `order_id`, `check_after`, `wait_plan`
- `GET https://humantouch.data-clerk.com/api/v1/orders/{id}?wait=50`: status; `wait` long-polls up to 55 s
- `GET https://humantouch.data-clerk.com/api/v1/orders/{id}/delivery`: `items[]` with `ref`, `kind`, `result` (or `final` for text kinds) and provenance; 409 while not ready
- `POST https://humantouch.data-clerk.com/api/v1/orders/{id}/ack`: confirm receipt, starts retention (30 days)
- `POST https://humantouch.data-clerk.com/api/v1/images`: upload a screenshot (raw PNG/JPEG/WebP bytes, multipart `file`, or JSON `{data_base64}`, max 10 MB) → `image_id`; use in `items[].images: [{id, caption}]`
- `GET https://humantouch.data-clerk.com/api/v1/wallet`: balance and top-up link
- `POST https://humantouch.data-clerk.com/mcp`: MCP (streamable HTTP)

```
claude mcp add --transport http humantouch https://humantouch.data-clerk.com/mcp
curl -fsSL https://humantouch.data-clerk.com/skill/install.sh | bash
```

## Waiting without a runtime
```
until curl -sf -H "Authorization: Bearer $HUMANTOUCH_KEY" "https://humantouch.data-clerk.com/api/v1/orders/ID?wait=50" | grep -q '"ready":true'; do sleep 10; done
```
Webhook alternative: `callback_url` receives `POST {event: order.ready, order: delivery}` signed with `X-HumanTouch-Signature: sha256=HMAC(webhook_secret, body)`.

## Errors
401 bad key · 402 insufficient balance or key cap · 403 pii share without consent · 409 not ready · 410 deleted after retention · 422 invalid input (message says what to fix).

## Languages for native checks
`lang:en` English, `lang:es` Español, `lang:de` Deutsch, `lang:fr` Français, `lang:pt` Português, `lang:it` Italiano, `lang:pl` Polski, `lang:uk` Українська, `lang:zh` 简体中文, `lang:ja` 日本語

---

# Human Touch task catalog

Live schemas and prices are at `GET /api/v1/kinds` (MCP: `task_kinds`). This file maps real needs to kinds.

## Live kinds

### approve_action

A human approves, edits or denies an action before you take it.

- `spec`: `action` (required, one line), `details`, `diff`, `risk` (low|medium|high), `rule` (all|majority)
- `result.answer`: `{decision: approve|deny|edit, edited?, reasons[]}`
- `rule: all` (the default) approves only if everyone asked approves; any deny wins.
- Reviewers are adults only.

### choose

Humans pick one label, or several when `multi` is set.

- `spec`: `question`, `options` (2–20), `content`, `multi`
- `result.answer`:
  - single: `{choice, index, votes[]}`
  - multi: `{choices[], votes[]}`

### rate

Humans score content on criteria.

- `spec`: `question`, `content`, `criteria` (`[{id, label, min, max}]`, default overall 1–5)
- `result.answer`: `{scores: {id: median}, comments[]}`

### compare

Humans pick A or B. Sides are randomized per reviewer.

- `spec`: `question`, `a`, `b`, `no_tie`
- `result.answer`: `{winner: a|b|tie, votes, reasons[]}`

### ask

Humans answer a free question, optionally typed.

- `spec`: `question`, `content`, `answer_schema` (`{properties: {name: {type: string|number|integer|boolean, enum?, description?, minimum?, maximum?}}, required[]}`, max 8 fields), `max_chars`
- `result.answer` holds one value per field:
  - majority for enums, booleans and short strings
  - median for numbers

### verify_web

A human opens a public URL and answers.

- `spec`: `url`, `question`, `checklist[]`, `attest_safe: true` (required)
- `result.answer`: `{verdict: yes|no|unsure|cant_access, answer, quotes[], checks[]}`
- Use `skill: country:xx` to get reviewers in a specific country.
- Reviewers are adults only.
- **URL rules:**
  - https only, on the default port
  - a public domain name: no IP addresses, localhost or internal hosts
  - no credentials in the URL, no link shorteners, no file downloads
- **`attest_safe: true` is your statement** that the URL is a normal, safe page: no malware, phishing, login or payment traps, tracking aimed at reviewers, or illegal content. The account owner is responsible for it.
- Every URL is checked against Google Web Risk at quote time. A malicious URL **suspends the account immediately**: API keys are revoked and open tasks stop. Only send URLs you have verified yourself.

### span_tag

Humans select parts of a text and label them.

- `spec`: `content`, `labels[]` (1–12), optional `question`
- `result.answer`: `{spans: [{start, end, label, text, votes}]}`, offsets in Unicode code points; only spans marked by a majority
- Use for hallucination spotting (labels like `unsupported`, `wrong`), entities, PII or policy violations.

### fact_check

Humans research each claim on the web.

- `spec`: `claims[]` (1–10, one self-contained claim each), optional `sources[]` as hints
- `result.answer`: `{claims: [{claim, verdict: true|false|misleading|unverifiable, votes, sources[], notes[]}]}`
- Every verdict except `unverifiable` comes with a source URL. Price is per claim.

### rank

Humans order 3–10 options, best first. Options are shuffled for each reviewer.

- `spec`: `question`, `items[]`
- `result.answer`: `{ranking: [{index, item, score}]}` (Borda count)

### doc_fields

Humans compare the values your agent extracted with the document image and fix them.

- Needs at least one image of the document in `images[]`.
- `spec`: `fields: [{name, value}]` (1–30), optional `question`
- `result.answer`: `{fields: [{name, status: ok|fixed|missing, value}], wrong: [names]}`

### annotate

Humans draw boxes or points on your images and label them.

- Needs images.
- `spec`: `question`, `labels[]`, `shape: box|point` (default box), `max_marks` (default 20)
- `result.answer`: `{marks: [{img, label, x, y, w, h, votes}]}`. Coordinates are 0–1 relative to the image; `img` is the index in `images[]`. Only marks made by a majority are kept.

### ui_review

Humans tap visual problems on UI screenshots.

- Needs images.
- `spec`: all optional: `question`, `checks[]` (issue types). Default checks: cut-off or overlapping text, untranslated text, broken image, broken layout, hard to read, typo, broken-looking button.
- `result.answer`: `{ok, issues: [{img, label, x, y, votes, notes}]}`
- Use `skill: lang:xx` for localized screens.

### media_review

Humans listen to or watch your file and answer.

- Needs exactly one audio or video file in `images[]`: MP3, M4A, WAV, OGG, MP4 or WebM, up to 25 MB, uploaded like an image.
- Media is stored as sent: strip metadata (GPS, device) yourself.
- `spec`: `question`, `duration_seconds`, and any of:
  - `options[]`: reviewers pick one
  - `transcript`: reviewers correct it
  - `mark_labels[]`: reviewers mark moments with timestamps
- `result.answer`: `{choice, choice_index, transcript, marks: [{t, label, votes}], comments}`
- The transcript returned is the one closest to all reviewers' versions.
- Price is per started minute, doubled when there is a transcript to correct.

### code_review

A developer reviews a unified diff.

- `spec`: `diff` (max 60 000 characters; remove secrets first), optional `title`, `question`, `language`. Use `skill: code:<lang>`.
- `result.answer`: `{verdict: approve|request_changes|reject, votes, summaries, comments: [{line, code, severity: blocker|issue|nit, texts, votes}]}`
- `line` is the 0-based line index in your diff.

### usability

Real people try a task on your public site, time it, rate how easy it was and describe where they got stuck.

- `spec`: `url`, `task`, `attest_safe: true` (same URL rules and Web Risk screening as `verify_web`), optional `questions[]` (up to 5), `max_minutes` (default 10)
- `result.answer`: `{completed: {yes, partly, no}, completion_rate, median_seconds, median_ease (1–5), problems, steps, answers, proof}`
- `proof` holds the reviewers' screenshot ids. Fetch them with `GET /api/v1/images/{id}`.
- Tell reviewers to stop before payment. They use made-up test data.

### native_check

Native speakers fix a translated or generated text.

- Item fields: `target_lang`, `content` (text, HTML or a JSON object of strings), plus optional `source`, `source_lang`, `format`, `doubt`, `doubt_note`
- Returns `final` / `final_json` and per-sentence `changes`. Apply them in one pass and show your human the final text once (see SKILL.md).

### proofread

Same as native_check, but for original text with no source. `target_lang` defaults to `en`.

## What people use it for → which kind

**Text and language**
- Native check of translations, UI strings, app store listings → `native_check`
- Proofread blog posts, release notes, emails → `proofread`
- Tone or brand-voice fit → `rate` (criteria: tone, on-brand)
- "Does this sound AI-written?" → `rate` or `choose`
- Clarity and readability → `rate`
- Summary faithful to the source? → `choose` (faithful / minor issues / wrong), with notes
- Mark hallucinated or unsupported sentences → `span_tag`
- Check facts and statistics before publishing → `fact_check`
- Cultural sensitivity in market X → `ask` with `skill: lang:xx`
- Brand or product name check in language X → `ask` with `skill: lang:xx`
- SEO title or meta pick → `compare` or `choose`

**Approvals (human in the loop)**
- Send email / message / DM → `approve_action`
- Payments, refunds, purchases → `approve_action` (risk high)
- Delete or migrate data, run a destructive shell command → `approve_action` with `diff`
- Publish a post, merge a PR, deploy → `approve_action`
- Contract clause or policy wording OK? → `approve_action` with `skill: domain:legal`

**Preference and quality**
- Which LLM output is better (RLHF-style) → `compare`
- Rank N options → `rank`
- Rubric scoring for evals → `rate`
- Headline, subject line, CTA, logo or design preference → `compare` (attach images)
- TTS or voice naturalness, pronunciation by natives → `media_review` with `options` and `skill: lang:xx`

**Labels and classification**
- Intent, sentiment, topic → `choose`
- Spam, fraud, abuse triage → `choose`
- Search relevance (query ↔ result) → `choose` or `rate`
- Is the LLM answer correct? Did it follow the instructions? → `choose`
- Duplicate or same-entity check (two records) → `choose` (same / different / unsure)

**Data**
- Do extracted fields match the document (invoice, receipt, form)? → `doc_fields`
- Is this row valid? Fill a missing value → `ask`

**Visual**
- Generated image QA (hands, text, prompt match) → `rate` or `choose` with images; `annotate` to point at the defects
- Bounding boxes or points for detection data → `annotate`
- UI screenshot review (overlap, truncation, untranslated text) → `ui_review`
- Alt-text quality → `rate`

**Audio and video**
- Fix a speech-to-text transcript → `media_review` with `transcript`
- Mark glitches, desync or wrong content in a video → `media_review` with `mark_labels`

**Web and real world**
- Is this price, opening hours or stock info still right? → `verify_web`
- Does the page work in country X? → `verify_web` with `skill: country:xx`
- Try the signup or checkout flow (no payment) → `usability` (time, ease, where people get stuck, screenshots)
- Find the official website of X → `ask`

**Code**
- "Is this command safe to run?" → `approve_action` with `skill: code:<lang>`
- Review an agent-written diff with line comments → `code_review` with `skill: code:<lang>`
- Does the SQL result look plausible? → `ask` with `skill: code:sql`

**Evals and data creation**
- Write a gold answer → `ask`
- Prompt regression check → `compare` (old vs new)

**Opinion**
- Quick poll of people (by country or language) → `ask` (repeat items for a bigger sample)



---

# Human Touch recipes

All examples are `ask_human` arguments. Add `max_coins` only if your human approved a budget.

## Gate an outgoing email

```json
{"agent": "support-bot", "max_coins": 60, "items": [{
  "ref": "refund-mail-1042", "kind": "approve_action",
  "context": "Customer asked for a refund of a damaged tea order. Policy: refunds within 30 days, no return needed.",
  "spec": {"action": "Send this refund confirmation email", "risk": "medium",
           "details": "Hi ⟦NAME_1⟧,\n\nwe refunded 24.90 EUR to your card…"}
}]}
```

Act only if `result.answer.decision` is `approve`. If it is `edit`, send `result.answer.edited` instead.

## Classify uncertain tickets (batch)

One item per ticket:

```json
{"items": [
  {"ref": "t-1", "kind": "choose", "spec": {"question": "What does the customer want?", "content": "…", "options": ["refund", "replacement", "information", "complaint only"]}},
  {"ref": "t-2", "kind": "choose", "spec": {"question": "What does the customer want?", "content": "…", "options": ["refund", "replacement", "information", "complaint only"]}}
]}
```

## Pick the better LLM output (eval)

```json
{"items": [{"ref": "prompt-v2-vs-v3/case-17", "kind": "compare",
  "spec": {"question": "Which answer helps the user more?", "a": "<output v2>", "b": "<output v3>"}}]}
```

Aggregate `winner` over many cases. Sides are randomized per reviewer.

## Is a brand name OK in another market?

```json
{"items": [{"ref": "name-pl", "kind": "ask", "skill": "lang:pl",
  "spec": {"question": "We want to name our tea brand 'Kurka'. Does it sound odd, funny or offensive in Polish?",
           "answer_schema": {"properties": {"problem": {"type": "boolean", "description": "Is there a problem?"}, "why": {"type": "string"}}, "required": ["problem"]}}}]}
```

## Check a page as a user in a given country

Only send pages you have verified are safe. `attest_safe: true` makes the account owner responsible, and a URL flagged by Google Web Risk bans the account.

```json
{"items": [{"ref": "pricing-de", "kind": "verify_web", "skill": "country:de",
  "spec": {"url": "https://example.com/pricing", "question": "What monthly price is shown for the Pro plan, and in which currency?",
           "checklist": ["Page loads without errors", "Cookie banner can be dismissed", "Prices are in EUR"],
           "attest_safe": true}}]}
```

## Rate support replies on a rubric

```json
{"items": [{"ref": "reply-88", "kind": "rate",
  "spec": {"question": "Rate this support reply", "content": "…",
           "criteria": [{"id": "correct", "label": "Factually correct"}, {"id": "tone", "label": "Friendly, not robotic"}, {"id": "complete", "label": "Answers everything asked"}]}}]}
```

## Native check of a locale file

```json
{"items": [{"ref": "locales/de.json", "kind": "native_check", "target_lang": "de", "source_lang": "en",
  "content": {"cta": "Jetzt Tee bestellen", "empty": "Dein Warenkorb ist leer"},
  "context": "E-commerce app, casual tone, du-form"}]}
```

Attach screenshots of the screens: run `upload_image`, then add `images`.

## Mark hallucinations in an answer before showing it

```json
{"items": [{"ref": "answer-17", "kind": "span_tag",
  "context": "Source document: <paste or summarise the source here>",
  "spec": {"question": "Mark every statement not supported by the source", "content": "…your answer…", "labels": ["unsupported", "contradicts source"]}}]}
```

Then rewrite or drop each returned span.

## Check extracted invoice fields

Upload the invoice page, then:

```json
{"items": [{"ref": "inv-2041", "kind": "doc_fields", "images": [{"id": "IMAGE_ID", "caption": "invoice page 1"}],
  "spec": {"fields": [{"name": "invoice_number", "value": "INV-2041"}, {"name": "date", "value": "2026-11-02"}, {"name": "total", "value": "249.00 EUR"}, {"name": "vat_id", "value": ""}]}}]}
```

Use `answer.fields[].value` as the corrected record; `answer.wrong` lists what changed.

## Review your diff before merging

```json
{"items": [{"ref": "pr-311", "kind": "code_review", "skill": "code:go",
  "spec": {"title": "Retry webhook delivery with backoff", "question": "Any bugs, races or security problems?", "diff": "<git diff output>"}}]}
```

Merge only on `verdict: approve`. Fix every `blocker` comment first.

## Can a new user sign up?

```json
{"items": [{"ref": "signup-test", "kind": "usability", "skill": "country:us",
  "spec": {"url": "https://example.com", "task": "Create a free account and reach the dashboard. Use a made-up name and test@example.com. Stop before any payment.",
           "questions": ["What almost made you give up?"], "max_minutes": 10, "attest_safe": true}}]}
```

## Fix a transcript

Upload the audio, then:

```json
{"items": [{"ref": "call-88", "kind": "media_review", "skill": "lang:de", "images": [{"id": "MEDIA_ID"}],
  "spec": {"question": "Correct the transcript so it matches exactly what is said", "duration_seconds": 95, "transcript": "…STT output…"}}]}
```


---

# Screenshots for Human Touch tasks

Reviewers only see what you attach. A screenshot shows layout, space and context, so they catch wording that is correct alone but wrong in place, or a button that overlaps. Attach one for anything visual: UI texts, pages, emails, documents, designs.

## Which tool to use

Use the first one you have:

1. **Playwright MCP** (`browser_navigate`, `browser_resize`, `browser_take_screenshot`). Set the window with `browser_resize` to 1280×800, then take the screenshot with a `filename`, so it is saved to a file and not returned into your context. Pass an element to capture one part, or `fullPage: true` for the whole page.
2. **Playwright CLI** (needs Node):
   ```bash
   npx -y playwright install chromium
   npx -y playwright screenshot --viewport-size="1280,800" --wait-for-timeout=1000 https://example.com shot.png
   npx -y playwright screenshot --full-page --viewport-size="1280,800" https://example.com page.png
   npx -y playwright screenshot --device="iPhone 13" https://example.com mobile.png
   ```
   If Chrome is already installed, add `--channel chrome` and skip the `install` step. Use `--wait-for-selector ".loaded"` to wait for content, and `--color-scheme dark` or `--lang de-DE` for variants.
3. **Headless Chrome**, no install:
   ```bash
   google-chrome --headless=new --hide-scrollbars --window-size=1280,800 --screenshot=shot.png https://example.com
   ```
   On macOS the binary is `"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"`.
4. **Other tools**:
   - `uvx shot-scraper https://example.com -o shot.png --width 1280 --selector ".checkout"`
   - Puppeteer, or your own browser automation.
   - Native and mobile apps: `xcrun simctl io booted screenshot shot.png` (iOS simulator), `adb exec-out screencap -p > shot.png` (Android).
   - Desktop: `screencapture -x shot.png` (macOS), `grim shot.png` or `gnome-screenshot -f shot.png` (Linux).
5. **Nothing works**: ask your human to attach screenshots, or send the task without them and say so in `context`.

For a local app, start it first and screenshot `http://localhost:…`.

For screens behind a login, use a test account and never put real credentials in a command:
1. Log in once with `npx -y playwright codegen --save-storage=auth.json https://example.com/login`.
2. Add `--load-storage=auth.json` to every screenshot command.
3. Delete `auth.json` when you are done.

## Take them efficiently

- **Width 1280, scale 1.** Images are stored at most 1600 px wide, so retina (2×) screenshots only make the upload bigger.
- **Only what matters.** Capture the element or the screen in question. Use a full page only when the whole page is reviewed. Pages are cut at 16 000 px tall.
- **PNG for UI and text**, JPEG or WebP (quality about 80) for photos. Up to 10 MB each.
- **Wait for the real state.** Let fonts and data load, close cookie banners and pop-ups, and show the state you ask about (error, empty cart, step 2).
- **One screenshot, many items.** Put shared screenshots in the top-level `images` of the request; every item sees them. For translations, one screenshot of the source-language screen serves every language.
- **Upload without base64.** Call `upload_image` with no arguments and run the `curl` command it returns with your file (`--data-binary @shot.png`). Never paste base64 into your context; it costs many tokens.
- **Caption every image**: where it is and what state it shows, for example `Checkout, step 2, card declined`.
- Limits: 10 images per item, 50 per request.

## Privacy

Screenshots are **not** redacted. Only text fields get personal data replaced with placeholders. Before you take a screenshot:

- Use test accounts and fake data.
- Hide or crop out emails, names, phone numbers, addresses, tokens, API keys and other notifications on the screen.
- With Playwright you can black out parts of the page: in code, `page.screenshot({ path: "shot.png", mask: [page.locator(".email")] })`.
