# Your edits and page sources

How Docup knows a page is yours, why it never overwrites your wording, and how pages stay linked to the files they came from.

Two small pieces of bookkeeping make Docup safe to run on a real project: it remembers what the AI wrote, and it remembers which files each page came from.

## The AI version

When Docup writes a page, it stores the text twice: once as the page you edit, and once as the **AI version**. The AI version never changes while you work.

A page is **edited by you** when its text differs from the AI version. That is a plain comparison, so:

- Typing anything makes the page edited, and the amber **Edited by you** badge appears.
- Undoing everything back to the exact original text makes it unedited again.
- **Reset to AI version** copies the AI version back over your text.

## What "edited" protects

An edited page is protected from automatic rewrites in three ways:

1. A push that touches its source files never replaces your text. The update is saved as a **suggestion** that keeps your structure and wording and changes only what the code makes wrong.
2. If you start typing while an update is running, the result becomes a suggestion too, even if the page was unedited when the run started.
3. Instructions in [AI guidance](/settings/guidance) and ignore paths never rewrite existing pages.

When you apply a suggestion, the result is still your text. The page stays edited, so later pushes keep proposing changes instead of overwriting.

Pages you never touched are treated as followers of the code. They are rewritten when their files change and, on a live site, go live straight away. If you want to review every change to a page, make a small edit once; from then on, you decide.

## Page sources

Every AI-written page records the repository files it was written from. They are shown in the **Generated from** panel of the editor and in the **Written from** column of a run.

Sources are what connect a push to your docs:

| Event in your repository | What Docup does |
| --- | --- |
| A source file changes | The page is rewritten, or a suggestion is made if you edited it. |
| A source file is renamed | The page's list follows the new name. |
| A source file is deleted | It is removed from the list. |
| Every source file of a page is deleted | The page is flagged and waits for your decision. |
| A new file is added that no page covers | Docup decides whether it belongs in a page, needs a new page, or can be ignored. |

If a new file is attached to a page, it is added to that page's sources too.

## Pages without sources

Pages you create with **New page** have no sources. Pushes never change them. The same is true of a page after you choose **Keep page** for removed code. They are entirely yours.

## Where this shows up

- [The page editor](/guides/editor) shows the status badges, **Reset to AI version** and **Generated from**.
- [Review suggestions](/guides/review-suggestions) explains the comparison view.
- [Runs](/guides/runs) lists the files each page was written from.
