> 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="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FLGmdAW97V4Bs0tI0WaKd%2Fimage.png?alt=media&amp;token=04b40cb7-4be0-4f30-8036-c0eafbe94593" alt=""><figcaption></figcaption></figure>

* Activate the WalnutAI extension and select the project.

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FsqtPiqH0ZZEABeEIOyuq%2Fimage.png?alt=media&amp;token=3f785448-18d6-4540-bdb1-032ca164f7db" 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="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FIkNr0ePM7pwPQ2glw3c2%2Fimage.png?alt=media&amp;token=b386af7e-a7d3-407c-a919-2629f59e0629" 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="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FViTNDBTT8tow32bfXVK9%2Fimage.png?alt=media&amp;token=45589fad-1911-4907-b050-82a78b6bbd3e" 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="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FFlLDVzvGFlFszfPzy3QE%2Fimage.png?alt=media&amp;token=2ed566fc-774d-4489-bc16-54136e9d1ea3" 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="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FtJ1onIV6HQcTBVNtQ6ah%2Fimage.png?alt=media&amp;token=17d76020-5754-47ed-9e57-88fa136c7d14" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FS79L9a4J4j6EoewgArsK%2Fimage.png?alt=media&amp;token=7a42f00e-0659-4fbd-ae06-b50460025f21" alt=""><figcaption></figcaption></figure>

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