# Plan

Plan mode is for when you want the thinking without the execution to review, refine, or share a technical approach before committing to an implementation. It's useful at the start of a large feature, when evaluating architectural options, or when you want a structured breakdown of what needs to change before anything is touched.

<figure><img src="/files/EJJKij0c8PhrufYXcJHh" alt=""><figcaption></figcaption></figure>

***

### What Plan produces

A Plan mode output typically includes:

* A summary of explicit requirements what was stated in the prompt
* Implicit requirements things that follow logically but weren't mentioned (the ones that cause problems in week three if they're not accounted for)
* Stack selection with explicit reasoning for each choice
* A breakdown of services and how they interact
* A dependency-ordered task graph, grouped by layer
* Open questions or tradeoffs worth discussing before proceeding

The output is prose and structured lists, not code. It's designed to be reviewed, pushed back on, or shared with a teammate.

***

### Iterating on a plan

Plan output is a starting point. You can respond to any part of it before committing to execution:

```
We're already using MongoDB across the rest of the stack — design
tenant isolation around that instead of PostgreSQL.
```

```
The ingestion API and dashboard can share the same process for now.
We'll split them later if we need to scale.
```

Cora will revise the plan based on your constraints. Once you're satisfied, switch to Code mode or use Auto, which will transition automatically after plan confirmation.

***

### Using Plan on existing codebases

Plan mode is not only for new projects. You can run it against an existing codebase to get a structured description of what's there, identify architectural inconsistencies, or plan a large refactor before touching any files.

```
Review the current authentication system and plan a migration
from session-based to JWT. List every file that will need to change
and flag any breaking changes.
```

***

### Treating the plan as a contract

Once you've confirmed a plan and Code mode begins execution, Cora builds against it. If you want to change the approach mid-execution, say so explicitly and stop the current run rather than letting it continue. Partial execution against a plan you've mentally revised produces inconsistent code that's harder to clean up than starting the phase again.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codemate.ai/cora/modes/plan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
