> For the complete documentation index, see [llms.txt](https://docs.walnutai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.walnutai.ai/development-and-infrastructure/walnutai-coder/working-with-new-applications-and-existing-repositories.md).

# Working with New Applications and Existing Repositories

The WalnutAI Agent adapts its workflow based on whether you are building a new application or working with an existing repository. The agent remains the default interface, dynamically transitioning between modes as required by the task.

**Building a New Application**

To start a project from scratch:

* Create a folder on your local machine and open it in VS Code.

<figure><img src="/files/5l5Xa8WSxymUUBIOGQAl" alt=""><figcaption></figcaption></figure>

* Activate the WalnutAI extension and select the project.

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

* Provide the Agent with your high-level requirement (for example, “Build a Task Management API”). Once submitted, the Agent proceeds through the following structured workflow:

  * **Analyze:** The Agent reviews your request and automatically enters [**Plan Mode**](#user-content-fn-1)[^1] to create a structured technical roadmap.

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

  * **Clarify:** If any information is unclear or incomplete, WalnutAI triggers a Q\&A mechanism to gather the necessary details, ensuring it avoids assumptions and does not hallucinate.

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

  * **Implement:** After you approve the proposed plan, the Agent begins implementation, requesting explicit permission before running terminal commands or making significant changes.

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

**Working with an Existing Repository**

To enhance or maintain an existing project:

* Clone the repository manually using VS Code.
* Open the project folder to allow the Agent to scan dependencies, frameworks, and architectural patterns.

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

* Start prompting for specific use cases like bug fixes, refactoring, or documentation.

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

[^1]: Converts high-level ideas into a clear, step-by-step technical plan before any code is written.
