Files
Bereket EngidaandClaude Opus 5 883b8c197c feat(docs): add agent feedback endpoint
Adds a public, unauthenticated endpoint agents can use to report incorrect,
missing, or unclear documentation, plus bugs and feature requests.

There is no cross-vendor standard for agent feedback submission, and
/.well-known/ names are IANA-registered (RFC 8615) with no `feedback` entry,
so discovery goes through the channels agents actually read: /llms.txt and
the per-page markdown served under /llms.txt/**.md. The per-page footer is
agent-only by construction since humans get the rendered HTML.

- POST /api/feedback: zod-validated, Upstash sliding-window rate limit of
  10/h per IP, mirroring the existing enterprise-contact route
- GET /api/feedback: self-describing schema, so an agent holding only the
  URL can learn the payload shape. 422 responses include per-field issues
  alongside the schema, making a failed submission self-correcting
- Submissions are stored in Upstash (capped list + per-type counter). No IP
  is retained; the rate limiter already uses it
- Slack delivery is wired but no-ops unless SLACK_FEEDBACK_WEBHOOK_URL is
  set, and a notification failure never fails the submission

The documentation MCP server is deployed from a separate repository, so the
`submit_feedback` tool is not included here. It is a thin wrapper: input
schema matching feedbackSchema, handler POSTing to this endpoint.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 13:41:19 -07:00
..