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

# Learn from your code

> Have a Planning worker read your existing app and propose its architecture in a guided conversation, with what it produces and what stays under your control.

If your app already has code, a Planning worker can read it and propose its architecture with you. You do this in **Guided chat**, where the worker acts as your architect. It reads the project's repository, asks what it can't tell from the code, explains tradeoffs, and prepares an update to your draft. It only proposes. Nothing reaches your architecture until you apply it, and nothing is used for planning until you publish it.

## Before you start

* **The code must be in the project's repository.** To bring in an existing app, [import its branch](https://docs.ironoctopus.ai/build/feature-history.md#import-a-branch) first. Without a repository, the worker can still discuss the architecture but can't read any code.
* **You need an active Planning worker.** See [AI workers and teams](https://docs.ironoctopus.ai/ai/workers-and-teams.md).

## Steps

**1. Start guided design**

Open the project and choose **Architecture**. Under **Design through chat**, click **Start guided design**, then choose the **Architecture worker**.

**2. Ask it to describe the app**

For example: "Read the repository and describe this app's architecture: its main parts, where data lives, and the decisions you can see in the code." Add what the code can't show, such as goals, constraints and plans. The worker uses your current draft as context.

**3. Work through what it finds**

Correct anything it got wrong, and settle the decisions it raises. Ask about tradeoffs, such as whether a part should become its own service.

**4. Prepare the update**

Click **Prepare draft update**. The worker turns the conversation into a complete draft update. It keeps decisions already made, and lists anything still unresolved as assumptions or open questions.

**5. Apply, review and publish**

Click **Apply to Architecture draft**. Read the draft, edit it if needed, and [publish it](https://docs.ironoctopus.ai/architecture/update-and-publish.md).

If applying fails, click **Retry applying to Architecture draft** for a temporary problem, or **Prepare corrected proposal** if the content needs to change.

## Getting a good result

* **Ask about one area at a time** in a large app, such as data, then integrations, then background work.
* **Tell it what's intended, not just what's there.** The code shows what exists. Only you know what's a deliberate decision and what's an accident.
* **Keep unresolved questions in the draft.** An open question recorded in the architecture is better than a guess, and planning will respect it.

## If something goes wrong

| You see | What to do |
| - | - |
| "Configure an active Planning worker to use guided Architecture chat." | Activate a Planning worker in Workspace settings › **AI workers**. |
| "No Project repository is available. The worker can discuss the Architecture draft, but cannot inspect existing code." | Import the code into the project first. |
| "The Architecture chat session expired. Send the message again to start a fresh session." | Send your message again. Your draft isn't affected. |
| "Architecture worker did not respond" | Send the message again. If it keeps happening, check the worker's status in **AI workers**. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.