---
name: jank-cloud
description: >
  Run a hosted Jank quality audit on any URL from any AI chatbot — no plugin or MCP
  server needed. Submits to the testers.ai/jank cloud, polls until the report is
  ready, then renders an inline summary + a shareable report link. Works free (1
  report/day per email) or authenticated with an API key (higher limits, private
  reports). Use when the user asks to "jank a URL", "run a cloud audit", "quality
  check this website", or "test <url> in the cloud".
---

# Jank Cloud Audit (host-agnostic)

You can kick off a full hosted Jank audit of any public URL using nothing but HTTP
calls. The cloud runs 10 AI testers (personas, flows, accessibility, exploratory,
bug detection) and returns a shareable HTML report. Follow these steps exactly.

Base URL: `https://reports.testers.ai`

## Step 1 — Choose the auth path

- **Has an API key?** (the user pasted one, or you have `JANK_API_KEY`) → use the
  **authenticated** path. Higher limits, private reports allowed.
- **No key?** → use the **free demo** path. It needs the user's **email** (used only
  for the daily-quota counter + completion notice). Limit: **1 report/day per email**.
  Fully anonymous runs are not supported — if the user won't give an email, tell them
  to grab a free key at `https://reports.testers.ai/signup`.

Always confirm the **URL** to test first. It must be a public, reachable URL.

## Step 2 — Submit the run

**Free demo:**
```bash
curl -s -X POST https://reports.testers.ai/api/demo-submit \
  -H 'Content-Type: application/json' \
  -d '{"url":"<URL>","email":"<USER_EMAIL>"}'
```

**Authenticated (API key):**
```bash
curl -s -X POST https://reports.testers.ai/api/reports \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: <API_KEY>' \
  -d '{"url":"<URL>","intensity":"standard"}'
```

Both return `201` with a body containing the report **`id`** (a UUID). Capture it.

Handle errors plainly and stop:
- `400 valid email is required` / bad URL → ask the user to fix it.
- `429 daily demo limit reached (1/1)` → they've used today's free run; suggest the
  API key or trying again tomorrow.
- `401` → the API key is wrong; ask for a valid one.

Tell the user: "Submitted — building your report (usually 2–5 min)." and share the
link immediately (it renders live progress): `https://reports.testers.ai/r/<id>`

## Step 3 — Poll until done

Poll every ~20 seconds, up to ~8 minutes:
```bash
curl -s https://reports.testers.ai/api/reports/<id>
```
Read `.status` (`queued` → `running` → `done`/`failed`) and `.progress.stage` +
`.progress.percent`. Surface a one-line progress update to the user between polls
(e.g. "Running personas… 60%"). Stop when `status` is `done` or `failed`.

## Step 4 — Render the result inline

When `status == "done"`, pull from the same JSON:
- `analysis.score` (0–100) and the issue list `analysis.issues[]`
- `counts` (issues / personas / flows / subpages) if present
- `personaFeedback.personas[]` (ratings), `accessibility.grades`

Render a compact summary in chat:

```
✅ Jank report ready — <site>
Grade/score: <score>   ·   Issues: <n>   ·   Personas: <n>   ·   Flows passed: <n>

Top issues
1. [<severity>] <bug_title> — <one-line why>
   fix: <prompt_to_fix_this_issue>
2. …

🔗 Full report: https://reports.testers.ai/r/<id>
   ↳ JSON: /r/<id>.json · Markdown: /r/<id>.md · Fix-prompts: /r/<id>.fixes.txt
```

Keep it to the top 3–5 issues inline; the link has the rest. Always include the
report link. If `status == "failed"`, show `.error` and offer to retry.

## Notes
- Demo reports show the first few issues/personas/flows; the full set is on the
  linked report (or with an API-key run).
- The rendered report is brand-skinned by host — share the `reports.testers.ai/r/<id>`
  link for the testers.ai look.
- Don't fabricate findings — only report what the JSON returns.
