> 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 Walnut 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 Walnut 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.walnutai.ai/development-and-infrastructure/walnutai-coder/working-with-new-applications-and-existing-repositories.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
