Agent Operating Guide (AGENTS.md)
Drop this short operating guide into your website repository’s AGENTS.md or CLAUDE.md so any coding agent connected to DiscoTrace MCP follows safe credit, fact-verification, and shipping guardrails.
Drop-in AGENTS.md / CLAUDE.md snippet
Section titled “Drop-in AGENTS.md / CLAUDE.md snippet”Copy the block below into your repo (replacing <your-workspace> and <your-company>):
# DiscoTrace Agentic AEO Workflow (<your-company>)
Workspace: `<your-workspace>`API Base: `https://app.discotrace.com/api/v1` · Hosted MCP: `https://app.discotrace.com/mcp`
## Recommended Loop1. **Inspect baseline & technical health:** Call `list_studies`, `get_study_summary`, and `get_technical_audit` to check Live Discovery rates, AI crawler access, canonical/JSON-LD status, and crawl issues.2. **Design or refine studies safely:** Always call `estimate_study_credits` before creating or editing a study matrix. Present the exact credit cost and total AI response volume before calling `create_study` or `update_study_plan`.3. **Diagnose buyer reservations:** Call `list_reservations` and `query_traces` to read verbatim AI buyer questions, search queries, and objections.4. **Pull grounded content drafts:** Call `list_opportunities` and `get_content_draft` to retrieve copy-ready Markdown drafts and `facts_to_verify` checklists.5. **Verify every `[VERIFY:]` claim before shipping:** Confirm every `[VERIFY: ...]` placeholder against official docs or ask a human owner. Never invent prices, SLAs, certifications, or customer counts. Never create hidden bot-only pages.6. **Ship & update workflow status:** Implement minimal, human-readable edits on canonical pages in this repo, then update draft status via `upsert_content_draft`.7. **Quote & queue verification:** Call `estimate_study_credits` first, then `queue_study_run` for a `recheck_pass` or `experiment_run`. Runs within the key's `auto_approve_credits` cap queue immediately; larger runs pause as `awaiting_approval` with a portal `resolveUrl` for 1-click human approval.
## Security Rules- Read `DISCOTRACE_API_KEY` from environment variables only; never commit API keys to git.- Workspace API keys are strictly scoped and cannot manage team members, share links, billing, or mint new keys.Starter prompts for coding agents
Section titled “Starter prompts for coding agents”Once .mcp.json (Claude Code / Cursor) or ~/.codex/config.toml (Codex CLI) is connected, try these three prompts:
1. Fix Technical Audit issues in your site repo
Section titled “1. Fix Technical Audit issues in your site repo”Call DiscoTrace get_technical_audit. Summarize every Partial, Review, and Issues found item, explain which URLs are affected, and propose minimal PR fixes in our website repository.2. Draft and quote a new study without spending credits
Section titled “2. Draft and quote a new study without spending credits”Use DiscoTrace MCP to design a new study targeting 2 buyer personas x 2 buyer situations for our core B2B offering. Call estimate_study_credits first to show me the exact credit cost and total AI responses, then call create_study with queue_run: false until I confirm.3. Ship a Content Center draft and queue a dry-run recheck
Section titled “3. Ship a Content Center draft and queue a dry-run recheck”Call list_opportunities and get_content_draft on our latest study. List every [VERIFY:] item for me to confirm before editing, implement the approved page update in our site repo, mark the draft as published via upsert_content_draft, and test queueing a dry_run recheck via queue_study_run.Handling errors autonomously
Section titled “Handling errors autonomously”Every REST and MCP error payload returns a machine-readable code and a direct resolveUrl:
insufficient_scope: Tell the human owner which scope (read,write, orrun) is missing and link them toresolveUrl(/w/<workspace>/api).awaiting_approval(HTTP 202onPOST /jobs): Do not retry in a loop — present the quoted credits andresolveUrlso the human owner can approve in 1 click.idempotency_in_progress(HTTP 409,retryable: true): Wait briefly and retry with the exact sameIdempotency-Key.