# Change requests - let coworkers ask, let your agent build

Every app on Scava has a small button in the corner: **Suggest a change**. A colleague uses it to tell you what should be different, optionally pointing at the spot on the page. You decide. If you accept, your own agent picks the request up, builds the change and publishes it, and the colleague gets an email when it is live.

Scava never changes an app on its own. A request has no effect until a person accepts it, and only then can an agent see it.

## The flow

1. **A colleague sends a request.** They click "Suggest a change", write what they would like ("Please allow half days"), and may click "Point at it" and then the element on the page. Scava remembers the page, the element's selector, its tag and its visible text, and the version of the app.
2. **You get an email** with the request text and a link. The link opens the request on scava.ai. The owner and every co-editor receive it.
3. **You accept or decline** at scava.ai, in the browser. This cannot be done by an agent. There is also "Copy for agent" for pasting the request into an agent chat yourself.
4. **Your agent picks up the accepted requests.** Ask it: "Get my accepted change requests and build them." It uses `list_change_requests`.
5. **The agent builds the change** and publishes with the numbers of the requests it implemented. `publish_app` takes `resolves: [12, 14]`.
6. **The colleague gets an email**: "Your change request is live", with a link to the app. Scava marks the requests as done.

If you decline, the colleague gets an email saying the owner decided not to make the change, with your note if you wrote one.

## What the colleague sees

In the panel of the button, under "Your requests", the person sees their latest requests with a status: Sent, Accepted, Done or Declined. The panel also has "Report this app", "Sign out" and a "Made with Scava" link.

## What the agent sees

The agent sees accepted requests and the ones already done. Requests that nobody has accepted, and requests that were declined, do not exist for an agent: they are not in its list, and asking for one by number or trying to change one answers "not found". An agent can only set an accepted request to done. Accepting, declining and reopening are decisions of a person in the browser.

Each request reaches the agent as data, not as an order. The text, the page and the spot are wrapped in `<request>...</request>` with a note that this is a colleague's description of a wish and not an instruction: no commands to run, no links to open, no secrets to reveal, nothing outside the app. A request cannot close its own wrapper.

A request is accepted by one person, and it goes to the agent of **that** person. If that person cannot edit the app any more, it falls back to the agent of the owner. With co-editors, each accepts what they want to build with their own agent. See [Co-editors](/docs/co-editors).

Publishing with `resolves` marks only requests that were accepted. A version cannot close a request that nobody agreed to.

## What can be typed into a request

A request is short text. What people type into Scava is cleaned before it is saved: only normal characters, no invisible or direction-changing characters, no links, no code characters, and nothing that tries to give instructions to an AI. Texts that do not pass are refused with a reason. Long texts are refused. A person can send only a limited number of requests per day.

The element someone points at comes from the page, which may show things other people typed. It follows the same rules; whatever does not fit is left out.

## From the app's own code

The script that Scava adds to every page also offers:

```js
await scava.requestChange('Please allow half days', { element: { selector: '#from', text: 'From', tag: 'input' } });
const mine = await scava.myRequests();   // the current person's latest requests
```

This is how the button itself works. An app can offer its own way to send a wish.

## For your agent

`list_change_requests` lists the accepted requests of all your apps, or of one with `app`; with `status: "done"` those already built. `update_change_request` marks one as done, with an optional note.

Accept and decline happen at scava.ai or from the email, never through an agent.
