> 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/plan.md).

# Plan

Produces architecture documents, stack decisions, and dependency-ordered task breakdowns. Does not write any code.

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="https://2395938751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ8BnJrGJwy0hT6DEkmb4%2Fuploads%2FB0JUMWtBVVVl982XPbi7%2Fplan%2Bmode.gif?alt=media&amp;token=f2692080-1843-4dbe-9ce7-1cb663355ec5" 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.
