# Build with AI coding agents

> Give Claude Code, Codex, Gemini CLI, Antigravity, Cursor or Grok the docs, the rules and a prompt.

Give your coding agent the activQC docs, and it can write the integration with you: Claude Code, OpenAI Codex,
Gemini CLI, Google Antigravity, Cursor, xAI Grok or any other.

In the examples, `https://YOUR-ACTIVQC-HOST` is the host you read these docs on and made your key on.

## 1. The URLs to give it

| URL | What it is |
|---|---|
| `/llms.txt` | A short index of every page, with a few rules for agents. Start here. |
| `/llms-full.txt` | Every page and the whole API reference in one plain-text file. Best for one-shot context. |
| `/openapi.json` | The OpenAPI 3 description of every endpoint (also `/openapi.yaml`). Use it to generate a client or types. |
| Any page + `.md` | That page as Markdown, for example `/docs/webhooks.md`. Every page also has **Copy page**. |

All of them are public and need no key. Links inside them are absolute, so an agent can follow them.

## 2. Add the rules to your repository

Most coding agents read an instructions file at the root of your repository on every task. Paste this block into it,
and replace the host. Use `AGENTS.md` for most agents, `CLAUDE.md` for Claude Code and `GEMINI.md` for Gemini CLI.
To keep one copy, write `AGENTS.md` and make the other two links to it (`ln -s AGENTS.md CLAUDE.md`).

```markdown
## activQC (release checks)

We check releases with activQC by wavbee before they go to the stores.

- Docs: https://YOUR-ACTIVQC-HOST/llms.txt (index) and https://YOUR-ACTIVQC-HOST/llms-full.txt (everything).
  API: https://YOUR-ACTIVQC-HOST/openapi.json. Any docs page is Markdown at its URL plus `.md`.
  Read the docs before you write or change activQC code. Do not guess endpoints or fields.
- Config: the host is `ACTIVQC_BASE_URL`, the key is `ACTIVQC_KEY`, the webhook signing secret is
  `ACTIVQC_WEBHOOK_SECRET`. Read them from the environment. Never hard-code, commit or log them.
- Auth: `Authorization: Bearer $ACTIVQC_KEY` on every call, from our server only. Never put a key in browser or
  mobile code. Browsers get short-lived tokens our server mints (embed sessions, realtime tokens).
- Sandbox first: use a `wqc_test_` key in development and tests. `wqc_live_` keys are for production only.
- Every POST that creates something sends an `Idempotency-Key` header: a new UUID per operation, and the same one
  when it is retried.
- Errors: branch on `errors[].code`, never on `message`. On 429 wait `Retry-After` seconds; retry 5xx with backoff
  and the same `Idempotency-Key`.
- Webhooks: verify `X-Wqc-Signature` (HMAC-SHA256 of `<t>.<raw body>`, within five minutes) before trusting a
  delivery, and handle each event id once. Prefer webhooks and live updates to polling.
- A `needs_clarification` verdict is a question for the artist, not a rejection: show the options, send the answer.
- Write the brand as "activQC by wavbee" (wavbee is lowercase, or WAVBEE).
```

## 3. Per tool

| Tool | How to give it the docs |
|---|---|
| Claude Code | Put the block in `CLAUDE.md`. For one task, ask it to read `https://YOUR-ACTIVQC-HOST/llms-full.txt`. To keep a copy in the repository, save that file (for example as `docs/activqc.md`) and import it from `CLAUDE.md` with `@docs/activqc.md`. |
| OpenAI Codex | Put the block in `AGENTS.md`. Codex reads it on every task. |
| Gemini CLI | Put the block in `GEMINI.md`, or point its context file setting at `AGENTS.md`. |
| Google Antigravity | Put the block in `AGENTS.md` (or `GEMINI.md`), or add it as a workspace rule. |
| Cursor | Add `https://YOUR-ACTIVQC-HOST/llms-full.txt` as a doc (`@Docs`, then add a new doc), and refer to it with `@` in chat. It also reads `AGENTS.md`. |
| xAI Grok | Paste the `llms.txt` or `llms-full.txt` URL into the chat, or paste the file's text if it cannot open links. |
| Anything else | Use the tool's rules or instructions file. If it has none, paste `llms-full.txt` into the chat. |

An agent that cannot open links still works: download `llms-full.txt` once and give it the file.

## 4. A prompt to start with

Paste this into your agent, and change the last sentence to fit your code:

```text
Using the activQC docs at https://YOUR-ACTIVQC-HOST/llms-full.txt (OpenAPI at /openapi.json),
add a server-side release check to our release submission flow.
Send the release to POST /v1/qc/runs with an Idempotency-Key, read ACTIVQC_BASE_URL and ACTIVQC_KEY
from the environment, and handle the result from a qc.run.completed webhook whose signature you verify.
Show needs_clarification questions to the artist instead of rejecting.
Use a wqc_test_ key and write tests that do not call the live API.
Our submission code is in app/services/releases/submit.rb.
```

## Good habits

- Let the agent read the docs before it writes code, and ask it to name the endpoints it means to use.
- Keep keys out of the chat. The agent needs the variable names, not the values.
- Run everything against a test key first.
- When something changes in the API, the docs, `llms-full.txt` and `/openapi.json` change with it. Have the agent
  read them again rather than trust an older copy.
