> For the complete documentation index, see [llms.txt](https://docs.codemate.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemate.ai/cora/modes/ask.md).

# Ask

Answers questions about your codebase and explains how things work. Never writes, modifies, or deletes files.

Ask mode has full read access to your project but makes no changes. Use it when you need to understand something before acting how a part of the system works, what a function does, what depends on what, or what would break if you changed something.

<figure><img src="https://2395938751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ8BnJrGJwy0hT6DEkmb4%2Fuploads%2Fwe1I6FGZXepD016F3qW1%2FAsk-mode.gif?alt=media&amp;token=50bcfba4-a4c0-4512-a7f8-d2cdb3cf190c" alt=""><figcaption></figcaption></figure>

***

### What Ask is for

Ask is useful any time you need context before making a decision or a change. Some common uses:

**Tracing data flow**

```
Where does the WebSocket event "metric:update" originate?
Trace the full path from ingestion to the frontend chart component.
```

**Understanding dependencies**

```
What would break if I changed the shape of the Event model?
List every file and function that reads from it.
```

**Debugging context**

```
We're getting a 401 on the /events endpoint for a specific API key.
Walk me through how API key validation works what gets checked and in what order.
```

**Understanding existing decisions**

```
Why is the ingestion API a separate Express process instead of
a Next.js API route? What would break if we merged them?
```

***

### Ask vs. Plan

The distinction is backward vs. forward looking. Ask explains what exists in the current codebase. Plan designs what should exist. If you're trying to understand the system as it is, use Ask. If you're trying to figure out how to change it, start with Plan or Auto.

***

### Ask before large changes

A useful habit: run an Ask prompt before any change that touches core infrastructure. Understanding what depends on a thing before you modify it surfaces risks that aren't obvious from reading a single file.

```
Before I refactor the tenant middleware, what are all the places
it's used, and are there any edge cases in how it's currently applied?
```
