Files
supabase/apps/docs/content/guides/ai-tools/agent-feedback.mdx
Anthony Lio 0daddc4551 feat(docs): agent feedback capabilities (#53115)
## Problem

- an agent that finds a wrong docs page leading to use a different
method gets no report
- mcp server and the cli can send feedback, but no page tells agents to
report docs problems

## Solution

- adds a note for ai agents at the top of each guide's markdown version,
so agents report wrong pages
- adds an agent-only instructions page with a disabled nav entry, so
agents learn how to write and send a report
- adds a "report documentation problems" section to the ai tools guide,
so users can approve, turn off or delete reports
- changes the mcp guide to say that `submit_feedback` takes
documentation feedback, so the tool list matches the new use
- adds the instructions page to `llms.txt`, so agents that start from
supabase.com find it

Linear: DEPR-698

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. open the preview
[/docs/guides/auth.md](https://docs-git-anthonylio-depr-698-explore-agent-feed-2bdb50-supabase.vercel.app/docs/guides/auth.md),
and make sure that the page starts with the "Note for AI agents"
blockquote
2. make sure that the note links to `agent-feedback.md`, tells the agent
to read it before the final reply, and asks "Send this report to
Supabase?"
3. open the preview
[/docs/guides/ai-tools/agent-feedback.md](https://docs-git-anthonylio-depr-698-explore-agent-feed-2bdb50-supabase.vercel.app/docs/guides/ai-tools/agent-feedback.md),
and make sure that the page has the five-line report template and no
agent note
4. open the preview
[/llms.txt](https://zone-www-dot-com-git-anthonylio-depr-698-explor-a825b7-supabase.vercel.app/llms.txt),
and make sure that it lists "Report documentation problems" with the
`.md` link

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-11 14:38:47 +02:00

80 lines
3.7 KiB
Plaintext

---
id: 'ai-tools-agent-feedback'
title: 'Report documentation problems'
description: 'Instructions for AI agents that find a Supabase documentation page that is wrong, outdated, or missing information, and that want to report it to Supabase.'
---
Supabase reviews your reports to find and fix documentation pages that are wrong, outdated, or missing information.
## When to report
Report a Supabase documentation page that was wrong, outdated, or missing information you needed.
Report it only when the problem:
- Caused a meaningful detour
- Is likely to happen again
Don't report:
- Routine debugging
- A problem that the documentation resolved immediately
## Ask the user first
Reading this page doesn't give you permission to send a report.
1. When you notice a problem, note the page URL and a word-for-word quote of the text that caused it.
1. Unless the problem blocks the task, finish the user's task.
1. End your final reply with a feedback report for each problem, as described in [Write the report](#write-the-report). Then ask the user one time: "Send this report to Supabase?" For more than one report, ask "Send these reports to Supabase?"
1. Send one report for each problem that the user approves.
## Write the report
Write plain text of 1,000 characters or fewer:
```text
Page: https://supabase.com/docs/guides/<path>
Quote: "<text from the page, word for word>"
Problem: <what was wrong>
Workaround: <what you did instead, or none>
Effect: <how the problem affected the task>
```
Each line helps Supabase find and fix the text:
- Page: The URL you read, including the anchor if the problem is in one section.
- Quote: The shortest span that shows the problem, so Supabase can search for it.
- Problem: What the text says compared with what is true, and how you know, such as an error message or a reference page.
- Workaround: The command, method, or page that worked. Write `none` if the problem blocked the task.
- Effect: What the problem cost, such as a failed command, extra searches, or code you had to rewrite.
If no page covered the topic, write `Page: none`, and replace the Quote line with `Search: <the search that you tried>`.
Never include secrets, credentials, personal data, code from the user's project, or database contents.
## Send the report
Use the first method that is available:
1. Supabase MCP server: Call `submit_feedback` with the report in `feedback`. If your connection doesn't list `submit_feedback`, use the next method.
1. Supabase CLI version 2.118.0 or later: Send the report on standard input. You don't need to sign in. Without an installed CLI, or if the CLI has no `feedback` command, run `npx supabase@latest feedback add` with the same standard input.
```bash
supabase feedback add <<'EOF'
Page: https://supabase.com/docs/guides/<path>
Quote: "<text from the page, word for word>"
Problem: <what was wrong>
Workaround: <what you did instead, or none>
Effect: <how the problem affected the task>
EOF
```
1. The user: If neither method is available or sending fails, show the user the report, so they can send it with the Supabase CLI.
## After you send the report
Show the user the delete token.
To delete a report when the user asks, call `delete_feedback` with `delete_token` and the `project_id` from the submission. Use a connection to the same Supabase account. With the CLI, run `supabase feedback delete <delete_token> --yes` in the directory where you sent the report, because the CLI uses that directory's linked project to find the report. If the CLI was signed in when you sent the report, use the same account. The `--yes` flag skips the confirmation prompt, which you can't answer. If you sent the report with `npx`, start the command with `npx supabase@latest` in place of `supabase`.