> ## Documentation Index
> Fetch the complete documentation index at: https://livingcontext.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Doc editor agent

> An AI pair-writer in the change request editor — chat about the open doc, mention Salesforce components for context, and review its edits as inline tracked changes.

The doc agent lives in the right-side **Agent** panel. Open any doc — in the [docs viewer](/guides/docs-viewer) or a [change request](/guides/editing-and-change-requests) — click **Agent** in the top bar (or press <kbd>⌘</kbd> <kbd>.</kbd>), and the panel becomes an assistant for exactly that document. It knows which doc you have open, researches your code and metadata before answering, and proposes edits you review word by word — never silent rewrites.

With no doc open, the same panel answers general questions about your documentation.

## Ways to start

The empty panel offers one-click starters — **Summarize this doc**, **Explain this doc**, **Proofread**, **Improve the writing** — or just type what you want. Three chat modes control how far it may go:

| Mode        | Behavior                                       |
| ----------- | ---------------------------------------------- |
| **Default** | Can search, edit, and more                     |
| **Ask**     | Answers only — won't make edits                |
| **Plan**    | Plans first, then executes after your approval |

## Give it context

The agent already sees the open doc. You can sharpen its focus:

* **@-mention** a Salesforce component in your message — mentions become context pills, and the agent fetches that component's metadata before answering.
* **Add the editor selection** from the **+** menu — highlight text in the doc and hand it to the conversation, so "rewrite this section" needs no re-selecting.
* **Attach images or diagrams** from the **+** menu.

When the doc's tagged components have changed in Salesforce since the doc was last committed, **Stale** chips appear above the composer — click one to pull the drifted component in, or hit **Freshen** to pre-load them all with an update instruction.

## How edits arrive

When the agent proposes a change, it doesn't replace your text. Edits appear as **inline tracked-change suggestions** directly in the document — word-level insertions and deletions, the way a careful colleague would mark up a draft.

A review bar counts the pending edits and steps you through them:

* **Accept** or **reject** each suggestion individually — clicking one shows a card describing the addition, deletion, or rewrite.
* **Accept all** or **reject all** in one action.
* The chat shows **"Revision ready"** with a **Show changes** shortcut that scrolls the document to the first pending change.

Nothing is final until you accept — and answers that researched your systems settle into **"Grounded in N sources"** citations you can inspect.

<Tip>
  Ask for one focused change at a time — "tighten the intro" or "update the field table to match the current schema" — and you'll get small, easy-to-review suggestion sets.
</Tip>

In views where editing isn't possible — Source mode, a diff, a merged change request — the agent says so and stays in ask-only mode. Switch to Visual mode on an editable doc to get suggestions again.

## Slash commands

Type **/** in the agent composer:

| Command           | What it does                                                                                 |
| ----------------- | -------------------------------------------------------------------------------------------- |
| `/freshen`        | Update the doc where its tagged Salesforce metadata has changed                              |
| `/diagram`        | Create or regenerate a diagram from tagged metadata — add a type (e.g. data-model, sequence) |
| Template commands | Restructure the doc to match one of your [templates](/guides/templates-and-style)            |
| Your skills       | Every AI skill appears as its own command                                                    |

## AI skills

Beyond the chat panel, the editor has lighter-weight AI entry points: select text and run a skill from the floating toolbar, or press **space on an empty line** to open the inline AI bar and type a freeform instruction.

Built-in skills:

| Skill              | Behavior                                             |
| ------------------ | ---------------------------------------------------- |
| 📝 Improve Writing | Edits the selection as tracked changes               |
| ✅ Proofread        | Fixes grammar, spelling, and punctuation             |
| 💬 Explain         | Answers in the panel without touching the doc        |
| ✨ Reformat         | Restructures the selection (lists, tables, headings) |

Diagram skills — data model (ERD), sequence, integration architecture, flow logic, and more — draft entire diagrams from the doc's tagged metadata.

### Custom skills

Admins can add organization-specific skills under **Settings → AI skills** — for example "Convert to admin runbook tone" or "Add a compliance disclaimer". Each has an emoji, a prompt, and a behavior: **edit** (arrives as tracked changes) or **chat** (answers without touching the doc).

<Note>
  Whether an edit comes from the agent panel, a skill, or the inline AI bar, it lands as a reviewable change — the [grounded-or-it-doesn't-ship](/agents/overview#grounded-or-it-doesnt-ship) rule applies everywhere.
</Note>
